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"
13 #include "EVENT/LCIO.h"
14 #include <IMPL/LCCollectionVec.h>
17 using namespace lcio ;
18 using namespace marlin ;
144 virtual void init() ;
149 virtual void processRunHeader( LCRunHeader* run ) ;
153 virtual void processEvent( LCEvent * evt ) ;
157 virtual void check( LCEvent * evt ) ;
168 std::string _colName{};
169 std::string _outputCollectionName{};
170 std::string _colVTXRelation{};
181 double _tanLorentzAngle{};
185 double _cutOnDeltaRays{};
188 double _diffusionCoefficient{};
197 int _numberOfLayers{};
198 double _pixelSizeX{};
199 double _pixelSizeY{};
200 double _electronsPerKeV{};
201 double _segmentDepth{};
202 double _currentTotalCharge{};
204 std::vector<int> _laddersInLayer{};
205 std::vector<float> _layerRadius{};
206 std::vector<float> _layerThickness{};
207 std::vector<float> _layerHalfThickness{};
208 std::vector<float> _layerLadderLength{};
209 std::vector<float> _layerLadderHalfWidth{};
210 std::vector<float> _layerPhiOffset{};
211 std::vector<float> _layerActiveSiOffset{};
212 std::vector<float> _layerHalfPhi{};
213 std::vector<float> _layerLadderGap{};
214 std::vector<float> _bkgdHitsInLayer{};
215 std::vector<float> _layerLadderWidth{};
218 int _currentModule{};
219 int _generateBackground{};
220 double _currentParticleMomentum{};
221 double _currentParticleEnergy{};
222 double _currentParticleMass{};
223 double _currentPhi{};
224 double _widthOfCluster{};
226 double PI{},TWOPI{},PI2{};
229 int _produceFullPattern{};
230 int _numberOfSegments{};
232 int _PoissonSmearing{};
233 int _electronicEffects{};
234 int _useMCPMomentum{};
238 double _currentLocalPosition[3]{};
239 double _currentEntryPoint[3]{};
240 double _currentExitPoint[3]{};
241 double _electronicNoise{};
242 double _segmentLength{};
252 void FindLocalPosition(SimTrackerHit * hit,
253 double * localPosition,
254 double * localDirection);
256 void TransformToLab(
double * xLoc,
double * xLab);
257 void ProduceIonisationPoints( SimTrackerHit * hit);
258 void ProduceSignalPoints( );
260 void TransformXYToCellID(
double x,
double y,
263 void TransformCellIDToXY(
int ix,
int iy,
264 double & x,
double & y);
267 void PrintInfo( SimTrackerHit * simTrkHit, TrackerHitImpl * recoHit);
269 void TrackerHitToLab( TrackerHitImpl * recoHit );
270 void PositionWithinCell(
double x,
double y,
272 double & xCell,
double & yCell);
275 double _xLayerReco{},_yLayerReco{},_zLayerReco{};
276 double _xLayerSim{},_yLayerSim{},_zLayerSim{};
279 int _nCoveredX{},_nCoveredY{},_nCells{};
282 double _totMomentum{};
283 double _momX{},_momY{},_momZ{};
288 double _amplC[100]{};
292 double _energyLoss{};
293 double _clusterWidthX{},_clusterWidthY{};
294 double _ampl33{},_ampl55{},_ampl77{};
295 int _ncell33{},_ncell55{},_ncell77{};
297 double _xLocalRecoCOG{},_yLocalRecoCOG{};
298 double _xLocalRecoEdge{},_yLocalRecoEdge{};
299 double _xLocalSim{},_yLocalSim{};
301 std::vector <SimTrackerHitImplVec> _hitsInLayer{};
std::vector< TrackerHitImpl * > TrackerHitImplVec
virtual Processor * newProcessor()
std::vector< IonisationPoint > IonisationPointVec
std::vector< SimTrackerHitImpl * > SimTrackerHitImplVec
std::vector< SignalPoint > SignalPointVec
std::vector< LCCollection * > LCCollectionVec