CbmRoot
CbmTrdDigitizer.h
Go to the documentation of this file.
1 
10 #ifndef CBMTRDDIGITIZER_H_
11 #define CBMTRDDIGITIZER_H_
12 
13 #include "CbmDefs.h" // for ECbmModuleId
14 #include "CbmDigitize.h"
15 #include "CbmMatch.h"
16 #include "CbmTrdCheckUtil.h"
17 #include "CbmTrdDigi.h"
18 #include "CbmTrdRawToDigiR.h"
19 #include <map>
20 
21 class TClonesArray;
22 
23 class CbmTrdParSetAsic;
24 class CbmTrdParSetGas;
25 class CbmTrdParSetDigi;
26 class CbmTrdParSetGain;
27 class CbmTrdParSetGeo;
28 class CbmTrdRadiator;
29 
30 //class CbmTrdDigi;
31 //class CbmMatch;
32 
33 //class CbmTrdGeoHandler;
34 class CbmTrdModuleSim;
35 
36 class CbmTrdDigitizer : public CbmDigitize<CbmTrdDigi> {
37 public:
38  enum CbmTrdSimDef {
39  kTime = 0,
42  kFASP
43  };
44 
49  CbmTrdDigitizer(CbmTrdRadiator* radiator = NULL);
50 
54  virtual ~CbmTrdDigitizer();
55  static Bool_t AddNoise() { return TESTBIT(fConfig, kNoise); }
56  static Bool_t IsTimeBased() { return TESTBIT(fConfig, kTime); }
57  static Bool_t UseWeightedDist() { return TESTBIT(fConfig, kWeightDistance); }
58  static Bool_t UseFASP() { return TESTBIT(fConfig, kFASP); }
59 
60 
62 
66  virtual InitStatus Init();
67 
71  virtual void SetParContainers();
72 
76  virtual void Exec(Option_t* option);
77 
81  virtual void Finish();
82 
83  static void SetAddNoise(Bool_t set = kTRUE) {
84  set ? SETBIT(fConfig, kNoise) : CLRBIT(fConfig, kNoise);
85  }
86  static void SetUseFASP(Bool_t set = kTRUE) {
87  set ? SETBIT(fConfig, kFASP) : CLRBIT(fConfig, kFASP);
88  }
89  static void SetTimeBased(Bool_t set = kTRUE) {
90  set ? SETBIT(fConfig, kTime) : CLRBIT(fConfig, kTime);
91  }
92  static void SetWeightedDist(Bool_t set = kTRUE) {
93  set ? SETBIT(fConfig, kWeightDistance) : CLRBIT(fConfig, kWeightDistance);
94  }
95 
96 private:
99 
103  void FlushBuffers();
109  CbmTrdModuleSim* AddModule(Int_t detId);
113  void ResetCounters();
114 
116  virtual void ResetArrays();
117 
118  static Int_t
120 
121  // event info
122  Double_t fLastEventTime;
123 
124  // counters
125  Int_t fpoints;
127 
128  Float_t fEfficiency;
129 
130  TClonesArray* fPoints;
131  TClonesArray* fTracks;
132  std::vector<CbmTrdDigi>* fDigis;
133  std::vector<CbmMatch>* fDigiMatches;
134 
141 
144 
145  //CbmTrdGeoHandler *fGeoHandler;///< helper to decript geoManager path into proper module type
146  std::map<Int_t, CbmTrdModuleSim*>
148 
149  // Temporary storage for digis.
150  std::map<Int_t, std::pair<CbmTrdDigi*, CbmMatch*>> fDigiMap;
151 
153 };
154 #endif // CBMTRDDIGITIZER_H_
CbmTrdDigitizer::fGeoPar
CbmTrdParSetGeo * fGeoPar
parameter list for geometry definitions
Definition: CbmTrdDigitizer.h:139
CbmTrdDigitizer::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
Definition: CbmTrdDigitizer.cxx:140
CbmTrdDigitizer::fRadiator
CbmTrdRadiator * fRadiator
parametrization of radiator TR yield
Definition: CbmTrdDigitizer.h:140
CbmTrdDigitizer::FlushBuffers
void FlushBuffers()
Flush local digi buffers to CbmDaqBuffer.
Definition: CbmTrdDigitizer.cxx:260
CbmTrdDigitizer::SetUseFASP
static void SetUseFASP(Bool_t set=kTRUE)
Definition: CbmTrdDigitizer.h:86
CbmTrdDigitizer::fTracks
TClonesArray * fTracks
MC Track information.
Definition: CbmTrdDigitizer.h:131
CbmTrdDigitizer::fConfig
static Int_t fConfig
Configuration map for the digitizer. See CbmTrdSimDef for details.
Definition: CbmTrdDigitizer.h:119
CbmTrdParSetGas
Describe TRD module working settings (HV, etc)
Definition: CbmTrdParSetGas.h:15
CbmTrdDigitizer::fPoints
TClonesArray * fPoints
Trd MC points.
Definition: CbmTrdDigitizer.h:130
CbmTrdDigitizer::fEfficiency
Float_t fEfficiency
Digi production efficiency [0..1].
Definition: CbmTrdDigitizer.h:128
CbmTrdDigitizer::fDigiMap
std::map< Int_t, std::pair< CbmTrdDigi *, CbmMatch * > > fDigiMap
Definition: CbmTrdDigitizer.h:150
CbmTrdParSetAsic
Describe TRD module ASIC settings (electronic gain, delays, etc)
Definition: CbmTrdParSetAsic.h:18
CbmTrdDigitizer::ClassDef
ClassDef(CbmTrdDigitizer, 1)
CbmTrdDigitizer::fDigiPar
CbmTrdParSetDigi * fDigiPar
parameter list for read-out geometry
Definition: CbmTrdDigitizer.h:137
CbmTrdDigitizer::ResetCounters
void ResetCounters()
Recursive reset all private monitoring counters.
Definition: CbmTrdDigitizer.cxx:400
CbmTrdDigitizer::kTime
@ kTime
select Time based/Event by event simulations
Definition: CbmTrdDigitizer.h:39
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmTrdDigitizer::fAsicPar
CbmTrdParSetAsic * fAsicPar
parameter list for ASIC characterization
Definition: CbmTrdDigitizer.h:135
CbmMatch.h
CbmTrdDigitizer::fModuleMap
std::map< Int_t, CbmTrdModuleSim * > fModuleMap
list of modules being processed
Definition: CbmTrdDigitizer.h:147
CbmTrdModuleSim
Abstract class for module wise digitization and raw format producing.
Definition: CbmTrdModuleSim.h:18
CbmTrdDigitizer::SetWeightedDist
static void SetWeightedDist(Bool_t set=kTRUE)
Definition: CbmTrdDigitizer.h:92
CbmTrdDigitizer::SetAddNoise
static void SetAddNoise(Bool_t set=kTRUE)
Definition: CbmTrdDigitizer.h:83
CbmTrdDigitizer::fDigis
std::vector< CbmTrdDigi > * fDigis
Output CbmTrdDigi array.
Definition: CbmTrdDigitizer.h:132
CbmTrdParSetGain
Definition: CbmTrdParSetGain.h:16
CbmTrdDigi.h
CbmTrdDigitizer::fDigiMatches
std::vector< CbmMatch > * fDigiMatches
Output CbmMatch array.
Definition: CbmTrdDigitizer.h:133
CbmTrdDigitizer::fQA
CbmTrdCheckUtil * fQA
Definition: CbmTrdDigitizer.h:143
CbmTrdDigitizer::GetSystemId
ECbmModuleId GetSystemId() const
Detector system ID.
Definition: CbmTrdDigitizer.h:61
CbmTrdDigitizer::CbmTrdSimDef
CbmTrdSimDef
Definition: CbmTrdDigitizer.h:38
CbmDigitize
Base class template for CBM digitisation tasks.
Definition: CbmDigitize.h:39
CbmTrdDigitizer::operator=
CbmTrdDigitizer & operator=(const CbmTrdDigitizer &)
CbmTrdDigitizer::ResetArrays
virtual void ResetArrays()
Clear data arrays.
Definition: CbmTrdDigitizer.cxx:412
CbmTrdDigitizer::UseWeightedDist
static Bool_t UseWeightedDist()
Definition: CbmTrdDigitizer.h:57
CbmTrdDigitizer::CbmTrdDigitizer
CbmTrdDigitizer(CbmTrdRadiator *radiator=NULL)
Constructor.
Definition: CbmTrdDigitizer.cxx:54
CbmTrdDigitizer::kFASP
@ kFASP
use FASP ASIC for triangular pad plane geometry
Definition: CbmTrdDigitizer.h:42
CbmTrdDigitizer::CbmTrdDigitizer
CbmTrdDigitizer(const CbmTrdDigitizer &)
CbmTrdDigitizer::fpoints
Int_t fpoints
Definition: CbmTrdDigitizer.h:125
CbmTrdDigitizer::kNoise
@ kNoise
switch noise digits generation
Definition: CbmTrdDigitizer.h:40
CbmTrdDigitizer::nofBackwardTracks
Int_t nofBackwardTracks
Definition: CbmTrdDigitizer.h:126
CbmTrdDigitizer::kWeightDistance
@ kWeightDistance
use weighting distance for link generation
Definition: CbmTrdDigitizer.h:41
CbmTrdDigitizer::fConverter
CbmTrdRawToDigiR * fConverter
Definition: CbmTrdDigitizer.h:142
CbmTrdDigitizer::UseFASP
static Bool_t UseFASP()
Definition: CbmTrdDigitizer.h:58
CbmTrdParSetGeo
Definition: CbmTrdParSetGeo.h:9
CbmTrdRadiator
Definition: CbmTrdRadiator.h:24
CbmTrdDigitizer
Definition: CbmTrdDigitizer.h:36
CbmTrdDigitizer::AddModule
CbmTrdModuleSim * AddModule(Int_t detId)
Create module for current MC point.
Definition: CbmTrdDigitizer.cxx:297
CbmTrdDigitizer::fGasPar
CbmTrdParSetGas * fGasPar
parameter list for HV status
Definition: CbmTrdDigitizer.h:136
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmTrdDigitizer::IsTimeBased
static Bool_t IsTimeBased()
Definition: CbmTrdDigitizer.h:56
CbmTrdDigitizer::fLastEventTime
Double_t fLastEventTime
time of last event [ns]
Definition: CbmTrdDigitizer.h:122
CbmTrdRawToDigiR
Definition: CbmTrdRawToDigiR.h:17
CbmTrdCheckUtil
Definition: CbmTrdCheckUtil.h:19
CbmTrdDigitizer::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmTrdDigitizer.cxx:97
CbmTrdDigitizer::fGainPar
CbmTrdParSetGain * fGainPar
parameter list for keV->ADC gain conversion
Definition: CbmTrdDigitizer.h:138
CbmTrdDigitizer::~CbmTrdDigitizer
virtual ~CbmTrdDigitizer()
Destructor.
Definition: CbmTrdDigitizer.cxx:81
CbmTrdParSetDigi
Definition: CbmTrdParSetDigi.h:15
CbmTrdDigitizer::AddNoise
static Bool_t AddNoise()
Definition: CbmTrdDigitizer.h:55
CbmTrdDigitizer::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmTrdDigitizer.cxx:110
CbmTrdRawToDigiR.h
CbmDigitize.h
CbmTrdDigitizer::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmTrdDigitizer.cxx:285
CbmTrdCheckUtil.h
CbmDefs.h
CbmTrdDigitizer::SetTimeBased
static void SetTimeBased(Bool_t set=kTRUE)
Definition: CbmTrdDigitizer.h:89