MarlinTPC  1.2.0
ResolutionPerformanceProcessor.h
1 #ifndef RESOLUTIONPERFORMANCEPROCESSOR_H
2 #define RESOLUTIONPERFORMANCEPROCESSOR_H
3 
4 #include <marlin/Processor.h>
5 #include "marlin/Global.h"
6 
7 #include <lcio.h>
8 #include <string>
9 #include "TrackFitterBase.h"
10 #include <EVENT/TrackerHit.h>
11 
12 //MarlinTPC
13 #include "ModuleDistortionCalculator.h"
14 
15 //GEAR
16 #include "gear/TPCParameters.h"
17 
18 //ROOT
19 #include "TH1.h"
20 #include "TH2.h"
21 #include "TNtuple.h"
22 
23 
24 // In case you want AIDA histograms
25 
26 namespace marlintpc
27 {
28 
57 class ResolutionPerformanceProcessor : public marlin::Processor
58 {
59 public:
60 
61  virtual Processor* newProcessor() { return new ResolutionPerformanceProcessor; }
62 
64 
65  virtual void init();
66 
67  virtual void processRunHeader(lcio::LCRunHeader* run);
68 
69  virtual void processEvent(lcio::LCEvent* evt);
70 
71  virtual void check(lcio::LCEvent* evt);
72 
73  virtual void end();
74 
75 
76 
77 protected:
78  /* the place for protected and private member data and functions */
79  std::string _inputColName;
80 
81 private:
82  double calcHitPhi(TrackerHit * firstHit, TrackerHit * secondHit);
83 
84  double _bfieldScaleFactor;
85  int _xyResolutionBins;
86  float _xyResolutionRange;
87  int _zResolutionBins;
88  float _zResolutionRange;
89  int _chargeBins;
90  int _chargeUpperBound;
91  bool _useHitsWithOverflow;
92 
96  std::map< std::pair<int,int>, TH1*> _zDistanceRow;
97  std::map< std::pair<int,int>, TH1*> _xyDistanceRow;
98  std::map< std::pair<int,int>, TH1*> _zResidualRow;
99  std::map< std::pair<int,int>, TH1*> _xyResidualRow;
100  std::map< std::pair<int,int>, TH1*> _phiRow;
101 
102  std::map< std::pair<int,int>, TH2*> _zResidualVSChargeRow;
103 
107  TH1 * _zDistanceAll;
108  TH1 * _xyDistanceAll;
109  TH1 * _zResidualAll;
110  TH1 * _xyResidualAll;
111 
112  TH2 * _zResidualVSChargeAllRows;
113  TH2 * _xyResidualVSChargeAllRows;
114 
115  TNtuple * _allRowsTuple;
116  TNtuple * _singleRowsTuple;
117  TNtuple * _bestRowTuple;
118 
119  TNtuple * _zResidualVSChargeAllRowsTuple;
120  TNtuple * _zResidualVSChargeSingleRowsTuple;
121 
122  TrackFitterBase * _trackFitter;
123  int _meanMethodZ;
124  int _meanMethodXY;
125  int _bestModule;
126  int _bestRow;
127 
128  ModuleDistortionCalculator * _myModuleDistortionCalculator;
129  const gear::TPCParameters* _gearParameters;
130 
131  float _maxChargeCut;
132  float _minChargeCut;
133  int _minBinsRiseTimeCut;
134 };
135 } // namespace marlintpc
136 #endif // RESOLUTIONPERFORMANCEPROCESSOR_H
The TrackFitterBase is a virtual class from which the actual track fitters are derived.
Definition: TrackFitterBase.h:44
std::string _inputColName
Name of the input collection.
Definition: ResolutionPerformanceProcessor.h:79
Resolution calculator.
Definition: ResolutionPerformanceProcessor.h:57
Class to calculate distortions per row along the row.
Definition: ModuleDistortionCalculator.h:28