CbmRoot
Loading...
Searching...
No Matches
CbmMvdSensorDigitizerTBTask.h
Go to the documentation of this file.
1/* Copyright (C) 2017 Institut fuer Kernphysik, Goethe-Universitaet Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Michael Deveaux, Philipp Sitzmann [committer] */
4
5// ------------------------------------------------------------------------
6// ----- CbmMvdSensorDigitizerTBTask header file -----
7// ----- Created 02/02/12 by M. Deveaux -----
8// ------------------------------------------------------------------------
9
17#ifndef CBMMVDSENSORDIGITIZERTBTASK_H
18#define CBMMVDSENSORDIGITIZERTBTASK_H 1
19
20
21#include "CbmMvdSensor.h"
22
23#include "FairTask.h"
24//#include "omp.h"
25#include "CbmMatch.h"
26#include "CbmMvdDigi.h"
27#include "CbmMvdPileupManager.h"
28#include "CbmMvdPixelCharge.h"
29#include "CbmMvdPoint.h"
30#include "CbmMvdSensorTask.h"
31
32#include "FairTask.h"
33
34#include "TCanvas.h"
35#include "TH1.h"
36#include "TH1F.h"
37#include "TH2.h"
38#include "TH2F.h"
39#include "TMath.h"
40#include "TObjArray.h"
41#include "TRandom3.h"
42#include "TRefArray.h"
43#include "TStopwatch.h"
44#include "TString.h"
45
46#include <list>
47#include <map>
48#include <utility>
49#include <vector>
50
51class TClonesArray;
52
53
55
56public:
59
62
64 virtual void InitTask(CbmMvdSensor* mySensor);
65
67 void SetInputArray(TClonesArray* inputStream);
68
70 void Exec();
71 void ExecChain();
72
73 TClonesArray* GetOutputArray() { return fOutputBuffer; };
74 TClonesArray* GetMatchArray() { return fDigiMatch; };
75 TClonesArray* GetWriteArray() { return fDigis; };
76
77 InitStatus ReadSensorInformation();
80
82 void SetSegmentLength(Double_t segmentLength) { fSegmentLength = segmentLength; }
83 void SetDiffusionCoef(Double_t diffCoeff) { fDiffusionCoefficient = diffCoeff; }
84 void SetElectronsPerKeV(Double_t electronsPerKeV) { fElectronsPerKeV = electronsPerKeV; }
85 void SetWidthOfCluster(Double_t widthOfCluster) { fWidthOfCluster = widthOfCluster; }
86 void SetCutOnDeltaRays(Double_t cutOnDeltaRays) { fCutOnDeltaRays = cutOnDeltaRays; }
87 void SetChargeThreshold(Float_t chargeThreshold) { fChargeThreshold = chargeThreshold; }
88
89 void GetEventInfo(Int_t& inputNr, Int_t& eventNr, Double_t& eventTime);
90
91private:
92 Double_t fEpiTh;
94
98 Double_t fPixelSizeX;
99 Double_t fPixelSizeY;
103
104 Double_t fEsum;
110
111 Double_t fLorentzY0;
112 Double_t fLorentzXc;
113 Double_t fLorentzW;
114 Double_t fLorentzA;
115 Double_t fLorentzNorm;
116
117 Double_t fLandauMPV;
118 Double_t fLandauSigma;
119 Double_t fLandauGain;
120 TRandom3* fLandauRandom;
121
122 Double_t fPixelSize;
123 Double_t fPar0;
124 Double_t fPar1;
125 Double_t fPar2;
126
127 Double_t fCompression;
128
131
134 Int_t fEvent;
138
139 TClonesArray* fPixelCharge;
140
141 TClonesArray* fDigis;
142
143 TClonesArray* fDigiMatch;
144
146
147 std::vector<CbmMvdPixelCharge*> fPixelChargeShort;
148
150 std::map<std::pair<std::pair<Int_t, Int_t>, Double_t>, CbmMvdPixelCharge*> fChargeMap;
151 std::map<std::pair<std::pair<Int_t, Int_t>, Double_t>, CbmMvdPixelCharge*>::iterator fChargeMapIt;
152
153
155
157 Double_t fSigmaX, fSigmaY; // MAPS resolution in [cm]
158 Double_t fReadoutTime; // MAPS readout time in [s]
159 Double_t fEfficiency; // MAPS detection efficiency
160 Double_t fMergeDist; // Merging distance
161 Double_t fFakeRate; // Fake hit rate
162
164 TClonesArray* fInputPoints; // Array of MCPoints (input)
165
167 TRandom3 fRandGen;
168 TStopwatch fTimer;
169
171 Int_t fNEvents;
172 Double_t fNPoints;
173 Double_t fNReal;
174 Double_t fNBg;
175 Double_t fNFake;
176 Double_t fNLost;
177 Double_t fNMerged;
178 Double_t fTime;
179 Double_t fReadoutLast;
181 Double_t fReadoutNext;
182
183 // ----- Private methods ---------------------------------------------
184
185 struct SignalPoint {
186 double x;
187 double y;
188 double z;
189 double sigmaX;
190 double sigmaY;
191 double charge;
192 double eloss;
193 };
194
195
196 typedef std::vector<SignalPoint> SignalPointVec;
197
199
201 virtual void ReInit(CbmMvdSensor* mySensor);
202
203
205 virtual void Finish();
206
207
209 void Register();
210
211
213 void Reset();
214
215
217 void PrintParameters();
218
219
224
227
229};
230
231
232#endif
void SetInputArray(TClonesArray *inputStream)
void SetElectronsPerKeV(Double_t electronsPerKeV)
void ProduceIonisationPoints(CbmMvdPoint *point)
ClassDef(CbmMvdSensorDigitizerTBTask, 1)
std::vector< SignalPoint > SignalPointVec
void SetSegmentLength(Double_t segmentLength)
void SetChargeThreshold(Float_t chargeThreshold)
CbmMvdSensorDigitizerTBTask(const CbmMvdSensorDigitizerTBTask &)
void SetDiffusionCoef(Double_t diffCoeff)
CbmMvdSensorDigitizerTBTask operator=(const CbmMvdSensorDigitizerTBTask &)
virtual void InitTask(CbmMvdSensor *mySensor)
void SetWidthOfCluster(Double_t widthOfCluster)
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * >::iterator fChargeMapIt
std::map< std::pair< std::pair< Int_t, Int_t >, Double_t >, CbmMvdPixelCharge * > fChargeMap
void GetEventInfo(Int_t &inputNr, Int_t &eventNr, Double_t &eventTime)
std::vector< CbmMvdPixelCharge * > fPixelChargeShort
void SetCutOnDeltaRays(Double_t cutOnDeltaRays)
virtual void ReInit(CbmMvdSensor *mySensor)
TClonesArray * fOutputBuffer