CbmRoot
|
Task class for local reconstruction in the STS. More...
#include <CbmRecoSts.h>
Public Member Functions | |
CbmRecoSts (ECbmRecoMode mode=ECbmRecoMode::Timeslice, Bool_t writeClusters=kFALSE) | |
Constructor. | |
CbmRecoSts (const CbmRecoSts &)=delete | |
Copy constructor (disabled) | |
CbmRecoSts | operator= (const CbmRecoSts &)=delete |
Assignment operator (disabled) | |
virtual | ~CbmRecoSts () |
Destructor | |
virtual void | Exec (Option_t *opt) |
Task execution. | |
virtual void | Finish () |
End-of-run action. | |
TClonesArray * | GetClusters () |
Access to output array of clusters. | |
virtual InitStatus | Init () |
Initialisation. | |
void | SetEventMode (Bool_t choice=kTRUE) |
Set event-by-event mode. | |
void | SetMode (ECbmRecoMode mode) |
Set execution mode. | |
void | SetUseGpuReco (bool useGPU) |
virtual void | SetParContainers () |
Define the needed parameter containers. | |
void | SetTimeCutClustersAbs (Double_t value) |
Time cut on clusters for hit finding. | |
void | SetTimeCutClustersSig (Double_t value) |
Time cut on clusters for hit finding. | |
void | SetTimeCutDigisAbs (Double_t value) |
Time cut on digis for cluster finding. | |
void | SetTimeCutDigisSig (Double_t value) |
Time cut on digis for hit finding. | |
void | UseModulePar (CbmStsParModule *modulePar) |
User-defined module parameters. | |
void | UseModuleParSet (CbmStsParSetModule *moduleParSet) |
User-defined module parameter set. | |
void | UseSensorCond (CbmStsParSensorCond *sensorCond) |
User-defined sensor condition parameters. | |
void | UseSensorCondSet (CbmStsParSetSensorCond *sensorCondSet) |
User-defined module parameter set. | |
void | UseSensorPar (CbmStsParSensor *sensorPar) |
User-defined sensor parameters. | |
void | UseSensorParSet (CbmStsParSetSensor *sensorParSet) |
User-defined module parameter set. | |
void | DumpNewHits () |
void | DumpOldHits () |
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. | |
UInt_t | CreateModules () |
Instantiate reconstruction modules @value Number of modules created. | |
void | GetSensorParameters (CbmStsElement *geoSensor) |
Get the sensor parameters. | |
void | InitParams () |
Initialise parameters. | |
void | ProcessData (CbmEvent *event=nullptr) |
Process one time slice or event. | |
void | ProcessDataGpu () |
std::pair< size_t, size_t > | ForwardGpuClusterAndHits () |
ClassDef (CbmRecoSts, 1) | |
Private Attributes | |
TClonesArray * | fEvents = nullptr |
CbmDigiManager * | fDigiManager = nullptr |
Input array of events. | |
TClonesArray * | fClusters = nullptr |
Interface to digi branch. | |
TClonesArray * | fHits = nullptr |
Output cluster array. | |
CbmStsSetup * | fSetup = nullptr |
Output hit array. | |
CbmStsParSim * | fParSim = nullptr |
Instance of STS setup. | |
CbmStsParSetModule * | fParSetModule = nullptr |
Module parameters. | |
CbmStsParSetSensor * | fParSetSensor = nullptr |
Sensor parameters. | |
CbmStsParSetSensorCond * | fParSetCond = nullptr |
Sensor conditions. | |
CbmStsParAsic * | fUserParAsic = nullptr |
CbmStsParModule * | fUserParModule = nullptr |
CbmStsParSensor * | fUserParSensor = nullptr |
CbmStsParSensorCond * | fUserParCond = nullptr |
CbmStsParSetModule * | fUserParSetModule = nullptr |
CbmStsParSetSensor * | fUserParSetSensor = nullptr |
CbmStsParSetSensorCond * | fUserParSetCond = nullptr |
ECbmRecoMode | fMode = ECbmRecoMode::Timeslice |
Time-slice or event-by-event. | |
Double_t | fTimeCutDigisSig = 3. |
Time cut for cluster finding. | |
Double_t | fTimeCutDigisAbs = -1. |
Time cut for cluster finding [ns]. | |
Double_t | fTimeCutClustersSig = 4. |
Time cut for hit finding. | |
Double_t | fTimeCutClustersAbs = -1. |
Time cut for hit finding [ns]. | |
Bool_t | fWriteClusters = kFALSE |
Write clusters to tree. | |
Long64_t | fNofDigis = 0 |
Total number of digis processed. | |
Long64_t | fNofDigisUsed = 0 |
Total number of used digis. | |
Long64_t | fNofDigisIgnored = 0 |
Total number of ignored digis. | |
Long64_t | fNofClusters = 0 |
Total number of clusters produced. | |
Long64_t | fNofHits = 0 |
Total number of clusters produced. | |
Double_t | fTimeTot = 0. |
Total execution time. | |
Double_t | fTime1 = 0. |
Time for resetting modules. | |
Double_t | fTime2 = 0. |
Time for distributing data. | |
Double_t | fTime3 = 0. |
Time for reconstruction. | |
Double_t | fTime4 = 0. |
Time for output results. | |
double | fTimeSortDigis = 0. |
double | fTimeFindClusters = 0. |
double | fTimeSortClusters = 0. |
double | fTimeFindHits = 0. |
TStopwatch | fTimer {} |
Int_t | fNofTs = 0 |
ROOT timer. | |
Int_t | fNofEvents = 0 |
Number of events processed. | |
Double_t | fNofDigisRun = 0 |
Total number of digis processed. | |
Double_t | fNofDigisUsedRun = 0 |
Total number of used digis. | |
Double_t | fNofDigisIgnoredRun = 0 |
Total number of ignored digis. | |
Double_t | fNofClustersRun = 0 |
Total number of clusters produced. | |
Double_t | fNofHitsRun = 0 |
Total number of clusters produced. | |
Double_t | fTimeRun = 0. |
Total execution time. | |
Double_t | fTime1Run = 0. |
Time for resetting modules. | |
Double_t | fTime2Run = 0. |
Time for distributing data. | |
Double_t | fTime3Run = 0. |
Time for reconstruction. | |
Double_t | fTime4Run = 0. |
Time for output results. | |
std::map< UInt_t, CbmStsRecoModule * > | fModules {} |
std::vector< CbmStsRecoModule * > | fModuleIndex {} |
bool | fUseGpuReco = false |
cbm::algo::sts::HitfinderChain | fGpuReco |
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 = ECbmRecoMode::Timeslice, |
Bool_t | writeClusters = kFALSE ) |
Constructor.
Definition at line 55 of file CbmRecoSts.cxx.
|
delete |
Copy constructor (disabled)
|
virtual |
Destructor
Definition at line 65 of file CbmRecoSts.cxx.
|
private |
|
private |
Instantiate reconstruction modules @value Number of modules created.
Definition at line 70 of file CbmRecoSts.cxx.
References fGpuReco, fModuleIndex, fModules, fParSetCond, fParSetModule, fParSetSensor, fParSim, fSetup, fTimeCutClustersAbs, fTimeCutClustersSig, fTimeCutDigisAbs, fTimeCutDigisSig, fUseGpuReco, CbmStsElement::GetAddress(), CbmStsElement::GetDaughter(), CbmStsParAsic::GetDeadTime(), CbmStsParAsic::GetDynRange(), CbmStsPhysics::GetLandauWidthTable(), CbmStsRecoModule::getMatrix(), CbmStsSetup::GetModule(), CbmStsParAsic::GetNofAdc(), CbmStsParModule::GetNofChannels(), CbmStsElement::GetNofDaughters(), CbmStsSetup::GetNofModules(), CbmStsParAsic::GetNoise(), CbmStsParSensor::GetPar(), CbmStsParModule::GetParAsic(), CbmStsParSetModule::GetParModule(), CbmStsParSetSensor::GetParSensor(), CbmStsParSetSensorCond::GetParSensor(), CbmStsElement::GetPnode(), CbmStsParAsic::GetThreshold(), CbmStsParAsic::GetTimeResol(), CbmStsParAsic::GetZeroNoiseRate(), CbmStsPhysics::Instance(), LorentzShift(), CbmStsParSim::LorentzShift(), cbm::algo::sts::HitfinderPars::ModuleTransform::rotation, cbm::algo::sts::HitfinderChain::SetParameters(), CbmStsRecoModule::SetTimeCutClustersAbs(), CbmStsRecoModule::SetTimeCutClustersSig(), CbmStsRecoModule::SetTimeCutDigisAbs(), CbmStsRecoModule::SetTimeCutDigisSig(), shape, and cbm::algo::sts::HitfinderPars::ModuleTransform::translation.
Referenced by Init().
void CbmRecoSts::DumpNewHits | ( | ) |
Definition at line 832 of file CbmRecoSts.cxx.
void CbmRecoSts::DumpOldHits | ( | ) |
Definition at line 849 of file CbmRecoSts.cxx.
References fModuleIndex, and hits.
|
virtual |
Task execution.
Definition at line 196 of file CbmRecoSts.cxx.
References fClusters, fEvents, fHits, fMode, fNofClusters, fNofClustersRun, fNofDigis, fNofDigisIgnored, fNofDigisRun, fNofDigisUsed, fNofDigisUsedRun, fNofEvents, fNofHits, fNofHitsRun, fNofTs, fTime1, fTime1Run, fTime2, fTime2Run, fTime3, fTime3Run, fTime4, fTime4Run, fTimeRun, fTimeTot, fUseGpuReco, ProcessData(), ProcessDataGpu(), and Timeslice.
|
virtual |
End-of-run action.
Definition at line 283 of file CbmRecoSts.cxx.
References EventByEvent, fMode, fModuleIndex, fNofClusters, fNofDigis, fNofDigisIgnored, fNofDigisRun, fNofDigisUsed, fNofEvents, fNofHits, fNofTs, fTime1, fTime2, fTime3, fTime4, fTimeFindClusters, fTimeFindHits, fTimeRun, fTimeSortClusters, fTimeSortDigis, fTimeTot, fUseGpuReco, CbmStsRecoModule::Timings::timeCluster, CbmStsRecoModule::Timings::timeHits, CbmStsRecoModule::Timings::timeSortCluster, and CbmStsRecoModule::Timings::timeSortDigi.
|
private |
Definition at line 745 of file CbmRecoSts.cxx.
References fClusters, fGpuReco, fHits, cbm::algo::sts::HitfinderChain::GetParameters(), and CbmCluster::SetAddress().
Referenced by ProcessDataGpu().
|
inline |
Access to output array of clusters.
Definition at line 82 of file CbmRecoSts.h.
References fClusters.
|
private |
Get the sensor parameters.
geoSensor | Pointer to setup sensor |
|
virtual |
Initialisation.
Definition at line 379 of file CbmRecoSts.cxx.
References CreateModules(), EventByEvent, fClusters, fDigiManager, fEvents, fHits, fMode, fParSim, fSetup, fUseGpuReco, CbmDigiManager::Init(), CbmStsSetup::Init(), InitParams(), CbmDigiManager::Instance(), CbmStsSetup::Instance(), CbmDigiManager::IsPresent(), kSts, and CbmStsParSim::ToString().
|
private |
Initialise parameters.
For simulated data, the parameters for modules and sensors are retrieved from the runtimeDb. They can be overridden by user-specified parameter sets using the respective setters. This is necessary when processing experiment data without a prior simulation step.
Definition at line 451 of file CbmRecoSts.cxx.
References CbmStsParSetModule::clear(), CbmStsParSetSensor::clear(), CbmStsParSetSensorCond::clear(), fParSetCond, fParSetModule, fParSetSensor, fUserParCond, fUserParModule, fUserParSensor, fUserParSetCond, fUserParSetModule, fUserParSetSensor, CbmStsParSetModule::SetGlobalPar(), CbmStsParSetSensor::SetGlobalPar(), CbmStsParSetSensorCond::SetGlobalPar(), CbmStsParSetModule::ToString(), CbmStsParSetSensor::ToString(), and CbmStsParSetSensorCond::ToString().
Referenced by Init().
|
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 523 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 555 of file CbmRecoSts.cxx.
References fClusters, fDigiManager, fHits, fModuleIndex, fModules, fNofClusters, fNofDigis, fNofDigisIgnored, fNofDigisUsed, fNofHits, fNofTs, fTime1, fTime2, fTime3, fTime4, fTimeFindClusters, fTimeFindHits, fTimer, fTimeSortClusters, fTimeSortDigis, fTimeTot, CbmStsDigi::GetAddress(), CbmDigiManager::GetArray(), 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().
|
private |
Definition at line 730 of file CbmRecoSts.cxx.
References EventByEvent, fDigiManager, fGpuReco, fMode, fNofClusters, fNofDigis, fNofDigisUsed, fNofHits, ForwardGpuClusterAndHits(), and CbmDigiManager::GetArray().
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 99 of file CbmRecoSts.h.
References EventByEvent, fMode, and Timeslice.
|
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 109 of file CbmRecoSts.h.
References fMode.
|
virtual |
Define the needed parameter containers.
Definition at line 822 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 125 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 134 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 145 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 155 of file CbmRecoSts.h.
References fTimeCutDigisSig.
void CbmRecoSts::SetUseGpuReco | ( | bool | useGPU | ) |
Definition at line 514 of file CbmRecoSts.cxx.
References fUseGpuReco.
Referenced by cbm::reco::offline::TaskFactory::RegisterStsReco().
|
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 164 of file CbmRecoSts.h.
References fUserParModule.
|
inline |
User-defined module parameter set.
parModule | Module parameter set object |
If defined, this parameter set will be used instead of that found in the runtimeDb.
Definition at line 172 of file CbmRecoSts.h.
References fUserParSetModule.
|
inline |
User-defined sensor condition parameters.
parModule | Sensor condition parameter object |
If defined, these condition parameters will be used for all sensors instead of those found in the runtimeDb.
Definition at line 181 of file CbmRecoSts.h.
References fUserParCond.
|
inline |
User-defined module parameter set.
parModule | Module parameter set object |
If defined, this parameter set will be used instead of that found in the runtimeDb.
Definition at line 188 of file CbmRecoSts.h.
References fUserParSetCond.
|
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 197 of file CbmRecoSts.h.
References fUserParSensor.
|
inline |
User-defined module parameter set.
parModule | Module parameter set object |
If defined, this parameter set will be used instead of that found in the runtimeDb.
Definition at line 205 of file CbmRecoSts.h.
References fUserParSetSensor.
|
private |
Interface to digi branch.
Definition at line 257 of file CbmRecoSts.h.
Referenced by Exec(), ForwardGpuClusterAndHits(), GetClusters(), Init(), and ProcessData().
|
private |
Input array of events.
Definition at line 256 of file CbmRecoSts.h.
Referenced by Init(), ProcessData(), and ProcessDataGpu().
|
private |
Definition at line 255 of file CbmRecoSts.h.
|
private |
Definition at line 323 of file CbmRecoSts.h.
Referenced by CreateModules(), ForwardGpuClusterAndHits(), and ProcessDataGpu().
|
private |
Output cluster array.
Definition at line 258 of file CbmRecoSts.h.
Referenced by Exec(), ForwardGpuClusterAndHits(), Init(), and ProcessData().
|
private |
Time-slice or event-by-event.
Definition at line 279 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), Init(), ProcessDataGpu(), SetEventMode(), and SetMode().
|
private |
Definition at line 320 of file CbmRecoSts.h.
Referenced by CreateModules(), DumpOldHits(), Finish(), and ProcessData().
|
private |
Definition at line 319 of file CbmRecoSts.h.
Referenced by CreateModules(), and ProcessData().
|
private |
Total number of clusters produced.
Definition at line 290 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), ProcessData(), and ProcessDataGpu().
|
private |
Total number of clusters produced.
Definition at line 309 of file CbmRecoSts.h.
Referenced by Exec().
|
private |
Total number of digis processed.
Definition at line 287 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), ProcessData(), and ProcessDataGpu().
|
private |
Total number of ignored digis.
Definition at line 289 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
Total number of ignored digis.
Definition at line 308 of file CbmRecoSts.h.
|
private |
Total number of digis processed.
Definition at line 306 of file CbmRecoSts.h.
|
private |
Total number of used digis.
Definition at line 288 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), ProcessData(), and ProcessDataGpu().
|
private |
|
private |
Number of events processed.
Definition at line 305 of file CbmRecoSts.h.
|
private |
Total number of clusters produced.
Definition at line 291 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), ProcessData(), and ProcessDataGpu().
|
private |
Total number of clusters produced.
Definition at line 310 of file CbmRecoSts.h.
Referenced by Exec().
|
private |
ROOT timer.
Number of time slices processed
Definition at line 304 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
Sensor conditions.
Definition at line 265 of file CbmRecoSts.h.
Referenced by CreateModules(), InitParams(), and SetParContainers().
|
private |
Module parameters.
Definition at line 263 of file CbmRecoSts.h.
Referenced by CreateModules(), InitParams(), and SetParContainers().
|
private |
Sensor parameters.
Definition at line 264 of file CbmRecoSts.h.
Referenced by CreateModules(), InitParams(), and SetParContainers().
|
private |
Instance of STS setup.
Simulation settings
Definition at line 262 of file CbmRecoSts.h.
Referenced by CreateModules(), Init(), and SetParContainers().
|
private |
Output hit array.
Definition at line 261 of file CbmRecoSts.h.
Referenced by CreateModules(), and Init().
|
private |
Time for resetting modules.
Definition at line 293 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
|
private |
Time for distributing data.
Definition at line 294 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
|
private |
Time for reconstruction.
Definition at line 295 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
|
private |
Time for output results.
Definition at line 296 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
|
private |
Time cut for hit finding [ns].
Definition at line 283 of file CbmRecoSts.h.
Referenced by CreateModules(), and SetTimeCutClustersAbs().
|
private |
Time cut for hit finding.
Definition at line 282 of file CbmRecoSts.h.
Referenced by CreateModules(), and SetTimeCutClustersSig().
|
private |
Time cut for cluster finding [ns].
Definition at line 281 of file CbmRecoSts.h.
Referenced by CreateModules(), and SetTimeCutDigisAbs().
|
private |
Time cut for cluster finding.
Definition at line 280 of file CbmRecoSts.h.
Referenced by CreateModules(), and SetTimeCutDigisSig().
|
private |
Definition at line 298 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Definition at line 300 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Definition at line 303 of file CbmRecoSts.h.
Referenced by ProcessData().
|
private |
Total execution time.
Definition at line 311 of file CbmRecoSts.h.
|
private |
Definition at line 299 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Definition at line 297 of file CbmRecoSts.h.
Referenced by Finish(), and ProcessData().
|
private |
Total execution time.
Definition at line 292 of file CbmRecoSts.h.
Referenced by Exec(), Finish(), and ProcessData().
|
private |
Definition at line 322 of file CbmRecoSts.h.
Referenced by CreateModules(), Exec(), Finish(), Init(), and SetUseGpuReco().
|
private |
Definition at line 268 of file CbmRecoSts.h.
|
private |
Definition at line 271 of file CbmRecoSts.h.
Referenced by InitParams(), and UseSensorCond().
|
private |
Definition at line 269 of file CbmRecoSts.h.
Referenced by InitParams(), and UseModulePar().
|
private |
Definition at line 270 of file CbmRecoSts.h.
Referenced by InitParams(), and UseSensorPar().
|
private |
Definition at line 276 of file CbmRecoSts.h.
Referenced by InitParams(), and UseSensorCondSet().
|
private |
Definition at line 274 of file CbmRecoSts.h.
Referenced by InitParams(), and UseModuleParSet().
|
private |
Definition at line 275 of file CbmRecoSts.h.
Referenced by InitParams(), and UseSensorParSet().
|
private |
Write clusters to tree.
Definition at line 284 of file CbmRecoSts.h.