CbmRoot
CbmRichDigitizer.h
Go to the documentation of this file.
1 
10 #ifndef CBM_RICH_DIGITIZER
11 #define CBM_RICH_DIGITIZER
12 
13 #include "CbmDefs.h"
14 #include "CbmDigitize.h"
15 #include "CbmRichDigi.h"
16 #include "CbmRichPmt.h"
17 #include "CbmRichPmtType.h"
18 #include <map>
19 
20 class TClonesArray;
21 //class CbmRichDigi;
22 class CbmRichPoint;
23 class CbmLink;
24 
25 using namespace std;
26 
27 
36 class CbmRichDigitizer : public CbmDigitize<CbmRichDigi> {
37 public:
42 
46  virtual ~CbmRichDigitizer();
47 
48 
53 
54 
58  virtual InitStatus Init();
59 
63  virtual void Exec(Option_t* option);
64 
68  virtual void Finish();
69 
73  void SetCrossTalkProbability(Double_t crosstalk) {
74  fCrossTalkProbability = crosstalk;
75  }
76 
80  void SetDetectorType(CbmRichPmtTypeEnum detType) { fDetectorType = detType; }
81 
86  void SetNoiseDigiRate(Double_t noise) { fNoiseDigiRate = noise; }
87 
91  void SetCollectionEfficiency(Double_t collEff) {
92  fPmt.SetCollectionEfficiency(collEff);
93  }
94 
98  //void SetSigmaMirror(Double_t sigMirror) {fSigmaMirror = sigMirror;}
99 
103  void SetTimeResolution(Double_t dt) { fTimeResolution = dt; }
104 
105 
109  void SetPixelDeadTime(Double_t dt) { fPixelDeadTime = dt; }
110 
114  void SetMaxNofHitsPerPmtCut(Double_t nofHits) {
115  fMaxNofHitsPerPmtCut = nofHits;
116  }
117 
121  void SetDoZShift(Bool_t doZShift) { fDoZShift = doZShift; }
122 
123 
124 private:
125  Int_t fEventNum;
126 
127  TClonesArray* fRichPoints; // RICH MC points
128  TClonesArray* fRichDigis; // RICH digis (output array)
129  TClonesArray* fRichDigiMatches; // RICH digi matches (output array)
130  TClonesArray* fMcTracks; // Monte-Carlo tracks
131 
132  Double_t fNofPoints; // total number of MCPoints processed
133  Double_t fNofDigis; // total number of digis created
134  Double_t fTimeTot; // sum of execution time
135 
137  Double_t
138  fCrossTalkProbability; // probability of the crosstalk for direct neighbor for one pixel
139  Double_t
140  fNoiseDigiRate; // noise rate per McRichPoint / per pixel / per second :
141  // hofNoiseDigis = nofRichPoints * nofPixels * dT(50 ns) * (fNoiseDigiRate / 1.e9);
143  Int_t
144  fMaxNofHitsPerPmtCut; // maximum number of hits which can be registered per PMT per event.
145  // If more then the whole PMT is skipped
146 
147  map<Int_t, pair<CbmRichDigi*, CbmMatch*>> fDataMap;
148 
149  Double_t fTimeResolution; // in ns
150  Double_t fDarkRatePerPixel; // dark rate per pixel in Hz
151  Double_t fPixelDeadTime; // in ns, during this time pixel can not be fired
152  map<Int_t, Double_t>
153  fFiredPixelsMap; // first: pixel address, second: last fired time.
154  Bool_t
155  fDoZShift; // Set if you want to shift z MC point value (workaround for GEANT4). Must be set to true if one runs full RICH geoemtry with GEANT4, fot mCBM set to false
156 
157  /*
158  * \brief Add crasstalk digis to the output array for the digi assuming fCrossTalkProbability
159  */
160  void AddCrossTalkDigis(CbmRichDigi* digi);
161 
162  /*
163  * \brief Add fNofNoiseDigis number of digis.
164  */
165  void AddNoiseDigis(Int_t eventNum, Int_t inputNum);
166 
167  /*
168  * \brief Process CbmRichPoint. Main method which is calle dfor all CbmRichPoints.
169  */
170  void ProcessPoint(CbmRichPoint* point,
171  Int_t pointId,
172  Int_t eventNum,
173  Int_t inputNum);
174 
175  /*
176  * \brief Add all the fired digis to the output array
177  * \@value Number of digis written
178  */
179  Int_t AddDigisToOutputArray();
180 
181  /*
182  * \brief Process current MC event.
183  * \value Number of processed RichPoints
184  */
185  Int_t ProcessMcEvent();
186 
187  /*
188  * \brief Generate noise between events.
189  */
190  void GenerateNoiseBetweenEvents(Double_t oldEventTime, Double_t newEventTime);
191 
192  /*
193  *
194  */
195  void AddDigi(Int_t address, Double_t time, const CbmLink& link);
196 
197 
202 
207 
208  ClassDef(CbmRichDigitizer, 2)
209 };
210 
211 #endif
CbmRichDigitizer::SetCollectionEfficiency
void SetCollectionEfficiency(Double_t collEff)
Set collection efficiency for photoelectrons in PMT optics.
Definition: CbmRichDigitizer.h:91
CbmRichDigitizer::SetMaxNofHitsPerPmtCut
void SetMaxNofHitsPerPmtCut(Double_t nofHits)
Set Maximum nimber of hits per PMT cut.
Definition: CbmRichDigitizer.h:114
CbmRichDigitizer::fDetectorType
CbmRichPmtTypeEnum fDetectorType
Definition: CbmRichDigitizer.h:142
CbmRichDigitizer::SetDoZShift
void SetDoZShift(Bool_t doZShift)
Set if you want to shift z MC point value (workaround for GEANT4).
Definition: CbmRichDigitizer.h:121
CbmRichDigitizer::CbmRichDigitizer
CbmRichDigitizer(const CbmRichDigitizer &)
Copy constructor.
CbmRichDigi
Definition: CbmRichDigi.h:25
CbmRichPmt
Definition: CbmRichPmt.h:38
CbmRichDigitizer::fPixelDeadTime
Double_t fPixelDeadTime
Definition: CbmRichDigitizer.h:151
CbmRichDigitizer::SetCrossTalkProbability
void SetCrossTalkProbability(Double_t crosstalk)
Set crosstalk probability.
Definition: CbmRichDigitizer.h:73
CbmRichDigitizer::fPmt
CbmRichPmt fPmt
Definition: CbmRichDigitizer.h:136
CbmRichDigitizer::fFiredPixelsMap
map< Int_t, Double_t > fFiredPixelsMap
Definition: CbmRichDigitizer.h:153
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmRichDigitizer::fMaxNofHitsPerPmtCut
Int_t fMaxNofHitsPerPmtCut
Definition: CbmRichDigitizer.h:144
CbmRichDigitizer::fDataMap
map< Int_t, pair< CbmRichDigi *, CbmMatch * > > fDataMap
Definition: CbmRichDigitizer.h:147
CbmRichDigitizer::fMcTracks
TClonesArray * fMcTracks
Definition: CbmRichDigitizer.h:130
CbmRichDigi.h
CbmRichDigitizer::fNoiseDigiRate
Double_t fNoiseDigiRate
Definition: CbmRichDigitizer.h:140
CbmRichDigitizer::operator=
CbmRichDigitizer & operator=(const CbmRichDigitizer &)
Assignment operator.
CbmRichDigitizer::fNofPoints
Double_t fNofPoints
Definition: CbmRichDigitizer.h:132
CbmRichDigitizer::fTimeResolution
Double_t fTimeResolution
Definition: CbmRichDigitizer.h:149
CbmRichDigitizer::SetNoiseDigiRate
void SetNoiseDigiRate(Double_t noise)
noise rate per McRichPoint / per pixel / per second : hofNoiseDigis = nofRichPoints * nofPixels * dT(...
Definition: CbmRichDigitizer.h:86
CbmRichDigitizer::fDarkRatePerPixel
Double_t fDarkRatePerPixel
Definition: CbmRichDigitizer.h:150
CbmRichPmtTypeEnum
CbmRichPmtTypeEnum
Definition: CbmRichPmtType.h:11
CbmRichDigitizer::fCrossTalkProbability
Double_t fCrossTalkProbability
Definition: CbmRichDigitizer.h:138
CbmRichDigitizer::fRichDigiMatches
TClonesArray * fRichDigiMatches
Definition: CbmRichDigitizer.h:129
CbmDigitize
Base class template for CBM digitisation tasks.
Definition: CbmDigitize.h:39
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmRichDigitizer::fEventNum
Int_t fEventNum
Definition: CbmRichDigitizer.h:125
CbmRichDigitizer::fDoZShift
Bool_t fDoZShift
Definition: CbmRichDigitizer.h:155
CbmRichDigitizer
Class for producing RICH digis from from MCPoints.
Definition: CbmRichDigitizer.h:36
CbmRichDigitizer::SetDetectorType
void SetDetectorType(CbmRichPmtTypeEnum detType)
Set detector type.
Definition: CbmRichDigitizer.h:80
CbmRichDigitizer::SetTimeResolution
void SetTimeResolution(Double_t dt)
Set additional smearing of MC Points due to light scattering in mirror.
Definition: CbmRichDigitizer.h:103
CbmRichPmt.h
CbmRichDigitizer::fTimeTot
Double_t fTimeTot
Definition: CbmRichDigitizer.h:134
CbmRichDigitizer::fRichDigis
TClonesArray * fRichDigis
Definition: CbmRichDigitizer.h:128
CbmRichDigitizer::fRichPoints
TClonesArray * fRichPoints
Definition: CbmRichDigitizer.h:127
CbmRichDigitizer::GetSystemId
ECbmModuleId GetSystemId() const
Detector system ID.
Definition: CbmRichDigitizer.h:52
CbmRichPoint
Definition: CbmRichPoint.h:24
CbmRichPmtType.h
CbmRichDigitizer::fNofDigis
Double_t fNofDigis
Definition: CbmRichDigitizer.h:133
CbmDigitize.h
CbmRichDigitizer::SetPixelDeadTime
void SetPixelDeadTime(Double_t dt)
Set Pixel dead time.
Definition: CbmRichDigitizer.h:109
CbmDefs.h