KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDetector.h
Go to the documentation of this file.
1 /***************************************************************************
2  kvdetector.h - description
3  -------------------
4  begin : Thu May 16 2002
5  copyright : (C) 2002 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 $Id: KVDetector.h,v 1.71 2009/05/22 14:45:40 ebonnet Exp $
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #ifndef KVDETECTOR_H
21 #define KVDETECTOR_H
22 
23 #ifndef KVD_RECPRC_CNXN
24 #define KVD_RECPRC_CNXN 1
25 #endif
26 #ifndef KVD_NORECPRC_CNXN
27 #define KVD_NORECPRC_CNXN 0
28 #endif
29 
30 #include "KVMaterial.h"
31 #include "KVPosition.h"
32 #include "KVList.h"
33 #include "KVNucleus.h"
34 #include "Binary_t.h"
35 #include "KVGeoDetectorNode.h"
36 #include "KVUniqueNameList.h"
37 #include "KVDetectorSignal.h"
38 #include "KVEvent.h"
39 
40 class KVGeoStrucElement;
41 class KVGroup;
42 class KVCalibrator;
43 class TGeoVolume;
44 class TTree;
45 class TGraph;
46 
159 class KVDetector: public KVMaterial, public KVPosition {
160 
161 private:
171 
172  enum {
173  kIsAnalysed = BIT(14), //for reconstruction of particles
174  kActiveSet = BIT(15), //internal - flag set true when SetActiveLayer called
175  kUnidentifiedParticle = BIT(16), //set if detector is in an unidentified particle's list
176  kIdentifiedParticle = BIT(17), //set if detector is in an identified particle's list
177  };
178 
181 
185  void SetMatrix(const TGeoHMatrix* m)
186  {
188  }
190  {
192  }
194  {
195  return KVPosition::GetMatrix();
196  }
198  {
199  return KVPosition::GetShape();
200  }
202  {
204  }
206  {
208  }
210  {
212  }
214  {
216  }
217  Double_t GetSurfaceArea(int npoints = 100000) const
218  {
219  return KVPosition::GetSurfaceArea(npoints);
220  }
222  {
224  }
225 
227 
229 
230 protected:
231 
239 
242 
244  Double_t EResDet(Double_t* x, Double_t* par);
246 
250 
253 
257 
259 
261  {
265  ds->SetDetector(this);
266  fDetSignals.Add(ds);
267  }
268 
269 public:
270  KVDetector();
271  KVDetector(const Char_t* type, const Float_t thick = 0.0);
272  KVDetector(const KVDetector&);
273  void init();
274  virtual ~ KVDetector();
275 
276 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
277  virtual void Copy(TObject& obj) const;
278 #else
279  virtual void Copy(TObject& obj);
280 #endif
281 
282  virtual void SetMaterial(const Char_t* type);
283  void AddAbsorber(KVMaterial*);
285  {
286  fActiveLayer = actif;
288  }
290  {
292  return fActiveLayer;
293  }
294  KVMaterial* GetAbsorber(Int_t i) const;
295  KVMaterial* GetAbsorber(const Char_t* name) const
296  {
298  return (KVMaterial*)(fAbsorbers ? fAbsorbers->FindObject(name) : 0);
299  }
301  {
302  return fAbsorbers;
303  }
305  {
306  return fAbsorbers->GetEntries();
307  }
308  virtual const Char_t* GetArrayName();
310  {
311  return fDepthInTelescope;
312  }
313 
315  {
318 
319  fTotThickness = 0;
320  TIter next(fAbsorbers);
321  KVMaterial* mat;
322  while ((mat = (KVMaterial*)next())) fTotThickness += mat->GetThickness();
323  return fTotThickness;
324  };
326  {
327  return &fNode;
328  }
329 
330  const Char_t* GetMaterialName() const
331  {
332  if (GetActiveLayer())
333  return GetActiveLayer()->GetName();
334  return KVMaterial::GetName();
335  };
336  virtual void DetectParticle(KVNucleus*, TVector3* norm = 0);
337  virtual Double_t GetELostByParticle(KVNucleus*, TVector3* norm = 0);
338  virtual Double_t GetParticleEIncFromERes(KVNucleus*, TVector3* norm = 0);
339 
340  void SetGain(Double_t gain);
341  Double_t GetGain() const;
342 
344  {
346  return GetDetectorSignalValue("Energy");
347  }
348  virtual Double_t GetEnergy() const
349  {
353  if (IsSimMode()) return ELoss; // in simulation mode, return calculated energy loss in active layer
354  if (ELoss > 0) return ELoss;
355  ELoss = GetCalibratedEnergy();
356  if (ELoss < 0) ELoss = 0;
357  SetEnergy(ELoss);
358  return ELoss;
359  }
360  virtual void SetEnergy(Double_t e) const
361  {
367  }
368  virtual Double_t GetEnergyLoss() const
369  {
370  return GetEnergy();
371  }
372  virtual void SetEnergyLoss(Double_t e) const
373  {
374  SetEnergy(e);
375  }
377  -1., Bool_t transmission = kTRUE);
378  virtual Int_t FindZmin(Double_t ELOSS = -1., Char_t mass_formula = -1);
379 
380  Bool_t AddCalibrator(KVCalibrator* cal, const KVNameValueList& opts = "");
381  Bool_t ReplaceCalibrator(const Char_t* type, KVCalibrator* cal, const KVNameValueList& opts = "");
382  KVCalibrator* GetCalibrator(const Char_t* name,
383  const Char_t* type) const;
384  KVCalibrator* GetCalibrator(const Char_t* type) const;
386  {
387  return fCalibrators;
388  }
390  {
393  return (HasDetectorSignal("Energy") && IsOK());
394  }
395  Bool_t IsCalibrated(const KVNameValueList& params) const;
396 
397  virtual void Clear(Option_t* opt = "");
398  virtual void Reset(Option_t* opt = "")
399  {
400  Clear(opt);
401  }
402  virtual void Print(Option_t* option = "") const;
403 
404  void AddHit(KVNucleus* part)
405  {
407 
408  if (!fParticles) {
409  fParticles = new KVList(kFALSE);
411  }
412  fParticles->Add(part);
413  SetAnalysed();
414  }
415 
416  void RemoveHit(KVNucleus* part)
417  {
419 
420  fParticles->Remove(part);
422  }
423 
425  KVList* GetHits() const
426  {
427  return fParticles;
428  }
429  void ClearHits()
430  {
432  if (fParticles) fParticles->Clear();
433  }
435  Int_t GetNHits() const
436  {
437  return (fParticles ? fParticles->GetEntries() : 0);
438  }
439 
440  inline UShort_t GetSegment() const;
441  inline virtual void SetSegment(UShort_t s);
443  {
444  return TestBit(kIsAnalysed);
445  }
446  void SetAnalysed(Bool_t b = kTRUE)
447  {
448  SetBit(kIsAnalysed, b);
449  }
450  virtual Bool_t Fired(Option_t* opt = "any") const
451  {
466 
467  if (!IsDetecting()) return kFALSE; //detector not working, no answer at all
468  if (IsSimMode()) return (GetActiveLayer()->GetEnergyLoss() > 0.); // simulation mode: detector fired if energy lost in active layer
469 
470  TString OPT(opt);
471  OPT.ToLower();
472  Bool_t all = (OPT == "all");
473 
474  TIter raw_it(&GetListOfDetectorSignals());
475  KVDetectorSignal* ds;
476  int count_raw = 0;
477  while ((ds = (KVDetectorSignal*)raw_it())) {
478  if (ds->IsRaw()) {
479  ++count_raw;
480  if (ds->IsFired()) {
481  if (!all) return kTRUE;
482  }
483  else {
484  if (all) return kFALSE;
485  }
486  }
487  }
488  return all && count_raw;
489  }
490  virtual void RemoveCalibrators();
491 
492  Double_t GetDetectorSignalValue(const KVString& type, const KVNameValueList& params = "") const
493  {
501 
503  return (s ? s->GetValue(params) : 0);
504  }
505  void SetDetectorSignalValue(const KVString& type, Double_t val) const
506  {
512 
514  if (s) s->SetValue(val);
515  }
516  Double_t GetInverseDetectorSignalValue(const KVString& output, Double_t value, const KVString& input, const KVNameValueList& params = "") const
517  {
528 
530  return (s ? s->GetInverseValue(value, input, params) : 0);
531  }
532  virtual KVDetectorSignal* GetDetectorSignal(const KVString& type) const
533  {
538 
540  }
541  Bool_t HasDetectorSignal(const KVString& type) const
542  {
545  return (GetDetectorSignal(type) != nullptr);
546  }
547 
548 
549  virtual void AddIDTelescope(TObject* idt);
551  {
553  return fIDTelescopes;
554  }
557 
559  {
560  fUnidentP += n;
561  fUnidentP = (fUnidentP > 0) * fUnidentP;
563  }
565  {
566  fIdentP += n;
567  fIdentP = (fIdentP > 0) * fIdentP;
569  }
571  {
573  }
575  {
577  }
578 
579  static KVDetector* MakeDetector(const Char_t* name, Float_t thick);
580 
581  virtual TGeoVolume* GetGeoVolume();
582  virtual void AddToGeometry();
583  virtual void GetVerticesInOwnFrame(TVector3* /*corners[8]*/, Double_t /*depth*/, Double_t /*layer_thickness*/);
586  {
589  return GetSurfaceCentre();
590  }
592  {
595  }
597  {
599  return GetShape();
600  }
602  {
604  return GetMatrix();
605  }
606 
607  virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A);
608  virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A);
609  virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc);
610  virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc);
611  virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc);
612  virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e =
613  -1.0, enum SolType type = kEmax);
614  /*virtual Double_t GetEResFromDeltaE(...) - DON'T IMPLEMENT, CALLS GETINCIDENTENERGY*/
615  virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres);
617  virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc);
618  virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc);
622 
623  virtual TF1* GetEResFunction(Int_t Z, Int_t A);
624  virtual TF1* GetELossFunction(Int_t Z, Int_t A);
625  virtual TF1* GetRangeFunction(Int_t Z, Int_t A);
626 
628 
630  {
631  fEResforEinc = e;
632  }
634  {
635  return fEResforEinc;
636  }
637 
638  virtual void ReadDefinitionFromFile(const Char_t*);
639 
640  virtual TList* GetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
641  void ResetAlignedDetectors(UInt_t direction = /*KVGroup::kBackwards*/ 1);
642 
643  virtual void SetSimMode(Bool_t on = kTRUE)
644  {
650  fSimMode = on;
651  }
652  virtual Bool_t IsSimMode() const
653  {
659  return fSimMode;
660  }
661 
662  virtual Bool_t IsPresent() const
663  {
665  return fPresent;
666  }
667  void SetPresent(Bool_t yes = kTRUE)
668  {
669  fPresent = yes;
670  }
671  virtual Bool_t IsDetecting() const
672  {
674  return fDetecting;
675  }
676  void SetDetecting(Bool_t yes = kTRUE)
677  {
678  fDetecting = yes;
679  }
680 
681  virtual Bool_t IsOK() const
682  {
684  return (fPresent && fDetecting);
685  }
686 
688 
689  KVGroup* GetGroup() const;
691 
694  KVGeoStrucElement* GetParentStructure(const Char_t* type, const Char_t* name = "") const;
695 
696  void SetActiveLayerMatrix(const TGeoHMatrix*);
701  {
704  return fEWPosition;
705  }
707  {
712  }
714  {
716  if (ROOTGeo()) return fEWPosition.GetSolidAngle();
717  return KVPosition::GetSolidAngle();
718  }
720  {
722  if (ROOTGeo()) return fEWPosition.GetRandomDirection(t);
724  }
725  void GetRandomAngles(Double_t& th, Double_t& ph, Option_t* t = "isotropic")
726  {
728  if (ROOTGeo()) fEWPosition.GetRandomAngles(th, ph, t);
729  else KVPosition::GetRandomAngles(th, ph, t);
730  }
732  {
734  if (ROOTGeo()) return fEWPosition.GetDirection();
735  return KVPosition::GetDirection();
736  }
738  {
740  if (ROOTGeo()) return fEWPosition.GetDistance();
741  return KVPosition::GetDistance();
742  }
744  {
746  if (ROOTGeo()) return fEWPosition.GetTheta();
747  return KVPosition::GetTheta();
748  }
750  {
752  if (ROOTGeo()) return fEWPosition.GetSinTheta();
753  return KVPosition::GetSinTheta();
754  }
756  {
758  if (ROOTGeo()) return fEWPosition.GetCosTheta();
759  return KVPosition::GetCosTheta();
760  }
761  Double_t GetPhi() const
762  {
764  if (ROOTGeo()) return fEWPosition.GetPhi();
765  return KVPosition::GetPhi();
766  }
767 
768  void SetThickness(Double_t thick);
770  {
772  return fSingleLayer;
773  }
774  Bool_t HasSameStructureAs(const KVDetector*) const;
775  void SetNameOfArray(const TString& n)
776  {
777  fNameOfArray = n;
778  }
779  const Char_t* GetNameOfArray() const
780  {
782  return fNameOfArray;
783  }
784 
786  {
787  return fDetSignals;
788  }
790  {
795 
796  auto signal = new KVDetectorSignal(type, this);
797  fDetSignals.Add(signal);
798  return signal;
799  }
800  Bool_t AddDetectorSignalExpression(const KVString& type, const KVString& _expr);
801 
802  virtual Int_t GetIndex() const
803  {
807 
808  return 0;
809  }
810 
811  ClassDef(KVDetector, 10) //Base class for the description of detectors in multidetector arrays
812 };
813 
815  const Char_t* type) const
816 {
817  if (fCalibrators)
819  return 0;
820 }
821 
823 {
824  if (fCalibrators)
826  return 0;
827 }
828 
830 {
832  return fSegment;
833 }
834 
836 {
838  fSegment = s;
839 }
840 
841 inline void KVDetector::SetGain(Double_t gain)
842 {
843  fGain = gain;
844 }
845 
847 {
848  return fGain;
849 }
850 #endif
int Int_t
unsigned int UInt_t
#define OPT
#define b(i)
#define e(i)
unsigned short UShort_t
char Char_t
const Bool_t kFALSE
bool Bool_t
double Double_t
float Float_t
const Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
int type
Base class for all detector calibrations.
Definition: KVCalibrator.h:98
Base class for output signal data produced by a detector.
virtual Bool_t IsRaw() const
Bool_t IsFired() const
void SetDetector(const KVDetector *d)
Base class for detector geometry description.
Definition: KVDetector.h:159
void SetDetectorSignalValue(const KVString &type, Double_t val) const
Definition: KVDetector.h:505
void SetNameOfArray(const TString &n)
Definition: KVDetector.h:775
KVMaterial * GetAbsorber(const Char_t *name) const
Definition: KVDetector.h:295
Double_t GetInverseDetectorSignalValue(const KVString &output, Double_t value, const KVString &input, const KVNameValueList &params="") const
Definition: KVDetector.h:516
static KVDetector * MakeDetector(const Char_t *name, Float_t thick)
virtual const Char_t * GetArrayName()
Definition: KVDetector.cpp:439
TGeoHMatrix * GetActiveLayerMatrix() const
Definition: KVDetector.h:601
void IncrementIdentifiedParticles(Int_t n=1)
Definition: KVDetector.h:564
virtual Bool_t IsSimMode() const
Definition: KVDetector.h:652
virtual Bool_t IsOK() const
Definition: KVDetector.h:681
Int_t fCalWarning
just a counter so that missing calibrator warning is given only once
Definition: KVDetector.h:238
void SetMatrix(const TGeoHMatrix *m)
Definition: KVDetector.h:185
KVPosition fEWPosition
position of entrance window i.e. first volume in detector geometry
Definition: KVDetector.h:162
virtual Double_t GetMaxDeltaE(Int_t Z, Int_t A)
virtual void SetSimMode(Bool_t on=kTRUE)
Definition: KVDetector.h:643
@ kIdentifiedParticle
Definition: KVDetector.h:176
@ kUnidentifiedParticle
Definition: KVDetector.h:175
const Char_t * GetMaterialName() const
Definition: KVDetector.h:330
KVUniqueNameList fParentStrucList
list of geometry structures which directly contain this detector
Definition: KVDetector.h:163
Int_t GetNumberOfAbsorberLayers() const
Definition: KVDetector.h:304
void IncrementUnidentifiedParticles(Int_t n=1)
Definition: KVDetector.h:558
virtual void GetVerticesInOwnFrame(TVector3 *, Double_t, Double_t)
virtual Double_t GetERes(Int_t Z, Int_t A, Double_t Einc)
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:276
Double_t ELossActive(Double_t *x, Double_t *par)
Definition: KVDetector.cpp:980
TList * GetTelescopesForIdentification()
Definition: KVDetector.cpp:761
virtual void AddIDTelescope(TObject *idt)
Add ID telescope to list of telescopes to which detector belongs.
Definition: KVDetector.cpp:722
KVList * GetAlignedIDTelescopes()
Definition: KVDetector.cpp:736
KVList * fCalibrators
list of associated calibrator objects
Definition: KVDetector.h:233
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
KVGroup * GetGroup() const
void AddDetectorSignal(KVDetectorSignal *ds)
Definition: KVDetector.h:260
void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVDetector.h:725
virtual ~ KVDetector()
Bool_t fDetecting
=kTRUE if detector is "detecting", =kFALSE if not
Definition: KVDetector.h:256
virtual Double_t GetRange(Int_t Z, Int_t A, Double_t Einc)
virtual void SetEnergyLoss(Double_t e) const
Definition: KVDetector.h:372
Bool_t ReplaceCalibrator(const Char_t *type, KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:551
KVList * GetHits() const
Return the list of particles hitting this detector in an event.
Definition: KVDetector.h:425
virtual Double_t GetTotalDeltaE(Int_t Z, Int_t A, Double_t Einc)
virtual TGeoVolume * GetGeoVolume()
virtual Double_t GetEnergy() const
Definition: KVDetector.h:348
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Definition: KVDetector.h:435
virtual TF1 * GetEResFunction(Int_t Z, Int_t A)
virtual void SetSegment(UShort_t s)
Definition: KVDetector.h:835
TVector3 GetSurfaceNormal() const
Definition: KVDetector.h:213
KVList * GetListOfCalibrators() const
Definition: KVDetector.h:385
virtual Double_t GetEIncOfMaxDeltaE(Int_t Z, Int_t A)
void RemoveHit(KVNucleus *part)
Definition: KVDetector.h:416
Double_t GetSinTheta() const
Definition: KVDetector.h:749
virtual TGraph * DrawPunchThroughEsurAVsZ(Int_t massform=KVNucleus::kBetaMass)
Double_t GetSolidAngle() const
Definition: KVDetector.h:713
static Int_t fDetCounter
Definition: KVDetector.h:165
void AddAbsorber(KVMaterial *)
Definition: KVDetector.cpp:629
virtual Double_t GetEnergyLoss() const
Definition: KVDetector.h:368
virtual Double_t GetEResAfterDetector() const
Definition: KVDetector.h:633
KVList * GetIDTelescopes()
Definition: KVDetector.h:550
KVList * fIDTelescopes
list of ID telescopes to which detector belongs
Definition: KVDetector.h:167
void SetShape(TGeoBBox *s)
Definition: KVDetector.h:189
TVector3 GetRandomPointOnSurface() const
Definition: KVDetector.h:201
void AddParentStructure(KVGeoStrucElement *elem)
Bool_t IsSingleLayer() const
Definition: KVDetector.h:769
Double_t GetTheta() const
Definition: KVDetector.h:743
Double_t fEResforEinc
used by GetIncidentEnergy & GetCorrectedEnergy
Definition: KVDetector.h:251
KVList * fIDTelAlign
list of ID telescopes made of this detector and all aligned detectors placed in front of it
Definition: KVDetector.h:168
TGeoHMatrix * GetMatrix() const
Definition: KVDetector.h:193
virtual Int_t GetIndex() const
Definition: KVDetector.h:802
virtual Int_t FindZmin(Double_t ELOSS=-1., Char_t mass_formula=-1)
Definition: KVDetector.cpp:906
TF1 * fELossF
parametric function dE in active layer vs. incident energy
Definition: KVDetector.h:247
TList * fAlignedDetectors[2]
stores lists of aligned detectors in both directions
Definition: KVDetector.h:252
virtual void Clear(Option_t *opt="")
Definition: KVDetector.cpp:596
const KVPosition & GetEntranceWindow() const
Definition: KVDetector.h:700
Bool_t HasDetectorSignal(const KVString &type) const
Definition: KVDetector.h:541
KVMaterial * GetAbsorber(Int_t i) const
Returns pointer to the i-th absorber in the detector (i=0 first absorber, i=1 second,...
Definition: KVDetector.cpp:645
void ClearHits()
Definition: KVDetector.h:429
void remove_signal_for_calibrator(KVCalibrator *K)
Definition: KVDetector.cpp:677
KVList * fAbsorbers
list of absorbers making up the detector
Definition: KVDetector.h:235
TVector3 GetVolumeCentre() const
Definition: KVDetector.h:209
TList * fIDTele4Ident
list of ID telescopes used for particle ID
Definition: KVDetector.h:169
Double_t GetGain() const
Definition: KVDetector.h:846
TF1 * fEResF
parametric function Eres residual energy after all layers of detector
Definition: KVDetector.h:248
KVDetectorSignal * AddDetectorSignal(const KVString &type)
Definition: KVDetector.h:789
virtual void DeduceACQParameters(KVEvent *, KVNumberList &)
Definition: KVDetector.h:687
virtual Double_t GetSmallestEmaxValid(Int_t Z, Int_t A)
TVector3 GetActiveLayerSurfaceCentre() const
Definition: KVDetector.h:585
Bool_t HasSameStructureAs(const KVDetector *) const
void SetThickness(Double_t thick)
virtual Bool_t Fired(Option_t *opt="any") const
Definition: KVDetector.h:450
virtual void AddToGeometry()
UInt_t GetGroupNumber()
virtual Double_t GetIncidentEnergy(Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
virtual KVDetectorSignal * GetDetectorSignal(const KVString &type) const
Definition: KVDetector.h:532
virtual void ReadDefinitionFromFile(const Char_t *)
Double_t GetTotalThicknessInCM()
Definition: KVDetector.h:314
Bool_t IsCalibrated() const
Definition: KVDetector.h:389
void SetDetecting(Bool_t yes=kTRUE)
Definition: KVDetector.h:676
virtual TF1 * GetELossFunction(Int_t Z, Int_t A)
Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVDetector.h:217
void SetActiveLayer(KVMaterial *actif)
Definition: KVDetector.h:284
KVDetector()
default ctor
Definition: KVDetector.cpp:76
Bool_t BelongsToUnidentifiedParticle() const
Definition: KVDetector.h:570
Double_t RangeDet(Double_t *x, Double_t *par)
KVMaterial * GetActiveLayer() const
Definition: KVDetector.h:289
const Char_t * GetNameOfArray() const
Definition: KVDetector.h:779
virtual void RemoveCalibrators()
Definition: KVDetector.cpp:699
virtual Double_t GetEntranceWindowSurfaceArea()
Return surface area of first layer of detector in cm2.
virtual TGraph * DrawPunchThroughEnergyVsZ(Int_t massform=KVNucleus::kBetaMass)
KVUniqueNameList fDetSignals
list of signals associated with detector
Definition: KVDetector.h:226
Double_t GetPhi() const
Definition: KVDetector.h:761
virtual Double_t GetPunchThroughEnergy(Int_t Z, Int_t A)
Int_t fUnidentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:180
TF1 * fRangeF
parametric function range of particles in detector
Definition: KVDetector.h:249
Bool_t AddDetectorSignalExpression(const KVString &type, const KVString &_expr)
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList &params="") const
Definition: KVDetector.h:492
virtual void SetEnergy(Double_t e) const
Definition: KVDetector.h:360
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:328
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:629
virtual Double_t GetCalibratedEnergy() const
Definition: KVDetector.h:343
KVGeoDetectorNode fNode
positioning information relative to other detectors
Definition: KVDetector.h:164
void SetActiveLayerMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of active layer volume.
UShort_t fSegment
used in particle reconstruction
Definition: KVDetector.h:236
UShort_t GetSegment() const
Definition: KVDetector.h:829
virtual Bool_t IsDetecting() const
Definition: KVDetector.h:671
TVector3 GetSurfaceCentre() const
Definition: KVDetector.h:205
virtual void Copy(TObject &obj) const
Definition: KVDetector.cpp:127
Bool_t IsAnalysed()
Definition: KVDetector.h:442
void RemoveParentStructure(KVGeoStrucElement *elem)
TVector3 GetDirection()
Definition: KVDetector.h:731
const KVSeqCollection & GetListOfDetectorSignals() const
Definition: KVDetector.h:785
KVList * fParticles
list of particles hitting detector in an event
Definition: KVDetector.h:234
virtual TList * GetAlignedDetectors(UInt_t direction=1)
KVGeoDetectorNode * GetNode()
Definition: KVDetector.h:325
Double_t GetDistance() const
Definition: KVDetector.h:737
Bool_t fSimMode
=kTRUE when using to simulate detector response, =kFALSE when analysing data
Definition: KVDetector.h:254
TString fNameOfArray
name of multidetector array this detector is part of
Definition: KVDetector.h:170
Bool_t BelongsToIdentifiedParticle() const
Definition: KVDetector.h:574
void SetEntranceWindowMatrix(const TGeoHMatrix *)
Set ROOT geometry global matrix transformation to coordinate frame of entrance window.
virtual Double_t GetDeltaE(Int_t Z, Int_t A, Double_t Einc)
Double_t EResDet(Double_t *x, Double_t *par)
TGeoBBox * GetActiveLayerShape() const
Definition: KVDetector.h:596
KVList * GetListOfAbsorbers() const
Definition: KVDetector.h:300
virtual Double_t GetDepthInTelescope() const
Definition: KVDetector.h:309
Double_t fDepthInTelescope
used to store depth of detector in parent telescope
Definition: KVDetector.h:241
virtual void Reset(Option_t *opt="")
Definition: KVDetector.h:398
Double_t fGain
gain of amplifier
Definition: KVDetector.h:237
TVector3 GetActiveLayerVolumeCentre() const
Definition: KVDetector.h:591
const TVector3 GetCentreOfEntranceWindow() const
Definition: KVDetector.h:706
KVMaterial * fActiveLayer
The active absorber in the detector.
Definition: KVDetector.h:166
void AddHit(KVNucleus *part)
Definition: KVDetector.h:404
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
Definition: KVDetector.h:814
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
Int_t fIdentP
temporary counters, determine state of identified/unidentified particle flags
Definition: KVDetector.h:179
Double_t GetMisalignmentAngle() const
Definition: KVDetector.h:221
virtual Bool_t IsPresent() const
Definition: KVDetector.h:662
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVDetector.h:719
void SetEntranceWindowShape(TGeoBBox *)
Set ROOT geometry shape of entrance window.
Bool_t fPresent
=kTRUE if detector is present, =kFALSE if it has been removed
Definition: KVDetector.h:255
void ResetAlignedDetectors(UInt_t direction=1)
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Definition: KVDetector.cpp:203
void SetActiveLayerShape(TGeoBBox *)
Set ROOT geometry shape of active layer volume.
void SetAnalysed(Bool_t b=kTRUE)
Definition: KVDetector.h:446
void SetGain(Double_t gain)
Definition: KVDetector.h:841
TString fFName
dynamically generated full name of detector
Definition: KVDetector.h:232
virtual void Print(Option_t *option="") const
Definition: KVDetector.cpp:364
Bool_t fSingleLayer
=kTRUE if detector has a single absorber layer
Definition: KVDetector.h:258
virtual Double_t GetLinearRange(Int_t Z, Int_t A, Double_t Einc)
virtual TF1 * GetRangeFunction(Int_t Z, Int_t A)
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Definition: KVDetector.cpp:810
void init()
default initialisations
Definition: KVDetector.cpp:38
Bool_t AddCalibrator(KVCalibrator *cal, const KVNameValueList &opts="")
Definition: KVDetector.cpp:478
Double_t GetCosTheta() const
Definition: KVDetector.h:755
Double_t fTotThickness
used to store value calculated by GetTotalThicknessInCM
Definition: KVDetector.h:240
void SetPresent(Bool_t yes=kTRUE)
Definition: KVDetector.h:667
TGeoBBox * GetShape() const
Definition: KVDetector.h:197
virtual void SetMaterial(const Char_t *type)
Definition: KVDetector.cpp:177
Abstract base class container for multi-particle events.
Definition: KVEvent.h:66
Information on relative positions of detectors & particle trajectories.
Base class describing elements of array geometry.
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
Extended TList class which owns its objects by default.
Definition: KVList.h:27
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:93
virtual void SetEnergyLoss(Double_t e) const
Definition: KVMaterial.h:153
virtual Double_t GetThickness() const
Definition: KVMaterial.cpp:487
virtual Double_t GetEnergyLoss() const
Definition: KVMaterial.h:143
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:90
virtual void GetRandomAngles(Double_t &th, Double_t &ph, Option_t *t="isotropic")
Definition: KVPosition.cpp:280
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
Definition: KVPosition.cpp:242
virtual void SetShape(TGeoBBox *)
Definition: KVPosition.cpp:743
virtual Double_t GetSolidAngle(void) const
Definition: KVPosition.cpp:567
virtual Double_t GetTheta() const
Definition: KVPosition.h:159
Bool_t ROOTGeo() const
Returns kTRUE if ROOT geometry is used, kFALSE if not.
Definition: KVPosition.cpp:598
virtual TVector3 GetSurfaceCentre() const
Definition: KVPosition.cpp:886
virtual TGeoHMatrix * GetMatrix() const
Definition: KVPosition.cpp:777
virtual Double_t GetPhi() const
Definition: KVPosition.h:171
virtual Double_t GetDistance(void) const
Definition: KVPosition.h:189
virtual TVector3 GetVolumeCentre() const
Definition: KVPosition.cpp:915
virtual Double_t GetSurfaceArea(int npoints=100000) const
Definition: KVPosition.cpp:974
virtual Double_t GetSinTheta() const
Definition: KVPosition.h:163
virtual TVector3 GetSurfaceNormal() const
Definition: KVPosition.cpp:945
virtual Double_t GetMisalignmentAngle() const
virtual void SetMatrix(const TGeoHMatrix *)
Definition: KVPosition.cpp:702
virtual TGeoBBox * GetShape() const
Definition: KVPosition.cpp:790
virtual Double_t GetCosTheta() const
Definition: KVPosition.h:167
virtual TVector3 GetDirection()
Definition: KVPosition.cpp:463
virtual TVector3 GetRandomPointOnSurface() const
Definition: KVPosition.cpp:813
KaliVeda extensions to ROOT collection classes.
T * get_object(const TString &name) const
virtual void Clear(Option_t *option="")
virtual void SetCleanup(Bool_t enable=kTRUE)
virtual TObject * FindObjectByType(const Char_t *) const
virtual void Add(TObject *obj)
virtual TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual TObject * FindObject(const char *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)
virtual Int_t GetEntries() const
virtual const char * GetName() const
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
const Int_t n
const long double s
Definition: KVUnits.h:94
const long double m
Definition: KVUnits.h:70