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