KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVINDRADetector.h
Go to the documentation of this file.
1 
4 #ifndef __KVINDRADETECTOR_H
5 #define __KVINDRADETECTOR_H
6 
7 #include "KVDetector.h"
8 #include "KVINDRATelescope.h"
9 
16 class KVINDRADetector : public KVDetector {
17 protected:
18 
21 
22 public:
24  : fChIo(nullptr)
25  {
26  }
27  virtual ~KVINDRADetector() {}
28  KVINDRADetector(const Char_t* type, const Float_t thick = 0.0)
29  : KVDetector(type, thick), fChIo(nullptr)
30  {
31  }
32 
34  {
36  return (KVINDRATelescope*)GetParentStructure("TELESCOPE");
37  }
38 
39  virtual void SetSegment(UShort_t)
40  {
44  }
45 
46  void SetType(const Char_t* t)
47  {
49  TString T(t);
50  T.ToUpper();
52  }
53 
54  const Char_t* GetArrayName();
56  {
57  if (GetTelescope()) return GetTelescope()->GetRingNumber();
59  KVString name(GetName());
60  name.Begin("_");
61  KVString type = name.Next(kTRUE);
62  KVString index = name.Next(kTRUE);
63  if (type == "SILI" || type == "SI75") return index.Atoi();
64  return index.Atoi() / 100;
65  }
67  {
68  if (GetTelescope()) return GetTelescope()->GetNumber();
70  KVString name(GetName());
71  name.Begin("_");
72  KVString type = name.Next(kTRUE);
73  KVString index = name.Next(kTRUE);
74  if (type == "SILI" || type == "SI75") return 0; //no idea
75  return index.Atoi() % 100;
76  }
77  Int_t GetIndex() const
78  {
80  return 100 * GetRingNumber() + GetModuleNumber();
81  }
82 
84  {
85  return (fChIo ? fChIo : const_cast<KVINDRADetector*>(this)->FindChIo());
86  }
87 
88  void SetThickness(Double_t thick);
89 
90  ClassDef(KVINDRADetector, 2) //Detectors of INDRA array
91 };
92 
93 #endif
int Int_t
unsigned int UInt_t
unsigned short UShort_t
char Char_t
double Double_t
float Float_t
const Bool_t kTRUE
#define ClassDef(name, id)
int type
virtual void SetType(const Char_t *str)
Definition: KVBase.h:172
UInt_t GetNumber() const
Definition: KVBase.h:219
Base class for detector geometry description.
Definition: KVDetector.h:159
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
Base class for detectors of INDRA array.
void SetType(const Char_t *t)
UInt_t GetRingNumber() const
void SetThickness(Double_t thick)
KVINDRADetector(const Char_t *type, const Float_t thick=0.0)
UInt_t GetModuleNumber() const
virtual ~KVINDRADetector()
virtual void SetSegment(UShort_t)
const Char_t * GetArrayName()
KVINDRATelescope * GetTelescope() const
KVINDRADetector * FindChIo()
KVINDRADetector * fChIo
pointer to ionisation chamber in group associated to this detector
KVINDRADetector * GetChIo() const
Int_t GetIndex() const
Base class for telescopes in INDRA array.
Int_t GetRingNumber() const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
void Begin(TString delim) const
Definition: KVString.cpp:565
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
virtual const char * GetName() const
Int_t Atoi() const
double T(double x)