Adding a reminder for coders
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALQADataMakerRec.h
CommitLineData
9e47432c 1#ifndef ALIEMCALQADataMakerRec_H
2#define ALIEMCALQADataMakerRec_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*
7 Produces the data needed to calculate the quality assurance.
8 All data must be mergeable objects.
9
10 Based on PHOS code written by
11 Y. Schutz CERN July 2007
38986b78 12
13 Created one histogram for QA shifter;-- Yaxian Mao: 11/2009
14 The idea:average counts for all the towers should be flat
15 Change all existing histograms as experts
16
17 Change histograms for DQM shifter: -- Yaxian Mao 04/2010
18 Calcuate the amplitude ratio from current run and the LED reference, for QAChecker use
19 Also calculate the ratio of amplitude from LED Monitor system (current/Reference), to check LED system
20
9e47432c 21*/
22
23
24// --- ROOT system ---
25class TH1F ;
38986b78 26class TH1I ;
27class TH2F ;
28class TH2 ;
29class TLine ;
30class TText ;
31class TProfile ;
9e47432c 32class TObjArray ;
33
34// --- Standard library ---
35
36// --- AliRoot header files ---
37#include "AliQADataMakerRec.h"
def665cb 38class AliCaloRawAnalyzer;
9f966f11 39class AliCaloRawAnalyzerKStandard;
38986b78 40class AliEMCALGeoParams;
9e47432c 41
42class AliEMCALQADataMakerRec: public AliQADataMakerRec {
43
44public:
45 //Histograms for Raw data control
46 enum HRawType_t {
47 // first normal Low Gain and High Gain info
48 kNsmodLG,kNsmodHG,kTimeLG,kTimeHG,
00957c37 49 kNtotLG,kNtotHG,kSigHG,kSigLG,
9e47432c 50 kPedLG,kPedHG,
38986b78 51 k2DRatioAmp,kRatioDist, kLEDMonRatio, kLEDMonRatioDist,
9e47432c 52 // then TRU info
53 kNsmodTRU,kTimeTRU,
54 kSigTRU,kNtotTRU,
def665cb 55 kPedTRU,
5c6517c3 56 kNL0TRU, kTimeL0TRU,
9e47432c 57 // and also LED Mon info
58 kNsmodLGLEDMon,kNsmodHGLEDMon,kTimeLGLEDMon,kTimeHGLEDMon,
59 kSigLGLEDMon,kSigHGLEDMon,kNtotLGLEDMon,kNtotHGLEDMon,
def665cb 60 kPedLGLEDMon,kPedHGLEDMon
9e47432c 61 } ;
62
63 //Histograms for RecPoints control
64 enum HRPType_t {kRecPE,kRecPM,kRecPDigM};
65
66 //Histograms for ESDs control
67 enum HESDType_t {kESDCaloClusE,kESDCaloClusM,kESDCaloCellA,kESDCaloCellM} ;
68
69
70public:
def665cb 71 enum fitAlgorithm {kFastFit=1, kNeuralNet = 2, kLMS = 4, kPeakFinder = 5, kCrude = 6};
72 AliEMCALQADataMakerRec(fitAlgorithm fitAlgo = kNeuralNet) ; // ctor
73
9e47432c 74 AliEMCALQADataMakerRec(const AliEMCALQADataMakerRec& qadm) ;
75 AliEMCALQADataMakerRec& operator = (const AliEMCALQADataMakerRec& qadm) ;
76 virtual ~AliEMCALQADataMakerRec() {;} // dtor
77
def665cb 78 Int_t GetFittingAlgorithm() const {return fFittingAlgorithm; }
79 void SetFittingAlgorithm(Int_t val);
80 AliCaloRawAnalyzer *GetRawAnalyzer() const { return fRawAnalyzer;}
9f966f11 81 AliCaloRawAnalyzerKStandard *GetRawAnalyzerTRU() const { return fRawAnalyzerTRU;}
def665cb 82
9e47432c 83 void SetSuperModules(int i) {fSuperModules = i;}; //The number of SuperModules
84 int GetSuperModules() const {return fSuperModules;}; //The number of SuperModules
85
86 // for pedestal calculation with raw data
87 void SetFirstPedestalSample(int i) {fFirstPedestalSample = i;}; // first sample
88 int GetFirstPedestalSample() const {return fFirstPedestalSample;}; // first sample
89 void SetLastPedestalSample(int i) {fLastPedestalSample = i;}; // last sample
90 int GetLastPedestalSample() const {return fLastPedestalSample;}; // last sample
def665cb 91 void SetFirstPedestalSampleTRU(int i) {fFirstPedestalSampleTRU = i;}; // first sample, TRU
92 int GetFirstPedestalSampleTRU() const {return fFirstPedestalSampleTRU;}; // first sample, TRU
93 void SetLastPedestalSampleTRU(int i) {fLastPedestalSampleTRU = i;}; // last sample, TRU
94 int GetLastPedestalSampleTRU() const {return fLastPedestalSampleTRU;}; // last sample, TRU
95
96 // for selection of interesting signal (max-min) range
97 // Low Gain channels
98 void SetMinSignalLG(int i) {fMinSignalLG = i;};
99 int GetMinSignalLG() const {return fMinSignalLG;};
100 void SetMaxSignalLG(int i) {fMaxSignalLG = i;};
101 int GetMaxSignalLG() const {return fMaxSignalLG;};
102 // High Gain channels
103 void SetMinSignalHG(int i) {fMinSignalHG = i;};
104 int GetMinSignalHG() const {return fMinSignalHG;};
105 void SetMaxSignalHG(int i) {fMaxSignalHG = i;};
106 int GetMaxSignalHG() const {return fMaxSignalHG;};
107 // TRU channels
108 void SetMinSignalTRU(int i) {fMinSignalTRU = i;};
109 int GetMinSignalTRU() const {return fMinSignalTRU;};
110 void SetMaxSignalTRU(int i) {fMaxSignalTRU = i;};
111 int GetMaxSignalTRU() const {return fMaxSignalTRU;};
112 // LEDMon channels
113 void SetMinSignalLGLEDMon(int i) {fMinSignalLGLEDMon = i;};
114 int GetMinSignalLGLEDMon() const {return fMinSignalLGLEDMon;};
115 void SetMaxSignalLGLEDMon(int i) {fMaxSignalLGLEDMon = i;};
116 int GetMaxSignalLGLEDMon() const {return fMaxSignalLGLEDMon;};
117 void SetMinSignalHGLEDMon(int i) {fMinSignalHGLEDMon = i;};
118 int GetMinSignalHGLEDMon() const {return fMinSignalHGLEDMon;};
119 void SetMaxSignalHGLEDMon(int i) {fMaxSignalHGLEDMon = i;};
120 int GetMaxSignalHGLEDMon() const {return fMaxSignalHGLEDMon;};
9e47432c 121
122 virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
38986b78 123 void GetCalibRefFromOCDB() ;
9e47432c 124 virtual void InitESDs() ;
125 virtual void InitDigits() ;
126 virtual void InitRecPoints() ;
127 virtual void InitRaws() ;
128 virtual void MakeESDs(AliESDEvent * esd) ;
129 virtual void MakeDigits() ;
130 virtual void MakeDigits(TTree * digTree) ;
131 virtual void MakeRecPoints(TTree * recpoTree) ;
132 virtual void MakeRaws(AliRawReader* rawReader) ;
133 virtual void StartOfDetectorCycle() ;
134
135private:
38986b78 136 void ConvertProfile2H(TProfile * p, TH2 * histo) ; //change the profile plot to a 2D histogram
137
92d9f317 138 Int_t fFittingAlgorithm; // select the fitting algorithm
139
140 AliCaloRawAnalyzer *fRawAnalyzer; // for signal fitting
9f966f11 141 AliCaloRawAnalyzerKStandard *fRawAnalyzerTRU; // for signal fitting, for TRU
def665cb 142
9e47432c 143 int fSuperModules; //The number of SuperModules activated
def665cb 144 int fFirstPedestalSample; // first sample for pedestal calculation, in bunch
145 int fLastPedestalSample; // last sample for pedestal calculation, in bunch
146 int fFirstPedestalSampleTRU; // first sample for pedestal calculation, in bunch
147 int fLastPedestalSampleTRU; // last sample for pedestal calculation, in bunch
148 int fMinSignalLG; // minimum signal, for Low Gain channels
149 int fMaxSignalLG; // maximum signal, for Low Gain channels
9e47432c 150 int fMinSignalHG; // minimum signal, for High Gain channels
151 int fMaxSignalHG; // maximum signal, for High Gain channels
def665cb 152 int fMinSignalTRU; // minimum signal, for TRU channels
153 int fMaxSignalTRU; // maximum signal, for TRU channels
154 int fMinSignalLGLEDMon; // minimum signal, for LEDMon channels, low gain
155 int fMaxSignalLGLEDMon; // maximum signal, for LEDMon channels, low gain
156 int fMinSignalHGLEDMon; // minimum signal, for LEDMon channels, high gain
157 int fMaxSignalHGLEDMon; // maximum signal, for LEDMon channels, high gain
158
38986b78 159 TProfile * fCalibRefHistoPro ; // Profile reference histogram from LED run
160 TH2F * fCalibRefHistoH2F ; // H2F reference histogram from LED run
161 TProfile * fLEDMonRefHistoPro ; // Profile reference histogram from LED monitor
162 TH2F * fHighEmcHistoH2F ; // H2F reference histogram from LED run
38986b78 163// TText ** fTextSM ; //! Text info for each SM
164// TLine * fLineCol ; //! line to distinguish the different SM side: A side and C side
165// TLine * fLineRow ; //! line to distinguish the different SM sector 0 and 1
9e47432c 166
def665cb 167 ClassDef(AliEMCALQADataMakerRec,5) // description
9e47432c 168
169};
170
171#endif // AliEMCALQADataMakerRec_H