All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
VTXDigiProcessor.h
Go to the documentation of this file.
1 #ifndef VTXDigiProcessor_h
2 #define VTXDigiProcessor_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 #include <vector>
8 #include <gsl/gsl_rng.h>
9 
10 // STUFF needed for GEAR
11 #include <marlin/Global.h>
12 #include <gear/GEAR.h>
13 #include <gear/VXDParameters.h>
14 #include <gear/VXDLayerLayout.h>
15 
16 
17 using namespace lcio ;
18 using namespace marlin ;
19 
20 
21 /**
22 \addtogroup TrackDigi TrackDigi
23 @{
24 
25 \addtogroup VTXDigiProcessor VTXDigiProcessor
26 @{
27 Produces SIT & VTX TrackerHit collection from SimTrackerHit collections.
28 ======= VTXDigiProcessor ========== <br>
29  * Produces SIT & VTX TrackerHit collection from SimTrackerHit collections. <br>
30  * The positions of "digitized" TrackerHits are obtained by gaussian smearing positions
31  * of SimTrackerHits in r-phi and z according to the specified point resolutions.
32  * Each created TrackerHit is assigned the type via method TrackerHitImpl::setType(int type).
33  * The TrackerHit type is encoded in the following way : <br>
34  * type = 100 + layer_index_vtx for vertex hits (layer_index_vtx = 1...5) <br>
35  * type = 400 + layer_index_sit for SIT hits (layer_index_sit = 1,2) <br>
36  * To access this type use method TrackerHit::getType() <br>
37  * <h4>Input collections and prerequisites</h4>
38  * Processor requires collections of SimTrackerHits in vertex detector and SIT <br>
39  * <h4>Output</h4>
40  * Processor produces collection of digitized TrackerHits in the vertex detector and SIT <br>
41  * @param VTXCollectionName The name of input collection of VTX SimTrackerHits <br>
42  * (default name vxd00_VXD) <br>
43  * @param SITCollectionName The name of input collection of SIT SimTrackerHits <br>
44  * (default name sit00_SIT) <br>
45  * @param VTXHitCollection The name of output collection of digitized VTX TrackerHits <br>
46  * (default name VTXTrackerHits) <br>
47  * @param SITHitCollection The name of output collection of digitized SIT TrackerHits <br>
48  * (default name SITTrackerHits) <br>
49  * @param PointResolutionRPhi_VTX Point resolution in r-phi for the vertex detector (in mm) <br>
50  * (default value 0.004) <br>
51  * @param PointResolutionZ_VTX Point resolution in z for the vertex detector (in mm) <br>
52  * (default value 0.004) <br>
53  * @param HitEfficiencyPerLayer_VTX hit efficiencies per layer in the VTX<br>
54  * (default value 1. 1. 1. 1. 1. 1.) <br>
55  * @param PointResolutionRPhi_SIT Point resolution in r-phi for SIT (in mm) <br>
56  * (default value 0.01) <br>
57  * @param PointResolutionZ_SIT Point resolution in z for SIT (in mm) <br>
58  * (default value 0.01) <br>
59  * @param RemoveDrays When this flag is set to 1 hits produced by delta-electrons are removed
60  * from output collections <br>
61  * (default value 0) <br>
62  * @param MomentumCutForDRays The upper cut on delta-electron momentum (in MeV) <br>
63  * (default value 10) <br>
64  * @param Debug When this flag is set to one, debugging regime is enabled with a lot of printouts <br>
65  * (default value is 0) <br>
66  * <br>
67  *
68  * F.Gaede: 2008-11-28
69  * added parameter ActiveSETLayers: only SET hits from these layers will be digitized
70  * -> used to mimic the stereo layers strip detectors (eg. use only hits from layer 1 )
71  *
72  * @author A. Raspereza, MPI (Munich)
73  */
74 class VTXDigiProcessor : public Processor {
75 
76  public:
77  VTXDigiProcessor(const VTXDigiProcessor&) = delete;
78  VTXDigiProcessor& operator=(const VTXDigiProcessor&) = delete;
79 
80  virtual Processor* newProcessor() { return new VTXDigiProcessor ; }
81 
82 
84 
85  /** Called at the begin of the job before anything is read.
86  * Use to initialize the processor, e.g. book histograms.
87  */
88  virtual void init() ;
89 
90  /** Called for every run.
91  */
92  virtual void processRunHeader( LCRunHeader* run ) ;
93 
94  /** Called for every event - the working horse.
95  */
96  virtual void processEvent( LCEvent * evt ) ;
97 
98 
99  virtual void check( LCEvent * evt ) ;
100 
101 
102  /** Called after data processing for clean up.
103  */
104  virtual void end() ;
105 
106  // find phi in correct range, taken from gear::VXDParameters
107  double correctPhiRange( double Phi ) const ;
108 
109 
110  protected:
111 
112  std::string _colNameVTX{};
113  std::string _colNameSIT{};
114  std::string _colNameSET{};
115  std::string _outColNameVTX{};
116  std::string _outColNameSIT{};
117  std::string _outColNameSET{};
118 
119  std::vector<int> _activeSETLayers{};
120 
121  int _nRun{};
122  int _nEvt{};
123  int _smearAlongLadders{};
124  int _debug{};
125  int _removeDRays{};
126  float _pointResoRPhi{},_pointResoRPhi_VTX{},_pointResoRPhi_SIT{},_pointResoRPhi_SET{};
127  float _pointResoZ{},_pointResoZ_VTX{},_pointResoZ_SIT{},_pointResoZ_SET{};
128  float _momCut{};
129 
130  FloatVec _vxdEff{};
131  std::vector< std::pair<long, long> > _vxdCount{};
132 
133  gsl_rng * _rng{};
134 
135 
136 } ;
137 /** @} @}*/
138 #endif
virtual Processor * newProcessor()