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