AliPhysics  764b6ea (764b6ea)
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 "AliEMCALGeometry.h"
25 #include "AliVCluster.h"
26 #include "AliVCaloCells.h"
27 #include "AliEMCALRecoUtils.h"
28 #include "AliOADBContainer.h"
29 
33 
36 //______________________________________________________________________________________________
39 fEMCALGeo(0x0), fLoadMatrices(0),
40 fEMCALGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM"),
41 fTriggerName("EMC"),
42 fRecoUtils(new AliEMCALRecoUtils),
43 fOADBFilePath(""), fCalibFilePath(""),
44 fCorrectClusters(kFALSE), fRecalPosition(kTRUE),
45 fCaloClustersArr(0x0), fEMCALCells(0x0),
46 //fCuts(0x0),
47 fOutputContainer(0x0),
48 fVertex(), fFilteredInput(kFALSE),
49 fImportGeometryFromFile(1), fImportGeometryFilePath(""),
50 fEmin(0.5), fEmax(15.),
51 fEBkgmin(0.5), fEBkgmax(15.),
52 fL0min(0.01), fL0max(0.5),
53 fL0Bkgmin(1.0), fL0Bkgmax(3.0),
54 fOpAnglemin(0.), fOpAnglemax(3.0),
55 fDTimeCut(100.), fTimeMax(1000000), fTimeMin(-1000000),
56 fAsyCut(1.), fMinNCells(2), fGroupNCells(0),
57 fLogWeight(4.5), fSameSM(kFALSE),
58 fNMaskCellColumns(11), fMaskCellColumns(0x0),
59 fSelectOnlyCellSignalOutOfCollision(0),
60 fCellEnergyHiso(0), fClusterTopology(0),
61 fSelectOnlyPhotonsInDifferentSM(0),
62 fChangeBkgShape(0),
63 fInvMassCutMin(110.), fInvMassCutMax(160.),
64 // Histograms binning
65 fNbins(300), fMinBin(0.), fMaxBin(300.),
66 fNTimeBins(1000), fMinTimeBin(0.), fMaxTimeBin(1000.),
67 fNEnergybins(1000), fMinEnergyBin(0.), fMaxEnergyBin(100.),
68 // Temporal
69 fMomentum1(), fMomentum2(), fMomentum12(),
70 // Histograms
71 fHmgg(0x0), fHmggDifferentSM(0x0),
72 fHmggMaskFrame(0x0), fHmggDifferentSMMaskFrame(0x0),
73 fHOpeningAngle(0x0), fHOpeningAngleDifferentSM(0x0),
74 fHAsymmetry(0x0), fHAsymmetryDifferentSM(0x0),
75 fhNEvents(0x0),
76 fhClusterTime(0x0), fhClusterPairDiffTime(0x0)
77 {
78  for(Int_t iMod=0; iMod < AliEMCALGeoParams::fgkEMCALModules; iMod++)
79  {
80  for(Int_t iX=0; iX<24; iX++)
81  {
82  for(Int_t iZ=0; iZ<48; iZ++)
83  {
84  fHmpi0[iMod][iZ][iX] = 0 ;
85  fhEnergy[iMod][iZ][iX] = 0 ;
86  }
87  }
88  }
89 
90  fVertex[0]=fVertex[1]=fVertex[2]=-1000;
91 
92  fHTpi0[0]= 0 ;
93  fHTpi0[1]= 0 ;
94  fHTpi0[2]= 0 ;
95  fHTpi0[3]= 0 ;
96 
98  fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
99  fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
100  fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
101  fMaskCellColumns[8] = 40+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[9] = 41+AliEMCALGeoParams::fgkEMCALCols;
102  fMaskCellColumns[10]= 42+AliEMCALGeoParams::fgkEMCALCols;
103 
104  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++)
105  {
106  fHmggPairSameSectorSM[iSMPair] = 0;
107  fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
109  }
110 
111  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++)
112  {
113  fHmggPairSameSideSM[iSMPair] = 0;
114  fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
115  fhClusterPairDiffTimeSameSide[iSMPair] = 0;
116  }
117 
118  for(Int_t iSM = 0; iSM < AliEMCALGeoParams::fgkEMCALModules; iSM++)
119  {
120  fHmggSM[iSM] = 0;
121  fHmggSM_Zone1[iSM] = 0;
122  fHmggSM_Zone2[iSM] = 0;
123  fHmggSM_Zone3[iSM] = 0;
124  fHmggSM_Zone4[iSM] = 0;
125  fHmggSM_Zone5[iSM] = 0;
126  fHmggSM_Zone6[iSM] = 0;
127  fHmggSM_Zone7[iSM] = 0;
128  fHmggSMMaskFrame[iSM] = 0;
129  fHOpeningAngleSM[iSM] = 0;
130  fHOpeningAnglePairSM[iSM] = 0;
131  fHAsymmetrySM[iSM] = 0;
132  fHAsymmetryPairSM[iSM] = 0;
133  fhTowerDecayPhotonHit[iSM] = 0;
134  fhTowerDecayPhotonEnergy[iSM] = 0;
137  fMatrix[iSM] = 0x0;
138  fhClusterTimeSM[iSM] = 0;
139  fhTopoClusterCase0[iSM] =0;
140  fhTopoClusterCase1[iSM] =0;
141  fhTopoClusterCase2[iSM] =0;
142  fhTopoClusterCase3[iSM] =0;
143  fhTopoClusterAmpCase0[iSM] =0;
144  fhTopoClusterAmpCase1[iSM] =0;
145  fhTopoClusterAmpCase2[iSM] =0;
146  fhTopoClusterAmpCase3[iSM] =0;
152  }
153 }
154 
160 //______________________________________________________________________________________________
162 AliAnalysisTaskSE(name),
163 fEMCALGeo(0x0), fLoadMatrices(0),
164 fEMCALGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM"),
165 fTriggerName("EMC"),
166 fRecoUtils(new AliEMCALRecoUtils),
168 fCorrectClusters(kFALSE), fRecalPosition(kTRUE),
169 fCaloClustersArr(0x0), fEMCALCells(0x0),
170 //fCuts(0x0),
171 fOutputContainer(0x0),
172 fVertex(), fFilteredInput(kFALSE),
174 fEmin(0.5), fEmax(15.),
175 fEBkgmin(0.5), fEBkgmax(15.),
176 fL0min(0.01), fL0max(0.5),
177 fL0Bkgmin(1.0), fL0Bkgmax(3.0),
178 fOpAnglemin(0.), fOpAnglemax(3.0),
179 fDTimeCut(100.), fTimeMax(1000000), fTimeMin(-1000000),
180 fAsyCut(1.), fMinNCells(2), fGroupNCells(0),
181 fLogWeight(4.5), fSameSM(kFALSE),
186 fChangeBkgShape(0),
187 fInvMassCutMin(110.), fInvMassCutMax(160.),
188 // Histograms binning
189 fNbins(300), fMinBin(0.), fMaxBin(300.),
190 fNTimeBins(1000), fMinTimeBin(0.), fMaxTimeBin(1000.),
191 fNEnergybins(1000), fMinEnergyBin(0.), fMaxEnergyBin(100.),
192 // Temporal
194 // Histograms
195 fHmgg(0x0), fHmggDifferentSM(0x0),
199 fhNEvents(0x0),
201 {
202  for(Int_t iMod=0; iMod < AliEMCALGeoParams::fgkEMCALModules; iMod++)
203  {
204  for(Int_t iX=0; iX<24; iX++)
205  {
206  for(Int_t iZ=0; iZ<48; iZ++)
207  {
208  fHmpi0[iMod][iZ][iX] = 0 ;
209  fhEnergy[iMod][iZ][iX] = 0 ;
210  }
211  }
212  }
213 
214  fVertex[0]=fVertex[1]=fVertex[2]=-1000;
215 
216  fHTpi0[0]= 0 ;
217  fHTpi0[1]= 0 ;
218  fHTpi0[2]= 0 ;
219  fHTpi0[3]= 0 ;
220 
222  fMaskCellColumns[0] = 6 ; fMaskCellColumns[1] = 7 ; fMaskCellColumns[2] = 8 ;
223  fMaskCellColumns[3] = 35; fMaskCellColumns[4] = 36; fMaskCellColumns[5] = 37;
224  fMaskCellColumns[6] = 12+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[7] = 13+AliEMCALGeoParams::fgkEMCALCols;
225  fMaskCellColumns[8] = 40+AliEMCALGeoParams::fgkEMCALCols; fMaskCellColumns[9] = 41+AliEMCALGeoParams::fgkEMCALCols;
226  fMaskCellColumns[10]= 42+AliEMCALGeoParams::fgkEMCALCols;
227 
228  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules/2; iSMPair++)
229  {
230  fHmggPairSameSectorSM[iSMPair] = 0;
231  fHmggPairSameSectorSMMaskFrame[iSMPair] = 0;
233  }
234 
235  for(Int_t iSMPair = 0; iSMPair < AliEMCALGeoParams::fgkEMCALModules-2; iSMPair++)
236  {
237  fHmggPairSameSideSM[iSMPair] = 0;
238  fHmggPairSameSideSMMaskFrame[iSMPair] = 0;
239  fhClusterPairDiffTimeSameSide[iSMPair] = 0;
240  }
241 
242  for(Int_t iSM = 0; iSM < AliEMCALGeoParams::fgkEMCALModules; iSM++)
243  {
244  fHmggSM[iSM] = 0;
245  fHmggSM_Zone1[iSM] = 0;
246  fHmggSM_Zone2[iSM] = 0;
247  fHmggSM_Zone3[iSM] = 0;
248  fHmggSM_Zone4[iSM] = 0;
249  fHmggSM_Zone5[iSM] = 0;
250  fHmggSM_Zone6[iSM] = 0;
251  fHmggSM_Zone7[iSM] = 0;
252  fHmggSMMaskFrame[iSM] = 0;
253  fHOpeningAngleSM[iSM] = 0;
254  fHOpeningAnglePairSM[iSM] = 0;
255  fHAsymmetrySM[iSM] = 0;
256  fHAsymmetryPairSM[iSM] = 0;
257  fhTowerDecayPhotonHit[iSM] = 0;
258  fhTowerDecayPhotonEnergy[iSM] = 0;
261  fMatrix[iSM] = 0x0;
262  fhClusterTimeSM[iSM] = 0;
263  fhTopoClusterCase0[iSM] =0;
264  fhTopoClusterCase1[iSM] =0;
265  fhTopoClusterCase2[iSM] =0;
266  fhTopoClusterCase3[iSM] =0;
267  fhTopoClusterAmpCase0[iSM] =0;
268  fhTopoClusterAmpCase1[iSM] =0;
269  fhTopoClusterAmpCase2[iSM] =0;
270  fhTopoClusterAmpCase3[iSM] =0;
276  }
277 
278  DefineOutput(1, TList::Class());
279 //DefineOutput(2, TList::Class()); // will contain cuts or local params
280 }
281 
284 //_____________________________________________________________________________
286 {
287  if(fOutputContainer)
288  {
289  fOutputContainer->Delete() ;
290  delete fOutputContainer ;
291  }
292 
293  if(fEMCALGeo) delete fEMCALGeo ;
294  if(fRecoUtils) delete fRecoUtils ;
295  if(fNMaskCellColumns) delete [] fMaskCellColumns;
296 }
297 
301 //____________________________________________________________
303 {
304  if(fRecoUtils->GetParticleType()!=AliEMCALRecoUtils::kPhoton)
305  AliFatal(Form("Wrong particle type for cluster position recalculation! = %d\n", fRecoUtils->GetParticleType()));
306 
307  AliDebug(1,Form("It will use fLogWeight %.3f",fLogWeight));
308 
309  Float_t pos[]={0,0,0};
310 
311  for(Int_t iClu=0; iClu < fCaloClustersArr->GetEntriesFast(); iClu++)
312  {
313  AliVCluster *c1 = (AliVCluster *) fCaloClustersArr->At(iClu);
314 
315  Float_t e1i = c1->E(); // cluster energy before correction
316  if(fChangeBkgShape && (((c1->GetM02() > fL0Bkgmin) && (c1->GetM02() < fL0Bkgmax)) && ((e1i < fEBkgmin) || (e1i > fEBkgmax)))) continue;
317  if(fChangeBkgShape && (((c1->GetM02() < fL0Bkgmin) || (c1->GetM02() > fL0Bkgmax)) && (e1i < fEmin))) continue;
318  else if (!fChangeBkgShape && e1i < fEmin) continue;
319  else if (e1i > fEmax) continue;
320 
321  else if (c1->GetNCells() < fMinNCells) continue;
322 
323  else if(fChangeBkgShape && (c1->GetM02() < fL0min || (c1->GetM02() > fL0max && c1->GetM02() < fL0Bkgmin) || c1->GetM02() > fL0Bkgmax)) continue;
324 
325  else if (!fChangeBkgShape && (c1->GetM02() < fL0min || c1->GetM02() > fL0max)) continue;
326 
327  if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
328 
329  if(DebugLevel() > 2)
330  {
331  AliInfo(Form("Std : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
332  c1->GetPosition(pos);
333  AliInfo(Form("Std : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]));
334  }
335 
336  // Correct cluster energy and position if requested, and not corrected previously, by default Off
337  if(fRecoUtils->IsRecalibrationOn())
338  {
339  fRecoUtils->RecalibrateClusterEnergy(fEMCALGeo, c1, fEMCALCells);
340  fRecoUtils->RecalculateClusterShowerShapeParameters(fEMCALGeo, fEMCALCells,c1);
341  fRecoUtils->RecalculateClusterPID(c1);
342  }
343 
344  AliDebug(2,Form("Energy: after recalibration %f",c1->E()));
345 
346  // Recalculate cluster position
347  if ( fRecalPosition ) fRecoUtils->RecalculateClusterPosition(fEMCALGeo, fEMCALCells,c1);
348 
349  // Correct Non-Linearity
350  c1->SetE(fRecoUtils->CorrectClusterEnergyLinearity(c1));
351 
352  AliDebug(2,Form("after linearity correction %f",c1->E()));
353 
354  // In case of MC analysis, to match resolution/calibration in real data
355  //c1->SetE(fRecoUtils->SmearClusterEnergy(c1)); // Not needed anymore
356 
357  AliDebug(2,Form("after smearing %f\n",c1->E()));
358 
359  if(DebugLevel() > 2)
360  {
361  AliInfo(Form("Cor : i %d, E %f, dispersion %f, m02 %f, m20 %f\n",c1->GetID(),c1->E(),c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
362  c1->GetPosition(pos);
363  AliInfo(Form("Cor : i %d, x %f, y %f, z %f\n",c1->GetID(), pos[0], pos[1], pos[2]));
364  }
365  } // cluster loop
366 }
367 
371 //__________________________________________________________
373 {
374  Int_t absId1 = -1;
375  Int_t iSupMod1 = -1;
376  Int_t iphi1 = -1;
377  Int_t ieta1 = -1;
378  Int_t absId2 = -1;
379  Int_t iSupMod2 = -1;
380  Int_t iphi2 = -1;
381  Int_t ieta2 = -1;
382  Bool_t shared = kFALSE;
383 
384  Float_t pos[] = {0,0,0};
385 
386  Int_t bc = InputEvent()->GetBunchCrossNumber();
387  Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
388 
389  Int_t nbClusterInTopoHisto[nSM];
390 
391  for(Int_t iSM = 0; iSM < nSM; iSM++)
392  {
393  nbClusterInTopoHisto[iSM] = 0;
394  }
395 
396  for(Int_t iClu=0; iClu<fCaloClustersArr->GetEntriesFast()-1; iClu++)
397  {
398  AliVCluster *c1 = (AliVCluster *) fCaloClustersArr->At(iClu);
399 
400  // Exclude bad channels
401  if(fRecoUtils->ClusterContainsBadChannel(fEMCALGeo, c1->GetCellsAbsId(), c1->GetNCells())) continue;
402 
403  Float_t e1i = c1->E(); // cluster energy before correction
404 
405  if(fChangeBkgShape && (((c1->GetM02() > fL0Bkgmin) && (c1->GetM02() < fL0Bkgmax)) && ((e1i < fEBkgmin) || (e1i > fEBkgmax)))) continue;
406  if(fChangeBkgShape && (((c1->GetM02() < fL0Bkgmin) || (c1->GetM02() > fL0Bkgmax)) && (e1i < fEmin))) continue;
407  else if (!fChangeBkgShape && e1i < fEmin) continue;
408  else if (e1i > fEmax) continue;
409 
410  else if (!fRecoUtils->IsGoodCluster(c1,fEMCALGeo,fEMCALCells,bc)) continue;
411 
412  else if (c1->GetNCells() < fMinNCells) continue;
413 
414  else if(fChangeBkgShape && (c1->GetM02() < fL0min || (c1->GetM02() > fL0max && c1->GetM02() < fL0Bkgmin) || c1->GetM02() > fL0Bkgmax)) continue;
415 
416  else if (!fChangeBkgShape && (c1->GetM02() < fL0min || c1->GetM02() > fL0max)) continue;
417 
418  if(DebugLevel() > 2)
419  {
420  AliInfo(Form("IMA : i %d, E %f, dispersion %f, m02 %f, m20 %f",c1->GetID(),e1i,c1->GetDispersion(),c1->GetM02(),c1->GetM20()));
421  c1->GetPosition(pos);
422  AliInfo(Form("IMA : i %d, x %f, y %f, z %f",c1->GetID(), pos[0], pos[1], pos[2]));
423  }
424 
425  fRecoUtils->GetMaxEnergyCell(fEMCALGeo, fEMCALCells,c1,absId1,iSupMod1,ieta1,iphi1,shared);
426 
427  c1->GetMomentum(fMomentum1,fVertex);
428 
429  // Check if cluster is in fidutial region, not too close to borders
430  Bool_t in1 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c1, fEMCALCells);
431 
432  // Clusters not facing frame structures
433  Bool_t mask1 = MaskFrameCluster(iSupMod1, ieta1);
434  //if(mask1) printf("Reject eta %d SM %d\n",ieta1, iSupMod1);
435 
436  Double_t time1 = c1->GetTOF()*1.e9;
437 
438  if(fSelectOnlyCellSignalOutOfCollision && ((time1 < fTimeMax) && (time1 > fTimeMin))) continue;
439  else if(!fSelectOnlyCellSignalOutOfCollision && (time1 > fTimeMax || time1 < fTimeMin)) continue;
440 
441  fhClusterTime ->Fill(c1->E(),time1);
442  fhClusterTimeSM[iSupMod1]->Fill(c1->E(),time1);
443 
444  if(fClusterTopology)
445  {
446  Int_t iPosInNoisyQuartet = FindPositionInNoisyQuartet(iphi1,ieta1,iSupMod1);
447  AliEMCALGeometry* geom = AliEMCALGeometry::GetInstance();
448 
449  for(Int_t iCell = 0; iCell < c1->GetNCells(); iCell++)
450  {
451  Int_t iSupMod = -1, iIeta =-1, iIphi =-1, iTower =-1, ietaCell =-1, iphiCell =-1;
452 
453  Int_t CellID = c1->GetCellsAbsId()[iCell];
454  geom->GetCellIndex(CellID,iSupMod,iTower,iIphi,iIeta);
455  geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi,iIeta,iphiCell,ietaCell);
456 // Float_t AmpFraction = c1->GetCellAmplitudeFraction(CellID);
457  Float_t amp = fEMCALCells->GetCellAmplitude(CellID);
458 
459  Float_t AmpFraction = amp / e1i;
460 
461  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));
462 
463  switch (iPosInNoisyQuartet) {
464  case 0:
465  fhTopoClusterCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
466  fhTopoClusterAmpCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
467  fhTopoClusterAmpFractionCase0[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
468  break;
469  case 1:
470  fhTopoClusterCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
471  fhTopoClusterAmpCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
472  fhTopoClusterAmpFractionCase1[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
473  break;
474  case 2:
475  fhTopoClusterCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
476  fhTopoClusterAmpCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
477  fhTopoClusterAmpFractionCase2[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
478  break;
479  case 3:
480  fhTopoClusterCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1);
481  fhTopoClusterAmpCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,amp);
482  fhTopoClusterAmpFractionCase3[iSupMod1]->Fill(ietaCell-ieta1,iphiCell-iphi1,AmpFraction);
483  break;
484  default:
485  break;
486  }
487 
488  if(amp && AmpFraction)
489  {
490  nbClusterInTopoHisto[iSupMod1] = nbClusterInTopoHisto[iSupMod1] + 1;
491  }
492  }
493  }
494 
495  // Combine cluster with other clusters and get the invariant mass
496  for (Int_t jClu=iClu+1; jClu < fCaloClustersArr->GetEntriesFast(); jClu++)
497  {
498  AliAODCaloCluster *c2 = (AliAODCaloCluster *) fCaloClustersArr->At(jClu);
499 
500  Float_t e2i = c2->E();
501  if(fChangeBkgShape && (((c2->GetM02() > fL0Bkgmin) && (c2->GetM02() < fL0Bkgmax)) && ((e2i < fEBkgmin) || (e2i > fEBkgmax)) && ((fMomentum1.Angle(fMomentum2.Vect()) < fOpAnglemin) || (fMomentum1.Angle(fMomentum2.Vect()) > fOpAnglemax)))) continue;
502  if(fChangeBkgShape && (((c2->GetM02() < fL0Bkgmin) || (c2->GetM02() > fL0Bkgmax)) && (e2i < fEmin))) continue;
503  else if (!fChangeBkgShape && e2i < fEmin) continue;
504  else if (e2i > fEmax) continue;
505 
506  else if (!fRecoUtils->IsGoodCluster(c2,fEMCALGeo,fEMCALCells,bc))continue;
507 
508  else if (c2->GetNCells() < fMinNCells) continue;
509 
510  else if(fChangeBkgShape && (c2->GetM02() < fL0min || (c2->GetM02() > fL0max && c2->GetM02() < fL0Bkgmin) || c2->GetM02() > fL0Bkgmax)) continue;
511 
512  else if (!fChangeBkgShape && (c2->GetM02() < fL0min || c2->GetM02() > fL0max)) continue;
513 
514  fRecoUtils->GetMaxEnergyCell(fEMCALGeo, fEMCALCells,c2,absId2,iSupMod2,ieta2,iphi2,shared);
515 
516  c2->GetMomentum(fMomentum2,fVertex);
517 
519  Float_t invmass = fMomentum12.M()*1000;
520 
521  //Asimetry cut
522  Float_t asym = TMath::Abs(fMomentum1.E()-fMomentum2.E())/(fMomentum1.E()+fMomentum2.E());
523 
524  if(asym > fAsyCut) continue;
525 
526  //Time cut
527  Double_t time2 = c2->GetTOF()*1.e9;
528 
529  if(fSelectOnlyCellSignalOutOfCollision && ((time2 < fTimeMax) && (time2 > fTimeMin))) continue;
530  else if(!fSelectOnlyCellSignalOutOfCollision && (time2 > fTimeMax || time2 < fTimeMin)) continue;
531 
532  fhClusterPairDiffTime->Fill(fMomentum12.E(),time1-time2);
533  if(TMath::Abs(time1-time2) > fDTimeCut) continue;
534 
535  if(invmass < fMaxBin && invmass > fMinBin )
536  {
537  //Check if cluster is in fidutial region, not too close to borders
538  Bool_t in2 = fRecoUtils->CheckCellFiducialRegion(fEMCALGeo, c2, fEMCALCells);
539 
540  // Clusters not facing frame structures
541  Bool_t mask2 = MaskFrameCluster(iSupMod2, ieta2);
542  //if(mask2) printf("Reject eta %d SM %d\n",ieta2, iSupMod2);
543 
544 
545 
546  if(in1 && in2)
547  {
548  fHmgg->Fill(invmass,fMomentum12.Pt());
549 
550  if(iSupMod1==iSupMod2)
551  {
552  fHmggSM[iSupMod1]->Fill(invmass,fMomentum12.Pt());
553  fhClusterPairDiffTimeSameSM[iSupMod1]->Fill(fMomentum12.E(),time1-time2);
554 
555  //Is in zone number i
556  Bool_t zone1 = IsInZone1(iSupMod1,ieta1,iphi1);
557  Bool_t zone2 = IsInZone2(iSupMod1,ieta1,iphi1);
558  Bool_t zone3 = IsInZone3(iSupMod1,ieta1,iphi1);
559  Bool_t zone4 = IsInZone4(iSupMod1,ieta1,iphi1);
560  Bool_t zone5 = IsInZone5(iSupMod1,ieta1,iphi1);
561  Bool_t zone6 = IsInZone6(iSupMod1,ieta1,iphi1);
562  Bool_t zone7 = IsInZone7(iSupMod1,ieta1,iphi1);
563 
564 
565  if(zone1) fHmggSM_Zone1[iSupMod1]->Fill(invmass,fMomentum12.Pt());
566  if(zone2) fHmggSM_Zone2[iSupMod1]->Fill(invmass,fMomentum12.Pt());
567  if(zone3) fHmggSM_Zone3[iSupMod1]->Fill(invmass,fMomentum12.Pt());
568  if(zone4) fHmggSM_Zone4[iSupMod1]->Fill(invmass,fMomentum12.Pt());
569  if(zone5) fHmggSM_Zone5[iSupMod1]->Fill(invmass,fMomentum12.Pt());
570  if(zone6) fHmggSM_Zone6[iSupMod1]->Fill(invmass,fMomentum12.Pt());
571  if(zone7) fHmggSM_Zone7[iSupMod1]->Fill(invmass,fMomentum12.Pt());
572 
573  }
574  else
575  fHmggDifferentSM ->Fill(invmass,fMomentum12.Pt());
576 
577  // Same sector
578  Int_t j=0;
579  for(Int_t i = 0; i < nSM/2; i++)
580  {
581  j=2*i;
582  if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j))
583  {
584  fHmggPairSameSectorSM[i]->Fill(invmass,fMomentum12.Pt());
585  fhClusterPairDiffTimeSameSector[i]->Fill(fMomentum12.E(),time1-time2);
586  }
587  }
588 
589  // Same side
590  for(Int_t i = 0; i < nSM-2; i++)
591  {
592  if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i))
593  {
594  fHmggPairSameSideSM[i]->Fill(invmass,fMomentum12.Pt());
595  fhClusterPairDiffTimeSameSide[i]->Fill(fMomentum12.E(),time1-time2);
596  }
597  }
598 
599 
600  if(!mask1 && !mask2)
601  {
602  fHmggMaskFrame->Fill(invmass,fMomentum12.Pt());
603 
604  if(iSupMod1==iSupMod2) fHmggSMMaskFrame[iSupMod1]->Fill(invmass,fMomentum12.Pt());
605  else fHmggDifferentSMMaskFrame ->Fill(invmass,fMomentum12.Pt());
606 
607  // Same sector
608  j=0;
609  for(Int_t i = 0; i < nSM/2; i++)
610  {
611  j=2*i;
612  if((iSupMod1==j && iSupMod2==j+1) || (iSupMod1==j+1 && iSupMod2==j)) fHmggPairSameSectorSMMaskFrame[i]->Fill(invmass,fMomentum12.Pt());
613  }
614 
615  // Same side
616  for(Int_t i = 0; i < nSM-2; i++)
617  {
618  if((iSupMod1==i && iSupMod2==i+2) || (iSupMod1==i+2 && iSupMod2==i)) fHmggPairSameSideSMMaskFrame[i]->Fill(invmass,fMomentum12.Pt());
619  }
620 
621  }// Pair not facing frame
622 
623  if(invmass > fInvMassCutMin && invmass < fInvMassCutMax) //restrict to clusters really close to pi0 peak
624  {
625 
626  // Check time of cells in both clusters, and fill time histogram
627  for(Int_t icell = 0; icell < c1->GetNCells(); icell++)
628  {
629  Int_t absID = c1->GetCellAbsId(icell);
630  fHTpi0[bc%4]->Fill(absID, fEMCALCells->GetCellTime(absID)*1.e9);
631  }
632 
633  for(Int_t icell = 0; icell < c2->GetNCells(); icell++)
634  {
635  Int_t absID = c2->GetCellAbsId(icell);
636  fHTpi0[bc%4]->Fill(absID, fEMCALCells->GetCellTime(absID)*1.e9);
637  }
638 
639  //Opening angle of 2 photons
640  Float_t opangle = fMomentum1.Angle(fMomentum2.Vect())*TMath::RadToDeg();
641  //printf("*******>>>>>>>> In PEAK pt %f, angle %f \n",fMomentum12.Pt(),opangle);
642 
643 
644  fHOpeningAngle ->Fill(opangle,fMomentum12.Pt());
645  fHAsymmetry ->Fill(asym,fMomentum12.Pt());
646 
647  if(iSupMod1==iSupMod2)
648  {
649  fHOpeningAngleSM[iSupMod1] ->Fill(opangle,fMomentum12.Pt());
650  fHAsymmetrySM[iSupMod1] ->Fill(asym,fMomentum12.Pt());
651  }
652  else
653  {
654  fHOpeningAngleDifferentSM ->Fill(opangle,fMomentum12.Pt());
655  fHAsymmetryDifferentSM ->Fill(asym,fMomentum12.Pt());
656  }
657 
658  if((iSupMod1==0 && iSupMod2==2) || (iSupMod1==2 && iSupMod2==0))
659  {
660  fHOpeningAnglePairSM[0] ->Fill(opangle,fMomentum12.Pt());
661  fHAsymmetryPairSM[0] ->Fill(asym,fMomentum12.Pt());
662 
663  }
664  if((iSupMod1==1 && iSupMod2==3) || (iSupMod1==3 && iSupMod2==1))
665  {
666  fHOpeningAnglePairSM[1] ->Fill(opangle,fMomentum12.Pt());
667  fHAsymmetryPairSM[1] ->Fill(asym,fMomentum12.Pt());
668  }
669 
670  if((iSupMod1==0 && iSupMod2==1) || (iSupMod1==1 && iSupMod2==0))
671  {
672  fHOpeningAnglePairSM[2] ->Fill(opangle,fMomentum12.Pt());
673  fHAsymmetryPairSM[2] ->Fill(asym,fMomentum12.Pt());
674  }
675  if((iSupMod1==2 && iSupMod2==3) || (iSupMod1==3 && iSupMod2==2))
676  {
677  fHOpeningAnglePairSM[3] ->Fill(opangle,fMomentum12.Pt());
678  fHAsymmetryPairSM[3] ->Fill(asym,fMomentum12.Pt());
679  }
680 
681  }// pair in 100 < mass < 160
682 
683  }//in acceptance cuts
684 
685  //In case of filling only channels with second cluster in same SM
686  if(fSameSM && iSupMod1!=iSupMod2) continue;
687  if(fSelectOnlyPhotonsInDifferentSM && (iSupMod1 == iSupMod2)) continue;
688 
689  if (fGroupNCells == 0)
690  {
691  fHmpi0[iSupMod1][ieta1][iphi1]->Fill(invmass);
692  fHmpi0[iSupMod2][ieta2][iphi2]->Fill(invmass);
693 
694  if (fCellEnergyHiso) fhEnergy[iSupMod1][ieta1][iphi1]->Fill(fMomentum1.E());
695  if (fCellEnergyHiso) fhEnergy[iSupMod2][ieta2][iphi2]->Fill(fMomentum2.E());
696 
697  if(invmass > fInvMassCutMin && invmass < fInvMassCutMax)//restrict to clusters really close to pi0 peak
698  {
699  fhTowerDecayPhotonHit [iSupMod1]->Fill(ieta1,iphi1);
700  fhTowerDecayPhotonEnergy [iSupMod1]->Fill(ieta1,iphi1,fMomentum1.E());
701  fhTowerDecayPhotonAsymmetry[iSupMod1]->Fill(ieta1,iphi1,asym);
702 
703  fhTowerDecayPhotonHit [iSupMod2]->Fill(ieta2,iphi2);
704  fhTowerDecayPhotonEnergy [iSupMod2]->Fill(ieta2,iphi2,fMomentum2.E());
705  fhTowerDecayPhotonAsymmetry[iSupMod2]->Fill(ieta2,iphi2,asym);
706 
707  if(!mask1)fhTowerDecayPhotonHitMaskFrame[iSupMod1]->Fill(ieta1,iphi1);
708  if(!mask2)fhTowerDecayPhotonHitMaskFrame[iSupMod2]->Fill(ieta2,iphi2);
709 
710  }// pair in mass of pi0
711  }
712  else
713  {
714  //printf("Regroup N %d, eta1 %d, phi1 %d, eta2 %d, phi2 %d \n",fGroupNCells, ieta1, iphi1, ieta2, iphi2);
715  for (Int_t i = -fGroupNCells; i < fGroupNCells+1; i++)
716  {
717  for (Int_t j = -fGroupNCells; j < fGroupNCells+1; j++)
718  {
719  Int_t absId11 = fEMCALGeo->GetAbsCellIdFromCellIndexes(iSupMod1, iphi1+j, ieta1+i);
720  Int_t absId22 = fEMCALGeo->GetAbsCellIdFromCellIndexes(iSupMod2, iphi2+j, ieta2+i);
721 
722  Bool_t ok1 = kFALSE;
723  Bool_t ok2 = kFALSE;
724 
725  for(Int_t icell = 0; icell < c1->GetNCells(); icell++)
726  {
727  if(c1->GetCellsAbsId()[icell] == absId11) ok1=kTRUE;
728  }
729 
730  for(Int_t icell = 0; icell < c2->GetNCells(); icell++)
731  {
732  if(c2->GetCellsAbsId()[icell] == absId22) ok2=kTRUE;
733  }
734 
735  if(ok1 && (ieta1+i >= 0) && (iphi1+j >= 0) && (ieta1+i < 48) && (iphi1+j < 24))
736  {
737  fHmpi0[iSupMod1][ieta1+i][iphi1+j]->Fill(invmass);
738  if(fCellEnergyHiso) fhEnergy[iSupMod1][ieta1+i][iphi1+j]->Fill(fMomentum1.E());
739  }
740 
741  if(ok2 && (ieta2+i >= 0) && (iphi2+j >= 0) && (ieta2+i < 48) && (iphi2+j < 24))
742  {
743  fHmpi0[iSupMod2][ieta2+i][iphi2+j]->Fill(invmass);
744  if(fCellEnergyHiso) fhEnergy[iSupMod2][ieta2+i][iphi2+j]->Fill(fMomentum2.E());
745  }
746  }// j loop
747  }//i loop
748  }//group cells
749 
750  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",
751  iSupMod1,iphi1,ieta1,iSupMod2,iphi2,ieta2,fMomentum12.M(),e1i,c1->E(),e2i,c2->E()));
752  }
753  }
754  } // end of loop over EMCAL clusters
755 
756  for(Int_t iSM = 0; iSM < nSM; iSM++)
757  {
758  AliDebug(2,Form("nbClusterInTopo = %i\n",nbClusterInTopoHisto[iSM]));
759 
760  if(nbClusterInTopoHisto[iSM] == 0) continue;
761 
762  fhTopoClusterAmpCase0[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
763  fhTopoClusterAmpFractionCase0[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
764 
765  fhTopoClusterAmpCase1[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
766  fhTopoClusterAmpFractionCase1[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
767 
768  fhTopoClusterAmpCase2[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
769  fhTopoClusterAmpFractionCase2[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
770 
771  fhTopoClusterAmpCase3[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
772  fhTopoClusterAmpFractionCase3[iSM]->Scale(1./nbClusterInTopoHisto[iSM]);
773  }
774 
775 }
776 
777 
782 //______________________________________________________________________
784 {
785  if ( !fRecoUtils->IsRecalibrationOn() || fCalibFilePath == "" ) return ;
786 
787  if(!fEMCALGeo)fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
788 
789  TFile * calibFactorsFile = TFile::Open(fCalibFilePath.Data());
790 
791  if ( !calibFactorsFile ) AliFatal("Cannot recover the calibration factors");
792 
793  for(Int_t ism = 0; ism < fEMCALGeo->GetNumberOfSuperModules(); ism++)
794  {
795  TH2F * histo = (TH2F*) calibFactorsFile->Get(Form("EMCALRecalFactors_SM%d",ism));
796  printf("In AliAnalysisTaskEMCALPi0CalibSelection::InitEnergyCalibrationFactors \n ---Recover calibration factor for : EMCALRecalFactors_SM%d %p\n",ism,histo);
797 
798  if ( histo )
799  fRecoUtils->SetEMCALChannelRecalibrationFactors(ism,histo);
800  else
801  AliWarning(Form("Null histogram with calibration factors for SM%d, 1 will be used for the full SM!",ism));
802  }
803 }
804 
808 //________________________________________________________________
810 {
811  Int_t runnumber = InputEvent()->GetRunNumber() ;
812 
813  //
814  // Load default geo matrices if requested
815  if(fImportGeometryFromFile && !gGeoManager)
816  {
817  if(fImportGeometryFilePath=="") // If not specified, set location depending on run number
818  {
819  // "$ALICE_ROOT/EVE/alice-data/default_geo.root"
820  if (runnumber < 140000) fImportGeometryFilePath = "$ALICE_PHYSICS/OADB/EMCAL/geometry_2010.root";
821  else if(runnumber < 171000) fImportGeometryFilePath = "$ALICE_PHYSICS/OADB/EMCAL/geometry_2011.root";
822  else if(runnumber < 198000) fImportGeometryFilePath = "$ALICE_PHYSICS/OADB/EMCAL/geometry_2012.root"; // 2012-2013
823  else fImportGeometryFilePath = "$ALICE_PHYSICS/OADB/EMCAL/geometry_2015.root"; // >= 2015
824  }
825 
826  AliInfo(Form("Import %s",fImportGeometryFilePath.Data()));
827 
828  TGeoManager::Import(fImportGeometryFilePath) ; // default need file "geometry.root" in local dir!!!!
829  }
830 
831  //
832  if(fLoadMatrices)
833  {
834  AliInfo("Load user defined EMCAL geometry matrices");
835  // OADB if available
836  AliOADBContainer emcGeoMat("AliEMCALgeo");
837 
838  if(fOADBFilePath=="") fOADBFilePath = "$ALICE_PHYSICS/OADB/EMCAL" ;
839 
840  emcGeoMat.InitFromFile(Form("%s/EMCALlocal2master.root",fOADBFilePath.Data()),"AliEMCALgeo");
841 
842  TObjArray *matEMCAL=(TObjArray*)emcGeoMat.GetObject(runnumber,"EmcalMatrices");
843 
844  for(Int_t mod = 0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
845  {
846  if (!fMatrix[mod]) // Get it from OADB
847  {
848  AliDebug(1,Form("EMCAL matrices SM %d, %p",mod,((TGeoHMatrix*) matEMCAL->At(mod))));
849  //((TGeoHMatrix*) matEMCAL->At(mod))->Print();
850 
851  fMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod) ;
852  }
853 
854  if(fMatrix[mod])
855  {
856  if(DebugLevel() > 1)
857  fMatrix[mod]->Print();
858 
859  fEMCALGeo->SetMisalMatrix(fMatrix[mod],mod) ;
860  }
861  else if(gGeoManager)
862  {
863  AliWarning(Form("Set matrix for SM %d from gGeoManager",mod));
864  fEMCALGeo->SetMisalMatrix(fEMCALGeo->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
865  }
866  else
867  {
868  AliError(Form("Alignment matrix for SM %d is not available",mod));
869  }
870  }//SM loop
871  }//Load matrices
872  else if(!gGeoManager)
873  {
874  AliInfo("Get geo matrices from data");
875  //Still not implemented in AOD, just a workaround to be able to work at least with ESDs
876  if(!strcmp(InputEvent()->GetName(),"AliAODEvent"))
877  {
878  AliWarning("Use ideal geometry, values geometry matrix not kept in AODs");
879  }//AOD
880  else
881  {
882  AliDebug(1,"AliAnalysisTaskEMCALClusterize Load Misaligned matrices");
883 
884  for(Int_t mod=0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
885  {
886  if(InputEvent()->GetEMCALMatrix(mod))
887  {
888  if(DebugLevel() > 1)
889  InputEvent()->GetEMCALMatrix(mod)->Print();
890 
891  fEMCALGeo->SetMisalMatrix(InputEvent()->GetEMCALMatrix(mod),mod) ;
892  }
893 
894  }
895  }// ESD
896  }// Load matrices from Data
897  else if(gGeoManager) // Load default matrices
898  {
899  for(Int_t mod = 0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
900  {
901  AliWarning(Form("Set matrix for SM %d from gGeoManager",mod));
902  fEMCALGeo->SetMisalMatrix(fEMCALGeo->GetMatrixForSuperModuleFromGeoManager(mod),mod) ;
903  }
904  } // gGeoManager matrices
905 
906 }
907 
911 //______________________________________________________________________
913 {
914  if(!fRecoUtils->IsRunDepRecalibrationOn()) return;
915 
916  AliOADBContainer *contRFTD=new AliOADBContainer("");
917 
918  contRFTD->InitFromFile(Form("%s/EMCALTemperatureCorrCalib.root",fOADBFilePath.Data()),"AliEMCALRunDepTempCalibCorrections");
919 
920  Int_t runnumber = InputEvent()->GetRunNumber() ;
921 
922  TH1S *htd=(TH1S*)contRFTD->GetObject(runnumber);
923 
924  //If it did not exist for this run, get closes one
925  if (!htd)
926  {
927  AliWarning(Form("No TemperatureCorrCalib Objects for run: %d",runnumber));
928 
929  // let's get the closest runnumber instead then..
930  Int_t lower = 0;
931  Int_t ic = 0;
932  Int_t maxEntry = contRFTD->GetNumberOfEntries();
933 
934  while ( (ic < maxEntry) && (contRFTD->UpperLimit(ic) < runnumber) )
935  {
936  lower = ic;
937  ic++;
938  }
939 
940  Int_t closest = lower;
941  if ( (ic<maxEntry) &&
942  (contRFTD->LowerLimit(ic)-runnumber) < (runnumber - contRFTD->UpperLimit(lower)) )
943  {
944  closest = ic;
945  }
946 
947  AliWarning(Form("TemperatureCorrCalib Objects found closest id %d from run: %d",
948  closest, contRFTD->LowerLimit(closest)));
949 
950  htd = (TH1S*) contRFTD->GetObjectByIndex(closest);
951  }
952 
953  // Fill parameters
954  if(htd)
955  {
956  AliInfo("Recalibrate (Temperature) EMCAL");
957 
958  Int_t nSM = fEMCALGeo->GetNumberOfSuperModules();
959 
960  for (Int_t ism = 0; ism < nSM; ++ism)
961  {
962  for (Int_t icol = 0; icol < 48; ++icol)
963  {
964  for (Int_t irow = 0; irow < 24; ++irow)
965  {
966  Float_t factor = fRecoUtils->GetEMCALChannelRecalibrationFactor(ism,icol,irow);
967 
968  Int_t absID = fEMCALGeo->GetAbsCellIdFromCellIndexes(ism, irow, icol); // original calibration factor
969 
970  AliDebug(3,Form(" ism %d, icol %d, irow %d,absID %d - Calib factor %1.5f - ",ism, icol, irow, absID, factor));
971 
972  factor *= htd->GetBinContent(absID) / 10000. ; // correction dependent on T
973 
974  fRecoUtils->SetEMCALChannelRecalibrationFactor(ism,icol,irow,factor);
975 
976  AliDebug(3,Form("T factor %1.5f - final factor %1.5f",
977  htd->GetBinContent(absID) / 10000.,
978  fRecoUtils->GetEMCALChannelRecalibrationFactor(ism,icol,irow)));
979  } // columns
980  } // rows
981  } // SM loop
982  }
983  else AliInfo("Do NOT recalibrate EMCAL with T variations, no params TH1");
984 
985  delete contRFTD;
986 }
987 
988 
991 //___________________________________________________________________
993 {
994  if(!fEMCALGeo)fEMCALGeo = AliEMCALGeometry::GetInstance(fEMCALGeoName) ;
995  Int_t nSM = (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules();
996 
997  fOutputContainer = new TList();
998  const Int_t buffersize = 255;
999  char hname[buffersize], htitl[buffersize], htitlEnergy[buffersize];
1000 
1001  fhNEvents = new TH1I("hNEvents", "Number of analyzed events" , 1 , 0 , 1 ) ;
1003 
1004  fHmgg = new TH2F("hmgg","2-cluster invariant mass",fNbins,fMinBin,fMaxBin,100,0,10);
1005  fHmgg->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1006  fHmgg->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1007  fOutputContainer->Add(fHmgg);
1008 
1009  fHmggDifferentSM = new TH2F("hmggDifferentSM","2-cluster invariant mass, different SM",fNbins,fMinBin,fMaxBin,100,0,10);
1010  fHmggDifferentSM->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1011  fHmggDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1013 
1014  fHOpeningAngle = new TH2F("hopang","2-cluster opening angle",100,0.,50.,100,0,10);
1015  fHOpeningAngle->SetXTitle("#alpha_{#gamma #gamma}");
1016  fHOpeningAngle->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1018 
1019  fHOpeningAngleDifferentSM = new TH2F("hopangDifferentSM","2-cluster opening angle, different SM",100,0,50.,100,0,10);
1020  fHOpeningAngleDifferentSM->SetXTitle("#alpha_{#gamma #gamma}");
1021  fHOpeningAngleDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1023 
1024  fHAsymmetry = new TH2F("hasym","2-cluster opening angle",100,0.,1.,100,0,10);
1025  fHAsymmetry->SetXTitle("a");
1026  fHAsymmetry->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1028 
1029  fHAsymmetryDifferentSM = new TH2F("hasymDifferentSM","2-cluster opening angle, different SM",100,0,1.,100,0,10);
1030  fHAsymmetryDifferentSM->SetXTitle("a");
1031  fHAsymmetryDifferentSM->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1033 
1034  //TString pairname[] = {"A side (0-2)", "C side (1-3)","Row 0 (0-1)", "Row 1 (2-3)"};
1035 
1036  fHmggMaskFrame = new TH2F("hmggMaskFrame","2-cluster invariant mass, frame masked",fNbins,fMinBin,fMaxBin,100,0,10);
1037  fHmggMaskFrame->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1038  fHmggMaskFrame->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1040 
1041  fHmggDifferentSMMaskFrame = new TH2F("hmggDifferentSMMaskFrame","2-cluster invariant mass, different SM, frame masked",
1042  fNbins,fMinBin,fMaxBin,100,0,10);
1043  fHmggDifferentSMMaskFrame->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1044  fHmggDifferentSMMaskFrame->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1046 
1047  for(Int_t iSM = 0; iSM < nSM; iSM++)
1048  {
1049  snprintf(hname, buffersize, "hmgg_SM%d",iSM);
1050  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d",iSM);
1051  fHmggSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1052  fHmggSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1053  fHmggSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1054  fOutputContainer->Add(fHmggSM[iSM]);
1055 
1056  snprintf(hname, buffersize, "hmgg_SM%d_MaskFrame",iSM);
1057  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d",iSM);
1058  fHmggSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1059  fHmggSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1060  fHmggSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1062 
1063  snprintf(hname, buffersize, "hmgg_SM%d_Zone1",iSM);
1064  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 1",iSM);
1065  fHmggSM_Zone1[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1066  fHmggSM_Zone1[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1067  fHmggSM_Zone1[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1068  fOutputContainer->Add(fHmggSM_Zone1[iSM]);
1069 
1070  snprintf(hname, buffersize, "hmgg_SM%d_Zone2",iSM);
1071  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 2",iSM);
1072  fHmggSM_Zone2[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1073  fHmggSM_Zone2[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1074  fHmggSM_Zone2[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1075  fOutputContainer->Add(fHmggSM_Zone2[iSM]);
1076 
1077  snprintf(hname, buffersize, "hmgg_SM%d_Zone3",iSM);
1078  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 3",iSM);
1079  fHmggSM_Zone3[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1080  fHmggSM_Zone3[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1081  fHmggSM_Zone3[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1082  fOutputContainer->Add(fHmggSM_Zone3[iSM]);
1083 
1084  snprintf(hname, buffersize, "hmgg_SM%d_Zone4",iSM);
1085  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 4",iSM);
1086  fHmggSM_Zone4[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1087  fHmggSM_Zone4[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1088  fHmggSM_Zone4[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1089  fOutputContainer->Add(fHmggSM_Zone4[iSM]);
1090 
1091  snprintf(hname, buffersize, "hmgg_SM%d_Zone5",iSM);
1092  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 5",iSM);
1093  fHmggSM_Zone5[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1094  fHmggSM_Zone5[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1095  fHmggSM_Zone5[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1096  fOutputContainer->Add(fHmggSM_Zone5[iSM]);
1097 
1098  snprintf(hname, buffersize, "hmgg_SM%d_Zone6",iSM);
1099  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 6",iSM);
1100  fHmggSM_Zone6[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1101  fHmggSM_Zone6[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1102  fHmggSM_Zone6[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1103  fOutputContainer->Add(fHmggSM_Zone6[iSM]);
1104 
1105  snprintf(hname, buffersize, "hmgg_SM%d_Zone7",iSM);
1106  snprintf(htitl, buffersize, "Two-gamma inv. mass for super mod %d in zone 7",iSM);
1107  fHmggSM_Zone7[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1108  fHmggSM_Zone7[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1109  fHmggSM_Zone7[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1110  fOutputContainer->Add(fHmggSM_Zone7[iSM]);
1111 
1112  if(iSM < nSM/2)
1113  {
1114  snprintf(hname,buffersize, "hmgg_PairSameSectorSM%d",iSM);
1115  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1116  fHmggPairSameSectorSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1117  fHmggPairSameSectorSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1118  fHmggPairSameSectorSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1120 
1121  snprintf(hname,buffersize, "hmgg_PairSameSectorSM%d_MaskFrame",iSM);
1122  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1123  fHmggPairSameSectorSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1124  fHmggPairSameSectorSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1125  fHmggPairSameSectorSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1127 
1128  fhClusterPairDiffTimeSameSector[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSector%d",iSM),
1129  Form("cluster pair time difference vs E, Sector %d",iSM),
1130  100,0,10, 200,-100,100);
1131  fhClusterPairDiffTimeSameSector[iSM]->SetXTitle("E_{pair} (GeV)");
1132  fhClusterPairDiffTimeSameSector[iSM]->SetYTitle("#Delta t (ns)");
1134  }
1135 
1136  if(iSM < nSM-2)
1137  {
1138  snprintf(hname,buffersize, "hmgg_PairSameSideSM%d",iSM);
1139  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1140  fHmggPairSameSideSM[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1141  fHmggPairSameSideSM[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1142  fHmggPairSameSideSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1144 
1145  snprintf(hname,buffersize, "hmgg_PairSameSideSM%d_MaskFrame",iSM);
1146  snprintf(htitl,buffersize, "Two-gamma inv. mass for SM pair Sector: %d",iSM);
1147  fHmggPairSameSideSMMaskFrame[iSM] = new TH2F(hname,htitl,fNbins,fMinBin,fMaxBin,100,0,10);
1148  fHmggPairSameSideSMMaskFrame[iSM]->SetXTitle("m_{#gamma #gamma} (MeV/c^{2})");
1149  fHmggPairSameSideSMMaskFrame[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1151 
1152  fhClusterPairDiffTimeSameSide[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSide%d",iSM),
1153  Form("cluster pair time difference vs E, Side %d",iSM),
1154  100,0,10, 200,-100,100);
1155  fhClusterPairDiffTimeSameSide[iSM]->SetXTitle("E_{pair} (GeV)");
1156  fhClusterPairDiffTimeSameSide[iSM]->SetYTitle("#Delta t (ns)");
1158  }
1159 
1160  snprintf(hname, buffersize, "hopang_SM%d",iSM);
1161  snprintf(htitl, buffersize, "Opening angle for super mod %d",iSM);
1162  fHOpeningAngleSM[iSM] = new TH2F(hname,htitl,100,0.,50.,100,0,10);
1163  fHOpeningAngleSM[iSM]->SetXTitle("#alpha_{#gamma #gamma} (deg)");
1164  fHOpeningAngleSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1166 
1167  snprintf(hname,buffersize, "hopang_PairSM%d",iSM);
1168  snprintf(htitl,buffersize, "Opening angle for SM pair: %d",iSM);
1169  fHOpeningAnglePairSM[iSM] = new TH2F(hname,htitl,100,0.,50.,100,0,10);
1170  fHOpeningAnglePairSM[iSM]->SetXTitle("#alpha_{#gamma #gamma} (deg)");
1171  fHOpeningAnglePairSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1173 
1174  snprintf(hname, buffersize, "hasym_SM%d",iSM);
1175  snprintf(htitl, buffersize, "Asymmetry for super mod %d",iSM);
1176  fHAsymmetrySM[iSM] = new TH2F(hname,htitl,100,0.,1.,100,0,10);
1177  fHAsymmetrySM[iSM]->SetXTitle("a");
1178  fHAsymmetrySM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1179  fOutputContainer->Add(fHAsymmetrySM[iSM]);
1180 
1181  snprintf(hname,buffersize, "hasym_PairSM%d",iSM);
1182  snprintf(htitl,buffersize, "Asymmetry for SM pair: %d",iSM);
1183  fHAsymmetryPairSM[iSM] = new TH2F(hname,htitl,100,0.,1.,100,0,10);
1184  fHAsymmetryPairSM[iSM]->SetXTitle("a");
1185  fHAsymmetryPairSM[iSM]->SetYTitle("p_{T #gamma #gamma} (GeV/c)");
1186  fOutputContainer->Add(fHAsymmetryPairSM[iSM]);
1187 
1188  Int_t colmax = 48;
1189  Int_t rowmax = 24;
1190 
1191  fhTowerDecayPhotonHit[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d",iSM),
1192  Form("Entries in grid of cells in Module %d",iSM),
1193  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1194  fhTowerDecayPhotonHit[iSM]->SetYTitle("row (phi direction)");
1195  fhTowerDecayPhotonHit[iSM]->SetXTitle("column (eta direction)");
1197 
1198  fhTowerDecayPhotonEnergy[iSM] = new TH2F (Form("hTowerDecPhotonEnergy_Mod%d",iSM),
1199  Form("Accumulated energy in grid of cells in Module %d",iSM),
1200  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1201  fhTowerDecayPhotonEnergy[iSM]->SetYTitle("row (phi direction)");
1202  fhTowerDecayPhotonEnergy[iSM]->SetXTitle("column (eta direction)");
1204 
1205  fhTowerDecayPhotonAsymmetry[iSM] = new TH2F (Form("hTowerDecPhotonAsymmetry_Mod%d",iSM),
1206  Form("Accumulated asymmetry in grid of cells in Module %d",iSM),
1207  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1208  fhTowerDecayPhotonAsymmetry[iSM]->SetYTitle("row (phi direction)");
1209  fhTowerDecayPhotonAsymmetry[iSM]->SetXTitle("column (eta direction)");
1211 
1212  fhTowerDecayPhotonHitMaskFrame[iSM] = new TH2F (Form("hTowerDecPhotonHit_Mod%d_MaskFrame",iSM),Form("Entries in grid of cells in Module %d",iSM),
1213  colmax+2,-1.5,colmax+0.5, rowmax+2,-1.5,rowmax+0.5);
1214  fhTowerDecayPhotonHitMaskFrame[iSM]->SetYTitle("row (phi direction)");
1215  fhTowerDecayPhotonHitMaskFrame[iSM]->SetXTitle("column (eta direction)");
1217 
1218  fhClusterTimeSM[iSM] = new TH2F(Form("hClusterTime_SM%d",iSM),"cluster time vs E",100,0,10, 200,-1000,1000);
1219  fhClusterTimeSM[iSM]->SetXTitle("E (GeV)");
1220  fhClusterTimeSM[iSM]->SetYTitle("t (ns)");
1221  fOutputContainer->Add(fhClusterTimeSM[iSM]);
1222 
1223  fhClusterPairDiffTimeSameSM[iSM] = new TH2F(Form("hClusterPairDiffTimeSameSM%d",iSM),
1224  Form("cluster pair time difference vs E, SM %d",iSM),
1225  100,0,10, 200,-100,100);
1226  fhClusterPairDiffTimeSameSM[iSM]->SetXTitle("E (GeV)");
1227  fhClusterPairDiffTimeSameSM[iSM]->SetYTitle("#Delta t (ns)");
1229 
1230 
1231  if(fClusterTopology)
1232  {
1233 
1234  fhTopoClusterCase0[iSM] = new TH2F(Form("hTopoClusterCase0SM%d",iSM),
1235  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1236  21,-10.5,10.5, 21,-10.5,10.5);
1237  fhTopoClusterCase0[iSM]->SetXTitle("column");
1238  fhTopoClusterCase0[iSM]->SetYTitle("row");
1240 
1241  fhTopoClusterCase1[iSM] = new TH2F(Form("hTopoClusterCase1SM%d",iSM),
1242  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1243  21,-10.5,10.5, 21,-10.5,10.5);
1244  fhTopoClusterCase1[iSM]->SetXTitle("column");
1245  fhTopoClusterCase1[iSM]->SetYTitle("row");
1247 
1248  fhTopoClusterCase2[iSM] = new TH2F(Form("hTopoClusterCase2SM%d",iSM),
1249  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1250  21,-10.5,10.5, 21,-10.5,10.5);
1251  fhTopoClusterCase2[iSM]->SetXTitle("column");
1252  fhTopoClusterCase2[iSM]->SetYTitle("row");
1254 
1255  fhTopoClusterCase3[iSM] = new TH2F(Form("hTopoClusterCase3SM%d",iSM),
1256  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1257  21,-10.5,10.5, 21,-10.5,10.5);
1258  fhTopoClusterCase3[iSM]->SetXTitle("column");
1259  fhTopoClusterCase3[iSM]->SetYTitle("row");
1261 
1262  fhTopoClusterAmpCase0[iSM] = new TH2F(Form("hTopoClusterAmpCase0SM%d",iSM),
1263  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1264  21,-10.5,10.5, 21,-10.5,10.5);
1265  fhTopoClusterAmpCase0[iSM]->SetXTitle("column");
1266  fhTopoClusterAmpCase0[iSM]->SetYTitle("row");
1268 
1269  fhTopoClusterAmpCase1[iSM] = new TH2F(Form("hTopoClusterAmpCase1SM%d",iSM),
1270  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1271  21,-10.5,10.5, 21,-10.5,10.5);
1272  fhTopoClusterAmpCase1[iSM]->SetXTitle("column");
1273  fhTopoClusterAmpCase1[iSM]->SetYTitle("row");
1275 
1276  fhTopoClusterAmpCase2[iSM] = new TH2F(Form("hTopoClusterAmpCase2SM%d",iSM),
1277  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1278  21,-10.5,10.5, 21,-10.5,10.5);
1279  fhTopoClusterAmpCase2[iSM]->SetXTitle("column");
1280  fhTopoClusterAmpCase2[iSM]->SetYTitle("row");
1282 
1283  fhTopoClusterAmpCase3[iSM] = new TH2F(Form("hTopoClusterAmpCase3SM%d",iSM),
1284  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1285  21,-10.5,10.5, 21,-10.5,10.5);
1286  fhTopoClusterAmpCase3[iSM]->SetXTitle("column");
1287  fhTopoClusterAmpCase3[iSM]->SetYTitle("row");
1289 
1290 
1291  fhTopoClusterAmpFractionCase0[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase0SM%d",iSM),
1292  Form("cluster topology for cluster in position 0 in noisy quartet, SM %d",iSM),
1293  21,-10.5,10.5, 21,-10.5,10.5);
1294  fhTopoClusterAmpFractionCase0[iSM]->SetXTitle("column");
1295  fhTopoClusterAmpFractionCase0[iSM]->SetYTitle("row");
1297 
1298  fhTopoClusterAmpFractionCase1[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase1SM%d",iSM),
1299  Form("cluster topology for cluster in position 1 in noisy quartet, SM %d",iSM),
1300  21,-10.5,10.5, 21,-10.5,10.5);
1301  fhTopoClusterAmpFractionCase1[iSM]->SetXTitle("column");
1302  fhTopoClusterAmpFractionCase1[iSM]->SetYTitle("row");
1304 
1305  fhTopoClusterAmpFractionCase2[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase2SM%d",iSM),
1306  Form("cluster topology for cluster in position 2 in noisy quartet, SM %d",iSM),
1307  21,-10.5,10.5, 21,-10.5,10.5);
1308  fhTopoClusterAmpFractionCase2[iSM]->SetXTitle("column");
1309  fhTopoClusterAmpFractionCase2[iSM]->SetYTitle("row");
1311 
1312  fhTopoClusterAmpFractionCase3[iSM] = new TH2F(Form("hTopoClusterAmpFractionCase3SM%d",iSM),
1313  Form("cluster topology for cluster in position 3 in noisy quartet, SM %d",iSM),
1314  21,-10.5,10.5, 21,-10.5,10.5);
1315  fhTopoClusterAmpFractionCase3[iSM]->SetXTitle("column");
1316  fhTopoClusterAmpFractionCase3[iSM]->SetYTitle("row");
1318  }
1319  }
1320 
1321  Int_t nchannels = nSM*AliEMCALGeoParams::fgkEMCALRows*AliEMCALGeoParams::fgkEMCALCols;
1322  for(Int_t ibc = 0; ibc < 4; ibc++)
1323  {
1324  fHTpi0[ibc] = new TH2F(Form("hTime_BC%d",ibc),Form("Time of cell clusters under pi0 peak, bunch crossing %d",ibc),
1325  nchannels,0,nchannels, fNTimeBins,fMinTimeBin,fMaxTimeBin);
1326  fOutputContainer->Add(fHTpi0[ibc]);
1327  fHTpi0[ibc]->SetYTitle("time (ns)");
1328  fHTpi0[ibc]->SetXTitle("abs. Id. ");
1329  }
1330 
1331  fhClusterTime = new TH2F("hClusterTime","cluster time vs E",100,0,10, 100,0,1000);
1332  fhClusterTime->SetXTitle("E (GeV)");
1333  fhClusterTime->SetYTitle("t (ns)");
1335 
1336  fhClusterPairDiffTime = new TH2F("hClusterPairDiffTime","cluster pair time difference vs E",100,0,10, 800,-400,400);
1337  fhClusterPairDiffTime->SetXTitle("E_{pair} (GeV)");
1338  fhClusterPairDiffTime->SetYTitle("#Delta t (ns)");
1340 
1341  for(Int_t iMod=0; iMod < nSM; iMod++)
1342  {
1343  for(Int_t iRow=0; iRow < AliEMCALGeoParams::fgkEMCALRows; iRow++)
1344  {
1345  for(Int_t iCol=0; iCol < AliEMCALGeoParams::fgkEMCALCols; iCol++)
1346  {
1347  snprintf(hname,buffersize, "%d_%d_%d",iMod,iCol,iRow);
1348  snprintf(htitl,buffersize, "Two-gamma inv. mass for super mod %d, cell(col,row)=(%d,%d)",iMod,iCol,iRow);
1349  fHmpi0[iMod][iCol][iRow] = new TH1F(hname,htitl,fNbins,fMinBin,fMaxBin);
1350  fHmpi0[iMod][iCol][iRow]->SetXTitle("mass (MeV/c^{2})");
1351  fOutputContainer->Add(fHmpi0[iMod][iCol][iRow]);
1352 
1353  if(fCellEnergyHiso)
1354  {
1355  snprintf(htitlEnergy,buffersize, "Energy for super mod %d, cell(col,row)=(%d,%d)",iMod,iCol,iRow);
1356  fhEnergy[iMod][iCol][iRow] = new TH1F(Form("E_%s",hname),htitlEnergy,fNEnergybins,fMinEnergyBin,fMaxEnergyBin);
1357  fhEnergy[iMod][iCol][iRow]->SetXTitle("E (GeV)");
1358  fOutputContainer->Add(fhEnergy[iMod][iCol][iRow]);
1359  }
1360  }
1361  }
1362  }
1363 
1364  fOutputContainer->SetOwner(kTRUE);
1365 
1366  PostData(1,fOutputContainer);
1367 
1368 // // cuts container, set in terminate but init and post here
1369 //
1370 // fCuts = new TList();
1371 //
1372 // fCuts ->SetOwner(kTRUE);
1373 //
1374 // PostData(2, fCuts);
1375 }
1376 
1382 //______________________________________________________________________________________________________
1384 {
1385  Int_t icol = ieta;
1386  if(iSM%2) icol+=48; // Impair SM, shift index [0-47] to [48-96]
1387 
1389  {
1390  for (Int_t imask = 0; imask < fNMaskCellColumns; imask++)
1391  {
1392  if(icol==fMaskCellColumns[imask]) return kTRUE;
1393  }
1394  }
1395 
1396  return kFALSE;
1397 }
1398 
1399 
1408 //______________________________________________________________________________________________________
1410 {
1411  Int_t icol = ieta;
1412  Int_t irow = iphi;
1413 
1414 // printf("SM = %i\n",iSupMod);
1415 // printf("icol = %i\n",icol);
1416 // printf("irow = %i\n",irow);
1417 
1418  if(iSupMod%2) //Odd SM
1419  {
1420  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1421  {
1422  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1423  {
1424 // printf("zone 1\n");
1425  return kTRUE;
1426  }
1427  }
1428  }
1429  else //Even SM
1430  {
1431  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1432  {
1433  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1434  {
1435 // printf("zone 1\n");
1436  return kTRUE;
1437  }
1438  }
1439  }
1440 
1441  return kFALSE;
1442 }
1443 
1444 
1453 //______________________________________________________________________________________________________
1455 {
1456  Int_t icol = ieta;
1457  Int_t irow = iphi;
1458 
1459 // printf("SM = %i\n",iSupMod);
1460 // printf("icol = %i\n",icol);
1461 // printf("irow = %i\n",irow);
1462 
1463  if(iSupMod%2) //Odd SM
1464  {
1465  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1466  {
1467  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1468  {
1469  return kFALSE;
1470  }
1471  else
1472  {
1473 // printf("zone 2\n");
1474  return kTRUE;
1475  }
1476  }
1477  }
1478  else //Even SM
1479  {
1480  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1481  {
1482  if((irow >= 2 && irow <= 3) || (irow >= 20 && irow <= 21))
1483  {
1484  return kFALSE;
1485  }
1486  else
1487  {
1488 // printf("zone 2\n");
1489  return kTRUE;
1490  }
1491  }
1492  }
1493 
1494  return kFALSE;
1495 }
1496 
1497 
1506 //______________________________________________________________________________________________________
1508 {
1509  Int_t icol = ieta;
1510  Int_t irow = iphi;
1511 
1512 // printf("SM = %i\n",iSupMod);
1513 // printf("icol = %i\n",icol);
1514 // printf("irow = %i\n",irow);
1515 
1516  if(iSupMod%2) //Odd SM
1517  {
1518  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1519  {
1520  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1521  {
1522 // printf("zone 3\n");
1523  return kTRUE;
1524  }
1525  }
1526  }
1527  else //Even SM
1528  {
1529  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1530  {
1531  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1532  {
1533 // printf("zone 3\n");
1534  return kTRUE;
1535  }
1536  }
1537  }
1538 
1539  return kFALSE;
1540 }
1541 
1542 
1551 //______________________________________________________________________________________________________
1553 {
1554  Int_t icol = ieta;
1555  Int_t irow = iphi;
1556 
1557 // printf("SM = %i\n",iSupMod);
1558 // printf("icol = %i\n",icol);
1559 // printf("irow = %i\n",irow);
1560 
1561  if(iSupMod%2) //Odd SM
1562  {
1563  if((irow >= 2 && irow <= 21) && ((icol >= 42 && icol <= 46) || (icol >= 13 && icol <= 37) || (icol >= 1 && icol <= 9)))
1564  {
1565  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1566  {
1567  return kFALSE;
1568  }
1569  else
1570  {
1571 // printf("zone 4\n");
1572  return kTRUE;
1573  }
1574  }
1575  }
1576  else //Even SM
1577  {
1578  if((irow >= 2 && irow <= 21) && ((icol >= 1 && icol <= 5) || (icol >= 10 && icol <= 34) || (icol >= 38 && icol <= 46)))
1579  {
1580  if((icol >= 1 && icol <= 3) || (icol >= 44 && icol <= 46))
1581  {
1582  return kFALSE;
1583  }
1584  else
1585  {
1586 // printf("zone 4\n");
1587  return kTRUE;
1588  }
1589  }
1590  }
1591 
1592  return kFALSE;
1593 }
1594 
1595 
1605 //______________________________________________________________________________________________________
1607 {
1608  Int_t icol = ieta;
1609  Int_t irow = iphi;
1610 
1611  //Center of ellipse
1612  Float_t col0 = 47/2;
1613  Float_t row0 = 23/2;
1614 
1615  //Parameters
1616  Float_t a = 3-col0;
1617  Float_t b = 2-row0;
1618 
1619  if(((icol-col0)*(icol-col0)) / (a*a) + ((irow-row0)*(irow-row0) / (b*b)) > 1)
1620  {
1621  return kTRUE;
1622  }
1623  else
1624  {
1625  return kFALSE;
1626  }
1627 }
1628 
1629 
1639 //______________________________________________________________________________________________________
1641 {
1642  Int_t icol = ieta;
1643  Int_t irow = iphi;
1644 
1645  //Center of ellipse
1646  Float_t col0 = 47/2;
1647  Float_t row0 = 23/2;
1648 
1649  //Paramters
1650  Float_t aLarge = 3-col0;
1651  Float_t bLarge = 2-row0;
1652  Float_t aSmall = 16-col0;
1653  Float_t bSmall = 7-row0;
1654 
1655  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))
1656  {
1657  return kTRUE;
1658  }
1659  else
1660  {
1661  return kFALSE;
1662  }
1663 }
1664 
1665 
1675 //______________________________________________________________________________________________________
1677 {
1678  Int_t icol = ieta;
1679  Int_t irow = iphi;
1680 
1681  //Center of ellipse
1682  Float_t col0 = 47/2;
1683  Float_t row0 = 23/2;
1684 
1685  //Paramters
1686  Float_t a = 16-col0;
1687  Float_t b = 7-row0;
1688 
1689  if(((icol-col0)*(icol-col0)) / (a*a) + ((irow-row0)*(irow-row0) / (b*b)) < 1)
1690  {
1691  return kTRUE;
1692  }
1693  else
1694  {
1695  return kFALSE;
1696  }
1697 
1698 }
1699 
1700 
1706 //__________________________________________________________________________
1708 {
1709  // Event selection
1710 
1711  if(fTriggerName!="")
1712  {
1713  AliESDEvent* esdevent = dynamic_cast<AliESDEvent*> (InputEvent());
1714  AliAODEvent* aodevent = dynamic_cast<AliAODEvent*> (InputEvent());
1715 
1716  TString triggerClass = "";
1717  if (esdevent) triggerClass = esdevent->GetFiredTriggerClasses();
1718  else if(aodevent) triggerClass = aodevent->GetFiredTriggerClasses();
1719 
1720  AliDebug(1,Form("Event %d, FiredClass %s",
1721  (Int_t)Entry(),(((AliESDEvent*)InputEvent())->GetFiredTriggerClasses()).Data()));
1722 
1723  if(!triggerClass.Contains(fTriggerName))
1724  {
1725  AliDebug(1,"Reject event!");
1726  return;
1727  }
1728  else
1729  AliDebug(1,"Accept event!");
1730  }
1731 
1732  // Get the input event
1733 
1734  AliVEvent* event = 0;
1735  if(fFilteredInput) event = AODEvent();
1736  else event = InputEvent();
1737 
1738  if(!event)
1739  {
1740  AliWarning("Input event not available!");
1741  return;
1742  }
1743 
1744  AliDebug(1,Form("<<< %s: Event %d >>>",event->GetName(), (Int_t)Entry()));
1745 
1746  // Get the primary vertex
1747 
1748  event->GetPrimaryVertex()->GetXYZ(fVertex) ;
1749 
1750  AliDebug(1,Form("Vertex: (%.3f,%.3f,%.3f)",fVertex[0],fVertex[1],fVertex[2]));
1751 
1752  //Int_t runNum = aod->GetRunNumber();
1753  //if(DebugLevel() > 1) printf("Run number: %d\n",runNum);
1754 
1755  fhNEvents->Fill(0); //Count the events to be analyzed
1756 
1757  // Acccess once the geometry matrix and temperature corrections and calibration coefficients
1758  if(fhNEvents->GetEntries() == 1)
1759  {
1761 
1763 
1764 // InitEnergyCalibrationFactors();
1765  }
1766 
1767  //Get the list of clusters and cells
1768  fEMCALCells = event->GetEMCALCells();
1769 
1770  fCaloClustersArr = new TRefArray();
1771  event->GetEMCALClusters(fCaloClustersArr);
1772 
1773  AliDebug(1,Form("N CaloClusters: %d - N CaloCells %d",fCaloClustersArr->GetEntriesFast(), fEMCALCells->GetNumberOfCells()));
1774 
1775  // Apply non linearity, new calibration, T calibration to the clusters
1776  if( fCorrectClusters )
1777  CorrectClusters();
1778 
1779  FillHistograms();
1780 
1781  delete fCaloClustersArr;
1782 
1783  PostData(1,fOutputContainer);
1784 }
1785 
1788 //_____________________________________________________
1790 {
1791  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",
1793 
1794  printf("Group %d cells\n", fGroupNCells) ;
1795 
1796  printf("Cluster maximal cell away from border at least %d cells\n", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
1797 
1798  printf("Histograms: bins %d; energy range: %2.2f < E < %2.2f MeV\n",fNbins,fMinBin,fMaxBin) ;
1799 
1800  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",
1801  fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fRecalPosition, fSameSM) ;
1802 
1803  printf("OADB path : %s\n",fOADBFilePath .Data());
1804  printf("Calibration path : %s\n",fCalibFilePath.Data());
1805 
1806  printf("EMCAL Geometry name: < %s >, Load Matrices %d\n",fEMCALGeoName.Data(), fLoadMatrices) ;
1807 
1808  if(fLoadMatrices) { for(Int_t ism = 0; ism < AliEMCALGeoParams::fgkEMCALModules; ism++) if(fMatrix[ism]) fMatrix[ism]->Print() ; }
1809 }
1810 
1814 //_____________________________________________________________________
1816 {
1817  if(n > fNMaskCellColumns)
1818  {
1819  delete [] fMaskCellColumns ;
1820 
1821  fMaskCellColumns = new Int_t[n] ;
1822  }
1823 
1824  fNMaskCellColumns = n ;
1825 }
1826 
1831 //___________________________________________________________________________________
1833 {
1834  if(ipos < fNMaskCellColumns) fMaskCellColumns[ipos] = icol ;
1835  else AliWarning("Mask column not set, position larger than allocated set size first") ;
1836 }
1837 
1843 //___________________________________________________________________________________
1845 {
1846  Int_t iPos;
1847 
1848  if(icol%2 == 0)
1849  {
1850  if(irow%8 < 4)
1851  {
1852  iPos = 0;
1853  }
1854  else if(irow%8 < 8)
1855  {
1856  iPos = 2;
1857  }
1858  else iPos = -1;
1859 
1860  }
1861  else
1862  {
1863  if(irow%8 < 4)
1864  {
1865  iPos = 1;
1866  }
1867  else if(irow%8 < 8)
1868  {
1869  iPos = 3;
1870  }
1871  else iPos = -1;
1872  }
1873 
1874  return iPos;
1875 }
1876 
1879 //______________________________________________________________
1881 {
1882  AliDebug(1,"Not implemented");
1883 // const Int_t buffersize = 255;
1884 // char onePar[buffersize] ;
1885 
1886 // 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",
1887 // fEmin,fEmax, fL0min, fL0max, fMinNCells, fAsyCut, fDTimeCut, fTimeMin, fTimeMax, fInvMassCutMin, fInvMassCutMax) ;
1888 // fCuts->Add(new TObjString(onePar));
1889 // snprintf(onePar,buffersize, "Group %d cells;", fGroupNCells) ;
1890 // fCuts->Add(new TObjString(onePar));
1891 // snprintf(onePar,buffersize, "Cluster maximal cell away from border at least %d cells;", fRecoUtils->GetNumberOfCellsFromEMCALBorder()) ;
1892 // fCuts->Add(new TObjString(onePar));
1893 // snprintf(onePar,buffersize, "Histograms, Mass bins %d; energy range: %2.2f < E < %2.2f GeV;",fNbins,fMinBin,fMaxBin) ;
1894 // fCuts->Add(new TObjString(onePar));
1895 // snprintf(onePar,buffersize, "Histograms, Time bins %d; energy range: %2.2f < E < %2.2f GeV;",fNTimeBins,fMinTimeBin,fMaxTimeBin) ;
1896 // fCuts->Add(new TObjString(onePar));
1897 // 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 ",
1898 // fRecoUtils->IsBadChannelsRemovalSwitchedOn(),fFilteredInput,fCorrectClusters, fRecalPosition, fSameSM) ;
1899 // fCuts->Add(new TObjString(onePar));
1900 // snprintf(onePar,buffersize, "EMCAL Geometry name: < %s >, Load Matrices? %d",fEMCALGeoName.Data(),fLoadMatrices) ;
1901 // fCuts->Add(new TObjString(onePar));
1902 //
1903 // // Post Data
1904 // PostData(2, fCuts);
1905 }
1906 
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.
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)
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.
AliEMCALRecoUtils * fRecoUtils
Access to reconstruction utilities.
AliEMCALGeometry * fEMCALGeo
! EMCAL geometry pointer.
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...
Float_t fMinTimeBin
Minimum time bins of invariant mass histograms.
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.
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.
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.
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
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.
TH2F * fhClusterTime
! Timing of clusters vs energy.
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.
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...
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
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.
Float_t fOpAnglemin
Minimum cluster opening angle for bkg shape study.
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.