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