AliPhysics  5eaf189 (5eaf189)
AliEMCALTriggerOfflineLightQAPP.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  fBadChannels(),
44  fL0MinTime(7),
45  fL0MaxTime(10),
46  fMinL0FastORAmp(0),
47  fMinL1FastORAmp(0),
48  fHistManager(),
49  fNTotTRU(0),
50  fMaxFORabsId(0)
51 {
52  for (Int_t i = 0; i < 3; i++) {
53  for (Int_t itype = 0; itype < 6; itype++) {
54  fMaxPatchEMCal[itype][i] = 0;
55  fMaxPatchDCal[itype][i] = 0;
56  }
57  }
58 }
59 
64  AliEMCALTriggerQA(name),
65  fBadChannels(),
66  fL0MinTime(7),
67  fL0MaxTime(10),
68  fMinL0FastORAmp(0),
69  fMinL1FastORAmp(0),
70  fHistManager(name),
71  fNTotTRU(0),
72  fMaxFORabsId(0)
73 {
74  for (Int_t i = 0; i < 3; i++) {
75  for (Int_t itype = 0; itype < 6; itype++) {
76  fMaxPatchEMCal[itype][i] = 0;
77  fMaxPatchDCal[itype][i] = 0;
78  }
79  }
80 }
81 
86  AliEMCALTriggerQA(triggerQA),
87  fBadChannels(),
88  fL0MinTime(triggerQA.fL0MinTime),
89  fL0MaxTime(triggerQA.fL0MaxTime),
92  fHistManager(triggerQA.GetName()),
93  fNTotTRU(0),
94  fMaxFORabsId(0)
95 {
96  for (Int_t i = 0; i < 3; i++) {
97  for (Int_t itype = 0; itype < 6; itype++) {
98  fMaxPatchEMCal[itype][i] = 0;
99  fMaxPatchDCal[itype][i] = 0;
100  }
101  }
102 }
103 
106 {
107 }
108 
113 {
114  Short_t absId = -1;
115 
116  while (stream.good()) {
117  stream >> absId;
118  AddFastORBadChannel(absId);
119  }
120 }
121 
126 {
127  std::ifstream file(fname);
129 }
130 
133 {
134  TString hname;
135  TString htitle;
136 
137  // Geometry object not available at this stage, so need to hardcode some numbers
138  fNTotTRU = 32 + 20; // there are 32 TRU in the EMCal (10 full SM * 3 TRU + 2 small SM * 1 TRU)
139  Int_t ndet = 2;
140  fMaxFORabsId = fNTotTRU * 96; // there are 96 channels in each TRU
141 
142  if (fTimeStampBinWidth > 0) fHistManager.CreateHistoGroup("ByTimeStamp");
144 
145  hname = "EMCTRQA_histFastORL0Hits";
146  htitle = "EMCTRQA_histFastORL0Hits;col;row;entries";
147  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
148 
149  hname = "EMCTRQA_histFastORL0AccumulatedAmplitude";
150  htitle = "EMCTRQA_histFastORL0AccumulatedAmplitude;col;row;accumulated amplitude";
151  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
152 
153  hname = "EMCTRQA_histFastORL0HitsTriggered";
154  htitle = "EMCTRQA_histFastORL0HitsTriggered;col;row;entries";
155  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
156 
157  hname = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered";
158  htitle = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered;col;row;accumulated amplitude";
159  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
160 
161  hname = "EMCTRQA_histFastORL0Time";
162  htitle = "EMCTRQA_histFastORL0Time;FastOR abs. ID;time";
163  fHistManager.CreateTH2(hname, htitle, fMaxFORabsId, 0, fMaxFORabsId, 21, -1, 20);
164 
165  hname = "EMCTRQA_histFastORL0AmpVsTime";
166  htitle = "EMCTRQA_histFastORL0AmpVsTime;time;amplitude";
167  fHistManager.CreateTH2(hname, htitle, 21, -1, 20, 1024/fADCperBin, 0, 1024);
168 
169  hname = "EMCTRQA_histFastORL1Hits";
170  htitle = "EMCTRQA_histFastORL1Hits;col;row;entries";
171  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
172 
173  hname = "EMCTRQA_histFastORL1AccumulatedAmplitude";
174  htitle = "EMCTRQA_histFastORL1AccumulatedAmplitude;col;row;accumulated amplitude";
175  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
176 
177  hname = "EMCTRQA_histFastORL1AmpVsL0Amp";
178  htitle = "EMCTRQA_histFastORL1AmpVsL0Amp;L0 amplitude;L1 time sum;entries";
179  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
180 
181  hname = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered";
182  htitle = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered;L0 amplitude;L1 time sum;entries";
183  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
184 
185  hname = "EMCTRQA_histCellAmpVsFastORL0Amp";
186  htitle = "EMCTRQA_histCellAmpVsFastORL0Amp;FastOR L0 amplitude;2x2 cell sum energy (GeV)";
187  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
188 
189  hname = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered";
190  htitle = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered;FastOR L0 amplitude;2x2 cell sum energy (GeV)";
191  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
192 
193  hname = "EMCTRQA_histCellAmpVsFastORL1Amp";
194  htitle = "EMCTRQA_histCellAmpVsFastORL1Amp;FastOR L1 amplitude;2x2 cell sum energy (GeV)";
195  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
196 
197  for (Int_t nTRU = 0; nTRU < fNTotTRU; nTRU++) {
198  if (nTRU == 34 || nTRU == 35 ||
199  nTRU == 40 || nTRU == 41 ||
200  nTRU == 46 || nTRU == 47) continue;
201  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0AmpTRU%d", nTRU);
202  htitle = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0Amp%d;FastOR L0 amplitude;2x2 cell sum energy (GeV)", nTRU);
203  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
204 
205  hname = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d", nTRU);
206  htitle = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d;TRU amplitude;STU amplitude", nTRU);
207  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 1024);
208 
209  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL1AmpSTU%d", nTRU);
210  htitle = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0Amp%d;FastOR L1 amplitude;2x2 cell sum energy (GeV)", nTRU);
211  fHistManager.CreateTH2(hname, htitle, 1024/fADCperBin, 0, 1024, 1024/fADCperBin, 0, 80);
212  }
213 
214  const char* det[2] = { "EMCal", "DCal" };
215 
216  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
217 
218  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
219  if (!IsPatchTypeEnabled(itype, itrig)) continue;
220  for (Int_t idet = 0; idet < ndet; idet++) {
221  hname = TString::Format("EMCTRQA_hist%sPatchAmp%s%s", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
222  htitle = TString::Format("EMCTRQA_hist%sPatchAmp%s%s;amplitude;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
223  fHistManager.CreateTH1(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
224 
225  hname = TString::Format("EMCTRQA_hist%sMaxPatchAmp%s%s", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
226  htitle = TString::Format("EMCTRQA_hist%sMaxPatchAmp%s%s;amplitude;entries", det[idet], EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
227  fHistManager.CreateTH1(hname, htitle, fgkMaxPatchAmp[itrig]/fADCperBin, 0, fgkMaxPatchAmp[itrig]);
228  }
229 
230  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
231  htitle = TString::Format("EMCTRQA_histMaxEdgePos%s%s;col;row;entries", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
232  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
233 
234  hname = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
235  htitle = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s;col;row;accumulated amplitude", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
236  fHistManager.CreateTH2(hname, htitle, 48, 0, 48, 105, 0, 105);
237  }
238  }
239 }
240 
245 void AliEMCALTriggerOfflineLightQAPP::ProcessPatch(const AliEMCALTriggerPatchInfo* patch)
246 {
247  TString hname;
248 
249  Bool_t (AliEMCALTriggerPatchInfo::* triggerCheck[fgkNPatchTypes][fgkNTriggerTypes])(void) const = {
250  { &AliEMCALTriggerPatchInfo::IsLevel0,
251  &AliEMCALTriggerPatchInfo::IsGammaLow,
252  &AliEMCALTriggerPatchInfo::IsGammaHigh,
253  &AliEMCALTriggerPatchInfo::IsJetLow,
254  &AliEMCALTriggerPatchInfo::IsJetHigh,
255  &AliEMCALTriggerPatchInfo::IsBkg
256  },
257  { &AliEMCALTriggerPatchInfo::IsLevel0Recalc,
258  &AliEMCALTriggerPatchInfo::IsGammaLowRecalc,
259  &AliEMCALTriggerPatchInfo::IsGammaHighRecalc,
260  &AliEMCALTriggerPatchInfo::IsJetLowRecalc,
261  &AliEMCALTriggerPatchInfo::IsJetHighRecalc,
262  &AliEMCALTriggerPatchInfo::IsBkgRecalc
263  },
264  { &AliEMCALTriggerPatchInfo::IsLevel0Simple,
265  &AliEMCALTriggerPatchInfo::IsGammaLowSimple,
266  &AliEMCALTriggerPatchInfo::IsGammaHighSimple,
267  &AliEMCALTriggerPatchInfo::IsJetLowSimple,
268  &AliEMCALTriggerPatchInfo::IsJetHighSimple,
269  &AliEMCALTriggerPatchInfo::IsBkgSimple
270  }
271  };
272 
273  TString det;
274 
275  if (patch->IsEMCal()) {
276  det = "EMCal";
277  }
278  else if (patch->IsDCalPHOS()) {
279  det = "DCal";
280  }
281  else {
282  AliWarning(Form("Patch is not EMCal nor DCal/PHOS (pos: %d, %d)", patch->GetRowStart(), patch->GetColStart()));
283  }
284 
285  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
286  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
287  if (!IsPatchTypeEnabled(itype, itrig)) continue;
288 
289  if (!(patch->*(triggerCheck[itype][itrig]))()) continue;
290 
291  //if (itrig == EMCALTrigger::kTMEMCalLevel0 && itype == kRecalcPatch) Printf("Recalc amp is %d", GetAmplitude(patch, kRecalcPatch));
292 
293  if (patch->IsEMCal()) {
294  if (GetAmplitude(fMaxPatchEMCal[itrig][itype], itype) < GetAmplitude(patch, itype)) fMaxPatchEMCal[itrig][itype] = patch;
295  }
296  else if (patch->IsDCalPHOS()) {
297  if (GetAmplitude(fMaxPatchDCal[itrig][itype], itype) < GetAmplitude(patch, itype)) fMaxPatchDCal[itrig][itype] = patch;
298  }
299 
300  hname = TString::Format("EMCTRQA_histAccAmpEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
301  fHistManager.FillTH2(hname, patch->GetColStart(), patch->GetRowStart(), GetAmplitude(patch, itype));
302 
303  hname = Form("EMCTRQA_hist%sPatchAmp%s%s", det.Data(), EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
304  fHistManager.FillTH1(hname, GetAmplitude(patch, itype));
305  }
306  if (fDebugLevel >= 2) {
307  Printf("Type = %s; global pos = (%d, %d); Amp (online) = %d; Amp (offline) = %d; Patch energy = %.3f\n"
308  "Position (CM): Eta=%.3f, Phi=%.3f\n"
309  "Position (Geo): Eta=%.3f, Phi=%.3f\n",
310  EMCALTrigger::kEMCalTriggerNames[itrig].Data(), patch->GetRowStart(), patch->GetColStart(), patch->GetADCAmp(), patch->GetADCOfflineAmp(), patch->GetPatchE(),
311  patch->GetEtaCM(), patch->GetPhiCM(),
312  patch->GetEtaGeo(), patch->GetPhiGeo());
313  }
314  }
315 }
316 
317 
322 void AliEMCALTriggerOfflineLightQAPP::ProcessFastor(const AliEMCALTriggerFastOR* fastor, AliVCaloCells* cells)
323 {
324  TString hname;
325 
326  if (fBadChannels.find(fastor->GetAbsId()) != fBadChannels.end()) return;
327 
328  Double_t offlineAmp = 0;
329  Int_t nTRU = -1;
330  Int_t nADC = -1;
331  Int_t iSM = -1;
332  Int_t iEta = -1;
333  Int_t iPhi = -1;
334 
335  if (fGeom) {
336  fGeom->GetPositionInSMFromAbsFastORIndex(fastor->GetAbsId(), iSM, iEta, iPhi);
337 
338  Int_t idx[4] = {-1};
339  fGeom->GetCellIndexFromFastORIndex(fastor->GetAbsId(), idx);
340  fGeom->GetTRUFromAbsFastORIndex(fastor->GetAbsId(), nTRU, nADC);
341 
342  if (nTRU >= fNTotTRU || nTRU < 0 ||
343  nTRU == 34 || nTRU == 35 ||
344  nTRU == 40 || nTRU == 41 ||
345  nTRU == 46 || nTRU == 47) {
346  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));
347  return;
348  }
349 
350  if (idx[0] >= 0) {
351  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
352  if (cells) {
353  for (Int_t i = 0; i < 4; i++) {
354  offlineAmp += cells->GetCellAmplitude(idx[i]);
355  }
356  }
357  }
358  }
359  }
360 
361  if (fastor->GetL0Amp() > fMinL0FastORAmp) {
362  if (fTimeStampBinWidth > 0) {
363  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
364  fHistManager.FillTH1(hname, fastor->GetAbsId());
365  }
366 
367  hname = "EMCTRQA_histFastORL0Hits";
368  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
369 
370  hname = "EMCTRQA_histFastORL0AccumulatedAmplitude";
371  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
372 
373  hname = "EMCTRQA_histFastORL0Time";
374  fHistManager.FillTH2(hname, fastor->GetAbsId(), fastor->GetL0Time());
375 
376  hname = "EMCTRQA_histFastORL0AmpVsTime";
377  fHistManager.FillTH2(hname, fastor->GetL0Time(), fastor->GetL0Amp());
378 
379  hname = "EMCTRQA_histCellAmpVsFastORL0Amp";
380  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
381 
382  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
383  hname = "EMCTRQA_histFastORL0HitsTriggered";
384  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
385 
386  hname = "EMCTRQA_histFastORL0AccumulatedAmplitudeTriggered";
387  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL0Amp());
388 
389  hname = "EMCTRQA_histCellAmpVsFastORL0AmpTriggered";
390  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
391  }
392 
393  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL0AmpTRU%d",nTRU);
394  fHistManager.FillTH2(hname, fastor->GetL0Amp(), offlineAmp);
395  }
396 
397  if (fastor->GetL1Amp() > fMinL1FastORAmp) {
398  hname = "EMCTRQA_histFastORL1Hits";
399  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow());
400 
401  hname = "EMCTRQA_histFastORL1AccumulatedAmplitude";
402  fHistManager.FillTH2(hname, fastor->GetGlobalCol(), fastor->GetGlobalRow(), fastor->GetL1Amp());
403 
404  hname = "EMCTRQA_histCellAmpVsFastORL1Amp";
405  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
406 
407  hname = TString::Format("ByTRU/EMCTRQA_histCellAmpVsFastORL1AmpSTU%d",nTRU);
408  fHistManager.FillTH2(hname, fastor->GetL1Amp(), offlineAmp);
409  }
410 
411  UInt_t L1ampChopped = (fastor->GetL1Amp() >> 2) * 4;
412  if (fastor->GetL0Amp() > fMinL0FastORAmp || L1ampChopped > fMinL1FastORAmp) {
413  hname = TString::Format("ByTRU/EMCTRQA_histFastORAmpSTUVsTRU%d",nTRU);
414  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
415 
416  hname = "EMCTRQA_histFastORL1AmpVsL0Amp";
417  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
418 
419  if (fastor->GetL0Time() > fL0MinTime && fastor->GetL0Time() < fL0MaxTime) {
420  hname = "EMCTRQA_histFastORL1AmpVsL0AmpTriggered";
421  fHistManager.FillTH2(hname, fastor->GetL0Amp(), L1ampChopped);
422  }
423  }
424 }
425 
426 
431 {
432  AliDebug(2, Form("Entering AliEmcalTriggerQAAP::EventCompleted"));
433 
434  TString hname;
435 
436  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
437  AliDebug(2, Form("Trigger type: %s", EMCALTrigger::kEMCalTriggerNames[itrig].Data()));
438 
439  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
440  if (!IsPatchTypeEnabled(itype, itrig)) continue;
441 
442  AliDebug(2, Form("Patch type %s", fgkPatchTypes[itype].Data()));
443 
444  if (fMaxPatchEMCal[itrig][itype]) {
445  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
446  fHistManager.FillTH2(hname, fMaxPatchEMCal[itrig][itype]->GetColStart(), fMaxPatchEMCal[itrig][itype]->GetRowStart());
447  }
448 
449  hname = TString::Format("EMCTRQA_histEMCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
450  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchEMCal[itrig][itype], itype));
451 
452  if (fMaxPatchDCal[itrig][itype]) {
453  hname = TString::Format("EMCTRQA_histMaxEdgePos%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
454  fHistManager.FillTH2(hname, fMaxPatchDCal[itrig][itype]->GetColStart(), fMaxPatchDCal[itrig][itype]->GetRowStart());
455  }
456 
457  hname = TString::Format("EMCTRQA_histDCalMaxPatchAmp%s%s", EMCALTrigger::kEMCalTriggerNames[itrig].Data(), fgkPatchTypes[itype].Data());
458  fHistManager.FillTH1(hname, GetAmplitude(fMaxPatchDCal[itrig][itype], itype));
459  }
460  }
461 
462  for (Int_t itype = 0; itype < fgkNPatchTypes; itype++) {
463  for (Int_t itrig = 0; itrig < fgkNTriggerTypes; itrig++) {
464  fMaxPatchEMCal[itrig][itype] = 0;
465  fMaxPatchDCal[itrig][itype] = 0;
466  }
467  }
468 }
469 
477 {
478  AliEMCALTriggerQA::EventTimeStamp(timeStamp);
479 
480  if (fTimeStampBinWidth > 0) {
481  TString hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
482  if (!fHistManager.FindObject(hname)) {
483  TString htitle;
484 
485  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
486  htitle = TString::Format("EMCTRQA_histEvents;;events");
487  TH1* hevents = fHistManager.CreateTH1(hname, htitle, 1, 0, 1);
488  hevents->GetXaxis()->SetBinLabel(1, TString::Format("%u <= time stamp < %u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth));
489 
490  hname = TString::Format("ByTimeStamp/EMCTRQA_histFastORL0_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
491  htitle = TString::Format("EMCTRQA_histFastORL0;FastOR abs. ID;entries above 0");
492  fHistManager.CreateTH1(hname, htitle, fMaxFORabsId, 0, fMaxFORabsId);
493  }
494 
495  hname = TString::Format("ByTimeStamp/EMCTRQA_histEvents_%u_%u", fEventTimeStampBin, fEventTimeStampBin+fTimeStampBinWidth);
496  fHistManager.FillTH1(hname, 0.);
497  }
498 }
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
double Double_t
Definition: External.C:58
AliEMCALTriggerOfflineLightQAPP()
Dummy constructor for ROOT I/O.
UInt_t fMinL0FastORAmp
Minimum L0 amplitude of the FastORs.
void ReadFastORBadChannelFromStream(std::istream &stream)
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Int_t fMaxFORabsId
! Maximum FastOR abs id
void ProcessFastor(const AliEMCALTriggerFastOR *fastor, AliVCaloCells *cells=0)
const AliEMCALTriggerPatchInfo * fMaxPatchDCal[fgkNTriggerTypes][fgkNPatchTypes]
! DCal max patch (will be reset each event)
void Init()
Initialize the class, i.e. allocate histograms.
UInt_t fMinL1FastORAmp
Minimum L1 amplitude of the FastORs.
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.
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
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 ProcessPatch(const AliEMCALTriggerPatchInfo *patch)
THistManager fHistManager
Histogram manager.
const AliEMCALTriggerPatchInfo * fMaxPatchEMCal[fgkNTriggerTypes][fgkNPatchTypes]
! EMCal max patch (will be reset each event)
Int_t fDebugLevel
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
std::set< Short_t > fBadChannels
Container of bad channels.
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)
short Short_t
Definition: External.C:23
TFile * file
TList with histograms for a given trigger.
bool Bool_t
Definition: External.C:53
Definition: External.C:196