All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
anaPix.h
Go to the documentation of this file.
1 #ifndef anaPix_h
2 #define anaPix_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include "EVENT/LCCollection.h"
7 #include "IMPL/LCCollectionVec.h"
8 #include <string>
9 #include <vector>
10 #include <TFile.h>
11 #include <TTree.h>
12 
13 #include <marlin/Global.h>
14 #include <gear/GEAR.h>
15 
16 /**
17 \addtogroup TrackDigi TrackDigi
18 @{
19 Track digidization.
20 
21 
22 using namespace lcio;
23 
24 class FPCCDData;
25 
26 /**
27 \addtogroup anaPix anaPix
28 @{
29 anaPix processor is a utility for studying pixel occupancy.
30 ======= anaPix ========== <br>
31  * anaPix processor is a utility for studying pixel occupancy.
32  * Original code is written by Daisuke Kamai.
33  * Some modifications are done by Mori.
34  * @author Tatsuya Mori, Tohoku University: 2014-02-10
35  */
36 // =================================================================
37 class anaPix : public marlin::Processor {
38 
39  public:
40  anaPix(const anaPix&) = delete;
41  anaPix& operator=(const anaPix&) = delete;
42 
43  virtual Processor* newProcessor() { return new anaPix ; }
44 
45 
46  anaPix() ;
47 
48  /** Called at the begin of the job before anything is read.
49  * Use to initialize the processor, e.g. book histograms.
50  */
51  virtual void init() ;
52 
53  /** Called for every run.
54  */
55  virtual void processRunHeader( LCRunHeader* run ) ;
56 
57  /** Called for every event - the working horse.
58  */
59  virtual void processEvent( LCEvent * evt ) ;
60 
61  virtual void check( LCEvent * evt ) ;
62 
63  /** Called after data processing for clean up.
64  */
65  virtual void end() ;
66 
67  // make TrackerHits from VTXPixelHits
68  void fillTTree(FPCCDData &pxHits);
69 
70  // Initialize Geometry data
71  void InitGeometry();
72 
73  protected:
74 
75  std::string _colNameVTX{};
76 
77  int _nRun{};
78  int _nEvt{};
79  int _debug{};
80  FloatVec _pixelSizeVec{};
81  float _pixelSize{};
82  float _pointResoRPhi{};
83  float _pointResoZ{};
84  std::string _rootFileName{};
85 
86  TFile* outroot{};
87  TTree* hTreePix{};
88  TTree* hTreeLocalPix{};
89 
90  int _nLayer{}; // Number of layers
91  int _maxLadder{}; // max number of ladders
92  struct GeoData_t {
93  int nladder{};
94  double rmin{}; // distance of inner surface of sensitive region from IP
95  double dphi{}; // azimuthal angle step of each ladder
96  double phi0{}; // aximuthal angle offset
97  std::vector<double> cosphi{}; // cos[phi_ladder], cos_phi of each ladder
98  std::vector<double> sinphi{}; // sin[phi_ladder], sin_phi of each ladder
99  double sthick{}; // sensitive region thickness
100  double sximin{}; // minimum xi of sensitive region.
101  double sximax{}; // maximum xi of sensitive region
102  double hlength{}; // ladder's half length in z
103  };
104  std::vector<GeoData_t> _geodata{};
105 
106 } ;
107 /** @} @} */
108 #endif