KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVFAZIADetector.h
Go to the documentation of this file.
1 
4 #ifndef __KVFAZIADETECTOR_H
5 #define __KVFAZIADETECTOR_H
6 
7 #include "KVDetector.h"
8 class KVSignal;
9 
10 #define __KVFD_methname(X, Y) Get ## X ## Y
11 #define __KVFD_setmethname(X, Y) Set ## X ## Y
12 #define __KVFD_dotcat(X, Y) X.Y
13 #define __KVFD_str(s) #s
14 #define __KVFD_xstr(s) __KVFD_str(s)
15 #define __KVFD_dcs(X, Y) __KVFD_xstr(__KVFD_dotcat(X,Y))
16 
17 #define __KVFAZIADETECTOR_GETSIGNAL(sig,type) \
18  Double_t __KVFD_methname(sig,type)() const \
19  { \
20  return GetDetectorSignalValue(__KVFD_dcs(sig,type)); \
21  } \
22  void __KVFD_setmethname(sig,type)(Double_t val) \
23  { \
24  GetDetectorSignal(__KVFD_dcs(sig,type))->SetValue(val); \
25  }
26 
45 class KVFAZIADetector : public KVDetector {
46 protected:
48 
55 
60 
62 
63  void init(); //initialisation method called by the constructors
65 
66 public:
67  enum { //determine identification of the detector
71  kOTHER
72  };
74  KVFAZIADetector(const Char_t* type, const Float_t thick = 0.0);
75  virtual ~KVFAZIADetector();
76  void Copy(TObject& obj) const;
77  virtual void Clear(Option_t* opt = "");
78  virtual void SetName(const char* name);
79 
80  static const Char_t* GetNewName(KVString oldname);
81 
82  virtual Bool_t Fired(Option_t* opt = "any") const;
83 
84  void SetSignal(TGraph* signal, const Char_t* signal_name);
85  Bool_t HasSignal() const;
86  KVSignal* GetSignal(const Char_t* name) const;
87  KVSignal* GetSignalByType(const Char_t* type) const;
88  KVSignal* GetSignal(Int_t idx) const;
89  Int_t GetNumberOfSignals() const;
90  const KVSeqCollection* GetListOfSignals() const;
91  void ComputePSA();
92 
93  void SetFPGAEnergy(int sigid, Int_t idx /* Si: alway 0, CsI: 0=max 1=fast */, Double_t energy);
94 
96  {
102  return fIdentifier;
103  }
104 
106  {
107  return fBlock;
108  }
109  Int_t GetIndex() const
110  {
113  return fIndex;
114  }
115 
117  {
119  return fIsRutherford;
120  }
121 
123  {
124  return fQuartet;
125  }
127  {
128  return fTelescope;
129  }
130 
131  Double_t GetSetupParameter(const Char_t* parname);
132 
133  __KVFAZIADETECTOR_GETSIGNAL(I1, Amplitude)
134  __KVFAZIADETECTOR_GETSIGNAL(I1, BaseLine)
135  __KVFAZIADETECTOR_GETSIGNAL(I1, RawAmplitude)
136  __KVFAZIADETECTOR_GETSIGNAL(I1, SigmaBaseLine)
137 
138  __KVFAZIADETECTOR_GETSIGNAL(I2, Amplitude)
139  __KVFAZIADETECTOR_GETSIGNAL(I2, BaseLine)
140  __KVFAZIADETECTOR_GETSIGNAL(I2, RawAmplitude)
141  __KVFAZIADETECTOR_GETSIGNAL(I2, SigmaBaseLine)
142 
143  __KVFAZIADETECTOR_GETSIGNAL(Q2, Amplitude)
144  __KVFAZIADETECTOR_GETSIGNAL(Q2, BaseLine)
145  __KVFAZIADETECTOR_GETSIGNAL(Q2, FPGAEnergy)
146  __KVFAZIADETECTOR_GETSIGNAL(Q2, RawAmplitude)
147  __KVFAZIADETECTOR_GETSIGNAL(Q2, RiseTime)
148  __KVFAZIADETECTOR_GETSIGNAL(Q2, SigmaBaseLine)
149 
150  __KVFAZIADETECTOR_GETSIGNAL(Q3, Amplitude)
151  __KVFAZIADETECTOR_GETSIGNAL(Q3, BaseLine)
152  __KVFAZIADETECTOR_GETSIGNAL(Q3, FastAmplitude)
153  __KVFAZIADETECTOR_GETSIGNAL(Q3, FastFPGAEnergy)
154  __KVFAZIADETECTOR_GETSIGNAL(Q3, FPGAEnergy)
155  __KVFAZIADETECTOR_GETSIGNAL(Q3, RawAmplitude)
156  __KVFAZIADETECTOR_GETSIGNAL(Q3, RiseTime)
157  __KVFAZIADETECTOR_GETSIGNAL(Q3, SigmaBaseLine)
158  __KVFAZIADETECTOR_GETSIGNAL(Q3, SlowAmplitude)
159 
160  __KVFAZIADETECTOR_GETSIGNAL(QH1, Amplitude)
161  __KVFAZIADETECTOR_GETSIGNAL(QH1, BaseLine)
162  __KVFAZIADETECTOR_GETSIGNAL(QH1, FPGAEnergy)
163  __KVFAZIADETECTOR_GETSIGNAL(QH1, RawAmplitude)
164  __KVFAZIADETECTOR_GETSIGNAL(QH1, RiseTime)
165  __KVFAZIADETECTOR_GETSIGNAL(QH1, SigmaBaseLine)
166 
167  __KVFAZIADETECTOR_GETSIGNAL(QL1, Amplitude)
168  __KVFAZIADETECTOR_GETSIGNAL(QL1, BaseLine)
169  __KVFAZIADETECTOR_GETSIGNAL(QL1, RawAmplitude)
170  __KVFAZIADETECTOR_GETSIGNAL(QL1, RiseTime)
171  __KVFAZIADETECTOR_GETSIGNAL(QL1, SigmaBaseLine)
172 
173  Int_t GetDetTag() const
174  {
175  return GetDetectorSignalValue("DetTag");
176  }
177  Int_t GetGTTag() const
178  {
179  return GetDetectorSignalValue("GTTag");
180  }
181  void SetDetTag(Int_t t)
182  {
183  SetDetectorSignalValue("DetTag", t);
184  }
185  void SetGTTag(Int_t t)
186  {
187  SetDetectorSignalValue("GTTag", t);
188  }
189 
190  ClassDef(KVFAZIADetector, 1) //Base class for FAZIA detector
191 };
192 
193 #endif
int Int_t
#define __KVFAZIADETECTOR_GETSIGNAL(sig, type)
static Double_t energy[]
char Char_t
bool Bool_t
double Double_t
float Float_t
const char Option_t
#define ClassDef(name, id)
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
Double_t GetDetectorSignalValue(const TString &type, const KVNameValueList &params="") const
Definition: KVDetector.h:426
void SetDetectorSignalValue(const TString &type, Double_t val) const
Definition: KVDetector.h:440
Base class for FAZIA detectors.
Bool_t fIsFiredFromSignals
KVSignal * GetSignal(const Char_t *name) const
virtual Bool_t Fired(Option_t *opt="any") const
void SetFPGAEnergy(int sigid, Int_t idx, Double_t energy)
const KVSeqCollection * GetListOfSignals() const
virtual void Clear(Option_t *opt="")
If opt="N" we do not reset any raw data, signals, etc.
Double_t fQH1Threshold
thresholds defined for this detector
virtual ~KVFAZIADetector()
Destructor.
Int_t GetQuartetNumber() const
KVUniqueNameList fSignals
list of electronics signal (current, charge, etc... )
void SetSignal(TGraph *signal, const Char_t *signal_name)
KVFAZIADetector()
Default constructor.
Int_t GetIdentifier() const
Int_t GetBlockNumber() const
virtual void SetName(const char *name)
Double_t fQ3Threshold
Bool_t HasSignal() const
Returns kTRUE if detector has at least 1 associated signal.
Int_t GetDetTag() const
void Copy(TObject &obj) const
Bool_t IsRutherford() const
Int_t GetTelescopeNumber() const
void SetGTTag(Int_t t)
void SetDetTag(Int_t t)
KVSignal * GetSignalByType(const Char_t *type) const
Access detector signal of given type: "I1", "I2", "Q2", "Q3", "QH1", "QL1".
Double_t GetSetupParameter(const Char_t *parname)
Int_t GetGTTag() const
Double_t fQ2Threshold
Int_t GetNumberOfSignals() const
Int_t GetIndex() const
void ComputePSA()
Perform Pulse Shape Analysis on all signals.
Int_t fIdentifier
SI1=0(kSI1) SI2=1(kSI2) CSI=2(kCSI)
static const Char_t * GetNewName(KVString oldname)
void init()
default initialisations
Int_t fIndex
100*block+10*quartet+telescope
KaliVeda extensions to ROOT collection classes.
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.