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