21 #ifndef CCDDigitizer_h
22 #define CCDDigitizer_h 1
24 #include "marlin/Processor.h"
26 #include "EVENT/SimTrackerHit.h"
27 #include "IMPL/TrackerHitImpl.h"
28 #include "IMPL/SimTrackerHitImpl.h"
31 #include "MyG4UniversalFluctuationForSi.h"
32 #include "EVENT/LCIO.h"
33 #include <IMPL/LCCollectionVec.h>
37 #ifdef CCD_diagnostics
38 #include <AIDA/IHistogramFactory.h>
39 #include <AIDA/IHistogram1D.h>
40 #include <AIDA/IHistogram2D.h>
41 #include <AIDA/IAxis.h>
42 #include <AIDA/ITree.h>
44 #include <marlin/Global.h>
45 #include <marlin/VerbosityLevels.h>
46 #include <marlin/AIDAProcessor.h>
49 using namespace lcio ;
50 using namespace marlin ;
60 typedef std::vector<IonisationPoint> IonisationPointVec;
61 typedef std::vector<TrackerHitImpl*> TrackerHitImplVec;
62 typedef std::vector<SimTrackerHitImpl*> SimTrackerHitImplVec;
66 #define maxpixx 9// grid size in local(ladder) x axis
67 #define maxpixy 9// grid size in local(ladder) y axis
71 #define Numstepx 10// Number of points at which amplitude of diffusion is calculated within one pixel in x direction
72 #define Numstepy 10// Number of points at which amplitude of diffusion is calculated within one pixel in y direction
90 virtual Processor* newProcessor() {
return new CCDDigitizer ; }
103 virtual void processRunHeader( LCRunHeader* run ) ;
107 virtual void processEvent( LCEvent * evt ) ;
111 virtual void check( LCEvent * evt ) ;
122 std::string _colName{};
123 std::string _outputCollectionName{};
124 std::string _colVTXRelation{};
136 double _cutOnDeltaRays{};
139 double _diffusionCoefficient{};
143 int _numberOfLayers{};
144 double _pixelSizeX{};
145 double _pixelSizeY{};
146 double _electronsPerKeV{};
147 double _segmentDepth{};
148 double _currentTotalCharge{};
150 std::vector<int> _laddersInLayer{};
151 std::vector<float> _layerRadius{};
152 std::vector<float> _layerThickness{};
153 std::vector<float> _layerHalfThickness{};
154 std::vector<float> _layerLadderLength{};
155 std::vector<float> _layerLadderHalfWidth{};
156 std::vector<float> _layerPhiOffset{};
157 std::vector<float> _layerActiveSiOffset{};
158 std::vector<float> _layerHalfPhi{};
159 std::vector<float> _layerLadderGap{};
160 std::vector<float> _bkgdHitsInLayer{};
161 std::vector<float> _layerLadderWidth{};
164 int _currentModule{};
165 int _generateBackground{};
166 double _currentParticleMomentum{};
167 double _currentParticleEnergy{};
168 double _currentParticleMass{};
169 double _currentPhi{};
171 double PI{},TWOPI{},PI2{};
173 int _produceFullPattern{};
174 int _numberOfSegments{};
176 int _PoissonSmearing{};
177 int _electronicEffects{};
178 int _useMCPMomentum{};
182 double _saturation{};
186 double _currentLocalPosition[3]{};
187 double _electronicNoise{};
188 double _segmentLength{};
190 IonisationPointVec _ionisationPoints{};
197 void FindLocalPosition(SimTrackerHit * hit,
198 double * localPosition,
199 double * localDirection);
201 void TransformToLab(
double * xLoc,
double * xLab);
202 void ProduceIonisationPoints( SimTrackerHit * hit);
203 void diffusion(
double xdif,
double ydif,
double sigma);
205 void ProduceHits(SimTrackerHitImplVec & simTrkVec);
206 void TransformXYToCellID(
double x,
double y,
208 int & iy,
double & xdif,
double & ydif);
209 void TransformCellIDToXY(
int ix,
int iy,
210 double & x,
double & y);
211 void PoissonSmearer( SimTrackerHitImplVec & simTrkVec );
212 void GainSmearer( SimTrackerHitImplVec & simTrkVec );
213 void PrintInfo( SimTrackerHit * simTrkHit, TrackerHitImpl * recoHit);
214 TrackerHitImpl * ReconstructTrackerHit(SimTrackerHitImplVec & simTrkVec );
215 void TrackerHitToLab( TrackerHitImpl * recoHit );
217 void generateBackground(LCCollectionVec * col);
218 void settanlorentzangle(
double B,
double E,
double mu,
double T);
219 void settanlorentzangleb(
double B,
double E,
double mu,
double T);
225 double _energyLoss{};
226 std::vector <SimTrackerHitImplVec> _hitsInLayer{};
232 double pxl[maxpixx][maxpixy]{};
240 double sigmacoefficient{};
248 double TanLorentzAngle{};
251 #ifdef CCD_diagnostics
254 AIDA::IHistogram1D* histdist{};
255 AIDA::IHistogram1D* histcluster{};
256 AIDA::IHistogram2D* histclustxy{};
257 AIDA::IHistogram1D* histcharge{};
258 AIDA::IHistogram2D* histdistxy{};
259 AIDA::IHistogram1D* histNionpoint{};
260 AIDA::IHistogram1D* histzcoord{};
261 AIDA::IHistogram1D* histenergy{};
262 AIDA::IHistogram1D* histsignal{};
263 AIDA::IHistogram1D* histsignalframe{};
264 AIDA::IHistogram1D* histenergycentre{};
Definition: CCDDigitizer.h:83
Definition: MyG4UniversalFluctuationForSi.h:52
Definition: CCDDigitizer.h:52