KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVTelescope.h
Go to the documentation of this file.
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 
32 class KVNucleus;
33 class TGraph;
34 
35 class KVTelescope: public KVGeoStrucElement, public KVPosition {
36 
37 protected:
40  void init();
41 
42 public:
43 
44  KVTelescope();
45  virtual ~ KVTelescope();
46 
47  void Add(KVBase* element);
48 
50  {
52  if (n > GetSize() || n < 1) {
53  Error("GetDetector(UInt_t n)", "%s n must be between 1 and %u",
54  GetName(), GetSize());
55  return 0;
56  }
57  KVDetector* d = (KVDetector*) GetDetectors()->At((n - 1));
58  return d;
59  };
61  Int_t GetSize() const
62  {
64  return GetDetectors()->GetSize();
65  };
66  virtual void DetectParticle(KVNucleus* kvp, KVNameValueList* nvl = 0);
67  void ResetDetectors();
68 
69 
70  void SetDepth(UInt_t ndet, Float_t depth);
71  Float_t GetDepth(Int_t ndet) const;
74  {
76  return ((Double_t)GetDepth(ndet)) / 10.;
77  }
78  Float_t GetDepth() const;
79 
80  virtual TGeoVolume* GetGeoVolume();
81  virtual void AddToGeometry();
82 
84  virtual void SetAzimuthalAngle(Double_t ph)
85  {
88  }
89  virtual void SetPolarAngle(Double_t th)
90  {
93  }
94  virtual void SetPolarWidth(Double_t pw)
95  {
98  }
99  virtual void SetPolarMinMax(Double_t min, Double_t max)
100  {
101  KVPosition::SetPolarMinMax(min, max);
103  }
104  virtual void SetAzimuthalWidth(Double_t aw)
105  {
108  }
109  virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
110  {
113  }
114 
115  ClassDef(KVTelescope, 3) //Multi-layered telescopes composed of different absorbers
116 };
117 
118 #endif
int Int_t
unsigned int UInt_t
#define d(i)
double Double_t
float Float_t
#define ClassDef(name, id)
#define R__FOR_EACH(type, proc)
Base class for KaliVeda framework.
Definition: KVBase.h:141
Base class for detector geometry description.
Definition: KVDetector.h:159
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:125
Base class used for handling geometry in a multidetector array.
Definition: KVPosition.h:90
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:35
virtual void SetPolarAngle(Double_t th)
Definition: KVTelescope.h:89
Int_t fNdets
number of detectors in telescope
Definition: KVTelescope.h:38
virtual void SetAzimuthalAngle(Double_t ph)
override KVPosition methods to apply to all detectors
Definition: KVTelescope.h:84
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:94
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:39
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:73
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)
Set min and max polar angles and calculate (mean) theta.
Definition: KVTelescope.h:99
KVDetector * GetDetector(Int_t n) const
Definition: KVTelescope.h:49
virtual void SetAzimuthalWidth(Double_t aw)
Definition: KVTelescope.h:104
virtual void DetectParticle(KVNucleus *kvp, KVNameValueList *nvl=0)
virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
Set min and max azimuthal angles and calculate (mean) phi.
Definition: KVTelescope.h:109
Int_t GetSize() const
Definition: KVTelescope.h:61
virtual const char * GetName() const
virtual void Error(const char *method, const char *msgfmt,...) const
const Int_t n