CbmRoot
CbmRecoSts.h
Go to the documentation of this file.
1 
7 #ifndef CBMRECOSTS_H
8 #define CBMRECOSTS_H 1
9 
10 
11 #include <FairTask.h>
12 #include <TStopwatch.h>
13 
14 
15 class CbmDigiManager;
16 class CbmEvent;
17 class CbmStsElement;
18 class CbmStsParAsic;
19 class CbmStsParModule;
20 class CbmStsParSensor;
22 class CbmStsParSetModule;
23 class CbmStsParSetSensor;
25 class CbmStsParSim;
26 class CbmStsRecoModule;
27 class CbmStsSensor;
28 class CbmStsSetup;
29 
30 
35 
36 
54 class CbmRecoSts : public FairTask {
55 
56 public:
59  Bool_t writeClusters = kFALSE,
60  Bool_t runParallel = kFALSE);
61 
62 
64  CbmRecoSts(const CbmRecoSts&) = delete;
65 
66 
68  CbmRecoSts operator=(const CbmRecoSts&) = delete;
69 
70 
72  virtual ~CbmRecoSts();
73 
74 
76  virtual void Exec(Option_t* opt);
77 
78 
80  virtual void Finish();
81 
82 
84  TClonesArray* GetClusters() { return fClusters; }
85 
86 
88  virtual InitStatus Init();
89 
90 
101  void SetEventMode(Bool_t choice = kTRUE) {
102  fMode = (choice ? kCbmRecoEvent : kCbmRecoTimeslice);
103  }
104 
105 
113  void SetMode(ECbmRecoMode mode) { fMode = mode; }
114 
115 
117  virtual void SetParContainers();
118 
119 
128  void SetTimeCutClustersAbs(Double_t value) { fTimeCutClustersAbs = value; }
129 
130 
137  void SetTimeCutClustersSig(Double_t value) { fTimeCutClustersSig = value; }
138 
139 
148  void SetTimeCutDigisAbs(Double_t value) { fTimeCutDigisAbs = value; }
149 
150 
158  void SetTimeCutDigisSig(Double_t value) { fTimeCutDigisSig = value; }
159 
160 
167  void UseModulePar(CbmStsParModule* modulePar) { fUserParModule = modulePar; }
168 
169 
176  void UseSensorCond(CbmStsParSensorCond* sensorCond) {
177  fUserParSensorCond = sensorCond;
178  }
179 
180 
187  void UseSensorPar(CbmStsParSensor* sensorPar) { fUserParSensor = sensorPar; }
188 
189 
190 private:
199  std::pair<Double_t, Double_t>
200  LorentzShift(const CbmStsParSensorCond& conditions, Double_t dZ, Double_t bY);
201 
202 
206  UInt_t CreateModules();
207 
208 
213 
214 
220  void ProcessData(CbmEvent* event = nullptr);
221 
222 
223 private:
224  // --- I/O
225  TClonesArray* fEvents = nullptr;
227  TClonesArray* fClusters = nullptr;
228  TClonesArray* fHits = nullptr;
229 
230  // --- Setup and parameters
231  CbmStsSetup* fSetup = nullptr;
232  CbmStsParSim* fParSim = nullptr;
236 
237  // --- User-defined parameters, not from database
242 
243  // --- Settings
245  Double_t fTimeCutDigisSig = 3.;
246  Double_t fTimeCutDigisAbs = -1.;
247  Double_t fTimeCutClustersSig = 4.;
248  Double_t fTimeCutClustersAbs = -1.;
249  Bool_t fWriteClusters = kFALSE;
250  Bool_t fRunParallel = kFALSE;
251 
252  // --- Counters
253  TStopwatch fTimer {};
254  Int_t fNofTimeslices = 0;
255  Int_t fNofEvents = 0;
256  Double_t fNofDigis = 0;
257  Double_t fNofDigisUsed = 0;
258  Double_t fNofDigisIgnored = 0;
259  Double_t fNofClusters = 0;
260  Double_t fNofHits = 0;
261  Double_t fTimeTot = 0.;
262  Double_t fTime1 = 0.;
263  Double_t fTime2 = 0.;
264  Double_t fTime3 = 0.;
265  Double_t fTime4 = 0.;
266 
267  // --- Reconstruction modules
268  std::map<UInt_t, CbmStsRecoModule*> fModules {};
269  std::vector<CbmStsRecoModule*> fModuleIndex {};
270 
271 
273 };
274 
275 #endif
CbmRecoSts::SetEventMode
void SetEventMode(Bool_t choice=kTRUE)
Set event-by-event mode.
Definition: CbmRecoSts.h:101
CbmRecoSts::fNofEvents
Int_t fNofEvents
Number of events processed.
Definition: CbmRecoSts.h:255
CbmRecoSts::Exec
virtual void Exec(Option_t *opt)
Task execution.
Definition: CbmRecoSts.cxx:128
CbmRecoSts::~CbmRecoSts
virtual ~CbmRecoSts()
Destructor
Definition: CbmRecoSts.cxx:51
CbmRecoSts::GetSensorParameters
void GetSensorParameters(CbmStsElement *geoSensor)
Get the sensor parameters.
CbmRecoSts::operator=
CbmRecoSts operator=(const CbmRecoSts &)=delete
Assignment operator (disabled)
kCbmRecoEvent
@ kCbmRecoEvent
Definition: CbmRecoSts.h:34
CbmRecoSts::Init
virtual InitStatus Init()
Initialisation.
Definition: CbmRecoSts.cxx:223
CbmRecoSts::fParSetModule
CbmStsParSetModule * fParSetModule
Module parameters.
Definition: CbmRecoSts.h:233
CbmRecoSts::fNofDigisIgnored
Double_t fNofDigisIgnored
Total number of ignored digis.
Definition: CbmRecoSts.h:258
CbmRecoSts::SetTimeCutDigisAbs
void SetTimeCutDigisAbs(Double_t value)
Time cut on digis for cluster finding.
Definition: CbmRecoSts.h:148
CbmRecoSts::fModules
std::map< UInt_t, CbmStsRecoModule * > fModules
Definition: CbmRecoSts.h:268
CbmRecoSts::fEvents
TClonesArray * fEvents
Definition: CbmRecoSts.h:225
CbmRecoSts::fUserParModule
CbmStsParModule * fUserParModule
Definition: CbmRecoSts.h:239
CbmRecoSts::fSetup
CbmStsSetup * fSetup
Output hit array.
Definition: CbmRecoSts.h:231
CbmRecoSts::CbmRecoSts
CbmRecoSts(ECbmRecoMode mode=kCbmRecoTimeslice, Bool_t writeClusters=kFALSE, Bool_t runParallel=kFALSE)
Constructor.
CbmStsRecoModule
Class for reconstruction in one STS module.
Definition: CbmStsRecoModule.h:44
CbmStsParSensorCond
Parameters for operating conditions of a STS sensor.
Definition: CbmStsParSensorCond.h:28
CbmRecoSts::fRunParallel
Bool_t fRunParallel
Use OpenMP multithreading.
Definition: CbmRecoSts.h:250
CbmRecoSts::UseSensorPar
void UseSensorPar(CbmStsParSensor *sensorPar)
User-defined sensor parameters.
Definition: CbmRecoSts.h:187
CbmRecoSts::fTimeCutClustersSig
Double_t fTimeCutClustersSig
Time cut for hit finding.
Definition: CbmRecoSts.h:247
CbmRecoSts::fNofClusters
Double_t fNofClusters
Total number of clusters produced.
Definition: CbmRecoSts.h:259
CbmRecoSts::fModuleIndex
std::vector< CbmStsRecoModule * > fModuleIndex
Definition: CbmRecoSts.h:269
CbmRecoSts::SetMode
void SetMode(ECbmRecoMode mode)
Set execution mode.
Definition: CbmRecoSts.h:113
CbmRecoSts::CreateModules
UInt_t CreateModules()
Instantiate reconstruction modules @value Number of modules created.
Definition: CbmRecoSts.cxx:56
CbmRecoSts::fParSetSensor
CbmStsParSetSensor * fParSetSensor
Sensor parameters.
Definition: CbmRecoSts.h:234
CbmStsParSetSensorCond
Parameters container for CbmStsParSensorCond.
Definition: CbmStsParSetSensorCond.h:30
CbmRecoSts::fNofDigis
Double_t fNofDigis
Total number of digis processed.
Definition: CbmRecoSts.h:256
CbmRecoSts::UseSensorCond
void UseSensorCond(CbmStsParSensorCond *sensorCond)
User-defined sensor parameters.
Definition: CbmRecoSts.h:176
CbmStsParSensor
Constructional parameters of a STS sensor.
Definition: CbmStsParSensor.h:38
CbmRecoSts::fTime2
Double_t fTime2
Time for distributing data.
Definition: CbmRecoSts.h:263
CbmRecoSts::ProcessData
void ProcessData(CbmEvent *event=nullptr)
Process one time slice or event.
Definition: CbmRecoSts.cxx:336
CbmRecoSts::UseModulePar
void UseModulePar(CbmStsParModule *modulePar)
User-defined module parameters.
Definition: CbmRecoSts.h:167
CbmRecoSts::fNofHits
Double_t fNofHits
Total number of clusters produced.
Definition: CbmRecoSts.h:260
CbmRecoSts::fNofTimeslices
Int_t fNofTimeslices
ROOT timer.
Definition: CbmRecoSts.h:254
CbmRecoSts::CbmRecoSts
CbmRecoSts(const CbmRecoSts &)=delete
Copy constructor (disabled)
CbmStsParSetSensor
Parameters container for CbmStsParSensor.
Definition: CbmStsParSetSensor.h:30
CbmRecoSts::Finish
virtual void Finish()
End-of-run action.
Definition: CbmRecoSts.cxx:159
CbmStsParAsic
Parameters of the STS readout ASIC.
Definition: CbmStsParAsic.h:25
CbmRecoSts::SetTimeCutClustersSig
void SetTimeCutClustersSig(Double_t value)
Time cut on clusters for hit finding.
Definition: CbmRecoSts.h:137
CbmStsParModule
Parameters for one STS module.
Definition: CbmStsParModule.h:28
CbmRecoSts::fTimeTot
Double_t fTimeTot
Total execution time.
Definition: CbmRecoSts.h:261
CbmRecoSts::fTimer
TStopwatch fTimer
Definition: CbmRecoSts.h:253
CbmRecoSts::fUserParAsic
CbmStsParAsic * fUserParAsic
Definition: CbmRecoSts.h:238
CbmRecoSts::fTime1
Double_t fTime1
Time for resetting modules.
Definition: CbmRecoSts.h:262
CbmRecoSts::fTime3
Double_t fTime3
Time for reconstruction.
Definition: CbmRecoSts.h:264
CbmRecoSts::LorentzShift
std::pair< Double_t, Double_t > LorentzShift(const CbmStsParSensorCond &conditions, Double_t dZ, Double_t bY)
Average Lorentz Shift in a sensor.
Definition: CbmRecoSts.cxx:303
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmStsSensor
Class representing an instance of a sensor in the CBM-STS.
Definition: CbmStsSensor.h:38
kCbmRecoTimeslice
@ kCbmRecoTimeslice
Definition: CbmRecoSts.h:34
CbmRecoSts::fHits
TClonesArray * fHits
Output cluster array.
Definition: CbmRecoSts.h:228
CbmStsSetup
Class representing the top level of the STS setup.
Definition: CbmStsSetup.h:39
CbmRecoSts::fTime4
Double_t fTime4
Time for output results.
Definition: CbmRecoSts.h:265
CbmRecoSts::fWriteClusters
Bool_t fWriteClusters
Write clusters to tree.
Definition: CbmRecoSts.h:249
CbmRecoSts::SetTimeCutClustersAbs
void SetTimeCutClustersAbs(Double_t value)
Time cut on clusters for hit finding.
Definition: CbmRecoSts.h:128
CbmRecoSts::ClassDef
ClassDef(CbmRecoSts, 1)
CbmRecoSts::fNofDigisUsed
Double_t fNofDigisUsed
Total number of used digis.
Definition: CbmRecoSts.h:257
CbmRecoSts::fParSetCond
CbmStsParSetSensorCond * fParSetCond
Sensor conditions.
Definition: CbmRecoSts.h:235
CbmRecoSts::fParSim
CbmStsParSim * fParSim
Instance of STS setup.
Definition: CbmRecoSts.h:232
CbmRecoSts::fTimeCutDigisAbs
Double_t fTimeCutDigisAbs
Time cut for cluster finding [ns].
Definition: CbmRecoSts.h:246
CbmRecoSts::fTimeCutClustersAbs
Double_t fTimeCutClustersAbs
Time cut for hit finding [ns].
Definition: CbmRecoSts.h:248
CbmRecoSts::fUserParSensorCond
CbmStsParSensorCond * fUserParSensorCond
Definition: CbmRecoSts.h:241
CbmStsParSim
Settings for STS simulation (digitizer)
Definition: CbmStsParSim.h:25
CbmRecoSts
Task class for local reconstruction in the STS.
Definition: CbmRecoSts.h:54
CbmRecoSts::SetParContainers
virtual void SetParContainers()
Define the needed parameter containers.
Definition: CbmRecoSts.cxx:481
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmStsParSetModule
Parameters container for CbmStsParModule.
Definition: CbmStsParSetModule.h:30
CbmRecoSts::fUserParSensor
CbmStsParSensor * fUserParSensor
Definition: CbmRecoSts.h:240
CbmRecoSts::fTimeCutDigisSig
Double_t fTimeCutDigisSig
Time cut for cluster finding.
Definition: CbmRecoSts.h:245
CbmRecoSts::fMode
ECbmRecoMode fMode
Time-slice or event.
Definition: CbmRecoSts.h:244
CbmRecoSts::GetClusters
TClonesArray * GetClusters()
Access to output array of clusters.
Definition: CbmRecoSts.h:84
ECbmRecoMode
ECbmRecoMode
Definition: CbmRecoSts.h:34
CbmRecoSts::fClusters
TClonesArray * fClusters
Interface to digi branch.
Definition: CbmRecoSts.h:227
CbmStsElement
Class representing an element of the STS setup.
Definition: CbmStsElement.h:32
CbmRecoSts::fDigiManager
CbmDigiManager * fDigiManager
Input array of events.
Definition: CbmRecoSts.h:226
CbmRecoSts::SetTimeCutDigisSig
void SetTimeCutDigisSig(Double_t value)
Time cut on digis for hit finding.
Definition: CbmRecoSts.h:158