AliPhysics  05d84ab (05d84ab)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEMCALTriggerOfflineQAPP.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include <cstring>
17 #include <fstream>
18 
19 #include <THashList.h>
20 #include <TH1D.h>
21 #include <TH2D.h>
22 #include <TH3D.h>
23 #include <TProfile.h>
24 #include <TObjString.h>
25 #include <TObjArray.h>
26 
27 #include <AliEMCALTriggerPatchInfo.h>
28 #include <AliEMCALTriggerFastOR.h>
29 #include <AliLog.h>
30 #include <AliEMCALGeometry.h>
31 #include <AliVCaloCells.h>
32 #include <AliEMCALTriggerConstants.h>
33 
35 
39 
42  AliEMCALTriggerQA(),
43  fOfflineBadChannels(),
44  fBadChannels(),
45  fDCalPlots(kTRUE),
46  fL0MinTime(7),
47  fL0MaxTime(10),
48  fMinCellAmp(0.),
49  fMinL0FastORAmp(0),
50  fMinL1FastORAmp(0),
51  fHistManager(),
52  fSumOfflineEMCal(0),
53  fSumL0EMCal(0),
54  fSumL1EMCal(0),
55  fSumOfflineDCal(0),
56  fSumL0DCal(0),
57  fSumL1DCal(0),
58  fNCellEMCal(0),
59  fNL0EMCal(0),
60  fNL1EMCal(0),
61  fNCellDCal(0),
62  fNL0DCal(0),
63  fNL1DCal(0),
64  fNTotTRU(0),
65  fMaxFORabsId(0)
66 {
67  for (Int_t i = 0; i < 3; i++) {
68  for (Int_t itype = 0; itype < 6; itype++) {
69  fMaxPatchEMCal[itype][i] = 0;
70  fMaxPatchDCal[itype][i] = 0;
71  }
72  }
73 
74  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
75  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalGammaL, kTRUE);
76  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
77  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalJetL, kTRUE);
78  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
79 
80  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
81  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
82  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
83 
84  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
85  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
86  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
87 }
88 
93  AliEMCALTriggerQA(name),
94  fOfflineBadChannels(),
95  fBadChannels(),
96  fDCalPlots(kTRUE),
97  fL0MinTime(7),
98  fL0MaxTime(10),
99  fMinCellAmp(0.),
100  fMinL0FastORAmp(0),
101  fMinL1FastORAmp(0),
102  fHistManager(name),
103  fSumOfflineEMCal(0),
104  fSumL0EMCal(0),
105  fSumL1EMCal(0),
106  fSumOfflineDCal(0),
107  fSumL0DCal(0),
108  fSumL1DCal(0),
109  fNCellEMCal(0),
110  fNL0EMCal(0),
111  fNL1EMCal(0),
112  fNCellDCal(0),
113  fNL0DCal(0),
114  fNL1DCal(0),
115  fNTotTRU(0),
116  fMaxFORabsId(0)
117 {
118  for (Int_t i = 0; i < 3; i++) {
119  for (Int_t itype = 0; itype < 6; itype++) {
120  fMaxPatchEMCal[itype][i] = 0;
121  fMaxPatchDCal[itype][i] = 0;
122  }
123  }
124 
125  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
126  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalGammaL, kTRUE);
127  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
128  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalJetL, kTRUE);
129  EnablePatchType(kOnlinePatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
130 
131  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
132  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
133  EnablePatchType(kRecalcPatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
134 
135  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalLevel0, kTRUE);
136  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalGammaH, kTRUE);
137  EnablePatchType(kOfflinePatch, EMCALTrigger::kTMEMCalJetH, kTRUE);
138 }
139 
144  AliEMCALTriggerQA(triggerQA),
145  fOfflineBadChannels(triggerQA.fOfflineBadChannels),
146  fBadChannels(),
147  fDCalPlots(kTRUE),
148  fL0MinTime(triggerQA.fL0MinTime),
149  fL0MaxTime(triggerQA.fL0MaxTime),
150  fMinCellAmp(triggerQA.fMinCellAmp),
151  fMinL0FastORAmp(triggerQA.fMinL0FastORAmp),
152  fMinL1FastORAmp(triggerQA.fMinL1FastORAmp),
153  fHistManager(triggerQA.GetName()),
154  fSumOfflineEMCal(0),
155  fSumL0EMCal(0),
156  fSumL1EMCal(0),
157  fSumOfflineDCal(0),
158  fSumL0DCal(0),
159  fSumL1DCal(0),
160  fNCellEMCal(0),
161  fNL0EMCal(0),
162  fNL1EMCal(0),
163  fNCellDCal(0),
164  fNL0DCal(0),
165  fNL1DCal(0),
166  fNTotTRU(0),
167  fMaxFORabsId(0)
168 {
169  for (Int_t i = 0; i < 3; i++) {
170  for (Int_t itype = 0; itype < 6; itype++) {
171  fMaxPatchEMCal[itype][i] = 0;
172  fMaxPatchDCal[itype][i] = 0;
173  }
174  }
175 }
176 
179 {
180 }
181 
186 {
187  Short_t absId = 0;
188 
189  while (stream.good()) {
190  stream >> absId;
191  AddOfflineBadChannel(absId);
192  }
193 }
194 
199 {
200  std::ifstream file(fname);
202 }
203 
208 {
209  Short_t absId = -1;
210 
211  while (stream.good()) {
212  stream >> absId;
213  AddFastORBadChannel(absId);
214  }
215 }
216 
221 {
222  std::ifstream file(fname);
224 }
225 
228 {
229  TString hname;
230  TString htitle;
231 
232  // Geometry object not available at this stage, so need to hardcode some numbers
233  fNTotTRU = 32; // there are 32 TRU in the EMCal (10 full SM * 3 TRU + 2 small SM * 1 TRU)
234  Int_t ndet = 1;
235  if (fDCalPlots) {
236  fNTotTRU += 20; // there are additional 14 TRU in DCal, some skip in between (see below)
237  ndet += 1;
238  }
239  fMaxFORabsId = fNTotTRU * 96; // there are 96 channels in each TRU
240 
241  if (fTimeStampBinWidth > 0) fHistManager.CreateHistoGroup("ByTimeStamp");
243 
244  hname = "EMCTRQA_histFastORL0Hits";
245  htitle = "EMCTRQA_histFastORL0Hits;col;row;entries";
246  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
247 
248  hname = "EMCTRQA_histFastORL0AccumulatedAmplitude";
249  htitle = "EMCTRQA_histFastORL0AccumulatedAmplitude;col;row;accumulated amplitude";
250  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
251 
252  hname = "EMCTRQA_histFastORL0HitsTriggered";
253  htitle = "EMCTRQA_histFastORL0HitsTriggered;col;row;entries";
254  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
255 
256  hname = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered";
257  htitle = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered;col;row;accumulated amplitude";
258  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
259 
260  hname = "EMCTRQA_histFastORL0Time";
261  htitle = "EMCTRQA_histFastORL0Time;FastOR abs. ID;time";
262  fHistManager.CreateTH2(hname, htitle, fMaxFORabsId, 0, fMaxFORabsId, 21, -1, 20);
263 
264  hname = "EMCTRQA_histFastORL0AmpVsTime";
265  htitle = "EMCTRQA_histFastORL0AmpVsTime;time;amplitude";
266  fHistManager.CreateTH2(hname, htitle, 21, -1, 20, 1024/fADCperBin, 0, 1024);
267 
268  hname = "EMCTRQA_histFastORL1Hits";
269  htitle = "EMCTRQA_histFastORL1Hits;col;row;entries";
270  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
271 
272  hname = "EMCTRQA_histFastORL1AccumulatedAmplitude";
273  htitle = "EMCTRQA_histFastORL1AccumulatedAmplitude;col;row;accumulated amplitude";
274  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
275 
276  hname = "EMCTRQA_histFastORL1AmpVsL0Amp";
277  htitle = "EMCTRQA_histFastORL1AmpVsL0Amp;L0 amplitude;L1 time sum;entries";
278  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
279 
280  hname = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered";
281  htitle = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered;L0 amplitude;L1 time sum;entries";
282  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
283 
284  hname = "EMCTRQA_histCellAmpVsFastORL0Amp";
285  htitle = "EMCTRQA_histCellAmpVsFastORL0Amp;FastOR L0 amplitude;2x2 cell sum energy (GeV)";
286  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
287 
288  hname = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered";
289  htitle = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered;FastOR L0 amplitude;2x2 cell sum energy (GeV)";
290  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
291 
292  hname = "EMCTRQA_histCellAmpVsFastORL1Amp";
293  htitle = "EMCTRQA_histCellAmpVsFastORL1Amp;FastOR L1 amplitude;2x2 cell sum energy (GeV)";
294  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
295 
296  for (Int_t nTRU = 0; nTRU < fNTotTRU; nTRU++) {
297  if (nTRU == 34 || nTRU == 35 ||
298  nTRU == 40 || nTRU == 41 ||
299  nTRU == 46 || nTRU == 47) continue;
300  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0AmpTRU%d", nTRU);
301  htitle = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0Amp%d;FastOR L0 amplitude;2x2 cell sum energy (GeV)", nTRU);
302  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
303 
304  hname = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d", nTRU);
305  htitle = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d;TRU amplitude;STU amplitude", nTRU);
306  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
307 
308  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL1AmpSTU%d", nTRU);
309  htitle = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0Amp%d;FastOR L1 amplitude;2x2 cell sum energy (GeV)", nTRU);
310  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
311  }
312 
313  const char* det[2] = { "EMCal", "DCal" };
314 
315  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
316 
317  if (IsPatchTypeEnabled(kOfflinePatch, itrig) && IsPatchTypeEnabled(kRecalcPatch, itrig)) {
318  for (Int_t idet = 0; idet < ndet; idet++) {
319  hname = TString::Format("EMCTRQA_hist%s%sMaxOfflineVsRecalc", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data());
320  htitle = TString::Format("EMCTRQA_hist%s%sMaxOfflineVsRecalc;Recalc;Offline;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data());
321  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
322 
323  hname = TString::Format("EMCTRQA_hist%s%sOfflineVsRecalc", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data());
324  htitle = TString::Format("EMCTRQA_hist%s%sOfflineVsRecalc;Recalc;Offline;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data());
325  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
326  }
327  }
328 
329  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
330  if (!IsPatchTypeEnabled(itype, itrig)) continue;
331  for (Int_t idet = 0; idet < ndet; idet++) {
332  hname = TString::Format("EMCTRQA_hist%sPatchAmp%s%s", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
333  htitle = TString::Format("EMCTRQA_hist%sPatchAmp%s%s;amplitude;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
334  fHistManager.CreateTH1(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
335 
336  hname = TString::Format("EMCTRQA_hist%sMaxPatchAmp%s%s", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
337  htitle = TString::Format("EMCTRQA_hist%sMaxPatchAmp%s%s;amplitude;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
338  fHistManager.CreateTH1(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
339  }
340 
341  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
342  htitle = TString::Format("EMCTRQA_histMaxEdgePos%s%s;col;row;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
343  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
344 
345  hname = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
346  htitle = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s;col;row;accumulated amplitude", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
347  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
348 
349  if (fDCalPlots) {
350  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
351  htitle = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s;DCal %s max;EMCal %s max;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
352  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
353  }
354  }
355  }
356 
357  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
358  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
359  if (!IsPatchTypeEnabled(itype, itrig)) continue;
360  for (Int_t itrig2 = itrig+1; itrig2 < 6; itrig2++) {
361  if (!IsPatchTypeEnabled(itype, itrig2)) continue;
362 
363  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
364  htitle = TString::Format("EMCTRQA_histEMCal%sMaxVsEMCal%sMax%s;EMCal %s max;EMCal %s max;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
365  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig2]/fADCperBin, 0, fgkMaxPatchAmp[itrig2], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
366 
367 
368  if (fDCalPlots) {
369  hname = TString::Format("EMCTRQA_histDCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
370  htitle = TString::Format("EMCTRQA_histDCal%sMaxVsDCal%sMax%s;DCal %s max;DCal %s max;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
371  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig2]/fADCperBin, 0, fgkMaxPatchAmp[itrig2], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
372 
373  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
374  htitle = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s;DCal %s max;EMCal %s max;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
375  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig2]/fADCperBin, 0, fgkMaxPatchAmp[itrig2], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
376 
377  hname = TString::Format("EMCTRQA_histDCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
378  htitle = TString::Format("EMCTRQA_histDCal%sMaxVsEMCal%sMax%s;EMCal %s max;DCal %s max;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
379  fHistManager.CreateTH2(hname, htitle, fgkMaxPatchAmp[itrig2]/fADCperBin, 0, fgkMaxPatchAmp[itrig2], fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
380  }
381  }
382  }
383  }
384 
385  for (Int_t idet = 0; idet < ndet; idet++) {
386  hname = TString::Format("EMCTRQA_hist%sOfflineSumVsL0Sum", det[idet]);
387  htitle = hname + ";Sum of L0 amplitudes;Sum of cell energies (GeV)";
388  fHistManager.CreateTH2(hname, htitle, 1000/fADCperBin, 0, 5000, 1000/fADCperBin, 0, 400);
389 
390  hname = TString::Format("EMCTRQA_hist%sOfflineSumVsL1Sum", det[idet]);
391  htitle = hname + ";Sum of L1 amplitudes;Sum of cell energies (GeV)";
392  fHistManager.CreateTH2(hname, htitle, 1000/fADCperBin, 0, 5000, 1000/fADCperBin, 0, 200);
393 
394  hname = TString::Format("EMCTRQA_hist%sL1SumVsL0Sum", det[idet]);
395  htitle = hname + ";Sum of L0 amplitudes;Sum of L1 amplitudes";
396  fHistManager.CreateTH2(hname, htitle, 1000/fADCperBin, 0, 5000, 1000/fADCperBin, 0, 5000);
397 
398  hname = TString::Format("EMCTRQA_hist%sNCellVsNL0", det[idet]);
399  htitle = hname + ";Number of L0 FastORs;Number of cells";
400  fHistManager.CreateTH2(hname, htitle, 500, 0, 1000, 250, 0, 2000);
401 
402  hname = TString::Format("EMCTRQA_hist%sNCellVsNL1", det[idet]);
403  htitle = hname + ";Number of L1 FastORs;Number of cells";
404  fHistManager.CreateTH2(hname, htitle, 500, 0, 1000, 250, 0, 2000);
405 
406  hname = TString::Format("EMCTRQA_hist%sNL1VsNL0", det[idet]);
407  htitle = hname + ";Number of L0 FastORs;Number of L1 FastORs";
408  fHistManager.CreateTH2(hname, htitle, 500, 0, 1000, 500, 0, 1000);
409  }
410 }
411 
416 void AliEMCALTriggerOfflineQAPP::ProcessPatch(const AliEMCALTriggerPatchInfo* patch)
417 {
418  TString hname;
419 
420  Bool_t (AliEMCALTriggerPatchInfo::* triggerCheck[fgkNPatchTypes][fgkNTriggerTypes])(void) const = {
421  { &AliEMCALTriggerPatchInfo::IsLevel0,
422  &AliEMCALTriggerPatchInfo::IsGammaLow,
423  &AliEMCALTriggerPatchInfo::IsGammaHigh,
424  &AliEMCALTriggerPatchInfo::IsJetLow,
425  &AliEMCALTriggerPatchInfo::IsJetHigh,
426  &AliEMCALTriggerPatchInfo::IsBkg
427  },
428  { &AliEMCALTriggerPatchInfo::IsLevel0Recalc,
429  &AliEMCALTriggerPatchInfo::IsGammaLowRecalc,
430  &AliEMCALTriggerPatchInfo::IsGammaHighRecalc,
431  &AliEMCALTriggerPatchInfo::IsJetLowRecalc,
432  &AliEMCALTriggerPatchInfo::IsJetHighRecalc,
433  &AliEMCALTriggerPatchInfo::IsBkgRecalc
434  },
435  { &AliEMCALTriggerPatchInfo::IsLevel0Simple,
436  &AliEMCALTriggerPatchInfo::IsGammaLowSimple,
437  &AliEMCALTriggerPatchInfo::IsGammaHighSimple,
438  &AliEMCALTriggerPatchInfo::IsJetLowSimple,
439  &AliEMCALTriggerPatchInfo::IsJetHighSimple,
440  &AliEMCALTriggerPatchInfo::IsBkgSimple
441  }
442  };
443 
444  TString det;
445 
446  if (patch->IsEMCal()) {
447  det = "EMCal";
448  }
449  else if (patch->IsDCalPHOS()) {
450  if (!fDCalPlots) return;
451  det = "DCal";
452  }
453  else {
454  AliWarning(Form("Patch is not EMCal nor DCal/PHOS (pos: %d, %d)", patch->GetRowStart(), patch->GetColStart()));
455  }
456 
457  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
458  if (IsPatchTypeEnabled(kRecalcPatch, itrig) && IsPatchTypeEnabled(kOfflinePatch, itrig)) {
459  if ((patch->*(triggerCheck[kRecalcPatch][itrig]))() || (patch->*(triggerCheck[kOfflinePatch][itrig]))()) {
460  hname = TString::Format("EMCTRQA_hist%s%sOfflineVsRecalc", det.Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data());
461  fHistManager.FillTH2(hname, GetAmplitude(patch, kRecalcPatch) , GetAmplitude(patch, kOfflinePatch));
462  }
463  }
464 
465  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
466  if (!IsPatchTypeEnabled(itype, itrig)) continue;
467 
468  if (!(patch->*(triggerCheck[itype][itrig]))()) continue;
469 
470  //if (itrig == EMCALTrigger::kTMEMCalLevel0 && itype == kRecalcPatch) Printf("Recalc amp is %d", GetAmplitude(patch, kRecalcPatch));
471 
472  if (patch->IsEMCal()) {
473  if (GetAmplitude(fMaxPatchEMCal[itrig][itype], itype) < GetAmplitude(patch, itype)) fMaxPatchEMCal[itrig][itype] = patch;
474  }
475  else if (patch->IsDCalPHOS()) {
476  if (GetAmplitude(fMaxPatchDCal[itrig][itype], itype) < GetAmplitude(patch, itype)) fMaxPatchDCal[itrig][itype] = patch;
477  }
478 
479  hname = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
480  fHistManager.FillTH2(hname, patch->GetColStart(), patch->GetRowStart(), GetAmplitude(patch, itype));
481 
482  hname = Form("EMCTRQA_hist%sPatchAmp%s%s", det.Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
483  fHistManager.FillTH1(hname, GetAmplitude(patch, itype));
484  }
485  if (fDebugLevel >= 2) {
486  Printf("Type = %s; global pos = (%d, %d); Amp (online) = %d; Amp (offline) = %d; Patch energy = %.3f\n"
487  "Position (CM): Eta=%.3f, Phi=%.3f\n"
488  "Position (Geo): Eta=%.3f, Phi=%.3f\n",
489  EMCALTrigger::kEMCalTriggerNames[itrig].Data(), patch->GetRowStart(), patch->GetColStart(), patch->GetADCAmp(), patch->GetADCOfflineAmp(), patch->GetPatchE(),
490  patch->GetEtaCM(), patch->GetPhiCM(),
491  patch->GetEtaGeo(), patch->GetPhiGeo());
492  }
493  }
494 }
495 
500 void AliEMCALTriggerOfflineQAPP::ProcessCell(const AliEMCALCellInfo& cell)
501 {
502  TString hname;
503 
504  if (fOfflineBadChannels.find(cell.fAbsId) != fOfflineBadChannels.end()) return;
505  if (cell.fEnergy < fMinCellAmp) return;
506 
507  if (fGeom) {
508  Double_t pos[3] = {0};
509  fGeom->GetGlobal(cell.fAbsId, pos);
510  if (fGeom->IsInDCAL(pos[0], pos[1], pos[2])) {
511  if (!fDCalPlots) return;
512  fSumOfflineDCal += cell.fEnergy;
513  fNCellDCal++;
514  }
515  else if (fGeom->IsInEMCAL(pos[0], pos[1], pos[2])) {
516  fSumOfflineEMCal += cell.fEnergy;
517  fNCellEMCal++;
518  }
519  else {
520  AliWarning(Form("Cell with absolute ID %hd was not identified as neither DCal or EMCal!!", cell.fAbsId));
521  }
522  }
523 }
524 
529 void AliEMCALTriggerOfflineQAPP::ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells)
530 {
531  TString hname;
532 
533  if (fBadChannels.find(fastor->GetAbsId()) != fBadChannels.end()) return;
534 
535  Bool_t isDCal = kFALSE;
536 
537  Double_t offlineAmp = 0;
538  Int_t nTRU = -1;
539  Int_t nADC = -1;
540  Int_t iSM = -1;
541  Int_t iEta = -1;
542  Int_t iPhi = -1;
543 
544  if (fGeom) {
545  fGeom->GetPositionInSMFromAbsFastORIndex(fastor->GetAbsId(), iSM, iEta, iPhi);
546  isDCal = fGeom->IsDCALSM(iSM);
547  if (isDCal && !fDCalPlots) return;
548 
549  Int_t idx[4] = {-1};
550  fGeom->GetCellIndexFromFastORIndex(fastor->GetAbsId(), idx);
551  fGeom->GetTRUFromAbsFastORIndex(fastor->GetAbsId(), nTRU, nADC);
552 
553  if (nTRU >= fNTotTRU || nTRU < 0 ||
554  nTRU == 34 || nTRU == 35 ||
555  nTRU == 40 || nTRU == 41 ||
556  nTRU == 46 || nTRU == 47) {
557  if (fastor->GetL0Amp() > 0) AliError(Form("FastOR with abs ID %d (amp = %u) and TRU number %d: this TRU does not exist!!", fastor->GetAbsId(), fastor->GetL0Amp(), nTRU));
558  return;
559  }
560 
561  if (idx[0] >= 0) {
562  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
563  if (cells) {
564  for (Int_t i = 0; i < 4; i++) {
565  offlineAmp += cells->GetCellAmplitude(idx[i]);
566  }
567  }
568  }
569  }
570  }
571 
572  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
573  if (fTimeStampBinWidth > 0) {
574  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
575  fHistManager.FillTH1(hname, fastor->GetAbsId());
576  }
577 
578  hname = "EMCTRQA_histFastORL0Hits";
579  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
580 
581  hname = "EMCTRQA_histFastORL0AccumulatedAmplitude";
582  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
583 
584  hname = "EMCTRQA_histFastORL0Time";
585  fHistManager.FillTH2(hname, fastor->GetAbsId(), fastor->GetL0Time());
586 
587  hname = "EMCTRQA_histFastORL0AmpVsTime";
588  fHistManager.FillTH2(hname, fastor->GetL0Time(), fastor->GetL0Amp());
589 
590  hname = "EMCTRQA_histCellAmpVsFastORL0Amp";
591  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
592 
593  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
594  hname = "EMCTRQA_histFastORL0HitsTriggered";
595  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
596 
597  hname = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered";
598  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
599 
600  hname = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered";
601  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
602  }
603 
604  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0AmpTRU%d",nTRU);
605  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
606 
607  if (isDCal) {
608  fSumL0DCal += fastor->GetL0Amp();
609  fNL0DCal++;
610  }
611  else {
612  fSumL0EMCal += fastor->GetL0Amp();
613  fNL0EMCal++;
614  }
615  }
616 
617  if (fastor->GetL1Amp() > fMinL1FastORAmp) {
618  hname = "EMCTRQA_histFastORL1Hits";
619  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
620 
621  hname = "EMCTRQA_histFastORL1AccumulatedAmplitude";
622  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL1Amp());
623 
624  if (isDCal) {
625  fSumL1DCal += fastor->GetL1Amp();
626  fNL1DCal++;
627  }
628  else {
629  fSumL1EMCal += fastor->GetL1Amp();
630  fNL1EMCal++;
631  }
632 
633  hname = "EMCTRQA_histCellAmpVsFastORL1Amp";
634  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
635 
636  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL1AmpSTU%d",nTRU);
637  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
638  }
639 
640  UInt_t L1ampChopped = (fastor->GetL1Amp() >> 2) * 4;
641  if (fastor->GetL0Amp() > fMinL0FastORAmp || L1ampChopped > fMinL1FastORAmp) {
642  hname = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d",nTRU);
643  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
644 
645  hname = "EMCTRQA_histFastORL1AmpVsL0Amp";
646  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
647 
648  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
649  hname = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered";
650  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
651  }
652  }
653 }
654 
655 
660 {
661  AliDebug(2, Form("Entering AliEmcalTriggerQAAP::EventCompleted"));
662 
663  TString hname;
664 
665  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
666  AliDebug(2, Form("Trigger type: %s", EMCALTrigger::kEMCalTriggerNames[itrig].Data()));
667 
668  if (IsPatchTypeEnabled(itrig, kOfflinePatch) && IsPatchTypeEnabled(itrig, kRecalcPatch)) {
669  hname = TString::Format("EMCTRQA_histEMCal%sMaxOfflineVsRecalc", EMCALTrigger::kEMCalTriggerNames[itrig].Data());
670  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig][kRecalcPatch], kRecalcPatch), GetAmplitude(fMaxPatchEMCal[itrig][kOfflinePatch], kOfflinePatch));
671 
672  //if (itrig == EMCALTrigger::kTMEMCalLevel0) Printf("Max recalc amp is %d", GetAmplitude(fMaxPatchEMCal[itrig][kRecalcPatch], kRecalcPatch));
673 
674  if (fDCalPlots) {
675  hname = TString::Format("EMCTRQA_histDCal%sMaxOfflineVsRecalc", EMCALTrigger::kEMCalTriggerNames[itrig].Data());
676  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig][kRecalcPatch], kRecalcPatch), GetAmplitude(fMaxPatchDCal[itrig][kOfflinePatch], kOfflinePatch));
677  }
678  }
679 
680  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
681  if (!IsPatchTypeEnabled(itype, itrig)) continue;
682 
683  AliDebug(2, Form("Patch type %s", fgkPatchTypes[itype].Data()));
684 
685  if (fMaxPatchEMCal[itrig][itype]) {
686  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
687  fHistManager.FillTH2(hname, fMaxPatchEMCal[itrig][itype]->GetColStart(), fMaxPatchEMCal[itrig][itype]->GetRowStart());
688  }
689 
690  hname = TString::Format("EMCTRQA_histEMCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
691  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
692 
693  if (fDCalPlots) {
694  if (fMaxPatchDCal[itrig][itype]) {
695  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
696  fHistManager.FillTH2(hname, fMaxPatchDCal[itrig][itype]->GetColStart(), fMaxPatchDCal[itrig][itype]->GetRowStart());
697  }
698 
699  hname = TString::Format("EMCTRQA_histDCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
700  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
701 
702  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
703  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
704  }
705  }
706  }
707 
708  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
709  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
710  if (!IsPatchTypeEnabled(itype, itrig)) continue;
711 
712  for (Int_t itrig2 = itrig+1; itrig2 < fgkNTriggerTypes; itrig2++) {
713  if (!IsPatchTypeEnabled(itype, itrig2)) continue;
714 
715  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
716  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig2][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
717 
718  if (fDCalPlots) {
719  hname = TString::Format("EMCTRQA_histDCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
720  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig2][itype], itype), GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
721 
722  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
723  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig2][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
724 
725  hname = TString::Format("EMCTRQA_histDCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
726  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig2][itype], itype), GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
727 
728  }
729  }
730  }
731  }
732 
733  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
734  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
735  fMaxPatchEMCal[itrig][itype] = 0;
736  fMaxPatchDCal[itrig][itype] = 0;
737  }
738  }
739 
740  fHistManager.FillTH2("EMCTRQA_histEMCalOfflineSumVsL0Sum", fSumL0EMCal, fSumOfflineEMCal);
741  fHistManager.FillTH2("EMCTRQA_histEMCalOfflineSumVsL1Sum", fSumL1EMCal, fSumOfflineEMCal);
742  fHistManager.FillTH2("EMCTRQA_histEMCalL1SumVsL0Sum", fSumL0EMCal, fSumL1EMCal);
743  fHistManager.FillTH2("EMCTRQA_histEMCalNCellVsNL0", fNL0EMCal, fNCellEMCal);
744  fHistManager.FillTH2("EMCTRQA_histEMCalNCellVsNL1", fNL1EMCal, fNCellEMCal);
745  fHistManager.FillTH2("EMCTRQA_histEMCalNL1VsNL0", fNL0EMCal, fNL1EMCal);
746 
747  if (fDCalPlots) {
748  fHistManager.FillTH2("EMCTRQA_histDCalOfflineSumVsL0Sum", fSumL0DCal, fSumOfflineDCal);
749  fHistManager.FillTH2("EMCTRQA_histDCalOfflineSumVsL1Sum", fSumL1DCal, fSumOfflineDCal);
750  fHistManager.FillTH2("EMCTRQA_histDCalL1SumVsL0Sum", fSumL0DCal, fSumL1DCal);
751  fHistManager.FillTH2("EMCTRQA_histDCalNCellVsNL0", fNL0DCal, fNCellDCal);
752  fHistManager.FillTH2("EMCTRQA_histDCalNCellVsNL1", fNL1DCal, fNCellDCal);
753  fHistManager.FillTH2("EMCTRQA_histDCalNL1VsNL0", fNL0DCal, fNL1DCal);
754  }
755 
756  fSumOfflineEMCal = 0;
757  fSumL0EMCal = 0;
758  fSumL1EMCal = 0;
759  fSumOfflineDCal = 0;
760  fSumL0DCal = 0;
761  fSumL1DCal = 0;
762 
763  fNCellEMCal = 0;
764  fNL0EMCal = 0;
765  fNL1EMCal = 0;
766  fNCellDCal = 0;
767  fNL0DCal = 0;
768  fNL1DCal = 0;
769 }
770 
778 {
779  AliEMCALTriggerQA::EventTimeStamp(timeStamp);
780 
781  if (fTimeStampBinWidth > 0) {
782  TString hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
783  if (!fHistManager.FindObject(hname)) {
784  TString htitle;
785 
786  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
787  htitle = TString::Format("EMCTRQA_histEvents;;events");
788  TH1* hevents = fHistManager.CreateTH1(hname, htitle, 1, 0, 1);
789  hevents->GetXaxis()->SetBinLabel(1, TString::Format("%u <= time stamp < %u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth));
790 
791  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
792  htitle = TString::Format("EMCTRQA_histFastORL0;FastOR abs. ID;entries above 0");
793  fHistManager.CreateTH1(hname, htitle, fMaxFORabsId, 0, fMaxFORabsId);
794  }
795 
796  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
797  fHistManager.FillTH1(hname, 0.);
798  }
799 }
void ProcessCell(const AliEMCALCellInfo &cell)
void ReadFastORBadChannelFromFile(const char *fname)
Int_t fNL0EMCal
! EMCal number of L0 FastORs (will be reset each event)
AliEMCALTriggerOfflineQAPP()
Dummy constructor for ROOT I/O.
Int_t fSumL1DCal
! DCal sum of all online energy deposition (will be reset each event)
void ReadOfflineBadChannelFromStream(std::istream &stream)
Int_t fNL1DCal
! DCal number of L1 FastORs (will be reset each event)
Int_t fSumL0DCal
! DCal sum of all online energy deposition (will be reset each event)
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Int_t fNL0DCal
! DCal number of L0 FastORs (will be reset each event)
std::set< Short_t > fBadChannels
Container of bad channels.
Class to generate EMCal trigger QA plots in pp collisions.
THashList * CreateHistoGroup(const char *groupname, const char *parent="/")
Double_t fMinCellAmp
Minimum offline amplitude of the cells.
virtual ~AliEMCALTriggerOfflineQAPP()
Destructor.
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
void ProcessFastor(const AliEMCALTriggerFastOR *fastor, AliVCaloCells *cells=0)
TObject * FindObject(const char *name) const
Bool_t fDCalPlots
Whether to add DCal QA plots.
Int_t fNL1EMCal
! EMCal number of L1 FastORs (will be reset each event)
Int_t fNTotTRU
! Total number of TRUs
Int_t fMinL1FastORAmp
Minimum L1 amplitude of the FastORs.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
void Init()
Initialize the class, i.e. allocate histograms.
Int_t fMaxFORabsId
! Maximum FastOR abs id
const AliEMCALTriggerPatchInfo * fMaxPatchDCal[fgkNTriggerTypes][fgkNPatchTypes]
! DCal max patch (will be reset each event)
Int_t fSumL1EMCal
! EMCal sum of all online energy deposition (will be reset each event)
Int_t fDebugLevel
void ReadFastORBadChannelFromStream(std::istream &stream)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
void ReadOfflineBadChannelFromFile(const char *fname)
std::set< Short_t > fOfflineBadChannels
Abs ID of offline bad channels.
void ProcessPatch(const AliEMCALTriggerPatchInfo *patch)
const AliEMCALTriggerPatchInfo * fMaxPatchEMCal[fgkNTriggerTypes][fgkNPatchTypes]
! EMCal max patch (will be reset each event)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TFile * file
Double_t fSumOfflineDCal
! DCal sum of all offline energy deposition (will be reset each event)
Int_t fNCellEMCal
! EMCal number of offline cells (will be reset each event)
Int_t fSumL0EMCal
! EMCal sum of all online energy deposition (will be reset each event)
Int_t fMinL0FastORAmp
Minimum L0 amplitude of the FastORs.
Double_t fSumOfflineEMCal
! EMCal sum of all offline energy deposition (will be reset each event)
Int_t fNCellDCal
! DCal number of offline cells (will be reset each event)
THistManager fHistManager
Histogram manager.