CbmRoot
Loading...
Searching...
No Matches
CbmTrdClusterFinder Class Reference

#include <CbmTrdClusterFinder.h>

Inheritance diagram for CbmTrdClusterFinder:
[legend]
Collaboration diagram for CbmTrdClusterFinder:
[legend]

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 &)
 
CbmTrdClusterFinderoperator= (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.
 
CbmTrdModuleRecAddModule (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
 
CbmTrdParSetAsicfAsicPar = nullptr
 parameter list for ASIC characterization
 
CbmTrdParSetGasfGasPar = nullptr
 parameter list for HV status
 
CbmTrdParSetDigifDigiPar = nullptr
 parameter list for read-out geometry
 
CbmTrdParSetGainfGainPar = nullptr
 parameter list for keV->ADC gain conversion
 
CbmTrdParSetGeofGeoPar = 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
 

Detailed Description

CbmTrdClusterFinder.h

Author
Florian Uhlig f.uhl.nosp@m.ig@g.nosp@m.si.de

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.

Member Enumeration Documentation

◆ ECbmTrdRecDef

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.

Constructor & Destructor Documentation

◆ CbmTrdClusterFinder() [1/2]

CbmTrdClusterFinder::CbmTrdClusterFinder ( )

Default constructor.

Definition at line 53 of file CbmTrdClusterFinder.cxx.

References SetTimeBased(), and SetUseOnlyEventDigis().

◆ ~CbmTrdClusterFinder()

CbmTrdClusterFinder::~CbmTrdClusterFinder ( )

Default destructor.

Definition at line 61 of file CbmTrdClusterFinder.cxx.

References fClusters.

◆ CbmTrdClusterFinder() [2/2]

CbmTrdClusterFinder::CbmTrdClusterFinder ( const CbmTrdClusterFinder & )
private

Member Function Documentation

◆ AddCluster()

Bool_t CbmTrdClusterFinder::AddCluster ( CbmTrdCluster * c)
protected

Save one finished cluster to the output.

Definition at line 76 of file CbmTrdClusterFinder.cxx.

References fClusters.

◆ AddClusters()

Int_t CbmTrdClusterFinder::AddClusters ( TClonesArray * clusters,
CbmEvent * event,
Bool_t moveOwner = kTRUE )
private

◆ addDigisToModules() [1/2]

UInt_t CbmTrdClusterFinder::addDigisToModules ( )
private

Add all digis available from CbmDigiManager to the corresponding modules.

Returns
UInt_t

Definition at line 84 of file CbmTrdClusterFinder.cxx.

References addDigiToModule(), CbmDigiManager::Instance(), IsTimeBased(), kTrd, and processDigisInModules().

Referenced by Exec().

◆ addDigisToModules() [2/2]

UInt_t CbmTrdClusterFinder::addDigisToModules ( CbmEvent * event)
private

Add all digis connected to the passed event to the corresponding modules.

Parameters
event
Returns
UInt_t

Definition at line 106 of file CbmTrdClusterFinder.cxx.

References addDigiToModule(), and kTrdDigi.

◆ addDigiToModule()

void CbmTrdClusterFinder::addDigiToModule ( UInt_t digiIdx)
private

Add the digi in the TrdDigi branch at the passed digiIdx to its corresponding module.

Parameters
digiIdxindex 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().

◆ AddModule()

CbmTrdModuleRec * CbmTrdClusterFinder::AddModule ( const CbmTrdDigi * digi)
private

Adds the module corresponding to the address of the passed digi to the ModuleMap (fModules)

Parameters
digi
Returns
CbmTrdModuleRec*

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().

◆ ClassDef()

CbmTrdClusterFinder::ClassDef ( CbmTrdClusterFinder ,
2  )
private

◆ DoDebugPrintouts()

static Bool_t CbmTrdClusterFinder::DoDebugPrintouts ( )
inlinestatic

◆ Exec()

void CbmTrdClusterFinder::Exec ( Option_t * option)
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().

◆ Finish()

void CbmTrdClusterFinder::Finish ( )
virtual

Finish task

Definition at line 433 of file CbmTrdClusterFinder.cxx.

References fNrClusters, fNrDigis, fNrEvents, and fProcessTime.

◆ GetMinimumChargeTH()

static Float_t CbmTrdClusterFinder::GetMinimumChargeTH ( )
inlinestatic

Definition at line 84 of file CbmTrdClusterFinder.h.

References fgMinimumChargeTH.

◆ HasDumpClusters()

static Bool_t CbmTrdClusterFinder::HasDumpClusters ( )
inlinestatic

Definition at line 85 of file CbmTrdClusterFinder.h.

References fgConfig, kDumpClusters, and TESTBIT.

Referenced by Init().

◆ HasMultiHit()

static Bool_t CbmTrdClusterFinder::HasMultiHit ( )
inlinestatic

Definition at line 86 of file CbmTrdClusterFinder.h.

References fgConfig, kMultiHit, and TESTBIT.

Referenced by Init().

◆ HasNeighbourCol()

static Bool_t CbmTrdClusterFinder::HasNeighbourCol ( )
inlinestatic

Definition at line 87 of file CbmTrdClusterFinder.h.

References fgConfig, kNeighbourCol, and TESTBIT.

Referenced by Init().

◆ HasNeighbourRow()

static Bool_t CbmTrdClusterFinder::HasNeighbourRow ( )
inlinestatic

Definition at line 88 of file CbmTrdClusterFinder.h.

References fgConfig, kNeighbourRow, and TESTBIT.

Referenced by Init().

◆ HasRowMerger()

static Bool_t CbmTrdClusterFinder::HasRowMerger ( )
inlinestatic

Definition at line 89 of file CbmTrdClusterFinder.h.

References fgConfig, kRowMerger, and TESTBIT.

Referenced by Init().

◆ Init()

◆ IsTimeBased()

static Bool_t CbmTrdClusterFinder::IsTimeBased ( )
inlinestatic

Definition at line 90 of file CbmTrdClusterFinder.h.

References fgConfig, kTime, and TESTBIT.

Referenced by addDigisToModules(), and Init().

◆ operator=()

CbmTrdClusterFinder & CbmTrdClusterFinder::operator= ( const CbmTrdClusterFinder & )
private

◆ processDigisInModules()

void CbmTrdClusterFinder::processDigisInModules ( UInt_t ndigis,
CbmEvent * event = nullptr,
bool clr = true )
private

Call the clusterizer function of each module.

Parameters
ndigistotal number of digis processed
eventlink to digi event in case event-by-event reco is activated
clrforce 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().

◆ SetDoDebugPrintouts()

static void CbmTrdClusterFinder::SetDoDebugPrintouts ( Bool_t set = kTRUE)
inlinestatic

Definition at line 129 of file CbmTrdClusterFinder.h.

References CLRBIT, fgConfig, kDebugStatements, and SETBIT.

◆ SetDumpClusters()

static void CbmTrdClusterFinder::SetDumpClusters ( Bool_t set = kTRUE)
inlinestatic

Definition at line 115 of file CbmTrdClusterFinder.h.

References CLRBIT, fgConfig, kDumpClusters, and SETBIT.

◆ SetMinimumChargeTH()

static void CbmTrdClusterFinder::SetMinimumChargeTH ( Float_t th)
inlinestatic

◆ SetMultiHit()

static void CbmTrdClusterFinder::SetMultiHit ( Bool_t set = kTRUE)
inlinestatic

Definition at line 120 of file CbmTrdClusterFinder.h.

References CLRBIT, fgConfig, kMultiHit, and SETBIT.

◆ SetNeighbourEnable()

static void CbmTrdClusterFinder::SetNeighbourEnable ( Bool_t col = kTRUE,
Bool_t row = kFALSE )
inlinestatic

◆ SetParContainers()

void CbmTrdClusterFinder::SetParContainers ( )
virtual

Definition at line 219 of file CbmTrdClusterFinder.cxx.

References fAsicPar, fDigiPar, fGainPar, fGasPar, and fGeoPar.

◆ SetRowMerger()

static void CbmTrdClusterFinder::SetRowMerger ( Bool_t set = kTRUE)
inlinestatic

Definition at line 119 of file CbmTrdClusterFinder.h.

References CLRBIT, fgConfig, kRowMerger, and SETBIT.

Referenced by cbm::reco::offline::TaskFactory::RegisterTrdReco().

◆ SetTimeBased()

static void CbmTrdClusterFinder::SetTimeBased ( Bool_t set = kTRUE)
inlinestatic

◆ SetUseOnlyEventDigis()

static void CbmTrdClusterFinder::SetUseOnlyEventDigis ( Bool_t set = kTRUE)
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.

Parameters
set

Definition at line 149 of file CbmTrdClusterFinder.h.

References CLRBIT, fgConfig, kOnlyEventDigis, and SETBIT.

Referenced by CbmTrdClusterFinder(), Init(), and CbmTrdHitProducer::Init().

◆ SetUseRecoHelpers()

static void CbmTrdClusterFinder::SetUseRecoHelpers ( Bool_t set = kTRUE)
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.

◆ UseOnlyEventDigis()

static Bool_t CbmTrdClusterFinder::UseOnlyEventDigis ( )
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.

Returns
Bool_t

Definition at line 101 of file CbmTrdClusterFinder.h.

References fgConfig, kOnlyEventDigis, and TESTBIT.

Referenced by Exec(), CbmTrdHitProducer::Exec(), Init(), and CbmTrdHitProducer::Init().

◆ UseRecoHelpers()

static Bool_t CbmTrdClusterFinder::UseRecoHelpers ( )
inlinestatic

Definition at line 92 of file CbmTrdClusterFinder.h.

References fgConfig, kUseRecoHelpers, and TESTBIT.

Referenced by CbmTrdHitProducer::AddModule().

Friends And Related Symbol Documentation

◆ CbmTrdModuleRec2D

friend class CbmTrdModuleRec2D
friend

Definition at line 57 of file CbmTrdClusterFinder.h.

◆ CbmTrdModuleRecR

friend class CbmTrdModuleRecR
friend

Definition at line 56 of file CbmTrdClusterFinder.h.

Member Data Documentation

◆ fAsicPar

CbmTrdParSetAsic* CbmTrdClusterFinder::fAsicPar = nullptr
private

parameter list for ASIC characterization

Definition at line 215 of file CbmTrdClusterFinder.h.

Referenced by AddModule(), and SetParContainers().

◆ fClusters

TClonesArray* CbmTrdClusterFinder::fClusters = nullptr
private

Definition at line 208 of file CbmTrdClusterFinder.h.

Referenced by AddCluster(), AddClusters(), Exec(), Init(), and ~CbmTrdClusterFinder().

◆ fDigiPar

CbmTrdParSetDigi* CbmTrdClusterFinder::fDigiPar = nullptr
private

parameter list for read-out geometry

Definition at line 217 of file CbmTrdClusterFinder.h.

Referenced by AddClusters(), AddModule(), and SetParContainers().

◆ fEvents

TClonesArray* CbmTrdClusterFinder::fEvents = nullptr
private

Array connected to the CbmEvent branch.

Output array of CbmTrdCluster

Definition at line 211 of file CbmTrdClusterFinder.h.

Referenced by Exec(), and Init().

◆ fGainPar

CbmTrdParSetGain* CbmTrdClusterFinder::fGainPar = nullptr
private

parameter list for keV->ADC gain conversion

Definition at line 218 of file CbmTrdClusterFinder.h.

Referenced by AddModule(), and SetParContainers().

◆ fGasPar

CbmTrdParSetGas* CbmTrdClusterFinder::fGasPar = nullptr
private

parameter list for HV status

Definition at line 216 of file CbmTrdClusterFinder.h.

Referenced by AddModule(), and SetParContainers().

◆ fgConfig

Int_t CbmTrdClusterFinder::fgConfig = 0
staticprivate

◆ fGeoPar

CbmTrdParSetGeo* CbmTrdClusterFinder::fGeoPar = nullptr
private

parameter list for modules geometry

Definition at line 219 of file CbmTrdClusterFinder.h.

Referenced by AddModule(), and SetParContainers().

◆ fgMinimumChargeTH

Float_t CbmTrdClusterFinder::fgMinimumChargeTH = .5e-06
staticprivate

◆ fModules

std::map<Int_t, CbmTrdModuleRec*> CbmTrdClusterFinder::fModules = {}
private

list of modules being processed

Definition at line 214 of file CbmTrdClusterFinder.h.

Referenced by addDigiToModule(), and processDigisInModules().

◆ fNrClusters

UInt_t CbmTrdClusterFinder::fNrClusters = 0
private

Number of produced clusters.

Definition at line 231 of file CbmTrdClusterFinder.h.

Referenced by Finish(), and processDigisInModules().

◆ fNrDigis

UInt_t CbmTrdClusterFinder::fNrDigis = 0
private

Number of digis as input for the hit production.

Definition at line 228 of file CbmTrdClusterFinder.h.

Referenced by Finish(), and processDigisInModules().

◆ fNrEvents

UInt_t CbmTrdClusterFinder::fNrEvents = 0
private

Number of processed events (without CbmEvent corresponds to nr of exec calls)

Definition at line 225 of file CbmTrdClusterFinder.h.

Referenced by Exec(), and Finish().

◆ fNrTs

UInt_t CbmTrdClusterFinder::fNrTs = 0
private

Number of processed time slices.

Definition at line 222 of file CbmTrdClusterFinder.h.

Referenced by Exec().

◆ fProcessTime

Float_t CbmTrdClusterFinder::fProcessTime = 0
private

Total processing time [RealTime].

Definition at line 234 of file CbmTrdClusterFinder.h.

Referenced by Exec(), and Finish().


The documentation for this class was generated from the following files: