KaliVeda
Toolkit for HIC analysis
KVTelescope.h
1 #ifndef KVTELESCOPE_H
2 #define KVTELESCOPE_H
3 #include "KVGroup.h"
4 #include "KVPosition.h"
5 #include "KVDetector.h"
6 #include "KVList.h"
7 #include "KVNameValueList.h"
8 #include "KVGeoStrucElement.h"
9 
33 class KVNucleus;
34 class TGraph;
35 
36 class KVTelescope: public KVGeoStrucElement, public KVPosition {
37 
38 protected:
41  void init();
42 
43 public:
44 
45  KVTelescope();
46  virtual ~ KVTelescope();
47 
48  void Add(KVBase* element);
49 
51  {
53  if (n > GetSize() || n < 1) {
54  Error("GetDetector(UInt_t n)", "%s n must be between 1 and %u",
55  GetName(), GetSize());
56  return 0;
57  }
58  KVDetector* d = (KVDetector*) GetDetectors()->At((n - 1));
59  return d;
60  };
62  Int_t GetSize() const
63  {
65  return GetDetectors()->GetSize();
66  };
67  virtual void DetectParticle(KVNucleus* kvp, KVNameValueList* nvl = 0);
68  void ResetDetectors();
69 
70 
71  void SetDepth(UInt_t ndet, Float_t depth);
72  Float_t GetDepth(Int_t ndet) const;
75  {
77  return ((Double_t)GetDepth(ndet)) / 10.;
78  }
79  Float_t GetDepth() const;
80 
81  virtual TGeoVolume* GetGeoVolume();
82  virtual void AddToGeometry();
83 
85  virtual void SetAzimuthalAngle(Double_t ph)
86  {
89  }
90  virtual void SetPolarAngle(Double_t th)
91  {
94  }
95  virtual void SetPolarWidth(Double_t pw)
96  {
99  }
100  virtual void SetPolarMinMax(Double_t min, Double_t max)
101  {
104  }
105  virtual void SetAzimuthalWidth(Double_t aw)
106  {
109  }
110  virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
111  {
114  }
115 
116  ClassDef(KVTelescope, 3) //Multi-layered telescopes composed of different absorbers
117 };
118 
119 #endif
int Int_t
unsigned int UInt_t
#define d(i)
float Float_t
double Double_t
#define ClassDef(name, id)
#define R__FOR_EACH(type, proc)
Base class for KaliVeda framework.
Definition: KVBase.h:142
Base class for detector geometry description.
Definition: KVDetector.h:160
Base class describing elements of array geometry.
const KVSeqCollection * GetDetectors() const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:126
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:91
virtual void SetAzimuthalWidth(Double_t aw)
Definition: KVPosition.cpp:189
virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
Set min and max azimuthal angles and calculate (mean) phi.
Definition: KVPosition.cpp:216
virtual void SetAzimuthalAngle(Double_t ph)
Definition: KVPosition.cpp:117
virtual void SetPolarAngle(Double_t th)
Definition: KVPosition.cpp:96
virtual void SetPolarWidth(Double_t pw)
Definition: KVPosition.cpp:147
virtual void SetPolarMinMax(Double_t min, Double_t max)
Set min and max polar angles and calculate (mean) theta.
Definition: KVPosition.cpp:171
KaliVeda extensions to ROOT collection classes.
virtual Int_t GetSize() const
virtual TObject * At(Int_t idx) const
Associates two detectors placed one behind the other.
Definition: KVTelescope.h:36
virtual void SetPolarAngle(Double_t th)
Definition: KVTelescope.h:90
Int_t fNdets
number of detectors in telescope
Definition: KVTelescope.h:39
virtual void SetAzimuthalAngle(Double_t ph)
override KVPosition methods to apply to all detectors
Definition: KVTelescope.h:85
virtual TGeoVolume * GetGeoVolume()
Create and return TGeoVolume representing detectors in this telescope.
Double_t GetTotalLengthInCM() const
void SetDepth(UInt_t ndet, Float_t depth)
set the depth of detector number ndet(=1,2,...) in mm.
virtual void SetPolarWidth(Double_t pw)
Definition: KVTelescope.h:95
Int_t GetDetectorRank(KVDetector *kvd)
returns position (1=front, 2=next, etc.) detector in the telescope structure
Float_t * fDepth
[fNdets] depth of each element starting from nearest target
Definition: KVTelescope.h:40
virtual ~ KVTelescope()
void ResetDetectors()
Reset Energy losses to be ready for the next event.
void Add(KVBase *element)
Definition: KVTelescope.cpp:65
Double_t GetDepthInCM(Int_t ndet) const
Definition: KVTelescope.h:74
Float_t GetDepth() const
get depth of entire telescope in mm (sum of depths of detectors)
virtual void AddToGeometry()
Construct and position a TGeoVolume shape to represent this telescope in the current geometry.
virtual void SetPolarMinMax(Double_t min, Double_t max)
Definition: KVTelescope.h:100
KVDetector * GetDetector(Int_t n) const
Definition: KVTelescope.h:50
virtual void SetAzimuthalWidth(Double_t aw)
Definition: KVTelescope.h:105
virtual void DetectParticle(KVNucleus *kvp, KVNameValueList *nvl=0)
virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
Definition: KVTelescope.h:110
Int_t GetSize() const
Definition: KVTelescope.h:62
const char * GetName() const override
virtual void Error(const char *method, const char *msgfmt,...) const
const Int_t n
double min(double x, double y)
double max(double x, double y)