]>
Commit | Line | Data |
---|---|---|
afae9650 | 1 | #ifndef ALIEMCALQADATAMAKERREC_H |
2 | #define ALIEMCALQADATAMAKERREC_H | |
9e47432c | 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 | ||
9e47432c | 23 | // --- ROOT system --- |
24 | class TH1F ; | |
38986b78 | 25 | class TH1I ; |
26 | class TH2F ; | |
27 | class TH2 ; | |
28 | class TLine ; | |
29 | class TText ; | |
30 | class TProfile ; | |
9e47432c | 31 | class TObjArray ; |
32 | ||
9e47432c | 33 | // --- AliRoot header files --- |
34 | #include "AliQADataMakerRec.h" | |
def665cb | 35 | class AliCaloRawAnalyzer; |
3d66fb5e | 36 | class AliEMCALGeometry; |
d0a23357 | 37 | #include "AliCaloConstants.h" |
38 | ||
9e47432c | 39 | class AliEMCALQADataMakerRec: public AliQADataMakerRec { |
40 | ||
41 | public: | |
d0a23357 | 42 | |
9e47432c | 43 | //Histograms for Raw data control |
44 | enum HRawType_t { | |
45 | // first normal Low Gain and High Gain info | |
46 | kNsmodLG,kNsmodHG,kTimeLG,kTimeHG, | |
00957c37 | 47 | kNtotLG,kNtotHG,kSigHG,kSigLG, |
9e47432c | 48 | kPedLG,kPedHG, |
38986b78 | 49 | k2DRatioAmp,kRatioDist, kLEDMonRatio, kLEDMonRatioDist, |
9e47432c | 50 | // then TRU info |
e4a4c62f | 51 | kNsmodTRU, |
9e47432c | 52 | kSigTRU,kNtotTRU, |
5c6517c3 | 53 | kNL0TRU, kTimeL0TRU, |
e4a4c62f | 54 | kNL0FirstTRU, kTimeL0FirstTRU, |
9e47432c | 55 | // and also LED Mon info |
56 | kNsmodLGLEDMon,kNsmodHGLEDMon,kTimeLGLEDMon,kTimeHGLEDMon, | |
57 | kSigLGLEDMon,kSigHGLEDMon,kNtotLGLEDMon,kNtotHGLEDMon, | |
3d66fb5e | 58 | kPedLGLEDMon,kPedHGLEDMon, |
59 | //and STU info | |
60 | kAmpL1, kGL1, kJL1, | |
61 | kGL1V0, kJL1V0, kSTUTRU | |
9e47432c | 62 | } ; |
63 | ||
64 | //Histograms for RecPoints control | |
65 | enum HRPType_t {kRecPE,kRecPM,kRecPDigM}; | |
66 | ||
67 | //Histograms for ESDs control | |
68 | enum HESDType_t {kESDCaloClusE,kESDCaloClusM,kESDCaloCellA,kESDCaloCellM} ; | |
d0a23357 | 69 | |
9e47432c | 70 | public: |
d0a23357 | 71 | |
a56549da | 72 | AliEMCALQADataMakerRec(Int_t fitAlgo = Algo::kStandard) ; // ctor |
73 | // Default fitter is kStandard=0 (see AliCaloConstants) | |
c1b3e790 | 74 | |
9e47432c | 75 | AliEMCALQADataMakerRec(const AliEMCALQADataMakerRec& qadm) ; |
76 | AliEMCALQADataMakerRec& operator = (const AliEMCALQADataMakerRec& qadm) ; | |
77 | virtual ~AliEMCALQADataMakerRec() {;} // dtor | |
78 | ||
2d774e1d | 79 | Int_t GetFittingAlgorithm() const {return fFittingAlgorithm;} |
d0a23357 | 80 | void SetFittingAlgorithm(Int_t val); |
2a5a8fbe | 81 | |
2d774e1d | 82 | AliCaloRawAnalyzer *GetRawAnalyzer() const {return fRawAnalyzer ;} |
83 | AliCaloRawAnalyzer *GetRawAnalyzerTRU() const {return fRawAnalyzerTRU;} | |
def665cb | 84 | |
9e47432c | 85 | void SetSuperModules(int i) {fSuperModules = i;}; //The number of SuperModules |
86 | int GetSuperModules() const {return fSuperModules;}; //The number of SuperModules | |
87 | ||
88 | // for pedestal calculation with raw data | |
a56549da | 89 | void SetFirstPedestalSample(int i) {fFirstPedestalSample = i;} // first sample |
d0a23357 | 90 | int GetFirstPedestalSample() const {return fFirstPedestalSample;} // first sample |
a56549da | 91 | void SetLastPedestalSample(int i) {fLastPedestalSample = i;} // last sample |
92 | int GetLastPedestalSample() const {return fLastPedestalSample;} // last sample | |
d0a23357 | 93 | |
a56549da | 94 | void SetFirstPedestalSampleTRU(int i) {fFirstPedestalSampleTRU = i;} // first sample, TRU |
d0a23357 | 95 | int GetFirstPedestalSampleTRU() const {return fFirstPedestalSampleTRU;} // first sample, TRU |
a56549da | 96 | void SetLastPedestalSampleTRU(int i) {fLastPedestalSampleTRU = i;} // last sample, TRU |
97 | int GetLastPedestalSampleTRU() const {return fLastPedestalSampleTRU;} // last sample, TRU | |
def665cb | 98 | |
99 | // for selection of interesting signal (max-min) range | |
100 | // Low Gain channels | |
a56549da | 101 | void SetMinSignalLG(int i) {fMinSignalLG = i;} |
d0a23357 | 102 | int GetMinSignalLG() const {return fMinSignalLG;} |
a56549da | 103 | void SetMaxSignalLG(int i) {fMaxSignalLG = i;} |
d0a23357 | 104 | int GetMaxSignalLG() const {return fMaxSignalLG;} |
105 | ||
def665cb | 106 | // High Gain channels |
a56549da | 107 | void SetMinSignalHG(int i) {fMinSignalHG = i;} |
d0a23357 | 108 | int GetMinSignalHG() const {return fMinSignalHG;} |
a56549da | 109 | void SetMaxSignalHG(int i) {fMaxSignalHG = i;} |
d0a23357 | 110 | int GetMaxSignalHG() const {return fMaxSignalHG;} |
111 | ||
def665cb | 112 | // TRU channels |
d0a23357 | 113 | void SetMinSignalTRU(int i) {fMinSignalTRU = i;} |
114 | int GetMinSignalTRU() const {return fMinSignalTRU;} | |
115 | void SetMaxSignalTRU(int i) {fMaxSignalTRU = i;} | |
116 | int GetMaxSignalTRU() const {return fMaxSignalTRU;} | |
117 | ||
def665cb | 118 | // LEDMon channels |
d0a23357 | 119 | void SetMinSignalLGLEDMon(int i) {fMinSignalLGLEDMon = i;} |
120 | int GetMinSignalLGLEDMon() const {return fMinSignalLGLEDMon;} | |
121 | void SetMaxSignalLGLEDMon(int i) {fMaxSignalLGLEDMon = i;} | |
122 | int GetMaxSignalLGLEDMon() const {return fMaxSignalLGLEDMon;} | |
123 | void SetMinSignalHGLEDMon(int i) {fMinSignalHGLEDMon = i;} | |
124 | int GetMinSignalHGLEDMon() const {return fMinSignalHGLEDMon;} | |
125 | void SetMaxSignalHGLEDMon(int i) {fMaxSignalHGLEDMon = i;} | |
126 | int GetMaxSignalHGLEDMon() const {return fMaxSignalHGLEDMon;} | |
9e47432c | 127 | |
128 | virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; | |
38986b78 | 129 | void GetCalibRefFromOCDB() ; |
d0a23357 | 130 | void GetTruChannelPosition( Int_t &globRow, Int_t &globColumn, Int_t module, Int_t ddl, Int_t branch, Int_t column ) const; |
9e47432c | 131 | virtual void InitESDs() ; |
132 | virtual void InitDigits() ; | |
133 | virtual void InitRecPoints() ; | |
134 | virtual void InitRaws() ; | |
135 | virtual void MakeESDs(AliESDEvent * esd) ; | |
136 | virtual void MakeDigits() ; | |
137 | virtual void MakeDigits(TTree * digTree) ; | |
138 | virtual void MakeRecPoints(TTree * recpoTree) ; | |
3d66fb5e | 139 | virtual void MakeRaws(AliRawReader* rawReader) ; |
afae9650 | 140 | virtual void MakeRawsSTU(AliRawReader* rawReader); |
9e47432c | 141 | virtual void StartOfDetectorCycle() ; |
142 | ||
143 | private: | |
38986b78 | 144 | |
d0a23357 | 145 | void ConvertProfile2H(TProfile * p, TH2 * histo) ; //change the profile plot to a 2D histogram |
146 | ||
2d774e1d | 147 | Int_t fFittingAlgorithm; // select the fitting algorithm, only used in copy ctor ... |
92d9f317 | 148 | |
2d774e1d | 149 | AliCaloRawAnalyzer *fRawAnalyzer; // for signal fitting |
150 | AliCaloRawAnalyzer *fRawAnalyzerTRU; // for TRU signal fitting | |
151 | AliEMCALGeometry *fGeom; // EMCAL geometry, needed for STU decoding | |
def665cb | 152 | |
d0a23357 | 153 | int fSuperModules; // The number of SuperModules activated |
154 | int fFirstPedestalSample; // first sample for pedestal calculation, in bunch | |
155 | int fLastPedestalSample; // last sample for pedestal calculation, in bunch | |
def665cb | 156 | int fFirstPedestalSampleTRU; // first sample for pedestal calculation, in bunch |
d0a23357 | 157 | int fLastPedestalSampleTRU; // last sample for pedestal calculation, in bunch |
2d774e1d | 158 | |
d0a23357 | 159 | int fMinSignalLG; // minimum signal, for Low Gain channels |
160 | int fMaxSignalLG; // maximum signal, for Low Gain channels | |
161 | int fMinSignalHG; // minimum signal, for High Gain channels | |
162 | int fMaxSignalHG; // maximum signal, for High Gain channels | |
163 | int fMinSignalTRU; // minimum signal, for TRU channels | |
164 | int fMaxSignalTRU; // maximum signal, for TRU channels | |
def665cb | 165 | int fMinSignalLGLEDMon; // minimum signal, for LEDMon channels, low gain |
166 | int fMaxSignalLGLEDMon; // maximum signal, for LEDMon channels, low gain | |
167 | int fMinSignalHGLEDMon; // minimum signal, for LEDMon channels, high gain | |
168 | int fMaxSignalHGLEDMon; // maximum signal, for LEDMon channels, high gain | |
169 | ||
38986b78 | 170 | TProfile * fCalibRefHistoPro ; // Profile reference histogram from LED run |
171 | TH2F * fCalibRefHistoH2F ; // H2F reference histogram from LED run | |
d0a23357 | 172 | TProfile * fLEDMonRefHistoPro; // Profile reference histogram from LED monitor |
173 | TH2F * fHighEmcHistoH2F ; // H2F reference histogram from LED run | |
2d774e1d | 174 | |
38986b78 | 175 | // TText ** fTextSM ; //! Text info for each SM |
176 | // TLine * fLineCol ; //! line to distinguish the different SM side: A side and C side | |
177 | // TLine * fLineRow ; //! line to distinguish the different SM sector 0 and 1 | |
9e47432c | 178 | |
2d774e1d | 179 | ClassDef(AliEMCALQADataMakerRec,6) // description |
9e47432c | 180 | |
181 | }; | |
182 | ||
afae9650 | 183 | #endif // AliEMCALQADATAMAKERREC_H |