MarlinTPC  1.2.0
PixelSpectrumProcessor.h
1 #ifndef PixelClockFinderProcessor_h
2 #define PixelClockFinderProcessor_h 1
3 
4 // C++
5 #include <string>
6 #include <iostream>
7 #include <sstream>
8 #include <fstream> // needed to write log File
9 
10 // LCIO
11 #include "lcio.h"
12 #include <EVENT/TrackerData.h>
13 
14 // Marlin
15 #include "marlin/Processor.h"
16 #include "TimePixPixelMode.h"
17 #include "lccd/ConditionsMap.hh"
18 #include <TimePixMapListener.h>
19 #include <TimePixPixelMode.h>
20 #include <marlin/AIDAProcessor.h>
21 #include <marlin/Global.h>
22 
23 // Aida
24 #ifdef MARLIN_USE_AIDA
25 #include <AIDA/AIDA.h>
26 #include <marlin/AIDAProcessor.h>
27 #include <AIDA/IHistogram2D.h>
28 #endif
29 
30 //root
31 #include "TH2F.h"
32 
33 //GEAR
34 #include <gear/TPCModule.h>
35 #include <gear/TPCParameters.h>
36 
37 
38 namespace AIDA {
39  class IHistogram1D;
40  class IHistogram2D;
41 
42 
43 }
44 
45 namespace marlintpc{
46 
47  /* the following comment is tranfered to doxygen documentation
48  * which begins with a second asterix, or in case of on line comment an extra third slash
49  */
77  class PixelSpectrumProcessor : public marlin::Processor {
78 
79  public:
80 
81  /* This method will be called by the marlin package
82  * It returns a processor of the currend type (here TimePixHitCenterCalculatorProcessor)
83  */
84  virtual Processor* newProcessor() { return new PixelSpectrumProcessor ; }
85 
86  /* the default constructor
87  * here the processor parameters are registered to the marlin package
88  * other initialisation should be placed in the init method
89  */
91 
92  /* Called at the beginning of the job before anything is read.
93  * Use to initialize the processor, e.g. book histograms
94  */
95  virtual void init() ;
96 
97  /* Called for every run.
98  * in this processor it is not used
99  */
100  virtual void processRunHeader( lcio::LCRunHeader* run ) ;
101 
102  /* Called for every event - the working horse.
103  * Here the real conversion take place
104  */
105  virtual void processEvent( lcio::LCEvent * evt ) ;
106 
107  virtual void check( lcio::LCEvent *evt );
108 
109  virtual void end();
110 
111 
112 
113 
114 
115 
116  protected:
117 
118  /* normally the doxygen documentation is palced before the method/variable
119  * but for one line comments in case of variables it may be more convenied for you
120  * to place it after the variable. In this case you use an arrow to tell doxygen
121  * to which variable the commet belongs to.
122  */
123 
124  std::string _inputColName ;
125  std::string _modeMapColName ;
126  std::string _modeMapCorrName ;
127  std::string _mode;
128  std::string _logFile;
129 
130  tpcconddata::TimePixMap * _timePixMap;
131  AIDA::IHistogram1D * _mySpectrumHisto;
132 
133  /* Histo used to store a occupancy plot of all
134  * pixels below a given threshold (_LowTH)
135  */
136  AIDA::IHistogram2D * _myPixelAboveTH_Location2dHisto;
137 
138  /* Histo used to store a occupancy plot of all
139  * pixels above a given threshold (_HighTH)
140  */
141  AIDA::IHistogram2D * _myPixelBelowTH_Location2dHisto;
142 
143 
144  double _shutter;
146 
148 
149  int _nBins;
150  int _HighTH;
151  int _LowTH;
152  float _min_clock;
153  float _max_clock;
154  int _lowerBadCountsLimit;
155 
156  private:
157 // AIDA::IHistogram2D * histoCluster;
158 // AIDA::IHistogram2D * histoSP;
159 // AIDA::IHistogram3D * histo3D;
160 
161  } ;
162 
163 }
164 
165 #endif
166 
167 
std::string _mode
Definition: PixelSpectrumProcessor.h:127
float _max_clock
Definition: PixelSpectrumProcessor.h:153
std::string _logFile
-positon of logfile
Definition: PixelSpectrumProcessor.h:128
int _LowTH
Definition: PixelSpectrumProcessor.h:151
std::string _inputColName
Definition: PixelSpectrumProcessor.h:124
double _shutter
Definition: PixelSpectrumProcessor.h:144
float _min_clock
Definition: PixelSpectrumProcessor.h:152
bool _multiShutter
Definition: PixelSpectrumProcessor.h:147
double _readoutFrequency
Definition: PixelSpectrumProcessor.h:145
int _HighTH
Definition: PixelSpectrumProcessor.h:150
int _nBins
Definition: PixelSpectrumProcessor.h:149
std::string _modeMapColName
Definition: PixelSpectrumProcessor.h:125
std::string _modeMapCorrName
Definition: PixelSpectrumProcessor.h:126
PixelClockFinderProcessor creates a ToT or ToA spectrum of all pixels on the chip and two occupancy p...
Definition: PixelSpectrumProcessor.h:77
AIDA::IHistogram1D * _mySpectrumHisto
Definition: PixelSpectrumProcessor.h:131