MarlinTPC  1.2.0
TimePixHitCenterCalculatorProcessor.h
1 #ifndef TimePixHitCenterCalculatorProcessor_h
2 #define TimePixHitCenterCalculatorProcessor_h 1
3 
4 // C++
5 #include <string>
6 
7 // LCIO
8 #include "lcio.h"
9 
10 // Aida
11 //#ifdef MARLIN_USE_AIDA // the whole processor does not make sense without aida
12 #include <AIDA/AIDA.h>
13 #include <marlin/AIDAProcessor.h>
14 #include <AIDA/IHistogramFactory.h>
15 #include <AIDA/IHistogram1D.h>
16 #include <AIDA/IHistogram2D.h>
17 // endif
18 
19 //root
20 #include <TH1F.h>
21 
22 // Marlin
23 #include "marlin/Processor.h"
24 #include "TimePixPixelMode.h"
25 #include "lccd/ConditionsMap.hh"
26 #include "TimePixMapListener.h"
27 
28 namespace AIDA
29 {
30  class IHistogram2D;
31  class IHistogram3D;
32 
33 }
34 
35 namespace marlintpc
36 {
37 
38 /* the following comment is tranfered to doxygen documentation
39  * which begins with a second asterix, or in case of on line comment an extra third slash
40  */
67 class TimePixHitCenterCalculatorProcessor : public marlin::Processor
68 {
69 
70  public:
71 
72  /* This method will be called by the marlin package
73  * It returns a processor of the currend type (here TimePixHitCenterCalculatorProcessor)
74  */
75  virtual Processor* newProcessor()
76  {
78  }
79 
80  /* the default constructor
81  * here the processor parameters are registered to the marlin package
82  * other initialisation should be placed in the init method
83  */
85 
86  /* Called at the beginning of the job before anything is read.
87  * Use to initialize the processor, e.g. book histograms
88  */
89  virtual void init() ;
90 
91  /* Called for every run.
92  * in this processor it is not used
93  */
94  virtual void processRunHeader(lcio::LCRunHeader* run) ;
95 
96  /* Called for every event - the working horse.
97  * Here the real conversion take place
98  */
99  virtual void processEvent(lcio::LCEvent * evt) ;
100 
101  /* This method is only called if the check flag is set (default) in the main processor
102  * (where the input files are given)
103  * It should be used to create check plots which are not needed in a complete analysis
104  * (where normaly the check flag is deactivated)
105  */
106  virtual void check(lcio::LCEvent * evt) ;
107 
108 
109  /* Called after data processing for clean up.
110  * e.g. saving control histogramms, delete created objects
111  * (which are not stored in a collection/event), etc.
112  */
113  virtual void end() ;
114 
115  protected:
116 
117  /* normally the doxygen documentation is palced before the method/variable
118  * but for one line comments in case of variables it may be more convenied for you
119  * to place it after the variable. In this case you use an arrow to tell doxygen
120  * to which variable the commet belongs to.
121  */
122 
123  std::string _inputColName ;
124  std::string _outputColName ;
125  std::string _modeMapColName ;
126  std::string _modeMapCorrName ;
127 
128  /*upper threshold of clock cycles, which a pixel is allowed to have to
129  *be part of the cluster center calculation
130  */
131  int _max_zDiffusion_perCluster;
132 
133  double _shutter;
135  double _driftVelocity;
138 
139  /*if there are less than _minNrOfPixelsToCalcTime with 4 or more neighbors with charge
140  *all time pixels are taken into account for mean time calculation
141  */
142  int _minNrOfPixelsToCalcTime;
143 
144  /*threshold for the meancalculation, all pixel further away in z than
145  *rmsCut * RMSofDistributon are ignorred
146  */
147  int _rmsCut;
148 
149  /* give the status which is set to the transient flag of the output collection
150  * it is an int instead of a boolean, because the processor parameter cannot be a boolean
151  */
152  int _outputIsTransient;
153 
157  TH1F * _clusterHisto;
158 
159  tpcconddata::TimePixMap * _timePixMap;
160 
161  int countNrOfNeighboringPixelsWithHit( int chipID, int pixelID, std::vector<LCObject*> DataVec );
162 
163 
164  private:
165 // AIDA::IHistogram2D * histoCluster;
166 // AIDA::IHistogram2D * histoSP;
167 // AIDA::IHistogram3D * histo3D;
168 
169 } ;
170 
171 }
172 
173 #endif
174 
175 
176 
double _shutter
Definition: TimePixHitCenterCalculatorProcessor.h:133
double _driftVelocity
Definition: TimePixHitCenterCalculatorProcessor.h:135
AIDA::IHistogram1D * _zDistancesPixelsInClusters_afterCleaning
Definition: TimePixHitCenterCalculatorProcessor.h:155
double _readoutFrequency
Definition: TimePixHitCenterCalculatorProcessor.h:134
std::string _modeMapCorrName
Definition: TimePixHitCenterCalculatorProcessor.h:126
bool _keepClusterHistoFlag
Definition: TimePixHitCenterCalculatorProcessor.h:137
bool _multiShutter
Definition: TimePixHitCenterCalculatorProcessor.h:136
std::string _outputColName
Definition: TimePixHitCenterCalculatorProcessor.h:124
AIDA::IHistogram1D * _zclusterCenterBeforeMinusAfterCleaning
Definition: TimePixHitCenterCalculatorProcessor.h:156
calculates the center of gravity of each cluster, weighted by charge information. ...
Definition: TimePixHitCenterCalculatorProcessor.h:67
TH1F * _clusterHisto
Root histo containing z Values of Pixels in a Cluster.
Definition: TimePixHitCenterCalculatorProcessor.h:157
std::string _inputColName
Definition: TimePixHitCenterCalculatorProcessor.h:123
std::string _modeMapColName
Definition: TimePixHitCenterCalculatorProcessor.h:125
AIDA::IHistogram1D * _zDistancesPixelsInClusters_beforeCleaning
Definition: TimePixHitCenterCalculatorProcessor.h:154