KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVFAZIADetector.h
1
3
4#ifndef __KVFAZIADETECTOR_H
5#define __KVFAZIADETECTOR_H
6
7#include "KVDetector.h"
8class 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 KVDetectorSignal* __KVFD_setmethname(sig,type)(Double_t val) \
23 { \
24 KVDetectorSignal* ds = GetDetectorSignal(__KVFD_dcs(sig,type)); \
25 ds->SetValue(val); \
26 ds->SetFired(); \
27 return ds; \
28 }
29
50protected:
52
59
64
66
67 void init(); //initialisation method called by the constructors
69
70public:
71 enum { //determine identification of the detector
75 kOTHER
76 };
78 KVFAZIADetector(const Char_t* type, const Float_t thick = 0.0);
79 virtual ~KVFAZIADetector();
80 void Copy(TObject& obj) const;
81 virtual void Clear(Option_t* opt = "");
82 virtual void SetName(const char* name);
83
84 static const Char_t* GetNewName(KVString oldname);
85
86 Bool_t Fired(Option_t* opt = "any") const;
87
88 void SetSignal(TGraph* signal, const Char_t* signal_name);
89 Bool_t HasSignal() const;
90 KVSignal* GetSignal(const Char_t* name) const;
91 KVSignal* GetSignalByType(const Char_t* type) const;
92 KVSignal* GetSignal(Int_t idx) const;
94 const KVSeqCollection* GetListOfSignals() const;
95 void ComputePSA();
96
97 KVDetectorSignal* SetFPGAEnergy(int sigid, Int_t idx /* Si: alway 0, CsI: 0=max 1=fast */, Double_t energy);
98 KVDetectorSignal* SetBaseLine(int sigid, Float_t baseline);
99
101 {
107 return fIdentifier;
108 }
109
111 {
112 return fBlock;
113 }
115 {
118 return fIndex;
119 }
120
122 {
124 return fIsRutherford;
125 }
126
128 {
129 return fQuartet;
130 }
132 {
133 return fTelescope;
134 }
135
136 Double_t GetSetupParameter(const Char_t* parname);
137
138 __KVFAZIADETECTOR_GETSIGNAL(I1, Amplitude)
139 __KVFAZIADETECTOR_GETSIGNAL(I1, BaseLine)
140 __KVFAZIADETECTOR_GETSIGNAL(I1, RawAmplitude)
141 __KVFAZIADETECTOR_GETSIGNAL(I1, SigmaBaseLine)
142
143 __KVFAZIADETECTOR_GETSIGNAL(I2, Amplitude)
144 __KVFAZIADETECTOR_GETSIGNAL(I2, BaseLine)
145 __KVFAZIADETECTOR_GETSIGNAL(I2, RawAmplitude)
146 __KVFAZIADETECTOR_GETSIGNAL(I2, SigmaBaseLine)
147
148 __KVFAZIADETECTOR_GETSIGNAL(Q2, Amplitude)
149 __KVFAZIADETECTOR_GETSIGNAL(Q2, BaseLine)
150 __KVFAZIADETECTOR_GETSIGNAL(Q2, FPGAEnergy)
151 __KVFAZIADETECTOR_GETSIGNAL(Q2, RawAmplitude)
152 __KVFAZIADETECTOR_GETSIGNAL(Q2, RiseTime)
153 __KVFAZIADETECTOR_GETSIGNAL(Q2, SigmaBaseLine)
154
155 __KVFAZIADETECTOR_GETSIGNAL(Q3, Amplitude)
156 __KVFAZIADETECTOR_GETSIGNAL(Q3, BaseLine)
157 __KVFAZIADETECTOR_GETSIGNAL(Q3, FastAmplitude)
158 __KVFAZIADETECTOR_GETSIGNAL(Q3, FastFPGAEnergy)
159 __KVFAZIADETECTOR_GETSIGNAL(Q3, FPGAEnergy)
160 __KVFAZIADETECTOR_GETSIGNAL(Q3, RawAmplitude)
161 __KVFAZIADETECTOR_GETSIGNAL(Q3, RiseTime)
162 __KVFAZIADETECTOR_GETSIGNAL(Q3, SigmaBaseLine)
163 __KVFAZIADETECTOR_GETSIGNAL(Q3, SlowAmplitude)
164
165 __KVFAZIADETECTOR_GETSIGNAL(QH1, Amplitude)
166 __KVFAZIADETECTOR_GETSIGNAL(QH1, BaseLine)
167 __KVFAZIADETECTOR_GETSIGNAL(QH1, FPGAEnergy)
168 __KVFAZIADETECTOR_GETSIGNAL(QH1, RawAmplitude)
169 __KVFAZIADETECTOR_GETSIGNAL(QH1, RiseTime)
170 __KVFAZIADETECTOR_GETSIGNAL(QH1, SigmaBaseLine)
171
172 __KVFAZIADETECTOR_GETSIGNAL(QL1, Amplitude)
173 __KVFAZIADETECTOR_GETSIGNAL(QL1, BaseLine)
174 __KVFAZIADETECTOR_GETSIGNAL(QL1, RawAmplitude)
175 __KVFAZIADETECTOR_GETSIGNAL(QL1, RiseTime)
176 __KVFAZIADETECTOR_GETSIGNAL(QL1, SigmaBaseLine)
177
179 {
180 return GetDetectorSignalValue("DetTag");
181 }
183 {
184 return GetDetectorSignalValue("GTTag");
185 }
187 {
188 SetDetectorSignalValue("DetTag", t);
189 }
191 {
192 SetDetectorSignalValue("GTTag", t);
193 }
194
195 ClassDef(KVFAZIADetector, 1) //Base class for FAZIA detector
196};
197
198#endif
int Int_t
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Base class for output signal data produced by a detector.
Base class for detector geometry description.
Definition KVDetector.h:160
void SetDetectorSignalValue(const KVString &type, Double_t val) const
Definition KVDetector.h:506
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList &params="") const
Definition KVDetector.h:493
Base class for FAZIA detectors.
KVSignal * GetSignal(const Char_t *name) const
Bool_t Fired(Option_t *opt="any") const
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)
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
KVDetectorSignal * SetBaseLine(int sigid, Float_t baseline)
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
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
KVDetectorSignal * SetFPGAEnergy(int sigid, Int_t idx, Double_t energy)
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:73
Optimised list in which named objects can only be placed once.