MarlinTPC  1.2.0
TimePixDigitisationProcessor.h
1 #ifndef TimePixDigitisationProcessor_h
2 #define TimePixDigitisationProcessor_h 1
3 
4 #include "VoxelTPC.h"
5 
6 //LCIO
7 #include "lcio.h"
8 
9 //MARLIN
10 #include "marlin/Processor.h"
11 #include "TimePixMapListener.h"
12 #include "TimePixPixelMode.h"
13 
14 //C++
15 #include <string>
16 
17 //GEAR
18 #include <gear/TPCParameters.h>
19 
20 namespace AIDA{
21  class IHistogram1D;
22 
23 }
24 
25 namespace marlintpc{
26 
34 class TimePixDigitisationProcessor : public marlin::Processor {
35 
36  public:
37 
38  virtual Processor* newProcessor() { return new TimePixDigitisationProcessor ; }
39 
40 
42  virtual ~TimePixDigitisationProcessor(){}
43 
47  virtual void init() ;
48 
51  virtual void processRunHeader(lcio::LCRunHeader* run ) ;
52 
55  virtual void processEvent(lcio::LCEvent * evt ) ;
56 
57 
58  virtual void check(lcio::LCEvent * evt ) ;
59 
60 
63  virtual void end() ;
64 
67  virtual int getTOT( TPCVoxel voxel );
68 
71  virtual int getTOT( std::vector< TPCVoxel > VoxelVec );
72 
75  virtual int getMEDIPIX( std::vector< TPCVoxel > VoxelVec );
76 
79  virtual int getTIME( std::vector< TPCVoxel > VoxelVec );
80 
81 
82 protected:
83 
86  std::string _inputCollectionName;
87  std::string _outputCollectionName;
88 
89  int _transient;
90  int _nColumn;
91  int _nRow;
92  int _chipID;
94  float _shutter;
98 
99  float _a;
100  float _b;
101  float _c;
102 
103 
104  gear::PadRowLayout2D const * _padLayout;
105 
106  VoxelTPC* _tpc;
107 
108  tpcconddata::TimePixMap * _timePixMap;
109 
110  AIDA::IHistogram1D * _distributionTimeValues;
111 };
112 
113 }
114 #endif
std::string _inputCollectionName
Input/output collection names.
Definition: TimePixDigitisationProcessor.h:86
int _chipID
chipID of current chip
Definition: TimePixDigitisationProcessor.h:92
float _c
parameter to calculate TOT from electrons TOT = c/(ln(Q-a)-b)
Definition: TimePixDigitisationProcessor.h:101
float _b
parameter to calculate TOT from electrons TOT = c/(ln(Q-a)-b)
Definition: TimePixDigitisationProcessor.h:100
int _nColumn
number of columns on chip
Definition: TimePixDigitisationProcessor.h:90
int _appliedThreshold
the threshold of the TOT counts, applied by experimenter
Definition: TimePixDigitisationProcessor.h:96
The VoxelTPC is a helper class containing a std::map of all TPCVoxels which contain charge...
Definition: VoxelTPC.h:42
virtual int getTIME(std::vector< TPCVoxel > VoxelVec)
gives back the time - counts from this voxel
Definition: TimePixDigitisationProcessor.cc:381
DOCU!!!!!!!!!!!!!
Definition: TimePixDigitisationProcessor.h:34
virtual void end()
Called after data processing for clean up.
Definition: TimePixDigitisationProcessor.cc:311
float _propFactorElectronsADC
conversion factor from ADC counts to electrons
Definition: TimePixDigitisationProcessor.h:95
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: TimePixDigitisationProcessor.cc:175
float _a
parameter to calculate TOT from electrons TOT = c/(ln(Q-a)-b)
Definition: TimePixDigitisationProcessor.h:99
virtual int getMEDIPIX(std::vector< TPCVoxel > VoxelVec)
gives back the medipix - counts from this voxel
Definition: TimePixDigitisationProcessor.cc:354
virtual void processRunHeader(lcio::LCRunHeader *run)
Called for every run.
Definition: TimePixDigitisationProcessor.cc:162
An LCFixedObject class to store charge in voxels of a TPC.
Definition: TPCVoxel.h:23
virtual int getTOT(TPCVoxel voxel)
gives back the tot - counts from this voxel
Definition: TimePixDigitisationProcessor.cc:318
float _shutter
the shutter time of the measurement in us
Definition: TimePixDigitisationProcessor.h:94
int _nRow
number of rows on chip
Definition: TimePixDigitisationProcessor.h:91
int _hardwareThreshold
the internal ADCcounts threshold of the chip
Definition: TimePixDigitisationProcessor.h:97
float _readoutFrequency
the readout frequency of chip in MHz
Definition: TimePixDigitisationProcessor.h:93
virtual void init()
Called at the begin of the job before anything is read.
Definition: TimePixDigitisationProcessor.cc:138