1 #ifndef ALIANALYSISTASKEMCALTRIGGERQA_H
2 #define ALIANALYSISTASKEMCALTRIGGERQA_H
4 //------------------------------------------------------------------------//
5 // Fill histograms with basic QA information for EMCAL offline trigger //
6 // Author: Nicolas Arbor (LPSC-Grenoble), Rachid Guernane (LPSC-Grenoble)//
7 // Gustavo Conesa Balbastre (LPSC-Grenoble) //
10 //------------------------------------------------------------------------//
17 class AliEMCALGeometry;
21 class AliEMCALRecoUtils;
22 #include "AliEMCALGeoParams.h"
23 #include "AliAnalysisTaskSE.h"
25 class AliAnalysisTaskEMCALTriggerQA : public AliAnalysisTaskSE
28 AliAnalysisTaskEMCALTriggerQA(); // default constructor
30 AliAnalysisTaskEMCALTriggerQA(const char *name); // named constructor
32 virtual ~AliAnalysisTaskEMCALTriggerQA() { ; } // destructor
34 void ClusterAnalysis();
38 void FillTriggerPatchMaps(TString triggerclasses);
40 void FillClusterHistograms(Int_t triggerNumber, Bool_t maxCluster,
41 Float_t e,Float_t eta,Float_t phi,
42 Float_t ietamax,Float_t iphimax,
43 Float_t centrality, Float_t v0AC);
45 void FillCorrelationHistograms();
47 void FillEventCounterHistogram();
49 void FillL1GammaPatchHistograms();
51 void FillL1JetPatchHistograms();
53 void FillMapHistograms();
55 void FillV0Histograms();
59 void InitHistogramArrays() ;
61 void InitCellPatchMaps();
63 void LocalInit() { Init() ; }
65 void UserCreateOutputObjects();
67 void UserExec(Option_t *option);
69 AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ;
72 void SetEtaPhiEnMin(Float_t en) { fEtaPhiEnMin = en ; }
74 void SetTriggerEventBit(TString list) ;
76 // OADB and geometry settings
80 void SetGeometryName(TString name) { fGeoName = name ; }
84 void SwitchOnEMCALOADB() { fAccessOADB = kTRUE ; }
85 void SwitchOffEMCALOADB() { fAccessOADB = kFALSE ; }
87 void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
91 void SetTRUTotalSignalHistogramsRange(Int_t nbins, Float_t max) { fNBinsTRUSignal = nbins; fMaxTRUSignal = max ; }
92 void SetSTUTotalSignalHistogramsRange(Int_t nbins, Float_t max) { fNBinsSTUSignal = nbins; fMaxSTUSignal = max ; }
93 void SetV0TotalSignalHistogramsRange (Int_t nbins, Float_t max) { fNBinsV0Signal = nbins; fMaxV0Signal = max ; }
94 void SetSTUFEERatioHistogramsRange (Int_t nbins, Float_t max) { fNBinsSTUFEERatio = nbins; fMaxSTUFEERatio = max ; }
95 void SetSTUTRURatioHistogramsRange (Int_t nbins, Float_t max) { fNBinsSTUTRURatio = nbins; fMaxSTUFEERatio = max ; }
96 void SetClusterEHistogramsRange (Int_t nbins, Float_t max) { fNBinsClusterE = nbins; fMaxClusterE = max ; }
99 TList *fOutputList; //! Output list
101 AliEMCALRecoUtils *fRecoUtils; // RecoUtils
103 Bool_t fGeoSet ; // Geometry already set
104 AliEMCALGeometry *fGeometry; // Access to EMCAL geometry utils
105 TString fGeoName; // Name of geometry used
107 Bool_t fOADBSet ; // AODB parameters already set
108 Bool_t fAccessOADB ; // Get calibration from OADB for EMCAL
109 TString fOADBFilePath ; // Default path $ALICE_ROOT/OADB/EMCAL, if needed change
111 Int_t fBitEGA; // fBitEGA
112 Int_t fBitEJE; // fBitEJE
114 Float_t fEtaPhiEnMin; // Min energy for Eta/Phi histograms
116 Int_t fSTUTotal; // Sum of STU time sums
117 Float_t fTRUTotal; // Sum of TRU amplitudes
118 Float_t fV0Trigger; // V0 signal from trigger
119 Float_t fV0A; // V0 A signal
120 Float_t fV0C; // V0 C signal
122 // Event by event trigger recognition bit
123 Bool_t fEventMB ; // Bit for MB events
124 Bool_t fEventL0 ; // Bit for L0 events
125 Bool_t fEventL1G ; // Bit for L1 Gamma 1 events
126 Bool_t fEventL1G2 ; // Bit for L1 Gamma 2 events
127 Bool_t fEventL1J ; // Bit for L1 Jet 1 events
128 Bool_t fEventL1J2 ; // Bit for L1 JEt 2 events
129 Bool_t fEventCen ; // Bit for Central events
130 Bool_t fEventSem ; // Bit for Semi Central events
134 TH1F *fhNEvents; //! Number of selected events
135 TH2F *fhFORAmp; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column
136 TH2F *fhFORAmpL1G; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma trigger event
137 TH2F *fhFORAmpL1G2; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma2 trigger event
138 TH2F *fhFORAmpL1J; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event
139 TH2F *fhFORAmpL1J2; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet2 trigger event
140 TH2F *fhL0Amp; //! FALTRO signal per Row and Column for FOR involves L0 patch
141 TH2F *fhL0AmpL1G; //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event
142 TH2F *fhL0AmpL1J; //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event
143 TH2F *fhL1Amp; //! STU signal per Row and Column for FOR involves L0 patch
144 TH2F *fhL1GAmp; //! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left)
145 TH2F *fhL1G2Amp; //! STU signal per Row and Column for FOR position of L1 Gamma2 patch (top-left)
146 TH2F *fhL1JAmp; //! STU signal per Row and Column for FOR position of L1 Jet patch (top-left)
147 TH2F *fhL1J2Amp; //! STU signal per Row and Column for FOR position of L1 Jet2 patch (top-left)
148 TH2F *fhL1FOREnergy; //! STU signal per Row and Column for FOR position vs FOR energy
150 TH2F *fhL0Patch; //! FOR with L0 patch associated
151 TH2F *fhL1GPatch; //! FOR with L1 Gamma patch associated
152 TH2F *fhL1G2Patch; //! FOR with L1 Gamma patch associated
153 TH2F *fhL1GPatchNotFake; //! FOR with L1 Gamma patch associated but no energy in the related cells
154 TH2F *fhL1GPatchFake; //! FOR with L1 Gamma patch associated
155 TH2F *fhL1GPatchNotAllFake; //! FOR with at least 1 L1 Gamma patch associated that has energy in the related celles : not a fake event
156 TH2F *fhL1GPatchAllFake; //! FOR without any L1 Gamma patch associated with energy in the related cells: fake patch
157 TH2F *fhL1GPatchNotAllFakeMax; //! FOR with at least one L1 Gamma patch associated with energy in the related cell, maximal energy patch : not fake events
158 TH2F *fhL1GPatchAllFakeMax; //! FOR without any L1 Gamma patch associated with energy in the related cell, maximal energy patch : fake events
159 TH1F *fhL1GPatchNotAllFakeMaxE; //! Energy distrib of FOR for non fake events, patch of maximal energy
160 TH1F *fhL1GPatchAllFakeMaxE; //! Energy distrib FOR for fake events, patch of maximal energy
161 TH1F *fhL1GPatchNotAllFakeE; //! Energy distrib of FOR for non fake events, all patch energy
162 TH1F *fhL1GPatchAllFakeE; //! Energy distrib of FOR forfake events, all patch energy
163 TH1F *fhL1GPatchFakeE; //! Energy distrib of FOR for fake events, all patch energy
164 TH1F *fhL1GPatchNotFakeE; //! Energy distrib of FOR for non fake events, all patch energy
165 TH2F *fhNPatchFake; //! number of fake patchs per event vs. if all were fakes or not
166 TH2F *fhNPatchNotFake; //! number of non fake patchs per events vs. if all were fakes or not
168 TH2F *fhL1JPatch; //! FOR with L1 Jet patch associated
169 TH2F *fhL1J2Patch; //! FOR with L1 Jet patch associated
170 TH2F *fhFEESTU; //! Correlation FEE vs STU
171 TH2F *fhTRUSTU; //! Correlation TRU vs STU
172 TH2I *fhV0STU; //! Total signal STU vs V0C+V0S
174 TH2F *fhGPMaxVV0TT; //! V0 signal vs maximum gamma L1 patch
175 TH2F *fhJPMaxVV0TT; //! V0 signal vs maximum jet L1 patch
176 TProfile2D *fhFORMeanAmp; //! Mean FastOR(FEE) signal per Row and Column
177 TProfile2D *fhL0MeanAmp; //! Mean FastOR(TRU) signal per Row and Column
178 TProfile2D *fhL1MeanAmp; //! Mean FastOR(STU) signal per Row and Column
179 TH1F *fhV0[10]; //! V0 distribution for a triggered event
180 TH2F *fhL1GPatchMax; //! FOR of max. amplitude patch with L1 Gamma patch associated
181 TH2F *fhL1G2PatchMax; //! FOR of max. amplitude patch with L1 Gamma patch associated
182 TH2F *fhL1JPatchMax; //! FOR of max. amplitude patch with L1 Jet patch associated
183 TH2F *fhL1J2PatchMax; //! FOR of max. amplitude patch with L1 Jet patch associated
185 // Cluster vs trigger histograms
186 enum triggerType{kMBTrig = 0, kL0Trig = 1, kL1GammaTrig = 2, kL1GammaTrig2 = 3, kL1JetTrig = 4, kL1JetTrig2 = 5, kL1GammaOnlyTrig = 6, kL1JetOnlyTrig = 7, kCentralTrig = 8, kSemiCentralTrig = 9 };
188 TH1F *fhClusMBPure[3]; //! Clusters E distribution for pure MB trigger
189 TH1F *fhClusMaxMBPure[3]; //! Maximum E Cluster per event distribution for pure MB trigger
191 TH1F *fhClus[10]; //! Clusters E distribution for a trigger
192 TH1F *fhClusMax[10]; //! Maximum E Cluster per event distribution for MB trigger
194 TH2F *fhClusCen[10]; //! Clusters Centrality vs E distribution for a trigger
195 TH2F *fhClusCenMax[10]; //! Maximum E Cluster vs Centrality per event distribution for a trigger
197 TH2F *fhClusV0[10]; //! Clusters V0 vs E distribution for a trigger
198 TH2F *fhClusV0Max[10]; //! Maximum E Cluster vs Centrality per event distribution for a trigger
200 TH2F *fhClusEta[10]; //! Clusters eta vs E distribution for a trigger
201 TH2F *fhClusEtaMax[10]; //! Maximum E Cluster vs Eta per event distribution for a trigger
203 TH2F *fhClusPhi[10]; //! Clusters Phi vs E distribution for a trigger
204 TH2F *fhClusPhiMax[10]; //! Maximum E Cluster vs Phi per event distribution for a trigger
206 TH2F *fhClusEtaPhiHigh[10]; //! Clusters eta vs phi distribution for a trigger, energy above 10 GeV
207 TH2F *fhClusEtaPhiHighCluMax[10]; //! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above 10 GeV
209 TH2F *fhClusEtaPhiHighCellMax[10]; //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy above 10 GeV
210 TH2F *fhClusEtaPhiHighCellMaxCluMax[10]; //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy above 10 GeV
212 TH2F *fhClusEtaPhiLow[10]; //! Clusters eta vs phi distribution for MB trigger, energy below 10 GeV
213 TH2F *fhClusEtaPhiLowCluMax[10]; //! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
215 TH2F *fhClusEtaPhiLowCellMax[10]; //! Clusters maximum energy cell index eta vs phi distribution for MB trigger, energy below 10 GeV
216 TH2F *fhClusEtaPhiLowCellMaxCluMax[10]; //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy below 10 GeV
220 Int_t fNBinsSTUSignal ; // Number of bins for STU total signal histograms
221 Float_t fMaxSTUSignal ; // Maximum value for TRU total signal histograms
222 Int_t fNBinsTRUSignal ; // Number of bins for TRU total signal histograms
223 Float_t fMaxTRUSignal ; // Maximum value for TRU total signal histograms
224 Int_t fNBinsV0Signal ; // Number of bins for V0 total signal histograms
225 Float_t fMaxV0Signal ; // Maximum value for V0 total signal histograms
226 Int_t fNBinsSTUFEERatio ; // Number of bins for STU/FEE ratios histograms
227 Float_t fMaxSTUFEERatio ; // Maximum value for STU/FEE ratios histograms
228 Int_t fNBinsSTUTRURatio ; // Number of bins for STU/TRU ratios histograms
229 Float_t fMaxSTUTRURatio ; // Maximum value for STU/TRU ratios histograms
230 Int_t fNBinsClusterE ; // Number of bins for E cluster histograms
231 Float_t fMaxClusterE ; // Maximum value for E cluster histograms
233 //Constants needed by the class: EMCAL
234 static const int fgkFALTRORows = AliEMCALGeoParams::fgkEMCALRows*(AliEMCALGeoParams::fgkEMCALModules-7)/2; // total number
235 // of fake altro rows in EMCAL
236 // (ALTRO channels in one SM times 5 SM divided by 2 per FALTRO)
238 static const int fgkFALTROCols = AliEMCALGeoParams::fgkEMCALCols; // total number of fake altro columns in EMCAL
239 // (ALTRO channels in one SM times 2 SM divided by 2 per FALTRO)
242 Double_t fMapCell [fgkFALTRORows][fgkFALTROCols]; // Cell map
243 Double_t fMapCellL1G [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1G
244 Double_t fMapCellL1G2 [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1G2
245 Double_t fMapCellL1J [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1J
246 Double_t fMapCellL1J2 [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1J2
247 Double_t fMapTrigL0 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L0
248 Double_t fMapTrigL1 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1
249 Double_t fMapTrigL0L1G[fgkFALTRORows][fgkFALTROCols]; // Patch map for L0L1G
250 Double_t fMapTrigL0L1J[fgkFALTRORows][fgkFALTROCols]; // Patch map for L0L1J
251 Double_t fMapTrigL1G [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1G
252 Double_t fMapTrigL1G2 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1G2
253 Double_t fMapTrigL1J [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1J
254 Double_t fMapTrigL1J2 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1J2
257 AliAnalysisTaskEMCALTriggerQA (const AliAnalysisTaskEMCALTriggerQA&); // not implemented
259 AliAnalysisTaskEMCALTriggerQA& operator=(const AliAnalysisTaskEMCALTriggerQA&); // not implemented
261 ClassDef(AliAnalysisTaskEMCALTriggerQA, 12);