]>
Commit | Line | Data |
---|---|---|
bce9493b | 1 | #ifndef ALIANALYSISTASKEMCALTRIGGERQA_H |
2 | #define ALIANALYSISTASKEMCALTRIGGERQA_H | |
3 | ||
46fec84c | 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) // | |
8 | // // | |
9 | // $Id$ // | |
10 | //------------------------------------------------------------------------// | |
bce9493b | 11 | |
12 | //--- Root --- | |
13 | class TList; | |
ec77a234 | 14 | class TH1F; |
15 | class TH2I; | |
bce9493b | 16 | class TH2F; |
17 | class AliEMCALGeometry; | |
0d896539 | 18 | class TProfile2D; |
bce9493b | 19 | |
20 | //--- AliRoot --- | |
6bfd1538 | 21 | class AliEMCALRecoUtils; |
bce9493b | 22 | #include "AliEMCALGeoParams.h" |
23 | #include "AliAnalysisTaskSE.h" | |
24 | ||
25 | class AliAnalysisTaskEMCALTriggerQA : public AliAnalysisTaskSE | |
26 | { | |
27 | public: | |
bce9493b | 28 | |
29 | AliAnalysisTaskEMCALTriggerQA(const char *name); // named constructor | |
30 | ||
a40222c8 | 31 | virtual ~AliAnalysisTaskEMCALTriggerQA() { ; } // destructor |
bce9493b | 32 | |
46fec84c | 33 | void ClusterAnalysis(); |
34 | ||
35 | void FillCellMaps(); | |
36 | ||
37 | void FillTriggerPatchMaps(TString triggerclasses); | |
38 | ||
69aa892c | 39 | void FillClusterHistograms(Int_t triggerNumber, Bool_t maxCluster, |
40 | Float_t e,Float_t eta,Float_t phi, | |
41 | Float_t ietamax,Float_t iphimax, | |
42 | Float_t centrality, Float_t v0AC); | |
bce9493b | 43 | |
46fec84c | 44 | void FillCorrelationHistograms(); |
45 | ||
46 | void FillEventCounterHistogram(); | |
47 | ||
48 | void FillL1GammaPatchHistograms(); | |
49 | ||
50 | void FillL1JetPatchHistograms(); | |
51 | ||
52 | void FillMapHistograms(); | |
53 | ||
54 | void FillV0Histograms(); | |
55 | ||
31a3f95a | 56 | void Init() ; |
57 | ||
58 | void InitHistogramArrays() ; | |
59 | ||
46fec84c | 60 | void InitCellPatchMaps(); |
61 | ||
2b4e1cc5 | 62 | void LocalInit() { Init() ; } |
63 | ||
64 | void UserCreateOutputObjects(); | |
65 | ||
66 | void UserExec(Option_t *option); | |
67 | ||
68 | AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ; | |
5685a6bb | 69 | return fRecoUtils ; } |
2b4e1cc5 | 70 | |
31a3f95a | 71 | void SetEtaPhiEnMin(Float_t en) { fEtaPhiEnMin = en ; } |
72 | ||
46fec84c | 73 | void SetTriggerEventBit(TString list) ; |
74 | ||
2b4e1cc5 | 75 | // OADB and geometry settings |
76 | ||
77 | void InitGeometry(); | |
bce9493b | 78 | |
2b4e1cc5 | 79 | void SetGeometryName(TString name) { fGeoName = name ; } |
2abb8184 | 80 | void SetEventTriggerL1Bit(Int_t ega, Int_t eje) |
81 | { fBitEGA = ega ; fBitEJE = eje; } | |
82 | ||
2b4e1cc5 | 83 | void AccessOADB() ; |
84 | ||
85 | void SwitchOnEMCALOADB() { fAccessOADB = kTRUE ; } | |
86 | void SwitchOffEMCALOADB() { fAccessOADB = kFALSE ; } | |
75e3af78 | 87 | |
88 | void SwitchOnMCData() { fMCData = kTRUE ; } | |
89 | void SwitchOffMCData() { fMCData = kFALSE ; } | |
90 | ||
91 | void SwitchOnV0SignalHistograms() { fFillV0SigHisto = kTRUE ; } | |
92 | void SwitchOffV0SignalHistograms() { fFillV0SigHisto = kFALSE ; } | |
93 | ||
94 | void SwitchOnClusterAcceptanceHistograms() { fFillClusAcceptHisto = kTRUE ; } | |
95 | void SwitchOffClusterAcceptanceHistograms() { fFillClusAcceptHisto = kFALSE ; } | |
2b4e1cc5 | 96 | |
97 | void SetOADBFilePath(TString path) { fOADBFilePath = path ; } | |
6bfd1538 | 98 | |
85196c29 | 99 | //Histogram setters |
31a3f95a | 100 | |
85196c29 | 101 | void SetTRUTotalSignalHistogramsRange(Int_t nbins, Float_t max) { fNBinsTRUSignal = nbins; fMaxTRUSignal = max ; } |
102 | void SetSTUTotalSignalHistogramsRange(Int_t nbins, Float_t max) { fNBinsSTUSignal = nbins; fMaxSTUSignal = max ; } | |
103 | void SetV0TotalSignalHistogramsRange (Int_t nbins, Float_t max) { fNBinsV0Signal = nbins; fMaxV0Signal = max ; } | |
104 | void SetSTUFEERatioHistogramsRange (Int_t nbins, Float_t max) { fNBinsSTUFEERatio = nbins; fMaxSTUFEERatio = max ; } | |
105 | void SetSTUTRURatioHistogramsRange (Int_t nbins, Float_t max) { fNBinsSTUTRURatio = nbins; fMaxSTUFEERatio = max ; } | |
8a50a36c | 106 | void SetClusterEHistogramsRange (Int_t nbins, Float_t max) { fNBinsClusterE = nbins; fMaxClusterE = max ; } |
2ed1f308 | 107 | void SetClusterEtaHistogramsRange (Int_t nbins, Float_t max) { fNBinsClusterEta = nbins; fMaxClusterEta = max ; } |
108 | void SetClusterPhiHistogramsRange (Int_t nbins, Float_t max, Float_t min) | |
109 | { fNBinsClusterPhi = nbins; fMaxClusterPhi = max ; fMinClusterPhi = min ; } | |
110 | ||
bce9493b | 111 | private: |
0d896539 | 112 | TList *fOutputList; //! Output list |
113 | ||
ec77a234 | 114 | AliEMCALRecoUtils *fRecoUtils; // RecoUtils |
115 | ||
2b4e1cc5 | 116 | Bool_t fGeoSet ; // Geometry already set |
0d896539 | 117 | AliEMCALGeometry *fGeometry; // Access to EMCAL geometry utils |
118 | TString fGeoName; // Name of geometry used | |
119 | ||
2b4e1cc5 | 120 | Bool_t fOADBSet ; // AODB parameters already set |
121 | Bool_t fAccessOADB ; // Get calibration from OADB for EMCAL | |
122 | TString fOADBFilePath ; // Default path $ALICE_ROOT/OADB/EMCAL, if needed change | |
123 | ||
31a3f95a | 124 | Int_t fBitEGA; // fBitEGA |
125 | Int_t fBitEJE; // fBitEJE | |
126 | ||
127 | Float_t fEtaPhiEnMin; // Min energy for Eta/Phi histograms | |
128 | ||
46fec84c | 129 | Int_t fSTUTotal; // Sum of STU time sums |
130 | Float_t fTRUTotal; // Sum of TRU amplitudes | |
131 | Float_t fV0Trigger; // V0 signal from trigger | |
132 | Float_t fV0A; // V0 A signal | |
133 | Float_t fV0C; // V0 C signal | |
134 | ||
75e3af78 | 135 | Bool_t fFillV0SigHisto; // V0 signal creation and fill |
136 | Bool_t fFillClusAcceptHisto; // Fill eta/phi distributions | |
137 | Bool_t fMCData; // Simulation On/Off | |
138 | ||
46fec84c | 139 | // Event by event trigger recognition bit |
140 | Bool_t fEventMB ; // Bit for MB events | |
141 | Bool_t fEventL0 ; // Bit for L0 events | |
142 | Bool_t fEventL1G ; // Bit for L1 Gamma 1 events | |
143 | Bool_t fEventL1G2 ; // Bit for L1 Gamma 2 events | |
144 | Bool_t fEventL1J ; // Bit for L1 Jet 1 events | |
145 | Bool_t fEventL1J2 ; // Bit for L1 JEt 2 events | |
146 | Bool_t fEventCen ; // Bit for Central events | |
147 | Bool_t fEventSem ; // Bit for Semi Central events | |
148 | ||
149 | // Histograms | |
150 | ||
0d896539 | 151 | TH1F *fhNEvents; //! Number of selected events |
152 | TH2F *fhFORAmp; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column | |
153 | TH2F *fhFORAmpL1G; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma trigger event | |
cf170170 | 154 | TH2F *fhFORAmpL1G2; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma2 trigger event |
0d896539 | 155 | TH2F *fhFORAmpL1J; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event |
cf170170 | 156 | TH2F *fhFORAmpL1J2; //! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet2 trigger event |
0d896539 | 157 | TH2F *fhL0Amp; //! FALTRO signal per Row and Column for FOR involves L0 patch |
158 | TH2F *fhL0AmpL1G; //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event | |
159 | TH2F *fhL0AmpL1J; //! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event | |
160 | TH2F *fhL1Amp; //! STU signal per Row and Column for FOR involves L0 patch | |
161 | TH2F *fhL1GAmp; //! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left) | |
6be2314f | 162 | TH2F *fhL1G2Amp; //! STU signal per Row and Column for FOR position of L1 Gamma2 patch (top-left) |
0d896539 | 163 | TH2F *fhL1JAmp; //! STU signal per Row and Column for FOR position of L1 Jet patch (top-left) |
cf170170 | 164 | TH2F *fhL1J2Amp; //! STU signal per Row and Column for FOR position of L1 Jet2 patch (top-left) |
165 | TH2F *fhL1FOREnergy; //! STU signal per Row and Column for FOR position vs FOR energy | |
166 | ||
167 | TH2F *fhL0Patch; //! FOR with L0 patch associated | |
168 | TH2F *fhL1GPatch; //! FOR with L1 Gamma patch associated | |
169 | TH2F *fhL1G2Patch; //! FOR with L1 Gamma patch associated | |
170 | TH2F *fhL1GPatchNotFake; //! FOR with L1 Gamma patch associated but no energy in the related cells | |
171 | TH2F *fhL1GPatchFake; //! FOR with L1 Gamma patch associated | |
172 | TH2F *fhL1GPatchNotAllFake; //! FOR with at least 1 L1 Gamma patch associated that has energy in the related celles : not a fake event | |
173 | TH2F *fhL1GPatchAllFake; //! FOR without any L1 Gamma patch associated with energy in the related cells: fake patch | |
174 | TH2F *fhL1GPatchNotAllFakeMax; //! FOR with at least one L1 Gamma patch associated with energy in the related cell, maximal energy patch : not fake events | |
175 | TH2F *fhL1GPatchAllFakeMax; //! FOR without any L1 Gamma patch associated with energy in the related cell, maximal energy patch : fake events | |
176 | TH1F *fhL1GPatchNotAllFakeMaxE; //! Energy distrib of FOR for non fake events, patch of maximal energy | |
177 | TH1F *fhL1GPatchAllFakeMaxE; //! Energy distrib FOR for fake events, patch of maximal energy | |
178 | TH1F *fhL1GPatchNotAllFakeE; //! Energy distrib of FOR for non fake events, all patch energy | |
179 | TH1F *fhL1GPatchAllFakeE; //! Energy distrib of FOR forfake events, all patch energy | |
180 | TH1F *fhL1GPatchFakeE; //! Energy distrib of FOR for fake events, all patch energy | |
181 | TH1F *fhL1GPatchNotFakeE; //! Energy distrib of FOR for non fake events, all patch energy | |
46fec84c | 182 | TH2F *fhNPatchFake; //! number of fake patchs per event vs. if all were fakes or not |
183 | TH2F *fhNPatchNotFake; //! number of non fake patchs per events vs. if all were fakes or not | |
6be2314f | 184 | |
0d896539 | 185 | TH2F *fhL1JPatch; //! FOR with L1 Jet patch associated |
cf170170 | 186 | TH2F *fhL1J2Patch; //! FOR with L1 Jet patch associated |
0d896539 | 187 | TH2F *fhFEESTU; //! Correlation FEE vs STU |
188 | TH2F *fhTRUSTU; //! Correlation TRU vs STU | |
189 | TH2I *fhV0STU; //! Total signal STU vs V0C+V0S | |
ec77a234 | 190 | |
191 | TH2F *fhGPMaxVV0TT; //! V0 signal vs maximum gamma L1 patch | |
192 | TH2F *fhJPMaxVV0TT; //! V0 signal vs maximum jet L1 patch | |
193 | TProfile2D *fhFORMeanAmp; //! Mean FastOR(FEE) signal per Row and Column | |
194 | TProfile2D *fhL0MeanAmp; //! Mean FastOR(TRU) signal per Row and Column | |
195 | TProfile2D *fhL1MeanAmp; //! Mean FastOR(STU) signal per Row and Column | |
ec77a234 | 196 | TH2F *fhL1GPatchMax; //! FOR of max. amplitude patch with L1 Gamma patch associated |
cf170170 | 197 | TH2F *fhL1G2PatchMax; //! FOR of max. amplitude patch with L1 Gamma patch associated |
ec77a234 | 198 | TH2F *fhL1JPatchMax; //! FOR of max. amplitude patch with L1 Jet patch associated |
cf170170 | 199 | TH2F *fhL1J2PatchMax; //! FOR of max. amplitude patch with L1 Jet patch associated |
ec77a234 | 200 | |
201 | // Cluster vs trigger histograms | |
4c0129b7 | 202 | enum triggerType{ kMBTrig = 0, kL0Trig = 1, |
203 | kL1GammaTrig = 2, kL1GammaTrig2 = 3, | |
204 | kL1JetTrig = 4, kL1JetTrig2 = 5, | |
205 | kL1GammaOnlyTrig = 6, kL1JetOnlyTrig = 7, | |
206 | kL1Gamma2OnlyGammaTrig = 8, kL1Jet2OnlyJetTrig = 9, | |
207 | kCentralTrig = 10, kSemiCentralTrig = 11 }; | |
ec77a234 | 208 | |
cf170170 | 209 | TH1F *fhClusMBPure[3]; //! Clusters E distribution for pure MB trigger |
210 | TH1F *fhClusMaxMBPure[3]; //! Maximum E Cluster per event distribution for pure MB trigger | |
ec77a234 | 211 | |
4c0129b7 | 212 | static const int fgkTriggerCombi = 12; // total number of trigger combinations defined above |
213 | ||
214 | TH1F *fhClus [fgkTriggerCombi]; //! Clusters E distribution for a trigger | |
215 | TH1F *fhClusMax[fgkTriggerCombi]; //! Maximum E Cluster per event distribution for MB trigger | |
31a3f95a | 216 | |
4c0129b7 | 217 | TH2F *fhClusCen [fgkTriggerCombi]; //! Clusters Centrality vs E distribution for a trigger |
218 | TH2F *fhClusCenMax[fgkTriggerCombi]; //! Maximum E Cluster vs Centrality per event distribution for a trigger | |
ec77a234 | 219 | |
4c0129b7 | 220 | TH2F *fhClusV0 [fgkTriggerCombi]; //! Clusters V0 vs E distribution for a trigger |
221 | TH2F *fhClusV0Max[fgkTriggerCombi]; //! Maximum E Cluster vs Centrality per event distribution for a trigger | |
ec77a234 | 222 | |
4c0129b7 | 223 | TH2F *fhClusEta [fgkTriggerCombi]; //! Clusters eta vs E distribution for a trigger |
224 | TH2F *fhClusEtaMax[fgkTriggerCombi]; //! Maximum E Cluster vs Eta per event distribution for a trigger | |
31a3f95a | 225 | |
4c0129b7 | 226 | TH2F *fhClusPhi [fgkTriggerCombi]; //! Clusters Phi vs E distribution for a trigger |
227 | TH2F *fhClusPhiMax[fgkTriggerCombi]; //! Maximum E Cluster vs Phi per event distribution for a trigger | |
31a3f95a | 228 | |
75e3af78 | 229 | TH2F *fhClusEtaPhiHigh [fgkTriggerCombi]; //! Clusters eta vs phi distribution for a trigger, energy above fEtaPhiEnMin GeV |
230 | TH2F *fhClusEtaPhiHighCluMax[fgkTriggerCombi]; //! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above fEtaPhiEnMin GeV | |
31a3f95a | 231 | |
75e3af78 | 232 | TH2F *fhClusEtaPhiHighCellMax [fgkTriggerCombi]; //! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy above fEtaPhiEnMin GeV |
233 | TH2F *fhClusEtaPhiHighCellMaxCluMax[fgkTriggerCombi]; //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy above fEtaPhiEnMin GeV | |
31a3f95a | 234 | |
75e3af78 | 235 | TH2F *fhClusEtaPhiLow [fgkTriggerCombi]; //! Clusters eta vs phi distribution for a trigger, energy below fEtaPhiEnMin GeV |
236 | TH2F *fhClusEtaPhiLowCluMax[fgkTriggerCombi]; //! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below fEtaPhiEnMin GeV | |
31a3f95a | 237 | |
75e3af78 | 238 | TH2F *fhClusEtaPhiLowCellMax [fgkTriggerCombi]; //! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy below fEtaPhiEnMin GeV |
239 | TH2F *fhClusEtaPhiLowCellMaxCluMax[fgkTriggerCombi]; //! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger, energy below fEtaPhiEnMin GeV | |
4c0129b7 | 240 | |
241 | TH1F *fhV0[fgkTriggerCombi];//! V0 distribution for a triggered event | |
ec77a234 | 242 | |
ec77a234 | 243 | // Histograms bins |
244 | ||
245 | Int_t fNBinsSTUSignal ; // Number of bins for STU total signal histograms | |
246 | Float_t fMaxSTUSignal ; // Maximum value for TRU total signal histograms | |
247 | Int_t fNBinsTRUSignal ; // Number of bins for TRU total signal histograms | |
248 | Float_t fMaxTRUSignal ; // Maximum value for TRU total signal histograms | |
249 | Int_t fNBinsV0Signal ; // Number of bins for V0 total signal histograms | |
250 | Float_t fMaxV0Signal ; // Maximum value for V0 total signal histograms | |
251 | Int_t fNBinsSTUFEERatio ; // Number of bins for STU/FEE ratios histograms | |
252 | Float_t fMaxSTUFEERatio ; // Maximum value for STU/FEE ratios histograms | |
253 | Int_t fNBinsSTUTRURatio ; // Number of bins for STU/TRU ratios histograms | |
254 | Float_t fMaxSTUTRURatio ; // Maximum value for STU/TRU ratios histograms | |
255 | Int_t fNBinsClusterE ; // Number of bins for E cluster histograms | |
256 | Float_t fMaxClusterE ; // Maximum value for E cluster histograms | |
2ed1f308 | 257 | Int_t fNBinsClusterPhi ; // Number of bins for Phi cluster histograms |
258 | Float_t fMaxClusterPhi ; // Maximum value for Phi cluster histograms | |
259 | Float_t fMinClusterPhi ; // Maximum value for Phi cluster histograms | |
260 | Int_t fNBinsClusterEta ; // Number of bins for Eta cluster histograms | |
261 | Float_t fMaxClusterEta ; // Maximum value for Eta cluster histograms | |
262 | ||
263 | ||
bce9493b | 264 | //Constants needed by the class: EMCAL |
be6d2b65 | 265 | //static const int fgkFALTRORows = AliEMCALGeoParams::fgkEMCALRows*(AliEMCALGeoParams::fgkEMCALModules-7)/2; // total number |
266 | static const int fgkFALTRORows = 60; //AliEMCALGeoParams::fgkEMCALSTURows-4; // total number, temporary, not considers DCal | |
00ff0079 | 267 | // of fake altro rows in EMCAL |
85196c29 | 268 | // (ALTRO channels in one SM times 5 SM divided by 2 per FALTRO) |
bce9493b | 269 | |
be6d2b65 | 270 | static const int fgkFALTROCols = AliEMCALGeoParams::fgkEMCALSTUCols; // total number of fake altro columns in EMCAL |
85196c29 | 271 | // (ALTRO channels in one SM times 2 SM divided by 2 per FALTRO) |
bce9493b | 272 | |
46fec84c | 273 | // cell, patch maps |
274 | Double_t fMapCell [fgkFALTRORows][fgkFALTROCols]; // Cell map | |
275 | Double_t fMapCellL1G [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1G | |
276 | Double_t fMapCellL1G2 [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1G2 | |
277 | Double_t fMapCellL1J [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1J | |
278 | Double_t fMapCellL1J2 [fgkFALTRORows][fgkFALTROCols]; // Cell map for L1J2 | |
279 | Double_t fMapTrigL0 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L0 | |
280 | Double_t fMapTrigL1 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1 | |
281 | Double_t fMapTrigL0L1G[fgkFALTRORows][fgkFALTROCols]; // Patch map for L0L1G | |
282 | Double_t fMapTrigL0L1J[fgkFALTRORows][fgkFALTROCols]; // Patch map for L0L1J | |
283 | Double_t fMapTrigL1G [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1G | |
284 | Double_t fMapTrigL1G2 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1G2 | |
285 | Double_t fMapTrigL1J [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1J | |
286 | Double_t fMapTrigL1J2 [fgkFALTRORows][fgkFALTROCols]; // Patch map for L1J2 | |
287 | ||
bce9493b | 288 | |
2b4e1cc5 | 289 | AliAnalysisTaskEMCALTriggerQA (const AliAnalysisTaskEMCALTriggerQA&); // not implemented |
bce9493b | 290 | |
2b4e1cc5 | 291 | AliAnalysisTaskEMCALTriggerQA& operator=(const AliAnalysisTaskEMCALTriggerQA&); // not implemented |
bce9493b | 292 | |
2ed1f308 | 293 | ClassDef(AliAnalysisTaskEMCALTriggerQA, 14); |
bce9493b | 294 | }; |
295 | ||
296 | #endif |