MarlinTPC  1.2.0
ModuleDistortionCalculatorProcessor.h
1 /*
2  * ModuleDistortionCalculatorProcessor.h
3  *
4  * Created on: June 6, 2013
5  * Author: amunnich
6  */
7 
8 #ifndef MODULEDISTORTIONCALCULATORPROSECCOR_H
9 #define MODULEDISTORTIONCALCULATORPROSECCOR_H
10 
11 #include <marlin/Processor.h>
12 #include <lcio.h>
13 
14 #include "ModuleDistortionCalculator.h"
15 
16 
17 namespace marlintpc
18 {
33  class ModuleDistortionCalculatorProcessor : public marlin::Processor
34  {
35  public:
36 
37  virtual Processor* newProcessor() { return new ModuleDistortionCalculatorProcessor; }
38 
40 
41  virtual void init();
42 
43  virtual void processRunHeader(lcio::LCRunHeader* run);
44 
45  virtual void processEvent(lcio::LCEvent* evt);
46 
47  virtual void check(lcio::LCEvent* evt);
48 
49  virtual void end();
50 
51  void WriteDistortionFiles(std::string filename,std::map< std::pair<int,int>, std::pair<double,double> > results);
52  void WriteRootFile();
53 
54  protected:
55  /* the place for protected and private member data and functions */
56  std::string _inputColNameTrackHits;
57  std::string _inputColNameTrackFit;
58 
59  private:
60  int _usedEvents;
61  int _fillCount;
62  std::string _distortionXYOutputFileName;
63  std::string _distortionRowOutputFileName;
64  std::string _distortionZOutputFileName;
65  std::string _rootOutputFileName;
66 
67  ModuleDistortionCalculator * _myModuleDistortionCalculator;
68 
72  std::map< std::pair<int,int>, TH1*> _HistogramsXY;
73  std::map< std::pair<int,int>, TH1*> _HistogramsRow;
74  std::map< std::pair<int,int>, TH1*> _HistogramsZ;
75 
79  std::map< std::pair<int,int>, std::pair<double,double> > _ResultsXY;
80  std::map< std::pair<int,int>, std::pair<double,double> > _ResultsRow;
81  std::map< std::pair<int,int>, std::pair<double,double> > _ResultsZ;
82 
83  const gear::TPCParameters* _GearParameters;
84  };
85 }
86 
87 #endif //MODULEDISTORTIONCALCULATORPROSECCOR_H
std::string _inputColNameTrackHits
Name of the input collection for the hits.
Definition: ModuleDistortionCalculatorProcessor.h:56
Marlin processor for distortion analysis Takes two collections each of type track.
Definition: ModuleDistortionCalculatorProcessor.h:33
std::string _inputColNameTrackFit
Name of the input collection for the track parameters.
Definition: ModuleDistortionCalculatorProcessor.h:57
Class to calculate distortions per row along the row.
Definition: ModuleDistortionCalculator.h:28