CbmRoot
CbmMvdSensorDigitizerTBTask.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // ----- CbmMvdSensorDigitizerTBTask header file -----
3 // ----- Created 02/02/12 by M. Deveaux -----
4 // ------------------------------------------------------------------------
5 
13 #ifndef CBMMVDSENSORDIGITIZERTBTASK_H
14 #define CBMMVDSENSORDIGITIZERTBTASK_H 1
15 
16 
17 #include "CbmMvdSensor.h"
18 #include "FairTask.h"
19 //#include "omp.h"
20 #include "CbmMatch.h"
21 #include "CbmMvdDigi.h"
22 #include "CbmMvdPileupManager.h"
23 #include "CbmMvdPoint.h"
24 #include "CbmMvdSensorTask.h"
25 #include "FairTask.h"
26 
27 #include "CbmMvdPixelCharge.h"
28 #include "TCanvas.h"
29 #include "TH1.h"
30 #include "TH1F.h"
31 #include "TH2.h"
32 #include "TH2F.h"
33 #include "TMath.h"
34 #include "TObjArray.h"
35 #include "TRandom3.h"
36 #include "TRefArray.h"
37 #include "TStopwatch.h"
38 #include "TString.h"
39 #include <list>
40 #include <map>
41 #include <utility>
42 #include <vector>
43 
44 class TClonesArray;
45 
46 
48 
49 public:
52 
55 
57  virtual void InitTask(CbmMvdSensor* mySensor);
58 
60  void SetInputArray(TClonesArray* inputStream);
61  virtual void SetInput(CbmMvdPoint* point);
62 
64  void Exec();
65  void ExecChain();
66 
67  TClonesArray* GetOutputArray() { return fOutputBuffer; };
68  TClonesArray* GetMatchArray() { return fDigiMatch; };
69  TClonesArray* GetWriteArray() { return fDigis; };
70 
71  InitStatus ReadSensorInformation();
73  void ProducePixelCharge(CbmMvdPoint* point);
74 
76  void SetSegmentLength(Double_t segmentLength) {
77  fSegmentLength = segmentLength;
78  }
79  void SetDiffusionCoef(Double_t diffCoeff) {
80  fDiffusionCoefficient = diffCoeff;
81  }
82  void SetElectronsPerKeV(Double_t electronsPerKeV) {
83  fElectronsPerKeV = electronsPerKeV;
84  }
85  void SetWidthOfCluster(Double_t widthOfCluster) {
86  fWidthOfCluster = widthOfCluster;
87  }
88  void SetCutOnDeltaRays(Double_t cutOnDeltaRays) {
89  fCutOnDeltaRays = cutOnDeltaRays;
90  }
91  void SetChargeThreshold(Float_t chargeThreshold) {
92  fChargeThreshold = chargeThreshold;
93  }
94 
95  void GetEventInfo(Int_t& inputNr, Int_t& eventNr, Double_t& eventTime);
96 
97 private:
98  Double_t fEpiTh;
99  Double_t fSegmentLength;
100 
103  Double_t fWidthOfCluster;
104  Double_t fPixelSizeX;
105  Double_t fPixelSizeY;
106  Double_t fCutOnDeltaRays;
108  Double_t fFanoSilicium;
109 
110  Double_t fEsum;
111  Double_t fSegmentDepth;
116 
117  Double_t fLorentzY0;
118  Double_t fLorentzXc;
119  Double_t fLorentzW;
120  Double_t fLorentzA;
121  Double_t fLorentzNorm;
122 
123  Double_t fLandauMPV;
124  Double_t fLandauSigma;
125  Double_t fLandauGain;
126  TRandom3* fLandauRandom;
127 
128  Double_t fPixelSize;
129  Double_t fPar0;
130  Double_t fPar1;
131  Double_t fPar2;
132 
133  Double_t fCompression;
134 
137 
140  Int_t fEvent;
141  Int_t fVolumeId;
142  Int_t fNPixelsX;
143  Int_t fNPixelsY;
144 
145  TClonesArray* fPixelCharge;
146 
147  TClonesArray* fDigis;
148 
149  TClonesArray* fDigiMatch;
150 
151  TRandom3* frand;
153 
154  std::vector<CbmMvdPixelCharge*> fPixelChargeShort;
155 
157  std::map<std::pair<std::pair<Int_t, Int_t>, Double_t>, CbmMvdPixelCharge*>
159  std::map<std::pair<std::pair<Int_t, Int_t>, Double_t>,
161 
162 
164 
166  Double_t fSigmaX, fSigmaY; // MAPS resolution in [cm]
167  Double_t fReadoutTime; // MAPS readout time in [s]
168  Double_t fEfficiency; // MAPS detection efficiency
169  Double_t fMergeDist; // Merging distance
170  Double_t fFakeRate; // Fake hit rate
171 
173  TClonesArray* fInputPoints; // Array of MCPoints (input)
174 
176  TRandom3 fRandGen;
177  TStopwatch fTimer;
178 
180  Int_t fNEvents;
181  Double_t fNPoints;
182  Double_t fNReal;
183  Double_t fNBg;
184  Double_t fNFake;
185  Double_t fNLost;
186  Double_t fNMerged;
187  Double_t fTime;
188  Double_t fReadoutLast;
189  Double_t fReadoutCurrent;
190  Double_t fReadoutNext;
191 
192  // ----- Private methods ---------------------------------------------
193 
194  struct SignalPoint {
195  double x;
196  double y;
197  double z;
198  double sigmaX;
199  double sigmaY;
200  double charge;
201  double eloss;
202  };
203 
204 
205  typedef std::vector<SignalPoint> SignalPointVec;
206 
208 
210  virtual void ReInit(CbmMvdSensor* mySensor);
211 
212 
214  virtual void Finish();
215 
216 
218  void Register();
219 
220 
222  void Reset();
223 
224 
226  void PrintParameters();
227 
228 
232  Int_t GetMvdGeometry();
233 
236 
238 };
239 
240 
241 #endif
CbmMvdSensorDigitizerTBTask::fNEvents
Int_t fNEvents
Definition: CbmMvdSensorDigitizerTBTask.h:180
CbmMvdSensorDigitizerTBTask::fNPoints
Double_t fNPoints
Definition: CbmMvdSensorDigitizerTBTask.h:181
CbmMvdSensorDigitizerTBTask::SetCutOnDeltaRays
void SetCutOnDeltaRays(Double_t cutOnDeltaRays)
Definition: CbmMvdSensorDigitizerTBTask.h:88
CbmMvdSensorDigitizerTBTask::ClassDef
ClassDef(CbmMvdSensorDigitizerTBTask, 1)
CbmMvdSensorDigitizerTBTask::fDiffusionCoefficient
Double_t fDiffusionCoefficient
Definition: CbmMvdSensorDigitizerTBTask.h:101
CbmMvdSensorDigitizerTBTask::frand
TRandom3 * frand
Definition: CbmMvdSensorDigitizerTBTask.h:151
CbmMvdSensorDigitizerTBTask::SetWidthOfCluster
void SetWidthOfCluster(Double_t widthOfCluster)
Definition: CbmMvdSensorDigitizerTBTask.h:85
CbmMvdSensorDigitizerTBTask::SignalPoint::y
double y
Definition: CbmMvdSensorDigitizerTBTask.h:196
CbmMvdSensorDigitizerTBTask::GetEventInfo
void GetEventInfo(Int_t &inputNr, Int_t &eventNr, Double_t &eventTime)
Definition: CbmMvdSensorDigitizerTBTask.cxx:341
CbmMvdSensorDigitizerTBTask::fSigmaX
Double_t fSigmaX
Definition: CbmMvdSensorDigitizerTBTask.h:166
CbmMvdSensorDigitizerTBTask::fDigis
TClonesArray * fDigis
Definition: CbmMvdSensorDigitizerTBTask.h:147
CbmMvdSensorDigitizerTBTask::fResolutionHistoY
TH1F * fResolutionHistoY
Definition: CbmMvdSensorDigitizerTBTask.h:136
CbmMvdSensorDigitizerTBTask::SetChargeThreshold
void SetChargeThreshold(Float_t chargeThreshold)
Definition: CbmMvdSensorDigitizerTBTask.h:91
CbmMvdSensorDigitizerTBTask::fNMerged
Double_t fNMerged
Definition: CbmMvdSensorDigitizerTBTask.h:186
CbmMvdDigi.h
CbmMvdSensorDigitizerTBTask::SignalPoint::sigmaY
double sigmaY
Definition: CbmMvdSensorDigitizerTBTask.h:199
CbmMvdSensorDigitizerTBTask::fPixelSizeX
Double_t fPixelSizeX
Definition: CbmMvdSensorDigitizerTBTask.h:104
CbmMvdSensorDigitizerTBTask::fFanoSilicium
Double_t fFanoSilicium
Definition: CbmMvdSensorDigitizerTBTask.h:108
CbmMvdSensorDigitizerTBTask::PrintParameters
void PrintParameters()
Definition: CbmMvdSensorDigitizerTBTask.cxx:778
CbmMvdSensorDigitizerTBTask::fCurrentParticleMass
Double_t fCurrentParticleMass
Definition: CbmMvdSensorDigitizerTBTask.h:113
CbmMvdSensorDigitizerTBTask::fSegmentDepth
Double_t fSegmentDepth
Definition: CbmMvdSensorDigitizerTBTask.h:111
CbmMvdSensorDigitizerTBTask::SignalPoint
Definition: CbmMvdSensorDigitizerTBTask.h:194
CbmMvdSensorDigitizerTBTask::fNumberOfSegments
Int_t fNumberOfSegments
Definition: CbmMvdSensorDigitizerTBTask.h:138
CbmMvdSensorDigitizerTBTask::Finish
virtual void Finish()
Definition: CbmMvdSensorDigitizerTBTask.cxx:770
CbmMvdSensorDigitizerTBTask::ProducePixelCharge
void ProducePixelCharge(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTBTask.cxx:565
CbmMvdSensorDigitizerTBTask::fCurrentLayer
Int_t fCurrentLayer
Definition: CbmMvdSensorDigitizerTBTask.h:139
CbmMvdSensorDigitizerTBTask::fElectronsPerKeV
Double_t fElectronsPerKeV
Definition: CbmMvdSensorDigitizerTBTask.h:102
CbmMvdSensorDigitizerTBTask::fLorentzW
Double_t fLorentzW
Definition: CbmMvdSensorDigitizerTBTask.h:119
CbmMvdSensorDigitizerTBTask::fEsum
Double_t fEsum
Definition: CbmMvdSensorDigitizerTBTask.h:110
CbmMvdSensor.h
CbmMvdSensorDigitizerTBTask::ReadSensorInformation
InitStatus ReadSensorInformation()
Definition: CbmMvdSensorDigitizerTBTask.cxx:185
CbmMvdSensorDigitizerTBTask::fLandauMPV
Double_t fLandauMPV
Definition: CbmMvdSensorDigitizerTBTask.h:123
CbmMvdSensorDigitizerTBTask::fChargeMapIt
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * >::iterator fChargeMapIt
Definition: CbmMvdSensorDigitizerTBTask.h:160
CbmMvdSensorDigitizerTBTask::SignalPoint::eloss
double eloss
Definition: CbmMvdSensorDigitizerTBTask.h:201
CbmMvdSensorDigitizerTBTask::fChargeMap
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * > fChargeMap
Definition: CbmMvdSensorDigitizerTBTask.h:158
CbmMvdSensorDigitizerTBTask::SetSegmentLength
void SetSegmentLength(Double_t segmentLength)
Definition: CbmMvdSensorDigitizerTBTask.h:76
CbmMvdSensorDigitizerTBTask::SetDiffusionCoef
void SetDiffusionCoef(Double_t diffCoeff)
Definition: CbmMvdSensorDigitizerTBTask.h:79
CbmMvdSensorDigitizerTBTask::fLorentzY0
Double_t fLorentzY0
Definition: CbmMvdSensorDigitizerTBTask.h:117
CbmMatch.h
CbmMvdSensorDigitizerTBTask::SetInputArray
void SetInputArray(TClonesArray *inputStream)
Definition: CbmMvdSensorDigitizerTBTask.cxx:216
CbmMvdSensorTask::fOutputBuffer
TClonesArray * fOutputBuffer
Definition: CbmMvdSensorTask.h:58
CbmMvdSensorDigitizerTBTask::fSegmentLength
Double_t fSegmentLength
Definition: CbmMvdSensorDigitizerTBTask.h:99
CbmMvdPixelCharge.h
CbmMvdSensorDigitizerTBTask::fLandauGain
Double_t fLandauGain
Definition: CbmMvdSensorDigitizerTBTask.h:125
CbmMvdSensorDigitizerTBTask::fReadoutNext
Double_t fReadoutNext
Definition: CbmMvdSensorDigitizerTBTask.h:190
CbmMvdSensorDigitizerTBTask::fLorentzA
Double_t fLorentzA
Definition: CbmMvdSensorDigitizerTBTask.h:120
CbmMvdSensorDigitizerTBTask::Reset
void Reset()
Definition: CbmMvdSensorDigitizerTBTask.cxx:774
CbmMvdSensorTask
Definition: CbmMvdSensorTask.h:26
CbmMvdSensorDigitizerTBTask::fNLost
Double_t fNLost
Definition: CbmMvdSensorDigitizerTBTask.h:185
CbmMvdSensorDigitizerTBTask::fReadoutTime
Double_t fReadoutTime
Definition: CbmMvdSensorDigitizerTBTask.h:167
CbmMvdSensorDigitizerTBTask::fLandauRandom
TRandom3 * fLandauRandom
Definition: CbmMvdSensorDigitizerTBTask.h:126
CbmMvdSensorDigitizerTBTask::CbmMvdSensorDigitizerTBTask
CbmMvdSensorDigitizerTBTask(const CbmMvdSensorDigitizerTBTask &)
CbmMvdPoint.h
CbmMvdSensorDigitizerTBTask::ExecChain
void ExecChain()
Definition: CbmMvdSensorDigitizerTBTask.cxx:237
CbmMvdSensorDigitizerTBTask::SetElectronsPerKeV
void SetElectronsPerKeV(Double_t electronsPerKeV)
Definition: CbmMvdSensorDigitizerTBTask.h:82
CbmMvdSensorDigitizerTBTask::fPixelChargeShort
std::vector< CbmMvdPixelCharge * > fPixelChargeShort
Definition: CbmMvdSensorDigitizerTBTask.h:154
CbmMvdSensor
Definition: CbmMvdSensor.h:40
CbmMvdPoint
Definition: CbmMvdPoint.h:28
CbmMvdSensorDigitizerTBTask::fNReal
Double_t fNReal
Definition: CbmMvdSensorDigitizerTBTask.h:182
CbmMvdSensorDigitizerTBTask::SignalPoint::charge
double charge
Definition: CbmMvdSensorDigitizerTBTask.h:200
CbmMvdSensorDigitizerTBTask::fCurrentParticlePdg
Int_t fCurrentParticlePdg
Definition: CbmMvdSensorDigitizerTBTask.h:115
CbmMvdSensorDigitizerTBTask::fEfficiency
Double_t fEfficiency
Definition: CbmMvdSensorDigitizerTBTask.h:168
CbmMvdPixelCharge
Definition: CbmMvdPixelCharge.h:14
CbmMvdSensorDigitizerTBTask::fWidthOfCluster
Double_t fWidthOfCluster
Definition: CbmMvdSensorDigitizerTBTask.h:103
CbmMvdSensorDigitizerTBTask::Exec
void Exec()
Definition: CbmMvdSensorDigitizerTBTask.cxx:241
CbmMvdSensorDigitizerTBTask::fRandGen
TRandom3 fRandGen
Definition: CbmMvdSensorDigitizerTBTask.h:176
CbmMvdSensorDigitizerTBTask
Definition: CbmMvdSensorDigitizerTBTask.h:47
CbmMvdSensorDigitizerTBTask::fTimer
TStopwatch fTimer
Definition: CbmMvdSensorDigitizerTBTask.h:177
CbmMvdSensorDigitizerTBTask::fNFake
Double_t fNFake
Definition: CbmMvdSensorDigitizerTBTask.h:184
CbmMvdSensorDigitizerTBTask::fFakeRate
Double_t fFakeRate
Definition: CbmMvdSensorDigitizerTBTask.h:170
CbmMvdSensorDigitizerTBTask::fSignalPoints
SignalPointVec fSignalPoints
Definition: CbmMvdSensorDigitizerTBTask.h:207
CbmMvdSensorDigitizerTBTask::SignalPoint::x
double x
Definition: CbmMvdSensorDigitizerTBTask.h:195
CbmMvdSensorDigitizerTBTask::fNPixelsX
Int_t fNPixelsX
Definition: CbmMvdSensorDigitizerTBTask.h:142
CbmMvdSensorDigitizerTBTask::GetMvdGeometry
Int_t GetMvdGeometry()
CbmMvdSensorDigitizerTBTask::fCutOnDeltaRays
Double_t fCutOnDeltaRays
Definition: CbmMvdSensorDigitizerTBTask.h:106
CbmMvdSensorDigitizerTBTask::SignalPoint::sigmaX
double sigmaX
Definition: CbmMvdSensorDigitizerTBTask.h:198
CbmMvdSensorDigitizerTBTask::fNBg
Double_t fNBg
Definition: CbmMvdSensorDigitizerTBTask.h:183
CbmMvdSensorDigitizerTBTask::fMergeDist
Double_t fMergeDist
Definition: CbmMvdSensorDigitizerTBTask.h:169
CbmMvdSensorDigitizerTBTask::fInputPoints
TClonesArray * fInputPoints
Definition: CbmMvdSensorDigitizerTBTask.h:173
CbmMvdSensorDigitizerTBTask::SetInput
virtual void SetInput(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTBTask.cxx:229
CbmMvdSensorDigitizerTBTask::CbmMvdSensorDigitizerTBTask
CbmMvdSensorDigitizerTBTask()
Definition: CbmMvdSensorDigitizerTBTask.cxx:56
CbmMvdSensorDigitizerTBTask::fPar1
Double_t fPar1
Definition: CbmMvdSensorDigitizerTBTask.h:130
CbmMvdSensorDigitizerTBTask::GetMatchArray
TClonesArray * GetMatchArray()
Definition: CbmMvdSensorDigitizerTBTask.h:68
CbmMvdSensorDigitizerTBTask::fVolumeId
Int_t fVolumeId
Definition: CbmMvdSensorDigitizerTBTask.h:141
CbmMvdSensorDigitizerTBTask::fLandauSigma
Double_t fLandauSigma
Definition: CbmMvdSensorDigitizerTBTask.h:124
CbmMvdSensorDigitizerTBTask::fReadoutCurrent
Double_t fReadoutCurrent
Definition: CbmMvdSensorDigitizerTBTask.h:189
CbmMvdSensorDigitizerTBTask::fsensorDataSheet
CbmMvdSensorDataSheet * fsensorDataSheet
Definition: CbmMvdSensorDigitizerTBTask.h:163
CbmMvdSensorDigitizerTBTask::GetWriteArray
TClonesArray * GetWriteArray()
Definition: CbmMvdSensorDigitizerTBTask.h:69
CbmMvdSensorDigitizerTBTask::ProduceIonisationPoints
void ProduceIonisationPoints(CbmMvdPoint *point)
Definition: CbmMvdSensorDigitizerTBTask.cxx:366
CbmMvdSensorDigitizerTBTask::ReInit
virtual void ReInit(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorDigitizerTBTask.cxx:761
CbmMvdSensorDigitizerTBTask::fNPixelsY
Int_t fNPixelsY
Definition: CbmMvdSensorDigitizerTBTask.h:143
CbmMvdSensorDigitizerTBTask::fEpiTh
Double_t fEpiTh
Definition: CbmMvdSensorDigitizerTBTask.h:98
CbmMvdSensorDigitizerTBTask::fReadoutLast
Double_t fReadoutLast
Definition: CbmMvdSensorDigitizerTBTask.h:188
CbmMvdSensorDigitizerTBTask::fPixelScanAccelerator
TObjArray * fPixelScanAccelerator
Definition: CbmMvdSensorDigitizerTBTask.h:156
CbmMvdSensorDigitizerTBTask::fPar2
Double_t fPar2
Definition: CbmMvdSensorDigitizerTBTask.h:131
CbmMvdSensorDigitizerTBTask::fPixelSize
Double_t fPixelSize
Definition: CbmMvdSensorDigitizerTBTask.h:128
CbmMvdSensorDigitizerTBTask::fCompression
Double_t fCompression
Definition: CbmMvdSensorDigitizerTBTask.h:133
CbmMvdSensorDigitizerTBTask::fPar0
Double_t fPar0
Definition: CbmMvdSensorDigitizerTBTask.h:129
CbmMvdSensorDigitizerTBTask::fLorentzNorm
Double_t fLorentzNorm
Definition: CbmMvdSensorDigitizerTBTask.h:121
CbmMvdPileupManager.h
CbmMvdSensorDigitizerTBTask::fPixelSizeY
Double_t fPixelSizeY
Definition: CbmMvdSensorDigitizerTBTask.h:105
CbmMvdSensorDigitizerTBTask::GetOutputArray
TClonesArray * GetOutputArray()
Definition: CbmMvdSensorDigitizerTBTask.h:67
CbmMvdSensorDigitizerTBTask::SignalPoint::z
double z
Definition: CbmMvdSensorDigitizerTBTask.h:197
CbmMvdSensorDigitizerTBTask::fproduceNoise
Bool_t fproduceNoise
Definition: CbmMvdSensorDigitizerTBTask.h:152
CbmMvdSensorDigitizerTBTask::fLorentzXc
Double_t fLorentzXc
Definition: CbmMvdSensorDigitizerTBTask.h:118
CbmMvdSensorDigitizerTBTask::fSigmaY
Double_t fSigmaY
Definition: CbmMvdSensorDigitizerTBTask.h:166
CbmMvdSensorDigitizerTBTask::fCurrentParticleMomentum
Double_t fCurrentParticleMomentum
Definition: CbmMvdSensorDigitizerTBTask.h:114
CbmMvdSensorTask.h
CbmMvdSensorDigitizerTBTask::InitTask
virtual void InitTask(CbmMvdSensor *mySensor)
Definition: CbmMvdSensorDigitizerTBTask.cxx:732
CbmMvdSensorDigitizerTBTask::SignalPointVec
std::vector< SignalPoint > SignalPointVec
Definition: CbmMvdSensorDigitizerTBTask.h:205
CbmMvdSensorDigitizerTBTask::fTime
Double_t fTime
Definition: CbmMvdSensorDigitizerTBTask.h:187
CbmMvdSensorDigitizerTBTask::~CbmMvdSensorDigitizerTBTask
virtual ~CbmMvdSensorDigitizerTBTask()
Definition: CbmMvdSensorDigitizerTBTask.cxx:171
CbmMvdSensorDigitizerTBTask::Register
void Register()
CbmMvdSensorDigitizerTBTask::fResolutionHistoX
TH1F * fResolutionHistoX
Definition: CbmMvdSensorDigitizerTBTask.h:135
CbmMvdSensorDigitizerTBTask::fCurrentTotalCharge
Double_t fCurrentTotalCharge
Definition: CbmMvdSensorDigitizerTBTask.h:112
CbmMvdSensorDigitizerTBTask::fEvent
Int_t fEvent
Definition: CbmMvdSensorDigitizerTBTask.h:140
CbmMvdSensorDigitizerTBTask::fDigiMatch
TClonesArray * fDigiMatch
Definition: CbmMvdSensorDigitizerTBTask.h:149
CbmMvdSensorDigitizerTBTask::fChargeThreshold
Float_t fChargeThreshold
Definition: CbmMvdSensorDigitizerTBTask.h:107
CbmMvdSensorDigitizerTBTask::fPixelCharge
TClonesArray * fPixelCharge
Definition: CbmMvdSensorDigitizerTBTask.h:145
CbmMvdSensorDataSheet
Definition: CbmMvdSensorDataSheet.h:22
CbmMvdSensorDigitizerTBTask::operator=
CbmMvdSensorDigitizerTBTask operator=(const CbmMvdSensorDigitizerTBTask &)