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