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