MarlinTPC  1.2.0
TrackHitEfficiencyProcessor.h
1 #ifndef TRACKHITEFFPROCESSOR_H
2 #define TRACKHITEFFPROCESSOR_H
3 
4 // C++
5 #include <string>
6 #include <fstream>
7 
8 // LCIO
9 #include "lcio.h"
10 
11 // Marlin
12 #include "marlin/Processor.h"
13 #include "lccd/ConditionsMap.hh"
14 //GEAR
15 #include "gear/TPCParameters.h"
16 
17 //ROOT
18 #include "TNtuple.h"
19 
20 // Aida
21 #ifdef MARLIN_USE_AIDA
22 //AIDA
23 #include <marlin/AIDAProcessor.h>
24 #endif
25 
26 namespace marlintpc
27 {
28 
44 class TrackHitEfficiencyProcessor : public marlin::Processor
45 {
46 
47  public:
48 
49  /* This method will be called by the marlin package
50  * It returns a processor of the currend type
51  */
52  virtual Processor* newProcessor()
53  {
54  return new TrackHitEfficiencyProcessor ;
55  }
56 
57  /* the default constructor
58  * here the processor parameters are registered to the marlin package
59  * other initialisation should be placed in the init method
60  */
62 
63  /* Called at the beginning of the job before anything is read.
64  * Use to initialize the processor, e.g. book histograms
65  */
66  virtual void init() ;
67 
68  /* Called for every run.
69  * in this processor it is not used
70  */
71  virtual void processRunHeader(lcio::LCRunHeader* run) ;
72 
73  /* Called for every event - the working horse.
74  * Here the real conversion take place
75  */
76  virtual void processEvent(lcio::LCEvent * evt) ;
77 
78  /* This method is only called if the check flag is set (default) in the main processor
79  * (where the input files are given)
80  * It should be used to create check plots which are not needed in a complete analysis
81  * (where normaly the check flag is deactivated)
82  */
83  virtual void check(lcio::LCEvent * evt) ;
84 
85 
86  /* Called after data processing for clean up.
87  * e.g. saving control histogramms, delete created objects
88  * (which are not stored in a collection/event), etc.
89  */
90  virtual void end() ;
91 
92 
93 
94 
95  protected:
96 
97  std::string _inputColName ;
98  std::map< std::pair<int,int>, int> _hitOnRow;
99  int _ntracks;
100 
101  private:
102  TNtuple* _tuple;
103  const gear::TPCParameters* _gearParameters;
104 } ;
105 
106 }
107 
108 #endif
109 
110 
111 
std::string _inputColName
Definition: TrackHitEfficiencyProcessor.h:97
std::map< std::pair< int, int >, int > _hitOnRow
Definition: TrackHitEfficiencyProcessor.h:98
A processor to calculate the hit efficiency based on hits on tracksper row.
Definition: TrackHitEfficiencyProcessor.h:44
int _ntracks
Definition: TrackHitEfficiencyProcessor.h:99