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