AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskEMCALPi0CalibSelection.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 
4  * Permission to use, copy, modify and distribute this software and its *
5  * documentation strictly for non-commercial purposes is hereby granted *
6  * without fee, provided that the above copyright notice appears in all *
7  * copies and that both the copyright notice and this permission notice *
8  * appear in the supporting documentation. The authors make no claims *
9  * about the suitability of this software for any purpose. It is *
10  * provided "as is" without express or implied warranty. *
11  **************************************************************************/
12 
13 // Root
14 #include <TRefArray.h>
15 #include <TList.h>
16 #include <TH1F.h>
17 #include <TGeoManager.h>
18 #include <TFile.h>
19 
20 // AliRoot
22 #include "AliAODEvent.h"
23 #include "AliESDEvent.h"
24 #include "AliMultSelection.h"
25 #include "AliEMCALGeometry.h"
26 #include "AliVCluster.h"
27 #include "AliVCaloCells.h"
28 #include "AliEMCALRecoUtils.h"
29 #include "AliOADBContainer.h"
30 #include "AliDataFile.h"
31 
35 
38 //______________________________________________________________________________________________
41 fEMCALGeo(0x0), fLoadMatrices(0),
42 fEMCALGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM"),
43 fTriggerName("EMC"),
44 fRecoUtils(new AliEMCALRecoUtils),
45 fOADBFilePath(""), fCalibFilePath(""),
46 fCorrectClusters(kFALSE), fRecalPosition(kTRUE),
47 fCaloClustersArr(0x0), fEMCALCells(0x0),
48 //fCuts(0x0),
49 fOutputContainer(0x0),
50 fCheckCentrality(kFALSE), fCentralityClass("V0M"),
51 fCentMin(-1), fCentMax(10000000),
52 fVertex(), fFilteredInput(kFALSE),
53 fImportGeometryFromFile(1), fImportGeometryFilePath(""),
54 fEmin(0.5), fEmax(15.),
55 fEBkgmin(0.5), fEBkgmax(15.),
56 fL0min(0.01), fL0max(0.5),
57 fL0Bkgmin(1.0), fL0Bkgmax(3.0),
58 fOpAnglemin(0.), fOpAnglemax(3.0),
59 fDTimeCut(100.), fTimeMax(1000000), fTimeMin(-1000000),
60 fAsyCut(1.), fMinNCells(2), fGroupNCells(0),
61 fLogWeight(4.5), fSameSM(kFALSE),
62 fNMaskCellColumns(11), fMaskCellColumns(0x0),
63 fSelectOnlyCellSignalOutOfCollision(0),
64 fCellEnergyHiso(0), fClusterTopology(0),
65 fSelectOnlyPhotonsInDifferentSM(0),
66 fChangeBkgShape(0),
67 fInvMassCutMin(110.), fInvMassCutMax(160.),
68 // Histograms binning
69 fNbins(300), fMinBin(0.), fMaxBin(300.),
70 fNTimeBins(1000), fMinTimeBin(0.), fMaxTimeBin(1000.),
71 fNEnergybins(1000), fMinEnergyBin(0.), fMaxEnergyBin(100.),
72 // Temporal
73 fMomentum1(), fMomentum2(), fMomentum12(),
74 // Histograms
75 fHmgg(0x0), fHmggDifferentSM(0x0),
76 fHmggMaskFrame(0x0), fHmggDifferentSMMaskFrame(0x0),
77 fHOpeningAngle(0x0), fHOpeningAngleDifferentSM(0x0),
78 fHAsymmetry(0x0), fHAsymmetryDifferentSM(0x0),
79 fhNEvents(0x0),
80 fhClusterTime(0x0), fhClusterPairDiffTime(0x0)
81 {
82  for(Int_t iMod=0; iMod < AliEMCALGeoParams::fgkEMCALModules; iMod++)
83  {
84  for(Int_t iX=0; iX<24; iX++)
85  {
86  for(Int_t iZ=0; iZ<48; iZ++)
87  {
88  fHmpi0[iMod][iZ][iX] = 0 ;
89  fhEnergy[iMod][iZ][iX] = 0 ;
90  }
91  }
92  }
93 
94  fVertex[0]=fVertex[1]=fVertex[2]=-1000;
95 
96  fHTpi0[0]= 0 ;
97  fHTpi0[1]= 0 ;
98  fHTpi0[2]= 0 ;
99  fHTpi0[3]= 0 ;
100 
102  fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
103  fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
104  fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
105  fMaskCellColumns[8] = 40+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[9] = 41+AliEMCALGeoParams::fgkEMCALCols;
106  fMaskCellColumns[10]= 42+AliEMCALGeoParams::fgkEMCALCols;
107 
108  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++)
109  {
110  fHmggPairSameSectorSM[iSMPair] = 0;
111  fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
113  }
114 
115  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++)
116  {
117  fHmggPairSameSideSM[iSMPair] = 0;
118  fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
119  fhClusterPairDiffTimeSameSide[iSMPair] = 0;
120  }
121 
122  for(Int_t iSM = 0; iSM < AliEMCALGeoParams::fgkEMCALModules; iSM++)
123  {
124  fHmggSM[iSM] = 0;
125  fHmggSM_Zone1[iSM] = 0;
126  fHmggSM_Zone2[iSM] = 0;
127  fHmggSM_Zone3[iSM] = 0;
128  fHmggSM_Zone4[iSM] = 0;
129  fHmggSM_Zone5[iSM] = 0;
130  fHmggSM_Zone6[iSM] = 0;
131  fHmggSM_Zone7[iSM] = 0;
132  fHmggSMMaskFrame[iSM] = 0;
133  fHOpeningAngleSM[iSM] = 0;
134  fHOpeningAnglePairSM[iSM] = 0;
135  fHAsymmetrySM[iSM] = 0;
136  fHAsymmetryPairSM[iSM] = 0;
137  fhTowerDecayPhotonHit[iSM] = 0;
138  fhTowerDecayPhotonEnergy[iSM] = 0;
141  fMatrix[iSM] = 0x0;
142  fhClusterTimeSM[iSM] = 0;
143  fhTopoClusterCase0[iSM] =0;
144  fhTopoClusterCase1[iSM] =0;
145  fhTopoClusterCase2[iSM] =0;
146  fhTopoClusterCase3[iSM] =0;
147  fhTopoClusterAmpCase0[iSM] =0;
148  fhTopoClusterAmpCase1[iSM] =0;
149  fhTopoClusterAmpCase2[iSM] =0;
150  fhTopoClusterAmpCase3[iSM] =0;
156  }
157 }
158 
164 //______________________________________________________________________________________________
166 AliAnalysisTaskSE(name),
167 fEMCALGeo(0x0), fLoadMatrices(0),
168 fEMCALGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM"),
169 fTriggerName("EMC"),
172 fCorrectClusters(kFALSE), fRecalPosition(kTRUE),
173 fCaloClustersArr(0x0), fEMCALCells(0x0),
174 //fCuts(0x0),
175 fOutputContainer(0x0),
176 fVertex(), fFilteredInput(kFALSE),
178 fEmin(0.5), fEmax(15.),
179 fEBkgmin(0.5), fEBkgmax(15.),
180 fL0min(0.01), fL0max(0.5),
181 fL0Bkgmin(1.0), fL0Bkgmax(3.0),
182 fOpAnglemin(0.), fOpAnglemax(3.0),
183 fDTimeCut(100.), fTimeMax(1000000), fTimeMin(-1000000),
184 fAsyCut(1.), fMinNCells(2), fGroupNCells(0),
185 fLogWeight(4.5), fSameSM(kFALSE),
190 fChangeBkgShape(0),
191 fInvMassCutMin(110.), fInvMassCutMax(160.),
192 // Histograms binning
193 fNbins(300), fMinBin(0.), fMaxBin(300.),
194 fNTimeBins(1000), fMinTimeBin(0.), fMaxTimeBin(1000.),
195 fNEnergybins(1000), fMinEnergyBin(0.), fMaxEnergyBin(100.),
196 // Temporal
198 // Histograms
199 fHmgg(0x0), fHmggDifferentSM(0x0),
203 fhNEvents(0x0),
206 {
207  for(Int_t iMod=0; iMod < AliEMCALGeoParams::fgkEMCALModules; iMod++)
208  {
209  for(Int_t iX=0; iX<24; iX++)
210  {
211  for(Int_t iZ=0; iZ<48; iZ++)
212  {
213  fHmpi0[iMod][iZ][iX] = 0 ;
214  fhEnergy[iMod][iZ][iX] = 0 ;
215  }
216  }
217  }
218 
219  fVertex[0]=fVertex[1]=fVertex[2]=-1000;
220 
221  fHTpi0[0]= 0 ;
222  fHTpi0[1]= 0 ;
223  fHTpi0[2]= 0 ;
224  fHTpi0[3]= 0 ;
225 
227  fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
228  fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
229  fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
230  fMaskCellColumns[8] = 40+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[9] = 41+AliEMCALGeoParams::fgkEMCALCols;
231  fMaskCellColumns[10]= 42+AliEMCALGeoParams::fgkEMCALCols;
232 
233  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++)
234  {
235  fHmggPairSameSectorSM[iSMPair] = 0;
236  fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
238  }
239 
240  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++)
241  {
242  fHmggPairSameSideSM[iSMPair] = 0;
243  fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
244  fhClusterPairDiffTimeSameSide[iSMPair] = 0;
245  }
246 
247  for(Int_t iSM = 0; iSM < AliEMCALGeoParams::fgkEMCALModules; iSM++)
248  {
249  fHmggSM[iSM] = 0;
250  fHmggSM_Zone1[iSM] = 0;
251  fHmggSM_Zone2[iSM] = 0;
252  fHmggSM_Zone3[iSM] = 0;
253  fHmggSM_Zone4[iSM] = 0;
254  fHmggSM_Zone5[iSM] = 0;
255  fHmggSM_Zone6[iSM] = 0;
256  fHmggSM_Zone7[iSM] = 0;
257  fHmggSMMaskFrame[iSM] = 0;
258  fHOpeningAngleSM[iSM] = 0;
259  fHOpeningAnglePairSM[iSM] = 0;
260  fHAsymmetrySM[iSM] = 0;
261  fHAsymmetryPairSM[iSM] = 0;
262  fhTowerDecayPhotonHit[iSM] = 0;
263  fhTowerDecayPhotonEnergy[iSM] = 0;
266  fMatrix[iSM] = 0x0;
267  fhClusterTimeSM[iSM] = 0;
268  fhTopoClusterCase0[iSM] =0;
269  fhTopoClusterCase1[iSM] =0;
270  fhTopoClusterCase2[iSM] =0;
271  fhTopoClusterCase3[iSM] =0;
272  fhTopoClusterAmpCase0[iSM] =0;
273  fhTopoClusterAmpCase1[iSM] =0;
274  fhTopoClusterAmpCase2[iSM] =0;
275  fhTopoClusterAmpCase3[iSM] =0;
281  }
282 
283  DefineOutput(1, TList::Class());
284 //DefineOutput(2, TList::Class()); // will contain cuts or local params
285 }
286 
289 //_____________________________________________________________________________
291 {
292  if(fOutputContainer)
293  {
294  fOutputContainer->Delete() ;
295  delete fOutputContainer ;
296  }
297 
298  if(fEMCALGeo) delete fEMCALGeo ;
299  if(fRecoUtils) delete fRecoUtils ;
300  if(fNMaskCellColumns) delete [] fMaskCellColumns;
301 }
302 
306 //____________________________________________________________
308 {
309  if(fRecoUtils->GetParticleType()!=AliEMCALRecoUtils::kPhoton)
310  AliFatal(Form("Wrong particle type for cluster position recalculation! = %d\n", fRecoUtils->GetParticleType()));
311 
312  AliDebug(1,Form("It will use fLogWeight %.3f",fLogWeight));
313 
314  Float_t pos[]={0,0,0};
315 
316  for(Int_t iClu=0; iClu < fCaloClustersArr->GetEntriesFast(); iClu++)
317  {
318  AliVCluster *c1 = (AliVCluster *) fCaloClustersArr->At(iClu);
319 
320  Float_t e1i = c1->E(); // cluster energy before correction
321  if(fChangeBkgShape && (((c1->GetM02() > fL0Bkgmin) && (c1->GetM02() < fL0Bkgmax)) && ((e1i < fEBkgmin) || (e1i > fEBkgmax)))) continue;
322  if(fChangeBkgShape && (((c1->GetM02() < fL0Bkgmin) || (c1->GetM02() > fL0Bkgmax)) && (e1i < fEmin))) continue;
323  else if (!fChangeBkgShape && e1i < fEmin) continue;
324  else if (e1i > fEmax) continue;
325 
326  else if (c1->GetNCells() < fMinNCells) continue;
327 
328  else if(fChangeBkgShape && (c1->GetM02() < fL0min || (c1->GetM02() > fL0max && c1->GetM02() < fL0Bkgmin) || c1->GetM02() > fL0Bkgmax)) continue;
329 
330  else if (!fChangeBkgShape && (c1->GetM02() < fL0min || c1->GetM02() > fL0max)) continue;
331 
332  if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
333 
334  if(DebugLevel() > 2)
335  {
336  AliInfo(Form("Std : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
337  c1->GetPosition(pos);
338  AliInfo(Form("Std : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]));
339  }
340 
341  // Correct cluster energy and position if requested, and not corrected previously, by default Off
343  {
347  }
348 
349  AliDebug(2,Form("Energy: after recalibration %f",c1->E()));
350 
351  // Recalculate cluster position
353 
354  // Correct Non-Linearity
356 
357  AliDebug(2,Form("after linearity correction %f",c1->E()));
358 
359  // In case of MC analysis, to match resolution/calibration in real data
360  //c1->SetE(fRecoUtils->SmearClusterEnergy(c1)); // Not needed anymore
361 
362  AliDebug(2,Form("after smearing %f\n",c1->E()));
363 
364  if(DebugLevel() > 2)
365  {
366  AliInfo(Form("Cor : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
367  c1->GetPosition(pos);
368  AliInfo(Form("Cor : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]));
369  }
370  } // cluster loop
371 }
372 
376 //__________________________________________________________
378 {
379  Int_t absId1 = -1;
380  Int_t iSupMod1 = -1;
381  Int_t iphi1 = -1;
382  Int_t ieta1 = -1;
383  Int_t absId2 = -1;
384  Int_t iSupMod2 = -1;
385  Int_t iphi2 = -1;
386  Int_t ieta2 = -1;
387  Bool_t shared = kFALSE;
388 
389  Float_t pos[] = {0,0,0};
390 
391  Int_t bc = InputEvent()->GetBunchCrossNumber();
392  Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
393 
394  Int_t nbClusterInTopoHisto[nSM];
395 
396  for(Int_t iSM = 0; iSM < nSM; iSM++)
397  {
398  nbClusterInTopoHisto[iSM] = 0;
399  }
400 
401  for(Int_t iClu=0; iClu<fCaloClustersArr->GetEntriesFast()-1; iClu++)
402  {
403  AliVCluster *c1 = (AliVCluster *) fCaloClustersArr->At(iClu);
404 
405  // Exclude bad channels
406  if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
407 
408  Float_t e1i = c1->E(); // cluster energy before correction
409 
410  if(fChangeBkgShape && (((c1->GetM02() > fL0Bkgmin) && (c1->GetM02() < fL0Bkgmax)) && ((e1i < fEBkgmin) || (e1i > fEBkgmax)))) continue;
411  if(fChangeBkgShape && (((c1->GetM02() < fL0Bkgmin) || (c1->GetM02() > fL0Bkgmax)) && (e1i < fEmin))) continue;
412  else if (!fChangeBkgShape && e1i < fEmin) continue;
413  else if (e1i > fEmax) continue;
414 
415  else if (!fRecoUtils->IsGoodCluster(c1,fEMCALGeo,fEMCALCells,bc)) continue;
416 
417  else if (c1->GetNCells() < fMinNCells) continue;
418 
419  else if(fChangeBkgShape && (c1->GetM02() < fL0min || (c1->GetM02() > fL0max && c1->GetM02() < fL0Bkgmin) || c1->GetM02() > fL0Bkgmax)) continue;
420 
421  else if (!fChangeBkgShape && (c1->GetM02() < fL0min || c1->GetM02() > fL0max)) continue;
422 
423  if(DebugLevel() > 2)
424  {
425  AliInfo(Form("IMA : i %d, E %f, dispersion %f, m02 %f, m20 %f",c1->GetID(),e1i,c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
426  c1->GetPosition(pos);
427  AliInfo(Form("IMA : i %d, x %f, y %f, z %f",c1->GetID(), pos[0], pos[1], pos[2]));
428  }
429 
430  fRecoUtils->GetMaxEnergyCell(fEMCALGeo, fEMCALCells,c1,absId1,iSupMod1,ieta1,iphi1,shared);
431 
432  c1->GetMomentum(fMomentum1,fVertex);
433 
434  // Check if cluster is in fidutial region, not too close to borders
436 
437  // Clusters not facing frame structures
438  Bool_t mask1 = MaskFrameCluster(iSupMod1, ieta1);
439  //if(mask1) printf("Reject eta %d SM %d\n",ieta1, iSupMod1);
440 
441  Double_t time1 = c1->GetTOF()*1.e9;
442 
443  if(fSelectOnlyCellSignalOutOfCollision && ((time1 < fTimeMax) && (time1 > fTimeMin))) continue;
444  else if(!fSelectOnlyCellSignalOutOfCollision && (time1 > fTimeMax || time1 < fTimeMin)) continue;
445 
446  fhClusterTime ->Fill(c1->E(),time1);
447  fhClusterTimeSM[iSupMod1]->Fill(c1->E(),time1);
448 
449  if(fClusterTopology)
450  {
451  Int_t iPosInNoisyQuartet = FindPositionInNoisyQuartet(iphi1,ieta1,iSupMod1);
452  AliEMCALGeometry* geom = AliEMCALGeometry::GetInstance();
453 
454  for(Int_t iCell = 0; iCell < c1->GetNCells(); iCell++)
455  {
456  Int_t iSupMod = -1, iIeta =-1, iIphi =-1, iTower =-1, ietaCell =-1, iphiCell =-1;
457 
458  Int_t CellID = c1->GetCellsAbsId()[iCell];
459  geom->GetCellIndex(CellID,iSupMod,iTower,iIphi,iIeta);
460  geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi,iIeta,iphiCell,ietaCell);
461 // Float_t AmpFraction = c1->GetCellAmplitudeFraction(CellID);
462  Float_t amp = fEMCALCells->GetCellAmplitude(CellID);
463 
464  Float_t AmpFraction = amp / e1i;
465 
466  AliDebug(2,Form("Cell ID: %i, Cell row: %i, Cell col: %i, Cell amp: %f, Cell amp fraction: %f\n",CellID,iphiCell,ietaCell,amp,AmpFraction));
467 
468  switch (iPosInNoisyQuartet) {
469  case 0:
470  fhTopoClusterCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
471  fhTopoClusterAmpCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
472  fhTopoClusterAmpFractionCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
473  break;
474  case 1:
475  fhTopoClusterCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
476  fhTopoClusterAmpCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
477  fhTopoClusterAmpFractionCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
478  break;
479  case 2:
480  fhTopoClusterCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
481  fhTopoClusterAmpCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
482  fhTopoClusterAmpFractionCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
483  break;
484  case 3:
485  fhTopoClusterCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
486  fhTopoClusterAmpCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
487  fhTopoClusterAmpFractionCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
488  break;
489  default:
490  break;
491  }
492 
493  if(amp && AmpFraction)
494  {
495  nbClusterInTopoHisto[iSupMod1] = nbClusterInTopoHisto[iSupMod1] + 1;
496  }
497  }
498  }
499 
500  // Combine cluster with other clusters and get the invariant mass
501  for (Int_t jClu=iClu+1; jClu < fCaloClustersArr->GetEntriesFast(); jClu++)
502  {
503  AliAODCaloCluster *c2 = (AliAODCaloCluster *) fCaloClustersArr->At(jClu);
504 
505  Float_t e2i = c2->E();
506  if(fChangeBkgShape && (((c2->GetM02() > fL0Bkgmin) && (c2->GetM02() < fL0Bkgmax)) && ((e2i < fEBkgmin) || (e2i > fEBkgmax)) && ((fMomentum1.Angle(fMomentum2.Vect()) < fOpAnglemin) || (fMomentum1.Angle(fMomentum2.Vect()) > fOpAnglemax)))) continue;
507  if(fChangeBkgShape && (((c2->GetM02() < fL0Bkgmin) || (c2->GetM02() > fL0Bkgmax)) && (e2i < fEmin))) continue;
508  else if (!fChangeBkgShape && e2i < fEmin) continue;
509  else if (e2i > fEmax) continue;
510 
511  else if (!fRecoUtils->IsGoodCluster(c2,fEMCALGeo,fEMCALCells,bc))continue;
512 
513  else if (c2->GetNCells() < fMinNCells) continue;
514 
515  else if(fChangeBkgShape && (c2->GetM02() < fL0min || (c2->GetM02() > fL0max && c2->GetM02() < fL0Bkgmin) || c2->GetM02() > fL0Bkgmax)) continue;
516 
517  else if (!fChangeBkgShape && (c2->GetM02() < fL0min || c2->GetM02() > fL0max)) continue;
518 
519  fRecoUtils->GetMaxEnergyCell(fEMCALGeo, fEMCALCells,c2,absId2,iSupMod2,ieta2,iphi2,shared);
520 
521  c2->GetMomentum(fMomentum2,fVertex);
522 
524  Float_t invmass = fMomentum12.M()*1000;
525 
526  //Asimetry cut
527  Float_t asym = TMath::Abs(fMomentum1.E()-fMomentum2.E())/(fMomentum1.E()+fMomentum2.E());
528 
529  if(asym > fAsyCut) continue;
530 
531  //Time cut
532  Double_t time2 = c2->GetTOF()*1.e9;
533 
534  if(fSelectOnlyCellSignalOutOfCollision && ((time2 < fTimeMax) && (time2 > fTimeMin))) continue;
535  else if(!fSelectOnlyCellSignalOutOfCollision && (time2 > fTimeMax || time2 < fTimeMin)) continue;
536 
537  fhClusterPairDiffTime->Fill(fMomentum12.E(),time1-time2);
538  if(TMath::Abs(time1-time2) > fDTimeCut) continue;
539 
540  if(invmass < fMaxBin && invmass > fMinBin )
541  {
542  //Check if cluster is in fidutial region, not too close to borders
544 
545  // Clusters not facing frame structures
546  Bool_t mask2 = MaskFrameCluster(iSupMod2, ieta2);
547  //if(mask2) printf("Reject eta %d SM %d\n",ieta2, iSupMod2);
548 
549 
550 
551  if(in1 && in2)
552  {
553  fHmgg->Fill(invmass,fMomentum12.Pt());
554 
555  if(iSupMod1==iSupMod2)
556  {
557  fHmggSM[iSupMod1]->Fill(invmass,fMomentum12.Pt());
558  fhClusterPairDiffTimeSameSM[iSupMod1]->Fill(fMomentum12.E(),time1-time2);
559 
560  //Is in zone number i
561  Bool_t zone1 = IsInZone1(iSupMod1,ieta1,iphi1);
562  Bool_t zone2 = IsInZone2(iSupMod1,ieta1,iphi1);
563  Bool_t zone3 = IsInZone3(iSupMod1,ieta1,iphi1);
564  Bool_t zone4 = IsInZone4(iSupMod1,ieta1,iphi1);
565  Bool_t zone5 = IsInZone5(iSupMod1,ieta1,iphi1);
566  Bool_t zone6 = IsInZone6(iSupMod1,ieta1,iphi1);
567  Bool_t zone7 = IsInZone7(iSupMod1,ieta1,iphi1);
568 
569 
570  if(zone1) fHmggSM_Zone1[iSupMod1]->Fill(invmass,fMomentum12.Pt());
571  if(zone2) fHmggSM_Zone2[iSupMod1]->Fill(invmass,fMomentum12.Pt());
572  if(zone3) fHmggSM_Zone3[iSupMod1]->Fill(invmass,fMomentum12.Pt());
573  if(zone4) fHmggSM_Zone4[iSupMod1]->Fill(invmass,fMomentum12.Pt());
574  if(zone5) fHmggSM_Zone5[iSupMod1]->Fill(invmass,fMomentum12.Pt());
575  if(zone6) fHmggSM_Zone6[iSupMod1]->Fill(invmass,fMomentum12.Pt());
576  if(zone7) fHmggSM_Zone7[iSupMod1]->Fill(invmass,fMomentum12.Pt());
577 
578  }
579  else
580  fHmggDifferentSM ->Fill(invmass,fMomentum12.Pt());
581 
582  // Same sector
583  Int_t j=0;
584  for(Int_t i = 0; i < nSM/2; i++)
585  {
586  j=2*i;
587  if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j))
588  {
589  fHmggPairSameSectorSM[i]->Fill(invmass,fMomentum12.Pt());
590  fhClusterPairDiffTimeSameSector[i]->Fill(fMomentum12.E(),time1-time2);
591  }
592  }
593 
594  // Same side
595  for(Int_t i = 0; i < nSM-2; i++)
596  {
597  if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i))
598  {
599  fHmggPairSameSideSM[i]->Fill(invmass,fMomentum12.Pt());
600  fhClusterPairDiffTimeSameSide[i]->Fill(fMomentum12.E(),time1-time2);
601  }
602  }
603 
604 
605  if(!mask1 && !mask2)
606  {
607  fHmggMaskFrame->Fill(invmass,fMomentum12.Pt());
608 
609  if(iSupMod1==iSupMod2) fHmggSMMaskFrame[iSupMod1]->Fill(invmass,fMomentum12.Pt());
610  else fHmggDifferentSMMaskFrame ->Fill(invmass,fMomentum12.Pt());
611 
612  // Same sector
613  j=0;
614  for(Int_t i = 0; i < nSM/2; i++)
615  {
616  j=2*i;
617  if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j)) fHmggPairSameSectorSMMaskFrame[i]->Fill(invmass,fMomentum12.Pt());
618  }
619 
620  // Same side
621  for(Int_t i = 0; i < nSM-2; i++)
622  {
623  if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i)) fHmggPairSameSideSMMaskFrame[i]->Fill(invmass,fMomentum12.Pt());
624  }
625 
626  }// Pair not facing frame
627 
628  if(invmass > fInvMassCutMin && invmass < fInvMassCutMax) //restrict to clusters really close to pi0 peak
629  {
630 
631  // Check time of cells in both clusters, and fill time histogram
632  for(Int_t icell = 0; icell < c1->GetNCells(); icell++)
633  {
634  Int_t absID = c1->GetCellAbsId(icell);
635  fHTpi0[bc%4]->Fill(absID, fEMCALCells->GetCellTime(absID)*1.e9);
636  }
637 
638  for(Int_t icell = 0; icell < c2->GetNCells(); icell++)
639  {
640  Int_t absID = c2->GetCellAbsId(icell);
641  fHTpi0[bc%4]->Fill(absID, fEMCALCells->GetCellTime(absID)*1.e9);
642  }
643 
644  //Opening angle of 2 photons
645  Float_t opangle = fMomentum1.Angle(fMomentum2.Vect())*TMath::RadToDeg();
646  //printf("*******>>>>>>>> In PEAK pt %f, angle %f \n",fMomentum12.Pt(),opangle);
647 
648 
649  fHOpeningAngle ->Fill(opangle,fMomentum12.Pt());
650  fHAsymmetry ->Fill(asym,fMomentum12.Pt());
651 
652  if(iSupMod1==iSupMod2)
653  {
654  fHOpeningAngleSM[iSupMod1] ->Fill(opangle,fMomentum12.Pt());
655  fHAsymmetrySM[iSupMod1] ->Fill(asym,fMomentum12.Pt());
656  }
657  else
658  {
659  fHOpeningAngleDifferentSM ->Fill(opangle,fMomentum12.Pt());
660  fHAsymmetryDifferentSM ->Fill(asym,fMomentum12.Pt());
661  }
662 
663  if((iSupMod1==0 && iSupMod2==2) || (iSupMod1==2 && iSupMod2==0))
664  {
665  fHOpeningAnglePairSM[0] ->Fill(opangle,fMomentum12.Pt());
666  fHAsymmetryPairSM[0] ->Fill(asym,fMomentum12.Pt());
667 
668  }
669  if((iSupMod1==1 && iSupMod2==3) || (iSupMod1==3 && iSupMod2==1))
670  {
671  fHOpeningAnglePairSM[1] ->Fill(opangle,fMomentum12.Pt());
672  fHAsymmetryPairSM[1] ->Fill(asym,fMomentum12.Pt());
673  }
674 
675  if((iSupMod1==0 && iSupMod2==1) || (iSupMod1==1 && iSupMod2==0))
676  {
677  fHOpeningAnglePairSM[2] ->Fill(opangle,fMomentum12.Pt());
678  fHAsymmetryPairSM[2] ->Fill(asym,fMomentum12.Pt());
679  }
680  if((iSupMod1==2 && iSupMod2==3) || (iSupMod1==3 && iSupMod2==2))
681  {
682  fHOpeningAnglePairSM[3] ->Fill(opangle,fMomentum12.Pt());
683  fHAsymmetryPairSM[3] ->Fill(asym,fMomentum12.Pt());
684  }
685 
686  }// pair in 100 < mass < 160
687 
688  }//in acceptance cuts
689 
690  //In case of filling only channels with second cluster in same SM
691  if(fSameSM && iSupMod1!=iSupMod2) continue;
692  if(fSelectOnlyPhotonsInDifferentSM && (iSupMod1 == iSupMod2)) continue;
693 
694  if (fGroupNCells == 0)
695  {
696  fHmpi0[iSupMod1][ieta1][iphi1]->Fill(invmass);
697  fHmpi0[iSupMod2][ieta2][iphi2]->Fill(invmass);
698 
699  if (fCellEnergyHiso) fhEnergy[iSupMod1][ieta1][iphi1]->Fill(fMomentum1.E());
700  if (fCellEnergyHiso) fhEnergy[iSupMod2][ieta2][iphi2]->Fill(fMomentum2.E());
701 
702  if(invmass > fInvMassCutMin && invmass < fInvMassCutMax)//restrict to clusters really close to pi0 peak
703  {
704  fhTowerDecayPhotonHit [iSupMod1]->Fill(ieta1,iphi1);
705  fhTowerDecayPhotonEnergy [iSupMod1]->Fill(ieta1,iphi1,fMomentum1.E());
706  fhTowerDecayPhotonAsymmetry[iSupMod1]->Fill(ieta1,iphi1,asym);
707 
708  fhTowerDecayPhotonHit [iSupMod2]->Fill(ieta2,iphi2);
709  fhTowerDecayPhotonEnergy [iSupMod2]->Fill(ieta2,iphi2,fMomentum2.E());
710  fhTowerDecayPhotonAsymmetry[iSupMod2]->Fill(ieta2,iphi2,asym);
711 
712  if(!mask1)fhTowerDecayPhotonHitMaskFrame[iSupMod1]->Fill(ieta1,iphi1);
713  if(!mask2)fhTowerDecayPhotonHitMaskFrame[iSupMod2]->Fill(ieta2,iphi2);
714 
715  }// pair in mass of pi0
716  }
717  else
718  {
719  //printf("Regroup N %d, eta1 %d, phi1 %d, eta2 %d, phi2 %d \n",fGroupNCells, ieta1, iphi1, ieta2, iphi2);
720  for (Int_t i = -fGroupNCells; i < fGroupNCells+1; i++)
721  {
722  for (Int_t j = -fGroupNCells; j < fGroupNCells+1; j++)
723  {
724  Int_t absId11 = fEMCALGeo->GetAbsCellIdFromCellIndexes(iSupMod1, iphi1+j, ieta1+i);
725  Int_t absId22 = fEMCALGeo->GetAbsCellIdFromCellIndexes(iSupMod2, iphi2+j, ieta2+i);
726 
727  Bool_t ok1 = kFALSE;
728  Bool_t ok2 = kFALSE;
729 
730  for(Int_t icell = 0; icell < c1->GetNCells(); icell++)
731  {
732  if(c1->GetCellsAbsId()[icell] == absId11) ok1=kTRUE;
733  }
734 
735  for(Int_t icell = 0; icell < c2->GetNCells(); icell++)
736  {
737  if(c2->GetCellsAbsId()[icell] == absId22) ok2=kTRUE;
738  }
739 
740  if(ok1 && (ieta1+i >= 0) && (iphi1+j >= 0) && (ieta1+i < 48) && (iphi1+j < 24))
741  {
742  fHmpi0[iSupMod1][ieta1+i][iphi1+j]->Fill(invmass);
743  if(fCellEnergyHiso) fhEnergy[iSupMod1][ieta1+i][iphi1+j]->Fill(fMomentum1.E());
744  }
745 
746  if(ok2 && (ieta2+i >= 0) && (iphi2+j >= 0) && (ieta2+i < 48) && (iphi2+j < 24))
747  {
748  fHmpi0[iSupMod2][ieta2+i][iphi2+j]->Fill(invmass);
749  if(fCellEnergyHiso) fhEnergy[iSupMod2][ieta2+i][iphi2+j]->Fill(fMomentum2.E());
750  }
751  }// j loop
752  }//i loop
753  }//group cells
754 
755  AliDebug(1,Form("Mass in (SM%d,%d,%d) and (SM%d,%d,%d): %.3f GeV E1_i=%f E1_ii=%f E2_i=%f E2_ii=%f\n",
756  iSupMod1,iphi1,ieta1,iSupMod2,iphi2,ieta2,fMomentum12.M(),e1i,c1->E(),e2i,c2->E()));
757  }
758  }
759  } // end of loop over EMCAL clusters
760 
761  for(Int_t iSM = 0; iSM < nSM; iSM++)
762  {
763  AliDebug(2,Form("nbClusterInTopo = %i\n",nbClusterInTopoHisto[iSM]));
764 
765  if(nbClusterInTopoHisto[iSM] == 0) continue;
766 
767  fhTopoClusterAmpCase0[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
768  fhTopoClusterAmpFractionCase0[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
769 
770  fhTopoClusterAmpCase1[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
771  fhTopoClusterAmpFractionCase1[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
772 
773  fhTopoClusterAmpCase2[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
774  fhTopoClusterAmpFractionCase2[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
775 
776  fhTopoClusterAmpCase3[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
777  fhTopoClusterAmpFractionCase3[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
778  }
779 
780 }
781 
782 
787 //______________________________________________________________________
789 {
790  if ( !fRecoUtils->IsRecalibrationOn() || fCalibFilePath == "" ) return ;
791 
792  if(!fEMCALGeo)fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
793 
794  TFile * calibFactorsFile = TFile::Open(fCalibFilePath.Data());
795 
796  if ( !calibFactorsFile ) AliFatal("Cannot recover the calibration factors");
797 
798  for(Int_t ism = 0; ism < fEMCALGeo->GetNumberOfSuperModules(); ism++)
799  {
800  TH2F * histo = (TH2F*) calibFactorsFile->Get(Form("EMCALRecalFactors_SM%d",ism));
801  printf("In AliAnalysisTaskEMCALPi0CalibSelection::InitEnergyCalibrationFactors \n ---Recover calibration factor for : EMCALRecalFactors_SM%d %p\n",ism,histo);
802 
803  if ( histo )
805  else
806  AliWarning(Form("Null histogram with calibration factors for SM%d, 1 will be used for the full SM!",ism));
807  }
808 }
809 
813 //________________________________________________________________
815 {
816  Int_t runnumber = InputEvent()->GetRunNumber() ;
817 
818  //
819  // Load default geo matrices if requested
820  if(fImportGeometryFromFile && !gGeoManager)
821  {
822  if(fImportGeometryFilePath=="") // If not specified, set location depending on run number
823  {
824  // "$ALICE_ROOT/EVE/alice-data/default_geo.root"
825  if (runnumber < 140000) fImportGeometryFilePath = AliDataFile::GetFileNameOADB("EMCAL/geometry_2010.root").data();
826  else if(runnumber < 171000) fImportGeometryFilePath = AliDataFile::GetFileNameOADB("EMCAL/geometry_2011.root").data();
827  else if(runnumber < 198000) fImportGeometryFilePath = AliDataFile::GetFileNameOADB("EMCAL/geometry_2012.root").data(); // 2012-2013
828  else fImportGeometryFilePath = AliDataFile::GetFileNameOADB("EMCAL/geometry_2015.root").data(); // >= 2015
829  }
830 
831  AliInfo(Form("Import %s",fImportGeometryFilePath.Data()));
832 
833  TGeoManager::Import(fImportGeometryFilePath) ; // default need file "geometry.root" in local dir!!!!
834  }
835 
836  //
837  if(fLoadMatrices)
838  {
839  AliInfo("Load user defined EMCAL geometry matrices");
840  // OADB if available
841  AliOADBContainer emcGeoMat("AliEMCALgeo");
842 
843  if(fOADBFilePath!="")
844  emcGeoMat.InitFromFile(Form("%s/EMCALlocal2master.root",fOADBFilePath.Data()),"AliEMCALgeo");
845  else
846  emcGeoMat.InitFromFile(AliDataFile::GetFileNameOADB("EMCAL/EMCALlocal2master.root").data(),"AliEMCALgeo");
847 
848  TObjArray *matEMCAL=(TObjArray*)emcGeoMat.GetObject(runnumber,"EmcalMatrices");
849 
850  for(Int_t mod = 0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
851  {
852  if (!fMatrix[mod]) // Get it from OADB
853  {
854  AliDebug(1,Form("EMCAL matrices SM %d, %p",mod,((TGeoHMatrix*) matEMCAL->At(mod))));
855  //((TGeoHMatrix*) matEMCAL->At(mod))->Print();
856 
857  fMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod) ;
858  }
859 
860  if(fMatrix[mod])
861  {
862  if(DebugLevel() > 1)
863  fMatrix[mod]->Print();
864 
865  fEMCALGeo->SetMisalMatrix(fMatrix[mod],mod) ;
866  }
867  else if(gGeoManager)
868  {
869  AliWarning(Form("Set matrix for SM %d from gGeoManager",mod));
870  fEMCALGeo->SetMisalMatrix(fEMCALGeo->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
871  }
872  else
873  {
874  AliError(Form("Alignment matrix for SM %d is not available",mod));
875  }
876  }//SM loop
877  }//Load matrices
878  else if(!gGeoManager)
879  {
880  AliInfo("Get geo matrices from data");
881  //Still not implemented in AOD, just a workaround to be able to work at least with ESDs
882  if(!strcmp(InputEvent()->GetName(),"AliAODEvent"))
883  {
884  AliWarning("Use ideal geometry, values geometry matrix not kept in AODs");
885  }//AOD
886  else
887  {
888  AliDebug(1,"AliAnalysisTaskEMCALClusterize Load Misaligned matrices");
889 
890  for(Int_t mod=0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
891  {
892  if(InputEvent()->GetEMCALMatrix(mod))
893  {
894  if(DebugLevel() > 1)
895  InputEvent()->GetEMCALMatrix(mod)->Print();
896 
897  fEMCALGeo->SetMisalMatrix(InputEvent()->GetEMCALMatrix(mod),mod) ;
898  }
899 
900  }
901  }// ESD
902  }// Load matrices from Data
903  else if(gGeoManager) // Load default matrices
904  {
905  for(Int_t mod = 0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
906  {
907  AliWarning(Form("Set matrix for SM %d from gGeoManager",mod));
908  fEMCALGeo->SetMisalMatrix(fEMCALGeo->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
909  }
910  } // gGeoManager matrices
911 
912 }
913 
917 //______________________________________________________________________
919 {
920  if(!fRecoUtils->IsRunDepRecalibrationOn()) return;
921 
922  AliOADBContainer *contRFTD=new AliOADBContainer("");
923 
924  if(fOADBFilePath!="")
925  contRFTD->InitFromFile(Form("%s/EMCALTemperatureCorrCalib.root",fOADBFilePath.Data()),"AliEMCALRunDepTempCalibCorrections");
926  else
927  contRFTD->InitFromFile(AliDataFile::GetFileNameOADB("EMCAL/EMCALTemperatureCorrCalib.root").data(),"AliEMCALRunDepTempCalibCorrections");
928 
929  Int_t runnumber = InputEvent()->GetRunNumber() ;
930 
931  TH1S *htd=(TH1S*)contRFTD->GetObject(runnumber);
932 
933  //If it did not exist for this run, get closes one
934  if (!htd)
935  {
936  AliWarning(Form("No TemperatureCorrCalib Objects for run: %d",runnumber));
937 
938  // let's get the closest runnumber instead then..
939  Int_t lower = 0;
940  Int_t ic = 0;
941  Int_t maxEntry = contRFTD->GetNumberOfEntries();
942 
943  while ( (ic < maxEntry) && (contRFTD->UpperLimit(ic) < runnumber) )
944  {
945  lower = ic;
946  ic++;
947  }
948 
949  Int_t closest = lower;
950  if ( (ic<maxEntry) &&
951  (contRFTD->LowerLimit(ic)-runnumber) < (runnumber - contRFTD->UpperLimit(lower)) )
952  {
953  closest = ic;
954  }
955 
956  AliWarning(Form("TemperatureCorrCalib Objects found closest id %d from run: %d",
957  closest, contRFTD->LowerLimit(closest)));
958 
959  htd = (TH1S*) contRFTD->GetObjectByIndex(closest);
960  }
961 
962  // Fill parameters
963  if(htd)
964  {
965  AliInfo("Recalibrate (Temperature) EMCAL");
966 
967  Int_t nSM = fEMCALGeo->GetNumberOfSuperModules();
968 
969  for (Int_t ism = 0; ism < nSM; ++ism)
970  {
971  for (Int_t icol = 0; icol < 48; ++icol)
972  {
973  for (Int_t irow = 0; irow < 24; ++irow)
974  {
975  Float_t factor = fRecoUtils->GetEMCALChannelRecalibrationFactor(ism,icol,irow);
976 
977  Int_t absID = fEMCALGeo->GetAbsCellIdFromCellIndexes(ism, irow, icol); // original calibration factor
978 
979  AliDebug(3,Form(" ism %d, icol %d, irow %d,absID %d - Calib factor %1.5f - ",ism, icol, irow, absID, factor));
980 
981  factor *= htd->GetBinContent(absID) / 10000. ; // correction dependent on T
982 
983  fRecoUtils->SetEMCALChannelRecalibrationFactor(ism,icol,irow,factor);
984 
985  AliDebug(3,Form("T factor %1.5f - final factor %1.5f",
986  htd->GetBinContent(absID) / 10000.,
988  } // columns
989  } // rows
990  } // SM loop
991  }
992  else AliInfo("Do NOT recalibrate EMCAL with T variations, no params TH1");
993 
994  delete contRFTD;
995 }
996 
997 
1000 //___________________________________________________________________
1002 {
1003  if(!fEMCALGeo)fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
1004  Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
1005 
1006  fOutputContainer = new TList();
1007  const Int_t buffersize = 255;
1008  char hname[buffersize], htitl[buffersize], htitlEnergy[buffersize];
1009 
1010  fhNEvents = new TH1I("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
1012 
1013  if ( fCheckCentrality )
1014  {
1015  fhCentrality = new TH1F
1016  ("hCentrality",
1017  Form("Number of events in centrality bins, |vz|<10 cm, method <%s> ",fCentralityClass.Data()),
1018  100,0.,100.) ;
1019  fhCentrality->SetXTitle("Centrality bin");
1021 
1022  fhCentralitySelected = new TH1F
1023  ("hCentralitySelected",
1024  Form("Number of selected events in centrality bin, |vz|<10 cm, method <%s> ",fCentralityClass.Data()),
1025  100,0.,100.) ;
1026  fhCentralitySelected->SetXTitle("Centrality bin");
1028  }
1029 
1030  fHmgg = new TH2F("hmgg","2-cluster invariant mass",fNbins,fMinBin,fMaxBin,100,0,10);
1031  fHmgg->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1032  fHmgg->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1033  fOutputContainer->Add(fHmgg);
1034 
1035  fHmggDifferentSM = new TH2F("hmggDifferentSM","2-cluster invariant mass, different SM",fNbins,fMinBin,fMaxBin,100,0,10);
1036  fHmggDifferentSM->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1037  fHmggDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1039 
1040  fHOpeningAngle = new TH2F("hopang","2-cluster opening angle",100,0.,50.,100,0,10);
1041  fHOpeningAngle->SetXTitle("#alpha_{#gamma #gamma}");
1042  fHOpeningAngle->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1044 
1045  fHOpeningAngleDifferentSM = new TH2F("hopangDifferentSM","2-cluster opening angle, different SM",100,0,50.,100,0,10);
1046  fHOpeningAngleDifferentSM->SetXTitle("#alpha_{#gamma #gamma}");
1047  fHOpeningAngleDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1049 
1050  fHAsymmetry = new TH2F("hasym","2-cluster opening angle",100,0.,1.,100,0,10);
1051  fHAsymmetry->SetXTitle("a");
1052  fHAsymmetry->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1054 
1055  fHAsymmetryDifferentSM = new TH2F("hasymDifferentSM","2-cluster opening angle, different SM",100,0,1.,100,0,10);
1056  fHAsymmetryDifferentSM->SetXTitle("a");
1057  fHAsymmetryDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1059 
1060  //TString pairname[] = {"A side (0-2)", "C side (1-3)","Row 0 (0-1)", "Row 1 (2-3)"};
1061 
1062  fHmggMaskFrame = new TH2F("hmggMaskFrame","2-cluster invariant mass, frame masked",fNbins,fMinBin,fMaxBin,100,0,10);
1063  fHmggMaskFrame->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1064  fHmggMaskFrame->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1066 
1067  fHmggDifferentSMMaskFrame = new TH2F("hmggDifferentSMMaskFrame","2-cluster invariant mass, different SM, frame masked",
1068  fNbins,fMinBin,fMaxBin,100,0,10);
1069  fHmggDifferentSMMaskFrame->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1070  fHmggDifferentSMMaskFrame->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1072 
1073  for(Int_t iSM = 0; iSM < nSM; iSM++)
1074  {
1075  snprintf(hname, buffersize, "hmgg_SM%d",iSM);
1076  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d",iSM);
1077  fHmggSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1078  fHmggSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1079  fHmggSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1080  fOutputContainer->Add(fHmggSM[iSM]);
1081 
1082  snprintf(hname, buffersize, "hmgg_SM%d_MaskFrame",iSM);
1083  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d",iSM);
1084  fHmggSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1085  fHmggSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1086  fHmggSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1088 
1089  snprintf(hname, buffersize, "hmgg_SM%d_Zone1",iSM);
1090  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 1",iSM);
1091  fHmggSM_Zone1[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1092  fHmggSM_Zone1[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1093  fHmggSM_Zone1[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1094  fOutputContainer->Add(fHmggSM_Zone1[iSM]);
1095 
1096  snprintf(hname, buffersize, "hmgg_SM%d_Zone2",iSM);
1097  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 2",iSM);
1098  fHmggSM_Zone2[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1099  fHmggSM_Zone2[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1100  fHmggSM_Zone2[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1101  fOutputContainer->Add(fHmggSM_Zone2[iSM]);
1102 
1103  snprintf(hname, buffersize, "hmgg_SM%d_Zone3",iSM);
1104  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 3",iSM);
1105  fHmggSM_Zone3[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1106  fHmggSM_Zone3[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1107  fHmggSM_Zone3[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1108  fOutputContainer->Add(fHmggSM_Zone3[iSM]);
1109 
1110  snprintf(hname, buffersize, "hmgg_SM%d_Zone4",iSM);
1111  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 4",iSM);
1112  fHmggSM_Zone4[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1113  fHmggSM_Zone4[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1114  fHmggSM_Zone4[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1115  fOutputContainer->Add(fHmggSM_Zone4[iSM]);
1116 
1117  snprintf(hname, buffersize, "hmgg_SM%d_Zone5",iSM);
1118  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 5",iSM);
1119  fHmggSM_Zone5[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1120  fHmggSM_Zone5[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1121  fHmggSM_Zone5[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1122  fOutputContainer->Add(fHmggSM_Zone5[iSM]);
1123 
1124  snprintf(hname, buffersize, "hmgg_SM%d_Zone6",iSM);
1125  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 6",iSM);
1126  fHmggSM_Zone6[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1127  fHmggSM_Zone6[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1128  fHmggSM_Zone6[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1129  fOutputContainer->Add(fHmggSM_Zone6[iSM]);
1130 
1131  snprintf(hname, buffersize, "hmgg_SM%d_Zone7",iSM);
1132  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 7",iSM);
1133  fHmggSM_Zone7[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1134  fHmggSM_Zone7[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1135  fHmggSM_Zone7[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1136  fOutputContainer->Add(fHmggSM_Zone7[iSM]);
1137 
1138  if(iSM < nSM/2)
1139  {
1140  snprintf(hname,buffersize, "hmgg_PairSameSectorSM%d",iSM);
1141  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1142  fHmggPairSameSectorSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1143  fHmggPairSameSectorSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1144  fHmggPairSameSectorSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1146 
1147  snprintf(hname,buffersize, "hmgg_PairSameSectorSM%d_MaskFrame",iSM);
1148  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1149  fHmggPairSameSectorSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1150  fHmggPairSameSectorSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1151  fHmggPairSameSectorSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1153 
1154  fhClusterPairDiffTimeSameSector[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSector%d",iSM),
1155  Form("cluster pair time difference vs E, Sector %d",iSM),
1156  100,0,10, 200,-100,100);
1157  fhClusterPairDiffTimeSameSector[iSM]->SetXTitle("E_{pair} (GeV)");
1158  fhClusterPairDiffTimeSameSector[iSM]->SetYTitle("#Delta t (ns)");
1160  }
1161 
1162  if(iSM < nSM-2)
1163  {
1164  snprintf(hname,buffersize, "hmgg_PairSameSideSM%d",iSM);
1165  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1166  fHmggPairSameSideSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1167  fHmggPairSameSideSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1168  fHmggPairSameSideSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1170 
1171  snprintf(hname,buffersize, "hmgg_PairSameSideSM%d_MaskFrame",iSM);
1172  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1173  fHmggPairSameSideSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1174  fHmggPairSameSideSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1175  fHmggPairSameSideSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1177 
1178  fhClusterPairDiffTimeSameSide[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSide%d",iSM),
1179  Form("cluster pair time difference vs E, Side %d",iSM),
1180  100,0,10, 200,-100,100);
1181  fhClusterPairDiffTimeSameSide[iSM]->SetXTitle("E_{pair} (GeV)");
1182  fhClusterPairDiffTimeSameSide[iSM]->SetYTitle("#Delta t (ns)");
1184  }
1185 
1186  snprintf(hname, buffersize, "hopang_SM%d",iSM);
1187  snprintf(htitl, buffersize, "Opening angle for super mod %d",iSM);
1188  fHOpeningAngleSM[iSM] = new TH2F(hname,htitl,100,0.,50.,100,0,10);
1189  fHOpeningAngleSM[iSM]->SetXTitle("#alpha_{#gamma #gamma} (deg)");
1190  fHOpeningAngleSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1192 
1193  snprintf(hname,buffersize, "hopang_PairSM%d",iSM);
1194  snprintf(htitl,buffersize, "Opening angle for SM pair: %d",iSM);
1195  fHOpeningAnglePairSM[iSM] = new TH2F(hname,htitl,100,0.,50.,100,0,10);
1196  fHOpeningAnglePairSM[iSM]->SetXTitle("#alpha_{#gamma #gamma} (deg)");
1197  fHOpeningAnglePairSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1199 
1200  snprintf(hname, buffersize, "hasym_SM%d",iSM);
1201  snprintf(htitl, buffersize, "Asymmetry for super mod %d",iSM);
1202  fHAsymmetrySM[iSM] = new TH2F(hname,htitl,100,0.,1.,100,0,10);
1203  fHAsymmetrySM[iSM]->SetXTitle("a");
1204  fHAsymmetrySM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1205  fOutputContainer->Add(fHAsymmetrySM[iSM]);
1206 
1207  snprintf(hname,buffersize, "hasym_PairSM%d",iSM);
1208  snprintf(htitl,buffersize, "Asymmetry for SM pair: %d",iSM);
1209  fHAsymmetryPairSM[iSM] = new TH2F(hname,htitl,100,0.,1.,100,0,10);
1210  fHAsymmetryPairSM[iSM]->SetXTitle("a");
1211  fHAsymmetryPairSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1212  fOutputContainer->Add(fHAsymmetryPairSM[iSM]);
1213 
1214  Int_t colmax = 48;
1215  Int_t rowmax = 24;
1216 
1217  fhTowerDecayPhotonHit[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d",iSM),
1218  Form("Entries in grid of cells in Module %d",iSM),
1219  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1220  fhTowerDecayPhotonHit[iSM]->SetYTitle("row (phi direction)");
1221  fhTowerDecayPhotonHit[iSM]->SetXTitle("column (eta direction)");
1223 
1224  fhTowerDecayPhotonEnergy[iSM] = new TH2F (Form("hTowerDecPhotonEnergy_Mod%d",iSM),
1225  Form("Accumulated energy in grid of cells in Module %d",iSM),
1226  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1227  fhTowerDecayPhotonEnergy[iSM]->SetYTitle("row (phi direction)");
1228  fhTowerDecayPhotonEnergy[iSM]->SetXTitle("column (eta direction)");
1230 
1231  fhTowerDecayPhotonAsymmetry[iSM] = new TH2F (Form("hTowerDecPhotonAsymmetry_Mod%d",iSM),
1232  Form("Accumulated asymmetry in grid of cells in Module %d",iSM),
1233  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1234  fhTowerDecayPhotonAsymmetry[iSM]->SetYTitle("row (phi direction)");
1235  fhTowerDecayPhotonAsymmetry[iSM]->SetXTitle("column (eta direction)");
1237 
1238  fhTowerDecayPhotonHitMaskFrame[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d_MaskFrame",iSM),Form("Entries in grid of cells in Module %d",iSM),
1239  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1240  fhTowerDecayPhotonHitMaskFrame[iSM]->SetYTitle("row (phi direction)");
1241  fhTowerDecayPhotonHitMaskFrame[iSM]->SetXTitle("column (eta direction)");
1243 
1244  fhClusterTimeSM[iSM] = new TH2F(Form("hClusterTime_SM%d",iSM),"cluster time vs E",100,0,10, 200,-1000,1000);
1245  fhClusterTimeSM[iSM]->SetXTitle("E (GeV)");
1246  fhClusterTimeSM[iSM]->SetYTitle("t (ns)");
1247  fOutputContainer->Add(fhClusterTimeSM[iSM]);
1248 
1249  fhClusterPairDiffTimeSameSM[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSM%d",iSM),
1250  Form("cluster pair time difference vs E, SM %d",iSM),
1251  100,0,10, 200,-100,100);
1252  fhClusterPairDiffTimeSameSM[iSM]->SetXTitle("E (GeV)");
1253  fhClusterPairDiffTimeSameSM[iSM]->SetYTitle("#Delta t (ns)");
1255 
1256 
1257  if(fClusterTopology)
1258  {
1259 
1260  fhTopoClusterCase0[iSM] = new TH2F(Form("hTopoClusterCase0SM%d",iSM),
1261  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1262  21,-10.5,10.5, 21,-10.5,10.5);
1263  fhTopoClusterCase0[iSM]->SetXTitle("column");
1264  fhTopoClusterCase0[iSM]->SetYTitle("row");
1266 
1267  fhTopoClusterCase1[iSM] = new TH2F(Form("hTopoClusterCase1SM%d",iSM),
1268  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1269  21,-10.5,10.5, 21,-10.5,10.5);
1270  fhTopoClusterCase1[iSM]->SetXTitle("column");
1271  fhTopoClusterCase1[iSM]->SetYTitle("row");
1273 
1274  fhTopoClusterCase2[iSM] = new TH2F(Form("hTopoClusterCase2SM%d",iSM),
1275  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1276  21,-10.5,10.5, 21,-10.5,10.5);
1277  fhTopoClusterCase2[iSM]->SetXTitle("column");
1278  fhTopoClusterCase2[iSM]->SetYTitle("row");
1280 
1281  fhTopoClusterCase3[iSM] = new TH2F(Form("hTopoClusterCase3SM%d",iSM),
1282  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1283  21,-10.5,10.5, 21,-10.5,10.5);
1284  fhTopoClusterCase3[iSM]->SetXTitle("column");
1285  fhTopoClusterCase3[iSM]->SetYTitle("row");
1287 
1288  fhTopoClusterAmpCase0[iSM] = new TH2F(Form("hTopoClusterAmpCase0SM%d",iSM),
1289  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1290  21,-10.5,10.5, 21,-10.5,10.5);
1291  fhTopoClusterAmpCase0[iSM]->SetXTitle("column");
1292  fhTopoClusterAmpCase0[iSM]->SetYTitle("row");
1294 
1295  fhTopoClusterAmpCase1[iSM] = new TH2F(Form("hTopoClusterAmpCase1SM%d",iSM),
1296  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1297  21,-10.5,10.5, 21,-10.5,10.5);
1298  fhTopoClusterAmpCase1[iSM]->SetXTitle("column");
1299  fhTopoClusterAmpCase1[iSM]->SetYTitle("row");
1301 
1302  fhTopoClusterAmpCase2[iSM] = new TH2F(Form("hTopoClusterAmpCase2SM%d",iSM),
1303  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1304  21,-10.5,10.5, 21,-10.5,10.5);
1305  fhTopoClusterAmpCase2[iSM]->SetXTitle("column");
1306  fhTopoClusterAmpCase2[iSM]->SetYTitle("row");
1308 
1309  fhTopoClusterAmpCase3[iSM] = new TH2F(Form("hTopoClusterAmpCase3SM%d",iSM),
1310  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1311  21,-10.5,10.5, 21,-10.5,10.5);
1312  fhTopoClusterAmpCase3[iSM]->SetXTitle("column");
1313  fhTopoClusterAmpCase3[iSM]->SetYTitle("row");
1315 
1316 
1317  fhTopoClusterAmpFractionCase0[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase0SM%d",iSM),
1318  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1319  21,-10.5,10.5, 21,-10.5,10.5);
1320  fhTopoClusterAmpFractionCase0[iSM]->SetXTitle("column");
1321  fhTopoClusterAmpFractionCase0[iSM]->SetYTitle("row");
1323 
1324  fhTopoClusterAmpFractionCase1[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase1SM%d",iSM),
1325  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1326  21,-10.5,10.5, 21,-10.5,10.5);
1327  fhTopoClusterAmpFractionCase1[iSM]->SetXTitle("column");
1328  fhTopoClusterAmpFractionCase1[iSM]->SetYTitle("row");
1330 
1331  fhTopoClusterAmpFractionCase2[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase2SM%d",iSM),
1332  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1333  21,-10.5,10.5, 21,-10.5,10.5);
1334  fhTopoClusterAmpFractionCase2[iSM]->SetXTitle("column");
1335  fhTopoClusterAmpFractionCase2[iSM]->SetYTitle("row");
1337 
1338  fhTopoClusterAmpFractionCase3[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase3SM%d",iSM),
1339  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1340  21,-10.5,10.5, 21,-10.5,10.5);
1341  fhTopoClusterAmpFractionCase3[iSM]->SetXTitle("column");
1342  fhTopoClusterAmpFractionCase3[iSM]->SetYTitle("row");
1344  }
1345  }
1346 
1347  Int_t nchannels = nSM*AliEMCALGeoParams::fgkEMCALRows*AliEMCALGeoParams::fgkEMCALCols;
1348  for(Int_t ibc = 0; ibc < 4; ibc++)
1349  {
1350  fHTpi0[ibc] = new TH2F(Form("hTime_BC%d",ibc),Form("Time of cell clusters under pi0 peak, bunch crossing %d",ibc),
1351  nchannels,0,nchannels, fNTimeBins,fMinTimeBin,fMaxTimeBin);
1352  fOutputContainer->Add(fHTpi0[ibc]);
1353  fHTpi0[ibc]->SetYTitle("time (ns)");
1354  fHTpi0[ibc]->SetXTitle("abs. Id. ");
1355  }
1356 
1357  fhClusterTime = new TH2F("hClusterTime","cluster time vs E",100,0,10, 100,0,1000);
1358  fhClusterTime->SetXTitle("E (GeV)");
1359  fhClusterTime->SetYTitle("t (ns)");
1361 
1362  fhClusterPairDiffTime = new TH2F("hClusterPairDiffTime","cluster pair time difference vs E",100,0,10, 800,-400,400);
1363  fhClusterPairDiffTime->SetXTitle("E_{pair} (GeV)");
1364  fhClusterPairDiffTime->SetYTitle("#Delta t (ns)");
1366 
1367  for(Int_t iMod=0; iMod < nSM; iMod++)
1368  {
1369  for(Int_t iRow=0; iRow < AliEMCALGeoParams::fgkEMCALRows; iRow++)
1370  {
1371  for(Int_t iCol=0; iCol < AliEMCALGeoParams::fgkEMCALCols; iCol++)
1372  {
1373  snprintf(hname,buffersize, "%d_%d_%d",iMod,iCol,iRow);
1374  snprintf(htitl,buffersize, "Two-gamma inv. mass for super mod %d, cell(col,row)=(%d,%d)",iMod,iCol,iRow);
1375  fHmpi0[iMod][iCol][iRow] = new TH1F(hname,htitl,fNbins,fMinBin,fMaxBin);
1376  fHmpi0[iMod][iCol][iRow]->SetXTitle("mass (MeV/c^{2})");
1377  fOutputContainer->Add(fHmpi0[iMod][iCol][iRow]);
1378 
1379  if(fCellEnergyHiso)
1380  {
1381  snprintf(htitlEnergy,buffersize, "Energy for super mod %d, cell(col,row)=(%d,%d)",iMod,iCol,iRow);
1382  fhEnergy[iMod][iCol][iRow] = new TH1F(Form("E_%s",hname),htitlEnergy,fNEnergybins,fMinEnergyBin,fMaxEnergyBin);
1383  fhEnergy[iMod][iCol][iRow]->SetXTitle("E (GeV)");
1384  fOutputContainer->Add(fhEnergy[iMod][iCol][iRow]);
1385  }
1386  }
1387  }
1388  }
1389 
1390  fOutputContainer->SetOwner(kTRUE);
1391 
1392  PostData(1,fOutputContainer);
1393 
1394 // // cuts container, set in terminate but init and post here
1395 //
1396 // fCuts = new TList();
1397 //
1398 // fCuts ->SetOwner(kTRUE);
1399 //
1400 // PostData(2, fCuts);
1401 }
1402 
1408 //______________________________________________________________________________________________________
1410 {
1411  Int_t icol = ieta;
1412  if(iSM%2) icol+=48; // Impair SM, shift index [0-47] to [48-96]
1413 
1415  {
1416  for (Int_t imask = 0; imask < fNMaskCellColumns; imask++)
1417  {
1418  if(icol==fMaskCellColumns[imask]) return kTRUE;
1419  }
1420  }
1421 
1422  return kFALSE;
1423 }
1424 
1425 
1434 //______________________________________________________________________________________________________
1436 {
1437  Int_t icol = ieta;
1438  Int_t irow = iphi;
1439 
1440 // printf("SM = %i\n",iSupMod);
1441 // printf("icol = %i\n",icol);
1442 // printf("irow = %i\n",irow);
1443 
1444  if(iSupMod%2) //Odd SM
1445  {
1446  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1447  {
1448  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1449  {
1450 // printf("zone 1\n");
1451  return kTRUE;
1452  }
1453  }
1454  }
1455  else //Even SM
1456  {
1457  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1458  {
1459  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1460  {
1461 // printf("zone 1\n");
1462  return kTRUE;
1463  }
1464  }
1465  }
1466 
1467  return kFALSE;
1468 }
1469 
1470 
1479 //______________________________________________________________________________________________________
1481 {
1482  Int_t icol = ieta;
1483  Int_t irow = iphi;
1484 
1485 // printf("SM = %i\n",iSupMod);
1486 // printf("icol = %i\n",icol);
1487 // printf("irow = %i\n",irow);
1488 
1489  if(iSupMod%2) //Odd SM
1490  {
1491  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1492  {
1493  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1494  {
1495  return kFALSE;
1496  }
1497  else
1498  {
1499 // printf("zone 2\n");
1500  return kTRUE;
1501  }
1502  }
1503  }
1504  else //Even SM
1505  {
1506  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1507  {
1508  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1509  {
1510  return kFALSE;
1511  }
1512  else
1513  {
1514 // printf("zone 2\n");
1515  return kTRUE;
1516  }
1517  }
1518  }
1519 
1520  return kFALSE;
1521 }
1522 
1523 
1532 //______________________________________________________________________________________________________
1534 {
1535  Int_t icol = ieta;
1536  Int_t irow = iphi;
1537 
1538 // printf("SM = %i\n",iSupMod);
1539 // printf("icol = %i\n",icol);
1540 // printf("irow = %i\n",irow);
1541 
1542  if(iSupMod%2) //Odd SM
1543  {
1544  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1545  {
1546  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1547  {
1548 // printf("zone 3\n");
1549  return kTRUE;
1550  }
1551  }
1552  }
1553  else //Even SM
1554  {
1555  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1556  {
1557  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1558  {
1559 // printf("zone 3\n");
1560  return kTRUE;
1561  }
1562  }
1563  }
1564 
1565  return kFALSE;
1566 }
1567 
1568 
1577 //______________________________________________________________________________________________________
1579 {
1580  Int_t icol = ieta;
1581  Int_t irow = iphi;
1582 
1583 // printf("SM = %i\n",iSupMod);
1584 // printf("icol = %i\n",icol);
1585 // printf("irow = %i\n",irow);
1586 
1587  if(iSupMod%2) //Odd SM
1588  {
1589  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1590  {
1591  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1592  {
1593  return kFALSE;
1594  }
1595  else
1596  {
1597 // printf("zone 4\n");
1598  return kTRUE;
1599  }
1600  }
1601  }
1602  else //Even SM
1603  {
1604  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1605  {
1606  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1607  {
1608  return kFALSE;
1609  }
1610  else
1611  {
1612 // printf("zone 4\n");
1613  return kTRUE;
1614  }
1615  }
1616  }
1617 
1618  return kFALSE;
1619 }
1620 
1621 
1631 //______________________________________________________________________________________________________
1633 {
1634  Int_t icol = ieta;
1635  Int_t irow = iphi;
1636 
1637  //Center of ellipse
1638  Float_t col0 = 47/2;
1639  Float_t row0 = 23/2;
1640 
1641  //Parameters
1642  Float_t a = 3-col0;
1643  Float_t b = 2-row0;
1644 
1645  if(((icol-col0)*(icol-col0)) / (a*a) + ((irow-row0)*(irow-row0) / (b*b)) > 1)
1646  {
1647  return kTRUE;
1648  }
1649  else
1650  {
1651  return kFALSE;
1652  }
1653 }
1654 
1655 
1665 //______________________________________________________________________________________________________
1667 {
1668  Int_t icol = ieta;
1669  Int_t irow = iphi;
1670 
1671  //Center of ellipse
1672  Float_t col0 = 47/2;
1673  Float_t row0 = 23/2;
1674 
1675  //Paramters
1676  Float_t aLarge = 3-col0;
1677  Float_t bLarge = 2-row0;
1678  Float_t aSmall = 16-col0;
1679  Float_t bSmall = 7-row0;
1680 
1681  if((((icol-col0)*(icol-col0)) / (aLarge*aLarge) + ((irow-row0)*(irow-row0) / (bLarge*bLarge)) < 1) && (((icol-col0)*(icol-col0)) / (aSmall*aSmall) + ((irow-row0)*(irow-row0) / (bSmall*bSmall)) > 1))
1682  {
1683  return kTRUE;
1684  }
1685  else
1686  {
1687  return kFALSE;
1688  }
1689 }
1690 
1691 
1701 //______________________________________________________________________________________________________
1703 {
1704  Int_t icol = ieta;
1705  Int_t irow = iphi;
1706 
1707  //Center of ellipse
1708  Float_t col0 = 47/2;
1709  Float_t row0 = 23/2;
1710 
1711  //Paramters
1712  Float_t a = 16-col0;
1713  Float_t b = 7-row0;
1714 
1715  if(((icol-col0)*(icol-col0)) / (a*a) + ((irow-row0)*(irow-row0) / (b*b)) < 1)
1716  {
1717  return kTRUE;
1718  }
1719  else
1720  {
1721  return kFALSE;
1722  }
1723 
1724 }
1725 
1726 
1732 //__________________________________________________________________________
1734 {
1735  // Event selection
1736 
1737  if(fTriggerName!="")
1738  {
1739  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*> (InputEvent());
1740  AliAODEvent* aodevent = dynamic_cast<AliAODEvent*> (InputEvent());
1741 
1742  TString triggerClass = "";
1743  if (esdevent) triggerClass = esdevent->GetFiredTriggerClasses();
1744  else if(aodevent) triggerClass = aodevent->GetFiredTriggerClasses();
1745 
1746  AliDebug(1,Form("Event %d, FiredClass %s",
1747  (Int_t)Entry(),(((AliESDEvent*)InputEvent())->GetFiredTriggerClasses()).Data()));
1748 
1749  if(!triggerClass.Contains(fTriggerName))
1750  {
1751  AliDebug(1,"Reject event!");
1752  return;
1753  }
1754  else
1755  AliDebug(1,"Accept event!");
1756  }
1757 
1758  // Get the input event
1759 
1760  AliVEvent* event = 0;
1761  if(fFilteredInput) event = AODEvent();
1762  else event = InputEvent();
1763 
1764  if(!event)
1765  {
1766  AliWarning("Input event not available!");
1767  return;
1768  }
1769 
1770  // Centrality selection
1771 
1772  if ( fCheckCentrality )
1773  {
1774  AliMultSelection* multSelection = (AliMultSelection * ) event->FindListObject("MultSelection") ;
1775  if ( multSelection )
1776  {
1777  Float_t cent = multSelection->GetMultiplicityPercentile(fCentralityClass, kTRUE);
1778  fhCentrality->Fill(cent);
1779 
1780  AliDebug(1,Form("Centrality %f for class <%s>\n",cent,fCentralityClass.Data()));
1781 
1782  if ( cent < fCentMin || cent >= fCentMax ) return ;
1783 
1784  fhCentralitySelected->Fill(cent);
1785  }
1786  }
1787 
1788  AliDebug(1,Form("<<< %s: Event %d >>>",event->GetName(), (Int_t)Entry()));
1789 
1790  // Get the primary vertex
1791 
1792  event->GetPrimaryVertex()->GetXYZ(fVertex) ;
1793 
1794  AliDebug(1,Form("Vertex: (%.3f,%.3f,%.3f)",fVertex[0],fVertex[1],fVertex[2]));
1795 
1796  //Int_t runNum = aod->GetRunNumber();
1797  //if(DebugLevel() > 1) printf("Run number: %d\n",runNum);
1798 
1799  fhNEvents->Fill(0); //Count the events to be analyzed
1800 
1801  // Acccess once the geometry matrix and temperature corrections and calibration coefficients
1802  if(fhNEvents->GetEntries() == 1)
1803  {
1805 
1807 
1808 // InitEnergyCalibrationFactors();
1809  }
1810 
1811  //Get the list of clusters and cells
1812  fEMCALCells = event->GetEMCALCells();
1813 
1814  fCaloClustersArr = new TRefArray();
1815  event->GetEMCALClusters(fCaloClustersArr);
1816 
1817  AliDebug(1,Form("N CaloClusters: %d - N CaloCells %d",fCaloClustersArr->GetEntriesFast(), fEMCALCells->GetNumberOfCells()));
1818 
1819  // Apply non linearity, new calibration, T calibration to the clusters
1820  if( fCorrectClusters )
1821  CorrectClusters();
1822 
1823  FillHistograms();
1824 
1825  delete fCaloClustersArr;
1826 
1827  PostData(1,fOutputContainer);
1828 }
1829 
1832 //_____________________________________________________
1834 {
1835  printf("Cluster cuts: %2.2f < E < %2.2f GeV; number of cells > %d; Assymetry < %1.2f, pair time diff < %2.2f, %2.2f < t < %2.2f ns\n",
1837 
1838  printf("Group %d cells\n", fGroupNCells) ;
1839 
1840  printf("Cluster maximal cell away from border at least %d cells\n", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
1841 
1842  printf("Histograms: bins %d; energy range: %2.2f < E < %2.2f MeV\n",fNbins,fMinBin,fMaxBin) ;
1843 
1844  printf("Switchs:\n \t Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d, and their position? %d \n \t Mass per channel same SM clusters? %d\n",
1846 
1847  printf("OADB path : %s\n",fOADBFilePath .Data());
1848  printf("Calibration path : %s\n",fCalibFilePath.Data());
1849 
1850  printf("EMCAL Geometry name: < %s >, Load Matrices %d\n",fEMCALGeoName.Data(), fLoadMatrices) ;
1851 
1852  if(fLoadMatrices) { for(Int_t ism = 0; ism < AliEMCALGeoParams::fgkEMCALModules; ism++) if(fMatrix[ism]) fMatrix[ism]->Print() ; }
1853 }
1854 
1858 //_____________________________________________________________________
1860 {
1861  if(n > fNMaskCellColumns)
1862  {
1863  delete [] fMaskCellColumns ;
1864 
1865  fMaskCellColumns = new Int_t[n] ;
1866  }
1867 
1868  fNMaskCellColumns = n ;
1869 }
1870 
1875 //___________________________________________________________________________________
1877 {
1878  if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
1879  else AliWarning("Mask column not set, position larger than allocated set size first") ;
1880 }
1881 
1887 //___________________________________________________________________________________
1889 {
1890  Int_t iPos;
1891 
1892  if(icol%2 == 0)
1893  {
1894  if(irow%8 < 4)
1895  {
1896  iPos = 0;
1897  }
1898  else if(irow%8 < 8)
1899  {
1900  iPos = 2;
1901  }
1902  else iPos = -1;
1903 
1904  }
1905  else
1906  {
1907  if(irow%8 < 4)
1908  {
1909  iPos = 1;
1910  }
1911  else if(irow%8 < 8)
1912  {
1913  iPos = 3;
1914  }
1915  else iPos = -1;
1916  }
1917 
1918  return iPos;
1919 }
1920 
1923 //______________________________________________________________
1925 {
1926  AliDebug(1,"Not implemented");
1927 // const Int_t buffersize = 255;
1928 // char onePar[buffersize] ;
1929 
1930 // snprintf(onePar,buffersize, "Custer cuts: %2.2f < E < %2.2f GeV; %2.2f < Lambda0_2 < %2.2f GeV; min number of cells %d; Assymetry cut %1.2f, time1-time2 < %2.2f; %2.2f < T < %2.2f ns; %3.1f < Mass < %3.1f",
1931 // fEmin,fEmax, fL0min, fL0max, fMinNCells, fAsyCut, fDTimeCut, fTimeMin, fTimeMax, fInvMassCutMin, fInvMassCutMax) ;
1932 // fCuts->Add(new TObjString(onePar));
1933 // snprintf(onePar,buffersize, "Group %d cells;", fGroupNCells) ;
1934 // fCuts->Add(new TObjString(onePar));
1935 // snprintf(onePar,buffersize, "Cluster maximal cell away from border at least %d cells;", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
1936 // fCuts->Add(new TObjString(onePar));
1937 // snprintf(onePar,buffersize, "Histograms, Mass bins %d; energy range: %2.2f < E < %2.2f GeV;",fNbins,fMinBin,fMaxBin) ;
1938 // fCuts->Add(new TObjString(onePar));
1939 // snprintf(onePar,buffersize, "Histograms, Time bins %d; energy range: %2.2f < E < %2.2f GeV;",fNTimeBins,fMinTimeBin,fMaxTimeBin) ;
1940 // fCuts->Add(new TObjString(onePar));
1941 // snprintf(onePar,buffersize, "Switchs: Remove Bad Channels? %d; Use filtered input? %d; Correct Clusters? %d and their position? %d, Mass per channel same SM clusters? %d ",
1942 // fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fRecalPosition, fSameSM) ;
1943 // fCuts->Add(new TObjString(onePar));
1944 // snprintf(onePar,buffersize, "EMCAL Geometry name: < %s >, Load Matrices? %d",fEMCALGeoName.Data(),fLoadMatrices) ;
1945 // fCuts->Add(new TObjString(onePar));
1946 //
1947 // // Post Data
1948 // PostData(2, fCuts);
1949 }
1950 
Bool_t IsRunDepRecalibrationOn() const
TH2F * fHmggSM_Zone4[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 4.
Float_t fDTimeCut
Maximum difference between time of cluster pairs (ns).
TH2F * fHmggPairSameSectorSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules/2]
! Two-cluster invariant mass per Pair, mask clusters facing frames.
TGeoHMatrix * fMatrix[AliEMCALGeoParams::fgkEMCALModules]
Bool_t IsInZone3(Int_t iSupMod, Int_t ieta, Int_t iphi)
TH2F * fhClusterPairDiffTimeSameSide[AliEMCALGeoParams::fgkEMCALModules-2]
! Diference in time of clusters same side.
Bool_t IsInZone6(Int_t iSupMod, Int_t ieta, Int_t iphi)
Float_t fEBkgmin
Minimum cluster energy (GeV) for bkg shape study (only for high M02 clusters).
TH2F * fHmggSM_Zone3[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 3.
double Double_t
Definition: External.C:58
Int_t fNTimeBins
N time bins of invariant mass histograms.
Bool_t CheckCellFiducialRegion(const AliEMCALGeometry *geom, const AliVCluster *cluster, AliVCaloCells *cells)
TH2F * fhTowerDecayPhotonHit[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, number of times a decay photon hits...
Float_t fInvMassCutMax
Maximum mass cut for clusters to fill time or other histograms.
Definition: External.C:236
TH2F * fHAsymmetryPairSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster asymmetry vs pt per Pair,with mass close to pi0.
TH1F * fHmpi0[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]
< Two-cluster invariant mass assigned to each cell.
Bool_t IsInZone4(Int_t iSupMod, Int_t ieta, Int_t iphi)
TH1F * fhCentralitySelected
! Centrality selected events.
TString fImportGeometryFilePath
Path fo geometry.root file.
TH2F * fhTopoClusterAmpCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 0 cluster in noisy quartet
Bool_t fSameSM
Combine clusters in channels on same SM.
Bool_t fLoadMatrices
Matrices set from configuration, not get from geometry.root or from ESDs/AODs.
void SetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow, Double_t c=1)
AliEMCALRecoUtils * fRecoUtils
Access to reconstruction utilities.
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry pointer.
Int_t GetNumberOfCellsFromEMCALBorder() const
Float_t fMaxTimeBin
Maximum time bins of invariant mass histograms.
Bool_t fSelectOnlyPhotonsInDifferentSM
Select only pairs of photons that are not in the same SM.
Float_t fLogWeight
Logarithmic weight used in cluster recalibration.
Bool_t IsInZone7(Int_t iSupMod, Int_t ieta, Int_t iphi)
TH2F * fHAsymmetry
! Two-cluster asymmetry vs pt of pair, with mass close to pi0.
This task provides the input for the EMCal energy calibration with pi0 invariant mass analysis per ch...
Bool_t IsBadChannelsRemovalSwitchedOn() const
Float_t fMinTimeBin
Minimum time bins of invariant mass histograms.
Int_t GetParticleType() const
Bool_t IsInZone5(Int_t iSupMod, Int_t ieta, Int_t iphi)
Int_t FindPositionInNoisyQuartet(Int_t irow, Int_t icol, Int_t iSM)
TH2F * fHOpeningAngleDifferentSM
! Two-cluster opening angle vs pt of pair, each cluster in different SM, with mass close to pi0...
TH2F * fhClusterPairDiffTimeSameSM[AliEMCALGeoParams::fgkEMCALModules]
! Diference in time of clusters same SM.
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
TH2F * fHOpeningAngle
! Two-cluster opening angle vs pt of pair, with mass close to pi0.
TH2F * fhClusterTimeSM[AliEMCALGeoParams::fgkEMCALModules]
! Timing of clusters vs energy per SM.
TH2F * fHmggSM_Zone5[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 5.
TH2F * fHOpeningAngleSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster opening angle vs pt per SM,with mass close to pi0.
TLorentzVector fMomentum2
Cluster kinematics, temporal.
TH2F * fhTopoClusterAmpCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 2 cluster in noisy quartet
Float_t fInvMassCutMin
Minimum mass cut for clusters to fill time or other histograms.
Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM, Int_t iCol, Int_t iRow) const
TH2F * fhTopoClusterAmpCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 3 cluster in noisy quartet
Float_t fOpAnglemax
Maximum cluster opening angle for bkg shape study.
Float_t fMinEnergyBin
Minimum energy bins of cell energy histograms.
Bool_t IsInZone2(Int_t iSupMod, Int_t ieta, Int_t iphi)
int Int_t
Definition: External.C:63
Int_t fNEnergybins
N energy bins of cell energy histograms.
TH2F * fHAsymmetrySM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster asymmetry vs pt per SM,with mass close to pi0.
Definition: External.C:204
TString fCalibFilePath
Full path with file with energy calibration factors per channel from previous iteration.
Bool_t fCheckCentrality
Activate centrality selection.
void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *cluster)
float Float_t
Definition: External.C:68
TH2F * fHmggSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM.
TH2F * fhTowerDecayPhotonHitMaskFrame[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, number of times a decay photon hits...
TH2F * fhTopoClusterAmpCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 1 cluster in noisy quartet
TH2F * fhTopoClusterCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 2 cluster in noisy quartet
Bool_t fSelectOnlyCellSignalOutOfCollision
Select cells / clusters that are due to noise, i.e. signal in EMCal that happens not during collision...
TH2F * fHmggSM_Zone6[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 6.
TH2F * fHmgg
! Two-cluster invariant mass vs pt of pair.
TH2F * fHTpi0[4]
! Time of cell under pi0 mass, for 4 bunch crossings.
Float_t fEBkgmax
Maximum cluster energy (GeV) for bkg shape study (only for high M02 clusters).
AliAnalysisTaskEMCALPi0CalibSelection()
Default constructor. Arrays initialization is done here.
TH1F * fhEnergy[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows]
! Energy distribution for each cell.
Float_t fMinBin
Minimum mass bins of invariant mass histograms.
TH2F * fhTopoClusterAmpFractionCase2[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 2 cluster in noisy quartet
TH2F * fhTopoClusterCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 0 cluster in noisy quartet
Bool_t fRecalPosition
Switch on/off cluster position calculation, in case alignment matrices are not available.
TH2F * fhTopoClusterCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 1 cluster in noisy quartet
void RecalibrateClusterEnergy(const AliEMCALGeometry *geom, AliVCluster *cluster, AliVCaloCells *cells, Int_t bc=-1)
Float_t fMaxEnergyBin
Maximum energy bins of cell energy histograms.
TString fTriggerName
Trigger name must contain this name.
Bool_t fChangeBkgShape
Select clusters with nominal M02 cuts (fL0min,fL0max) plus high M02 clusters (fL0Bkgmin,fL0Bkgmax)
TH2F * fHmggDifferentSMMaskFrame
! Two-cluster invariant mass vs pt of pair, each cluster in different SM,mask clusters facing frames...
TH2F * fhTopoClusterAmpFractionCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 3 cluster in noisy quartet
TH2F * fhClusterPairDiffTime
! Diference in time of clusters.
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)
Int_t fNbins
N mass bins of invariant mass histograms.
TH2F * fHmggSM_Zone2[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 2.
Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom, AliVCaloCells *cells, Int_t bc=-1)
TH2F * fhClusterTime
! Timing of clusters vs energy.
void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells *cells, const AliVCluster *clu, Int_t &absId, Int_t &iSupMod, Int_t &ieta, Int_t &iphi, Bool_t &shared)
TLorentzVector fMomentum12
Cluster pair kinematics, temporal.
TH2F * fhTowerDecayPhotonAsymmetry[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, accumulated asymmetry in the tower by decay photo...
TH2F * fHmggPairSameSideSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules-2]
! Two-cluster invariant mass per Pair, mask clusters facing frames.
Bool_t fCorrectClusters
Correct clusters energy, position etc.
void UserCreateOutputObjects()
Create output container, init geometry.
void RecalculateClusterPosition(const AliEMCALGeometry *geom, AliVCaloCells *cells, AliVCluster *clu)
TH2F * fHmggSMMaskFrame[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM, mask clusters facing frames.
void Terminate(Option_t *opt)
Create cuts/param objects and publish to slot. Comment out for the moment.
TH2F * fhTowerDecayPhotonEnergy[AliEMCALGeoParams::fgkEMCALModules]
! Cells ordered in column/row for different module, accumulated energy in the tower by decay photons...
void RecalculateClusterPID(AliVCluster *cluster)
Float_t fL0Bkgmax
Maximum cluster L0 for bkg shape study.
TH2F * fHmggPairSameSideSM[AliEMCALGeoParams::fgkEMCALModules-2]
! Two-cluster invariant mass per Pair.
TH2F * fhTopoClusterAmpFractionCase0[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 0 cluster in noisy quartet
Float_t fL0Bkgmin
Minimum cluster L0 for bkg shape study.
TH2F * fhTopoClusterCase3[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude map for type 3 cluster in noisy quartet
Float_t fMaxBin
Maximum mass bins of invariant mass histograms.
TH2F * fHmggDifferentSM
! Two-cluster invariant mass vs pt of pair, each cluster in different SM.
TH2F * fhClusterPairDiffTimeSameSector[AliEMCALGeoParams::fgkEMCALModules/2]
! Diference in time of clusters same sector.
const char Option_t
Definition: External.C:48
TH1I * fhNEvents
! Number of events counter histogram.
TLorentzVector fMomentum1
Cluster kinematics, temporal.
TH2F * fHmggMaskFrame
! Two-cluster invariant mass vs pt of pair, mask clusters facing frames.
Bool_t fImportGeometryFromFile
Import geometry settings in geometry.root file.
Bool_t IsInZone1(Int_t iSupMod, Int_t ieta, Int_t iphi)
bool Bool_t
Definition: External.C:53
Float_t CorrectClusterEnergyLinearity(AliVCluster *clu)
TString fOADBFilePath
Default path $ALICE_PHYSICS/OADB/EMCAL, if needed change.
TH2F * fHOpeningAnglePairSM[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster opening angle vs pt per Pair,with mass close to pi0.
Bool_t ClusterContainsBadChannel(const AliEMCALGeometry *geom, const UShort_t *cellList, Int_t nCells)
Float_t fOpAnglemin
Minimum cluster opening angle for bkg shape study.
void SetEMCALChannelRecalibrationFactors(const TObjArray *map)
Bool_t fFilteredInput
Read input produced with filter.
TH2F * fHAsymmetryDifferentSM
! Two-cluster asymmetry vs pt of pair, each cluster in different SM, with mass close to pi0...
TH2F * fHmggSM_Zone1[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 1.
TH2F * fhTopoClusterAmpFractionCase1[AliEMCALGeoParams::fgkEMCALModules]
! Cell amplitude fraction map for type 1 cluster in noisy quartet
TH2F * fHmggSM_Zone7[AliEMCALGeoParams::fgkEMCALModules]
! Two-cluster invariant mass per SM in zone 7.
TH2F * fHmggPairSameSectorSM[AliEMCALGeoParams::fgkEMCALModules/2]
! Two-cluster invariant mass per Pair.