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