MarlinTPC  1.2.0
LinearThreePointResolutionProcessor.h
1 #ifndef LinearThreePointResolutionProcessor_h
2 #define LinearThreePointResolutionProcessor_h 1
3 
4 #define N_1D_HISTOS_THREE_POINT_RESOLUTION_PROCESSOR 1
5 #define N_2D_HISTOS_THREE_POINT_RESOLUTION_PROCESSOR 0
6 
7 // C++
8 #include <string>
9 
10 // LCIO
11 #include "lcio.h"
12 #include <EVENT/TrackerHit.h>
13 
14 // Marlin
15 #include "marlin/Processor.h"
16 #include "ZBinTemplateProcessor.h"
17 
18 
19 namespace AIDA{
20  class IHistogram1D;
21  class IHistogram2D;
22 }
23 
24 namespace marlintpc{
25 
26  /* the following comment is tranfered to doxygen documentation
27  * which begins with a second asterix, or in case of on line comment an extra third slash
28  */
49 // typedef lccd::ConditionsMap<tpcconddata::TimePixPixelMode::PixelKey, tpcconddata::TimePixPixelMode > TimePixModeMap ;
50 // typedef std::map< tpcconddata::TimePixPixelMode::PixelKey, tpcconddata::TimePixPixelMode > stdTimePixModeMap;
51 
52 
54  public ZBinTemplateProcessor<N_1D_HISTOS_THREE_POINT_RESOLUTION_PROCESSOR,
55  N_2D_HISTOS_THREE_POINT_RESOLUTION_PROCESSOR>{
56 
57 //marlin::Processor {
58 
59  public:
60 
61  /* This method will be called by the marlin package
62  * It returns a processor of the currend type (here LinearThreePointResolutionProcessor)
63  */
64  virtual Processor* newProcessor() { return new LinearThreePointResolutionProcessor ; }
65 
66  /* the default constructor
67  * here the processor parameters are registered to the marlin package
68  * other initialisation should be placed in the init method
69  */
71 
72  /* Called at the beginning of the job before anything is read.
73  * Use to initialize the processor, e.g. book histograms
74  */
75  virtual void init() ;
76 
77  /* Called for every run.
78  * in this processor it is not used
79  */
80  virtual void processRunHeader( lcio::LCRunHeader* run ) ;
81 
82  /* Called for every event - the working horse.
83  * Here the real conversion take place
84  */
85  virtual void processEvent( lcio::LCEvent * evt ) ;
86 
87  /* This method is only called if the check flag is set (default) in the main processor
88  * (where the input files are given)
89  * It should be used to create check plots which are not needed in a complete analysis
90  * (where normaly the check flag is deactivated)
91  */
92  virtual void check( lcio::LCEvent * evt ) ;
93 
94 
95  /* Called after data processing for clean up.
96  * e.g. saving control histogramms, delete created objects
97  * (which are not stored in a collection/event), etc.
98  */
99  virtual void end() ;
100 
101  /* Sort function to sort the Hits along the track
102  */
103  static bool compareHit(const std::pair<TrackerHit*, double> & pair1,
104  const std::pair<TrackerHit*, double> & pair2)
105  {
106  return pair1.second < pair2.second;
107  }
108 
109 
110 
111  protected:
112 
113  /* normally the doxygen documentation is palced before the method/variable
114  * but for one line comments in case of variables it may be more convenied for you
115  * to place it after the variable. In this case you use an arrow to tell doxygen
116  * to which variable the commet belongs to.
117  */
118 
119  std::string _inputColName ;
120  int _chipID;
126 
130  static const unsigned int _histo3PIndex;
131 
132 
138 
139 
140 
141 private:
142  AIDA::IHistogram1D* histo3P;
143  AIDA::IHistogram2D* histo3P2D;
144  AIDA::IHistogram1D* histoNoTrack;
145  } ;
146 
147 }
148 
149 #endif
150 
151 
152 
virtual void init()
Register the AIDA histograms at the AIDAProcessor.
Definition: LinearThreePointResolutionProcessor.cc:112
bool isFirstCollection
is true till the first output collection is wirten to an event used to to store parameters only in th...
Definition: LinearThreePointResolutionProcessor.h:137
int _histoBin3P
Definition: LinearThreePointResolutionProcessor.h:121
int _chipID
Definition: LinearThreePointResolutionProcessor.h:120
float _histoRangeTime
Definition: LinearThreePointResolutionProcessor.h:125
Resoltuion calculator for straight tracks using the three point method.
Definition: LinearThreePointResolutionProcessor.h:53
int _histoBinTime
Definition: LinearThreePointResolutionProcessor.h:122
A template to create processors wich create 1D or 2D distribution histograms, one histogram per z bin...
Definition: ZBinTemplateProcessor.h:76
int _histoBinNoTrack
Definition: LinearThreePointResolutionProcessor.h:123
static const unsigned int _histo3PIndex
The index of the template parameter for the hitsPerTrack histos We want to have these values divided ...
Definition: LinearThreePointResolutionProcessor.h:130
std::string _inputColName
Definition: LinearThreePointResolutionProcessor.h:119
virtual Processor * newProcessor()
The newProcessor() function does not make sense for this template class, so it throws an lcio::Except...
Definition: LinearThreePointResolutionProcessor.h:64
float _histoRange3P
Definition: LinearThreePointResolutionProcessor.h:124