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;
129 virtual Processor* newProcessor() {
return new VTXDigitizer ; }
137 virtual void init() ;
142 virtual void processRunHeader( LCRunHeader* run ) ;
146 virtual void processEvent( LCEvent * evt ) ;
150 virtual void check( LCEvent * evt ) ;
161 std::string _colName{};
162 std::string _outputCollectionName{};
163 std::string _colVTXRelation{};
174 double _tanLorentzAngle{};
178 double _cutOnDeltaRays{};
181 double _diffusionCoefficient{};
190 int _numberOfLayers{};
191 double _pixelSizeX{};
192 double _pixelSizeY{};
193 double _electronsPerKeV{};
194 double _segmentDepth{};
195 double _currentTotalCharge{};
197 std::vector<int> _laddersInLayer{};
198 std::vector<float> _layerRadius{};
199 std::vector<float> _layerThickness{};
200 std::vector<float> _layerHalfThickness{};
201 std::vector<float> _layerLadderLength{};
202 std::vector<float> _layerLadderHalfWidth{};
203 std::vector<float> _layerPhiOffset{};
204 std::vector<float> _layerActiveSiOffset{};
205 std::vector<float> _layerHalfPhi{};
206 std::vector<float> _layerLadderGap{};
207 std::vector<float> _bkgdHitsInLayer{};
208 std::vector<float> _layerLadderWidth{};
211 int _currentModule{};
212 int _generateBackground{};
213 double _currentParticleMomentum{};
214 double _currentParticleEnergy{};
215 double _currentParticleMass{};
216 double _currentPhi{};
217 double _widthOfCluster{};
219 double PI{},TWOPI{},PI2{};
222 int _produceFullPattern{};
223 int _numberOfSegments{};
225 int _PoissonSmearing{};
226 int _electronicEffects{};
227 int _useMCPMomentum{};
231 double _currentLocalPosition[3]{};
232 double _currentEntryPoint[3]{};
233 double _currentExitPoint[3]{};
234 double _electronicNoise{};
235 double _segmentLength{};
237 IonisationPointVec _ionisationPoints{};
238 SignalPointVec _signalPoints{};
245 void FindLocalPosition(SimTrackerHit * hit,
246 double * localPosition,
247 double * localDirection);
249 void TransformToLab(
double * xLoc,
double * xLab);
250 void ProduceIonisationPoints( SimTrackerHit * hit);
251 void ProduceSignalPoints( );
252 void ProduceHits(SimTrackerHitImplVec & simTrkVec);
253 void TransformXYToCellID(
double x,
double y,
256 void TransformCellIDToXY(
int ix,
int iy,
257 double & x,
double & y);
258 void PoissonSmearer( SimTrackerHitImplVec & simTrkVec );
259 void GainSmearer( SimTrackerHitImplVec & simTrkVec );
260 void PrintInfo( SimTrackerHit * simTrkHit, TrackerHitImpl * recoHit);
261 TrackerHitImpl * ReconstructTrackerHit(SimTrackerHitImplVec & simTrkVec );
262 void TrackerHitToLab( TrackerHitImpl * recoHit );
263 void PositionWithinCell(
double x,
double y,
265 double & xCell,
double & yCell);
266 void generateBackground(LCCollectionVec * col);
268 double _xLayerReco{},_yLayerReco{},_zLayerReco{};
269 double _xLayerSim{},_yLayerSim{},_zLayerSim{};
272 int _nCoveredX{},_nCoveredY{},_nCells{};
275 double _totMomentum{};
276 double _momX{},_momY{},_momZ{};
281 double _amplC[100]{};
285 double _energyLoss{};
286 double _clusterWidthX{},_clusterWidthY{};
287 double _ampl33{},_ampl55{},_ampl77{};
288 int _ncell33{},_ncell55{},_ncell77{};
290 double _xLocalRecoCOG{},_yLocalRecoCOG{};
291 double _xLocalRecoEdge{},_yLocalRecoEdge{};
292 double _xLocalSim{},_yLocalSim{};
294 std::vector <SimTrackerHitImplVec> _hitsInLayer{};
Digitizer for Simulated Hits in the Vertex Detector.
Definition: VTXDigitizer.h:123
Definition: VTXDigitizer.h:27
Definition: MyG4UniversalFluctuationForSi.h:52
Definition: CCDDigitizer.h:52