KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVFAZIA.h
1
3
4#ifndef __KVFAZIA_H
5#define __KVFAZIA_H
6
7#include "KVMultiDetArray.h"
8
9#include <KVGeoImport.h>
10#include <KVEnv.h>
11#include <KVSignal.h>
12#include "KVFAZIATrigger.h"
13
14#if ROOT_VERSION_CODE <= ROOT_VERSION(5,32,0)
15#include "TGeoMatrix.h"
16#endif
17
18class KVDetectorEvent;
19#ifdef WITH_PROTOBUF
20#ifndef __CINT__
21namespace DAQ {
22 class FzEvent;
23}
24#endif
25#endif
26
33class KVFAZIA : public KVMultiDetArray {
34protected:
53 int fQuartet[8][2];
54 int fTelescope[8][2];
55
61
64
66 double oldfaziats = -1.;
67
68 void SetTriggerPatternsForDataSet(const TString& dataset);
69 void SetTriggerPattern(uint16_t fp)
70 {
72 }
73
75 virtual void BuildFAZIA();
76 virtual void GetGeometryParameters();
78
79 virtual void BuildTarget();
81 virtual void SetNameOfDetectors(KVEnv& env);
82
84
85#ifdef WITH_MFM
86 Bool_t handle_raw_data_event_mfmframe(const MFMCommonFrame&);
87#endif
98
100
102#ifdef WITH_PROTOBUF
104#ifndef __CINT__
105 Bool_t treat_event(const DAQ::FzEvent&);
106#endif
107 Double_t TreatEnergy(Int_t sigid, Int_t eid, UInt_t val);
108#endif
109 TString GetSignalName(Int_t bb, Int_t qq, Int_t tt, Int_t idsig);
110
112
120
128public:
149 {
150 switch (idc) {
152 return "NO_IDENTIFICATION";
153 case ID_GAMMA:
154 return "ID_GAMMA";
155 case ID_SI1_PSA:
156 return "ID_SI1_PSA";
157 case ID_SI2_PSA:
158 return "ID_SI2_PSA";
159 case ID_SI1_SI2:
160 return "ID_SI1_SI2";
161 case ID_SI2_CSI:
162 return "ID_SI2_CSI";
163 case ID_SI1_CSI:
164 return "ID_SI1_CSI";
165 case ID_SI12_CSI:
166 return "ID_SI12_CSI";
167 case ID_CSI_PSA:
168 return "ID_CSI_PSA";
170 return "ID_STOPPED_IN_FIRST_STAGE";
172 return "ID_SI1_SI2_MAYBE_PUNCH_THROUGH";
174 return "ID_SI1_SI2_PUNCH_THROUGH";
176 return "ID_SI1_PUNCH_THROUGH";
177 default:
178 return Form("(unknown:%d)", idc);
179 }
180 }
192 {
193 switch (ec) {
195 return "NO_CALIBRATION_ATTEMPTED";
197 return "NORMAL_CALIBRATION";
199 return "SOME_ENERGY_LOSSES_CALCULATED";
201 return "WARNING_CSI_MAX_ENERGY";
203 return "ENERGY_LOSSES_TENTATIVELY_CALCULATED (for Z=1,2 stopped in uncalibrated CsI)";
204 default:
205 return Form("(unknown:%d)", ec);
206 }
207 }
212
213 KVFAZIA(const Char_t* title = "");
214 virtual ~KVFAZIA();
215 void AddDetectorLabel(const Char_t* label);
216
217 virtual void Build(Int_t = -1);
218
219 void GetDetectorEvent(KVDetectorEvent* detev, const TSeqCollection* dets);
221 {
222 return fNblocks;
223 }
224 void IncludeTargetInGeometry(Bool_t include = kTRUE)
225 {
226 fBuildTarget = include;
227 }
228
230 {
231 return fDetectorLabels;
232 }
233 const Char_t* GetSignalTypes() const
234 {
235 return fSignalTypes.Data();
236 }
237
238 void SetGeometryImportParameters(Double_t dt = 0.25, Double_t dp = 1.0, Double_t tmin = 2., Double_t pmin = 0, Double_t tmax = 20., Double_t pmax = 360.,
239 Double_t xorg = 0, Double_t yorg = 0, Double_t zorg = 0)
240 {
243 fImport_dPhi = dp;
244 fImport_dTheta = dt;
245 fImport_PhiMax = pmax;
246 fImport_PhiMin = pmin;
247 fImport_ThetaMax = tmax;
248 fImport_ThetaMin = tmin;
249 fImport_Xorg = xorg;
250 fImport_Yorg = yorg;
251 fImport_Zorg = zorg;
252 }
253 void FillDetectorList(KVReconstructedNucleus* rnuc, KVHashList* DetList, const KVString& DetNames);
254
256 Double_t GetSetupParameter(const Char_t* parname);
257
259 {
260 return fTrigger;
261 }
263 virtual void MakeCalibrationTables(KVExpDB*);
264
265 std::string GetTriggerForCurrentRun() const;
267
268 ClassDef(KVFAZIA, 1) //Base class for description of the FAZIA set up
269};
270
272R__EXTERN KVFAZIA* gFazia;
273
274#endif
int Int_t
unsigned int UInt_t
#define R__EXTERN
bool Bool_t
unsigned char UChar_t
char Char_t
double Double_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
List of hit groups in a multidetector array.
Extension of TEnv to allow the writing of comments in the file.
Definition KVEnv.h:17
Base class to describe database of an experiment ,,.
Definition KVExpDB.h:20
The trigger pattern for each FAZIA event.
void SetTriggerPattern(uint16_t tp)
Description of a FAZIA detector geometry.
Definition KVFAZIA.h:33
Double_t fImport_Xorg
for geometry import
Definition KVFAZIA.h:50
Double_t fImport_ThetaMin
for geometry import
Definition KVFAZIA.h:46
Double_t fFDist
distance of FAZIA detectors from target (in cm)
Definition KVFAZIA.h:36
Double_t fQ2risetime
Definition KVFAZIA.h:58
KVGroupReconstructor * GetReconstructorForGroup(const KVGroup *) const
Specialized group reconstructor for FAZIA.
Definition KVFAZIA.cpp:594
Double_t fQH1risetime
values of trapezoidal filter rise time set in the fpgas defined in .kvrootrc
Definition KVFAZIA.h:57
Double_t TreatEnergy(Int_t sigid, Int_t eid, UInt_t val)
Definition KVFAZIA.cpp:650
Double_t fQ3slowrisetime
Definition KVFAZIA.h:59
void SetTriggerPatternsForDataSet(const TString &dataset)
Definition KVFAZIA.cpp:394
const KVFAZIATrigger & GetTrigger() const
Definition KVFAZIA.h:258
void FillDetectorList(KVReconstructedNucleus *rnuc, KVHashList *DetList, const KVString &DetNames)
Definition KVFAZIA.cpp:546
TString fFGeoType
type of FAZIA geometry (="compact",...)
Definition KVFAZIA.h:35
void SetGeometryImportParameters(Double_t dt=0.25, Double_t dp=1.0, Double_t tmin=2., Double_t pmin=0, Double_t tmax=20., Double_t pmax=360., Double_t xorg=0, Double_t yorg=0, Double_t zorg=0)
Definition KVFAZIA.h:238
int fQuartet[8][2]
quartet number from #FEE and #FPGA
Definition KVFAZIA.h:53
Double_t GetSetupParameter(const Char_t *parname)
Definition KVFAZIA.cpp:78
Double_t fImport_dTheta
for geometry import
Definition KVFAZIA.h:44
void SetIDCodeForIDTelescope(KVIDTelescope *) const
Set the FAZIA-specific general identification code for the given telescope.
Definition KVFAZIA.cpp:970
Double_t fFThetaMin
minimum polar angle for compact geometry (in degrees)
Definition KVFAZIA.h:37
ECodes
Calibration quality codes attributed to particles reconstructed from data.
Definition KVFAZIA.h:181
@ NO_CALIBRATION_ATTEMPTED
particle stopped in detectors with no available calibration
Definition KVFAZIA.h:185
@ NORMAL_CALIBRATION
normal well-calibrated particle with no problems
Definition KVFAZIA.h:186
@ WARNING_CSI_MAX_ENERGY
particle calibration OK, although apparent energy would mean punching through the CsI
Definition KVFAZIA.h:188
@ ENERGY_LOSSES_TENTATIVELY_CALCULATED
particle calibration OK, with some detector energies tentatively calculated (Z<2)
Definition KVFAZIA.h:189
@ SOME_ENERGY_LOSSES_CALCULATED
particle calibration OK, with some detector energies calculated
Definition KVFAZIA.h:187
const Char_t * GetSignalTypes() const
Definition KVFAZIA.h:233
std::string GetTriggerForCurrentRun() const
Definition KVFAZIA.cpp:129
void AddDetectorLabel(const Char_t *label)
Definition KVFAZIA.cpp:254
Bool_t handle_raw_data_event_protobuf(KVProtobufDataReader &)
Definition KVFAZIA.cpp:641
virtual void BuildTarget()
Definition KVFAZIA.cpp:442
virtual Int_t GetIDCodeForParticlesStoppingInFirstStageOfTelescopes() const
Definition KVFAZIA.h:208
Int_t GetNumberOfBlocks() const
Definition KVFAZIA.h:220
Int_t fStartingBlockNumber
Definition KVFAZIA.h:39
void copy_fired_parameters_to_recon_param_list()
Definition KVFAZIA.h:88
void DeduceIdentificationTelescopesFromGeometry()
Definition KVFAZIA.cpp:167
TString fCorrespondanceFile
Bool_t fBuildTarget; //kTRUE to include target frame in the geometry.
Definition KVFAZIA.h:41
Double_t fImport_PhiMax
for geometry import
Definition KVFAZIA.h:49
virtual void SetNameOfDetectors(KVEnv &env)
Definition KVFAZIA.cpp:304
Double_t fImport_Zorg
for geometry import
Definition KVFAZIA.h:52
virtual void BuildFAZIA()
methods to be implemented in child classes
Definition KVFAZIA.cpp:431
virtual UChar_t GetNormalCalibrationCode()
Definition KVFAZIA.h:123
void ReadTriggerPatterns(KVExpDB *db)
Definition KVFAZIA.cpp:927
virtual void DefineStructureFormats(KVGeoImport &)
Definition KVFAZIA.h:83
void GenerateCorrespondanceFile()
Definition KVFAZIA.cpp:266
Double_t fQ3fastrisetime
Definition KVFAZIA.h:60
KVString fSignalTypes
Definition KVFAZIA.h:43
void PerformClosedROOTGeometryOperations()
Definition KVFAZIA.cpp:335
Bool_t treat_event(const DAQ::FzEvent &)
Read raw data for an event.
Definition KVFAZIA.cpp:681
virtual ~KVFAZIA()
Destructor.
Definition KVFAZIA.cpp:243
Double_t fImport_dPhi
for geometry import
Definition KVFAZIA.h:45
Double_t fImport_ThetaMax
for geometry import
Definition KVFAZIA.h:47
int fTelescope[8][2]
telescope number from #FEE and #FPGA
Definition KVFAZIA.h:54
KVFAZIATrigger fTrigger
trigger pattern read from data for each event
Definition KVFAZIA.h:63
virtual void MakeCalibrationTables(KVExpDB *)
Override base method in order to read FAZIA trigger for each run.
Definition KVFAZIA.cpp:105
Bool_t handle_raw_data_event_mfmframe(const MFMCommonFrame &)
Definition KVFAZIA.cpp:845
virtual void GetGeometryParameters()
Called by the Build method.
Definition KVFAZIA.cpp:366
void SetTriggerPattern(uint16_t fp)
Definition KVFAZIA.h:69
double oldfaziats
dummy ts to control trigger info transmission rate
Definition KVFAZIA.h:66
TString GetIDCodeMeaning(Int_t idc) const
Definition KVFAZIA.h:148
TString GetSignalName(Int_t bb, Int_t qq, Int_t tt, Int_t idsig)
Definition KVFAZIA.cpp:609
Double_t fImport_PhiMin
for geometry import
Definition KVFAZIA.h:48
IDCodes
Identification quality codes attributed to particles reconstructed from data.
Definition KVFAZIA.h:129
@ ID_SI12_CSI
particle identified in (SI1+SI2)-CSI telescope
Definition KVFAZIA.h:140
@ ID_SI1_SI2_MAYBE_PUNCH_THROUGH
possible ambiguity of particle identification in SI1-SI2 due to unvetoed punch-through
Definition KVFAZIA.h:143
@ ID_CSI_PSA
particle identified by pulse shape analysis in CSI
Definition KVFAZIA.h:141
@ ID_STOPPED_IN_FIRST_STAGE
particle stopped in SI1, no identification possible better than estimation of minimum Z
Definition KVFAZIA.h:142
@ ID_SI1_SI2_PUNCH_THROUGH
particle punching through SI2, identified Z is a minimum value
Definition KVFAZIA.h:144
@ ID_SI1_CSI
particle identified in SI1-SI2 telescope
Definition KVFAZIA.h:137
@ ID_SI1_PSA
particle identified by pulse shape analysis in SI1
Definition KVFAZIA.h:135
@ ID_SI1_PUNCH_THROUGH
particle partially identified by pulse shape analysis in SI1, although it is punching through (no SI2...
Definition KVFAZIA.h:145
@ ID_SI2_PSA
particle identified by pulse shape analysis in SI1
Definition KVFAZIA.h:138
@ NO_IDENTIFICATION
no identification possible for particle
Definition KVFAZIA.h:133
@ ID_GAMMA
'gamma' particle identified by pulse shape analysis in CSI
Definition KVFAZIA.h:134
@ ID_SI2_CSI
particle identified in SI2-CSI telescope
Definition KVFAZIA.h:139
@ ID_INCOHERENT
particle with incoherent identifications (CCode>=0)
Definition KVFAZIA.h:146
@ ID_SI1_SI2
particle identified in SI1-SI2 telescope
Definition KVFAZIA.h:136
void IncludeTargetInGeometry(Bool_t include=kTRUE)
Definition KVFAZIA.h:224
Int_t fNblocks
number of blocks
Definition KVFAZIA.h:38
void GetDetectorEvent(KVDetectorEvent *detev, const TSeqCollection *dets)
Definition KVFAZIA.cpp:500
KVString GetDetectorLabels() const
Definition KVFAZIA.h:229
void prepare_to_handle_new_raw_data()
Definition KVFAZIA.h:113
virtual void Build(Int_t=-1)
Build the FAZIA array.
Definition KVFAZIA.cpp:465
Double_t fImport_Yorg
for geometry import
Definition KVFAZIA.h:51
KVString fDetectorLabels
Definition KVFAZIA.h:42
void CreateCorrespondence()
Definition KVFAZIA.cpp:882
TString GetECodeMeaning(Int_t ec) const
Definition KVFAZIA.h:191
virtual void SetRawDataFromReconEvent(KVNameValueList &)
Overrides base method in order to set the value of the trigger bit pattern for the event.
Definition KVFAZIA.cpp:92
Import detector array described by ROOT geometry and set up corresponding KVMultiDetArray object.
Definition KVGeoImport.h:68
Base class for particle reconstruction in one group of a detector array.
Group of detectors which can be treated independently of all others in array.
Definition KVGroup.h:20
Extended version of ROOT THashList.
Definition KVHashList.h:29
Base class for all detectors or associations of detectors in array which can identify charged particl...
Base class for describing the geometry of a detector array.
void prepare_to_handle_new_raw_data()
reset acquisition parameters etc. before reading new raw data event
static Bool_t fBuildTarget
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Read Google Protobuf DAQ files.
Nuclei reconstructed from data measured by a detector array .
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
const char * Data() const