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