CbmRoot
Loading...
Searching...
No Matches
CbmTrdClusterFinder.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci, Pascal Raisig, Florian Uhlig [committer] */
4
16#ifndef CBMTRDCLUSTERFINDER_H
17#define CBMTRDCLUSTERFINDER_H
18
19#include "CbmEvent.h"
20#include "FairTask.h"
21
22#include <RtypesCore.h>
23
24#include <map>
25#include <set>
26#include <vector>
27
28class CbmTrdCluster;
29class CbmTrdDigi;
31class CbmTrdParSetGas;
32class CbmTrdParSetGeo;
35class CbmTrdModuleRec;
36class TClonesArray;
37class TGeoPhysicalNode;
38
55class CbmTrdClusterFinder : public FairTask {
56 friend class CbmTrdModuleRecR;
57 friend class CbmTrdModuleRec2D;
58
59 public:
73
78
83
84 static Float_t GetMinimumChargeTH() { return fgMinimumChargeTH; }
85 static Bool_t HasDumpClusters() { return TESTBIT(fgConfig, kDumpClusters); }
86 static Bool_t HasMultiHit() { return TESTBIT(fgConfig, kMultiHit); }
87 static Bool_t HasNeighbourCol() { return TESTBIT(fgConfig, kNeighbourCol); }
88 static Bool_t HasNeighbourRow() { return TESTBIT(fgConfig, kNeighbourRow); }
89 static Bool_t HasRowMerger() { return TESTBIT(fgConfig, kRowMerger); }
90 static Bool_t IsTimeBased() { return TESTBIT(fgConfig, kTime); }
91 static Bool_t DoDebugPrintouts() { return TESTBIT(fgConfig, kDebugStatements); }
92 static Bool_t UseRecoHelpers() { return TESTBIT(fgConfig, kUseRecoHelpers); }
93
101 static Bool_t UseOnlyEventDigis() { return TESTBIT(fgConfig, kOnlyEventDigis); }
102
104 //virtual InitStatus ReInit();
105 virtual InitStatus Init();
106 virtual void SetParContainers();
107
109 virtual void Exec(Option_t* option);
110
112 virtual void Finish();
113
114
115 static void SetDumpClusters(Bool_t set = kTRUE)
116 {
118 }
119 static void SetRowMerger(Bool_t set = kTRUE) { set ? SETBIT(fgConfig, kRowMerger) : CLRBIT(fgConfig, kRowMerger); }
120 static void SetMultiHit(Bool_t set = kTRUE) { set ? SETBIT(fgConfig, kMultiHit) : CLRBIT(fgConfig, kMultiHit); }
121 static void SetNeighbourEnable(Bool_t col = kTRUE, Bool_t row = kFALSE)
122 {
125 }
126 static void SetMinimumChargeTH(Float_t th) { fgMinimumChargeTH = th; }
127 static void SetTimeBased(Bool_t set = kTRUE) { set ? SETBIT(fgConfig, kTime) : CLRBIT(fgConfig, kTime); }
128
129 static void SetDoDebugPrintouts(Bool_t set = kTRUE)
130 {
132 }
136 static void SetUseRecoHelpers(Bool_t set = kTRUE)
137 {
139 }
140
141
149 static void SetUseOnlyEventDigis(Bool_t set = kTRUE)
150 {
152 }
153
154 protected:
156 Bool_t AddCluster(CbmTrdCluster* c);
157
158 private:
161
162 Int_t AddClusters(TClonesArray* clusters, CbmEvent* event, Bool_t moveOwner = kTRUE);
163
169 UInt_t addDigisToModules();
170
177 UInt_t addDigisToModules(CbmEvent* event);
178
184 void addDigiToModule(UInt_t digiIdx);
185
193 void processDigisInModules(UInt_t ndigis, CbmEvent* event = nullptr, bool clr = true);
194
202
203
204 static Int_t fgConfig;
205 static Float_t fgMinimumChargeTH;
206
207
208 TClonesArray* fClusters = nullptr;
211 TClonesArray* fEvents = nullptr;
212
213 //==================================================================
214 std::map<Int_t, CbmTrdModuleRec*> fModules = {};
220
222 UInt_t fNrTs = 0;
223
225 UInt_t fNrEvents = 0;
226
228 UInt_t fNrDigis = 0;
229
231 UInt_t fNrClusters = 0;
232
234 Float_t fProcessTime = 0;
235
237};
238#endif
#define SETBIT(n, i)
Definition RTypes.h:15
#define TESTBIT(n, i)
Definition RTypes.h:17
#define CLRBIT(n, i)
Definition RTypes.h:16
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
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 tu...
static void SetTimeBased(Bool_t set=kTRUE)
TClonesArray * fEvents
Array connected to the CbmEvent branch.
std::map< Int_t, CbmTrdModuleRec * > fModules
list of modules being processed
CbmTrdParSetGas * fGasPar
parameter list for HV status
static Bool_t HasDumpClusters()
static Int_t fgConfig
Configuration map for the clusterizer. See CbmTrdRecDef for details.
UInt_t fNrDigis
Number of digis as input for the hit production.
static void SetRowMerger(Bool_t set=kTRUE)
virtual InitStatus Init()
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 ...
static void SetMultiHit(Bool_t set=kTRUE)
ClassDef(CbmTrdClusterFinder, 2)
static void SetMinimumChargeTH(Float_t th)
@ kUseRecoHelpers
use graph helpers in hit reco for improving performance
@ kDumpClusters
write clustered digis to output
@ kDebugStatements
print out debug statements with LOG(info)
@ kFASP
use FASP ASIC for triangular pad plane geometry
@ kOnlyEventDigis
use only digis connected to a CbmEvent
@ kNeighbourCol
use neighbor trigger; column wise
@ kRowMerger
merge clusters over neighbor rows
@ kMultiHit
multi hit detection
@ kNeighbourRow
use neighbor trigger; row wise
@ kTime
select Time based/Event by event simulation (see CbmTrdDigitizer::kTime)
static Bool_t HasNeighbourCol()
static Bool_t UseRecoHelpers()
Bool_t AddCluster(CbmTrdCluster *c)
Save one finished cluster to the output.
CbmTrdParSetDigi * fDigiPar
parameter list for read-out geometry
CbmTrdClusterFinder()
Default constructor.
static void SetDumpClusters(Bool_t set=kTRUE)
CbmTrdClusterFinder(const CbmTrdClusterFinder &)
static Bool_t HasRowMerger()
UInt_t fNrTs
Number of processed time slices.
~CbmTrdClusterFinder()
Default destructor.
CbmTrdModuleRec * AddModule(const CbmTrdDigi *digi)
Adds the module corresponding to the address of the passed digi to the ModuleMap (fModules)
virtual void Exec(Option_t *option)
Executed task.
UInt_t fNrClusters
Number of produced clusters.
static void SetNeighbourEnable(Bool_t col=kTRUE, Bool_t row=kFALSE)
CbmTrdClusterFinder & operator=(const CbmTrdClusterFinder &)
CbmTrdParSetGeo * fGeoPar
parameter list for modules geometry
static Bool_t HasNeighbourRow()
static Bool_t UseOnlyEventDigis()
If true only digis connected ro a CbmEvent are processed Per default this is activated on constructio...
CbmTrdParSetGain * fGainPar
parameter list for keV->ADC gain conversion
void processDigisInModules(UInt_t ndigis, CbmEvent *event=nullptr, bool clr=true)
Call the clusterizer function of each module.
static Bool_t HasMultiHit()
static Bool_t IsTimeBased()
UInt_t addDigisToModules()
Add all digis available from CbmDigiManager to the corresponding modules.
static Float_t fgMinimumChargeTH
Int_t AddClusters(TClonesArray *clusters, CbmEvent *event, Bool_t moveOwner=kTRUE)
void addDigiToModule(UInt_t digiIdx)
Add the digi in the TrdDigi branch at the passed digiIdx to its corresponding module.
static Float_t GetMinimumChargeTH()
CbmTrdParSetAsic * fAsicPar
parameter list for ASIC characterization
UInt_t fNrEvents
Number of processed events (without CbmEvent corresponds to nr of exec calls)
Float_t fProcessTime
Total processing time [RealTime].
static Bool_t DoDebugPrintouts()
static void SetDoDebugPrintouts(Bool_t set=kTRUE)
Data Container for TRD clusters.
Cluster finding and hit reconstruction algorithms for the TRD(2D) module.
Rectangular pad module; Cluster finding and hit reconstruction algorithms.
Abstract class for module wise cluster finding and hit reconstruction.
Describe TRD module ASIC settings (electronic gain, delays, etc)
Describe TRD module working settings (HV, etc)