AliPhysics  v5-07-15-01 (b3d7633)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskEMCALTriggerQA.cxx
Go to the documentation of this file.
1  /**************************************************************************
2  * Copyright(c) 1998-1999, 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 <TList.h>
17 #include <TH2F.h>
18 #include <TF1.h>
19 #include <TProfile2D.h>
20 #include <TStreamerInfo.h>
21 #include <TFile.h>
22 
23 #include "AliLog.h"
24 #include "AliVCluster.h"
25 #include "AliVCaloCells.h"
26 #include "AliVEvent.h"
27 #include "AliCentrality.h"
28 
29 #include "AliVEvent.h"
30 #include "AliVCaloTrigger.h"
31 #include "AliESDVZERO.h"
32 
33 #include "AliEMCALGeometry.h"
34 #include "AliEMCALRecoUtils.h"
35 #include "AliOADBContainer.h"
36 #include "AliAnalysisManager.h"
37 
39 
43 
44 //______________________________________________________________________________
46 //______________________________________________________________________________
48 AliAnalysisTaskSE(name),
49 fOutputList(0), fRecoUtils(0x0),
50 fGeoSet(0), fGeometry(0), fGeoName(""),
51 fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath(""),
52 fBitEGA(0), fBitEJE(0),
53 fEtaPhiEnMin(3.),
54 fSTUTotal(0), fTRUTotal(0),
55 fV0Trigger(0), fV0A(0), fV0C(0),
56 fFillV0SigHisto(1), fFillClusAcceptHisto(0),
57 fMCData(kFALSE),
58 fEventMB (0),
59 fEventL0 (0), fEventL0D (0),
60 fEventL1G (0), fEventL1GD (0),
61 fEventL1G2 (0), fEventL1G2D(0),
62 fEventL1J (0), fEventL1JD (0),
63 fEventL1J2 (0), fEventL1J2D(0),
64 fEventCen (0), fEventSem (0),
65 fMomentum(),
66 //Histograms
67 fhNEvents(0), fhFORAmp(0),
68 fhFORAmpL1G(0), fhFORAmpL1G2(0),
69 fhFORAmpL1J(0), fhFORAmpL1J2(0),
70 fhL0Amp(0), fhL0AmpL1G(0), fhL0AmpL1J(0),
71 fhL1Amp(0), fhL1GAmp(0), fhL1G2Amp(0),
72 fhL1JAmp(0), fhL1J2Amp(0), fhL1FOREnergy(0),
73 fhL0Patch(0), fhL1GPatch(0), fhL1G2Patch(0),
74 fhL1GPatchNotFake(0), fhL1GPatchFake(0), fhL1GPatchNotAllFake(0),
75 fhL1GPatchAllFake(0), fhL1GPatchNotAllFakeMax(0),
76 fhL1GPatchAllFakeMax(0), fhL1GPatchNotAllFakeMaxE(0),
77 fhL1GPatchAllFakeMaxE(0), fhL1GPatchNotAllFakeE(0),
78 fhL1GPatchAllFakeE(0), fhL1GPatchFakeE(0),
79 fhL1GPatchNotFakeE(0), fhNPatchFake(0), fhNPatchNotFake(0),
80 fhL1JPatch(0), fhL1J2Patch(0),
81 fhFEESTU(0), fhTRUSTU(0), fhV0STU(0),
82 fhGPMaxVV0TT(0), fhJPMaxVV0TT(0),
83 fhFORMeanAmp(0), fhL0MeanAmp(0), fhL1MeanAmp(0),
84 fhL1GPatchMax(0), fhL1G2PatchMax(0),
85 fhL1JPatchMax(0), fhL1J2PatchMax(0),
86 //Histogram settings
87 fNBinsSTUSignal (300), fMaxSTUSignal (30000),
88 fNBinsTRUSignal (300), fMaxTRUSignal (30000),
89 fNBinsV0Signal (300), fMaxV0Signal (30000),
90 fNBinsSTUFEERatio(300), fMaxSTUFEERatio(100),
91 fNBinsSTUTRURatio(300), fMaxSTUTRURatio(100),
92 fNBinsClusterE (100), fMaxClusterE (50),
93 fNBinsClusterPhi (110), fMaxClusterPhi (3.15), fMinClusterPhi (1.39),
94 fNBinsClusterEta (96), fMaxClusterEta (0.7),
95 fMapCell (),
96 fMapCellL1G (), fMapCellL1G2 (),
97 fMapCellL1J (), fMapCellL1J2 (),
98 fMapTrigL0 (), fMapTrigL1 (),
99 fMapTrigL0L1G(), fMapTrigL0L1J(),
100 fMapTrigL1G (), fMapTrigL1G2 (),
101 fMapTrigL1J (), fMapTrigL1J2 ()
102 {
104 
105  DefineOutput(1, TList::Class());
106 }
107 
108 //______________________________________________
110 //______________________________________________
112 {
113  // Set it only once
114  if(fOADBSet) return ;
115 
116  if(fOADBFilePath == "") fOADBFilePath = "$ALICE_PHYSICS/OADB/EMCAL" ;
117 
118  Int_t runnumber = InputEvent()->GetRunNumber() ;
119 
120  AliInfo(Form("Get AODB parameters from EMCAL in %s for run %d",fOADBFilePath.Data(),runnumber));
121 
122  Int_t nSM = fGeometry->GetNumberOfSuperModules();
123 
124  // Bad map
125  if(fRecoUtils->IsBadChannelsRemovalSwitchedOn())
126  {
127  AliOADBContainer *contBC=new AliOADBContainer("");
128  contBC->InitFromFile(Form("%s/EMCALBadChannels.root",fOADBFilePath.Data()),"AliEMCALBadChannels");
129 
130  TObjArray *arrayBC=(TObjArray*)contBC->GetObject(runnumber);
131 
132  if(arrayBC)
133  {
134  AliInfo("Remove EMCAL bad cells");
135 
136  for (Int_t i=0; i<nSM; ++i)
137  {
138  TH2I *hbm = fRecoUtils->GetEMCALChannelStatusMap(i);
139 
140  if (hbm)
141  delete hbm;
142 
143  hbm=(TH2I*)arrayBC->FindObject(Form("EMCALBadChannelMap_Mod%d",i));
144 
145  if (!hbm)
146  {
147  AliError(Form("Can not get EMCALBadChannelMap_Mod%d",i));
148  continue;
149  }
150 
151  hbm->SetDirectory(0);
152  fRecoUtils->SetEMCALChannelStatusMap(i,hbm);
153 
154  } // loop
155  } else AliInfo("Do NOT remove EMCAL bad channels"); // run array
156 
157  delete contBC;
158  } // Remove bad
159 
160  fOADBSet = kTRUE;
161 }
162 
163 //________________________________________________
165 //________________________________________________
167 {
168  Int_t posX = -1, posY = -1;
169  Int_t nSupMod = -1, ieta = -1, iphi = -1, nModule = -1, nIphi = -1, nIeta = -1;
170  Short_t absId = -1;
171  Int_t nCells = 0;
172 
173  AliVCaloCells& cells= *(InputEvent()->GetEMCALCells());
174 
175  if(cells.IsEMCAL())
176  {
177  for (Int_t icell = 0; icell < cells.GetNumberOfCells(); icell++)
178  {
179  nCells ++;
180 
181  Double_t amp =0., time = 0., efrac = 0;
182  Int_t mclabel = -1;
183 
184  cells.GetCell(icell, absId, amp, time,mclabel,efrac);
185 
186  fGeometry->GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
187  fGeometry->GetCellPhiEtaIndexInSModule(nSupMod, nModule, nIphi, nIeta, iphi, ieta);
188 
189  posX = (nSupMod % 2) ? ieta + AliEMCALGeoParams::fgkEMCALCols : ieta;
190  posY = iphi + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
191 
192  Int_t indexX = Int_t(posX/2);
193  Int_t indexY = Int_t(posY/2);
194 
195  if(indexX >= fgkFALTROCols || indexY >= fgkFALTRORows )
196  {
197  AliWarning(Form("Wrong Position (x,y) = (%d,%d)",posX,posY));
198 
199  continue;
200  }
201 
202  // here it is the amplitude for each cell
203  fMapCell[indexY][indexX] += amp;
204 
205  if(fEventL1G || fEventL1GD)
206  {
207  fMapCellL1G[indexY][indexX] += amp;
208  //printf("L1G cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G[indexY][indexX]);
209  }
210 
211  if(fEventL1G2 || fEventL1G2D)
212  {
213  fMapCellL1G2[indexY][indexX] += amp;
214  //printf("L1G2 cell[%i,%i] amp=%f\n",indexY,indexX,fMapCellL1G2[indexY][indexX]);
215  }
216 
217  if(fEventL1J || fEventL1JD) fMapCellL1J [indexY][indexX] += amp;
218  if(fEventL1J2 || fEventL1J2D) fMapCellL1J2[indexY][indexX] += amp;
219 
220  //printf("cell[%i,%i] amp=%f\n",indexY,indexX,fMapCell[indexY][indexX]);
221  }
222  }
223 }
224 
225 //______________________________________________________________________________
227 //______________________________________________________________________________
229 {
230  AliVCaloTrigger& trg= * (InputEvent()->GetCaloTrigger("EMCAL"));
231 
232  fV0Trigger = trg.GetL1V0(0)+trg.GetL1V0(1); // used elsewhere
233 
234  Int_t posX = -1, posY = -1;
235 
236  Int_t nL0Patch = 0 ;
237  //Int_t nL1Patch = 0 ;
238  fSTUTotal = 0;
239  fTRUTotal = 0;
240 
241  trg.Reset();
242  // loop on FASTOR
243 
244  while (trg.Next())
245  {
246  trg.GetPosition(posX,posY);
247 
248  if (posX > -1 && posY > -1)
249  {
250  //L0 analysis
251  Int_t nTimes = 0;
252  trg.GetNL0Times(nTimes);
253  Int_t l0Times[10];
254  trg.GetL0Times(l0Times);
255 
256  Float_t ampL0 = 0.;
257  trg.GetAmplitude(ampL0);
258  if (ampL0 > 0) fMapTrigL0[posY][posX] = ampL0;
259 
260  if(triggerclasses.Contains("CEMC7EGA-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EGA") ||
261  triggerclasses.Contains("CPBI2EG1") || triggerclasses.Contains("CINT7EG1-B-NOPF-CENTNOPMD") ||
262  triggerclasses.Contains("CINT7DG1-B-NOPF-CENTNOPMD")) fMapTrigL0L1G[posY][posX] += ampL0;
263 
264  if(triggerclasses.Contains("CEMC7EJE-B-NOPF-CENTNOTRD") || triggerclasses.Contains("CPBI2EJE") ||
265  triggerclasses.Contains("CPBI2EJ1") || triggerclasses.Contains("CINT7EJ1-B-NOPF-CENTNOPMD") ||
266  triggerclasses.Contains("CINT7DJ1-B-NOPF-CENTNOPMD")) fMapTrigL0L1J[posY][posX] += ampL0;
267  fTRUTotal += ampL0;
268 
269  Int_t l0fired = 0;
270  for (Int_t itime = 0; itime < nTimes; itime++)
271  {
272  if (l0Times[itime] > 7 && l0Times[itime] < 10) l0fired = 1;
273  }
274 
275  if (l0fired)
276  {
277  nL0Patch += nTimes;
278  fhL0Patch->Fill(posX,posY);
279  }
280 
281  //L1 analysis
282  Int_t bit = 0;
283  trg.GetTriggerBits(bit);
284 
285  Int_t ts = 0;
286  trg.GetL1TimeSum(ts);
287  if (ts > 0) fMapTrigL1[posY][posX] = ts;
288  fSTUTotal += ts;
289  // cout << "ts =" <<ts<<endl;
290 
291  //L1
292  Bool_t isEGA1 = ((bit >> fBitEGA ) & 0x1) && (fEventL1G || fEventL1GD ) ;
293  Bool_t isEGA2 = ((bit >> (fBitEGA+1)) & 0x1) && (fEventL1G2 || fEventL1G2D) ;
294  Bool_t isEJE1 = ((bit >> fBitEJE ) & 0x1) && (fEventL1J || fEventL1JD ) ;
295  Bool_t isEJE2 = ((bit >> (fBitEJE+1)) & 0x1) && (fEventL1J2 || fEventL1J2D) ;
296 
297  //if(isEGA1 || isEGA2 || isEJE1 || isEJE2) nL1Patch++;
298  //if(isEJE1 || isEJE2) printf("Jet STU patch %d, time sum %d, posX %d , posY %d\n",nL1Patch,ts,posX, posY);
299 
300  // L1-Gamma
301 
302  if (isEGA1)
303  {
304  fhL1GPatch ->Fill(posX,posY);
305  if (ts > 0) fMapTrigL1G [posY][posX] = ts;
306  }
307 
308  if (isEGA2)
309  {
310  fhL1G2Patch->Fill(posX,posY);
311  if (ts > 0) fMapTrigL1G2[posY][posX] = ts;
312  }
313 
314  // L1-Jet
315  if (isEJE1)
316  {
317  fhL1JPatch ->Fill(posX,posY);
318  if (ts > 0) fMapTrigL1J [posY][posX] = ts;
319 
320  }
321 
322  if (isEJE2)
323  {
324  fhL1J2Patch->Fill(posX,posY);
325  if (ts > 0) fMapTrigL1J2[posY][posX] = ts;
326  }
327 
328  }
329  }
330 
331 // // NOT SURE WHY THIS LINE, COMMENT IF NOT CLUSTER HISTO NOT FILLED FOR LHC13
332 // if (!nL0Patch)
333 // {
334 // fEventL0 = kFALSE;
335 // if (!triggerclasses.Contains("CPBI2")) fEventL1G = fEventL1G2 = fEventL1J = fEventL1J2 = kFALSE; // pp running
336 // }
337 
338  if(fTRUTotal > fMaxTRUSignal && DebugLevel() > 0)
339  AliInfo(Form("Large fTRUTotal %f",fTRUTotal));
340 
341  if(fSTUTotal > fMaxSTUSignal && DebugLevel() > 0)
342  AliInfo(Form("Large fSTUTotal %d",fSTUTotal));
343 }
344 
345 //___________________________________________________
348 //___________________________________________________
350 {
351  if(fMCData) return ;
352 
353  // Init OADB
354  if(fAccessOADB) AccessOADB(); // only once
355 
356  //Get Vertex
357  Double_t v[3] = {0,0,0};
358  InputEvent()->GetPrimaryVertex()->GetXYZ(v);
359 
360  //clusters distribution
361  TRefArray* caloClus = new TRefArray();
362  InputEvent()->GetEMCALClusters(caloClus);
363 
364  Int_t nCaloClusters = caloClus->GetEntriesFast();
365 
366  Float_t emax = 0;
367  Float_t etamax = 0;
368  Float_t phimax = 0;
369  Float_t ietamax=-1;
370  Float_t iphimax=-1;
371 
372  Float_t e = 0;
373  Float_t eta = 0;
374  Float_t phi = 0;
375 
376  Int_t nSupMod = -1, ieta = -1, iphi = -1;
377 
378  //Get vertex for momentum calculation
379  Double_t vertex[] = {0.0,0.0,0.0};
380  //InputEvent()->GetPrimaryVertex()->GetXYZ(vertex);
381 
382  Float_t centrality = -1;
383  if(InputEvent()->GetCentrality()) centrality = InputEvent()->GetCentrality()->GetCentralityPercentile("V0M");
384 
385  //if(!fEventMB) printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d \n",
386  // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem);
387 
388  for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
389  {
390  AliVCluster *clus = (AliVCluster*) (caloClus->At(icalo));
391 
392  if(!clus->IsEMCAL()) continue;
393 
394  if(!fRecoUtils->IsGoodCluster(clus,fGeometry,InputEvent()->GetEMCALCells(),InputEvent()->GetBunchCrossNumber()))
395  continue;
396 
397  if(clus->GetNCells() < 2) continue ; // Avoid 1 cell clusters, noisy, exotic.
398 
399  clus->GetMomentum(fMomentum, vertex);
400 
401  Bool_t shared = kFALSE;
402  Int_t idAbs = -1, iphi0 = -1, ieta0 = -1;
403  fRecoUtils->GetMaxEnergyCell(fGeometry, InputEvent()->GetEMCALCells(),clus,
404  idAbs,nSupMod,ieta0,iphi0,shared);
405  //Change index to be continuous over SM
406  ieta = (nSupMod % 2) ? ieta0 + AliEMCALGeoParams::fgkEMCALCols : ieta0;
407  iphi = iphi0 + AliEMCALGeoParams::fgkEMCALRows * int(nSupMod / 2);
408  ieta/=2;
409  iphi/=2;
410 
411  if(ieta > fgkFALTROCols || iphi > fgkFALTRORows )
412  AliWarning(Form("Wrong Position (x,y) = (%d,%d)",ieta,iphi));
413 
414  e = clus->E();
415  eta = fMomentum.Eta();
416  phi = fMomentum.Phi();
417  if( phi < 0 ) phi+=TMath::TwoPi();
418 
419  if(e > emax)
420  {
421  emax = e;
422  etamax = eta;
423  phimax = phi;
424  ietamax = ieta;
425  iphimax = iphi;
426  }
427 
428  // Fill cluster histograms depending on the event trigger selection
429  if( fEventMB ) FillClusterHistograms(kMBTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
430  if( fEventCen ) FillClusterHistograms(kCentralTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
431  if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
432 
433  if( fEventL0 ) FillClusterHistograms(kL0Trig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
434  if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
435  if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
436  if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
437  if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
438 
439  if( fEventL0D ) FillClusterHistograms(kL0TrigD ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
440  if( fEventL1GD ) FillClusterHistograms(kL1GammaTrigD ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
441  if( fEventL1G2D) FillClusterHistograms(kL1GammaTrig2D ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
442  if( fEventL1JD ) FillClusterHistograms(kL1JetTrigD ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
443  if( fEventL1J2D) FillClusterHistograms(kL1JetTrig2D ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
444 
445  if( fEventL0 && !fEventL0D ) FillClusterHistograms(kL0TrigPureEMC , kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
446  if( !fEventL0 && fEventL0D ) FillClusterHistograms(kL0TrigPureDMC , kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
447  if( fEventL1G && !fEventL1GD ) FillClusterHistograms(kL1GTrigPureEMC, kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
448  if( !fEventL1G && fEventL1GD ) FillClusterHistograms(kL1GTrigPureDMC, kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
449  if( fEventL1J && !fEventL1JD ) FillClusterHistograms(kL1JTrigPureEMC, kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
450  if( !fEventL1J && fEventL1JD ) FillClusterHistograms(kL1JTrigPureDMC, kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
451 
452  if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
453  if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
454 
455  if( fEventL1G2D && !fEventL1GD) FillClusterHistograms(kL1Gamma2OnlyGammaTrigD,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
456  if( fEventL1J2D && !fEventL1JD) FillClusterHistograms(kL1Jet2OnlyJetTrigD ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
457 
458 
459  if( fEventL1G && !fEventL1J )
460  FillClusterHistograms (kL1GammaOnlyTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
461 
462  if( fEventL1J && !fEventL1G )
463  FillClusterHistograms (kL1JetOnlyTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
464 
465  if( fEventL1GD && !fEventL1JD )
466  FillClusterHistograms (kL1GammaOnlyTrig,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
467 
468  if( fEventL1JD && !fEventL1GD )
469  FillClusterHistograms (kL1JetOnlyTrig ,kFALSE,e,eta,phi,ieta,iphi,centrality,fV0A+fV0C);
470 
471  if(!fEventL1G && !fEventL1J && !fEventL0 && !fEventL1GD && !fEventL1JD && !fEventL0D)
472  {
473  if( fEventMB ) fhClusMBPure[0] ->Fill(e);
474  if( fEventCen ) fhClusMBPure[1] ->Fill(e);
475  if( fEventSem ) fhClusMBPure[2] ->Fill(e);
476  }
477 
478  }
479 
480  // Maximum energy cluster per event histograms
481 
482  if( fEventMB ) FillClusterHistograms(kMBTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
483  if( fEventCen ) FillClusterHistograms(kCentralTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
484  if( fEventSem ) FillClusterHistograms(kSemiCentralTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
485 
486  if( fEventL0 ) FillClusterHistograms(kL0Trig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
487  if( fEventL1G ) FillClusterHistograms(kL1GammaTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
488  if( fEventL1G2) FillClusterHistograms(kL1GammaTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
489  if( fEventL1J ) FillClusterHistograms(kL1JetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
490  if( fEventL1J2) FillClusterHistograms(kL1JetTrig2 ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
491 
492  if( fEventL0D ) FillClusterHistograms(kL0TrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
493  if( fEventL1GD ) FillClusterHistograms(kL1GammaTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
494  if( fEventL1G2D) FillClusterHistograms(kL1GammaTrig2D ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
495  if( fEventL1JD ) FillClusterHistograms(kL1JetTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
496  if( fEventL1J2D) FillClusterHistograms(kL1JetTrig2D ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
497 
498  if( fEventL0 && !fEventL0D ) FillClusterHistograms(kL0TrigPureEMC , kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
499  if( !fEventL0 && fEventL0D ) FillClusterHistograms(kL0TrigPureDMC , kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
500  if( fEventL1G && !fEventL1GD ) FillClusterHistograms(kL1GTrigPureEMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
501  if( !fEventL1G && fEventL1GD ) FillClusterHistograms(kL1GTrigPureDMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
502  if( fEventL1J && !fEventL1JD ) FillClusterHistograms(kL1JTrigPureEMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
503  if( !fEventL1J && fEventL1JD ) FillClusterHistograms(kL1JTrigPureDMC, kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
504 
505  if( fEventL1G2 && !fEventL1G) FillClusterHistograms(kL1Gamma2OnlyGammaTrig,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
506  if( fEventL1J2 && !fEventL1J) FillClusterHistograms(kL1Jet2OnlyJetTrig ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
507 
508  if( fEventL1G2D && !fEventL1GD) FillClusterHistograms(kL1Gamma2OnlyGammaTrigD,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
509  if( fEventL1J2D && !fEventL1JD) FillClusterHistograms(kL1Jet2OnlyJetTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
510 
511  if( fEventL1GD && !fEventL1JD )
512  FillClusterHistograms (kL1GammaOnlyTrigD,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
513  if( fEventL1JD && !fEventL1GD )
514  FillClusterHistograms (kL1JetOnlyTrigD ,kTRUE,emax,etamax,phimax,ietamax,iphimax,centrality,fV0A+fV0C);
515 
516  if(!fEventL1G && !fEventL1J && !fEventL0 && !fEventL1GD && !fEventL1JD && !fEventL0D)
517  {
518  if( fEventMB ) fhClusMaxMBPure[0] ->Fill(emax);
519  if( fEventCen ) fhClusMaxMBPure[1] ->Fill(emax);
520  if( fEventSem ) fhClusMaxMBPure[2] ->Fill(emax);
521  }
522 }
523 
524 //______________________________________________________________________________________________
527 //______________________________________________________________________________________________
528 void AliAnalysisTaskEMCALTriggerQA::FillClusterHistograms(Int_t triggerNumber, Bool_t max,
529  Float_t e, Float_t eta, Float_t phi,
530  Float_t ieta, Float_t iphi,
531  Float_t centrality, Float_t fV0AC)
532 {
533  if(!max)
534  {
535  fhClus [triggerNumber]->Fill(e);
536  fhClusCen[triggerNumber]->Fill(e,centrality);
537  if(fFillV0SigHisto) fhClusV0 [triggerNumber]->Fill(e,fV0AC);
538 
540  {
541  // just fill 2
542  if(e > fEtaPhiEnMin) fhClusEtaPhiHigh[triggerNumber]->Fill( eta, phi);
543  else fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
544  }
545  else
546  {
547  fhClusEta[triggerNumber]->Fill(e,eta);
548  fhClusPhi[triggerNumber]->Fill(e,phi);
549 
550  if(e > fEtaPhiEnMin)
551  {
552  fhClusEtaPhiHigh [triggerNumber]->Fill( eta, phi);
553  fhClusEtaPhiHighCellMax[triggerNumber]->Fill(ieta,iphi);
554  }
555  else
556  {
557  fhClusEtaPhiLow [triggerNumber]->Fill( eta, phi);
558  fhClusEtaPhiLowCellMax[triggerNumber]->Fill(ieta,iphi);
559  }
560  }
561  }
562  else
563  {
564  fhClusMax [triggerNumber]->Fill(e);
565  fhClusCenMax[triggerNumber]->Fill(e,centrality);
566  if(fFillV0SigHisto) fhClusV0Max [triggerNumber]->Fill(e,fV0AC);
567 
569  {
570  fhClusEtaMax[triggerNumber]->Fill(e,eta);
571  fhClusPhiMax[triggerNumber]->Fill(e,phi);
572 
573  if(e > fEtaPhiEnMin)
574  {
575  fhClusEtaPhiHighCluMax [triggerNumber]->Fill( eta, phi);
576  fhClusEtaPhiHighCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
577  }
578  else
579  {
580  fhClusEtaPhiLowCluMax [triggerNumber]->Fill( eta, phi);
581  fhClusEtaPhiLowCellMaxCluMax[triggerNumber]->Fill(ieta,iphi);
582  }
583  }
584  }
585 }
586 
587 //_____________________________________________________________
589 //_____________________________________________________________
591 {
592  Double_t ampFOR[60] = {0.}, ampL0[60] = {0.}, ampL1[60] = {0.};
593  for (Int_t i = 0; i < fgkFALTRORows; i++)
594  {
595  for (Int_t j = 0; j < fgkFALTROCols; j++)
596  {
597  //method to get TRU number
598  Int_t idFOR = -1;
599  fGeometry->GetAbsFastORIndexFromPositionInEMCAL(j,i,idFOR);
600  Int_t iTRU = -1;
601  Int_t iADC = -1;
602  fGeometry->GetTRUFromAbsFastORIndex(idFOR,iTRU,iADC);
603 
604  //printf("i %d, j %d, iTRU %d, iADC %d, idFOR %d; cell %f, L0 %f, L1 %f\n",
605  // i,j,iTRU,iADC,idFOR, fMapCell [i][j],fMapTrigL0[i][j],fMapTrigL1[i][j]);
606 
607  if (iTRU >= 0)
608  {
609  ampFOR[iTRU] += fMapCell [i][j];
610  ampL0[iTRU] += fMapTrigL0[i][j];
611  ampL1[iTRU] += fMapTrigL1[i][j];
612  }
613  }
614  }
615 
616  // FEE vs STU and TRU vs STU ratios
617  for (Int_t i = 0; i < 60; i++)
618  {
619  if (ampFOR[i] != 0 && ampL1[i] != 0)
620  {
621  fhFEESTU->Fill(ampL1[i]/ampFOR[i],i);
622  if(ampL1[i]/ampFOR[i] > fMaxSTUFEERatio && DebugLevel() > 0 )
623  AliWarning(Form("Large STU/FEE ratio %f",ampL1[i]/ampFOR[i]));
624  }
625 
626  if (ampL0[i] != 0 && ampL1[i] != 0)
627  {
628  fhTRUSTU->Fill(ampL1[i]/ampL0[i] ,i);
629  if(ampL1[i]/ampL0[i] > fMaxSTUTRURatio && DebugLevel() > 0 )
630  AliWarning(Form("Large STU/TRU ratio %f",ampL1[i]/ampL0[i]));
631  }
632  }
633 }
634 
635 //_____________________________________________________________
637 //_____________________________________________________________
639 {
640  fhNEvents->Fill(0.5); // All physics events
641 
642  if( fEventMB )
643  {
644  fhNEvents->Fill(1.5);
645  if( !fEventL1G && !fEventL1J && !fEventL1G2 && !fEventL1J2 && !fEventL0 ) fhNEvents->Fill(12.5);
646  }
647  else
648  {
649  if( fEventL0 ) fhNEvents->Fill(13.5);
650  if( fEventL1G ) fhNEvents->Fill(14.5);
651  if( fEventL1J ) fhNEvents->Fill(15.5);
652 
653  if( fEventL0D ) fhNEvents->Fill(20.5);
654  if( fEventL1GD ) fhNEvents->Fill(21.5);
655  if( fEventL1JD ) fhNEvents->Fill(22.5);
656 
657  if( fEventL0 && !fEventL0D ) fhNEvents->Fill(23.5);
658  if( fEventL1G && !fEventL1GD ) fhNEvents->Fill(24.5);
659  if( fEventL1J && !fEventL1JD ) fhNEvents->Fill(25.5);
660  }
661 
662  if( fEventCen) fhNEvents->Fill(2.5);
663  if( fEventSem) fhNEvents->Fill(3.5);
664 
665  if( fEventL0 )
666  {
667  fhNEvents->Fill(4.5);
668  }
669 
670  if( fEventL1G )
671  {
672  fhNEvents->Fill(5.5);
673  if(!fEventL1J) fhNEvents->Fill(9.5);
674  if(fEventCen || fEventSem) fhNEvents->Fill(16.5);
675  }
676 
677  if( fEventL1G2 )
678  {
679  fhNEvents->Fill(6.5);
680  if( !fEventL1G ) fhNEvents->Fill(18.5);
681 
682  }
683 
684  if( fEventL1J )
685  {
686  fhNEvents->Fill(7.5);
687  if(!fEventL1G) fhNEvents->Fill(10.5);
688  if(fEventCen || fEventSem) fhNEvents->Fill(17.5);
689  }
690 
691  if( fEventL1J2 )
692  {
693  fhNEvents->Fill(8.5);
694  if( !fEventL1J ) fhNEvents->Fill(19.5);
695  }
696 
697  if(fEventL1J && fEventL1G) fhNEvents->Fill(11.5);
698 }
699 
700 //______________________________________________________________
702 //______________________________________________________________
704 {
705  // Study fakes - Make it more understandable!!!
706 
707  Int_t areAllFakes = 2;
708  Int_t numberpatchNotFake = 0;
709  Int_t numberpatchFake = 0;
710 
711  Int_t threshold = 10;// it's not GeV it's ADC !!
712  Bool_t enoughE = kFALSE;
713  Double_t patchMax = 0;
714  Int_t colMax = -1;
715  Int_t rowMax = -1;
716  Int_t shiftCol = -1;
717  Int_t shiftRow = -1;
718 
719  // loop on patches
720  for (Int_t posx = 0; posx < fgkFALTROCols; posx++)
721  {
722  for (Int_t posy = 0; posy < fgkFALTRORows; posy++)
723  {
724  Double_t patchEnergy = 0;
725 
726  if(fMapTrigL1G[posy][posx] > 0)
727  {
728  for(Int_t irow = 0; irow < 2; irow++)
729  {
730  for(Int_t icol = 0; icol < 2; icol++)
731  {
732  // loop on cells
733  shiftCol = posx+icol;
734  shiftRow = posy+irow;
735 
736  // printf("cell[%i,%i]=%f\n",posy+icol,posx+irow, fMapCellL1G[posy+icol][posx+irow]);
737  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
738  {
739  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
740 
741  if( fMapCellL1G[shiftRow][shiftCol] > threshold/2 ) enoughE = kTRUE;
742  }
743  }
744  }
745 
746  if (patchEnergy > patchMax)
747  {
748  patchMax = patchEnergy;
749  colMax = posx;
750  rowMax = posy;
751  }
752 
753  if(patchEnergy>threshold || (patchEnergy>threshold-3 && enoughE))
754  {
755  numberpatchNotFake++;
756  fhL1GPatchNotFake ->Fill(posx,posy);
757  fhL1GPatchNotFakeE->Fill(patchEnergy);
758  areAllFakes = 1;
759  }
760  else
761  {
762  numberpatchFake++;
763  areAllFakes = 0;
764  fhL1GPatchFake ->Fill(posx,posy);
765  fhL1GPatchFakeE->Fill(patchEnergy);
766  }
767  }
768  }
769  }
770 
771  fhNPatchNotFake->Fill(areAllFakes,numberpatchNotFake);
772  fhNPatchFake ->Fill(areAllFakes,numberpatchFake);
773 
774  if(areAllFakes == 0)
775  {
776  // loop on patchs
777  for (Int_t col = 0; col < fgkFALTROCols; col++)
778  {
779  for (Int_t row = 0; row < fgkFALTRORows; row++)
780  {
781  if(fMapTrigL1G[row][col] > 0)
782  {
783  // cout <<"checking fMapTrigL1G[row][col]"<<fMapTrigL1G[row][col]<<endl;
784  fhL1GPatchAllFake->Fill(col,row);
785 
786  Double_t patchEnergy=0;
787  for(Int_t irow = 0; irow < 2; irow++)
788  {
789  for(Int_t icol = 0; icol < 2; icol++)
790  {
791  shiftCol = col+icol;
792  shiftRow = row+irow;
793 
794  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
795  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
796 
797  }
798  }
799  fhL1GPatchAllFakeE->Fill(patchEnergy);
800  }
801  }
802  }
803  // cout << "row max"<<rowMax<<" colmax"<<colMax<< " fMapTrigL1G[rowMax][colMax]"<< fMapTrigL1G[rowMax][colMax]<<endl;
804 
805  if(fMapTrigL1G[rowMax][colMax] > 0)
806  {
807  // printf("\npatch max [%i,%i] = %f\n",rowMax,colMax,patchMax);
808  fhL1GPatchAllFakeMax ->Fill(colMax,rowMax);
809  fhL1GPatchAllFakeMaxE->Fill(patchMax);
810  }
811  }
812  else
813  {
814  // loop on patches
815  for (Int_t col = 0; col < fgkFALTROCols; col++)
816  {
817  for (Int_t row = 0; row < fgkFALTRORows; row++)
818  {
819  if(fMapTrigL1G[row][col] > 0)
820  {
821  fhL1GPatchNotAllFake->Fill(col,row);
822 
823  Double_t patchEnergy = 0;
824  for(Int_t irow = 0; irow < 2; irow++)
825  {
826  for(Int_t icol = 0; icol < 2; icol++)
827  {
828  shiftCol = col+icol;
829  shiftRow = row+irow;
830 
831  if(shiftRow < fgkFALTRORows && shiftCol < fgkFALTROCols)
832  patchEnergy += fMapCellL1G[shiftRow][shiftCol] ;
833  }
834  }
835 
836  fhL1GPatchNotAllFakeE->Fill(patchEnergy);
837 
838  }
839  }
840  }
841 
842  if(fMapTrigL1G[rowMax][colMax] > 0 )
843  {
844  fhL1GPatchNotAllFakeMax ->Fill(colMax,rowMax);
845  fhL1GPatchNotAllFakeMaxE->Fill(patchMax);
846  }
847  }
848 
849  if( fFillV0SigHisto ) fhGPMaxVV0TT->Fill(fV0Trigger, patchMax);
850  if( fEventL1G ) fhL1GPatchMax ->Fill(colMax,rowMax);
851  if( fEventL1G2 ) fhL1G2PatchMax->Fill(colMax,rowMax);
852 }
853 
854 //____________________________________________________________
856 //____________________________________________________________
858 {
859  Double_t patchMax = 0;
860  Int_t colMax = -1;
861  Int_t rowMax = -1;
862  Int_t col, row = 0;
863 
864  for (Int_t i = 0; i < 9; i++)
865  {
866  for (Int_t j = 0; j < 12; j++)
867  {
868  Int_t patchJ = 0;
869  col = i;
870  row = j;
871 
872  for (Int_t k = 0; k < 16; k++)
873  {
874  for (Int_t l = 0; l < 16; l++)
875  {
876  patchJ += Int_t(fMapTrigL1[4*j + l][4*i + k]);
877  }
878  }
879 
880  if (patchJ > patchMax)
881  {
882  patchMax = patchJ;
883  colMax = 4*col;
884  rowMax = 4*row;
885  }
886  }
887  }
888 
889  if( fFillV0SigHisto ) fhJPMaxVV0TT->Fill(fV0Trigger, patchMax);
890  if( fEventL1J ) fhL1JPatchMax ->Fill(colMax,rowMax);
891  if( fEventL1J2 ) fhL1J2PatchMax->Fill(colMax,rowMax);
892 }
893 
894 //______________________________________________________
896 //______________________________________________________
898 {
899  for (Int_t i = 0; i < fgkFALTRORows; i++)
900  {
901  for (Int_t j = 0; j < fgkFALTROCols; j++) //check x,y direction for reading FOR ((0,0) = top left);
902  {
903  fhFORAmp ->Fill( j, i, fMapCell [i][j]);
904  fhFORAmpL1G ->Fill( j, i, fMapCellL1G [i][j]);
905  fhFORAmpL1G2->Fill( j, i, fMapCellL1G2 [i][j]);
906  fhFORAmpL1J ->Fill( j, i, fMapCellL1J [i][j]);
907  fhFORAmpL1J2->Fill( j, i, fMapCellL1J2 [i][j]);
908  fhL0Amp ->Fill( j, i, fMapTrigL0 [i][j]);
909  fhL0AmpL1G ->Fill( j, i, fMapTrigL0L1G[i][j]);
910  fhL0AmpL1J ->Fill( j, i, fMapTrigL0L1J[i][j]);
911  fhL1Amp ->Fill( j, i, fMapTrigL1 [i][j]);
912 
913  fhL1FOREnergy->Fill(i+fgkFALTRORows*j, fMapTrigL1 [i][j]);
914  fhL1GAmp ->Fill( j, i, fMapTrigL1G [i][j]);
915  fhL1G2Amp ->Fill( j, i, fMapTrigL1G2 [i][j]);
916  fhL1JAmp ->Fill( j, i, fMapTrigL1J [i][j]);
917  fhL1J2Amp ->Fill( j, i, fMapTrigL1J2 [i][j]);
918  fhFORMeanAmp->Fill( j, i, fMapCell [i][j]);
919  fhL0MeanAmp ->Fill( j, i, fMapTrigL0 [i][j]);
920  fhL1MeanAmp ->Fill( j, i, fMapTrigL1 [i][j]);
921  }
922  }
923 }
924 
925 //____________________________________________________
927 //____________________________________________________
929 {
930  AliESDVZERO* eventV0 = dynamic_cast<AliESDVZERO*> (InputEvent()->GetVZEROData());
931 
932  if(eventV0)
933  {
934  for (Int_t i = 0; i < 32; i++)
935  {
936  fV0C += eventV0->GetAdcV0C(i);
937  fV0A += eventV0->GetAdcV0A(i);
938  }
939 
940  if (fSTUTotal != 0 && fFillV0SigHisto)
941  {
942  fhV0STU->Fill(fV0A+fV0C,fSTUTotal);
943 
944  if( fV0A+fV0C > fMaxV0Signal && DebugLevel() > 0)
945  AliWarning(Form("Large fV0A+fV0C %f",fV0A+fV0C));
946  }
947 
948  // Not interesting in case of data analysis, REVISE in future
949  if(fMCData || !fFillV0SigHisto) return ;
950 
951  if( fEventL1G ) fhV0[kL1GammaTrig] ->Fill(fV0A+fV0C);
952  if( fEventL1G2 ) fhV0[kL1GammaTrig2] ->Fill(fV0A+fV0C);
953  if( fEventL1J ) fhV0[kL1JetTrig] ->Fill(fV0A+fV0C);
954  if( fEventL1J2 ) fhV0[kL1JetTrig2] ->Fill(fV0A+fV0C);
955  if( fEventL1GD ) fhV0[kL1GammaTrigD] ->Fill(fV0A+fV0C);
956  if( fEventL1G2D ) fhV0[kL1GammaTrig2D] ->Fill(fV0A+fV0C);
957  if( fEventL1JD ) fhV0[kL1JetTrigD] ->Fill(fV0A+fV0C);
958  if( fEventL1J2D ) fhV0[kL1JetTrig2D] ->Fill(fV0A+fV0C);
959  if( fEventMB ) fhV0[kMBTrig] ->Fill(fV0A+fV0C);
960  if( fEventL0 ) fhV0[kL0Trig] ->Fill(fV0A+fV0C);
961  if( fEventCen ) fhV0[kCentralTrig] ->Fill(fV0A+fV0C);
962  if( fEventSem ) fhV0[kSemiCentralTrig]->Fill(fV0A+fV0C);
963  if( fEventL1G && !fEventL1J) fhV0[kL1GammaOnlyTrig] ->Fill(fV0A+fV0C);
964  if( fEventL1J && !fEventL1G) fhV0[kL1JetOnlyTrig] ->Fill(fV0A+fV0C);
967  //if(nL0Patch!=0 || nL1Patch!=0) printf("total TRU %f, total STU %f, V0C+V0A %f; nL0 %d, nL1 %d \n",
968  // fTRUTotal,fSTUTotal,fV0A+fV0C,nL0Patch,nL1Patch);
969  }
970 }
971 
972 //________________________________________
974 //________________________________________
976 {
977  if(!fRecoUtils)
978  {
979  fRecoUtils = new AliEMCALRecoUtils ;
980  fRecoUtils->SwitchOnBadChannelsRemoval();
981  }
982 }
983 
984 //_____________________________________________________
987 //_____________________________________________________
989 {
990  for (Int_t i = 0; i < fgkFALTRORows; i++)
991  {
992  for (Int_t j = 0; j < fgkFALTROCols; j++)
993  {
994  fMapTrigL0 [i][j] = 0.;
995  fMapTrigL0L1G[i][j] = 0.;
996  fMapTrigL0L1J[i][j] = 0.;
997  fMapTrigL1G [i][j] = 0.;
998  fMapTrigL1G2 [i][j] = 0.;
999  fMapTrigL1J [i][j] = 0.;
1000  fMapTrigL1J2 [i][j] = 0.;
1001  fMapTrigL1 [i][j] = 0.;
1002  fMapCell [i][j] = 0.;
1003  fMapCellL1G [i][j] = 0.;
1004  fMapCellL1G2 [i][j] = 0.;
1005  fMapCellL1J [i][j] = 0.;
1006  fMapCellL1J2 [i][j] = 0.;
1007  }
1008  }
1009 }
1010 
1011 //________________________________________________
1015 //________________________________________________
1017 {
1018  if(fGeoSet) return;
1019 
1020  // Init the trigger bit once, correct depending on version
1021  fBitEGA = 4;
1022  fBitEJE = 5;
1023 
1024  TFile* file = AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile();
1025 
1026  const TList *clist = file->GetStreamerInfoCache();
1027 
1028  if(clist)
1029  {
1030  TStreamerInfo *cinfo = (TStreamerInfo*)clist->FindObject("AliESDCaloTrigger");
1031  Int_t verid = 5; // newer ESD header version
1032  if(!cinfo)
1033  {
1034  cinfo = (TStreamerInfo*)clist->FindObject("AliAODCaloTrigger");
1035  verid = 3; // newer AOD header version
1036  }
1037  if(cinfo)
1038  {
1039  Int_t classversionid = cinfo->GetClassVersion();
1040  //printf("********* Header class version %d *********** \n",classversionid);
1041 
1042  if (classversionid >= verid)
1043  {
1044  fBitEGA = 6;
1045  fBitEJE = 8;
1046  }
1047  } else AliInfo("Streamer info for trigger class not available, bit not changed");
1048  } else AliInfo("Streamer list not available!, bit not changed");
1049 
1050  Int_t runnumber = InputEvent()->GetRunNumber() ;
1051 
1052  if (!fGeometry)
1053  {
1054  if(fGeoName=="")
1055  {
1056  fGeometry = AliEMCALGeometry::GetInstanceFromRunNumber(runnumber);
1057  AliInfo(Form("Get EMCAL geometry name to <%s> for run %d",fGeometry->GetName(),runnumber));
1058  }
1059  else
1060  {
1061  fGeometry = AliEMCALGeometry::GetInstance(fGeoName);
1062  AliInfo(Form("Set EMCAL geometry name to <%s>",fGeoName.Data()));
1063  }
1064  }
1065 
1066  fGeoSet = kTRUE;
1067 }
1068 
1069 //_______________________________________________________
1071 //_______________________________________________________
1073 {
1074  for (Int_t i = 0; i < fgkTriggerCombi; i++)
1075  {
1076  fhV0 [i] = 0;
1077  fhClus [i] = 0; fhClusMax [i] = 0;
1078  fhClusCen[i] = 0; fhClusCenMax[i] = 0;
1079  fhClusV0 [i] = 0; fhClusV0Max [i] = 0;
1080  fhClusEta[i] = 0; fhClusEtaMax[i] = 0;
1081  fhClusPhi[i] = 0; fhClusPhiMax[i] = 0;
1082 
1083  fhClusEtaPhiHigh [i] = 0; fhClusEtaPhiHighCluMax [i] = 0;
1085  fhClusEtaPhiLow [i] = 0; fhClusEtaPhiLowCluMax [i] = 0;
1087 
1088  if(i<3){ fhClusMBPure[i] = 0; fhClusMaxMBPure[i] = 0; }
1089  }
1090 }
1091 
1092 //_____________________________________________________________________________
1094 //_____________________________________________________________________________
1096 {
1097  // Init trigger event bit
1098 
1099  fEventMB = kFALSE;
1100  fEventL0 = kFALSE;
1101  fEventL1G = kFALSE;
1102  fEventL1G2 = kFALSE;
1103  fEventL1J = kFALSE;
1104  fEventL1J2 = kFALSE;
1105  fEventCen = kFALSE;
1106  fEventSem = kFALSE;
1107 
1108  // Minimum bias event trigger?
1109  if((triggerclasses.Contains("CINT7") || triggerclasses.Contains("CPBI2_B1") ) &&
1110  (triggerclasses.Contains("-B-") || triggerclasses.Contains("-I-")) &&
1111  triggerclasses.Contains("-NOPF-ALLNOTRD") ) fEventMB = kTRUE;
1112 
1113  if(fMCData && triggerclasses.Contains("MB")) fEventMB = kTRUE;
1114 
1115  // EMC triggered event? Which type?
1116  if( triggerclasses.Contains("-B-") || triggerclasses.Contains("-S-") || triggerclasses.Contains("-I-") )
1117  {
1118  if( triggerclasses.Contains("CEMC") &&
1119  !triggerclasses.Contains("EGA" ) &&
1120  !triggerclasses.Contains("EJE" ) &&
1121  !triggerclasses.Contains("EG1" ) &&
1122  !triggerclasses.Contains("EJ1" ) &&
1123  !triggerclasses.Contains("EG2" ) &&
1124  !triggerclasses.Contains("EJ2" ) ) fEventL0 = kTRUE;
1125 
1126  if( triggerclasses.Contains("CDMC") &&
1127  !triggerclasses.Contains("DGA" ) &&
1128  !triggerclasses.Contains("DJE" ) &&
1129  !triggerclasses.Contains("DG1" ) &&
1130  !triggerclasses.Contains("DJ1" ) &&
1131  !triggerclasses.Contains("DG2" ) &&
1132  !triggerclasses.Contains("DJ2" ) ) fEventL0D = kTRUE;
1133 
1134 
1135  if( triggerclasses.Contains("EGA" ) || triggerclasses.Contains("EG1" ) ) fEventL1G = kTRUE;
1136  if( triggerclasses.Contains("EG2" ) ) fEventL1G2 = kTRUE;
1137 
1138  if( triggerclasses.Contains("DGA" ) || triggerclasses.Contains("DG1" ) ) fEventL1GD = kTRUE;
1139  if( triggerclasses.Contains("DG2" ) ) fEventL1G2D = kTRUE;
1140 
1141  if( triggerclasses.Contains("EJE" ) || triggerclasses.Contains("EJ1" ) ) fEventL1J = kTRUE;
1142  if( triggerclasses.Contains("EJ2" ) ) fEventL1J2 = kTRUE;
1143 
1144  if( triggerclasses.Contains("DJE" ) || triggerclasses.Contains("DJ1" ) ) fEventL1JD = kTRUE;
1145  if( triggerclasses.Contains("DJ2" ) ) fEventL1J2D = kTRUE;
1146  }
1147 
1148  // Semi/Central PbPb trigger
1149  if (triggerclasses.Contains("CCENT_R2-B-NOPF-ALLNOTRD")) fEventCen = kTRUE;
1150  else if(triggerclasses.Contains("CSEMI_R1-B-NOPF-ALLNOTRD")) fEventSem = kTRUE;
1151 
1152  //printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d; Trigger Names : %s \n ",
1153  // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem,triggerclasses.Data());
1154 }
1155 
1156 //___________________________________________________________
1158 //___________________________________________________________
1160 {
1161  fOutputList = new TList;
1162  fOutputList ->SetOwner(kTRUE);
1163 
1164  fhNEvents = new TH1F("hNEvents","Number of selected events",25,0,25);
1165  fhNEvents ->SetYTitle("N events");
1166  fhNEvents ->GetXaxis()->SetBinLabel(1 ,"All");
1167  fhNEvents ->GetXaxis()->SetBinLabel(2 ,"MB");
1168  fhNEvents ->GetXaxis()->SetBinLabel(3 ,"Central Pb");
1169  fhNEvents ->GetXaxis()->SetBinLabel(4 ,"SemiCentral Pb");
1170  fhNEvents ->GetXaxis()->SetBinLabel(5 ,"L0");
1171  fhNEvents ->GetXaxis()->SetBinLabel(6 ,"L1-G1");
1172  fhNEvents ->GetXaxis()->SetBinLabel(7 ,"L1-G2");
1173  fhNEvents ->GetXaxis()->SetBinLabel(8 ,"L1-J1");
1174  fhNEvents ->GetXaxis()->SetBinLabel(9 ,"L1-J2");
1175  fhNEvents ->GetXaxis()->SetBinLabel(10 ,"L1-G1 & !L1-J1");
1176  fhNEvents ->GetXaxis()->SetBinLabel(11 ,"L1-J1 & !L1-G1");
1177  fhNEvents ->GetXaxis()->SetBinLabel(12 ,"L1-J1 & L1-G1");
1178  fhNEvents ->GetXaxis()->SetBinLabel(13 ,"MB & !L1 & !L0");
1179  fhNEvents ->GetXaxis()->SetBinLabel(14,"L0 & !MB");
1180  fhNEvents ->GetXaxis()->SetBinLabel(15,"L1-G1 & !MB");
1181  fhNEvents ->GetXaxis()->SetBinLabel(16,"L1-J1 & !MB");
1182  fhNEvents ->GetXaxis()->SetBinLabel(17,"L1-G1 & (Cen | Semi)");
1183  fhNEvents ->GetXaxis()->SetBinLabel(18,"L1-J1 & (Cen | Semi)");
1184  fhNEvents ->GetXaxis()->SetBinLabel(19,"L1-G2 & !L1-G1");
1185  fhNEvents ->GetXaxis()->SetBinLabel(20,"L0 DCal");
1186  fhNEvents ->GetXaxis()->SetBinLabel(21,"L1-G1 DCal");
1187  fhNEvents ->GetXaxis()->SetBinLabel(22,"L1-J1 DCal");
1188  fhNEvents ->GetXaxis()->SetBinLabel(23,"L0 !DCal");
1189  fhNEvents ->GetXaxis()->SetBinLabel(24,"L1-G1 !DCal");
1190  fhNEvents ->GetXaxis()->SetBinLabel(25,"L1-J1 !DCal");
1191 
1192  fhFORAmp = new TH2F("hFORAmp", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column",
1194  fhFORAmp ->SetXTitle("Index #eta (columnns)");
1195  fhFORAmp ->SetYTitle("Index #phi (rows)");
1196  fhFORAmp ->SetZTitle("Amplitude");
1197 
1198  fhFORAmpL1G = new TH2F("hFORAmpL1G1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G1 trigger condition",
1200  fhFORAmpL1G ->SetXTitle("Index #eta (columnns)");
1201  fhFORAmpL1G ->SetYTitle("Index #phi (rows)");
1202  fhFORAmpL1G ->SetZTitle("Amplitude");
1203 
1204  fhFORAmpL1G2 = new TH2F("hFORAmpL1G2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1G2 trigger condition",
1206  fhFORAmpL1G2 ->SetXTitle("Index #eta (columnns)");
1207  fhFORAmpL1G2 ->SetYTitle("Index #phi (rows)");
1208  fhFORAmpL1G2 ->SetZTitle("Amplitude");
1209 
1210  fhFORAmpL1J = new TH2F("hFORAmpL1J1", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J1 trigger condition",
1212  fhFORAmpL1J ->SetXTitle("Index #eta (columnns)");
1213  fhFORAmpL1J ->SetYTitle("Index #phi (rows)");
1214  fhFORAmpL1J ->SetZTitle("Amplitude");
1215 
1216  fhFORAmpL1J2 = new TH2F("hFORAmpL1J2", "FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1J2 trigger condition",
1218  fhFORAmpL1J2 ->SetXTitle("Index #eta (columnns)");
1219  fhFORAmpL1J2 ->SetYTitle("Index #phi (rows)");
1220  fhFORAmpL1J2 ->SetZTitle("Amplitude");
1221 
1222 
1223  fhL0Amp = new TH2F("hL0Amp","FALTRO signal per Row and Column",
1225  fhL0Amp ->SetXTitle("Index #eta (columnns)");
1226  fhL0Amp ->SetYTitle("Index #phi (rows)");
1227  fhL0Amp ->SetZTitle("Amplitude");
1228 
1229  fhL0AmpL1G = new TH2F("hL0AmpL1G","FALTRO signal per Row and Column, with L1G trigger condition",
1231  fhL0AmpL1G ->SetXTitle("Index #eta (columnns)");
1232  fhL0AmpL1G ->SetYTitle("Index #phi (rows)");
1233  fhL0AmpL1G ->SetZTitle("Amplitude");
1234 
1235 
1236  fhL0AmpL1J = new TH2F("hL0AmpL1J","FALTRO signal per Row and Column, with L1j trigger condition",
1238  fhL0AmpL1J ->SetXTitle("Index #eta (columnns)");
1239  fhL0AmpL1J ->SetYTitle("Index #phi (rows)");
1240  fhL0AmpL1J ->SetZTitle("Amplitude");
1241 
1242 
1243  fhL1Amp = new TH2F("hL1Amp","STU signal per Row and Column",
1245  fhL1Amp ->SetXTitle("Index #eta (columnns)");
1246  fhL1Amp ->SetYTitle("Index #phi (rows)");
1247  fhL1Amp ->SetZTitle("Amplitude");
1248 
1249  fhL1GAmp = new TH2F("hL1G1Amp","STU signal per Row and Column for L1 Gamma1",
1251  fhL1GAmp ->SetXTitle("Index #eta (columnns)");
1252  fhL1GAmp ->SetYTitle("Index #phi (rows)");
1253  fhL1GAmp ->SetZTitle("Amplitude");
1254 
1255  fhL1G2Amp = new TH2F("hL1G2Amp","STU signal per Row and Column for L1 Gamma2",
1257  fhL1G2Amp ->SetXTitle("Index #eta (columnns)");
1258  fhL1G2Amp ->SetYTitle("Index #phi (rows)");
1259  fhL1G2Amp ->SetZTitle("Amplitude");
1260 
1261  fhL1JAmp = new TH2F("hL1J1Amp","STU signal per Row and Column for L1 Jet1",
1263  fhL1JAmp ->SetXTitle("Index #eta (columnns)");
1264  fhL1JAmp ->SetYTitle("Index #phi (rows)");
1265  fhL1JAmp ->SetZTitle("Amplitude");
1266 
1267  fhL1J2Amp = new TH2F("hL1J2Amp","STU signal per Row and Column for L1 Jet2",
1269  fhL1J2Amp ->SetXTitle("Index #eta (columnns)");
1270  fhL1J2Amp ->SetYTitle("Index #phi (rows)");
1271  fhL1J2Amp ->SetZTitle("Amplitude");
1272 
1273  fhL1FOREnergy = new TH2F("hL1FOREnergy","FOR index vs FOR energy",
1274  fgkFALTROCols*fgkFALTRORows,0,fgkFALTROCols*fgkFALTRORows,200,0,200);
1275  fhL1FOREnergy ->SetXTitle("Index FOR");
1276  fhL1FOREnergy ->SetYTitle("Energy (ADC)");
1277 
1278  fhL0Patch = new TH2F("hL0Patch","FOR with associated L0 Patch",
1279  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1280  fhL0Patch ->SetXTitle("Index #eta (columnns)");
1281  fhL0Patch ->SetYTitle("Index #phi (rows)");
1282  fhL0Patch ->SetZTitle("counts");
1283 
1284  fhL1GPatch = new TH2F("hL1G1Patch","FOR with associated L1 Gamma Patch1",
1285  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1286  fhL1GPatch ->SetXTitle("Index #eta (columnns)");
1287  fhL1GPatch ->SetYTitle("Index #phi (rows)");
1288  fhL1GPatch ->SetZTitle("counts");
1289 
1290  fhL1G2Patch = new TH2F("hL1G2Patch","FOR with associated L1 Gamma2 Patch",
1291  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1292  fhL1G2Patch ->SetXTitle("Index #eta (columnns)");
1293  fhL1G2Patch ->SetYTitle("Index #phi (rows)");
1294  fhL1G2Patch ->SetZTitle("counts");
1295 
1296  fhL1GPatchNotFake = new TH2F("hL1G1PatchNotFake","FOR with L1 Gamma1 Patch associated to energetic cells",
1297  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1298  fhL1GPatchNotFake ->SetXTitle("Index #eta (columnns)");
1299  fhL1GPatchNotFake ->SetYTitle("Index #phi (rows)");
1300  fhL1GPatchNotFake ->SetZTitle("counts");
1301 
1302  fhL1GPatchFake = new TH2F("hL1G1PatchFake","FOR without L1 Gamma1 Patch associated to energetic cells",
1303  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1304  fhL1GPatchFake ->SetXTitle("Index #eta (columnns)");
1305  fhL1GPatchFake ->SetYTitle("Index #phi (rows)");
1306  fhL1GPatchFake ->SetZTitle("counts");
1307 
1308 
1309  fhL1GPatchNotAllFake = new TH2F("hL1G1PatchNotAllFake","FOR with one L1 Gamma1 Patch associated to an energetic cell",
1310  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1311  fhL1GPatchNotAllFake ->SetXTitle("Index #eta (columnns)");
1312  fhL1GPatchNotAllFake ->SetYTitle("Index #phi (rows)");
1313  fhL1GPatchNotAllFake ->SetZTitle("counts");
1314 
1315  fhL1GPatchAllFake = new TH2F("hL1G1PatchAllFake","FOR without any L1 Gamma1 Patch associated to an energetic cell",
1316  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1317  fhL1GPatchAllFake ->SetXTitle("Index #eta (columnns)");
1318  fhL1GPatchAllFake ->SetYTitle("Index #phi (rows)");
1319  fhL1GPatchAllFake ->SetZTitle("counts");
1320 
1321  fhL1GPatchAllFakeMax = new TH2F("hL1G1PatchAllFakeMax","FOR with L1 Gamma1 Patch Max not associated to an energetic cell",
1322  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1323  fhL1GPatchAllFakeMax ->SetXTitle("Index #eta (columnns)");
1324  fhL1GPatchAllFakeMax ->SetYTitle("Index #phi (rows)");
1325  fhL1GPatchAllFakeMax ->SetZTitle("counts");
1326 
1327  fhL1GPatchNotAllFakeMax = new TH2F("hL1G1PatchNotAllFakeMax","FOR with one L1 Gamma1 Patch Max associated to an energetic cell",
1328  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1329  fhL1GPatchNotAllFakeMax ->SetXTitle("Index #eta (columnns)");
1330  fhL1GPatchNotAllFakeMax ->SetYTitle("Index #phi (rows)");
1331  fhL1GPatchNotAllFakeMax ->SetZTitle("counts");
1332 
1333  fhL1GPatchNotAllFakeMaxE = new TH1F("hL1G1PatchNotAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max associated to an energetic cell",
1335  fhL1GPatchNotAllFakeMaxE ->SetXTitle("Energy (GeV)");
1336 
1337 
1338  fhL1GPatchAllFakeMaxE = new TH1F("hL1G1PatchAllFakeMaxE","Energy distribution of FOR in events with L1 Gamma1 Patch Max not associated to an energetic cell",
1340  fhL1GPatchAllFakeMaxE ->SetXTitle("Energy (GeV)");
1341 
1342  fhL1GPatchNotAllFakeE = new TH1F("hL1G1PatchNotAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch not associated to an energetic cell",
1344  fhL1GPatchNotAllFakeE ->SetXTitle("Energy (GeV)");
1345 
1346  fhL1GPatchAllFakeE = new TH1F("hL1G1PatchAllFakeE","Energy distribution of FOR in events with L1 Gamma1 Patch associated to an energetic cell",
1348  fhL1GPatchAllFakeE ->SetXTitle("Energy (GeV)");
1349 
1350 
1351  fhL1GPatchFakeE = new TH1F("hL1G1PatchFakeE","Energy distribution of FOR with L1 Gamma1 Patch not associated to an energetic cell",
1353  fhL1GPatchFakeE ->SetXTitle("Energy (GeV)");
1354 
1355  fhL1GPatchNotFakeE = new TH1F("hL1G1PatchNotFakeE","Energy distribution of FOR with L1 Gamma1 Patch associated to an energetic cell",
1357  fhL1GPatchNotFakeE ->SetXTitle("Energy (GeV)");
1358 
1359  fhNPatchFake = new TH2F("hNPatchFake","number of fake patchs vs. all patchs are fake",
1360  3,0,3, 2880,0,2880);
1361  fhNPatchFake ->SetYTitle("number of fake patchs");
1362  fhNPatchFake ->SetXTitle("all fake event");
1363  fhNPatchFake ->SetZTitle("counts");
1364 
1365 
1366  fhNPatchNotFake = new TH2F("hNPatchNotFake","number of Not fake patchs vs. all patchs are fake",
1367  3, 0, 3, 200,0,1000);
1368  fhNPatchNotFake ->SetYTitle("number of Not fake patchs");
1369  fhNPatchNotFake ->SetXTitle("all fake event");
1370  fhNPatchNotFake ->SetZTitle("counts");
1371 
1372 
1373  fhL1JPatch = new TH2F("hL1J1Patch","FOR with associated L1 Jet1 Patch",
1374  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1375  fhL1JPatch ->SetXTitle("Index #eta (columnns)");
1376  fhL1JPatch ->SetYTitle("Index #phi (rows)");
1377  fhL1JPatch ->SetZTitle("counts");
1378 
1379  fhL1J2Patch = new TH2F("hL1J2Patch","FOR with associated L1 Jet2 Patch",
1380  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1381  fhL1J2Patch ->SetXTitle("Index #eta (columnns)");
1382  fhL1J2Patch ->SetYTitle("Index #phi (rows)");
1383  fhL1J2Patch ->SetZTitle("counts");
1384 
1385  fhFEESTU = new TH2F("hFEESTU","STU / FEE vs channel", fNBinsSTUFEERatio,0,fMaxSTUFEERatio,30,0,30);
1386  fhFEESTU ->SetXTitle("STU/FEE signal");
1387  fhFEESTU ->SetYTitle("channel");
1388  fhFEESTU ->SetZTitle("counts");
1389 
1390  fhTRUSTU = new TH2F("hTRUSTU","STU / TRU vs channel", fNBinsSTUTRURatio,0,fMaxSTUTRURatio,30,0,30);
1391  fhTRUSTU ->SetXTitle("STU/TRU signal");
1392  fhTRUSTU ->SetYTitle("channel");
1393  fhTRUSTU ->SetZTitle("counts");
1394 
1395  fhFORMeanAmp = new TProfile2D("hFORMeanAmp", "Mean FastOR(FEE) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1396  fhFORMeanAmp->SetXTitle("Index #eta");
1397  fhFORMeanAmp->SetYTitle("Index #phi");
1398 
1399  fhL0MeanAmp = new TProfile2D("hL0MeanAmp", "Mean FastOR(TRU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1400  fhL0MeanAmp->SetXTitle("Index #eta");
1401  fhL0MeanAmp->SetYTitle("Index #phi");
1402 
1403  fhL1MeanAmp = new TProfile2D("hL1MeanAmp", "Mean FastOR(STU) signal per Row and Column", fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1404  fhL1MeanAmp->SetXTitle("Index #eta");
1405  fhL1MeanAmp->SetYTitle("Index #phi");
1406 
1407  fhL1GPatchMax = new TH2F("hL1G1PatchMax","FOR of max amplitude patch with associated L1 Gamma1 Patch",
1408  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1409  fhL1GPatchMax ->SetXTitle("Index #eta (columnns)");
1410  fhL1GPatchMax ->SetYTitle("Index #phi (rows)");
1411  fhL1GPatchMax ->SetZTitle("counts");
1412 
1413  fhL1G2PatchMax = new TH2F("hL1G2PatchMax","FOR of max amplitude patch with associated L1 Gamma2 Patch",
1414  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1415  fhL1G2PatchMax ->SetXTitle("Index #eta (columnns)");
1416  fhL1G2PatchMax ->SetYTitle("Index #phi (rows)");
1417  fhL1G2PatchMax ->SetZTitle("counts");
1418 
1419  fhL1JPatchMax = new TH2F("hL1J1PatchMax","FOR of max amplitude patch with associated L1 Jet1 Patch",
1420  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1421  fhL1JPatchMax ->SetXTitle("Index #eta (columnns)");
1422  fhL1JPatchMax ->SetYTitle("Index #phi (rows)");
1423  fhL1JPatchMax ->SetZTitle("counts");
1424 
1425  fhL1J2PatchMax = new TH2F("hL1J2PatchMax","FOR of max amplitude patch with associated L1 Jet2 Patch",
1426  fgkFALTROCols/4,0,fgkFALTROCols,fgkFALTRORows/4,0,fgkFALTRORows);
1427  fhL1J2PatchMax ->SetXTitle("Index #eta (columnns)");
1428  fhL1J2PatchMax ->SetYTitle("Index #phi (rows)");
1429  fhL1J2PatchMax ->SetZTitle("counts");
1430 
1431  fOutputList->Add(fhNEvents);
1432  fOutputList->Add(fhFORAmp);
1433  fOutputList->Add(fhFORAmpL1G);
1434  fOutputList->Add(fhFORAmpL1G2);
1435  fOutputList->Add(fhFORAmpL1J);
1436  fOutputList->Add(fhFORAmpL1J2);
1437  fOutputList->Add(fhL0Amp);
1438  fOutputList->Add(fhL0AmpL1G);
1439  fOutputList->Add(fhL0AmpL1J);
1440  fOutputList->Add(fhL1Amp);
1441  fOutputList->Add(fhL1GAmp);
1442  fOutputList->Add(fhL1G2Amp);
1443  fOutputList->Add(fhL1JAmp);
1444  fOutputList->Add(fhL1J2Amp);
1445  fOutputList->Add(fhL1FOREnergy);
1446  fOutputList->Add(fhL0Patch);
1447  fOutputList->Add(fhL1GPatch);
1448  fOutputList->Add(fhL1G2Patch);
1461  fOutputList->Add(fhNPatchFake);
1463 
1464  fOutputList->Add(fhL1JPatch);
1465  fOutputList->Add(fhL1J2Patch);
1466  fOutputList->Add(fhFEESTU);
1467  fOutputList->Add(fhTRUSTU);
1468 
1469  fOutputList->Add(fhFORMeanAmp);
1470  fOutputList->Add(fhL0MeanAmp);
1471  fOutputList->Add(fhL1MeanAmp);
1472 
1473  fOutputList->Add(fhL1GPatchMax);
1475  fOutputList->Add(fhL1JPatchMax);
1477 
1478  if(fFillV0SigHisto)
1479  {
1480  fhV0STU = new TH2I("hV0STU","Total signal STU vs V0C+V0S",
1482  fhV0STU ->SetXTitle("Signal V0C+V0A");
1483  fhV0STU ->SetYTitle("Total signal STU");
1484  fhV0STU ->SetZTitle("counts");
1485 
1486  fhGPMaxVV0TT = new TH2F("hGPMaxVV0TT","Maximum patch of L1-Gamma vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal, 500,0,1000);
1487  fhGPMaxVV0TT ->SetXTitle("V0 from STU");
1488  fhGPMaxVV0TT ->SetYTitle("Patch Max");
1489 
1490  fhJPMaxVV0TT = new TH2F("hJPMaxVV0TT","Maximum patch of L1-Jet vs V0 signal in STU",fNBinsV0Signal,0,fMaxV0Signal, 500,0,1000);
1491  fhJPMaxVV0TT ->SetXTitle("V0 from STU");
1492  fhJPMaxVV0TT ->SetYTitle("Patch Max");
1493 
1494  fOutputList->Add(fhV0STU);
1495  fOutputList->Add(fhGPMaxVV0TT);
1496  fOutputList->Add(fhJPMaxVV0TT);
1497  }
1498 
1499  if(fMCData)
1500  {
1501  PostData(1, fOutputList);
1502  return;
1503  }
1504 
1505  // Cluster histograms, E
1506  TString hName [] = { "MB","L0","L1G1","L1G2","L1J1","L1J2","L1G1NoL1J1","L1J1NoLG1","L1G2NoL1G1","L1J2NoL1J1",
1507  "L0E","L0D","L1EG1","L1DG1","L1EJ1","L1DJ1","Central","SemiCentral" } ;
1508  TString hTitle [] = { "MB trigger","L0 trigger","L1 Gamma1 trigger","L1 Gamma2 trigger","L1 Jet1 trigger","L1 Jet2 trigger",
1509  "L1 Gamma1 trigger and not L1 Jet1" ,"L1 Jet1 trigger and not L1 Gamma1",
1510  "L1 Gamma2 trigger and not L1 Gamma1","L1 Jet2 trigger and not L1 Jet1",
1511  "L0 EMC Pure", "L0 DMC Pure", "L1-Gamma1 EMC Pure", "L1-Gamma1 DMC Pure", "L1-Jet EMC Pure", "L1-Jet DMC Pure"
1512  "Central trigger","SemiCentral trigger" } ;
1513 
1514  for(Int_t i=0; i < 3; i++)
1515  {
1516  Int_t j = i+5;
1517  if(i==0)j=0;
1518 
1519  fhClusMBPure[i] = new TH1F(Form("hClus%sPure",hName[j].Data()),
1520  Form("clusters E distribution for %s, no other EMCAL trigger on",hTitle[j].Data()),
1522  fhClusMBPure[i] ->SetXTitle("Energy (GeV)");
1523  fOutputList->Add(fhClusMBPure[i]);
1524 
1525  fhClusMaxMBPure[i] = new TH1F(Form("hClusMax%sPure",hName[j].Data()),
1526  Form("maximum energy cluster per event for %s, no other EMCAL trigger on",hTitle[j].Data()),
1528  fhClusMaxMBPure[i] ->SetXTitle("Energy (GeV)");
1529  fOutputList->Add(fhClusMaxMBPure[i]);
1530  }
1531 
1532  for(Int_t i=0; i < fgkTriggerCombi; i++)
1533  {
1534  if(fFillV0SigHisto)
1535  {
1536  fhV0[i] = new TH1F(Form("hV0%s",hName[i].Data()),
1537  Form("V0 distribution for %s",hTitle[i].Data()),
1539  fhV0[i]->SetXTitle("V0");
1540  fOutputList->Add(fhV0[i] );
1541  }
1542 
1543  fhClus[i] = new TH1F(Form("hClus%s",hName[i].Data()),
1544  Form("clusters E distribution for %s",hTitle[i].Data()),
1546  fhClus[i] ->SetXTitle("Energy (GeV)");
1547  fOutputList->Add(fhClus[i]);
1548 
1549  fhClusMax[i] = new TH1F(Form("hClusMax%s",hName[i].Data()),
1550  Form("maximum energy cluster per event for %s",hTitle[i].Data()),
1552  fhClusMax[i]->SetXTitle("Energy (GeV)");
1553  fOutputList->Add(fhClusMax[i]);
1554 
1555  // Cluster histograms, E vs Cen
1556 
1557  fhClusCen[i] = new TH2F(Form("hClusCen%s",hName[i].Data()),
1558  Form("clusters E distribution vs centrality for %s",hTitle[i].Data()),
1559  fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1560  fhClusCen[i] ->SetXTitle("Energy (GeV)");
1561  fhClusCen[i] ->SetYTitle("Centrality");
1562  fOutputList->Add(fhClusCen[i]);
1563 
1564  fhClusCenMax[i] = new TH2F(Form("hClusCenMax%s",hName[i].Data()),
1565  Form("maximum energy cluster per event vs centrality for %s",hTitle[i].Data()),
1566  fNBinsClusterE,0,fMaxClusterE,100, 0, 100);
1567  fhClusCenMax[i]->SetXTitle("Energy (GeV)");
1568  fhClusCenMax[i]->SetYTitle("Centrality");
1569  fOutputList->Add(fhClusCenMax[i]);
1570 
1571  // Cluster histograms, E vs V0
1572 
1573  if(fFillV0SigHisto)
1574  {
1575  fhClusV0[i] = new TH2F(Form("hClusV0%s",hName[i].Data()),
1576  Form("clusters E distribution vs V0 for %s",hTitle[i].Data()),
1578  fhClusV0[i] ->SetXTitle("Energy (GeV)");
1579  fhClusV0[i] ->SetYTitle("V0");
1580  fOutputList->Add(fhClusV0[i]);
1581 
1582  fhClusV0Max[i] = new TH2F(Form("hClusV0Max%s",hName[i].Data()),
1583  Form("maximum energy cluster per event vs V0 for %s",hTitle[i].Data()),
1585  fhClusV0Max[i]->SetXTitle("Energy (GeV)");
1586  fhClusV0Max[i]->SetYTitle("V0");
1587  fOutputList->Add(fhClusV0Max[i]);
1588  }
1589 
1590  // Cluster histograms, Pseudorapidity vs Azimuthal angle
1591 
1592  fhClusEtaPhiHigh[i] = new TH2F(Form("hClusEtaPhiHigh%s",hName[i].Data()),
1593  Form("clusters distribution #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1595  fhClusEtaPhiHigh[i] ->SetXTitle("#eta");
1596  fhClusEtaPhiHigh[i] ->SetYTitle("#phi (rad)");
1597  fOutputList->Add(fhClusEtaPhiHigh[i]);
1598 
1599  fhClusEtaPhiLow[i] = new TH2F(Form("hClusEtaPhiLow%s",hName[i].Data()),
1600  Form("clusters distribution #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1602  fhClusEtaPhiLow[i] ->SetXTitle("#eta");
1603  fhClusEtaPhiLow[i] ->SetYTitle("#phi (rad)");
1604  fOutputList->Add(fhClusEtaPhiLow[i]);
1605 
1607  {
1608  fhClusEtaPhiHighCluMax[i] = new TH2F(Form("hClusEtaPhiHighCluMax%s",hName[i].Data()),
1609  Form("maximum energy cluster per event #eta vs #phi for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1611  fhClusEtaPhiHighCluMax[i]->SetXTitle("#eta");
1612  fhClusEtaPhiHighCluMax[i]->SetYTitle("#phi (rad)");
1614 
1615  fhClusEtaPhiLowCluMax[i] = new TH2F(Form("hClusEtaPhiLowCluMax%s",hName[i].Data()),
1616  Form("maximum energy cluster per event #eta vs #phi for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1618  fhClusEtaPhiLowCluMax[i]->SetXTitle("#eta");
1619  fhClusEtaPhiLowCluMax[i]->SetYTitle("#phi (rad)");
1621 
1622  fhClusEtaPhiHighCellMax[i] = new TH2F(Form("hClusEtaPhiHighCellMax%s",hName[i].Data()),
1623  Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1624  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1625  fhClusEtaPhiHighCellMax[i] ->SetXTitle("Index #eta (columnns)");
1626  fhClusEtaPhiHighCellMax[i] ->SetYTitle("Index #phi (rows)");
1628 
1629  fhClusEtaPhiHighCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiHighCellMaxCluMax%s",hName[i].Data()),
1630  Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E > %1.1f GeV",
1631  hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1632  fhClusEtaPhiHighCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1633  fhClusEtaPhiHighCellMaxCluMax[i]->SetYTitle("Index #phi (rows)");
1635 
1636  fhClusEtaPhiLowCellMax[i] = new TH2F(Form("hClusEtaPhiLowCellMax%s",hName[i].Data()),
1637  Form("Cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",hTitle[i].Data(),fEtaPhiEnMin),
1638  fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1639  fhClusEtaPhiLowCellMax[i] ->SetXTitle("Index #eta (columnns)");
1640  fhClusEtaPhiLowCellMax[i] ->SetYTitle("#phi (rad)");
1642 
1643  fhClusEtaPhiLowCellMaxCluMax[i] = new TH2F(Form("hClusEtaPhiLowCellMaxCluMax%s",hName[i].Data()),
1644  Form("Max E cluster hit map in calorimeter (max cell), column vs row for %s, E < %1.1f GeV",
1645  hTitle[i].Data(),fEtaPhiEnMin),fgkFALTROCols,0,fgkFALTROCols,fgkFALTRORows,0,fgkFALTRORows);
1646  fhClusEtaPhiLowCellMaxCluMax[i]->SetXTitle("Index #eta (columnns)");
1647  fhClusEtaPhiLowCellMaxCluMax[i]->SetYTitle("#phi (rad)");
1649 
1650  // Cluster histograms, E vs Pseudorapidity
1651 
1652  fhClusEta[i] = new TH2F(Form("hClusEta%s",hName[i].Data()),
1653  Form("clusters distribution vs #eta for %s",hTitle[i].Data()),
1655  fhClusEta[i] ->SetXTitle("Energy (GeV)");
1656  fhClusEta[i] ->SetYTitle("#eta");
1657  fOutputList->Add(fhClusEta[i]);
1658 
1659  fhClusEtaMax[i] = new TH2F(Form("hClusEtaMax%s",hName[i].Data()),
1660  Form("maximum energy cluster per event vs #eta for %s",hTitle[i].Data()),
1662  fhClusEtaMax[i]->SetXTitle("Energy (GeV)");
1663  fhClusEtaMax[i]->SetYTitle("#eta");
1664  fOutputList->Add(fhClusEtaMax[i]);
1665 
1666  // Cluster histograms, E vs Azimuthal angle
1667 
1668  fhClusPhi[i] = new TH2F(Form("hClusPhi%s",hName[i].Data()),
1669  Form("clusters distribution vs #phi for %s",hTitle[i].Data()),
1671  fhClusPhi[i] ->SetXTitle("Energy (GeV)");
1672  fhClusPhi[i] ->SetYTitle("#phi (rad)");
1673  fOutputList->Add(fhClusPhi[i]);
1674 
1675  fhClusPhiMax[i] = new TH2F(Form("hClusPhiMax%s",hName[i].Data()),
1676  Form("maximum energy cluster per event vs #phi for %s",hTitle[i].Data()),
1678  fhClusPhiMax[i]->SetXTitle("Energy (GeV)");
1679  fhClusPhiMax[i]->SetYTitle("#phi (rad)");
1680  fOutputList->Add(fhClusPhiMax[i]);
1681  }
1682  }
1683 
1684  PostData(1, fOutputList);
1685 }
1686 
1687 //______________________________________________________
1688 // Main method executed per event, all the action is happens here.
1689 //______________________________________________________
1691 {
1692  AliVEvent* event = InputEvent();
1693 
1694  if (!event)
1695  {
1696  AliError("No Event, exit");
1697  return;
1698  }
1699 
1701  // Execute task on physics events with triggers
1702 
1703  //trigger configuration
1704  TString triggerclasses = event->GetFiredTriggerClasses();
1705 
1706  // event type
1707  Int_t eventType = ((AliVHeader*)event->GetHeader())->GetEventType();
1708 
1709  if(!fMCData)
1710  {
1711  // physics events eventType=7, select only those
1712  if(triggerclasses=="" || eventType != 7) return;
1713  }
1714 
1715  //printf("Event Type %d; Trigger classes: %s\n",eventType,triggerclasses.Data());
1716 
1717  // Check what trigger we had
1718  SetTriggerEventBit(triggerclasses);
1719 
1720  if(!fEventMB && !fEventL0 && !fEventL1G && !fEventL1G2 && !fEventL1J && ! fEventL1J2 && !fEventCen && !fEventSem) return;
1721 
1723  // Init geometry, OADB, maps
1724 
1725  InitGeometry(); // only once, must be done before OADB, geo OADB accessed here
1726 
1727  InitCellPatchMaps(); //init to 0 map for cells and patches
1728 
1730  // Do the analysis
1731 
1733 
1734  FillCellMaps();
1735 
1736  FillTriggerPatchMaps(triggerclasses);
1737 
1738  //if(!fEventMB)printf("MB : %d; L0 : %d; L1-Gam1 : %d; L1-Gam2 : %d; L1-Jet1 : %d; L1-Jet2 : %d; Central : %d; SemiCentral : %d; Trigger Names : %s \n",
1739  // fEventMB,fEventL0,fEventL1G,fEventL1G2,fEventL1J,fEventL1J2,fEventCen,fEventSem,triggerclasses.Data());
1740 
1742 
1743  FillV0Histograms();
1744 
1746 
1748 
1749  // FEE vs STU vs TRU
1751 
1752  ClusterAnalysis();
1753 
1754  PostData(1, fOutputList);
1755 
1756 }
Bool_t fEventSem
Bit for Semi Central events.
Bool_t fEventL1JD
Bit for L1 Jet 1 events, DCal.
TH2F * fhL0Amp
! FALTRO signal per Row and Column for FOR involves L0 patch
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
TH2F * fhL1Amp
! STU signal per Row and Column for FOR involves L0 patch
void FillTriggerPatchMaps(TString triggerclasses)
Fill L0, L1 patch arrays.
TH2F * fhClusPhi[fgkTriggerCombi]
! Clusters Phi vs E distribution for a trigger
void UserCreateOutputObjects()
Init histograms and geometry.
TH2F * fhNPatchFake
! number of fake patchs per event vs. if all were fakes or not
TH2F * fhL1GPatchMax
! FOR of max. amplitude patch with L1 Gamma patch associated
static const int fgkFALTROCols
Total number of fake altro collumns in EMCAL, (ALTRO channels in one SM times 2 SM divided by 2 per F...
TH1F * fhClusMax[fgkTriggerCombi]
! Maximum E Cluster per event distribution for MB trigger
TH2F * fhClusV0[fgkTriggerCombi]
! Clusters V0 vs E distribution for a trigger
TH2F * fhNPatchNotFake
! number of non fake patchs per events vs. if all were fakes or not
TH2F * fhClusPhiMax[fgkTriggerCombi]
! Maximum E Cluster vs Phi per event distribution for a trigger
TH2F * fhClusCenMax[fgkTriggerCombi]
! Maximum E Cluster vs Centrality per event distribution for a trigger
TH2F * fhL1JPatch
! FOR with L1 Jet patch associated
void FillV0Histograms()
Fill V0 histograms, only for ESDs.
TH2F * fhL1J2Patch
! FOR with L1 Jet patch associated
TProfile2D * fhFORMeanAmp
! Mean FastOR(FEE) signal per Row and Column
void AccessOADB()
Set the AODB bad channels at least once.
void FillL1JetPatchHistograms()
L1 jet trigger patches histograms.
void FillCorrelationHistograms()
FEE-TRU-STU correlation checks.
static const int fgkFALTRORows
Total number of fake altro rows in EMCAL, temporary, not considers DCal yet (ALTRO channels in one SM...
centrality
TH2F * fhClusEtaPhiHighCellMaxCluMax[fgkTriggerCombi]
! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger...
TH2F * fhClusEtaPhiHighCellMax[fgkTriggerCombi]
! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy above fEtaPhiEnMin...
TH2F * fhClusEtaPhiLowCellMax[fgkTriggerCombi]
! Clusters maximum energy cell index eta vs phi distribution for a trigger, energy below fEtaPhiEnMin...
TProfile2D * fhL0MeanAmp
! Mean FastOR(TRU) signal per Row and Column
TH2F * fhClusEta[fgkTriggerCombi]
! Clusters eta vs E distribution for a trigger
void FillEventCounterHistogram()
Fill a TH1 histogram, each bin corresponds to a even trigger type.
Bool_t fEventL1GD
Bit for L1 Gamma 1 events, DCal.
TH2F * fhClusEtaPhiHighCluMax[fgkTriggerCombi]
! Maximum E Cluster, Phi vs Eta per event distribution for a trigger, energy above fEtaPhiEnMin GeV ...
TH2F * fhL0AmpL1G
! FALTRO signal per Row and Column for FOR involves L0 patch, with L1G trigger event ...
TH2F * fhClusEtaPhiLowCellMaxCluMax[fgkTriggerCombi]
! Maximum E Cluster, maximum energy cell index Phi vs Eta per event distribution for MB trigger...
AliEMCALGeometry * fGeometry
Access to EMCAL geometry utils.
TH2F * fhL1JPatchMax
! FOR of max. amplitude patch with L1 Jet patch associated
TH1F * fhNEvents
! Number of selected events
AliEMCALRecoUtils * fRecoUtils
RecoUtils.
Double_t fMapTrigL1J2[fgkFALTRORows][fgkFALTROCols]
TH1F * fhL1GPatchAllFakeE
! Energy distrib of FOR forfake events, all patch energy
TH1F * fhL1GPatchNotFakeE
! Energy distrib of FOR for non fake events, all patch energy
TH2F * fhL1GAmp
! STU signal per Row and Column for FOR position of L1 Gamma patch (top-left)
TH2F * fhL0Patch
! FOR with L0 patch associated
Double_t fMapTrigL0L1G[fgkFALTRORows][fgkFALTROCols]
TString fGeoName
Name of geometry used.
Int_t fNBinsSTUSignal
V0 distribution for a triggered event.
void FillClusterHistograms(Int_t triggerNumber, Bool_t maxCluster, Float_t e, Float_t eta, Float_t phi, Float_t ietamax, Float_t iphimax, Float_t centrality, Float_t v0AC)
TH2F * fhL1JAmp
! STU signal per Row and Column for FOR position of L1 Jet patch (top-left)
TH2F * fhFORAmpL1G
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma trigger event...
Double_t fMapTrigL0[fgkFALTRORows][fgkFALTROCols]
Bool_t fAccessOADB
Get calibration from OADB for EMCAL.
TH2F * fhL1GPatchAllFakeMax
! FOR without any L1 Gamma patch associated with energy in the related cell, maximal energy patch : f...
TH1F * fhClusMBPure[3]
! Clusters E distribution for pure MB trigger
TH2F * fhL1G2Patch
! FOR with L1 Gamma patch associated
Float_t fTRUTotal
Sum of TRU amplitudes.
Double_t fMapTrigL1[fgkFALTRORows][fgkFALTROCols]
Double_t fMapTrigL1G[fgkFALTRORows][fgkFALTROCols]
TH2F * fhL0AmpL1J
! FALTRO signal per Row and Column for FOR involves L0 patch, with L1J trigger event ...
void Init()
Init analysis parameters not set before.
TH2F * fhJPMaxVV0TT
! V0 signal vs maximum jet L1 patch
TH1F * fhClus[fgkTriggerCombi]
! Clusters E distribution for a trigger
TH2F * fhTRUSTU
! Correlation TRU vs STU
TH1F * fhL1GPatchAllFakeMaxE
! Energy distrib FOR for fake events, patch of maximal energy
Bool_t fEventL1J2D
Bit for L1 JEt 2 events, DCal.
AliAnalysisTaskEMCALTriggerQA(const char *name)
Constructor. Init stuff.
TH2F * fhClusEtaPhiLowCluMax[fgkTriggerCombi]
! Maximum E Cluster, Phi vs Eta per event distribution for MB trigger, energy below fEtaPhiEnMin GeV ...
TH2F * fhL1GPatchNotAllFakeMax
! FOR with at least one L1 Gamma patch associated with energy in the related cell, maximal energy patch : not fake events
TH2F * fhFORAmpL1J2
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet2 trigger event ...
TH2F * fhL1GPatchAllFake
! FOR without any L1 Gamma patch associated with energy in the related cells: fake patch ...
TH1F * fhClusMaxMBPure[3]
! Maximum E Cluster per event distribution for pure MB trigger
TH2F * fhClusEtaMax[fgkTriggerCombi]
! Maximum E Cluster vs Eta per event distribution for a trigger
Bool_t fEventL1J
Bit for L1 Jet 1 events.
TH2F * fhL1J2Amp
! STU signal per Row and Column for FOR position of L1 Jet2 patch (top-left)
TH2F * fhFEESTU
! Correlation FEE vs STU
TH2F * fhL1J2PatchMax
! FOR of max. amplitude patch with L1 Jet patch associated
void FillL1GammaPatchHistograms()
L1 Gamma trigger patches histograms.
TH2F * fhClusEtaPhiHigh[fgkTriggerCombi]
! Clusters eta vs phi distribution for a trigger, energy above fEtaPhiEnMin GeV
Bool_t fEventL1J2
Bit for L1 JEt 2 events.
Double_t fMapCellL1G[fgkFALTRORows][fgkFALTROCols]
static const int fgkTriggerCombi
Total number of trigger combinations defined above.
TH2F * fhClusCen[fgkTriggerCombi]
! Clusters Centrality vs E distribution for a trigger
Double_t fMapTrigL1G2[fgkFALTRORows][fgkFALTROCols]
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 FillMapHistograms()
Matrix with signal per channel.
TH2F * fhL1G2PatchMax
! FOR of max. amplitude patch with L1 Gamma patch associated
Bool_t fFillV0SigHisto
V0 signal creation and fill.
TH1F * fhL1GPatchNotAllFakeE
! Energy distrib of FOR for non fake events, all patch energy
TH2F * fhFORAmp
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column
void InitHistogramArrays()
Histograms array initialization called in constructor.
Bool_t fEventL1G2D
Bit for L1 Gamma 2 events, DCal.
TProfile2D * fhL1MeanAmp
! Mean FastOR(STU) signal per Row and Column
Bool_t fFillClusAcceptHisto
Fill eta/phi distributions.
TH2I * fhV0STU
! Total signal STU vs V0C+V0S
Bool_t fEventL0D
Bit for L0 events, DCal.
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
TLorentzVector fMomentum
Cluster kinematics, temporal, avoid recreation per event.
TH2F * fhL1GPatchNotFake
! FOR with L1 Gamma patch associated but no energy in the related cells
TFile * file
const Double_t etamax
Bool_t fEventL1G2
Bit for L1 Gamma 2 events.
TH2F * fhL1GPatchFake
! FOR with L1 Gamma patch associated
Double_t fMapCellL1J2[fgkFALTRORows][fgkFALTROCols]
Double_t fMapCellL1G2[fgkFALTRORows][fgkFALTROCols]
void FillCellMaps()
Cells analysis. Fill FEE energy per channel array.
TH2F * fhClusEtaPhiLow[fgkTriggerCombi]
! Clusters eta vs phi distribution for a trigger, energy below fEtaPhiEnMin GeV
Float_t fV0Trigger
V0 signal from trigger.
TH2F * fhL1GPatchNotAllFake
! FOR with at least 1 L1 Gamma patch associated that has energy in the related celles : not a fake ev...
TH1F * fhL1GPatchNotAllFakeMaxE
! Energy distrib of FOR for non fake events, patch of maximal energy
TH2F * fhGPMaxVV0TT
! V0 signal vs maximum gamma L1 patch
Float_t fEtaPhiEnMin
Min energy for Eta/Phi histograms.
Fill histograms with basic QA information for EMCAL offline trigger.
Bool_t fEventCen
Bit for Central events.
TH2F * fhClusV0Max[fgkTriggerCombi]
! Maximum E Cluster vs Centrality per event distribution for a trigger
TH2F * fhFORAmpL1J
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Jet trigger event ...
Double_t fMapCell[fgkFALTRORows][fgkFALTROCols]
TH2F * fhFORAmpL1G2
! FEE cells deposited energy, grouped like FastOR 2x2 per Row and Column, with L1 Gamma2 trigger even...
TH2F * fhL1FOREnergy
! STU signal per Row and Column for FOR position vs FOR energy
Double_t fMapTrigL0L1J[fgkFALTRORows][fgkFALTROCols]
Bool_t fOADBSet
AODB parameters already set.
TH2F * fhL1G2Amp
! STU signal per Row and Column for FOR position of L1 Gamma2 patch (top-left)
void SetTriggerEventBit(TString list)
Check what trigger is the event, set the corresponding bit.
Double_t fMapCellL1J[fgkFALTRORows][fgkFALTROCols]
TH1F * fhL1GPatchFakeE
! Energy distrib of FOR for fake events, all patch energy
Double_t fMapTrigL1J[fgkFALTRORows][fgkFALTROCols]
Bool_t fEventL1G
Bit for L1 Gamma 1 events.
TH2F * fhL1GPatch
! FOR with L1 Gamma patch associated