CbmRoot
|
#include <CbmTrdClusterFinder.h>
Public Types | |
enum | ECbmTrdRecDef { kTime = 0 , kMultiHit , kRowMerger , kNeighbourCol , kNeighbourRow , kDumpClusters , kFASP , kOnlyEventDigis , kDebugStatements , kUseRecoHelpers } |
Public Member Functions | |
CbmTrdClusterFinder () | |
Default constructor. | |
~CbmTrdClusterFinder () | |
Default destructor. | |
virtual InitStatus | Init () |
virtual void | SetParContainers () |
virtual void | Exec (Option_t *option) |
Executed task. | |
virtual void | Finish () |
Static Public Member Functions | |
static Float_t | GetMinimumChargeTH () |
static Bool_t | HasDumpClusters () |
static Bool_t | HasMultiHit () |
static Bool_t | HasNeighbourCol () |
static Bool_t | HasNeighbourRow () |
static Bool_t | HasRowMerger () |
static Bool_t | IsTimeBased () |
static Bool_t | DoDebugPrintouts () |
static Bool_t | UseRecoHelpers () |
static Bool_t | UseOnlyEventDigis () |
If true only digis connected ro a CbmEvent are processed Per default this is activated on construction, such that the user can turn it off before Init(), where it will also be automatically deactivated if no CbmEvent branch is found. | |
static void | SetDumpClusters (Bool_t set=kTRUE) |
static void | SetRowMerger (Bool_t set=kTRUE) |
static void | SetMultiHit (Bool_t set=kTRUE) |
static void | SetNeighbourEnable (Bool_t col=kTRUE, Bool_t row=kFALSE) |
static void | SetMinimumChargeTH (Float_t th) |
static void | SetTimeBased (Bool_t set=kTRUE) |
static void | SetDoDebugPrintouts (Bool_t set=kTRUE) |
static void | SetUseRecoHelpers (Bool_t set=kTRUE) |
Steer usage of TGraph support in TRD-2D for improved performance. The cost in terms of CPU has to be weighted against performance increase. | |
static void | SetUseOnlyEventDigis (Bool_t set=kTRUE) |
Set the Use Only Event Digis Per default this is activated on construction, such that the user can turn it off before Init(), where it will also be automatically deactivated if no CbmEvent branch is found. | |
Protected Member Functions | |
Bool_t | AddCluster (CbmTrdCluster *c) |
Save one finished cluster to the output. | |
Private Member Functions | |
CbmTrdClusterFinder (const CbmTrdClusterFinder &) | |
CbmTrdClusterFinder & | operator= (const CbmTrdClusterFinder &) |
Int_t | AddClusters (TClonesArray *clusters, CbmEvent *event, Bool_t moveOwner=kTRUE) |
UInt_t | addDigisToModules () |
Add all digis available from CbmDigiManager to the corresponding modules. | |
UInt_t | addDigisToModules (CbmEvent *event) |
Add all digis connected to the passed event to the corresponding modules. | |
void | addDigiToModule (UInt_t digiIdx) |
Add the digi in the TrdDigi branch at the passed digiIdx to its corresponding module. | |
void | processDigisInModules (UInt_t ndigis, CbmEvent *event=nullptr, bool clr=true) |
Call the clusterizer function of each module. | |
CbmTrdModuleRec * | AddModule (const CbmTrdDigi *digi) |
Adds the module corresponding to the address of the passed digi to the ModuleMap (fModules) | |
ClassDef (CbmTrdClusterFinder, 2) | |
Private Attributes | |
TClonesArray * | fClusters = nullptr |
TClonesArray * | fEvents = nullptr |
Array connected to the CbmEvent branch. | |
std::map< Int_t, CbmTrdModuleRec * > | fModules = {} |
list of modules being processed | |
CbmTrdParSetAsic * | fAsicPar = nullptr |
parameter list for ASIC characterization | |
CbmTrdParSetGas * | fGasPar = nullptr |
parameter list for HV status | |
CbmTrdParSetDigi * | fDigiPar = nullptr |
parameter list for read-out geometry | |
CbmTrdParSetGain * | fGainPar = nullptr |
parameter list for keV->ADC gain conversion | |
CbmTrdParSetGeo * | fGeoPar = nullptr |
parameter list for modules geometry | |
UInt_t | fNrTs = 0 |
Number of processed time slices. | |
UInt_t | fNrEvents = 0 |
Number of processed events (without CbmEvent corresponds to nr of exec calls) | |
UInt_t | fNrDigis = 0 |
Number of digis as input for the hit production. | |
UInt_t | fNrClusters = 0 |
Number of produced clusters. | |
Float_t | fProcessTime = 0 |
Total processing time [RealTime]. | |
Static Private Attributes | |
static Int_t | fgConfig = 0 |
Configuration map for the clusterizer. See CbmTrdRecDef for details. | |
static Float_t | fgMinimumChargeTH = .5e-06 |
Friends | |
class | CbmTrdModuleRecR |
class | CbmTrdModuleRec2D |
Task to find digis/pads which are not separated but touch each other. Create as an output an array of the digis belonging to the cluster. First sort the digis according to the unique sector number. This will result in as many arrays as sectors for one detector module. Then look for each module in all sectors for clusters. If a cluster was found at the sector boundaries check if there is another cluster in the next sector which has an overlap with these cluster. If there is an overlap than merge the two clusters.
Definition at line 55 of file CbmTrdClusterFinder.h.
Enumerator | |
---|---|
kTime | select Time based/Event by event simulation (see CbmTrdDigitizer::kTime) |
kMultiHit | multi hit detection |
kRowMerger | merge clusters over neighbor rows |
kNeighbourCol | use neighbor trigger; column wise |
kNeighbourRow | use neighbor trigger; row wise |
kDumpClusters | write clustered digis to output |
kFASP | use FASP ASIC for triangular pad plane geometry |
kOnlyEventDigis | use only digis connected to a CbmEvent |
kDebugStatements | print out debug statements with LOG(info) |
kUseRecoHelpers | use graph helpers in hit reco for improving performance |
Definition at line 60 of file CbmTrdClusterFinder.h.
CbmTrdClusterFinder::CbmTrdClusterFinder | ( | ) |
Default constructor.
Definition at line 53 of file CbmTrdClusterFinder.cxx.
References SetTimeBased(), and SetUseOnlyEventDigis().
CbmTrdClusterFinder::~CbmTrdClusterFinder | ( | ) |
|
private |
|
protected |
Save one finished cluster to the output.
Definition at line 76 of file CbmTrdClusterFinder.cxx.
References fClusters.
|
private |
Definition at line 380 of file CbmTrdClusterFinder.cxx.
References fClusters, fDigiPar, CbmDigiManager::Get(), CbmTrdDigi::GetAddressChannel(), CbmTrdParSet::GetModulePar(), CbmTrdParModDigi::GetNofColumns(), CbmDigiManager::Instance(), kTrdCluster, and CbmTrdCluster::SetFaspDigis().
Referenced by processDigisInModules().
|
private |
Add all digis available from CbmDigiManager to the corresponding modules.
Definition at line 84 of file CbmTrdClusterFinder.cxx.
References addDigiToModule(), CbmDigiManager::Instance(), IsTimeBased(), kTrd, and processDigisInModules().
Referenced by Exec().
|
private |
Add all digis connected to the passed event to the corresponding modules.
event |
Definition at line 106 of file CbmTrdClusterFinder.cxx.
References addDigiToModule(), and kTrdDigi.
|
private |
Add the digi in the TrdDigi branch at the passed digiIdx to its corresponding module.
digiIdx | index in the std::vector |
Definition at line 119 of file CbmTrdClusterFinder.cxx.
References CbmTrdModuleRec::AddDigi(), AddModule(), fModules, CbmDigiManager::Get(), CbmTrdDigi::GetAddressModule(), and CbmDigiManager::Instance().
Referenced by addDigisToModules(), and addDigisToModules().
|
private |
Adds the module corresponding to the address of the passed digi to the ModuleMap (fModules)
digi |
Definition at line 163 of file CbmTrdClusterFinder.cxx.
References fAsicPar, fDigiPar, fGainPar, fGasPar, fGeoPar, CbmTrdDigi::GetAddressModule(), CbmTrdParSet::GetModulePar(), CbmTrdDigi::GetType(), and CbmTrdDigi::kFASP.
Referenced by addDigiToModule().
|
private |
|
inlinestatic |
Definition at line 91 of file CbmTrdClusterFinder.h.
References fgConfig, kDebugStatements, and TESTBIT.
Referenced by Exec(), CbmTrdHitProducer::Exec(), CbmTrdHitProducer::processClusters(), CbmTrdHitProducer::processClusters(), and processDigisInModules().
|
virtual |
Executed task.
Digis are sorted according to the moduleAddress. A combiId is calculted based on the rowId and the colId to have a neighbouring criterion for digis within the same pad row. The digis of each module are sorted according to this combiId. All sorted digis of one pad row are 'clustered' into rowCluster. For a new row the rowClusters are compared to the rowClusters of the last row. If an overlap is found they are marked to be parents(last row) and childrens(activ row) (mergeRowCluster()). After this, the finale clusters are created. Therefor walkCluster() walks along the list of marked parents and markes every visited rowCluster to avoid multiple usage of one rowCluster. drawCluster() can be used to get a visual output.
Definition at line 308 of file CbmTrdClusterFinder.cxx.
References addDigisToModules(), DoDebugPrintouts(), fClusters, fEvents, fNrEvents, fNrTs, fProcessTime, CbmDigiManager::GetNofDigis(), CbmDigiManager::Instance(), kTrd, processDigisInModules(), and UseOnlyEventDigis().
|
virtual |
Finish task
Definition at line 433 of file CbmTrdClusterFinder.cxx.
References fNrClusters, fNrDigis, fNrEvents, and fProcessTime.
|
inlinestatic |
Definition at line 84 of file CbmTrdClusterFinder.h.
References fgMinimumChargeTH.
|
inlinestatic |
Definition at line 85 of file CbmTrdClusterFinder.h.
References fgConfig, kDumpClusters, and TESTBIT.
Referenced by Init().
|
inlinestatic |
|
inlinestatic |
Definition at line 87 of file CbmTrdClusterFinder.h.
References fgConfig, kNeighbourCol, and TESTBIT.
Referenced by Init().
|
inlinestatic |
Definition at line 88 of file CbmTrdClusterFinder.h.
References fgConfig, kNeighbourRow, and TESTBIT.
Referenced by Init().
|
inlinestatic |
Definition at line 89 of file CbmTrdClusterFinder.h.
References fgConfig, kRowMerger, and TESTBIT.
Referenced by Init().
|
virtual |
Initialisation
Definition at line 230 of file CbmTrdClusterFinder.cxx.
References fClusters, fEvents, HasDumpClusters(), HasMultiHit(), HasNeighbourCol(), HasNeighbourRow(), HasRowMerger(), CbmDigiManager::Init(), CbmDigiManager::Instance(), CbmTimeSlice::IsEvent(), IsTimeBased(), kTrd, SetTimeBased(), SetUseOnlyEventDigis(), and UseOnlyEventDigis().
|
inlinestatic |
Definition at line 90 of file CbmTrdClusterFinder.h.
References fgConfig, kTime, and TESTBIT.
Referenced by addDigisToModules(), and Init().
|
private |
|
private |
Call the clusterizer function of each module.
ndigis | total number of digis processed |
event | link to digi event in case event-by-event reco is activated |
clr | force clear clusters buffers |
Definition at line 137 of file CbmTrdClusterFinder.cxx.
References AddClusters(), DoDebugPrintouts(), fgMinimumChargeTH, CbmTrdModuleRec::FindClusters(), fModules, fNrClusters, fNrDigis, CbmTrdModuleRec::GetClusters(), and CbmTrdModuleRec::GetOverThreshold().
Referenced by addDigisToModules(), and Exec().
|
inlinestatic |
Definition at line 129 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kDebugStatements, and SETBIT.
|
inlinestatic |
Definition at line 115 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kDumpClusters, and SETBIT.
|
inlinestatic |
Definition at line 126 of file CbmTrdClusterFinder.h.
References fgMinimumChargeTH.
Referenced by cbm::reco::offline::TaskFactory::RegisterTrdReco().
|
inlinestatic |
|
inlinestatic |
Definition at line 121 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kNeighbourCol, kNeighbourRow, and SETBIT.
Referenced by cbm::reco::offline::TaskFactory::RegisterTrdReco().
|
virtual |
|
inlinestatic |
Definition at line 119 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kRowMerger, and SETBIT.
Referenced by cbm::reco::offline::TaskFactory::RegisterTrdReco().
|
inlinestatic |
Definition at line 127 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kTime, and SETBIT.
Referenced by CbmTrdClusterFinder(), Init(), and cbm::reco::offline::TaskFactory::RegisterTrdReco().
|
inlinestatic |
Set the Use Only Event Digis Per default this is activated on construction, such that the user can turn it off before Init(), where it will also be automatically deactivated if no CbmEvent branch is found.
set |
Definition at line 149 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kOnlyEventDigis, and SETBIT.
Referenced by CbmTrdClusterFinder(), Init(), and CbmTrdHitProducer::Init().
|
inlinestatic |
Steer usage of TGraph support in TRD-2D for improved performance. The cost in terms of CPU has to be weighted against performance increase.
Definition at line 136 of file CbmTrdClusterFinder.h.
References CLRBIT, fgConfig, kUseRecoHelpers, and SETBIT.
|
inlinestatic |
If true only digis connected ro a CbmEvent are processed Per default this is activated on construction, such that the user can turn it off before Init(), where it will also be automatically deactivated if no CbmEvent branch is found.
Definition at line 101 of file CbmTrdClusterFinder.h.
References fgConfig, kOnlyEventDigis, and TESTBIT.
Referenced by Exec(), CbmTrdHitProducer::Exec(), Init(), and CbmTrdHitProducer::Init().
|
inlinestatic |
Definition at line 92 of file CbmTrdClusterFinder.h.
References fgConfig, kUseRecoHelpers, and TESTBIT.
Referenced by CbmTrdHitProducer::AddModule().
|
friend |
Definition at line 57 of file CbmTrdClusterFinder.h.
|
friend |
Definition at line 56 of file CbmTrdClusterFinder.h.
|
private |
parameter list for ASIC characterization
Definition at line 215 of file CbmTrdClusterFinder.h.
Referenced by AddModule(), and SetParContainers().
|
private |
Definition at line 208 of file CbmTrdClusterFinder.h.
Referenced by AddCluster(), AddClusters(), Exec(), Init(), and ~CbmTrdClusterFinder().
|
private |
parameter list for read-out geometry
Definition at line 217 of file CbmTrdClusterFinder.h.
Referenced by AddClusters(), AddModule(), and SetParContainers().
|
private |
Array connected to the CbmEvent branch.
Output array of CbmTrdCluster
Definition at line 211 of file CbmTrdClusterFinder.h.
|
private |
parameter list for keV->ADC gain conversion
Definition at line 218 of file CbmTrdClusterFinder.h.
Referenced by AddModule(), and SetParContainers().
|
private |
parameter list for HV status
Definition at line 216 of file CbmTrdClusterFinder.h.
Referenced by AddModule(), and SetParContainers().
|
staticprivate |
Configuration map for the clusterizer. See CbmTrdRecDef for details.
Definition at line 204 of file CbmTrdClusterFinder.h.
Referenced by DoDebugPrintouts(), HasDumpClusters(), HasMultiHit(), HasNeighbourCol(), HasNeighbourRow(), HasRowMerger(), IsTimeBased(), SetDoDebugPrintouts(), SetDumpClusters(), SetMultiHit(), SetNeighbourEnable(), SetRowMerger(), SetTimeBased(), SetUseOnlyEventDigis(), SetUseRecoHelpers(), UseOnlyEventDigis(), and UseRecoHelpers().
|
private |
parameter list for modules geometry
Definition at line 219 of file CbmTrdClusterFinder.h.
Referenced by AddModule(), and SetParContainers().
|
staticprivate |
Definition at line 205 of file CbmTrdClusterFinder.h.
Referenced by GetMinimumChargeTH(), processDigisInModules(), and SetMinimumChargeTH().
|
private |
list of modules being processed
Definition at line 214 of file CbmTrdClusterFinder.h.
Referenced by addDigiToModule(), and processDigisInModules().
|
private |
Number of produced clusters.
Definition at line 231 of file CbmTrdClusterFinder.h.
Referenced by Finish(), and processDigisInModules().
|
private |
Number of digis as input for the hit production.
Definition at line 228 of file CbmTrdClusterFinder.h.
Referenced by Finish(), and processDigisInModules().
|
private |
Number of processed events (without CbmEvent corresponds to nr of exec calls)
Definition at line 225 of file CbmTrdClusterFinder.h.
|
private |
Number of processed time slices.
Definition at line 222 of file CbmTrdClusterFinder.h.
Referenced by Exec().
|
private |
Total processing time [RealTime].
Definition at line 234 of file CbmTrdClusterFinder.h.