3 #define VTXDigitizer_h 1
5 #include "marlin/Processor.h"
7 #include "EVENT/SimTrackerHit.h"
8 #include "IMPL/TrackerHitImpl.h"
9 #include "IMPL/SimTrackerHitImpl.h"
12 #include "MyG4UniversalFluctuationForSi.h"
13 #include "EVENT/LCIO.h"
14 #include <IMPL/LCCollectionVec.h>
17 using namespace lcio ;
18 using namespace marlin ;
36 typedef std::vector<IonisationPoint> IonisationPointVec;
37 typedef std::vector<SignalPoint> SignalPointVec;
38 typedef std::vector<TrackerHitImpl*> TrackerHitImplVec;
39 typedef std::vector<SimTrackerHitImpl*> SimTrackerHitImplVec;
127 virtual Processor* newProcessor() {
return new VTXDigitizer ; }
135 virtual void init() ;
140 virtual void processRunHeader( LCRunHeader* run ) ;
144 virtual void processEvent( LCEvent * evt ) ;
148 virtual void check( LCEvent * evt ) ;
160 std::string _outputCollectionName;
161 std::string _colVTXRelation ;
191 double _electronsPerKeV;
192 double _segmentDepth;
193 double _currentTotalCharge;
195 std::vector<int> _laddersInLayer;
196 std::vector<float> _layerRadius;
197 std::vector<float> _layerThickness;
198 std::vector<float> _layerHalfThickness;
199 std::vector<float> _layerLadderLength;
200 std::vector<float> _layerLadderHalfWidth;
201 std::vector<float> _layerPhiOffset;
202 std::vector<float> _layerActiveSiOffset;
203 std::vector<float> _layerHalfPhi;
204 std::vector<float> _layerLadderGap;
205 std::vector<float> _bkgdHitsInLayer;
206 std::vector<float> _layerLadderWidth;
210 int _generateBackground;
211 double _currentParticleMomentum;
212 double _currentParticleEnergy;
213 double _currentParticleMass;
215 double _widthOfCluster;
220 int _produceFullPattern;
221 int _numberOfSegments;
223 int _PoissonSmearing;
224 int _electronicEffects;
229 double _currentLocalPosition[3];
230 double _currentEntryPoint[3];
231 double _currentExitPoint[3];
232 double _electronicNoise;
233 double _segmentLength;
235 IonisationPointVec _ionisationPoints;
236 SignalPointVec _signalPoints;
243 void FindLocalPosition(SimTrackerHit * hit,
244 double * localPosition,
245 double * localDirection);
247 void TransformToLab(
double * xLoc,
double * xLab);
248 void ProduceIonisationPoints( SimTrackerHit * hit);
249 void ProduceSignalPoints( );
250 void ProduceHits(SimTrackerHitImplVec & simTrkVec);
251 void TransformXYToCellID(
double x,
double y,
254 void TransformCellIDToXY(
int ix,
int iy,
255 double & x,
double & y);
256 void PoissonSmearer( SimTrackerHitImplVec & simTrkVec );
257 void GainSmearer( SimTrackerHitImplVec & simTrkVec );
258 void PrintInfo( SimTrackerHit * simTrkHit, TrackerHitImpl * recoHit);
259 TrackerHitImpl * ReconstructTrackerHit(SimTrackerHitImplVec & simTrkVec );
260 void TrackerHitToLab( TrackerHitImpl * recoHit );
261 void PositionWithinCell(
double x,
double y,
263 double & xCell,
double & yCell);
264 void generateBackground(LCCollectionVec * col);
266 double _xLayerReco,_yLayerReco,_zLayerReco;
267 double _xLayerSim,_yLayerSim,_zLayerSim;
270 int _nCoveredX,_nCoveredY,_nCells;
274 double _momX,_momY,_momZ;
284 double _clusterWidthX,_clusterWidthY;
285 double _ampl33,_ampl55,_ampl77;
286 int _ncell33,_ncell55,_ncell77;
288 double _xLocalRecoCOG,_yLocalRecoCOG;
289 double _xLocalRecoEdge,_yLocalRecoEdge;
290 double _xLocalSim,_yLocalSim;
292 std::vector <SimTrackerHitImplVec> _hitsInLayer;
Digitizer for Simulated Hits in the Vertex Detector.
Definition: VTXDigitizer.h:123
int _numberOfLayers
layer thickness
Definition: VTXDigitizer.h:188
Definition: VTXDigitizer.h:27
int _nEvt
Event number.
Definition: VTXDigitizer.h:169
Definition: MyG4UniversalFluctuationForSi.h:52
double _tanLorentzAngle
tangent of Lorentz angle
Definition: VTXDigitizer.h:172
double _cutOnDeltaRays
cut in MeV on delta electrons used in simulation of charge for each ionisation point ...
Definition: VTXDigitizer.h:176
std::string _colName
Input collection name.
Definition: VTXDigitizer.h:159
double _diffusionCoefficient
Diffusion coefficient in mm for nominla layer thickness.
Definition: VTXDigitizer.h:179
int _nRun
Run number.
Definition: VTXDigitizer.h:165
Definition: CCDDigitizer.h:52