MarlinTPC  1.2.0
ChargeQualityProcessor.h
1 #ifndef CHARGEQUALITYPROCESSOR_H
2 #define CHARGEQUALITYPROCESSOR_H
3 
4 // C++
5 #include <string>
6 #include <fstream>
7 
8 // LCIO
9 #include "lcio.h"
10 
11 // Marlin
12 #include "marlin/Processor.h"
13 #include "lccd/ConditionsMap.hh"
14 //GEAR
15 #include "gear/TPCParameters.h"
16 
17 //ROOT
18 #include "TH1D.h"
19 #include "TNtuple.h"
20 
21 // Aida
22 #ifdef MARLIN_USE_AIDA
23 //AIDA
24 #include <marlin/AIDAProcessor.h>
25 #endif
26 
27 namespace marlintpc
28 {
29 
45 class ChargeQualityProcessor : public marlin::Processor
46 {
47 
48  public:
49 
50  /* This method will be called by the marlin package
51  * It returns a processor of the currend type
52  */
53  virtual Processor* newProcessor()
54  {
55  return new ChargeQualityProcessor ;
56  }
57 
58  /* the default constructor
59  * here the processor parameters are registered to the marlin package
60  * other initialisation should be placed in the init method
61  */
63 
64  /* Called at the beginning of the job before anything is read.
65  * Use to initialize the processor, e.g. book histograms
66  */
67  virtual void init() ;
68 
69  /* Called for every run.
70  * in this processor it is not used
71  */
72  virtual void processRunHeader(lcio::LCRunHeader* run) ;
73 
74  /* Called for every event - the working horse.
75  * Here the real conversion take place
76  */
77  virtual void processEvent(lcio::LCEvent * evt) ;
78 
79  /* This method is only called if the check flag is set (default) in the main processor
80  * (where the input files are given)
81  * It should be used to create check plots which are not needed in a complete analysis
82  * (where normaly the check flag is deactivated)
83  */
84  virtual void check(lcio::LCEvent * evt) ;
85 
86 
87  /* Called after data processing for clean up.
88  * e.g. saving control histogramms, delete created objects
89  * (which are not stored in a collection/event), etc.
90  */
91  virtual void end() ;
92 
93 
94 
95 
96  protected:
97 
98  std::string _inputColName ;
99  std::map< std::pair<int,int>, TH1*> _hitChargeRow;
100 
101  private:
102  TH1F* _histoQ;
103  TNtuple* _tuple;
105  int _Qmax;
106  int _meanMethod;
107  const gear::TPCParameters* _gearParameters;
108 } ;
109 
110 }
111 
112 #endif
113 
114 
115 
A processor to calculate the mean90 of the hit charge spectrum.
Definition: ChargeQualityProcessor.h:45
std::string _inputColName
Definition: ChargeQualityProcessor.h:98