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