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