KaliVeda  1.12/06
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:
22 
26 
27 public:
29  : fGGtoPG_0(0), fGGtoPG_1(1. / 15.), fChIo(nullptr),
30  NumeroCodeur(0)
31  {
33  }
34  virtual ~KVINDRADetector() {}
35  KVINDRADetector(const Char_t* type, const Float_t thick = 0.0)
36  : KVDetector(type, thick), fGGtoPG_0(0), fGGtoPG_1(1. / 15.),
37  fChIo(nullptr), NumeroCodeur(0)
38  {
40  }
41 
43  {
45  return (KVINDRATelescope*)GetParentStructure("TELESCOPE");
46  }
47 
48  virtual void SetSegment(UShort_t)
49  {
53  }
54 
55  void SetType(const Char_t* t)
56  {
58  TString T(t);
59  T.ToUpper();
61  }
62 
63  const Char_t* GetArrayName();
65  {
66  if (GetTelescope()) return GetTelescope()->GetRingNumber();
68  KVString name(GetName());
69  name.Begin("_");
70  KVString type = name.Next(kTRUE);
71  KVString index = name.Next(kTRUE);
72  if (type == "SILI" || type == "SI75") return index.Atoi();
73  return index.Atoi() / 100;
74  }
76  {
77  if (GetTelescope()) return GetTelescope()->GetNumber();
79  KVString name(GetName());
80  name.Begin("_");
81  KVString type = name.Next(kTRUE);
82  KVString index = name.Next(kTRUE);
83  if (type == "SILI" || type == "SI75") return 0; //no idea
84  return index.Atoi() % 100;
85  }
86  Int_t GetIndex() const
87  {
89  return 100 * GetRingNumber() + GetModuleNumber();
90  }
91 
92  void AddACQParamType(const Char_t* type);
93  virtual KVACQParam* GetACQParam(const Char_t* /*type*/) const;
94 
95  Double_t GetPGfromGG(Double_t GG = -1);
96  Double_t GetGGfromPG(Double_t PG = -1);
98  {
103  par[0] = fGGtoPG_0;
104  par[1] = fGGtoPG_1;
105  };
107  {
113  fGGtoPG_0 = alpha;
114  fGGtoPG_1 = beta;
115  };
117  {
118  return (fChIo ? fChIo : const_cast<KVINDRADetector*>(this)->FindChIo());
119  }
120  virtual Float_t GetPG() const
121  {
122  return GetACQData("PG");
123  }
124  virtual Float_t GetGG() const
125  {
126  return GetACQData("GG");
127  }
128  virtual Float_t GetR() const
129  {
130  return GetACQData("R");
131  }
132  virtual Float_t GetL() const
133  {
134  return GetACQData("L");
135  }
136  UShort_t GetMT() const
137  {
138  return GetACQParam("T")->GetCoderData();
139  }
140 
141  void SetNumeroCodeur(Int_t numero);
143 
144  void SetThickness(Double_t thick);
145 
146  ClassDef(KVINDRADetector, 2) //Detectors of INDRA array
147 };
148 
149 #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
GANIL VXI/VME acquisition parameter.
Definition: KVACQParam.h:15
Short_t GetCoderData() const
Definition: KVACQParam.h:64
virtual void SetType(const Char_t *str)
Definition: KVBase.h:166
UInt_t GetNumber() const
Definition: KVBase.h:213
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
virtual Float_t GetACQData(const Char_t *) const
Definition: KVDetector.cpp:666
void SetKVDetectorFiredACQParameterListFormatString()
Definition: KVDetector.cpp:87
Base class for detectors of INDRA array.
void SetNumeroCodeur(Int_t numero)
Set the number of the electronic module of type QDC.
void SetType(const Char_t *t)
void AddACQParamType(const Char_t *type)
UInt_t GetRingNumber() const
virtual KVACQParam * GetACQParam(const Char_t *) const
Double_t GetPGfromGG(Double_t GG=-1)
void SetThickness(Double_t thick)
KVINDRADetector(const Char_t *type, const Float_t thick=0.0)
Double_t fGGtoPG_1
GG-PGconversion factor: slope.
UInt_t GetModuleNumber() const
virtual Float_t GetR() const
void SetGGtoPGConversionFactors(Double_t alpha, Double_t beta)
virtual ~KVINDRADetector()
void GetGGtoPGConversionFactors(Double_t *par)
virtual Float_t GetGG() const
virtual Float_t GetL() const
Double_t fGGtoPG_0
GG-PG conversion factor: offset.
virtual void SetSegment(UShort_t)
const Char_t * GetArrayName()
Double_t GetGGfromPG(Double_t PG=-1)
KVINDRATelescope * GetTelescope() const
Int_t NumeroCodeur
Numero du codeur (QDC pour les ChIo/Si)
KVINDRADetector * FindChIo()
KVINDRADetector * fChIo
pointer to ionisation chamber in group associated to this detector
UShort_t GetMT() const
KVINDRADetector * GetChIo() const
Int_t GetIndex() const
virtual Float_t GetPG() 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:562
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:675
virtual const char * GetName() const
Int_t Atoi() const
double beta(double x, double y)
double T(double x)