AliPhysics  ef3b16e (ef3b16e)
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),
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),
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., 0., 0.};
509  Int_t sm = fGeom->GetSuperModuleNumber(cell.fAbsId);
510  if (fGeom->IsDCALSM(sm)) {
511  if (!fDCalPlots) return;
512  fSumOfflineDCal += cell.fEnergy;
513  fNCellDCal++;
514  }
515  else {
516  fSumOfflineEMCal += cell.fEnergy;
517  fNCellEMCal++;
518  }
519  }
520 }
521 
526 void AliEMCALTriggerOfflineQAPP::ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells)
527 {
528  TString hname;
529 
530  if (fBadChannels.find(fastor->GetAbsId()) != fBadChannels.end()) return;
531 
532  Bool_t isDCal = kFALSE;
533 
534  Double_t offlineAmp = 0;
535  Int_t nTRU = -1;
536  Int_t nADC = -1;
537  Int_t iSM = -1;
538  Int_t iEta = -1;
539  Int_t iPhi = -1;
540 
541  if (fGeom) {
542  fGeom->GetPositionInSMFromAbsFastORIndex(fastor->GetAbsId(), iSM, iEta, iPhi);
543  isDCal = fGeom->IsDCALSM(iSM);
544  if (isDCal && !fDCalPlots) return;
545 
546  Int_t idx[4] = {-1};
547  fGeom->GetCellIndexFromFastORIndex(fastor->GetAbsId(), idx);
548  fGeom->GetTRUFromAbsFastORIndex(fastor->GetAbsId(), nTRU, nADC);
549 
550  if (nTRU >= fNTotTRU || nTRU < 0 ||
551  nTRU == 34 || nTRU == 35 ||
552  nTRU == 40 || nTRU == 41 ||
553  nTRU == 46 || nTRU == 47) {
554  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));
555  return;
556  }
557 
558  if (idx[0] >= 0) {
559  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
560  if (cells) {
561  for (Int_t i = 0; i < 4; i++) {
562  offlineAmp += cells->GetCellAmplitude(idx[i]);
563  }
564  }
565  }
566  }
567  }
568 
569  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
570  if (fTimeStampBinWidth > 0) {
571  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
572  fHistManager.FillTH1(hname, fastor->GetAbsId());
573  }
574 
575  hname = "EMCTRQA_histFastORL0Hits";
576  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
577 
578  hname = "EMCTRQA_histFastORL0AccumulatedAmplitude";
579  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
580 
581  hname = "EMCTRQA_histFastORL0Time";
582  fHistManager.FillTH2(hname, fastor->GetAbsId(), fastor->GetL0Time());
583 
584  hname = "EMCTRQA_histFastORL0AmpVsTime";
585  fHistManager.FillTH2(hname, fastor->GetL0Time(), fastor->GetL0Amp());
586 
587  hname = "EMCTRQA_histCellAmpVsFastORL0Amp";
588  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
589 
590  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
591  hname = "EMCTRQA_histFastORL0HitsTriggered";
592  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
593 
594  hname = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered";
595  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
596 
597  hname = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered";
598  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
599  }
600 
601  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0AmpTRU%d",nTRU);
602  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
603 
604  if (isDCal) {
605  fSumL0DCal += fastor->GetL0Amp();
606  fNL0DCal++;
607  }
608  else {
609  fSumL0EMCal += fastor->GetL0Amp();
610  fNL0EMCal++;
611  }
612  }
613 
614  if (fastor->GetL1Amp() > fMinL1FastORAmp) {
615  hname = "EMCTRQA_histFastORL1Hits";
616  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
617 
618  hname = "EMCTRQA_histFastORL1AccumulatedAmplitude";
619  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL1Amp());
620 
621  if (isDCal) {
622  fSumL1DCal += fastor->GetL1Amp();
623  fNL1DCal++;
624  }
625  else {
626  fSumL1EMCal += fastor->GetL1Amp();
627  fNL1EMCal++;
628  }
629 
630  hname = "EMCTRQA_histCellAmpVsFastORL1Amp";
631  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
632 
633  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL1AmpSTU%d",nTRU);
634  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
635  }
636 
637  UInt_t L1ampChopped = (fastor->GetL1Amp() >> 2) * 4;
638  if (fastor->GetL0Amp() > fMinL0FastORAmp || L1ampChopped > fMinL1FastORAmp) {
639  hname = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d",nTRU);
640  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
641 
642  hname = "EMCTRQA_histFastORL1AmpVsL0Amp";
643  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
644 
645  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
646  hname = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered";
647  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
648  }
649  }
650 }
651 
652 
657 {
658  AliDebug(2, Form("Entering AliEmcalTriggerQAAP::EventCompleted"));
659 
660  TString hname;
661 
662  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
663  AliDebug(2, Form("Trigger type: %s", EMCALTrigger::kEMCalTriggerNames[itrig].Data()));
664 
665  if (IsPatchTypeEnabled(itrig, kOfflinePatch) && IsPatchTypeEnabled(itrig, kRecalcPatch)) {
666  hname = TString::Format("EMCTRQA_histEMCal%sMaxOfflineVsRecalc", EMCALTrigger::kEMCalTriggerNames[itrig].Data());
667  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig][kRecalcPatch], kRecalcPatch), GetAmplitude(fMaxPatchEMCal[itrig][kOfflinePatch], kOfflinePatch));
668 
669  //if (itrig == EMCALTrigger::kTMEMCalLevel0) Printf("Max recalc amp is %d", GetAmplitude(fMaxPatchEMCal[itrig][kRecalcPatch], kRecalcPatch));
670 
671  if (fDCalPlots) {
672  hname = TString::Format("EMCTRQA_histDCal%sMaxOfflineVsRecalc", EMCALTrigger::kEMCalTriggerNames[itrig].Data());
673  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig][kRecalcPatch], kRecalcPatch), GetAmplitude(fMaxPatchDCal[itrig][kOfflinePatch], kOfflinePatch));
674  }
675  }
676 
677  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
678  if (!IsPatchTypeEnabled(itype, itrig)) continue;
679 
680  AliDebug(2, Form("Patch type %s", fgkPatchTypes[itype].Data()));
681 
682  if (fMaxPatchEMCal[itrig][itype]) {
683  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
684  fHistManager.FillTH2(hname, fMaxPatchEMCal[itrig][itype]->GetColStart(), fMaxPatchEMCal[itrig][itype]->GetRowStart());
685  }
686 
687  hname = TString::Format("EMCTRQA_histEMCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
688  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
689 
690  if (fDCalPlots) {
691  if (fMaxPatchDCal[itrig][itype]) {
692  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
693  fHistManager.FillTH2(hname, fMaxPatchDCal[itrig][itype]->GetColStart(), fMaxPatchDCal[itrig][itype]->GetRowStart());
694  }
695 
696  hname = TString::Format("EMCTRQA_histDCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
697  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
698 
699  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
700  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
701  }
702  }
703  }
704 
705  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
706  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
707  if (!IsPatchTypeEnabled(itype, itrig)) continue;
708 
709  for (Int_t itrig2 = itrig+1; itrig2 < fgkNTriggerTypes; itrig2++) {
710  if (!IsPatchTypeEnabled(itype, itrig2)) continue;
711 
712  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
713  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig2][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
714 
715  if (fDCalPlots) {
716  hname = TString::Format("EMCTRQA_histDCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
717  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig2][itype], itype), GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
718 
719  hname = TString::Format("EMCTRQA_histEMCal%sMaxVsDCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
720  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchDCal[itrig2][itype], itype), GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
721 
722  hname = TString::Format("EMCTRQA_histDCal%sMaxVsEMCal%sMax%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), EMCALTrigger::kEMCalTriggerNames[itrig2].Data(), fgkPatchTypes[itype].Data());
723  fHistManager.FillTH2(hname, GetAmplitude(fMaxPatchEMCal[itrig2][itype], itype), GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
724 
725  }
726  }
727  }
728  }
729 
730  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
731  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
732  fMaxPatchEMCal[itrig][itype] = 0;
733  fMaxPatchDCal[itrig][itype] = 0;
734  }
735  }
736 
737  fHistManager.FillTH2("EMCTRQA_histEMCalOfflineSumVsL0Sum", fSumL0EMCal, fSumOfflineEMCal);
738  fHistManager.FillTH2("EMCTRQA_histEMCalOfflineSumVsL1Sum", fSumL1EMCal, fSumOfflineEMCal);
739  fHistManager.FillTH2("EMCTRQA_histEMCalL1SumVsL0Sum", fSumL0EMCal, fSumL1EMCal);
740  fHistManager.FillTH2("EMCTRQA_histEMCalNCellVsNL0", fNL0EMCal, fNCellEMCal);
741  fHistManager.FillTH2("EMCTRQA_histEMCalNCellVsNL1", fNL1EMCal, fNCellEMCal);
742  fHistManager.FillTH2("EMCTRQA_histEMCalNL1VsNL0", fNL0EMCal, fNL1EMCal);
743 
744  if (fDCalPlots) {
745  fHistManager.FillTH2("EMCTRQA_histDCalOfflineSumVsL0Sum", fSumL0DCal, fSumOfflineDCal);
746  fHistManager.FillTH2("EMCTRQA_histDCalOfflineSumVsL1Sum", fSumL1DCal, fSumOfflineDCal);
747  fHistManager.FillTH2("EMCTRQA_histDCalL1SumVsL0Sum", fSumL0DCal, fSumL1DCal);
748  fHistManager.FillTH2("EMCTRQA_histDCalNCellVsNL0", fNL0DCal, fNCellDCal);
749  fHistManager.FillTH2("EMCTRQA_histDCalNCellVsNL1", fNL1DCal, fNCellDCal);
750  fHistManager.FillTH2("EMCTRQA_histDCalNL1VsNL0", fNL0DCal, fNL1DCal);
751  }
752 
753  fSumOfflineEMCal = 0;
754  fSumL0EMCal = 0;
755  fSumL1EMCal = 0;
756  fSumOfflineDCal = 0;
757  fSumL0DCal = 0;
758  fSumL1DCal = 0;
759 
760  fNCellEMCal = 0;
761  fNL0EMCal = 0;
762  fNL1EMCal = 0;
763  fNCellDCal = 0;
764  fNL0DCal = 0;
765  fNL1DCal = 0;
766 }
767 
775 {
776  AliEMCALTriggerQA::EventTimeStamp(timeStamp);
777 
778  if (fTimeStampBinWidth > 0) {
779  TString hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
780  if (!fHistManager.FindObject(hname)) {
781  TString htitle;
782 
783  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
784  htitle = TString::Format("EMCTRQA_histEvents;;events");
785  TH1* hevents = fHistManager.CreateTH1(hname, htitle, 1, 0, 1);
786  hevents->GetXaxis()->SetBinLabel(1, TString::Format("%u <= time stamp < %u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth));
787 
788  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
789  htitle = TString::Format("EMCTRQA_histFastORL0;FastOR abs. ID;entries above 0");
790  fHistManager.CreateTH1(hname, htitle, fMaxFORabsId, 0, fMaxFORabsId);
791  }
792 
793  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
794  fHistManager.FillTH1(hname, 0.);
795  }
796 }
void ProcessCell(const AliEMCALCellInfo &cell)
void ReadFastORBadChannelFromFile(const char *fname)
Int_t fNL0EMCal
! EMCal number of L0 FastORs (will be reset each event)
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
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)
double Double_t
Definition: External.C:58
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="")
Fill a 2D histogram within the container.
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.
UInt_t fMinL0FastORAmp
Minimum L0 amplitude of the FastORs.
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="")
Create a new TH2 within the container.
void ProcessFastor(const AliEMCALTriggerFastOR *fastor, AliVCaloCells *cells=0)
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
Bool_t fDCalPlots
Whether to add DCal QA plots.
Int_t fNL1EMCal
! EMCal number of L1 FastORs (will be reset each event)
unsigned int UInt_t
Definition: External.C:33
Int_t fNTotTRU
! Total number of TRUs
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
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)
UInt_t fMinL1FastORAmp
Minimum L1 amplitude of the FastORs.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
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)
short Short_t
Definition: External.C:23
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)
TFile * file
TList with histograms for a given trigger.
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)
bool Bool_t
Definition: External.C:53
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)
Definition: External.C:196
THistManager fHistManager
Histogram manager.