CbmRoot
|
Task class for local reconstruction in the STS. More...
#include <CbmRecoSts.h>
Public Member Functions | |
CbmRecoSts (ECbmRecoMode mode=kCbmRecoTimeslice, Bool_t writeClusters=kFALSE, Bool_t runParallel=kFALSE) | |
Constructor. More... | |
CbmRecoSts (const CbmRecoSts &)=delete | |
Copy constructor (disabled) More... | |
CbmRecoSts | operator= (const CbmRecoSts &)=delete |
Assignment operator (disabled) More... | |
virtual | ~CbmRecoSts () |
Destructor More... | |
virtual void | Exec (Option_t *opt) |
Task execution. More... | |
virtual void | Finish () |
End-of-run action. More... | |
TClonesArray * | GetClusters () |
Access to output array of clusters. More... | |
virtual InitStatus | Init () |
Initialisation. More... | |
void | SetEventMode (Bool_t choice=kTRUE) |
Set event-by-event mode. More... | |
void | SetMode (ECbmRecoMode mode) |
Set execution mode. More... | |
virtual void | SetParContainers () |
Define the needed parameter containers. More... | |
void | SetTimeCutClustersAbs (Double_t value) |
Time cut on clusters for hit finding. More... | |
void | SetTimeCutClustersSig (Double_t value) |
Time cut on clusters for hit finding. More... | |
void | SetTimeCutDigisAbs (Double_t value) |
Time cut on digis for cluster finding. More... | |
void | SetTimeCutDigisSig (Double_t value) |
Time cut on digis for hit finding. More... | |
void | UseModulePar (CbmStsParModule *modulePar) |
User-defined module parameters. More... | |
void | UseSensorCond (CbmStsParSensorCond *sensorCond) |
User-defined sensor parameters. More... | |
void | UseSensorPar (CbmStsParSensor *sensorPar) |
User-defined sensor parameters. More... | |
Private Member Functions | |
std::pair< Double_t, Double_t > | LorentzShift (const CbmStsParSensorCond &conditions, Double_t dZ, Double_t bY) |
Average Lorentz Shift in a sensor. More... | |
UInt_t | CreateModules () |
Instantiate reconstruction modules @value Number of modules created. More... | |
void | GetSensorParameters (CbmStsElement *geoSensor) |
Get the sensor parameters. More... | |
void | ProcessData (CbmEvent *event=nullptr) |
Process one time slice or event. More... | |
ClassDef (CbmRecoSts, 1) | |
Private Attributes | |
TClonesArray * | fEvents = nullptr |
CbmDigiManager * | fDigiManager = nullptr |
Input array of events. More... | |
TClonesArray * | fClusters = nullptr |
Interface to digi branch. More... | |
TClonesArray * | fHits = nullptr |
Output cluster array. More... | |
CbmStsSetup * | fSetup = nullptr |
Output hit array. More... | |
CbmStsParSim * | fParSim = nullptr |
Instance of STS setup. More... | |
CbmStsParSetModule * | fParSetModule = nullptr |
Module parameters. More... | |
CbmStsParSetSensor * | fParSetSensor = nullptr |
Sensor parameters. More... | |
CbmStsParSetSensorCond * | fParSetCond = nullptr |
Sensor conditions. More... | |
CbmStsParAsic * | fUserParAsic = nullptr |
CbmStsParModule * | fUserParModule = nullptr |
CbmStsParSensor * | fUserParSensor = nullptr |
CbmStsParSensorCond * | fUserParSensorCond = nullptr |
ECbmRecoMode | fMode = kCbmRecoEvent |
Time-slice or event. More... | |
Double_t | fTimeCutDigisSig = 3. |
Time cut for cluster finding. More... | |
Double_t | fTimeCutDigisAbs = -1. |
Time cut for cluster finding [ns]. More... | |
Double_t | fTimeCutClustersSig = 4. |
Time cut for hit finding. More... | |
Double_t | fTimeCutClustersAbs = -1. |
Time cut for hit finding [ns]. More... | |
Bool_t | fWriteClusters = kFALSE |
Write clusters to tree. More... | |
Bool_t | fRunParallel = kFALSE |
Use OpenMP multithreading. More... | |
TStopwatch | fTimer {} |
Int_t | fNofTimeslices = 0 |
ROOT timer. More... | |
Int_t | fNofEvents = 0 |
Number of events processed. More... | |
Double_t | fNofDigis = 0 |
Total number of digis processed. More... | |
Double_t | fNofDigisUsed = 0 |
Total number of used digis. More... | |
Double_t | fNofDigisIgnored = 0 |
Total number of ignored digis. More... | |
Double_t | fNofClusters = 0 |
Total number of clusters produced. More... | |
Double_t | fNofHits = 0 |
Total number of clusters produced. More... | |
Double_t | fTimeTot = 0. |
Total execution time. More... | |
Double_t | fTime1 = 0. |
Time for resetting modules. More... | |
Double_t | fTime2 = 0. |
Time for distributing data. More... | |
Double_t | fTime3 = 0. |
Time for reconstruction. More... | |
Double_t | fTime4 = 0. |
Time for output results. More... | |
std::map< UInt_t, CbmStsRecoModule * > | fModules {} |
std::vector< CbmStsRecoModule * > | fModuleIndex {} |
Task class for local reconstruction in the STS.
Local reconstruction in the STS comprises cluster finding, cluster analysis, and hit finding. All these tasks are performed separately on each module, which can be parallelised.
In the mode kCbmRecoTimeslice, the complete input array of digis is processed. In the mode kCbmRecoEvent, only digis belonging to the respective event are processed.
Parallelisation using OpenMP was introduced by F. Boek from FIAS.
Definition at line 54 of file CbmRecoSts.h.
CbmRecoSts::CbmRecoSts | ( | ECbmRecoMode | mode = kCbmRecoTimeslice , |
Bool_t | writeClusters = kFALSE , |
||
Bool_t | runParallel = kFALSE |
||
) |
Constructor.
|
delete |
Copy constructor (disabled)
|
virtual |
Destructor
Definition at line 51 of file CbmRecoSts.cxx.
|
private |
|
private |
Instantiate reconstruction modules @value Number of modules created.
Definition at line 56 of file CbmRecoSts.cxx.
References fModuleIndex, fModules, fParSetCond, fParSetModule, fParSetSensor, fParSim, fSetup, fUserParModule, fUserParSensor, fUserParSensorCond, CbmStsElement::GetAddress(), CbmStsElement::GetDaughter(), CbmStsSetup::GetModule(), CbmStsElement::GetNofDaughters(), CbmStsSetup::GetNofModules(), CbmStsParSetModule::GetParModule(), CbmStsParSetSensorCond::GetParSensor(), CbmStsParSetSensor::GetParSensor(), CbmStsElement::GetPnode(), CbmStsParSim::LorentzShift(), LorentzShift(), and shape.
Referenced by Init().
|
virtual |
Task execution.
Definition at line 128 of file CbmRecoSts.cxx.
References fClusters, fEvents, fHits, fMode, fNofTimeslices, kCbmRecoTimeslice, and ProcessData().
|
virtual |
End-of-run action.
Definition at line 159 of file CbmRecoSts.cxx.
References fMode, fNofClusters, fNofDigis, fNofDigisIgnored, fNofDigisUsed, fNofEvents, fNofHits, fNofTimeslices, fTime1, fTime2, fTime3, fTime4, fTimeTot, and kCbmRecoTimeslice.
|
inline |
Access to output array of clusters.
Definition at line 84 of file CbmRecoSts.h.
References fClusters.
|
private |
Get the sensor parameters.
geoSensor | Pointer to setup sensor |
|
virtual |
Initialisation.
Definition at line 223 of file CbmRecoSts.cxx.
References CreateModules(), fClusters, fDigiManager, fEvents, fHits, fMode, fParSetCond, fParSetModule, fParSetSensor, fParSim, fSetup, CbmDigiManager::Init(), CbmStsSetup::Init(), CbmDigiManager::Instance(), CbmStsSetup::Instance(), CbmDigiManager::IsPresent(), kCbmRecoEvent, kSts, CbmStsParSetModule::ToString(), CbmStsParSetSensorCond::ToString(), and CbmStsParSim::ToString().
|
private |
Average Lorentz Shift in a sensor.
conditions | Sensor operating conditions |
dZ | Sensor thickness [cm] |
bY | y component of magnetic field in sensor centre |
The Lorentz shift will be corrected for in hit finding.
Definition at line 303 of file CbmRecoSts.cxx.
References CbmStsParSensorCond::GetHallMobility(), CbmStsParSensorCond::GetVbias(), and CbmStsParSensorCond::GetVfd().
Referenced by CreateModules().
|
delete |
Assignment operator (disabled)
|
private |
Process one time slice or event.
event | Pointer to CbmEvent object |
If a null event pointer is given, the entire input array is processed.
Definition at line 336 of file CbmRecoSts.cxx.
References CbmStsRecoModule::AddDigiToQueue(), fClusters, fDigiManager, fHits, fModuleIndex, fModules, fNofClusters, fNofDigis, fNofDigisIgnored, fNofDigisUsed, fNofEvents, fNofHits, fNofTimeslices, fTime1, fTime2, fTime3, fTime4, fTimer, fTimeTot, CbmDigiManager::Get(), CbmStsDigi::GetAddress(), CbmStsHit::GetBackClusterId(), CbmStsHit::GetFrontClusterId(), CbmStsAddress::GetMotherAddress(), CbmDigiManager::GetNofDigis(), CbmAddress::GetSystemId(), kSts, kStsCluster, kStsDigi, kStsHit, kStsModule, CbmStsHit::SetBackClusterId(), CbmStsHit::SetFrontClusterId(), ToIntegralType(), and CbmStsAddress::ToString().
Referenced by Exec().
|
inline |
Set event-by-event mode.
choice | If true, event-by-event mode is used |
In the event-by-event mode, the event objects in the input tree are used, and events are processed one after the other. An event builder has to be run before, creating the event objects. By default, time-slice mode is applied.
Alternative to using SetMode.
Definition at line 101 of file CbmRecoSts.h.
References fMode, kCbmRecoEvent, and kCbmRecoTimeslice.
|
inline |
Set execution mode.
mode | Time-slice or event |
In the time-slice mode, the entire time-slice (input arrays) will be processed. In the event mode, events read from the event branch are processed one after the other.
Definition at line 113 of file CbmRecoSts.h.
References fMode.
|
virtual |
Define the needed parameter containers.
Definition at line 481 of file CbmRecoSts.cxx.
References fParSetCond, fParSetModule, fParSetSensor, and fParSim.
|
inline |
Time cut on clusters for hit finding.
value | Maximal time difference between two clusters in a hit [ns] |
Two clusters are considered compatible if their time difference is below value. Setting this cut parameter to a positive value will override the time cut defined by SetTimeCutClustersSig.
Definition at line 128 of file CbmRecoSts.h.
References fTimeCutClustersAbs.
|
inline |
Time cut on clusters for hit finding.
value | Maximal time difference in units of error |
Two clusters are considered compatible if their time difference is below value * sqrt(terr1**2 + terr2*+2).
Definition at line 137 of file CbmRecoSts.h.
References fTimeCutClustersSig.
|
inline |
Time cut on digis for cluster finding.
value | Maximal time difference between two digis in a cluster [ns] |
Two digis are considered compatible if their time difference is below value. Setting this cut parameter to a positive value will override the time cut defined by SetTimeCutDigisSig.
Definition at line 148 of file CbmRecoSts.h.
References fTimeCutDigisAbs.
|
inline |
Time cut on digis for hit finding.
value | Maximal time difference in units of error |
Two digis are considered compatible if their time difference is below value * sqrt2 * sigma(t), where the time error of the digis is assumed to be the same.
Definition at line 158 of file CbmRecoSts.h.
References fTimeCutDigisSig.
|
inline |
User-defined module parameters.
parModule | Module parameter object |
If defined, these parameters will be used for all modules instead of those found in the runtimeDb.
Definition at line 167 of file CbmRecoSts.h.
References fUserParModule.
|
inline |
User-defined sensor parameters.
parModule | Sensor parameter object |
If defined, these parameters will be used for all sensors instead of those found in the runtimeDb.
Definition at line 176 of file CbmRecoSts.h.
References fUserParSensorCond.
|
inline |
User-defined sensor parameters.
parModule | Sensor parameter object |
If defined, these parameters will be used for all sensors instead of those found in the runtimeDb.
Definition at line 187 of file CbmRecoSts.h.
References fUserParSensor.
|
private |
Interface to digi branch.
Definition at line 227 of file CbmRecoSts.h.
Referenced by Exec(), GetClusters(), Init(), and ProcessData().
|
private |
Input array of events.
Definition at line 226 of file CbmRecoSts.h.
Referenced by Init(), and ProcessData().
|
private |
Definition at line 225 of file CbmRecoSts.h.
|
private |
Output cluster array.
Definition at line 228 of file CbmRecoSts.h.
Referenced by Exec(), Init(), and ProcessData().
|
private |
Time-slice or event.
Definition at line 244 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), Init(), SetEventMode(), and SetMode().
|
private |
Definition at line 269 of file CbmRecoSts.h.
Referenced by CreateModules(), and ProcessData().
|
private |
Definition at line 268 of file CbmRecoSts.h.
Referenced by CreateModules(), and ProcessData().
|
private |
Total number of clusters produced.
Definition at line 259 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Total number of digis processed.
Definition at line 256 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Total number of ignored digis.
Definition at line 258 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Total number of used digis.
Definition at line 257 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Number of events processed.
Definition at line 255 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Total number of clusters produced.
Definition at line 260 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
ROOT timer.
Number of time slices processed
Definition at line 254 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
Sensor conditions.
Definition at line 235 of file CbmRecoSts.h.
Referenced by CreateModules(), Init(), and SetParContainers().
|
private |
Module parameters.
Definition at line 233 of file CbmRecoSts.h.
Referenced by CreateModules(), Init(), and SetParContainers().
|
private |
Sensor parameters.
Definition at line 234 of file CbmRecoSts.h.
Referenced by CreateModules(), Init(), and SetParContainers().
|
private |
Instance of STS setup.
Simulation settings
Definition at line 232 of file CbmRecoSts.h.
Referenced by CreateModules(), Init(), and SetParContainers().
|
private |
Use OpenMP multithreading.
Definition at line 250 of file CbmRecoSts.h.
|
private |
Output hit array.
Definition at line 231 of file CbmRecoSts.h.
Referenced by CreateModules(), and Init().
|
private |
Time for resetting modules.
Definition at line 262 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Time for distributing data.
Definition at line 263 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Time for reconstruction.
Definition at line 264 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Time for output results.
Definition at line 265 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Time cut for hit finding [ns].
Definition at line 248 of file CbmRecoSts.h.
Referenced by SetTimeCutClustersAbs().
|
private |
Time cut for hit finding.
Definition at line 247 of file CbmRecoSts.h.
Referenced by SetTimeCutClustersSig().
|
private |
Time cut for cluster finding [ns].
Definition at line 246 of file CbmRecoSts.h.
Referenced by SetTimeCutDigisAbs().
|
private |
Time cut for cluster finding.
Definition at line 245 of file CbmRecoSts.h.
Referenced by SetTimeCutDigisSig().
|
private |
Definition at line 253 of file CbmRecoSts.h.
Referenced by ProcessData().
|
private |
Total execution time.
Definition at line 261 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Definition at line 238 of file CbmRecoSts.h.
|
private |
Definition at line 239 of file CbmRecoSts.h.
Referenced by CreateModules(), and UseModulePar().
|
private |
Definition at line 240 of file CbmRecoSts.h.
Referenced by CreateModules(), and UseSensorPar().
|
private |
Definition at line 241 of file CbmRecoSts.h.
Referenced by CreateModules(), and UseSensorCond().
|
private |
Write clusters to tree.
Definition at line 249 of file CbmRecoSts.h.