MarlinTPC  1.2.0
TimePixOccupancyProcessor.h
1 #ifndef TIMEPIX_OCCUPANCY_PROCESSOR_H
2 #define TIMEPIX_OCCUPANCY_PROCESSOR_H 1
3 
4 //LCIO
5 #include <lcio.h>
6 #include <IMPL/LCCollectionVec.h>
7 #include <EVENT/TrackerData.h>
8 
9 //MARLIN
10 #include <marlin/Processor.h>
11 #include <marlin/Global.h>
12 
13 //C++
14 #include <map>
15 #include <iostream>
16 
17 //root+AIDA
18 #include <TH2I.h>
19 //#ifdef MARLIN_USE_AIDA // the whole processor does not make sense without aida
20 #include <AIDA/AIDA.h>
21 #include <marlin/AIDAProcessor.h>
22 #include <AIDA/IHistogramFactory.h>
23 #include <AIDA/IHistogram2D.h>
24 // endif
25 
26 
27 namespace AIDA{
28  class IHistogram2D;
29 }
30 
31 
32 namespace marlintpc
33 {
34 
35  class TrackFitterFactory;
36 // class TrackFitterBase;
37 
53  class TimePixOccupancyProcessor : public marlin::Processor{
54 
55  public:
56 
57  virtual Processor* newProcessor() { return new TimePixOccupancyProcessor ; }
58 
60 
62 
63  virtual void init();
64 
65  virtual void processRunHeader(lcio::LCRunHeader* run ) ;
66 
67  virtual void processEvent(lcio::LCEvent * evt ) ;
68 
69  virtual void end();
70 
71  protected:
72 
73  std::string _inputColName ;
74 
75 // TrackFitterBase *trackFitter;
76 // TrackFitterFactory *_fitterFactory; ///< The fitter factory
77 
79  std::map<int, AIDA::IHistogram2D *> _timePixOccupancyHistos;
80 
81  int _nColumns;
82  int _nRows;
85 
86  std::vector<int> _chipDirections;
87  std::vector<int> _chipIDs;
88 
90 
91  };
92 }
93 
94 #endif // TIMEPIX_OCCUPANCY_PROCESSOR_H
std::vector< int > _chipIDs
ID number(s) of the chip(s)
Definition: TimePixOccupancyProcessor.h:87
std::map< int, AIDA::IHistogram2D * > _timePixOccupancyHistos
< Map with the occupancy histograms, one per chip
Definition: TimePixOccupancyProcessor.h:79
TH2I * _allChipsOccupancy
Histo showing the occupancy for all chips.
Definition: TimePixOccupancyProcessor.h:89
Count how many times a pixel has been hit on the TimePix chip.
Definition: TimePixOccupancyProcessor.h:53
int _nRows
Number of rows on the chip.
Definition: TimePixOccupancyProcessor.h:82
virtual void processEvent(lcio::LCEvent *evt)
Definition: TimePixOccupancyProcessor.cc:109
int _nRowModules
Number of modules/chips in a row.
Definition: TimePixOccupancyProcessor.h:84
std::string _inputColName
the name of the input collection
Definition: TimePixOccupancyProcessor.h:73
int _nColumnModules
Number of modules/chips in a row.
Definition: TimePixOccupancyProcessor.h:83
std::vector< int > _chipDirections
Vector containing the position of the zero on the chip.
Definition: TimePixOccupancyProcessor.h:86
int _nColumns
Number of colmns on the chip.
Definition: TimePixOccupancyProcessor.h:81