AliPhysics  4e47bdd (4e47bdd)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaPi0EbE.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include <TList.h>
18 #include <TClonesArray.h>
19 #include <TObjString.h>
20 
21 // --- Analysis system ---
22 #include "AliAnaPi0EbE.h"
23 #include "AliCaloTrackReader.h"
24 #include "AliIsolationCut.h"
26 #include "AliCaloPID.h"
27 #include "AliMCAnalysisUtils.h"
28 #include "AliStack.h"
29 #include "AliFiducialCut.h"
30 #include "TParticle.h"
31 #include "AliVCluster.h"
32 #include "AliESDEvent.h"
33 #include "AliAODEvent.h"
34 #include "AliAODMCParticle.h"
35 
39 
40 //____________________________
43 //____________________________
46 fAnaType(kIMCalo),
47 fNLMCutMin(-1), fNLMCutMax(10),
48 fFillAllNLMHistograms(0), fFillTMHisto(0),
49 fFillSelectClHisto(0),
50 fM02MaxCutForIM(0), fM02MinCutForIM(0),
51 fSelectIsolatedDecay(kFALSE), fSelectPairInIsoCone(0),
52 fR(0), fIsoCandMinPt(0),
53 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
54 fTimeCutMin(-10000), fTimeCutMax(10000),
55 fRejectTrackMatch(kTRUE), fCheckSplitDistToBad(0),
56 fFillWeightHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
57 fFillEMCALBCHistograms(0),
58 fInputAODGammaConvName(""),
59 fMomentum(), fMomentum1(), fMomentum2(),
60 fMomentum12(),fPrimaryMom(), fGrandMotherMom(),
61 // Histograms
62 fhPt(0), fhE(0),
63 fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
64 fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
65 fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
66 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
67 fhTimeTriggerEMCALBC0UMReMatchBoth(0),
68 fhPtCentrality(), fhPtEventPlane(0), fhMCPtCentrality(),
69 fhPtReject(0), fhEReject(0),
70 fhPtEtaReject(0), fhPtPhiReject(0), fhEtaPhiReject(0),
71 fhMass(0), fhMassPt(0),
72 fhMassPtMaxPair(0), fhMassPtMinPair(0), fhMassSplitPt(0),
73 fhSelectedMass(0), fhSelectedMassPt(0), fhSelectedMassSplitPt(0),
74 fhMassPtIsoRCut(0),
75 fhMassNoOverlap(0), fhMassPtNoOverlap(0), fhMassSplitPtNoOverlap(0),
76 fhSelectedMassNoOverlap(0), fhSelectedMassPtNoOverlap(0), fhSelectedMassSplitPtNoOverlap(0),
77 fhMCPi0PtRecoPtPrim(0), fhMCEtaPtRecoPtPrim(0),
78 fhMCPi0PtRecoPtPrimNoOverlap(0), fhMCEtaPtRecoPtPrimNoOverlap(0),
79 fhMCPi0SplitPtRecoPtPrim(0), fhMCEtaSplitPtRecoPtPrim(0),
80 fhMCPi0SplitPtRecoPtPrimNoOverlap(0), fhMCEtaSplitPtRecoPtPrimNoOverlap(0),
81 fhMCPi0SelectedPtRecoPtPrim(0), fhMCEtaSelectedPtRecoPtPrim(0),
82 fhMCPi0SelectedPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedPtRecoPtPrimNoOverlap(0),
83 fhMCPi0SelectedSplitPtRecoPtPrim(0), fhMCEtaSelectedSplitPtRecoPtPrim(0),
84 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap(0),
85 fhAsymmetry(0), fhSelectedAsymmetry(0),
86 fhSplitE(0), fhSplitPt(0),
87 fhSplitPtEta(0), fhSplitPtPhi(0),
88 fhNLocMaxSplitPt(0),
89 fhPtDecay(0),
90 
91 // Shower shape histos
92 fhPtDispersion(0), fhPtLambda0(0), fhPtLambda0NoSplitCut(0),
93 fhPtLambda1(0), fhPtLambda0NoTRD(0), fhPtLambda0FracMaxCellCut(0),
94 fhPtFracMaxCell(0), fhPtFracMaxCellNoTRD(0),
95 fhPtNCells(0), fhPtTime(0), fhEPairDiffTime(0),
96 fhPtDispEta(0), fhPtDispPhi(0),
97 fhPtSumEta(0), fhPtSumPhi(0), fhPtSumEtaPhi(0),
98 fhPtDispEtaPhiDiff(0), fhPtSphericity(0),
99 
100 // MC histos
101 fhMCPtDecayLostPairPi0(0), fhMCPtDecayLostPairEta(0),
102 fhMCE(), fhMCPt(),
103 fhMCPtPhi(), fhMCPtEta(),
104 fhMCEReject(), fhMCPtReject(),
105 fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
106 fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
107 fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
108 fhMCOtherDecayPt(0),
109 fhMassPairMCPi0(0), fhMassPairMCEta(0),
110 fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
111 fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0),
112 fhMCNotResonancePi0PtOrigin(0), fhMCPi0PtStatus(0x0),
113 fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0),
114 
115 // Weight studies
116 fhECellClusterRatio(0), fhECellClusterLogRatio(0),
117 fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
118 fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
119 fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
120 fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
121 fhTrackMatchedMCParticlePt(0),
122 fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
123 fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
124 // Number of local maxima in cluster
125 fhNLocMaxPt(0), fhNLocMaxPtReject(0),
126 // PileUp
127 fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
128 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
129 fhTimeNPileUpVertContributors(0),
130 fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
131 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
132 fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0),
133 fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0)
134 {
135  for(Int_t i = 0; i < fgkNmcTypes; i++)
136  {
137  fhMCE [i] = 0;
138  fhMCPt [i] = 0;
139  fhMCPtPhi [i] = 0;
140  fhMCPtEta [i] = 0;
141  fhMCPtCentrality [i] = 0;
142 
143  fhMCSplitE [i] = 0;
144  fhMCSplitPt [i] = 0;
145  fhMCSplitPtPhi [i] = 0;
146  fhMCSplitPtEta [i] = 0;
147 
148  fhMCNLocMaxPt [i] = 0;
149  fhMCNLocMaxSplitPt [i] = 0;
150  fhMCNLocMaxPtReject[i] = 0;
151 
152  fhMCPtDecay [i] = 0;
153  fhMCPtLambda0 [i] = 0;
154  fhMCPtLambda0NoTRD [i] = 0;
156  fhMCPtFracMaxCell [i] = 0;
157  fhMCPtLambda1 [i] = 0;
158  fhMCPtDispersion [i] = 0;
159 
160  fhMCPtDispEta [i] = 0;
161  fhMCPtDispPhi [i] = 0;
162  fhMCPtSumEtaPhi [i] = 0;
163  fhMCPtDispEtaPhiDiff[i] = 0;
164  fhMCPtSphericity [i] = 0;
165  fhMCPtAsymmetry [i] = 0;
166 
167  fhMCMassPt [i]=0;
168  fhMCMassSplitPt [i]=0;
169  fhMCSelectedMassPt [i]=0;
171 
172  fhMCMassPtNoOverlap [i]=0;
176 
177  for(Int_t j = 0; j < 7; j++)
178  {
179  fhMCLambda0DispEta [j][i] = 0;
180  fhMCLambda0DispPhi [j][i] = 0;
181  fhMCDispEtaDispPhi [j][i] = 0;
182  fhMCAsymmetryLambda0 [j][i] = 0;
183  fhMCAsymmetryDispEta [j][i] = 0;
184  fhMCAsymmetryDispPhi [j][i] = 0;
185  }
186  }
187 
188  for(Int_t j = 0; j < 7; j++)
189  {
190  fhLambda0DispEta [j] = 0;
191  fhLambda0DispPhi [j] = 0;
192  fhDispEtaDispPhi [j] = 0;
193  fhAsymmetryLambda0 [j] = 0;
194  fhAsymmetryDispEta [j] = 0;
195  fhAsymmetryDispPhi [j] = 0;
196 
197  fhPtPileUp [j] = 0;
198  }
199 
200  for(Int_t i = 0; i < 3; i++)
201  {
202  fhPtLambda0LocMax [i] = 0;
203  fhPtLambda1LocMax [i] = 0;
204  fhPtDispersionLocMax [i] = 0;
205  fhPtDispEtaLocMax [i] = 0;
206  fhPtDispPhiLocMax [i] = 0;
207  fhPtSumEtaPhiLocMax [i] = 0;
209  fhPtSphericityLocMax [i] = 0;
210  fhPtAsymmetryLocMax [i] = 0;
211  fhMassPtLocMax [i] = 0;
212  fhSelectedMassPtLocMax [i] = 0;
213  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
214  {
215  fhMCPtLambda0LocMax [ipart][i] = 0;
216  fhMCSelectedMassPtLocMax[ipart][i] = 0;
217  }
218 
223 
228 
229  }
230 
231  // Weight studies
232  for(Int_t i =0; i < 14; i++){
233  fhLambda0ForW0[i] = 0;
234  //fhLambda1ForW0[i] = 0;
235  if(i<8)fhMassPairLocMax[i] = 0;
236  }
237 
238  for(Int_t i = 0; i < 11; i++)
239  {
240  fhEtaPhiTriggerEMCALBC [i] = 0 ;
241  fhTimeTriggerEMCALBC [i] = 0 ;
243 
244  fhEtaPhiTriggerEMCALBCUM [i] = 0 ;
245  fhTimeTriggerEMCALBCUM [i] = 0 ;
246 
247  }
248 
249  for(Int_t iSM = 0; iSM < 22; iSM++)
250  {
251  fhNLocMaxPtSM[iSM] = 0;
252  for(Int_t inlm = 0; inlm < 3; inlm++)
253  {
254  fhSelectedMassPtLocMaxSM [inlm][iSM] = 0;
255  fhSelectedLambda0PtLocMaxSM [inlm][iSM] = 0;
256  }
257  }
258 
259  // Initialize parameters
260  InitParameters();
261 
262 }
263 
264 //______________________________________________________________________________________________
269 //______________________________________________________________________________________________
271 {
273  if( id < 0 ) return;
274 
276  if(TMath::Abs(bc) >= 6) AliInfo(Form("Trigger BC not expected = %d",bc));
277 
278  if(phi < 0) phi+=TMath::TwoPi();
279 
280  if(energy > 2)
281  {
282  Double_t timeUS = TMath::Abs(time);
283 
284  if (timeUS < 25) fhEtaPhiEMCALBC0->Fill(eta, phi, GetEventWeight());
285  else if (timeUS < 75) fhEtaPhiEMCALBC1->Fill(eta, phi, GetEventWeight());
286  else fhEtaPhiEMCALBCN->Fill(eta, phi, GetEventWeight());
287  }
288 
289  if(TMath::Abs(bc) >= 6) return ;
290 
291  if(GetReader()->IsBadCellTriggerEvent() || GetReader()->IsExoticEvent()) return ;
292 
293  if(GetReader()->IsTriggerMatched())
294  {
295  if(energy > 2)
296  fhEtaPhiTriggerEMCALBC[bc+5]->Fill(eta, phi, GetEventWeight());
297 
298  fhTimeTriggerEMCALBC[bc+5]->Fill(energy, time, GetEventWeight());
299 
300  if(GetReader()->IsPileUpFromSPD())
301  fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(energy, time, GetEventWeight());
302  }
303  else
304  {
305  if(energy > 2)
306  fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(eta, phi, GetEventWeight());
307 
308  fhTimeTriggerEMCALBCUM[bc+5]->Fill(energy, time, GetEventWeight());
309 
310  if(bc==0)
311  {
312  if(GetReader()->IsTriggerMatchedOpenCuts(0))
314 
315  if(GetReader()->IsTriggerMatchedOpenCuts(1))
317 
318  if(GetReader()->IsTriggerMatchedOpenCuts(2))
319  fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(energy, time, GetEventWeight());
320  }
321  }
322 }
323 
324 //___________________________________________________________________________________
327 //___________________________________________________________________________________
328 void AliAnaPi0EbE::FillPileUpHistograms(Float_t pt, Float_t time, AliVCluster * calo)
329 {
330  //printf("E %f, time %f\n",energy,time);
331  AliVEvent * event = GetReader()->GetInputEvent();
332 
333  fhTimePtNoCut->Fill(pt, time, GetEventWeight());
334 
335  if(GetReader()->IsPileUpFromSPD()) { fhPtPileUp[0]->Fill(pt, GetEventWeight()); fhTimePtSPD->Fill(pt, time, GetEventWeight()); }
336  if(GetReader()->IsPileUpFromEMCal()) fhPtPileUp[1]->Fill(pt, GetEventWeight());
337  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPileUp[2]->Fill(pt, GetEventWeight());
338  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPileUp[3]->Fill(pt, GetEventWeight());
339  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPileUp[4]->Fill(pt, GetEventWeight());
340  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPileUp[5]->Fill(pt, GetEventWeight());
341  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPileUp[6]->Fill(pt, GetEventWeight());
342 
343  if(event->IsPileupFromSPDInMultBins()) fhTimePtSPDMulti->Fill(pt, time, GetEventWeight());
344 
345  // cells in cluster
346 
347  AliVCaloCells* cells = 0;
348  if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
349  else cells = GetPHOSCells();
350 
351  Float_t maxCellFraction = 0.;
352  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells,calo,maxCellFraction);
353 
354  Double_t tmax = cells->GetCellTime(absIdMax);
355  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
356  tmax*=1.e9;
357 
358  // Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
359  if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30)
360  {
361  for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
362  {
363  Int_t absId = calo->GetCellsAbsId()[ipos];
364 
365  if( absId == absIdMax ) continue ;
366 
367  Double_t timecell = cells->GetCellTime(absId);
368  Float_t amp = cells->GetCellAmplitude(absId);
369  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
370  GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,timecell,cells);
371  timecell*=1e9;
372 
373  Float_t diff = (tmax-timecell);
374 
375  if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
376 
377  if(GetReader()->IsPileUpFromSPD())
378  {
379  fhPtCellTimePileUp[0]->Fill(pt, timecell, GetEventWeight());
380  fhPtTimeDiffPileUp[0]->Fill(pt, diff , GetEventWeight());
381  }
382 
383  if(GetReader()->IsPileUpFromEMCal())
384  {
385  fhPtCellTimePileUp[1]->Fill(pt, timecell, GetEventWeight());
386  fhPtTimeDiffPileUp[1]->Fill(pt, diff , GetEventWeight());
387  }
388 
389  if(GetReader()->IsPileUpFromSPDOrEMCal())
390  {
391  fhPtCellTimePileUp[2]->Fill(pt, timecell, GetEventWeight());
392  fhPtTimeDiffPileUp[2]->Fill(pt, diff , GetEventWeight());
393  }
394 
395  if(GetReader()->IsPileUpFromSPDAndEMCal())
396  {
397  fhPtCellTimePileUp[3]->Fill(pt, timecell, GetEventWeight());
398  fhPtTimeDiffPileUp[3]->Fill(pt, diff , GetEventWeight());
399  }
400 
401  if(GetReader()->IsPileUpFromSPDAndNotEMCal())
402  {
403  fhPtCellTimePileUp[4]->Fill(pt, timecell, GetEventWeight());
404  fhPtTimeDiffPileUp[4]->Fill(pt, diff , GetEventWeight());
405  }
406 
407  if(GetReader()->IsPileUpFromEMCalAndNotSPD())
408  {
409  fhPtCellTimePileUp[5]->Fill(pt, timecell, GetEventWeight());
410  fhPtTimeDiffPileUp[5]->Fill(pt, diff , GetEventWeight());
411  }
412 
413  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal())
414  {
415  fhPtCellTimePileUp[6]->Fill(pt, timecell, GetEventWeight());
416  fhPtTimeDiffPileUp[6]->Fill(pt, diff , GetEventWeight());
417  }
418  }//loop
419  }
420 
421  if(pt < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
422 
423  AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
424  AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
425 
426  // N pile up vertices
427  Int_t nVtxSPD = -1;
428  Int_t nVtxTrk = -1;
429 
430  if (esdEv)
431  {
432  nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
433  nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
434 
435  } // ESD
436  else if (aodEv)
437  {
438  nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
439  nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
440  } // AOD
441 
442  fhTimeNPileUpVertSPD ->Fill(time, nVtxSPD, GetEventWeight());
443  fhTimeNPileUpVertTrack->Fill(time, nVtxTrk, GetEventWeight());
444 
445  fhPtNPileUpSPDVtx->Fill(pt, nVtxSPD, GetEventWeight());
446  fhPtNPileUpTrkVtx->Fill(pt, nVtxTrk, GetEventWeight());
447 
448  if(TMath::Abs(time) < 25)
449  {
450  fhPtNPileUpSPDVtxTimeCut ->Fill(pt, nVtxSPD, GetEventWeight());
451  fhPtNPileUpTrkVtxTimeCut ->Fill(pt, nVtxTrk, GetEventWeight());
452  }
453 
454  if(time < 75 && time > -25)
455  {
456  fhPtNPileUpSPDVtxTimeCut2->Fill(pt, nVtxSPD, GetEventWeight());
457  fhPtNPileUpTrkVtxTimeCut2->Fill(pt, nVtxTrk, GetEventWeight());
458  }
459 
460  //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
461  // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTracks);
462 
463  Int_t ncont = -1;
464  Float_t z1 = -1, z2 = -1;
465  Float_t diamZ = -1;
466  for(Int_t iVert=0; iVert<nVtxSPD;iVert++)
467  {
468  if (esdEv)
469  {
470  const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
471  ncont=pv->GetNContributors();
472  z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
473  z2 = pv->GetZ();
474  diamZ = esdEv->GetDiamondZ();
475  }//ESD
476  else if (aodEv)
477  {
478  AliAODVertex *pv=aodEv->GetVertex(iVert);
479  if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
480  ncont=pv->GetNContributors();
481  z1=aodEv->GetPrimaryVertexSPD()->GetZ();
482  z2=pv->GetZ();
483  diamZ = aodEv->GetDiamondZ();
484  } // AOD
485 
486  Double_t distZ = TMath::Abs(z2-z1);
487  diamZ = TMath::Abs(z2-diamZ);
488 
489  fhTimeNPileUpVertContributors ->Fill(time, ncont, GetEventWeight());
490  fhTimePileUpMainVertexZDistance->Fill(time, distZ, GetEventWeight());
491  fhTimePileUpMainVertexZDiamond ->Fill(time, diamZ, GetEventWeight());
492 
493  } // vertex loop
494 }
495 
496 //__________________________________________________________________________
499 //__________________________________________________________________________
501 {
502  Float_t ener = fMomentum.E();
503  Float_t pt = fMomentum.Pt();
504 
505  Float_t phi = fMomentum.Phi();
506  if(phi < 0) phi+=TMath::TwoPi();
507 
508  Float_t eta = fMomentum.Eta();
509 
510  fhPtReject ->Fill(pt , GetEventWeight());
511  fhEReject ->Fill(ener, GetEventWeight());
512 
513  fhPtEtaReject ->Fill(pt , eta, GetEventWeight());
514  fhPtPhiReject ->Fill(pt , phi, GetEventWeight());
515  fhEtaPhiReject ->Fill(eta, phi, GetEventWeight());
516 
517  fhNLocMaxPtReject->Fill(pt, nMaxima, GetEventWeight());
518 
519  if(IsDataMC())
520  {
521  Int_t mcIndex = GetMCIndex(mctag);
522  fhMCEReject [mcIndex] ->Fill(ener, GetEventWeight());
523  fhMCPtReject [mcIndex] ->Fill(pt , GetEventWeight());
524 
525  if(fFillAllNLMHistograms) fhMCNLocMaxPtReject[mcIndex]->Fill(pt, nMaxima, GetEventWeight());
526  }
527 }
528 
529 //_______________________________________________________________________________________________
531 //_______________________________________________________________________________________________
532 void AliAnaPi0EbE::FillSelectedClusterHistograms(AliVCluster* cluster, Float_t pt, Int_t nMaxima,
533  Int_t tag, Float_t asy)
534 {
535  Float_t ener = cluster->E();
536  Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
537  Float_t l0 = cluster->GetM02();
538  Float_t l1 = cluster->GetM20();
539  Int_t nSM = GetModuleNumber(cluster);
540 
541  Int_t ptbin = -1;
542  if (pt < 2 ) ptbin = 0;
543  else if (pt < 4 ) ptbin = 1;
544  else if (pt < 6 ) ptbin = 2;
545  else if (pt < 10) ptbin = 3;
546  else if (pt < 15) ptbin = 4;
547  else if (pt < 20) ptbin = 5;
548  else ptbin = 6;
549 
550  Int_t indexMax = -1;
551  if (nMaxima==1) indexMax = 0 ;
552  else if(nMaxima==2) indexMax = 1 ;
553  else indexMax = 2 ;
554 
555  FillWeightHistograms(cluster);
556 
557  fhPtLambda0->Fill(pt, l0, GetEventWeight());
558  fhPtLambda1->Fill(pt, l1, GetEventWeight());
559 
560  fhNLocMaxPt->Fill(pt, nMaxima, GetEventWeight());
561 
563  {
564  if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
565  fhNLocMaxPtSM[nSM]->Fill(pt, nMaxima, GetEventWeight());
566 
567  fhPtLambda0LocMax [indexMax]->Fill(pt, l0, GetEventWeight());
568  fhPtLambda1LocMax [indexMax]->Fill(pt, l1, GetEventWeight());
569  }
570 
571  Float_t ll0 = 0., ll1 = 0.;
572  Float_t dispp= 0., dEta = 0., dPhi = 0.;
573  Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
574  AliVCaloCells * cell = 0x0;
575  Float_t maxCellFraction = 0;
576 
578  {
579  cell = GetEMCALCells();
580 
581  GetCaloUtils()->GetMaxEnergyCell(cell, cluster, maxCellFraction);
582  fhPtFracMaxCell->Fill(pt, maxCellFraction, GetEventWeight());
583 
584  if(maxCellFraction < 0.5)
585  fhPtLambda0FracMaxCellCut->Fill(pt, l0, GetEventWeight());
586 
587  GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(),
588  cell, cluster,
589  ll0, ll1, dispp, dEta, dPhi,
590  sEta, sPhi, sEtaPhi);
591  fhPtDispersion -> Fill(pt, disp , GetEventWeight());
592  fhPtDispEta -> Fill(pt, dEta , GetEventWeight());
593  fhPtDispPhi -> Fill(pt, dPhi , GetEventWeight());
594  fhPtSumEta -> Fill(pt, sEta , GetEventWeight());
595  fhPtSumPhi -> Fill(pt, sPhi , GetEventWeight());
596  fhPtSumEtaPhi -> Fill(pt, sEtaPhi , GetEventWeight());
597  fhPtDispEtaPhiDiff-> Fill(pt, dPhi-dEta, GetEventWeight());
598  if(dEta+dPhi>0)
599  fhPtSphericity-> Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
600 
601  fhDispEtaDispPhi[ptbin]->Fill(dEta, dPhi, GetEventWeight());
602  fhLambda0DispEta[ptbin]->Fill(l0 , dEta, GetEventWeight());
603  fhLambda0DispPhi[ptbin]->Fill(l0 , dPhi, GetEventWeight());
604 
605  if (fAnaType==kSSCalo)
606  {
607  // Asymmetry histograms
608  fhAsymmetryLambda0[ptbin]->Fill(l0 , asy, GetEventWeight());
609  fhAsymmetryDispEta[ptbin]->Fill(dEta, asy, GetEventWeight());
610  fhAsymmetryDispPhi[ptbin]->Fill(dPhi, asy, GetEventWeight());
611  }
612 
614  {
615  fhPtDispersionLocMax [indexMax]->Fill(pt, disp , GetEventWeight());
616  fhPtDispEtaLocMax [indexMax]->Fill(pt, dEta , GetEventWeight());
617  fhPtDispPhiLocMax [indexMax]->Fill(pt, dPhi , GetEventWeight());
618  fhPtSumEtaPhiLocMax [indexMax]->Fill(pt, sEtaPhi , GetEventWeight());
619  fhPtDispEtaPhiDiffLocMax[indexMax]->Fill(pt, dPhi-dEta, GetEventWeight());
620  if(dEta+dPhi>0)
621  fhPtSphericityLocMax[indexMax]->Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
622  if(fAnaType==kSSCalo)
623  fhPtAsymmetryLocMax [indexMax]->Fill(pt, asy, GetEventWeight());
624  }
625  }
626 
627  if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
629  {
630  fhPtLambda0NoTRD ->Fill(pt, l0, GetEventWeight());
632  fhPtFracMaxCellNoTRD->Fill(pt, maxCellFraction, GetEventWeight());
633  }
634 
635  fhPtTime ->Fill(pt, cluster->GetTOF()*1.e9, GetEventWeight());
636  fhPtNCells->Fill(pt, cluster->GetNCells() , GetEventWeight());
637 
638  // Fill Track matching control histograms
639  if(fFillTMHisto)
640  {
641  Float_t dZ = cluster->GetTrackDz();
642  Float_t dR = cluster->GetTrackDx();
643 
644 // if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
645 // {
646 // dR = 2000., dZ = 2000.;
647 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
648 // }
649  //printf("Pi0EbE: dPhi %f, dEta %f\n",dR,dZ);
650 
651  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
652 
653  Bool_t positive = kFALSE;
654  if(track) positive = (track->Charge()>0);
655 
656  if(fhTrackMatchedDEta && TMath::Abs(dR) < 999)
657  {
658  fhTrackMatchedDEta->Fill(pt, dZ, GetEventWeight());
659  fhTrackMatchedDPhi->Fill(pt, dR, GetEventWeight());
660  if(ener > 0.5)
661  fhTrackMatchedDEtaDPhi->Fill(dZ, dR, GetEventWeight());
662 
663  if(track)
664  {
665  if(positive)
666  {
667  fhTrackMatchedDEtaPos->Fill(pt, dZ, GetEventWeight());
668  fhTrackMatchedDPhiPos->Fill(pt, dR, GetEventWeight());
669  if(ener > 0.5)
670  fhTrackMatchedDEtaDPhiPos->Fill(dZ, dR, GetEventWeight());
671  }
672  else
673  {
674  fhTrackMatchedDEtaNeg->Fill(pt, dZ, GetEventWeight());
675  fhTrackMatchedDPhiNeg->Fill(pt, dR, GetEventWeight());
676  if(ener > 0.5)
677  fhTrackMatchedDEtaDPhiNeg->Fill(dZ, dR, GetEventWeight());
678  }
679  }
680  }
681 
682  // Check dEdx and E/p of matched clusters
683 
684  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
685  {
686  if(track)
687  {
688  Float_t dEdx = track->GetTPCsignal();
689  fhdEdx->Fill(pt, dEdx, GetEventWeight());
690 
691  Float_t eOverp = cluster->E()/track->P();
692  fhEOverP->Fill(pt, eOverp, GetEventWeight());
693 
694  // Change nSM for year > 2011 (< 4 in 2012-13, none after)
695  if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
697  fhEOverPNoTRD->Fill(pt, eOverp, GetEventWeight());
698 
699  }
700  //else
701  // printf("AliAnaPi0EbE::FillSelectedClusterHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
702 
703  if(IsDataMC())
704  {
705  Float_t mctag = -1;
706  if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
707  {
708  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
709  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 2.5 ;
710  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 0.5 ;
711  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 1.5 ;
712  else mctag = 3.5 ;
713 
714  }
715  else
716  {
717  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
718  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 6.5 ;
719  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 4.5 ;
720  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 5.5 ;
721  else mctag = 7.5 ;
722  }
723 
724  fhTrackMatchedMCParticlePt ->Fill(pt, mctag, GetEventWeight());
725  fhTrackMatchedMCParticleDEta->Fill(dZ, mctag, GetEventWeight());
726  fhTrackMatchedMCParticleDPhi->Fill(dR, mctag, GetEventWeight());
727 
728  } // MC
729  }
730  } // Track matching histograms
731 
732  if(IsDataMC())
733  {
734  Int_t mcIndex = GetMCIndex(tag);
735 
736  fhMCPtLambda0[mcIndex] ->Fill(pt, l0, GetEventWeight());
737  fhMCPtLambda1[mcIndex] ->Fill(pt, l1, GetEventWeight());
739  fhMCPtLambda0LocMax[mcIndex][indexMax]->Fill(pt, l0, GetEventWeight());
740 
741  if(GetCalorimeter()==kEMCAL &&
742  GetFirstSMCoveredByTRD() >= 0 &&
744  fhMCPtLambda0NoTRD[mcIndex]->Fill(pt, l0, GetEventWeight());
745 
747  {
748  if(maxCellFraction < 0.5)
749  fhMCPtLambda0FracMaxCellCut[mcIndex]->Fill(pt, l0, GetEventWeight());
750 
751  fhMCPtFracMaxCell [mcIndex]->Fill(pt, maxCellFraction, GetEventWeight());
752 
753  fhMCPtDispersion [mcIndex]->Fill(pt, disp , GetEventWeight());
754  fhMCPtDispEta [mcIndex]->Fill(pt, dEta , GetEventWeight());
755  fhMCPtDispPhi [mcIndex]->Fill(pt, dPhi , GetEventWeight());
756  fhMCPtSumEtaPhi [mcIndex]->Fill(pt, sEtaPhi , GetEventWeight());
757  fhMCPtDispEtaPhiDiff [mcIndex]->Fill(pt, dPhi-dEta, GetEventWeight());
758  if(dEta+dPhi > 0)
759  fhMCPtSphericity[mcIndex]-> Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
760 
761  if (fAnaType==kSSCalo)
762  {
763  fhMCAsymmetryLambda0[ptbin][mcIndex]->Fill(l0 , asy, GetEventWeight());
764  fhMCAsymmetryDispEta[ptbin][mcIndex]->Fill(dEta, asy, GetEventWeight());
765  fhMCAsymmetryDispPhi[ptbin][mcIndex]->Fill(dPhi, asy, GetEventWeight());
766  }
767 
768  fhMCDispEtaDispPhi[ptbin][mcIndex]->Fill(dEta, dPhi, GetEventWeight());
769  fhMCLambda0DispEta[ptbin][mcIndex]->Fill(l0 , dEta, GetEventWeight());
770  fhMCLambda0DispPhi[ptbin][mcIndex]->Fill(l0 , dPhi, GetEventWeight());
771  } // only SS simple?
772  } // MC
773 }
774 
775 //________________________________________________________
777 //________________________________________________________
778 void AliAnaPi0EbE::FillWeightHistograms(AliVCluster *clus)
779 {
780  if(!fFillWeightHistograms || GetMixedEvent()) return;
781 
782  AliVCaloCells* cells = 0;
783  if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
784  else cells = GetPHOSCells();
785 
786  // First recalculate energy in case non linearity was applied
787  Float_t energy = 0;
788  Float_t ampMax = 0;
789  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
790  {
791 
792  Int_t id = clus->GetCellsAbsId()[ipos];
793 
794  // Recalibrate cell energy if needed
795  Float_t amp = cells->GetCellAmplitude(id);
797 
798  energy += amp;
799 
800  if(amp> ampMax)
801  ampMax = amp;
802 
803  } // energy loop
804 
805  if(energy <=0 )
806  {
807  AliInfo(Form("Wrong calculated energy %f",energy));
808  return;
809  }
810 
811  fhEMaxCellClusterRatio ->Fill(energy, ampMax/energy , GetEventWeight());
812  fhEMaxCellClusterLogRatio->Fill(energy, TMath::Log(ampMax/energy), GetEventWeight());
813 
814  // Get the ratio and log ratio to all cells in cluster
815  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
816  {
817  Int_t id = clus->GetCellsAbsId()[ipos];
818 
819  // Recalibrate cell energy if needed
820  Float_t amp = cells->GetCellAmplitude(id);
822 
823  fhECellClusterRatio ->Fill(energy, amp/energy , GetEventWeight());
824  fhECellClusterLogRatio->Fill(energy, TMath::Log(amp/energy), GetEventWeight());
825  }
826 
827  // Recalculate shower shape for different W0
828  if ( GetCalorimeter() == kEMCAL )
829  {
830  Float_t l0org = clus->GetM02();
831  Float_t l1org = clus->GetM20();
832  Float_t dorg = clus->GetDispersion();
833 
834  for(Int_t iw = 0; iw < 14; iw++)
835  {
836  GetCaloUtils()->GetEMCALRecoUtils()->SetW0(1+iw*0.5);
837  GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), cells, clus);
838 
839  fhLambda0ForW0[iw]->Fill(energy, clus->GetM02(), GetEventWeight());
840 // fhLambda1ForW0[iw]->Fill(energy, clus->GetM20(), GetEventWeight());
841 
842  } // w0 loop
843 
844  // Set the original values back
845  clus->SetM02(l0org);
846  clus->SetM20(l1org);
847  clus->SetDispersion(dorg);
848 
849  } // EMCAL
850 }
851 
852 //__________________________________________
854 //__________________________________________
856 {
857  TString parList ; // this will be list of parameters used for this analysis.
858  const Int_t buffersize = 255;
859  char onePar[buffersize] ;
860 
861  snprintf(onePar,buffersize,"--- AliAnaPi0EbE ---\n") ;
862  parList+=onePar ;
863  snprintf(onePar,buffersize,"fAnaType=%d (selection type) \n",fAnaType) ;
864  parList+=onePar ;
865  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
866  parList+=onePar ;
867  snprintf(onePar,buffersize,"Local maxima in cluster: %d < nlm < %d;",fNLMCutMin,fNLMCutMax) ;
868  parList+=onePar ;
869 
870  if(fAnaType == kSSCalo)
871  {
872  snprintf(onePar,buffersize,"E cut: %2.2f<E<%2.2f;",GetMinEnergy(),GetMaxEnergy()) ;
873  parList+=onePar ;
874  snprintf(onePar,buffersize,"N cell cut: N > %d;",GetCaloPID()->GetClusterSplittingMinNCells()) ;
875  parList+=onePar ;
876  snprintf(onePar,buffersize,"Min Dist to Bad channel: fMinDist =%2.2f; fMinDist2=%2.2f, fMinDist3=%2.2f;",fMinDist, fMinDist2,fMinDist3) ;
877  parList+=onePar ;
878  snprintf(onePar,buffersize,"Min E cut for NLM cases: 1) %2.2f; 2) %2.2f; 3) %2.2f;",fNLMECutMin[0],fNLMECutMin[1],fNLMECutMin[2]) ;
879  parList+=onePar ;
880  snprintf(onePar,buffersize,"Reject Matched tracks?: %d;",fRejectTrackMatch) ;
881  parList+=onePar ;
882  snprintf(onePar,buffersize,"Reject split cluster close to border or bad?: %d;",fCheckSplitDistToBad) ;
883  parList+=onePar ;
884  snprintf(onePar,buffersize,"Time cut: %2.2f<t<%2.2f;",fTimeCutMin,fTimeCutMax) ;
885  parList+=onePar ;
886 
887  // Get parameters set in PID class.
888  parList += GetCaloPID()->GetPIDParametersList() ;
889  }
890  else if(fAnaType == kIMCalo || fAnaType == kIMCaloTracks)
891  {
892  snprintf(onePar,buffersize,"Select %s;", (GetNeutralMesonSelection()->GetParticle()).Data()) ;
893  parList+=onePar ;
894  snprintf(onePar,buffersize,"Mass cut: %2.2f<M<%2.2f;",GetNeutralMesonSelection()->GetInvMassMinCut() ,GetNeutralMesonSelection()->GetInvMassMaxCut()) ;
895  parList+=onePar ;
896  }
897  else if(fAnaType == kIMCaloTracks)
898  {
899  snprintf(onePar,buffersize,"Photon Conv Array: %s;",fInputAODGammaConvName.Data()) ;
900  parList+=onePar ;
901  }
902  else if(fAnaType == kIMCalo)
903  {
904  snprintf(onePar,buffersize,"Time Diff: %2.2f;",GetPairTimeCut()) ;
905  parList+=onePar ;
906  }
907 
908  // Get parameters set in base class.
909  //parList += GetBaseParametersList() ;
910 
911  return new TObjString(parList) ;
912 }
913 
914 //_____________________________________________
915 // Create histograms to be saved in output file and
916 // store them in outputContainer.
917 //_____________________________________________
919 {
920  TList * outputContainer = new TList() ;
921  outputContainer->SetName("Pi0EbEHistos") ;
922 
930 
931  Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins();
934 
941 
942  Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
945  Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
948 
949  Int_t ntimptbins = GetHistogramRanges()->GetHistoTimeBins();
952 
953  TString nlm[] = {"1 Local Maxima","2 Local Maxima", "NLM > 2"};
954 
955  TString ptype [] = {"#pi^{0}", "#eta", "#gamma (direct)","#gamma (#pi^{0})", "#gamma (#eta)", "#gamma (other)", "e^{#pm}" , "hadron/other combinations"};
956  TString pname [] = {"Pi0" , "Eta" , "Photon" ,"Pi0Decay" , "EtaDecay" , "OtherDecay" , "Electron", "Hadron"};
957 
958  Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins
959 
960  fhPt = new TH1F("hPt","Number of identified #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
961  fhPt->SetYTitle("#it{N}");
962  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
963  outputContainer->Add(fhPt) ;
964 
965  fhE = new TH1F("hE","Number of identified #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
966  fhE->SetYTitle("#it{N}");
967  fhE->SetXTitle("#it{E} (GeV)");
968  outputContainer->Add(fhE) ;
969 
970  fhPtPhi = new TH2F
971  ("hPtPhi","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
972  fhPtPhi->SetYTitle("#phi (rad)");
973  fhPtPhi->SetXTitle("#it{E} (GeV)");
974  outputContainer->Add(fhPtPhi) ;
975 
976  fhPtEta = new TH2F
977  ("hPtEta","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
978  fhPtEta->SetYTitle("#eta");
979  fhPtEta->SetXTitle("#it{E} (GeV)");
980  outputContainer->Add(fhPtEta) ;
981 
982  fhEtaPhi = new TH2F
983  ("hEtaPhi","Selected #pi^{0} (#eta) pairs: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
984  fhEtaPhi->SetYTitle("#phi (rad)");
985  fhEtaPhi->SetXTitle("#eta");
986  outputContainer->Add(fhEtaPhi) ;
987 
989  {
990  fhEtaPhiEMCALBC0 = new TH2F
991  ("hEtaPhiEMCALBC0","cluster, #it{E} > 2 GeV, #eta vs #phi, for clusters with |#it{t}| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
992  fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)");
993  fhEtaPhiEMCALBC0->SetXTitle("#eta");
994  outputContainer->Add(fhEtaPhiEMCALBC0) ;
995 
996  fhEtaPhiEMCALBC1 = new TH2F
997  ("hEtaPhiEMCALBC1","cluster, #it{E} > 2 GeV, #eta vs #phi, for clusters with 25 < |#it{t}| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
998  fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)");
999  fhEtaPhiEMCALBC1->SetXTitle("#eta");
1000  outputContainer->Add(fhEtaPhiEMCALBC1) ;
1001 
1002  fhEtaPhiEMCALBCN = new TH2F
1003  ("hEtaPhiEMCALBCN","cluster, #it{E} > 2 GeV, #eta vs #phi, for clusters with |#it{t}| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
1004  fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)");
1005  fhEtaPhiEMCALBCN->SetXTitle("#eta");
1006  outputContainer->Add(fhEtaPhiEMCALBCN) ;
1007 
1008  for(Int_t i = 0; i < 11; i++)
1009  {
1010  fhEtaPhiTriggerEMCALBC[i] = new TH2F
1011  (Form("hEtaPhiTriggerEMCALBC%d",i-5),
1012  Form("meson #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
1013  netabins,etamin,etamax,nphibins,phimin,phimax);
1014  fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
1015  fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
1016  outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
1017 
1018  fhTimeTriggerEMCALBC[i] = new TH2F
1019  (Form("hTimeTriggerEMCALBC%d",i-5),
1020  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1021  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1022  fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
1023  fhTimeTriggerEMCALBC[i]->SetYTitle("#it{t} (ns)");
1024  outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1025 
1027  (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
1028  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1029  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1030  fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1031  fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{t} (ns)");
1032  outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
1033 
1035  (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
1036  Form("meson #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
1037  netabins,etamin,etamax,nphibins,phimin,phimax);
1038  fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
1039  fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1040  outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1041 
1042  fhTimeTriggerEMCALBCUM[i] = new TH2F
1043  (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
1044  Form("meson #it{t} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-5),
1045  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1046  fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1047  fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{t} (ns)");
1048  outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
1049 
1050  }
1051 
1052  fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
1053  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time",
1054  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1055  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
1056  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{t} (ns)");
1057  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
1058 
1059 
1060  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
1061  "cluster #it{t} vs #it{E} of clusters, no match, rematch with neigbour parches",
1062  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1063  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
1064  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{t} (ns)");
1065  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
1066 
1067  fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
1068  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time and neigbour",
1069  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1070  fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
1071  fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{t} (ns)");
1072  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
1073 
1074  }
1075 
1077  {
1078  fhPtCentrality = new TH2F("hPtCentrality","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1079  fhPtCentrality->SetYTitle("centrality");
1080  fhPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1081  outputContainer->Add(fhPtCentrality) ;
1082 
1083  fhPtEventPlane = new TH2F("hPtEventPlane","event plane angle vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1084  fhPtEventPlane->SetYTitle("Event plane angle (rad)");
1085  fhPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1086  outputContainer->Add(fhPtEventPlane) ;
1087  }
1088 
1089  if(fAnaType == kSSCalo)
1090  {
1091  fhPtReject = new TH1F("hPtReject","Number of rejected as #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
1092  fhPtReject->SetYTitle("#it{N}");
1093  fhPtReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1094  outputContainer->Add(fhPtReject) ;
1095 
1096  fhEReject = new TH1F("hEReject","Number of rejected as #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
1097  fhEReject->SetYTitle("#it{N}");
1098  fhEReject->SetXTitle("#it{E} (GeV)");
1099  outputContainer->Add(fhEReject) ;
1100 
1101  fhPtPhiReject = new TH2F
1102  ("hPtPhiReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1103  fhPtPhiReject->SetYTitle("#phi (rad)");
1104  fhPtPhiReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1105  outputContainer->Add(fhPtPhiReject) ;
1106 
1107  fhPtEtaReject = new TH2F
1108  ("hPtEtaReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1109  fhPtEtaReject->SetYTitle("#eta");
1110  fhPtEtaReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1111  outputContainer->Add(fhPtEtaReject) ;
1112 
1113  fhEtaPhiReject = new TH2F
1114  ("hEtaPhiReject","Rejected #pi^{0} (#eta) cluster: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
1115  fhEtaPhiReject->SetYTitle("#phi (rad)");
1116  fhEtaPhiReject->SetXTitle("#eta");
1117  outputContainer->Add(fhEtaPhiReject) ;
1118 
1119  fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
1120  nptbins,ptmin,ptmax,20,0,20);
1121  fhNLocMaxPtReject ->SetYTitle("N maxima");
1122  fhNLocMaxPtReject ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1123  outputContainer->Add(fhNLocMaxPtReject) ;
1124  }
1125 
1126  fhMass = new TH2F
1127  ("hMass","all pairs #it{M}: #it{E} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1128  fhMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1129  fhMass->SetXTitle("#it{E} (GeV)");
1130  outputContainer->Add(fhMass) ;
1131 
1132  fhSelectedMass = new TH2F
1133  ("hSelectedMass","Selected #pi^{0} (#eta) pairs #it{M}: E vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1134  fhSelectedMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1135  fhSelectedMass->SetXTitle("#it{E} (GeV)");
1136  outputContainer->Add(fhSelectedMass) ;
1137 
1138  fhMassPt = new TH2F
1139  ("hMassPt","all pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1140  fhMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1141  fhMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1142  outputContainer->Add(fhMassPt) ;
1143 
1144  fhMassPtMaxPair = new TH2F
1145  ("hMassPtMaxPair","all pairs #it{M}: #it{p}_{T}^{max} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1146  fhMassPtMaxPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1147  fhMassPtMaxPair->SetXTitle("#it{p}_{T}^{max} (GeV/#it{c})");
1148  outputContainer->Add(fhMassPtMaxPair) ;
1149 
1150  fhMassPtMinPair = new TH2F
1151  ("hMassPtMinPair","all pairs #it{M}: #it{p}_{T}^{min} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1152  fhMassPtMinPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1153  fhMassPtMinPair->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1154  outputContainer->Add(fhMassPtMinPair) ;
1155 
1156  fhSelectedMassPt = new TH2F
1157  ("hSelectedMassPt","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1158  fhSelectedMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1159  fhSelectedMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1160  outputContainer->Add(fhSelectedMassPt) ;
1161 
1163  {
1164  fhMassPtIsoRCut = new TH2F
1165  ("hMassPtIsoRCut",Form("#it{M}: #it{p}_{T} vs #it{M}, for R = %1.1f, #it{p}_{T,1} < %2.2f",fR,fIsoCandMinPt),
1166  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1167  fhMassPtIsoRCut->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1168  fhMassPtIsoRCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1169  outputContainer->Add(fhMassPtIsoRCut) ;
1170  }
1171 
1172  if(fAnaType == kSSCalo)
1173  {
1175  ("hPtLambda0NoSplitCut","all clusters: #it{p}_{T} vs #lambda_{0}^{2}",nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1176  fhPtLambda0NoSplitCut->SetYTitle("#lambda_{0}^{2}");
1177  fhPtLambda0NoSplitCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1178  outputContainer->Add(fhPtLambda0NoSplitCut) ;
1179 
1180  for(Int_t inlm = 0; inlm < 3; inlm++)
1181  {
1182  fhMassPtLocMax[inlm] = new TH2F
1183  (Form("hMassPtNLocMax%d",inlm+1),Form("all pairs #it{M}: #it{p}_{T} vs #it{M} and NLM=%s",nlm[inlm].Data()),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1184  fhMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1185  fhMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1186  outputContainer->Add(fhMassPtLocMax[inlm]) ;
1187 
1188  fhSelectedMassPtLocMax[inlm] = new TH2F
1189  (Form("hSelectedMassPtLocMax%d",inlm+1),Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s",nlm[inlm].Data()),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1190  fhSelectedMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1191  fhSelectedMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1192  outputContainer->Add(fhSelectedMassPtLocMax[inlm]) ;
1193 
1195  {
1196  for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
1197  {
1198  fhSelectedMassPtLocMaxSM[inlm][iSM] = new TH2F
1199  (Form("hSelectedMassPtLocMax%d_SM%d",inlm+1,iSM),Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s for SM=%d",nlm[inlm].Data(),iSM),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1200  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1201  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1202  outputContainer->Add(fhSelectedMassPtLocMaxSM[inlm][iSM]) ;
1203 
1204  fhSelectedLambda0PtLocMaxSM[inlm][iSM] = new TH2F
1205  (Form("hSelectedLambda0PtLocMax%d_SM%d",inlm+1,iSM),Form("Selected #pi^{0} (#eta) pairs #lambda_{0}^{2}: #it{p}_{T} vs #it{M}, NLM=%s for SM=%d",nlm[inlm].Data(),iSM),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1206  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetYTitle("#lambda_{0}^{2}");
1207  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1208  outputContainer->Add(fhSelectedLambda0PtLocMaxSM[inlm][iSM]) ;
1209  }
1210  }
1211 
1212  if(IsDataMC())
1213  {
1214  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1215  {
1216  fhMCSelectedMassPtLocMax[ipart][inlm] = new TH2F
1217  (Form("hSelectedMassPtLocMax%d_MC%s",inlm+1,pname[ipart].Data()),
1218  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s, from MC %s",nlm[inlm].Data(),ptype[ipart].Data()),
1219  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1220  fhMCSelectedMassPtLocMax[ipart][inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1221  fhMCSelectedMassPtLocMax[ipart][inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1222  outputContainer->Add(fhMCSelectedMassPtLocMax[ipart][inlm]) ;
1223  }
1224  }
1225  }
1226 
1227  if(IsDataMC())
1228  {
1229  fhMassNoOverlap = new TH2F
1230  ("hMassNoOverlap","all pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1231  fhMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1232  fhMassNoOverlap->SetXTitle("#it{E} (GeV)");
1233  outputContainer->Add(fhMassNoOverlap) ;
1234 
1236  ("hSelectedMassNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1237  fhSelectedMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1238  fhSelectedMassNoOverlap->SetXTitle("#it{E} (GeV)");
1239  outputContainer->Add(fhSelectedMassNoOverlap) ;
1240 
1241  fhMassPtNoOverlap = new TH2F
1242  ("hMassPtNoOverlap","all pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1243  fhMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1244  fhMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1245  outputContainer->Add(fhMassPtNoOverlap) ;
1246 
1248  ("hSelectedMassPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1249  fhSelectedMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1250  fhSelectedMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1251  outputContainer->Add(fhSelectedMassPtNoOverlap) ;
1252  }
1253  }
1254 
1255  if(fAnaType != kSSCalo)
1256  {
1257  fhPtDecay = new TH1F("hPtDecay","Selected #pi^{0} (#eta) decay photons",nptbins,ptmin,ptmax);
1258  fhPtDecay->SetYTitle("#it{N}");
1259  fhPtDecay->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1260  outputContainer->Add(fhPtDecay) ;
1261 
1262  if(IsDataMC())
1263  {
1264  fhMCPtDecayLostPairPi0 = new TH1F("hPtDecay_MCPi0DecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #pi^{0} decay, companion lost",
1265  nptbins,ptmin,ptmax);
1266  fhMCPtDecayLostPairPi0->SetYTitle("#it{N}");
1267  fhMCPtDecayLostPairPi0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1268  outputContainer->Add(fhMCPtDecayLostPairPi0) ;
1269 
1270  fhMCPtDecayLostPairEta = new TH1F("hPtDecay_MCEtaDecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #eta decay, companion lost",
1271  nptbins,ptmin,ptmax);
1272  fhMCPtDecayLostPairEta->SetYTitle("#it{N}");
1273  fhMCPtDecayLostPairEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1274  outputContainer->Add(fhMCPtDecayLostPairEta) ;
1275 
1276  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1277  {
1278  fhMCPtDecay[ipart] = new TH1F(Form("hPtDecay_MC%s",pname[ipart].Data()),
1279  Form("Selected #pi^{0} (#eta) decay photons, from MC %s",ptype[ipart].Data()),
1280  nptbins,ptmin,ptmax);
1281  fhMCPtDecay[ipart]->SetYTitle("#it{N}");
1282  fhMCPtDecay[ipart]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1283  outputContainer->Add(fhMCPtDecay[ipart]) ;
1284  }
1285  }
1286  }
1287 
1289 
1290  if( fFillSelectClHisto )
1291  {
1292  fhPtLambda0 = new TH2F
1293  ("hPtLambda0","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1294  fhPtLambda0->SetYTitle("#lambda_{0}^{2}");
1295  fhPtLambda0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1296  outputContainer->Add(fhPtLambda0) ;
1297 
1298  fhPtLambda1 = new TH2F
1299  ("hPtLambda1","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1300  fhPtLambda1->SetYTitle("#lambda_{1}^{2}");
1301  fhPtLambda1->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1302  outputContainer->Add(fhPtLambda1) ;
1303 
1305  {
1306  fhPtLambda0NoTRD = new TH2F
1307  ("hPtLambda0NoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, not behind TRD",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1308  fhPtLambda0NoTRD->SetYTitle("#lambda_{0}^{2}");
1309  fhPtLambda0NoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1310  outputContainer->Add(fhPtLambda0NoTRD) ;
1311 
1313  {
1315  ("hPtFracMaxCellNoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy, not behind TRD",nptbins,ptmin,ptmax,100,0,1);
1316  fhPtFracMaxCellNoTRD->SetYTitle("Fraction");
1317  fhPtFracMaxCellNoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1318  outputContainer->Add(fhPtFracMaxCellNoTRD) ;
1319  }
1320  }
1321 
1323  {
1324  fhPtDispersion = new TH2F
1325  ("hPtDispersion","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1326  fhPtDispersion->SetYTitle("D^{2}");
1327  fhPtDispersion->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1328  outputContainer->Add(fhPtDispersion) ;
1329 
1331  ("hPtLambda0FracMaxCellCut","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy < 0.5",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1332  fhPtLambda0FracMaxCellCut->SetYTitle("#lambda_{0}^{2}");
1333  fhPtLambda0FracMaxCellCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1334  outputContainer->Add(fhPtLambda0FracMaxCellCut) ;
1335 
1336  fhPtFracMaxCell = new TH2F
1337  ("hPtFracMaxCell","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy",nptbins,ptmin,ptmax,100,0,1);
1338  fhPtFracMaxCell->SetYTitle("Fraction");
1339  fhPtFracMaxCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1340  outputContainer->Add(fhPtFracMaxCell) ;
1341 
1342  fhPtDispEta = new TH2F ("hPtDispEta","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1343  fhPtDispEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1344  fhPtDispEta->SetYTitle("#sigma^{2}_{#eta #eta}");
1345  outputContainer->Add(fhPtDispEta);
1346 
1347  fhPtDispPhi = new TH2F ("hPtDispPhi","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1348  fhPtDispPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1349  fhPtDispPhi->SetYTitle("#sigma^{2}_{#phi #phi}");
1350  outputContainer->Add(fhPtDispPhi);
1351 
1352  fhPtSumEta = new TH2F ("hPtSumEta","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1353  fhPtSumEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1354  fhPtSumEta->SetYTitle("#delta^{2}_{#eta #eta}");
1355  outputContainer->Add(fhPtSumEta);
1356 
1357  fhPtSumPhi = new TH2F ("hPtSumPhi","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs #it{p}_{T}",
1358  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1359  fhPtSumPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1360  fhPtSumPhi->SetYTitle("#delta^{2}_{#phi #phi}");
1361  outputContainer->Add(fhPtSumPhi);
1362 
1363  fhPtSumEtaPhi = new TH2F ("hPtSumEtaPhi","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs #it{p}_{T}",
1364  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1365  fhPtSumEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1366  fhPtSumEtaPhi->SetYTitle("#delta^{2}_{#eta #phi}");
1367  outputContainer->Add(fhPtSumEtaPhi);
1368 
1369  fhPtDispEtaPhiDiff = new TH2F ("hPtDispEtaPhiDiff","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",
1370  nptbins,ptmin,ptmax,200, -10,10);
1371  fhPtDispEtaPhiDiff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1372  fhPtDispEtaPhiDiff->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1373  outputContainer->Add(fhPtDispEtaPhiDiff);
1374 
1375  fhPtSphericity = new TH2F ("hPtSphericity","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs #it{p}_{T} (GeV/#it{c})",
1376  nptbins,ptmin,ptmax, 200, -1,1);
1377  fhPtSphericity->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1378  fhPtSphericity->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1379  outputContainer->Add(fhPtSphericity);
1380 
1381  for(Int_t i = 0; i < 7; i++)
1382  {
1383  fhDispEtaDispPhi[i] = new TH2F (Form("hDispEtaDispPhi_EBin%d",i),Form("#sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]),
1384  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1385  fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1386  fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1387  outputContainer->Add(fhDispEtaDispPhi[i]);
1388 
1389  fhLambda0DispEta[i] = new TH2F (Form("hLambda0DispEta_EBin%d",i),Form("#lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]),
1390  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1391  fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1392  fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1393  outputContainer->Add(fhLambda0DispEta[i]);
1394 
1395  fhLambda0DispPhi[i] = new TH2F (Form("hLambda0DispPhi_EBin%d",i),Form("#lambda^{2}_{0}} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",bin[i],bin[i+1]),
1396  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1397  fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1398  fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1399  outputContainer->Add(fhLambda0DispPhi[i]);
1400  }
1401  }
1402 
1403  fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
1404  nptbins,ptmin,ptmax,20,0,20);
1405  fhNLocMaxPt ->SetYTitle("N maxima");
1406  fhNLocMaxPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1407  outputContainer->Add(fhNLocMaxPt) ;
1408 
1410  {
1411  for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
1412  {
1413  fhNLocMaxPtSM[iSM] = new TH2F(Form("hNLocMaxPt_SM%d",iSM),Form("Number of local maxima in cluster, selected clusters in SM %d",iSM),
1414  nptbins,ptmin,ptmax,20,0,20);
1415  fhNLocMaxPtSM[iSM] ->SetYTitle("N maxima");
1416  fhNLocMaxPtSM[iSM] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1417  outputContainer->Add(fhNLocMaxPtSM[iSM]) ;
1418  }
1419 
1420  for (Int_t i = 0; i < 3; i++)
1421  {
1422  fhPtLambda0LocMax[i] = new TH2F(Form("hPtLambda0LocMax%d",i+1),
1423  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s",nlm[i].Data()),
1424  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1425  fhPtLambda0LocMax[i]->SetYTitle("#lambda_{0}^{2}");
1426  fhPtLambda0LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1427  outputContainer->Add(fhPtLambda0LocMax[i]) ;
1428 
1429  if(IsDataMC())
1430  {
1431  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1432  {
1433  fhMCPtLambda0LocMax[ipart][i] = new TH2F
1434  (Form("hPtLambda0LocMax%d_MC%s",i+1,pname[ipart].Data()),
1435  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s, MC %s",nlm[i].Data(),ptype[ipart].Data()),
1436  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1437  fhMCPtLambda0LocMax[ipart][i]->SetYTitle("#lambda_{0}^{2}");
1438  fhMCPtLambda0LocMax[ipart][i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1439  outputContainer->Add(fhMCPtLambda0LocMax[ipart][i]) ;
1440  }
1441  }
1442 
1443  fhPtLambda1LocMax[i] = new TH2F(Form("hPtLambda1LocMax%d",i+1),
1444  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}, %s",nlm[i].Data()),
1445  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1446  fhPtLambda1LocMax[i]->SetYTitle("#lambda_{1}^{2}");
1447  fhPtLambda1LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1448  outputContainer->Add(fhPtLambda1LocMax[i]) ;
1449 
1451  {
1452  fhPtDispersionLocMax[i] = new TH2F(Form("hPtDispersionLocMax%d",i+1),
1453  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion^{2}, %s",nlm[i].Data()),
1454  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1455  fhPtDispersionLocMax[i]->SetYTitle("dispersion^{2}");
1456  fhPtDispersionLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1457  outputContainer->Add(fhPtDispersionLocMax[i]) ;
1458 
1459  fhPtDispEtaLocMax[i] = new TH2F(Form("hPtDispEtaLocMax%d",i+1),
1460  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #eta}, %s",nlm[i].Data()),
1461  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1462  fhPtDispEtaLocMax[i]->SetYTitle("#sigma_{#eta #eta}");
1463  fhPtDispEtaLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1464  outputContainer->Add(fhPtDispEtaLocMax[i]) ;
1465 
1466  fhPtDispPhiLocMax[i] = new TH2F(Form("hPtDispPhiLocMax%d",i+1),
1467  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi}, %s",nlm[i].Data()),
1468  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1469  fhPtDispPhiLocMax[i]->SetYTitle("#sigma_{#phi #phi}");
1470  fhPtDispPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1471  outputContainer->Add(fhPtDispPhiLocMax[i]) ;
1472 
1473  fhPtSumEtaPhiLocMax[i] = new TH2F(Form("hPtSumEtaPhiLocMax%d",i+1),
1474  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #phi}, %s",nlm[i].Data()),
1475  nptbins,ptmin,ptmax,2*ssbins,-ssmax,ssmax);
1476  fhPtSumEtaPhiLocMax[i]->SetYTitle("#sigma_{#eta #phi}");
1477  fhPtSumEtaPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1478  outputContainer->Add(fhPtSumEtaPhiLocMax[i]) ;
1479 
1480  fhPtDispEtaPhiDiffLocMax[i] = new TH2F(Form("hPtDispEtaPhiDiffLocMax%d",i+1),
1481  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi} - #sigma_{#eta #eta}, %s",nlm[i].Data()),
1482  nptbins,ptmin,ptmax,200, -10,10);
1483  fhPtDispEtaPhiDiffLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta}");
1484  fhPtDispEtaPhiDiffLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1485  outputContainer->Add(fhPtDispEtaPhiDiffLocMax[i]) ;
1486 
1487  fhPtSphericityLocMax[i] = new TH2F(Form("hPtSphericityLocMax%d",i+1),
1488  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi} - #sigma_{#eta #eta} / (#sigma_{#phi #phi} + #sigma_{#eta #eta}), %s",nlm[i].Data()),
1489  nptbins,ptmin,ptmax,200, -1,1);
1490  fhPtSphericityLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta} / (#sigma_{#phi #phi} + #sigma_{#eta #eta})");
1491  fhPtSphericityLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1492  outputContainer->Add(fhPtSphericityLocMax[i]) ;
1493  }
1494  }
1495  } // all NLM histos
1496 
1497  fhPtNCells = new TH2F ("hPtNCells","N cells in cluster vs E ", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1498  fhPtNCells->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1499  fhPtNCells->SetYTitle("# of cells in cluster");
1500  outputContainer->Add(fhPtNCells);
1501 
1502  fhPtTime = new TH2F("hPtTime","cluster time vs pair E",nptbins,ptmin,ptmax, tbins,tmin,tmax);
1503  fhPtTime->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1504  fhPtTime->SetYTitle("t (ns)");
1505  outputContainer->Add(fhPtTime);
1506 
1507  }
1508 
1509  if(fAnaType != kIMCaloTracks)
1510  {
1511  fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs E",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1512  fhEPairDiffTime->SetXTitle("#it{E}_{pair} (GeV)");
1513  fhEPairDiffTime->SetYTitle("#Delta t (ns)");
1514  outputContainer->Add(fhEPairDiffTime);
1515  }
1516 
1517  if(fAnaType == kIMCalo)
1518  {
1519  TString combiName [] = {"1LocMax","2LocMax","NLocMax","1LocMax2LocMax","1LocMaxNLocMax","2LocMaxNLocMax","1LocMaxSSBad","NLocMaxSSGood"};
1520  TString combiTitle[] = {"1 Local Maxima in both clusters","2 Local Maxima in both clusters","more than 2 Local Maxima in both clusters",
1521  "1 Local Maxima paired with 2 Local Maxima","1 Local Maxima paired with more than 2 Local Maxima",
1522  "2 Local Maxima paired with more than 2 Local Maxima",
1523  "1 Local Maxima paired with #lambda_{0}^{2}>0.3","N Local Maxima paired with 0.1<#lambda_{0}^{2}<0.3"};
1524 
1526  {
1527  for (Int_t i = 0; i < 8 ; i++)
1528  {
1529  if (fAnaType == kIMCaloTracks && i > 2 ) continue ;
1530 
1531  fhMassPairLocMax[i] = new TH2F
1532  (Form("MassPairLocMax%s",combiName[i].Data()),
1533  Form("#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}, %s", combiTitle[i].Data()),
1534  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1535  fhMassPairLocMax[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1536  fhMassPairLocMax[i]->SetXTitle("#it{E}_{pair} (GeV)");
1537  outputContainer->Add(fhMassPairLocMax[i]) ;
1538  }
1539  }
1540  }
1541 
1542  if(fFillTMHisto)
1543  {
1544  fhTrackMatchedDEta = new TH2F
1545  ("hTrackMatchedDEta",
1546  "d#eta of cluster-track vs cluster #it{p}_{T}",
1547  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1548  fhTrackMatchedDEta->SetYTitle("d#eta");
1549  fhTrackMatchedDEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1550 
1551  fhTrackMatchedDPhi = new TH2F
1552  ("hTrackMatchedDPhi",
1553  "d#phi of cluster-track vs cluster #it{p}_{T}",
1554  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1555  fhTrackMatchedDPhi->SetYTitle("d#phi (rad)");
1556  fhTrackMatchedDPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1557 
1559  ("hTrackMatchedDEtaDPhi",
1560  "d#eta vs d#phi of cluster-track",
1561  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1562  fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)");
1563  fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
1564 
1565  outputContainer->Add(fhTrackMatchedDEta) ;
1566  outputContainer->Add(fhTrackMatchedDPhi) ;
1567  outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
1568 
1570  ("hTrackMatchedDEtaPos",
1571  "d#eta of cluster-track vs cluster #it{p}_{T}",
1572  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1573  fhTrackMatchedDEtaPos->SetYTitle("d#eta");
1574  fhTrackMatchedDEtaPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1575 
1577  ("hTrackMatchedDPhiPos",
1578  "d#phi of cluster-track vs cluster #it{p}_{T}",
1579  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1580  fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)");
1581  fhTrackMatchedDPhiPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1582 
1584  ("hTrackMatchedDEtaDPhiPos",
1585  "d#eta vs d#phi of cluster-track",
1586  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1587  fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)");
1588  fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
1589 
1590  outputContainer->Add(fhTrackMatchedDEtaPos) ;
1591  outputContainer->Add(fhTrackMatchedDPhiPos) ;
1592  outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
1593 
1595  ("hTrackMatchedDEtaNeg",
1596  "d#eta of cluster-track vs cluster #it{p}_{T}",
1597  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1598  fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
1599  fhTrackMatchedDEtaNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1600 
1602  ("hTrackMatchedDPhiNeg",
1603  "d#phi of cluster-track vs cluster #it{p}_{T}",
1604  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1605  fhTrackMatchedDPhiNeg->SetYTitle("d#phi (rad)");
1606  fhTrackMatchedDPhiNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1607 
1609  ("hTrackMatchedDEtaDPhiNeg",
1610  "d#eta vs d#phi of cluster-track",
1611  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1612  fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#phi (rad)");
1613  fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
1614 
1615  outputContainer->Add(fhTrackMatchedDEtaNeg) ;
1616  outputContainer->Add(fhTrackMatchedDPhiNeg) ;
1617  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
1618 
1619  fhdEdx = new TH2F ("hdEdx","matched track <dE/dx> vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1620  fhdEdx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1621  fhdEdx->SetYTitle("<#it{dE}/#it{dx}>");
1622  outputContainer->Add(fhdEdx);
1623 
1624  fhEOverP = new TH2F ("hEOverP","matched track E/p vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1625  fhEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1626  fhEOverP->SetYTitle("#it{E}/#it{p}");
1627  outputContainer->Add(fhEOverP);
1628 
1630  {
1631  fhEOverPNoTRD = new TH2F ("hEOverPNoTRD","matched track E/p vs cluster E, SM not behind TRD ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1632  fhEOverPNoTRD->SetXTitle("#it{E} (GeV)");
1633  fhEOverPNoTRD->SetYTitle("#it{E}/#it{p}");
1634  outputContainer->Add(fhEOverPNoTRD);
1635  }
1636 
1637  if(IsDataMC() && fFillTMHisto)
1638  {
1640  ("hTrackMatchedMCParticlePt",
1641  "Origin of particle vs energy",
1642  nptbins,ptmin,ptmax,8,0,8);
1643  fhTrackMatchedMCParticlePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1644  //fhTrackMatchedMCParticlePt->SetYTitle("Particle type");
1645 
1646  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(1 ,"Photon");
1647  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(2 ,"Electron");
1648  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1649  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(4 ,"Rest");
1650  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1651  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1652  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1653  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1654 
1655  outputContainer->Add(fhTrackMatchedMCParticlePt);
1656 
1658  ("hTrackMatchedMCParticleDEta",
1659  "Origin of particle vs #eta residual",
1660  nresetabins,resetamin,resetamax,8,0,8);
1661  fhTrackMatchedMCParticleDEta->SetXTitle("#Delta #eta");
1662  //fhTrackMatchedMCParticleDEta->SetYTitle("Particle type");
1663 
1664  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(1 ,"Photon");
1665  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(2 ,"Electron");
1666  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1667  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(4 ,"Rest");
1668  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1669  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1670  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1671  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1672 
1673  outputContainer->Add(fhTrackMatchedMCParticleDEta);
1674 
1676  ("hTrackMatchedMCParticleDPhi",
1677  "Origin of particle vs #phi residual",
1678  nresphibins,resphimin,resphimax,8,0,8);
1679  fhTrackMatchedMCParticleDPhi->SetXTitle("#Delta #phi");
1680  //fhTrackMatchedMCParticleDPhi->SetYTitle("Particle type");
1681 
1682  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(1 ,"Photon");
1683  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(2 ,"Electron");
1684  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1685  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(4 ,"Rest");
1686  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1687  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1688  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1689  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1690 
1691  outputContainer->Add(fhTrackMatchedMCParticleDPhi);
1692  }
1693  }
1694 
1696  {
1697  fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1698  nptbins,ptmin,ptmax, 100,0,1.);
1699  fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1700  fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
1701  outputContainer->Add(fhECellClusterRatio);
1702 
1703  fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1704  nptbins,ptmin,ptmax, 100,-10,0);
1705  fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1706  fhECellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1707  outputContainer->Add(fhECellClusterLogRatio);
1708 
1709  fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1710  nptbins,ptmin,ptmax, 100,0,1.);
1711  fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1712  fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
1713  outputContainer->Add(fhEMaxCellClusterRatio);
1714 
1715  fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1716  nptbins,ptmin,ptmax, 100,-10,0);
1717  fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1718  fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1719  outputContainer->Add(fhEMaxCellClusterLogRatio);
1720 
1721  for(Int_t iw = 0; iw < 14; iw++)
1722  {
1723  fhLambda0ForW0[iw] = new TH2F (Form("hLambda0ForW0%d",iw),Form("shower shape, #lambda^{2}_{0} vs E, w0 = %1.1f, for selected decay photons from neutral meson",1+0.5*iw),
1724  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1725  fhLambda0ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1726  fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}");
1727  outputContainer->Add(fhLambda0ForW0[iw]);
1728 
1729  // fhLambda1ForW0[iw] = new TH2F (Form("hLambda1ForW0%d",iw),Form("shower shape, #lambda^{2}_{1} vs E, w0 = %1.1f, for selected decay photons from neutral meson",0.5+0.5*iw),
1730  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1731  // fhLambda1ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1732  // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}");
1733  // outputContainer->Add(fhLambda1ForW0[iw]);
1734  }
1735  }
1736 
1737  if(IsDataMC())
1738  {
1739  // Origin
1740 
1741  fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1742  fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1743  fhMCPi0PtOrigin->SetYTitle("Origin");
1744  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1745  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1746  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1747  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1748  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1749  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1750  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1751  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1752  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1753  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1754  outputContainer->Add(fhMCPi0PtOrigin) ;
1755 
1756  fhMCNotResonancePi0PtOrigin = new TH2F("hMCNotResonancePi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1757  fhMCNotResonancePi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1758  fhMCNotResonancePi0PtOrigin->SetYTitle("Origin");
1759  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1760  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1761  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1762  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1763  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1764  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1765  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1766  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1767  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1768  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1769  outputContainer->Add(fhMCNotResonancePi0PtOrigin) ;
1770 
1771  fhMCPi0PtStatus = new TH2F("hMCPi0PtStatus","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs status",nptbins,ptmin,ptmax,101,-50,50) ;
1772  fhMCPi0PtStatus->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1773  fhMCPi0PtStatus->SetYTitle("Status");
1774  outputContainer->Add(fhMCPi0PtStatus) ;
1775 
1776  fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ;
1777  fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1778  fhMCEtaPtOrigin->SetYTitle("Origin");
1779  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1780  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1781  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1782  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1783  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other");
1784  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime");
1785  outputContainer->Add(fhMCEtaPtOrigin) ;
1786 
1787  fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1788  fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1789  fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)");
1790  outputContainer->Add(fhMCPi0ProdVertex) ;
1791 
1792  fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1793  fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1794  fhMCEtaProdVertex->SetYTitle("#it{R} (cm)");
1795  outputContainer->Add(fhMCEtaProdVertex) ;
1796 
1797  if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
1798  {
1799  fhMCPi0PtGenRecoFraction = new TH2F("hMCPi0PtGenRecoFraction","Number of clusters from #pi^{0} (2 #gamma) identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #pi^{0} / E reco",
1800  nptbins,ptmin,ptmax,200,0,2);
1801  fhMCPi0PtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1802  fhMCPi0PtGenRecoFraction->SetYTitle("#it{E}^{#pi^{0} mother} / #it{E}^{rec}");
1803  outputContainer->Add(fhMCPi0PtGenRecoFraction) ;
1804 
1805  fhMCEtaPtGenRecoFraction = new TH2F("hMCEtaPtGenRecoFraction","Number of clusters from #eta (2 #gamma) identified as #pi^{0} (#eta),#it{p}_{T} versus E primary #eta / E reco",
1806  nptbins,ptmin,ptmax,200,0,2);
1807  fhMCEtaPtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1808  fhMCEtaPtGenRecoFraction->SetYTitle("#it{E}^{ #eta mother} / #it{E}^{rec}");
1809  outputContainer->Add(fhMCEtaPtGenRecoFraction) ;
1810 
1811  fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1812  fhMCPi0DecayPt->SetYTitle("#it{N}");
1813  fhMCPi0DecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1814  outputContainer->Add(fhMCPi0DecayPt) ;
1815 
1816  fhMCPi0DecayPtFraction = new TH2F("hMCPi0DecayPtFraction","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #gamma / #it{E} primary #pi^{0}",
1817  nptbins,ptmin,ptmax,100,0,1);
1818  fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/#it{c})");
1819  fhMCPi0DecayPtFraction->SetYTitle("E^{gen} / E^{gen-mother}");
1820  outputContainer->Add(fhMCPi0DecayPtFraction) ;
1821 
1822  fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #eta decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1823  fhMCEtaDecayPt->SetYTitle("#it{N}");
1824  fhMCEtaDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1825  outputContainer->Add(fhMCEtaDecayPt) ;
1826 
1827  fhMCEtaDecayPtFraction = new TH2F("hMCEtaDecayPtFraction","Number of #gamma from #eta decay identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #gamma / E primary #eta",
1828  nptbins,ptmin,ptmax,100,0,1);
1829  fhMCEtaDecayPtFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1830  fhMCEtaDecayPtFraction->SetYTitle("#it{E}^{gen} / #it{E}^{gen-mother}");
1831  outputContainer->Add(fhMCEtaDecayPtFraction) ;
1832 
1833  fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma decay (not #eta or #pi^{0}) identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1834  fhMCOtherDecayPt->SetYTitle("#it{N}");
1835  fhMCOtherDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1836  outputContainer->Add(fhMCOtherDecayPt) ;
1837  }
1838 
1839  if(fAnaType!=kSSCalo)
1840  {
1841  fhAnglePairMCPi0 = new TH2F
1842  ("AnglePairMCPi0",
1843  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5);
1844  fhAnglePairMCPi0->SetYTitle("#alpha (rad)");
1845  fhAnglePairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1846  outputContainer->Add(fhAnglePairMCPi0) ;
1847 
1848  fhAnglePairMCEta = new TH2F
1849  ("AnglePairMCEta",
1850  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,250,0,0.5);
1851  fhAnglePairMCEta->SetYTitle("#alpha (rad)");
1852  fhAnglePairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1853  outputContainer->Add(fhAnglePairMCEta) ;
1854 
1855  fhMassPairMCPi0 = new TH2F
1856  ("MassPairMCPi0",
1857  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1858  fhMassPairMCPi0->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1859  fhMassPairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1860  outputContainer->Add(fhMassPairMCPi0) ;
1861 
1862  fhMassPairMCEta = new TH2F
1863  ("MassPairMCEta",
1864  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1865  fhMassPairMCEta->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1866  fhMassPairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1867  outputContainer->Add(fhMassPairMCEta) ;
1868  }
1869 
1870  Int_t ntypes = fgkNmcTypes;
1871  if(fAnaType != kSSCalo) ntypes = 2;
1872 
1873  for(Int_t i = 0; i < ntypes; i++)
1874  {
1875  fhMCE[i] = new TH1F
1876  (Form("hE_MC%s",pname[i].Data()),
1877  Form("Identified as #pi^{0} (#eta), cluster from %s",
1878  ptype[i].Data()),
1879  nptbins,ptmin,ptmax);
1880  fhMCE[i]->SetYTitle("#it{N}");
1881  fhMCE[i]->SetXTitle("#it{E} (GeV)");
1882  outputContainer->Add(fhMCE[i]) ;
1883 
1884  fhMCPt[i] = new TH1F
1885  (Form("hPt_MC%s",pname[i].Data()),
1886  Form("Identified as #pi^{0} (#eta), cluster from %s",
1887  ptype[i].Data()),
1888  nptbins,ptmin,ptmax);
1889  fhMCPt[i]->SetYTitle("#it{N}");
1890  fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1891  outputContainer->Add(fhMCPt[i]) ;
1892 
1894  {
1895  fhMCPtCentrality[i] = new TH2F
1896  (Form("hPtCentrality_MC%s",pname[i].Data()),
1897  Form("Identified as #pi^{0} (#eta), cluster from %s",
1898  ptype[i].Data()),
1899  nptbins,ptmin,ptmax, 100,0,100);
1900  fhMCPtCentrality[i]->SetYTitle("centrality");
1901  fhMCPtCentrality[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1902  outputContainer->Add(fhMCPtCentrality[i]) ;
1903  }
1904 
1905  if(fAnaType == kSSCalo)
1906  {
1907  fhMCNLocMaxPt[i] = new TH2F
1908  (Form("hNLocMaxPt_MC%s",pname[i].Data()),
1909  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, accepted",ptype[i].Data()),
1910  nptbins,ptmin,ptmax,20,0,20);
1911  fhMCNLocMaxPt[i] ->SetYTitle("#it{NLM}");
1912  fhMCNLocMaxPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1913  outputContainer->Add(fhMCNLocMaxPt[i]) ;
1914 
1915  fhMCNLocMaxPtReject[i] = new TH2F
1916  (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
1917  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, rejected",ptype[i].Data()),
1918  nptbins,ptmin,ptmax,20,0,20);
1919  fhMCNLocMaxPtReject[i] ->SetYTitle("#it{NLM}");
1920  fhMCNLocMaxPtReject[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1921  outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
1922 
1923  fhMCEReject[i] = new TH1F
1924  (Form("hEReject_MC%s",pname[i].Data()),
1925  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1926  ptype[i].Data()),
1927  nptbins,ptmin,ptmax);
1928  fhMCEReject[i]->SetYTitle("#it{N}");
1929  fhMCEReject[i]->SetXTitle("#it{E} (GeV)");
1930  outputContainer->Add(fhMCEReject[i]) ;
1931 
1932  fhMCPtReject[i] = new TH1F
1933  (Form("hPtReject_MC%s",pname[i].Data()),
1934  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1935  ptype[i].Data()),
1936  nptbins,ptmin,ptmax);
1937  fhMCPtReject[i]->SetYTitle("#it{N}");
1938  fhMCPtReject[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1939  outputContainer->Add(fhMCPtReject[i]) ;
1940  }
1941 
1942  fhMCPtPhi[i] = new TH2F
1943  (Form("hPtPhi_MC%s",pname[i].Data()),
1944  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
1945  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1946  fhMCPtPhi[i]->SetYTitle("#phi");
1947  fhMCPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1948  outputContainer->Add(fhMCPtPhi[i]) ;
1949 
1950  fhMCPtEta[i] = new TH2F
1951  (Form("hPtEta_MC%s",pname[i].Data()),
1952  Form("Identified as #pi^{0} (#eta), cluster from %s",
1953  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
1954  fhMCPtEta[i]->SetYTitle("#eta");
1955  fhMCPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1956  outputContainer->Add(fhMCPtEta[i]) ;
1957 
1958  fhMCMassPt[i] = new TH2F
1959  (Form("hMassPt_MC%s",pname[i].Data()),
1960  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1961  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1962  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1963  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1964  outputContainer->Add(fhMCMassPt[i]) ;
1965 
1966  fhMCSelectedMassPt[i] = new TH2F
1967  (Form("hSelectedMassPt_MC%s",pname[i].Data()),
1968  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1969  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1970  fhMCSelectedMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1971  fhMCSelectedMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1972  outputContainer->Add(fhMCSelectedMassPt[i]) ;
1973 
1974  if(fAnaType == kSSCalo)
1975  {
1976  fhMCMassPtNoOverlap[i] = new TH2F
1977  (Form("hMassPtNoOverlap_MC%s",pname[i].Data()),
1978  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1979  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1980  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1981  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1982  outputContainer->Add(fhMCMassPtNoOverlap[i]) ;
1983 
1985  (Form("hSelectedMassPtNoOverlap_MC%s",pname[i].Data()),
1986  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1987  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1988  fhMCSelectedMassPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1989  fhMCSelectedMassPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1990  outputContainer->Add(fhMCSelectedMassPtNoOverlap[i]) ;
1991  }
1992 
1993  if( fFillSelectClHisto )
1994  {
1995  fhMCPtLambda0[i] = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
1996  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptype[i].Data()),
1997  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1998  fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
1999  fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2000  outputContainer->Add(fhMCPtLambda0[i]) ;
2001 
2002  fhMCPtLambda1[i] = new TH2F(Form("hELambda1_MC%s",pname[i].Data()),
2003  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{1}^{2}",ptype[i].Data()),
2004  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2005  fhMCPtLambda1[i]->SetYTitle("#lambda_{1}^{2}");
2006  fhMCPtLambda1[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2007  outputContainer->Add(fhMCPtLambda1[i]) ;
2008 
2010  {
2011  fhMCPtLambda0NoTRD[i] = new TH2F(Form("hELambda0NoTRD_MC%s",pname[i].Data()),
2012  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, NoTRD",ptype[i].Data()),
2013  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2014  fhMCPtLambda0NoTRD[i]->SetYTitle("#lambda_{0}^{2}");
2015  fhMCPtLambda0NoTRD[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2016  outputContainer->Add(fhMCPtLambda0NoTRD[i]) ;
2017  }
2018 
2020  {
2021  fhMCPtDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pname[i].Data()),
2022  Form("Selected pair, cluster from %s : #it{p}_{T} vs dispersion^{2}",ptype[i].Data()),
2023  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2024  fhMCPtDispersion[i]->SetYTitle("#it{D}^{2}");
2025  fhMCPtDispersion[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2026  outputContainer->Add(fhMCPtDispersion[i]) ;
2027 
2028  fhMCPtDispEta[i] = new TH2F (Form("hPtDispEta_MC%s",pname[i].Data()),
2029  Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs #it{p}_{T}",ptype[i].Data()),
2030  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2031  fhMCPtDispEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2032  fhMCPtDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2033  outputContainer->Add(fhMCPtDispEta[i]);
2034 
2035  fhMCPtDispPhi[i] = new TH2F (Form("hPtDispPhi_MC%s",pname[i].Data()),
2036  Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs #it{p}_{T}",ptype[i].Data()),
2037  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2038  fhMCPtDispPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2039  fhMCPtDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2040  outputContainer->Add(fhMCPtDispPhi[i]);
2041 
2042  fhMCPtSumEtaPhi[i] = new TH2F (Form("hPtSumEtaPhi_MC%s",pname[i].Data()),
2043  Form("cluster from %s : #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs #it{p}_{T}",ptype[i].Data()),
2044  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2045  fhMCPtSumEtaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2046  fhMCPtSumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
2047  outputContainer->Add(fhMCPtSumEtaPhi[i]);
2048 
2049  fhMCPtDispEtaPhiDiff[i] = new TH2F (Form("hPtDispEtaPhiDiff_MC%s",pname[i].Data()),
2050  Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",ptype[i].Data()),
2051  nptbins,ptmin,ptmax,200,-10,10);
2052  fhMCPtDispEtaPhiDiff[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2053  fhMCPtDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
2054  outputContainer->Add(fhMCPtDispEtaPhiDiff[i]);
2055 
2056  fhMCPtSphericity[i] = new TH2F (Form("hPtSphericity_MC%s",pname[i].Data()),
2057  Form("cluster from %s : (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",ptype[i].Data()),
2058  nptbins,ptmin,ptmax, 200,-1,1);
2059  fhMCPtSphericity[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2060  fhMCPtSphericity[i]->SetYTitle("#it{s} = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
2061  outputContainer->Add(fhMCPtSphericity[i]);
2062 
2063  for(Int_t ie = 0; ie < 7; ie++)
2064  {
2065  fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2066  Form("cluster from %s : #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2067  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2068  fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2069  fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2070  outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2071 
2072  fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pname[i].Data()),
2073  Form("cluster from %s : #lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2074  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2075  fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2076  fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2077  outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2078 
2079  fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2080  Form("cluster from %s :#lambda^{2}_{0} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2081  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2082  fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2083  fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2084  outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2085  }
2086 
2087  fhMCPtLambda0FracMaxCellCut[i] = new TH2F(Form("hELambda0FracMaxCellCut_MC%s",pname[i].Data()),
2088  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, Max cell fraction of energy < 0.5 ",ptype[i].Data()),
2089  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2090  fhMCPtLambda0FracMaxCellCut[i]->SetYTitle("#lambda_{0}^{2}");
2091  fhMCPtLambda0FracMaxCellCut[i]->SetXTitle("#it{E} (GeV)");
2092  outputContainer->Add(fhMCPtLambda0FracMaxCellCut[i]) ;
2093 
2094  fhMCPtFracMaxCell[i] = new TH2F(Form("hEFracMaxCell_MC%s",pname[i].Data()),
2095  Form("Selected pair, cluster from %s : #it{p}_{T} vs Max cell fraction of energy",ptype[i].Data()),
2096  nptbins,ptmin,ptmax,100,0,1);
2097  fhMCPtFracMaxCell[i]->SetYTitle("#it{Fraction}");
2098  fhMCPtFracMaxCell[i]->SetXTitle("#it{E} (GeV)");
2099  outputContainer->Add(fhMCPtFracMaxCell[i]) ;
2100  }
2101  }
2102  }// MC particle loop
2103  }//Histos with MC
2104 
2105  if(fAnaType==kSSCalo)
2106  {
2107  fhAsymmetry = new TH2F ("hAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2108  nptbins,ptmin,ptmax, 200, -1,1);
2109  fhAsymmetry->SetXTitle("#it{E} (GeV)");
2110  fhAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2111  outputContainer->Add(fhAsymmetry);
2112 
2113  fhSelectedAsymmetry = new TH2F ("hSelectedAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2114  nptbins,ptmin,ptmax, 200, -1,1);
2115  fhSelectedAsymmetry->SetXTitle("#it{E} (GeV)");
2116  fhSelectedAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2117  outputContainer->Add(fhSelectedAsymmetry);
2118 
2119  fhSplitE = new TH1F
2120  ("hSplitE","Selected #pi^{0} (#eta) pairs energy sum of split sub-clusters",nptbins,ptmin,ptmax);
2121  fhSplitE->SetYTitle("counts");
2122  fhSplitE->SetXTitle("#it{E} (GeV)");
2123  outputContainer->Add(fhSplitE) ;
2124 
2125  fhSplitPt = new TH1F
2126  ("hSplitPt","Selected #pi^{0} (#eta) pairs #it{p}_{T} sum of split sub-clusters",nptbins,ptmin,ptmax);
2127  fhSplitPt->SetYTitle("counts");
2128  fhSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2129  outputContainer->Add(fhSplitPt) ;
2130 
2131 
2132  fhSplitPtPhi = new TH2F
2133  ("hSplitPtPhi","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2134  fhSplitPtPhi->SetYTitle("#phi (rad)");
2135  fhSplitPtPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2136  outputContainer->Add(fhSplitPtPhi) ;
2137 
2138  fhSplitPtEta = new TH2F
2139  ("hSplitPtEta","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
2140  fhSplitPtEta->SetYTitle("#eta");
2141  fhSplitPtEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2142  outputContainer->Add(fhSplitPtEta) ;
2143 
2144 
2145  fhNLocMaxSplitPt = new TH2F("hNLocMaxSplitPt","Number of local maxima in cluster",
2146  nptbins,ptmin,ptmax,20,0,20);
2147  fhNLocMaxSplitPt ->SetYTitle("#it{NLM}");
2148  fhNLocMaxSplitPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2149  outputContainer->Add(fhNLocMaxSplitPt) ;
2150 
2151 
2152  fhMassSplitPt = new TH2F
2153  ("hMassSplitPt","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2154  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2155  fhMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2156  fhMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2157  outputContainer->Add(fhMassSplitPt) ;
2158 
2160  ("hSelectedMassSplitPt","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2161  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2162  fhSelectedMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2163  fhSelectedMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2164  outputContainer->Add(fhSelectedMassSplitPt) ;
2165 
2166  if(IsDataMC())
2167  {
2169  ("hMassSplitPtNoOverlap","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2170  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2171  fhMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2172  fhMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2173  outputContainer->Add(fhMassSplitPtNoOverlap) ;
2174 
2176  ("hSelectedMassSplitPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2177  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2178  fhSelectedMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2179  fhSelectedMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2180  outputContainer->Add(fhSelectedMassSplitPtNoOverlap) ;
2181 
2182 
2184  ("hMCPi0PtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2185  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2186  fhMCPi0PtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2187  fhMCPi0PtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2188  outputContainer->Add(fhMCPi0PtRecoPtPrim ) ;
2189 
2191  ("hMCPi0PtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2192  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2193  fhMCPi0PtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2194  fhMCPi0PtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2195  outputContainer->Add(fhMCPi0PtRecoPtPrimNoOverlap ) ;
2196 
2198  ("hMCPi0SelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2199  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2200  fhMCPi0SelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2201  fhMCPi0SelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2202  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrim ) ;
2203 
2205  ("hMCPi0SelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2206  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2207  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2208  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2209  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimNoOverlap ) ;
2210 
2211 
2213  ("hMCPi0SplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2214  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2215  fhMCPi0SplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2216  fhMCPi0SplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2217  outputContainer->Add(fhMCPi0SplitPtRecoPtPrim ) ;
2218 
2220  ("hMCPi0SplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2221  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2222  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2223  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2224  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimNoOverlap ) ;
2225 
2227  ("hMCPi0SelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2228  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2229  fhMCPi0SelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2230  fhMCPi0SelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2231  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrim ) ;
2232 
2234  ("hMCPi0SelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2235  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2236  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2237  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2238  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ) ;
2239 
2241  ("hMCEtaPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2242  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2243  fhMCEtaPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2244  fhMCEtaPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2245  outputContainer->Add(fhMCEtaPtRecoPtPrim ) ;
2246 
2248  ("hMCEtaPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2249  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2250  fhMCEtaPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2251  fhMCEtaPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2252  outputContainer->Add(fhMCEtaPtRecoPtPrimNoOverlap ) ;
2253 
2255  ("hMCEtaSelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2256  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2257  fhMCEtaSelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2258  fhMCEtaSelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2259  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrim ) ;
2260 
2262  ("hMCEtaSelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2263  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2264  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2265  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2266  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimNoOverlap ) ;
2267 
2268 
2270  ("hMCEtaSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2271  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2272  fhMCEtaSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2273  fhMCEtaSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2274  outputContainer->Add(fhMCEtaSplitPtRecoPtPrim ) ;
2275 
2277  ("hMCEtaSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2278  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2279  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2280  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2281  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimNoOverlap ) ;
2282 
2284  ("hMCEtaSelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2285  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2286  fhMCEtaSelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2287  fhMCEtaSelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2288  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrim ) ;
2289 
2291  ("hMCEtaSelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2292  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2293  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2294  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2295  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ) ;
2296 
2297 
2298  for(Int_t inlm = 0; inlm < 3; inlm++)
2299  {
2300  fhMCPi0PtRecoPtPrimLocMax[inlm] = new TH2F
2301  (Form("hMCPi0PtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2302  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2303  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2304  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2305  outputContainer->Add(fhMCPi0PtRecoPtPrimLocMax[inlm] ) ;
2306 
2308  (Form("hMCPi0SelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2309  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2310  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2311  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2312  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ) ;
2313 
2315  (Form("hMCPi0SplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2316  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2317  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2318  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2319  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ) ;
2320 
2322  (Form("hMCPi0SelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2323  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2324  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2325  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2326  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2327 
2328  fhMCEtaPtRecoPtPrimLocMax[inlm] = new TH2F
2329  (Form("hMCEtaPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2330  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2331  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2332  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2333  outputContainer->Add(fhMCEtaPtRecoPtPrimLocMax[inlm] ) ;
2334 
2336  (Form("hMCEtaSelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2337  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2338  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2339  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2340  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ) ;
2341 
2343  (Form("hMCEtaSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2344  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2345  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2346  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2347  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ) ;
2348 
2350  (Form("hMCEtaSelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2351  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2352  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2353  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2354  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2355  }
2356 
2357  for(Int_t i = 0; i < fgkNmcTypes; i++)
2358  {
2359  fhMCPtAsymmetry[i] = new TH2F (Form("hEAsymmetry_MC%s",pname[i].Data()),
2360  Form("cluster from %s : #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",ptype[i].Data()),
2361  nptbins,ptmin,ptmax, 200,-1,1);
2362  fhMCPtAsymmetry[i]->SetXTitle("#it{E} (GeV)");
2363  fhMCPtAsymmetry[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2364  outputContainer->Add(fhMCPtAsymmetry[i]);
2365 
2366  fhMCSplitE[i] = new TH1F
2367  (Form("hSplitE_MC%s",pname[i].Data()),
2368  Form("cluster from %s, energy sum of split sub-clusters",ptype[i].Data()),
2369  nptbins,ptmin,ptmax);
2370  fhMCSplitE[i]->SetYTitle("counts");
2371  fhMCSplitE[i]->SetXTitle("#it{E} (GeV)");
2372  outputContainer->Add(fhMCSplitE[i]) ;
2373 
2374  fhMCSplitPt[i] = new TH1F
2375  (Form("hSplitPt_MC%s",pname[i].Data()),
2376  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters",ptype[i].Data()),
2377  nptbins,ptmin,ptmax);
2378  fhMCSplitPt[i]->SetYTitle("counts");
2379  fhMCSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2380  outputContainer->Add(fhMCSplitPt[i]) ;
2381 
2382 
2383  fhMCSplitPtPhi[i] = new TH2F
2384  (Form("hSplitPtPhi_MC%s",pname[i].Data()),
2385  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
2386  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2387  fhMCSplitPtPhi[i]->SetYTitle("#phi");
2388  fhMCSplitPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2389  outputContainer->Add(fhMCSplitPtPhi[i]) ;
2390 
2391  fhMCSplitPtEta[i] = new TH2F
2392  (Form("hSplitPtEta_MC%s",pname[i].Data()),
2393  Form("Identified as #pi^{0} (#eta), cluster from %s",
2394  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
2395  fhMCSplitPtEta[i]->SetYTitle("#eta");
2396  fhMCSplitPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2397  outputContainer->Add(fhMCSplitPtEta[i]) ;
2398 
2399 
2400  fhMCNLocMaxSplitPt[i] = new TH2F
2401  (Form("hNLocMaxSplitPt_MC%s",pname[i].Data()),
2402  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters, for NLM",ptype[i].Data()),
2403  nptbins,ptmin,ptmax,20,0,20);
2404  fhMCNLocMaxSplitPt[i] ->SetYTitle("#it{NLM}");
2405  fhMCNLocMaxSplitPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2406  outputContainer->Add(fhMCNLocMaxSplitPt[i]) ;
2407 
2408  fhMCMassSplitPt[i] = new TH2F
2409  (Form("hMassSplitPt_MC%s",pname[i].Data()),
2410  Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2411  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2412  fhMCMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2413  fhMCMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2414  outputContainer->Add(fhMCMassSplitPt[i]) ;
2415 
2416  fhMCSelectedMassSplitPt[i] = new TH2F
2417  (Form("hSelectedMassSplitPt_MC%s",pname[i].Data()),
2418  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2419  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2420  fhMCSelectedMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2421  fhMCSelectedMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2422  outputContainer->Add(fhMCSelectedMassSplitPt[i]) ;
2423 
2425  (Form("hMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2426  Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2427  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2428  fhMCMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2429  fhMCMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2430  outputContainer->Add(fhMCMassSplitPtNoOverlap[i]) ;
2431 
2433  (Form("hSelectedMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2434  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2435  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2436  fhMCSelectedMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2437  fhMCSelectedMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2438  outputContainer->Add(fhMCSelectedMassSplitPtNoOverlap[i]) ;
2439  }
2440  }
2441  }
2442 
2444  {
2445  for(Int_t i = 0; i< 3; i++)
2446  {
2447  fhPtAsymmetryLocMax[i] = new TH2F(Form("hEAsymmetryLocMax%d",i+1),
2448  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ), %s",nlm[i].Data()),
2449  nptbins,ptmin,ptmax,200, -1,1);
2450  fhPtAsymmetryLocMax[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2451  fhPtAsymmetryLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2452  outputContainer->Add(fhPtAsymmetryLocMax[i]) ;
2453  }
2454 
2455  for(Int_t ie = 0; ie < 7; ie++)
2456  {
2457 
2458  fhAsymmetryLambda0[ie] = new TH2F (Form("hAsymmetryLambda0_EBin%d",ie),
2459  Form("#lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2460  ssbins,ssmin,ssmax , 200,-1,1);
2461  fhAsymmetryLambda0[ie]->SetXTitle("#lambda_{0}^{2}");
2462  fhAsymmetryLambda0[ie]->SetYTitle("A = ( E1 - E2 ) / ( E1 + E2 )");
2463  outputContainer->Add(fhAsymmetryLambda0[ie]);
2464 
2465  fhAsymmetryDispEta[ie] = new TH2F (Form("hAsymmetryDispEta_EBin%d",ie),
2466  Form("#sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2467  ssbins,ssmin,ssmax , 200,-1,1);
2468  fhAsymmetryDispEta[ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
2469  fhAsymmetryDispEta[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2470  outputContainer->Add(fhAsymmetryDispEta[ie]);
2471 
2472  fhAsymmetryDispPhi[ie] = new TH2F (Form("hAsymmetryDispPhi_EBin%d",ie),
2473  Form("#sigma^{2}_{#phi #phi} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2474  ssbins,ssmin,ssmax , 200,-1,1);
2475  fhAsymmetryDispPhi[ie]->SetXTitle("#sigma^{2}_{#phi #phi}");
2476  fhAsymmetryDispPhi[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2477  outputContainer->Add(fhAsymmetryDispPhi[ie]);
2478  }
2479 
2480 
2481  if(IsDataMC())
2482  {
2483  for(Int_t i = 0; i < fgkNmcTypes; i++)
2484  {
2485  for(Int_t ie = 0; ie < 7; ie++)
2486  {
2487  fhMCAsymmetryLambda0[ie][i] = new TH2F (Form("hMCAsymmetryLambda0_EBin%d_MC%s",ie,pname[i].Data()),
2488  Form("cluster from %s : #lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2489  ssbins,ssmin,ssmax , 200,-1,1);
2490  fhMCAsymmetryLambda0[ie][i]->SetXTitle("#lambda_{0}^{2}");
2491  fhMCAsymmetryLambda0[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2492  outputContainer->Add(fhMCAsymmetryLambda0[ie][i]);
2493 
2494  fhMCAsymmetryDispEta[ie][i] = new TH2F (Form("hMCAsymmetryDispEta_EBin%d_MC%s",ie,pname[i].Data()),
2495  Form("cluster from %s : #sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2496  ssbins,ssmin,ssmax , 200,-1,1);
2497  fhMCAsymmetryDispEta[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2498  fhMCAsymmetryDispEta[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2499  outputContainer->Add(fhMCAsymmetryDispEta[ie][i]);
2500 
2501  fhMCAsymmetryDispPhi[ie][i] = new TH2F (Form("hMCAsymmetryDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2502  Form("cluster from %s : #sigma^{2}_{#phi #phi} vs #it{A} for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2503  ssbins,ssmin,ssmax , 200,-1,1);
2504  fhMCAsymmetryDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#phi #phi}");
2505  fhMCAsymmetryDispPhi[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2506  outputContainer->Add(fhMCAsymmetryDispPhi[ie][i]);
2507  }
2508  }
2509  }
2510  }
2511 
2512  if(IsPileUpAnalysisOn())
2513  {
2514 
2515  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2516 
2517  for(Int_t i = 0 ; i < 7 ; i++)
2518  {
2519  fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
2520  Form("Selected #pi^{0} (#eta) #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
2521  fhPtPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2522  outputContainer->Add(fhPtPileUp[i]);
2523 
2524  fhPtCellTimePileUp[i] = new TH2F(Form("hPtCellTimePileUp%s",pileUpName[i].Data()),
2525  Form("Pt vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()),
2526  nptbins,ptmin,ptmax,ntimptbins,timemin,timemax);
2527  fhPtCellTimePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2528  fhPtCellTimePileUp[i]->SetYTitle("#it{t}_{cell} (ns)");
2529  outputContainer->Add(fhPtCellTimePileUp[i]);
2530 
2531  fhPtTimeDiffPileUp[i] = new TH2F(Form("hPtTimeDiffPileUp%s",pileUpName[i].Data()),
2532  Form("Pt vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2533  nptbins,ptmin,ptmax,400,-200,200);
2534  fhPtTimeDiffPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2535  fhPtTimeDiffPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
2536  outputContainer->Add(fhPtTimeDiffPileUp[i]);
2537  }
2538 
2539  fhTimePtNoCut = new TH2F ("hTimePt_NoCut","#it{t} of cluster vs #it{E} of clusters, no cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2540  fhTimePtNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2541  fhTimePtNoCut->SetYTitle("#it{t} (ns)");
2542  outputContainer->Add(fhTimePtNoCut);
2543 
2544  fhTimePtSPD = new TH2F ("hTimePt_SPD","#it{t} of cluster vs #it{E} of clusters, SPD cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2545  fhTimePtSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2546  fhTimePtSPD->SetYTitle("#it{t} (ns)");
2547  outputContainer->Add(fhTimePtSPD);
2548 
2549  fhTimePtSPDMulti = new TH2F ("hTimePt_SPDMulti","time of cluster vs #it{E} of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2550  fhTimePtSPDMulti->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2551  fhTimePtSPDMulti->SetYTitle("#it{t} (ns)");
2552  outputContainer->Add(fhTimePtSPDMulti);
2553 
2554  fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","#it{t} of cluster vs #it{N} pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2555  fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
2556  fhTimeNPileUpVertSPD->SetXTitle("#it{t} (ns)");
2557  outputContainer->Add(fhTimeNPileUpVertSPD);
2558 
2559  fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","#it{t} of cluster vs #it{N} pile-up Tracks vertex", ntimptbins,timemin,timemax, 50,0,50 );
2560  fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
2561  fhTimeNPileUpVertTrack->SetXTitle("#it{t} (ns)");
2562  outputContainer->Add(fhTimeNPileUpVertTrack);
2563 
2564  fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","#it{t} of cluster vs #it{N} constributors to pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2565  fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
2566  fhTimeNPileUpVertContributors->SetXTitle("#it{t} (ns)");
2567  outputContainer->Add(fhTimeNPileUpVertContributors);
2568 
2569  fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","#it{t} of cluster vs distance in #it{Z} pile-up SPD vertex - main SPD vertex",ntimptbins,timemin,timemax,100,0,50);
2570  fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{Z} (cm) ");
2571  fhTimePileUpMainVertexZDistance->SetXTitle("#it{t} (ns)");
2572  outputContainer->Add(fhTimePileUpMainVertexZDistance);
2573 
2574  fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","#it{t} of cluster vs distance in #it{Z} pile-up SPD vertex - z diamond",ntimptbins,timemin,timemax,100,0,50);
2575  fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{Z} (cm) ");
2576  fhTimePileUpMainVertexZDiamond->SetXTitle("#it{t} (ns)");
2577  outputContainer->Add(fhTimePileUpMainVertexZDiamond);
2578 
2579  fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","#it{p}_{T} of cluster vs #it{N} pile-up SPD vertex",
2580  nptbins,ptmin,ptmax,20,0,20);
2581  fhPtNPileUpSPDVtx->SetYTitle("# vertex ");
2582  fhPtNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2583  outputContainer->Add(fhPtNPileUpSPDVtx);
2584 
2585  fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","#it{p}_{T} of cluster vs #it{N} pile-up Tracks vertex",
2586  nptbins,ptmin,ptmax, 20,0,20 );
2587  fhPtNPileUpTrkVtx->SetYTitle("# vertex ");
2588  fhPtNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2589  outputContainer->Add(fhPtNPileUpTrkVtx);
2590 
2591  fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","#it{p}_{T} of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
2592  nptbins,ptmin,ptmax,20,0,20);
2593  fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
2594  fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2595  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut);
2596 
2597  fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","#it{p}_{T} of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
2598  nptbins,ptmin,ptmax, 20,0,20 );
2599  fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
2600  fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2601  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut);
2602 
2603  fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","#it{p}_{T} of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
2604  nptbins,ptmin,ptmax,20,0,20);
2605  fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
2606  fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2607  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2);
2608 
2609  fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","#it{p}_{T} of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
2610  nptbins,ptmin,ptmax, 20,0,20 );
2611  fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
2612  fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2613  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2);
2614 
2615  }
2616 
2617  // Keep neutral meson selection histograms if requiered
2618  // Setting done in AliNeutralMesonSelection
2619 
2621  {
2623 
2624  if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
2625  for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
2626 
2627  delete nmsHistos;
2628  }
2629 
2630  return outputContainer ;
2631 }
2632 
2633 //_____________________________________________
2636 //_____________________________________________
2638 {
2639  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
2640  {
2641  return kmcPi0 ;
2642  }//pi0
2643  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
2644  {
2645  return kmcEta ;
2646  }//eta
2647  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) ||
2649  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
2650  {
2651  return kmcPhoton ;
2652  }//direct photon
2653  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2655  {
2656  return kmcPi0Decay ;
2657  }//decay photon from pi0
2658  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2660  {
2661  return kmcEtaDecay ;
2662  }//decay photon from eta
2663  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
2664  {
2665  return kmcOtherDecay ;
2666  }//decay photon from other than eta or pi0
2667  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2668  {
2669  return kmcElectron ;
2670  }//electron
2671  else
2672  {
2673  return kmcHadron ;
2674  }//other particles
2675 }
2676 
2677 //__________________________________________________________________
2680 //__________________________________________________________________
2682  Int_t tag1 , Int_t tag2,
2683  Int_t & label, Int_t & tag)
2684 {
2685  if(label1 < 0 || label2 < 0 || label1 == label2) return ;
2686 
2687  AliDebug(0,Form("Origin of: photon1 %d; photon2 %d",tag1, tag2));
2688 
2689  if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) &&
2690  GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay) ) ||
2691  (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) &&
2693  )
2694  {
2695  Int_t pdg1 = -1;//, pdg2 = -1;
2696  Int_t ndaugh1 = -1, ndaugh2 = -1;
2697  //Check if pi0/eta mother is the same
2698  if(GetReader()->ReadStack())
2699  {
2700  if ( label1 >= 0 )
2701  {
2702  TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree
2703  label1 = mother1->GetFirstMother();
2704  mother1 = GetMCStack()->Particle(label1);//pi0
2705  pdg1=mother1->GetPdgCode();
2706  ndaugh1 = mother1->GetNDaughters();
2707  }
2708  if ( label2 >= 0 )
2709  {
2710  TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree
2711  label2 = mother2->GetFirstMother();
2712  mother2 = GetMCStack()->Particle(label2);//pi0
2713  //pdg2=mother2->GetPdgCode();
2714  ndaugh2 = mother2->GetNDaughters();
2715  }
2716  } // STACK
2717  else if(GetReader()->ReadAODMCParticles())
2718  {//&& (input > -1)){
2719  if ( label1 >= 0 )
2720  {
2721  AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label1);//photon in kine tree
2722  label1 = mother1->GetMother();
2723  mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label1);//pi0
2724  pdg1=mother1->GetPdgCode();
2725  ndaugh1 = mother1->GetNDaughters();
2726  }
2727  if ( label2 >= 0 )
2728  {
2729  AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label2);//photon in kine tree
2730  label2 = mother2->GetMother();
2731  mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label2);//pi0
2732  //pdg2=mother2->GetPdgCode();
2733  ndaugh2 = mother2->GetNDaughters();
2734  }
2735  } // AOD
2736 
2737 // printf("mother1 %d, mother2 %d\n",label1,label2);
2738  if ( label1 == label2 && label1 >= 0 && ndaugh1 == ndaugh2 && ndaugh1 == 2 )
2739  {
2740  label = label1;
2741 
2742  Double_t angle = fMomentum2.Angle(fMomentum1.Vect());
2744  Double_t epair = (fMomentum1+fMomentum2).E();
2745 
2746  if ( pdg1 == 111 )
2747  {
2748  fhMassPairMCPi0 ->Fill(epair, mass , GetEventWeight());
2749  fhAnglePairMCPi0->Fill(epair, angle, GetEventWeight());
2750 
2752 
2753 // printf("Real pi0 pair: pt %f, mass %f\n",(fMomentum1+fMomentum2).Pt(),mass);
2754 // printf(" Lab1 %d (%d), lab2 %d (%d), pdg1 %d, pdg2 %d, Is In calo %d, %d, Is lost %d, %d\n",
2755 // label1,photon1->GetLabel(),label2,photon2->GetLabel(), pdg1, pdg2,
2756 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2757 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2758 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost),
2759 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost));
2760  }
2761  else if ( pdg1 == 221 )
2762  {
2763  fhMassPairMCEta ->Fill(epair, mass , GetEventWeight());
2764  fhAnglePairMCEta->Fill(epair, angle, GetEventWeight());
2765 
2767 
2768 // printf("Real eta pair\n");
2769  }
2770 
2771  } // same label
2772  } // both from eta or pi0 decay
2773 }
2774 
2775 //_______________________
2778 //_______________________
2780 {
2781  if ( GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD() )
2782  AliFatal("STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!");
2783  else if ( GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD() )
2784  AliFatal("STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!");
2785 }
2786 
2787 //_________________________________
2789 //_________________________________
2791 {
2792  AddToHistogramsName("AnaPi0EbE_");
2793 
2794  fInputAODGammaConvName = "PhotonsCTS" ;
2795  fAnaType = kIMCalo ;
2796  fMinDist = 2.;
2797  fMinDist2 = 4.;
2798  fMinDist3 = 5.;
2799 
2800  fNLMECutMin[0] = 10.;
2801  fNLMECutMin[1] = 6. ;
2802  fNLMECutMin[2] = 6. ;
2803 
2804  fIsoCandMinPt = 8;
2805  fR = 0.4;
2806 
2807  fM02MinCutForIM = -1 ;
2808  fM02MaxCutForIM = -1 ;
2809 }
2810 
2811 //_______________________________________
2814 //_______________________________________
2816 {
2817  AliDebug(1,Form("Start analysis type %d",fAnaType));
2818 
2819  switch(fAnaType)
2820  {
2821  case kIMCalo:
2823  break;
2824 
2825  case kSSCalo:
2827  break;
2828 
2829  case kIMCaloTracks:
2831  break;
2832  }
2833 
2834  AliDebug(1,"End");
2835 }
2836 
2837 //____________________________________________
2843 //____________________________________________
2845 {
2846  if(!GetInputAODBranch())
2847  {
2848  AliFatal(Form("No input calo photons in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
2849  return; // coverity
2850  }
2851 
2852  // Create obj array of clusters in case it is requested
2853  TObjArray *clusters = 0;
2855  GetReader()->GetDataType()!=AliCaloTrackReader::kMC )
2856  {
2857  if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters();
2858  else if(GetCalorimeter()==kPHOS) clusters = GetPHOSClusters() ;
2859  }
2860 
2861  AliVCluster *cluster1 = 0;
2862  AliVCluster *cluster2 = 0;
2863 
2864  Int_t nphoton = GetInputAODBranch()->GetEntriesFast();
2865  for( Int_t iphoton = 0; iphoton < nphoton-1; iphoton++ )
2866  {
2867  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
2868 
2869  // Vertex cut in case of mixed events
2870  // Not really in use or tested recently, remove ...
2871  Int_t evtIndex1 = 0 ;
2872  if(GetMixedEvent())
2873  {
2874  evtIndex1 = GetMixedEvent()->EventIndexForCaloCluster(photon1->GetCaloLabel(0)) ;
2875  if(TMath::Abs(GetVertex(evtIndex1)[2]) > GetZvertexCut()) continue ; //vertex cut
2876  }
2877 
2878  // Get original cluster if requested
2879  Int_t iclus = -1;
2880  if( ( fFillSelectClHisto || IsPileUpAnalysisOn() ) &&
2882  {
2883  cluster1 = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
2884 
2885  if(!cluster1) AliWarning("First cluster not found");
2886  }
2887 
2888  // Get kinematics and other parameters
2889  fMomentum1 = *(photon1->Momentum());
2890 
2891  Float_t e1 = photon1->E();
2892  Float_t tof1 = photon1->GetTime();
2893  Int_t nMaxima1 = photon1->GetNLM();
2894  Int_t lab1 = photon1->GetLabel();
2895  Int_t tag1 = photon1->GetTag();
2896  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
2897 
2898  for( Int_t jphoton = iphoton+1; jphoton < nphoton; jphoton++ )
2899  {
2900  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(jphoton));
2901 
2902  // Do analysis only when one of the decays is isolated
2903  // Run AliAnaParticleIsolation before
2905  {
2906  Bool_t isolated2 = ((AliAODPWG4ParticleCorrelation*) photon2)->IsIsolated();
2907  if(!isolated1 && !isolated2) continue;
2908  }
2909 
2910  // Vertex cut in case of mixed events
2911  // Not really in use or tested recently, remove ...
2912  Int_t evtIndex2 = 0 ;
2913  if(GetMixedEvent())
2914  {
2915  evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
2916 
2917  if(evtIndex1 == evtIndex2)
2918  continue ;
2919 
2920  if(TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut()) continue ; //vertex cut
2921  }
2922 
2923  // Get kinematics and other parameters
2924  fMomentum2 = *(photon2->Momentum());
2925 
2926  Float_t e2 = photon2->E();
2927  Float_t tof2 = photon2->GetTime();
2928  Int_t nMaxima2 = photon2->GetNLM();
2929 
2930  //
2931  // Skip pairs of EMCal and DCal clusters
2932  Double_t angleOp = fMomentum1.Angle(fMomentum2.Vect());
2933 
2934  if(angleOp > DegToRad(100.)) continue;
2935 
2936  //
2937  // Select clusters with good time window difference
2938  Double_t t12diff = tof1-tof2;
2939 
2940  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
2941 
2942  if(TMath::Abs(t12diff) > GetPairTimeCut()) continue;
2943 
2944  //
2945  // Play with the MC stack if available
2946  //
2947  Int_t mcIndex = kmcHadron;
2948  Int_t tag = 0;
2949  Int_t label =-1;
2950  if( IsDataMC() )
2951  {
2952  HasPairSameMCMother(lab1, photon2->GetLabel(),
2953  tag1, photon2->GetTag(),
2954  label, tag) ;
2955  mcIndex = GetMCIndex(tag);
2956  }
2957 
2958  // Check the invariant mass for different selection on the local maxima
2959 
2961 
2962  Double_t mass = fMomentum.M();
2963  Double_t epair = fMomentum.E();
2964  Float_t ptpair = fMomentum.Pt();
2965 
2966  //
2967  // NLM dependent histograms
2968  //
2970  {
2971  if(nMaxima1==nMaxima2)
2972  {
2973  if (nMaxima1==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
2974  else if(nMaxima1==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
2975  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
2976  }
2977  else if(nMaxima1==1 || nMaxima2==1)
2978  {
2979  if (nMaxima1==2 || nMaxima2==2) fhMassPairLocMax[3]->Fill(epair, mass, GetEventWeight());
2980  else fhMassPairLocMax[4]->Fill(epair, mass, GetEventWeight());
2981  }
2982  else
2983  fhMassPairLocMax[5]->Fill(epair, mass, GetEventWeight());
2984 
2985  // Combinations with SS axis cut and NLM cut
2986  if(nMaxima1 == 1 && photon2->GetM02() > 0.3)
2987  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
2988 
2989  if(nMaxima2 == 1 && photon1->GetM02() > 0.3)
2990  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
2991 
2992  if(nMaxima1 > 1 && photon2->GetM02() < 0.3 && photon2->GetM02() > 0.1 )
2993  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
2994 
2995  if(nMaxima2 > 1 && photon1->GetM02() < 0.3 && photon1->GetM02() > 0.1 )
2996  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
2997  }
2998 
2999  //
3000  // Skip pairs with too few or too many NLM
3001  //
3002  if((nMaxima1 < fNLMCutMin || nMaxima1 > fNLMCutMax) || (nMaxima2 < fNLMCutMin || nMaxima2 > fNLMCutMax))
3003  {
3004  AliDebug(1,Form("NLM out of range: cluster1 %d, cluster2 %d",nMaxima1, nMaxima2));
3005  continue ;
3006  }
3007 
3008  //
3009  // Skip pairs with too large/small SS
3010  //
3011  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
3012  {
3013  Float_t m02Ph1 = photon1->GetM02();
3014  Float_t m02Ph2 = photon2->GetM02();
3015 
3016  if(m02Ph1 > fM02MaxCutForIM || m02Ph1 < fM02MinCutForIM) continue ;
3017  if(m02Ph2 > fM02MaxCutForIM || m02Ph2 < fM02MinCutForIM) continue ;
3018  }
3019 
3020  //
3021  // Mass of all pairs before selection
3022  //
3023  fhMass ->Fill( epair, mass, GetEventWeight());
3024  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3025 
3026  if(photon1->Pt() >= photon2->Pt())
3027  {
3028  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3029  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3030  }
3031  else
3032  {
3033  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3034  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3035  }
3036 
3037  if(IsDataMC() && mcIndex < 2) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3038 
3040  {
3041  Double_t radius = GetIsolationCut()->Radius(fMomentum1.Eta(),fMomentum1.Phi(),fMomentum2.Eta(),fMomentum2.Phi());
3042 
3043  if(radius < fR) fhMassPtIsoRCut->Fill(ptpair, mass, GetEventWeight());
3044 
3045 // printf("pT pair (%f, %f), opening angle %f, radius %f; fR %1.1f, MinPt1 %2.2f\n",fMomentum1.Pt(),fMomentum2.Pt(),angleOp,radius,fR,fIsoCandMinPt);
3046  }
3047 
3048  //
3049  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3050  //
3051  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue;
3052 
3053  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",
3054  fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3055 
3056  //
3057  // Tag both photons as decay if not done before
3058  // set the corresponding bit for pi0 or eta or "side" case
3059  //
3060  Int_t bit1 = photon1->DecayTag();
3061  if( bit1 < 0 ) bit1 = 0 ;
3062  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3063  {
3064  AliDebug(1,Form("pT1 %2.2f; bit requested %d; decay bit1: In %d",fMomentum1.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit1));
3065 
3067  photon1->SetDecayTag(bit1);
3068 
3069  AliDebug(1,Form("\t Out %d", bit1));
3070 
3071  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3072 
3073  //
3074  // Fill some histograms about shower shape
3075  //
3077  {
3078  FillSelectedClusterHistograms(cluster1, fMomentum1.Pt(), nMaxima1, photon1->GetTag());
3079  }
3080 
3081  //
3082  // MC origin, lost pair
3083  //
3084  if(IsDataMC())
3085  {
3086  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3087  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3088 
3090  {
3091  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3092  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3093  }
3094  }
3095  }
3096 
3097  //
3098  // Histogram for cluster2 tagged as decay
3099  //
3100  Int_t bit2 = photon2->DecayTag();
3101  if( bit2 < 0 ) bit2 = 0 ;
3102  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3103  {
3104  AliDebug(1,Form("pT2 %2.2f; bit requested %d; decay bit2: In %d",fMomentum2.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit2));
3105 
3107  photon2->SetDecayTag(bit2);
3108 
3109  AliDebug(1,Form("\t Out %d", bit2));
3110 
3111  fhPtDecay->Fill(photon2->Pt(), GetEventWeight());
3112 
3113  // Fill some histograms about shower shape
3115  {
3116  // Get original cluster, to recover some information
3117 
3118  Int_t iclus2 = -1;
3119  cluster2 = FindCluster(clusters,photon2->GetCaloLabel(0),iclus2,iclus+1);
3120  // start new loop from iclus1+1 to gain some time
3121 
3122  if(!cluster2) AliWarning("Second cluster not found");
3123  else FillSelectedClusterHistograms(cluster2, fMomentum2.Pt(), nMaxima2, photon2->GetTag());
3124  }
3125 
3126  //
3127  // MC origin, lost pair
3128  //
3129  if(IsDataMC())
3130  {
3131  Int_t mcIndex2 = GetMCIndex(photon2->GetTag());
3132  fhMCPtDecay[mcIndex2]->Fill(photon2->Pt(), GetEventWeight());
3133 
3135  {
3136  if ( mcIndex2 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon2->Pt(), GetEventWeight());
3137  else if( mcIndex2 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon2->Pt(), GetEventWeight());
3138  }
3139  }
3140  }
3141 
3142  //
3143  // Mass of selected pairs
3144  //
3145  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3146  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3147  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3148 
3149  // Fill histograms to undertand pile-up before other cuts applied
3150  // Remember to relax time cuts in the reader
3151  if(cluster1 && IsPileUpAnalysisOn()) FillPileUpHistograms(ptpair,( photon1->GetTime() + photon2->GetTime() ) / 2, cluster1);
3152 
3153  //
3154  // Create AOD for analysis
3155  //
3156  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3157 
3158  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3159  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3160  else
3161  {
3162  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3163  return ;
3164  }
3165  pi0.SetDetectorTag(photon1->GetDetectorTag());
3166 
3167  // MC
3168  pi0.SetLabel(label);
3169  pi0.SetTag(tag);
3170 
3171  //Set the indeces of the original caloclusters
3172  pi0.SetCaloLabel(photon1->GetCaloLabel(0), photon2->GetCaloLabel(0));
3173  //pi0.SetInputFileIndex(input);
3174 
3175  AddAODParticle(pi0);
3176 
3177  }//2n photon loop
3178 
3179  }//1st photon loop
3180 
3181  AliDebug(1,"End fill AODs");
3182 }
3183 
3184 //__________________________________________________
3190 //__________________________________________________
3192 {
3193  // Check calorimeter input
3194  if(!GetInputAODBranch())
3195  {
3196  AliFatal(Form("No input calo photons in AOD branch with name < %s > , STOP",GetInputAODName().Data()));
3197  }
3198 
3199  // Get the array with conversion photons
3200  TClonesArray * inputAODGammaConv = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaConvName);
3201  if(!inputAODGammaConv)
3202  {
3203  inputAODGammaConv = (TClonesArray *) GetReader()->GetInputEvent()->FindListObject(fInputAODGammaConvName);
3204 
3205  if(!inputAODGammaConv)
3206  {
3207  AliFatal(Form("No input gamma conversions in AOD branch with name < %s >",fInputAODGammaConvName.Data()));
3208  return; // coverity
3209  }
3210  }
3211 
3212  // Get shower shape information of clusters
3213  TObjArray *clusters = 0;
3215  {
3216  if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters() ;
3217  else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters () ;
3218  }
3219 
3220  AliVCluster * cluster = 0;
3221 
3222  Int_t nCTS = inputAODGammaConv->GetEntriesFast();
3223  Int_t nCalo = GetInputAODBranch()->GetEntriesFast();
3224  if(nCTS<=0 || nCalo <=0)
3225  {
3226  AliDebug(1,Form("nCalo %d, nCTS %d, cannot loop",nCalo,nCTS));
3227  return;
3228  }
3229 
3230  AliDebug(1,Form("Number of conversion photons %d and number of clusters %d",nCTS,nCalo));
3231 
3232  // Do the loop, first calo, second CTS
3233  for(Int_t iphoton = 0; iphoton < GetInputAODBranch()->GetEntriesFast(); iphoton++)
3234  {
3235  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
3236  fMomentum1 = *(photon1->Momentum());
3237 
3238  // Do analysis only when one of the decays is isolated
3239  // Run AliAnaParticleIsolation before
3241  {
3242  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
3243  if(!isolated1) continue;
3244  }
3245 
3246  // Get original cluster, to recover some information
3247  Int_t iclus = -1;
3249  {
3250  cluster = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
3251 
3252  if(!cluster) AliWarning("Cluster not found");
3253  }
3254 
3255  // Skip cluster with too large/small SS
3256  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
3257  {
3258  Float_t m02 = photon1->GetM02();
3259 
3260  if(m02 > fM02MaxCutForIM || m02 < fM02MinCutForIM) continue ;
3261  }
3262 
3263  for(Int_t jphoton = 0; jphoton < nCTS; jphoton++)
3264  {
3265  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (inputAODGammaConv->At(jphoton));
3266 
3267  Int_t evtIndex = 0;
3268  if(GetMixedEvent())
3269  {
3270  evtIndex = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
3271  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3272  }
3273 
3274  fMomentum2 = *(photon2->Momentum());
3275 
3277 
3278  Double_t mass = fMomentum.M();
3279  Double_t epair = fMomentum.E();
3280  Float_t ptpair = fMomentum.Pt();
3281 
3282  Int_t nMaxima = photon1->GetNLM();
3284  {
3285  if (nMaxima==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
3286  else if(nMaxima==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
3287  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
3288  }
3289 
3290  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3291  {
3292  AliDebug(1,Form("NLM %d out of range",nMaxima));
3293  continue ;
3294  }
3295 
3296  // Play with the MC stack if available
3297  Int_t mcIndex = kmcHadron;
3298  Int_t tag = 0;
3299  Int_t label =-1;
3300  if(IsDataMC())
3301  {
3302  Int_t label2 = photon2->GetLabel();
3303  if(label2 >= 0 )photon2->SetTag(GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(),kCTS));
3304 
3305  HasPairSameMCMother(photon1->GetLabel(), photon2->GetLabel(),
3306  photon1->GetTag() , photon2->GetTag(),
3307  label, tag) ;
3308  mcIndex = GetMCIndex(tag);
3309  }
3310 
3311  // Mass of selected pairs
3312  fhMass ->Fill( epair, mass, GetEventWeight());
3313  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3314 
3315  if(photon1->Pt() >= photon2->Pt())
3316  {
3317  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3318  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3319  }
3320  else
3321  {
3322  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3323  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3324  }
3325 
3326  if(IsDataMC() && mcIndex < 2 ) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3327 
3328  //
3329  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3330  //
3331  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue ;
3332 
3333  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3334 
3335  //
3336  // Tag both photons as decay if not done before
3337  // set the corresponding bit for pi0 or eta or "side" case
3338  //
3339  Int_t bit1 = photon1->DecayTag();
3340  if( bit1 < 0 ) bit1 = 0 ;
3341  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3342  {
3344  photon1->SetDecayTag(bit1);
3345 
3346  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3347 
3348  // Fill some histograms about shower shape
3350  FillSelectedClusterHistograms(cluster, fMomentum1.Pt(), nMaxima, photon1->GetTag());
3351 
3352  if(IsDataMC())
3353  {
3354  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3355  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3356 
3358  {
3359  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3360  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3361  }
3362  }
3363  }
3364 
3365  Int_t bit2 = photon2->DecayTag();
3366  if( bit2 < 0 ) bit2 = 0 ;
3367  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3368  {
3370  photon2->SetDecayTag(bit2);
3371  }
3372 
3373  //
3374  // Mass of selected pairs
3375  //
3376  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3377  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3378  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3379 
3380  // Fill histograms to undertand pile-up before other cuts applied
3381  // Remember to relax time cuts in the reader
3382  if( cluster && IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),photon1->GetTime(),cluster);
3383 
3384  //
3385  // Create AOD for analysis
3386  //
3387  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3388 
3389  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3390  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3391  else
3392  {
3393  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3394  return ;
3395  }
3396 
3397  pi0.SetDetectorTag(photon1->GetDetectorTag());
3398 
3399  // MC
3400  pi0.SetLabel(label);
3401  pi0.SetTag(tag);
3402 
3403  // Set the indeces of the original tracks or caloclusters
3404  pi0.SetCaloLabel (photon1->GetCaloLabel(0) , -1);
3405  pi0.SetTrackLabel(photon2->GetTrackLabel(0), photon2->GetTrackLabel(1));
3406  //pi0.SetInputFileIndex(input);
3407 
3408  AddAODParticle(pi0);
3409 
3410  }//2n photon loop
3411 
3412  }//1st photon loop
3413 
3414  AliDebug(1,"End fill AODs");
3415 }
3416 
3417 //_________________________________________________
3429 //_________________________________________________
3431 {
3432  TObjArray * pl = 0x0;
3433  AliVCaloCells * cells = 0x0;
3434 
3435  // Select the Calorimeter of the photon
3436  if (GetCalorimeter() == kEMCAL )
3437  {
3438  pl = GetEMCALClusters();
3439  cells = GetEMCALCells();
3440  }
3441  else if (GetCalorimeter() == kPHOS)
3442  {
3443  AliFatal("kSSCalo case not implememted for PHOS");
3444  return; // for coverity
3445 
3446  //pl = GetPHOSClusters();
3447  //cells = GetPHOSCells();
3448  }
3449 
3450  if(!pl)
3451  {
3452  AliInfo(Form("TObjArray with %s clusters is NULL!",GetCalorimeterString().Data()));
3453  return;
3454  }
3455 
3456  for(Int_t icalo = 0; icalo < pl->GetEntriesFast(); icalo++)
3457  {
3458  AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
3459 
3460  Int_t evtIndex = 0 ;
3461  if (GetMixedEvent())
3462  {
3463  evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
3464  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3465  }
3466 
3467  // Get Momentum vector,
3468  Double_t vertex[]={0,0,0};
3470  {
3471  calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
3472  } // Assume that come from vertex in straight line
3473  else
3474  {
3475  calo->GetMomentum(fMomentum,vertex) ;
3476  }
3477 
3478  // If too small or big pt, skip it
3479  if(fMomentum.E() < GetMinEnergy() || fMomentum.E() > GetMaxEnergy() ) continue ;
3480 
3481  // Check acceptance selection
3482  if(IsFiducialCutOn())
3483  {
3485  if(! in ) continue ;
3486  }
3487 
3488  AliDebug(1,Form("Min pt cut and fiducial cut passed: pt %3.2f, phi %2.2f, eta %1.2f",fMomentum.Pt(),fMomentum.Phi(),fMomentum.Eta()));
3489 
3490  // Play with the MC stack if available
3491  // Check origin of the candidates
3492  Int_t tag = 0 ;
3493  if(IsDataMC())
3494  {
3495  tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
3496  //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
3497  AliDebug(1,Form("Origin of candidate %d",tag));
3498  }
3499 
3500  //Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
3501 
3502  // Check Distance to Bad channel, set bit.
3503  Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
3504  if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
3505  if(distBad < fMinDist)
3506  {
3507  // In bad channel (PHOS cristal size 2.2x2.2 cm)
3508  // FillRejectedClusterHistograms(tag,nMaxima);
3509  continue ;
3510  }
3511 
3512  AliDebug(1,Form("Bad channel cut passed %4.2f",distBad));
3513 
3514  // If too low number of cells, skip it
3515  if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells())
3516  {
3517  //FillRejectedClusterHistograms(tag,nMaxima);
3518  continue ;
3519  }
3520 
3521  AliDebug(1,Form("N cells cut passed %d > %d",calo->GetNCells(), GetCaloPID()->GetClusterSplittingMinNCells()));
3522 
3523  //.......................................
3524  // TOF cut, BE CAREFUL WITH THIS CUT
3525  Double_t tof = calo->GetTOF()*1e9;
3526  if(tof < fTimeCutMin || tof > fTimeCutMax)
3527  {
3528  //FillRejectedClusterHistograms(tag,nMaxima);
3529  continue ;
3530  }
3531 
3532  // Check PID
3533  // PID selection or bit setting
3534  Int_t nMaxima = 0;
3535  Double_t mass = 0, angle = 0;
3536  Int_t absId1 =-1, absId2 =-1;
3537  Float_t distbad1 =-1, distbad2 =-1;
3538  Bool_t fidcut1 = 0, fidcut2 = 0;
3539 
3541  GetVertex(evtIndex),nMaxima,
3542  mass,angle,
3544  absId1,absId2,
3545  distbad1,distbad2,
3546  fidcut1,fidcut2) ;
3547 
3548 
3549  AliDebug(1,Form("PDG of identified particle %d",idPartType));
3550 
3551  // Skip events where one of the new clusters (lowest energy) is close to an EMCal border or a bad channel
3552  if( (fCheckSplitDistToBad) &&
3553  (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
3554  {
3555  AliDebug(1,Form("Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d",
3556  calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2));
3557 
3558  //FillRejectedClusterHistograms(tag,nMaxima);
3559  continue ;
3560  }
3561 
3562  // Skip events with too few or too many NLM
3563  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3564  {
3565  //FillRejectedClusterHistograms(tag,nMaxima);
3566  continue ;
3567  }
3568 
3569  AliDebug(1,Form("NLM %d accepted",nMaxima));
3570 
3571  // Skip matched clusters with tracks
3572  if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
3573  {
3574  FillRejectedClusterHistograms(tag,nMaxima);
3575  continue ;
3576  }
3577 
3578  Float_t l0 = calo->GetM02();
3579  Float_t l1 = calo->GetM20();
3580  Float_t e1 = fMomentum1.Energy();
3581  Float_t e2 = fMomentum2.Energy();
3583  Float_t ptSplit = fMomentum12.Pt();
3584  Float_t eSplit = e1+e2;
3585 
3586  // Mass of all clusters
3587  fhMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3588  fhMassPt->Fill(fMomentum.Pt(), mass, GetEventWeight());
3589 
3590  if(fMomentum1.Pt() >= fMomentum2.Pt())
3591  {
3593  fhMassPtMinPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3594  }
3595  else
3596  {
3597  fhMassPtMaxPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3599  }
3600 
3601  fhMassSplitPt->Fill(ptSplit, mass, GetEventWeight());
3602  fhPtLambda0NoSplitCut->Fill(fMomentum.Pt(), l0, GetEventWeight());
3603 
3604  // Asymmetry of all clusters
3605  Float_t asy =-10;
3606  if(e1+e2 > 0) asy = (e1-e2) / (e1+e2);
3607  fhAsymmetry->Fill(fMomentum.E(), asy, GetEventWeight());
3608 
3609  // Divide NLM in 3 cases, 1 local maxima, 2 local maxima, more than 2 local maxima
3610  Int_t indexMax = -1;
3611  if (nMaxima==1) indexMax = 0 ;
3612  else if(nMaxima==2) indexMax = 1 ;
3613  else indexMax = 2 ;
3614 
3615  fhMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3616 
3617  Int_t mcIndex = -1;
3618  Int_t noverlaps = 0;
3619  Float_t ptprim = 0;
3620  Int_t mesonLabel = -1;
3621 
3622  if(IsDataMC())
3623  {
3624  mcIndex = GetMCIndex(tag);
3625 
3626  Bool_t ok = kFALSE;
3627  Int_t mcLabel = calo->GetLabel();
3628 
3630 
3631 
3632  if(mcIndex == kmcPi0 || mcIndex == kmcEta)
3633  {
3634  if(mcIndex == kmcPi0)
3635  {
3636  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetReader(),ok,mesonLabel);
3637  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3638  }
3639  else
3640  {
3641  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetReader(),ok,mesonLabel);
3642  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3643  }
3644  }
3645 
3646  const UInt_t nlabels = calo->GetNLabels();
3647  Int_t overpdg[nlabels];
3648  Int_t overlab[nlabels];
3649  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(calo->GetLabels(), nlabels, tag, mesonLabel, GetReader(), overpdg, overlab);
3650 
3651  fhMCMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3652  fhMCMassSplitPt[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3653 
3654  if(mcIndex==kmcPi0)
3655  {
3656  fhMCPi0PtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3657  fhMCPi0SplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3658  fhMCPi0PtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3659  fhMCPi0SplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3660 
3661  }
3662  else if(mcIndex==kmcEta)
3663  {
3664  fhMCEtaPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3665  fhMCEtaSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3666  fhMCEtaPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3667  fhMCEtaSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3668  }
3669 
3670  if(noverlaps==0)
3671  {
3672  if(mcIndex==kmcPi0)
3673  {
3674  fhMCPi0PtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3675  fhMCPi0SplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3676  }
3677  else if(mcIndex==kmcEta)
3678  {
3679  fhMCEtaPtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3680  fhMCEtaSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3681  }
3682 
3683  fhMassNoOverlap ->Fill(fMomentum.E() , mass, GetEventWeight());
3685  fhMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3686 
3687  fhMCMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3688  fhMCMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3689  }
3690 
3691  fhMCPtAsymmetry[mcIndex]->Fill(fMomentum.Pt(), asy, GetEventWeight());
3692  }
3693 
3694  // If cluster does not pass pid, not pi0/eta, skip it.
3695  if (GetOutputAODName().Contains("Pi0") && idPartType != AliCaloPID::kPi0)
3696  {
3697  AliDebug(1,"Cluster is not Pi0");
3698  FillRejectedClusterHistograms(tag,nMaxima);
3699  continue ;
3700  }
3701 
3702  else if(GetOutputAODName().Contains("Eta") && idPartType != AliCaloPID::kEta)
3703  {
3704  AliDebug(1,"Cluster is not Eta");
3705  FillRejectedClusterHistograms(tag,nMaxima);
3706  continue ;
3707  }
3708 
3709  AliDebug(1,Form("Pi0/Eta selection cuts passed: pT %3.2f, pdg %d",fMomentum.Pt(), idPartType));
3710 
3711  // Mass and asymmetry of selected pairs
3712  fhSelectedAsymmetry ->Fill(fMomentum.E() , asy , GetEventWeight());
3713  fhSelectedMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3714  fhSelectedMassPt ->Fill(fMomentum.Pt(), mass, GetEventWeight());
3715  fhSelectedMassSplitPt->Fill(ptSplit , mass, GetEventWeight());
3716 
3717  fhSelectedMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3718 
3719  Int_t nSM = GetModuleNumber(calo);
3720  if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0 && fFillAllNLMHistograms)
3721  {
3722  fhSelectedMassPtLocMaxSM [indexMax][nSM]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3723  fhSelectedLambda0PtLocMaxSM[indexMax][nSM]->Fill(fMomentum.Pt(), l0 , GetEventWeight());
3724  }
3725 
3726  if(IsDataMC())
3727  {
3728  if(mcIndex==kmcPi0)
3729  {
3730  fhMCPi0SelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3731  fhMCPi0SelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3732  fhMCPi0SelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3733  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3734  }
3735  else if(mcIndex==kmcEta)
3736  {
3737  fhMCEtaSelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3738  fhMCEtaSelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3739  fhMCEtaSelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3740  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3741  }
3742 
3743  if(noverlaps==0)
3744  {
3747  fhSelectedMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3748 
3749  if(mcIndex==kmcPi0)
3750  {
3752  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3753  }
3754  else if(mcIndex==kmcEta)
3755  {
3757  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3758  }
3759  }
3760  }
3761 
3762  Float_t phi = fMomentum.Phi();
3763  if(phi<0) phi+=TMath::TwoPi();
3764 
3765  fhSplitE ->Fill( eSplit, GetEventWeight());
3766  fhSplitPt ->Fill(ptSplit, GetEventWeight());
3767  fhSplitPtPhi ->Fill(ptSplit, phi , GetEventWeight());
3768  fhSplitPtEta ->Fill(ptSplit, fMomentum.Eta(), GetEventWeight());
3769  fhNLocMaxSplitPt->Fill(ptSplit, nMaxima , GetEventWeight());
3770 
3771  // Check split-clusters with good time window difference
3772  Double_t tof1 = cells->GetCellTime(absId1);
3773  GetCaloUtils()->RecalibrateCellTime(tof1, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3774  tof1*=1.e9;
3775 
3776  Double_t tof2 = cells->GetCellTime(absId2);
3777  GetCaloUtils()->RecalibrateCellTime(tof2, GetCalorimeter(), absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3778  tof2*=1.e9;
3779 
3780  Double_t t12diff = tof1-tof2;
3781  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
3782 
3783  if(IsDataMC())
3784  {
3785  fhMCSplitE [mcIndex]->Fill( eSplit, GetEventWeight());
3786  fhMCSplitPt [mcIndex]->Fill(ptSplit, GetEventWeight());
3787  fhMCSplitPtPhi [mcIndex]->Fill(ptSplit , phi , GetEventWeight());
3788  fhMCSplitPtEta [mcIndex]->Fill(ptSplit , fMomentum.Eta(), GetEventWeight());
3789  fhMCNLocMaxSplitPt[mcIndex]->Fill(ptSplit , nMaxima , GetEventWeight());
3790  fhMCNLocMaxPt [mcIndex]->Fill(fMomentum.Pt(), nMaxima , GetEventWeight());
3791 
3792  fhMCSelectedMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3793  fhMCSelectedMassSplitPt [mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3794  fhMCSelectedMassPtLocMax[mcIndex][indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3795 
3796  if(noverlaps==0)
3797  {
3798  fhMCSelectedMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3799  fhMCSelectedMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3800  }
3801  }
3802 
3803  // Remove clusters with NLM=x depeding on a minimim energy cut
3804  if(nMaxima == 1 && fNLMECutMin[0] > fMomentum.E()) continue;
3805  if(nMaxima == 2 && fNLMECutMin[1] > fMomentum.E()) continue;
3806  if(nMaxima > 2 && fNLMECutMin[2] > fMomentum.E()) continue;
3807 
3808  // Fill some histograms about shower shape
3810  {
3811  FillSelectedClusterHistograms(calo, fMomentum.Pt(), nMaxima, tag, asy);
3812  }
3813 
3814  // Fill histograms to undertand pile-up before other cuts applied
3815  // Remember to relax time cuts in the reader
3816  Double_t tofcluster = calo->GetTOF()*1e9;
3817 
3818  if ( IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),tofcluster,calo);
3819 
3821  FillEMCALBCHistograms(fMomentum.E(), fMomentum.Eta(), fMomentum.Phi(), tofcluster);
3822 
3823  //------------------------
3824  // Create AOD for analysis
3825 
3826  AliAODPWG4Particle aodpi0 = AliAODPWG4Particle(fMomentum);
3827  aodpi0.SetLabel(mesonLabel);
3828 
3829  // Set the indeces of the original caloclusters
3830  aodpi0.SetCaloLabel(calo->GetID(),-1);
3831  aodpi0.SetDetectorTag(GetCalorimeter());
3832 
3833  if (distBad > fMinDist3) aodpi0.SetDistToBad(2) ;
3834  else if(distBad > fMinDist2) aodpi0.SetDistToBad(1) ;
3835  else aodpi0.SetDistToBad(0) ;
3836 
3837  // Check if cluster is pi0 via cluster splitting
3838  aodpi0.SetIdentifiedParticleType(idPartType);
3839 
3840  aodpi0.SetM02(l0);
3841  aodpi0.SetM20(l1);
3842  aodpi0.SetNLM(nMaxima);
3843  aodpi0.SetTime(tofcluster);
3844  aodpi0.SetNCells(calo->GetNCells());
3845  aodpi0.SetSModNumber(nSM);
3846 
3847  aodpi0.SetTag(tag);
3848 
3849  // Add AOD with pi0 object to aod branch
3850  AddAODParticle(aodpi0);
3851 
3852  } // loop
3853 
3854  AliDebug(1,"End fill AODs");
3855 }
3856 
3857 //______________________________________________
3860 //______________________________________________
3862 {
3863  if(!GetOutputAODBranch())
3864  {
3865  AliFatal(Form("No output pi0 in AOD branch with name < %s >,STOP",GetOutputAODName().Data()));
3866  return;
3867  }
3868 
3869  // Loop on stored AOD pi0
3870  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
3871 
3872  AliDebug(1,Form("AOD branch entries %d", naod));
3873 
3874  Float_t cen = GetEventCentrality();
3875  Float_t ep = GetEventPlaneAngle();
3876 
3877  for(Int_t iaod = 0; iaod < naod ; iaod++)
3878  {
3879  AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
3880  Int_t pdg = pi0->GetIdentifiedParticleType();
3881 
3882  if( ( pdg != AliCaloPID::kPi0 && pdg != AliCaloPID::kEta ) ) continue;
3883 
3884  // Fill pi0 histograms
3885  Float_t ener = pi0->E();
3886  Float_t pt = pi0->Pt();
3887  Float_t phi = pi0->Phi();
3888  if(phi < 0) phi+=TMath::TwoPi();
3889  Float_t eta = pi0->Eta();
3890 
3891  fhPt ->Fill(pt , GetEventWeight());
3892  fhE ->Fill(ener, GetEventWeight());
3893 
3894  fhPtEta ->Fill(pt , eta, GetEventWeight());
3895  fhPtPhi ->Fill(pt , phi, GetEventWeight());
3896  fhEtaPhi ->Fill(eta , phi, GetEventWeight());
3897 
3899  {
3900  fhPtCentrality ->Fill(pt, cen, GetEventWeight()) ;
3901  fhPtEventPlane ->Fill(pt, ep , GetEventWeight()) ;
3902  }
3903 
3904  if(IsDataMC())
3905  {
3906  Int_t tag = pi0->GetTag();
3907  Int_t label = pi0->GetLabel();
3908  Int_t mcIndex = GetMCIndex(tag);
3909 
3910  if(fAnaType != kSSCalo && mcIndex > 1) continue;
3911 
3912  fhMCE [mcIndex] ->Fill(ener, GetEventWeight());
3913  fhMCPt [mcIndex] ->Fill(pt , GetEventWeight());
3914  fhMCPtPhi[mcIndex] ->Fill(pt , phi, GetEventWeight());
3915  fhMCPtEta[mcIndex] ->Fill(pt , eta, GetEventWeight());
3916 
3917  if ( IsHighMultiplicityAnalysisOn() ) fhMCPtCentrality[mcIndex]->Fill(pt, cen, GetEventWeight());
3918 
3919  if((mcIndex==kmcPi0Decay || mcIndex==kmcEtaDecay ||
3920  mcIndex==kmcPi0 || mcIndex==kmcEta ) &&
3921  fAnaType==kSSCalo)
3922  {
3923  Float_t efracMC = 0;
3924  Int_t momlabel = -1;
3925  Bool_t ok = kFALSE;
3926 
3928  if(!ok) continue;
3929 
3930  if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
3931  {
3932  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3933  if(fGrandMotherMom.E() > 0 && ok)
3934  {
3935  efracMC = fGrandMotherMom.E()/ener;
3936  fhMCPi0PtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3937  }
3938  }
3939  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
3940  {
3941  fhMCPi0DecayPt->Fill(pt, GetEventWeight());
3942  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3943 
3944  if(fGrandMotherMom.E() > 0 && ok)
3945  {
3946  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3947  fhMCPi0DecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3948  }
3949  }
3950  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
3951  {
3952  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3953  if(fGrandMotherMom.E() > 0 && ok)
3954  {
3955  efracMC = fGrandMotherMom.E()/ener;
3956  fhMCEtaPtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3957  }
3958  }
3959  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
3960  {
3961  fhMCEtaDecayPt->Fill(pt, GetEventWeight());
3962  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3963 
3964  if(fGrandMotherMom.E() > 0 && ok)
3965  {
3966  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3967  fhMCEtaDecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3968  }
3969  }
3970  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
3971  {
3972  fhMCOtherDecayPt->Fill(pt, GetEventWeight());
3973  }
3974  }
3975 
3976  if( mcIndex==kmcPi0 || mcIndex==kmcEta )
3977  {
3978  Float_t prodR = -1;
3979  Int_t momindex = -1;
3980  Int_t mompdg = -1;
3981  Int_t momstatus = -1;
3982  Int_t status = -1;
3983  if(GetReader()->ReadStack())
3984  {
3985  TParticle* ancestor = GetMCStack()->Particle(label);
3986  status = ancestor->GetStatusCode();
3987  momindex = ancestor->GetFirstMother();
3988  if(momindex < 0) return;
3989  TParticle* mother = GetMCStack()->Particle(momindex);
3990  mompdg = TMath::Abs(mother->GetPdgCode());
3991  momstatus = mother->GetStatusCode();
3992  prodR = mother->R();
3993  }
3994  else
3995  {
3996  TClonesArray * mcparticles = GetReader()->GetAODMCParticles();
3997  AliAODMCParticle* ancestor = (AliAODMCParticle *) mcparticles->At(label);
3998  status = ancestor->GetStatus();
3999  momindex = ancestor->GetMother();
4000 
4001  if(momindex < 0) return;
4002 
4003  AliAODMCParticle* mother = (AliAODMCParticle *) mcparticles->At(momindex);
4004  mompdg = TMath::Abs(mother->GetPdgCode());
4005  momstatus = mother->GetStatus();
4006  prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv());
4007  }
4008 
4009  if( mcIndex==kmcPi0 )
4010  {
4011  fhMCPi0ProdVertex->Fill(pt, prodR , GetEventWeight());
4012  fhMCPi0PtStatus ->Fill(pt, status, GetEventWeight());
4013 
4014  if (momstatus == 21) fhMCPi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4015  else if(mompdg < 22 ) fhMCPi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4016  else if(mompdg > 2100 && mompdg < 2210) fhMCPi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4017  else if(mompdg == 221) fhMCPi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4018  else if(mompdg == 331) fhMCPi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4019  else if(mompdg == 213) fhMCPi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4020  else if(mompdg == 223) fhMCPi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4021  else if(mompdg >= 310 && mompdg <= 323) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4022  else if(mompdg == 130) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4023  else if(momstatus == 11 || momstatus == 12 ) fhMCPi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4024  else fhMCPi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4025 
4026  if(status != 11)
4027  {
4028  if (momstatus == 21) fhMCNotResonancePi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4029  else if(mompdg < 22 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4030  else if(mompdg > 2100 && mompdg < 2210) fhMCNotResonancePi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4031  else if(mompdg == 221) fhMCNotResonancePi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4032  else if(mompdg == 331) fhMCNotResonancePi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4033  else if(mompdg == 213) fhMCNotResonancePi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4034  else if(mompdg == 223) fhMCNotResonancePi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4035  else if(mompdg >= 310 && mompdg <= 323) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4036  else if(mompdg == 130) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4037  else if(momstatus == 11 || momstatus == 12 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4038  else fhMCNotResonancePi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4039  }
4040  }
4041  else if (mcIndex==kmcEta )
4042  {
4043  fhMCEtaProdVertex->Fill(pt, prodR, GetEventWeight());
4044 
4045  if (momstatus == 21) fhMCEtaPtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4046  else if(mompdg < 22 ) fhMCEtaPtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4047  else if(mompdg > 2100 && mompdg < 2210) fhMCEtaPtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4048  else if(mompdg == 221) fhMCEtaPtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4049  else if(mompdg == 331) fhMCEtaPtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4050  else if(mompdg == 213) fhMCEtaPtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4051  else if(mompdg == 223) fhMCEtaPtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4052  else if(mompdg >= 310 && mompdg <= 323) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4053  else if(mompdg == 130) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4054  else if(momstatus == 11 || momstatus == 12 ) fhMCEtaPtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4055  else fhMCEtaPtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4056  }
4057  }
4058  } // Histograms with MC
4059  }// aod loop
4060 
4061  AliDebug(1,"End");
4062 }
4063 
4064 //__________________________________________________
4066 //__________________________________________________
4067 void AliAnaPi0EbE::Print(const Option_t * opt) const
4068 {
4069  if(! opt)
4070  return;
4071 
4072  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4073 
4075 
4076  printf("Analysis Type = %d \n", fAnaType) ;
4077 
4078  if(fAnaType == kSSCalo)
4079  {
4080  printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
4081  printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
4082  printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
4083  printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
4084  }
4085 
4086  printf(" \n") ;
4087 }
4088 
4089 
4090 
4091 
4092 
Bool_t IsPileUpFromSPD() const
Float_t GetHistoPtMax() const
TString fInputAODGammaConvName
Name of AOD branch with conversion photons.
Definition: AliAnaPi0EbE.h:204
TH2F * fhPtDispersionLocMax[3]
! pT vs lambda1 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:437
TH2F * fhMCEtaSelectedPtRecoPtPrimNoOverlap
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:283
TH2F * fhMCPi0ProdVertex
! Spectrum of selected pi0 vs production vertex
Definition: AliAnaPi0EbE.h:400
TLorentzVector GetMotherWithPDG(Int_t label, Int_t pdg, const AliCaloTrackReader *reader, Bool_t &ok, Int_t &momLabel)
Int_t pdg
Bool_t fFillOnlySimpleSSHisto
Fill selected cluster histograms, selected SS histograms.
Definition: AliAnaPi0EbE.h:200
TH2F * fhMCMassPtNoOverlap[fgkNmcTypes]
! Pair pT vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:378
TH2F * fhMCMassPt[fgkNmcTypes]
! Pair pT vs Mass coming from X
Definition: AliAnaPi0EbE.h:373
TH2F * fhSelectedMassPtLocMax[3]
! Pair mass vs pT, for selected pairs, for each NLM case
Definition: AliAnaPi0EbE.h:257
TH2F * fhMCPtDispersion[fgkNmcTypes]
! pT vs dispersion of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:343
TH2F * fhPtNPileUpSPDVtxTimeCut2
! Cluster pt vs number of spd pile-up vertices, time cut +-75 ns
Definition: AliAnaPi0EbE.h:467
TH1F * fhMCPtDecay[fgkNmcTypes]
! pT from MC particle
Definition: AliAnaPi0EbE.h:338
TH2F * fhMCEtaPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:291
TH2F * fhPtLambda0NoTRD
! pT vs lambda0 of selected cluster, not behind TRD
Definition: AliAnaPi0EbE.h:314
Int_t GetHistoNClusterCellMin() const
Bool_t fFillWeightHistograms
Fill weigth histograms.
Definition: AliAnaPi0EbE.h:199
TH2F * fhdEdx
! Matched track dEdx vs cluster E
Definition: AliAnaPi0EbE.h:426
Float_t GetHistoPtMin() const
TList * GetCreateOutputObjects()
TH2F * fhTimePtSPDMulti
! Time of cluster vs pT, IsSPDPileUpMulti
Definition: AliAnaPi0EbE.h:456
double Double_t
Definition: External.C:58
Int_t GetHistoShowerShapeBins() const
Float_t GetHistodEdxMax() const
virtual void AddToHistogramsName(TString add)
virtual AliVCaloCells * GetEMCALCells() const
TH2F * fhSelectedMassPtLocMaxSM[3][22]
! Pair mass vs pT, for selected pairs, for each NLM case, for each SM
Definition: AliAnaPi0EbE.h:258
TH2F * fhPtDispPhiLocMax[3]
! pT vs phi dispersion of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:439
Definition: External.C:236
anaTypes fAnaType
Select analysis type.
Definition: AliAnaPi0EbE.h:174
TH2F * fhPtDispEtaLocMax[3]
! pT vs eta dispersion of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:438
TH1F * fhPtReject
! Number of rejected as pi0/eta vs pT
Definition: AliAnaPi0EbE.h:239
TH2F * fhMassPtIsoRCut
! Pair mass vs pT, for all pairs when opening angle not larger than iso cone radius ...
Definition: AliAnaPi0EbE.h:254
Float_t fR
Isolation cone.
Definition: AliAnaPi0EbE.h:187
TH2F * fhPtCentrality
! Centrality vs pi0/eta pT
Definition: AliAnaPi0EbE.h:235
AliEMCALRecoUtils * GetEMCALRecoUtils() const
TH1F * fhMCPtDecayLostPairEta
! pT for tagged clustres when MC Eta Decay, when companion is lost
Definition: AliAnaPi0EbE.h:340
TH2F * fhMCPtLambda0FracMaxCellCut[fgkNmcTypes]
! pT vs lambda0 of pi0 pairs but really from MC particle, fraction of cluster energy in max cell cut ...
Definition: AliAnaPi0EbE.h:345
virtual Float_t GetPairTimeCut() const
Time cut in ns.
TH2F * fhTimePtSPD
! Time of cluster vs pT, IsSPDPileUp
Definition: AliAnaPi0EbE.h:455
virtual void GetVertex(Double_t vertex[3]) const
TH2F * fhSelectedMassPt
! Pair mass vs pT, for selected pairs
Definition: AliAnaPi0EbE.h:251
TH2F * fhMCPtDispEta[fgkNmcTypes]
! Shower dispersion in eta direction
Definition: AliAnaPi0EbE.h:347
TH2F * fhTimeTriggerEMCALBC0UMReMatchBoth
! Time distribution of pi0s in event, when trigger is not found, rematched open both ...
Definition: AliAnaPi0EbE.h:233
TH2F * fhMCPi0SelectedPtRecoPtPrimNoOverlap
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:282
TH2F * fhNLocMaxSplitPt
! Split sub-cluster pair pT sum, as a function of n maxima
Definition: AliAnaPi0EbE.h:306
TH2F * fhEPairDiffTime
! E pair vs Pair of clusters time difference vs E
Definition: AliAnaPi0EbE.h:320
TH2F * fhMassSplitPtNoOverlap
! Pair mass vs pT (split), for all pairs, no overlap
Definition: AliAnaPi0EbE.h:265
TH1F * fhMCEReject[fgkNmcTypes]
! Number of rejected as pi0 vs E coming from X
Definition: AliAnaPi0EbE.h:364
TH2F * fhMCEtaDecayPtFraction
! SS id, clusters id as pi0 (eta), coming from 1 photon, eta decay primary, pt vs pt decay / pt mothe...
Definition: AliAnaPi0EbE.h:388
virtual AliVEvent * GetInputEvent() const
TH2F * fhPtDispEtaPhiDiffLocMax[3]
! pT vs dispersion eta - phi
Definition: AliAnaPi0EbE.h:441
TH2F * fhMCPi0SelectedPtRecoPtPrim
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:280
Double_t mass
TObjString * GetAnalysisCuts()
Save parameters used for analysis.
Bool_t fRejectTrackMatch
Remove clusters which have an associated TPC track.
Definition: AliAnaPi0EbE.h:197
TH2F * fhMCSelectedMassPt[fgkNmcTypes]
! selected pair pT vs Mass coming from X
Definition: AliAnaPi0EbE.h:375
TH2F * fhMCDispEtaDispPhi[7][fgkNmcTypes]
! Shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
Definition: AliAnaPi0EbE.h:354
Int_t fNLMCutMin
Remove clusters/cells with number of local maxima smaller than this value.
Definition: AliAnaPi0EbE.h:176
Float_t DegToRad(Float_t deg) const
virtual AliIsolationCut * GetIsolationCut()
TH2F * fhMCLambda0DispPhi[7][fgkNmcTypes]
! Shower shape correlation l0 vs disp phi
Definition: AliAnaPi0EbE.h:350
energy
Definition: HFPtSpectrum.C:44
TH2F * fhPtSumEtaPhi
! Shower dispersion in eta and phi direction
Definition: AliAnaPi0EbE.h:328
TH2F * fhMCNLocMaxPtReject[fgkNmcTypes]
! Number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:448
TH2F * fhMCPi0SelectedSplitPtRecoPtPrimLocMax[3]
! pt split reco vs pt prim for pi0 mother, vs NLM
Definition: AliAnaPi0EbE.h:297
virtual Float_t GetZvertexCut() const
Maximal number of events for mixin.
TH2F * fhPtDispEta
! Shower dispersion in eta direction
Definition: AliAnaPi0EbE.h:322
virtual Double_t GetEventPlaneAngle() const
TH2F * fhPtPhiReject
! pT vs phi of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:242
Double_t fTimeCutMax
Remove clusters/cells with time larger than this value, in ns.
Definition: AliAnaPi0EbE.h:196
TH1F * fhMCSplitPt[fgkNmcTypes]
! Number of identified as pi0 vs sum Pt split coming from X
Definition: AliAnaPi0EbE.h:368
TH2F * fhMCPi0PtRecoPtPrim
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:270
virtual Bool_t IsTrackMatched(AliVCluster *cluster, AliVEvent *event)
TH2F * fhTrackMatchedMCParticleDPhi
! Trace origin of matched particle, phi residual
Definition: AliAnaPi0EbE.h:425
TH2F * fhMassPt
! Pair mass vs pT, for all pairs
Definition: AliAnaPi0EbE.h:246
TH2F * fhMCPi0PtStatus
! Mass of reoconstructed pi0 pairs in calorimeter vs mother
Definition: AliAnaPi0EbE.h:399
TH2F * fhSplitPtEta
! Split sub-cluster pair pT sum vs eta
Definition: AliAnaPi0EbE.h:304
void MakeAnalysisFillAOD()
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
Int_t GetHistoMassBins() const
Int_t GetHistoPhiBins() const
TH2F * fhEMaxCellClusterLogRatio
! Log (e max cell / e cluster) vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:408
TH2F * fhEtaPhiEMCALBC0
! Pseudorapidity vs Phi of clusters
Definition: AliAnaPi0EbE.h:221
TH2F * fhMCAsymmetryDispPhi[7][fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:358
TH2F * fhPtSphericityLocMax[3]
! pT vs sphericity in eta vs phi
Definition: AliAnaPi0EbE.h:442
Float_t GetHistoMassMin() const
void InitParameters()
Initialize the parameters of the analysis with default values.
TH2F * fhTimePileUpMainVertexZDiamond
! Time of cluster vs difference of z diamond and pile-up vertex
Definition: AliAnaPi0EbE.h:461
TH2F * fhTimeNPileUpVertContributors
! Time of cluster vs n pile-up vertex from SPD contributors
Definition: AliAnaPi0EbE.h:459
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
void MakeAnalysisFillHistograms()
TH2F * fhAsymmetryLambda0[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:332
void FillSelectedClusterHistograms(AliVCluster *cluster, Float_t pt, Int_t nLocMax, Int_t tag, Float_t asy=0)
Fill shower shape, timing and other histograms for selected clusters.
Float_t GetHistoTrackResidualPhiMin() const
TLorentzVector fMomentum
! Cluster/pi0 momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:207
Double_t fTimeCutMin
Remove clusters/cells with time smaller than this value, in ns.
Definition: AliAnaPi0EbE.h:195
Float_t fIsoCandMinPt
Isolation candidate minimum pT.
Definition: AliAnaPi0EbE.h:188
Float_t GetHistoTrackResidualEtaMin() const
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
Int_t GetHistoNClusterCellBins() const
Float_t fM02MinCutForIM
Study photon clusters with l0 larger than cut, in inv. mass analysis.
Definition: AliAnaPi0EbE.h:184
virtual TClonesArray * GetOutputAODBranch() const
TH2F * fhMCEtaProdVertex
! Spectrum of selected eta vs production vertex
Definition: AliAnaPi0EbE.h:401
Float_t GetHistoDiffTimeMin() const
TH2F * fhMCSelectedMassSplitPt[fgkNmcTypes]
! selected pair pT (split) vs Mass coming from X
Definition: AliAnaPi0EbE.h:376
TH2F * fhMCPtLambda0LocMax[fgkNmcTypes][3]
! pT vs lambda0 of selected cluster, 1,2,>2 local maxima in cluster, vs originating particle ...
Definition: AliAnaPi0EbE.h:435
Int_t GetHistoPOverEBins() const
TH1F * fhMCSplitE[fgkNmcTypes]
! Number of identified as pi0 vs sum E split coming from X
Definition: AliAnaPi0EbE.h:367
TH1F * fhPt
! Number of identified pi0/eta vs pT
Definition: AliAnaPi0EbE.h:216
TH2F * fhMCPi0PtRecoPtPrimNoOverlap
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:272
TH2F * fhSelectedLambda0PtLocMaxSM[3][22]
! Pair mass vs pT, for selected pairs, for each NLM case, for each SM
Definition: AliAnaPi0EbE.h:261
TH1F * fhMCPt[fgkNmcTypes]
! Number of identified as pi0 vs Pt coming from X
Definition: AliAnaPi0EbE.h:361
Float_t fMinDist3
One more cut on distance used for acceptance-efficiency study.
Definition: AliAnaPi0EbE.h:193
Float_t GetHistoPhiMin() const
TH2F * fhTrackMatchedDEtaDPhiNeg
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV
Definition: AliAnaPi0EbE.h:421
void SetTagBit(Int_t &tag, UInt_t set) const
TH2F * fhPtLambda0
! pT vs lambda0 of selected cluster
Definition: AliAnaPi0EbE.h:311
Float_t GetHistoDiffTimeMax() const
static const Int_t fgkNmcTypes
Total number of MC origin histograms.
Definition: AliAnaPi0EbE.h:170
TH2F * fhEOverP
! Matched track E cluster over P track vs cluster E
Definition: AliAnaPi0EbE.h:427
TH2F * fhAsymmetryDispPhi[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:334
TH2F * fhTimeTriggerEMCALBC0UMReMatchOpenTime
! Time distribution of pi0s in event, when trigger is not found, rematched open time trigger ...
Definition: AliAnaPi0EbE.h:231
TH2F * fhPtSphericity
! Shower sphericity in eta vs phi
Definition: AliAnaPi0EbE.h:330
TH2F * fhEMaxCellClusterRatio
! E max cell / e cluster vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:407
TString GetPIDParametersList()
Put data member values in string to keep in output container.
Definition: AliCaloPID.cxx:892
TLorentzVector GetMother(Int_t label, const AliCaloTrackReader *reader, Bool_t &ok)
TH2F * fhMCLambda0DispEta[7][fgkNmcTypes]
! Shower shape correlation l0 vs disp eta
Definition: AliAnaPi0EbE.h:349
TH2F * fhTrackMatchedDEta
! Eta distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:413
TH2F * fhEtaPhiTriggerEMCALBC[11]
! Pseudorapidity vs Phi of pi0 for E > 2
Definition: AliAnaPi0EbE.h:225
TH2F * fhMCPtDispPhi[fgkNmcTypes]
! Shower dispersion in phi direction
Definition: AliAnaPi0EbE.h:348
TH2F * fhAsymmetryDispEta[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:333
TH2F * fhMassPtMaxPair
! Pair mass vs pT max of the pair, for all pairs
Definition: AliAnaPi0EbE.h:247
TH2F * fhPtLambda0FracMaxCellCut
! pT vs lambda0 of selected cluster, fraction of cluster energy in max cell cut
Definition: AliAnaPi0EbE.h:315
TH1F * fhMCEtaDecayPt
! SS id, clusters id as pi0 (eta), coming from 1 photon, eta decay primary, pt
Definition: AliAnaPi0EbE.h:387
const Double_t etamin
TH2F * fhTimeTriggerEMCALBCPileUpSPD[11]
! Time distribution of pi0, when trigger is in a given BC, tagged as pile-up SPD
Definition: AliAnaPi0EbE.h:227
Float_t GetHistoMassMax() const
TH2F * fhMCEtaSplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:278
Base class for CaloTrackCorr analysis algorithms.
void MakeInvMassInCalorimeterAndCTS()
TH2F * fhPtEta
! Pt vs eta of identified pi0/eta
Definition: AliAnaPi0EbE.h:218
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:88
virtual TString GetCalorimeterString() const
TH2F * fhPtNCells
! pT vs N cells in selected cluster
Definition: AliAnaPi0EbE.h:318
void FillEMCALBCHistograms(Float_t energy, Float_t eta, Float_t phi, Float_t time)
TH1F * fhMCOtherDecayPt
! SS id, clusters id as pi0 (eta), coming from 1 photon, other decay primary, pt
Definition: AliAnaPi0EbE.h:389
TH2F * fhTimePileUpMainVertexZDistance
! Time of cluster vs difference of z main vertex and pile-up vertex
Definition: AliAnaPi0EbE.h:460
Float_t GetHistodEdxMin() const
virtual AliFiducialCut * GetFiducialCut()
TH2F * fhPtDispersion
! pT vs disp of selected cluster
Definition: AliAnaPi0EbE.h:310
int Int_t
Definition: External.C:63
TH2F * fhMCAsymmetryLambda0[7][fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:356
virtual TClonesArray * GetInputAODBranch() const
TH2F * fhMCEtaPtRecoPtPrim
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:271
TH2F * fhMCSplitPtPhi[fgkNmcTypes]
! pt vs phi of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:369
TH2F * fhNLocMaxPtReject
! Number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:447
TH1F * fhPtPileUp[7]
! pT distribution of selected pi0/eta
Definition: AliAnaPi0EbE.h:451
TH2F * fhMCSelectedMassSplitPtNoOverlap[fgkNmcTypes]
! selected pair pT (split) vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:381
virtual TClonesArray * GetAODMCParticles() const
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
TH2F * fhMCEtaSelectedSplitPtRecoPtPrimLocMax[3]
! pt split reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:298
Int_t GetHistoDiffTimeBins() const
float Float_t
Definition: External.C:68
TH2F * fhMCSelectedMassPtNoOverlap[fgkNmcTypes]
! selected pair pT vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:380
Float_t GetHistoTrackResidualPhiMax() const
Bool_t fCheckSplitDistToBad
Check the distance to bad channel and to EMCal borders of split clusters.
Definition: AliAnaPi0EbE.h:198
TH2F * fhMCEtaPtGenRecoFraction
! SS id, clusters id as pi0 (eta), coming from 2 photon, eta primary, pt vs E prim eta / E reco ...
Definition: AliAnaPi0EbE.h:384
TH2F * fhMCPi0SelectedSplitPtRecoPtPrim
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:285
TH2F * fhPtLambda0LocMax[3]
! pT vs lambda0 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:434
TH2F * fhEtaPhi
! eta vs phi of identified pi0/eta
Definition: AliAnaPi0EbE.h:220
const Double_t ptmax
TH2F * fhMCPtLambda1[fgkNmcTypes]
! pT vs lambda1 of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:342
TH2F * fhTrackMatchedDPhiPos
! Phi distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:417
TH2F * fhMCPtPhi[fgkNmcTypes]
! pt vs phi of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:362
virtual AliEMCALGeometry * GetEMCALGeometry() const
TH2F * fhMCEtaSplitPtRecoPtPrim
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:276
TH2F * fhPtEventPlane
! Event plane vs pi0/eta pT
Definition: AliAnaPi0EbE.h:236
TH2F * fhMCNLocMaxPt[fgkNmcTypes]
! Number of maxima in selected clusters, vs originating particle
Definition: AliAnaPi0EbE.h:433
TH2F * fhPtEtaReject
! pT vs eta of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:241
TH2F * fhMCEtaSelectedSplitPtRecoPtPrim
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:286
TH2F * fhMCEtaSelectedPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:296
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
Int_t CheckOrigin(Int_t label, const AliCaloTrackReader *reader, Int_t calorimeter)
virtual AliAODEvent * GetOutputEvent() const
TH2F * fhSelectedAsymmetry
! Cluster pT vs asymmetry of 2 splitted clusters, for selected pairs
Definition: AliAnaPi0EbE.h:301
TH2F * fhEtaPhiReject
! eta vs phi of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:243
Float_t GetHistoShowerShapeMin() const
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH1F * fhPtDecay
! Number of identified pi0/eta decay photons vs pT
Definition: AliAnaPi0EbE.h:308
TH2F * fhMCPi0SplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:277
TH2F * fhLambda0DispEta[7]
! Shower shape correlation l0 vs disp eta
Definition: AliAnaPi0EbE.h:324
TLorentzVector fMomentum1
! Cluster/photon momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:208
TH2F * fhPtSumPhi
! Shower dispersion in phi direction
Definition: AliAnaPi0EbE.h:327
Int_t GetHistodEdxBins() const
virtual AliCalorimeterUtils * GetCaloUtils() const
TH2F * fhMCPtEta[fgkNmcTypes]
! pt vs eta of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:363
Int_t GetHistoNClusterCellMax() const
TH2F * fhMassPtNoOverlap
! Pair mass vs pT, for all pairs, no overlap
Definition: AliAnaPi0EbE.h:264
Int_t GetHistoTrackResidualEtaBins() const
TH2F * fhMCPtAsymmetry[fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs cluster pT
Definition: AliAnaPi0EbE.h:355
TH2F * fhMCEtaSelectedPtRecoPtPrim
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:281
Int_t GetTriggerClusterBC() const
TH2F * fhEtaPhiEMCALBCN
! Pseudorapidity vs Phi of clusters
Definition: AliAnaPi0EbE.h:223
TH2F * fhMCSplitPtEta[fgkNmcTypes]
! pt vs eta of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:370
Int_t GetClusterSplittingMinNCells() const
Definition: AliCaloPID.h:234
Int_t GetHistoTrackResidualPhiBins() const
Int_t GetNumberOfSuperModulesUsed() const
const Double_t ptmin
virtual Bool_t IsHighMultiplicityAnalysisOn() const
TH2F * fhMCPi0SelectedPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for pi0 mother, vs NLM
Definition: AliAnaPi0EbE.h:295
TLorentzVector fGrandMotherMom
! Primary momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:212
TH2F * fhMCEtaPtRecoPtPrimNoOverlap
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:273
TH2F * fhMassPairMCEta
! Pair mass, origin is same eta
Definition: AliAnaPi0EbE.h:392
virtual Double_t GetEventWeight() const
TH2F * fhPtSumEtaPhiLocMax[3]
! pT vs dispersion in eta and phi direction
Definition: AliAnaPi0EbE.h:440
TH2F * fhPtNPileUpSPDVtx
! Cluster pt vs number of spd pile-up vertices
Definition: AliAnaPi0EbE.h:463
TH2F * fhPtNPileUpTrkVtxTimeCut2
! Cluster pt vs number of track pile-up vertices, time cut +- 75 ns
Definition: AliAnaPi0EbE.h:468
TH2F * fhMassPtMinPair
! Pair mass vs pT min of the pair, for all pairs
Definition: AliAnaPi0EbE.h:248
Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, Int_t calo)
TH2F * fhMCEtaPtOrigin
! Mass of reoconstructed pi0 pairs in calorimeter vs mother
Definition: AliAnaPi0EbE.h:397
TH2F * fhMCPi0PtGenRecoFraction
! SS id, clusters id as pi0 (eta), coming from 2 photon, pi0 primary, pt vs E prim pi0 / E reco ...
Definition: AliAnaPi0EbE.h:383
TH1F * fhMCE[fgkNmcTypes]
! Number of identified as pi0 vs E coming from X
Definition: AliAnaPi0EbE.h:360
TH2F * fhPtTimeDiffPileUp[7]
! pT vs Time difference inside cluster, before any selection
Definition: AliAnaPi0EbE.h:453
virtual TObjArray * GetPHOSClusters() const
TH2F * fhMCPtCentrality[fgkNmcTypes]
! Centrality vs pi0/eta pT coming from X
Definition: AliAnaPi0EbE.h:237
Float_t GetHistoEtaMin() const
TH2F * fhMCPi0SplitPtRecoPtPrim
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:275
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)
TH2F * fhEtaPhiTriggerEMCALBCUM[11]
! Pseudorapidity vs Phi of pi0 for E > 2, not matched to trigger
Definition: AliAnaPi0EbE.h:228
TH2F * fhTrackMatchedDEtaDPhi
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV
Definition: AliAnaPi0EbE.h:415
TH2F * fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:288
Float_t fNLMECutMin[3]
Minimum energy of the cluster, depending on NLM.
Definition: AliAnaPi0EbE.h:194
TH2F * fhMCPtSphericity[fgkNmcTypes]
! Shower sphericity, eta vs phi
Definition: AliAnaPi0EbE.h:353
TH2F * fhMCPtLambda0[fgkNmcTypes]
! pT vs lambda0 of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:341
TH2F * fhECellClusterLogRatio
! Log (e cell / e cluster) vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:406
virtual Int_t GetModuleNumber(AliAODPWG4Particle *part) const
TH2F * fhMassPtLocMax[3]
! Pair mass vs pT, for all pairs, for each NLM case
Definition: AliAnaPi0EbE.h:256
TH2F * fhPtAsymmetryLocMax[3]
! E asymmetry of 2 splitted clusters vs cluster E for different NLM
Definition: AliAnaPi0EbE.h:443
TH2F * fhPtTime
! pT vs Time of selected cluster
Definition: AliAnaPi0EbE.h:319
TH2F * fhPtFracMaxCellNoTRD
! pT vs frac max cell of selected cluster, not behind TRD
Definition: AliAnaPi0EbE.h:317
void SetDecayBit(Int_t &tag, UInt_t set) const
TH2F * fhTrackMatchedDEtaNeg
! Eta distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:419
TH2F * fhTrackMatchedMCParticlePt
! Trace origin of matched particle, energy
Definition: AliAnaPi0EbE.h:423
TH2F * fhMassPairMCPi0
! Pair mass, origin is same pi0
Definition: AliAnaPi0EbE.h:391
TH2F * fhPtNPileUpTrkVtx
! Cluster pt vs number of track pile-up vertices
Definition: AliAnaPi0EbE.h:464
TH2F * fhMassNoOverlap
! Pair mass vs E, for all pairs, no overlap
Definition: AliAnaPi0EbE.h:263
TH2F * fhMCNLocMaxSplitPt[fgkNmcTypes]
! Number of identified as pi0 vs sum Pt split coming from X, for different NLM
Definition: AliAnaPi0EbE.h:371
TH2F * fhLambda0ForW0[14]
! L0 for 7 defined w0= 3, 3.5 ... 6 for selected photons
Definition: AliAnaPi0EbE.h:409
Float_t fM02MaxCutForIM
Study photon clusters with l0 smaller than cut, in inv. mass analysis.
Definition: AliAnaPi0EbE.h:183
Float_t GetHistoEtaMax() const
virtual void AddAODParticle(AliAODPWG4Particle part)
TH2F * fhAnglePairMCEta
! Pair opening angle, origin is same eta
Definition: AliAnaPi0EbE.h:394
Int_t GetNOverlaps(const Int_t *label, UInt_t nlabels, Int_t mctag, Int_t mesonLabel, AliCaloTrackReader *reader, Int_t *overpdg, Int_t *overlabel)
TH2F * fhPtLambda1LocMax[3]
! pT vs lambda1 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:436
TH2F * fhMCPtFracMaxCell[fgkNmcTypes]
! pT vs fraction of max cell
Definition: AliAnaPi0EbE.h:346
Int_t GetHistoPtBins() const
Bool_t fFillSelectClHisto
Fill selected cluster histograms.
Definition: AliAnaPi0EbE.h:180
TH2F * fhNLocMaxPt
! number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:431
TH2F * fhMCMassSplitPt[fgkNmcTypes]
! Pair pT (split) vs Mass coming from X
Definition: AliAnaPi0EbE.h:374
void FillWeightHistograms(AliVCluster *clus)
Calculate cluster energy weights and fill histograms.
TH2F * fhSelectedMassPtNoOverlap
! Pair mass vs pT, for selected pairs, no overlap
Definition: AliAnaPi0EbE.h:267
Bool_t fFillAllNLMHistograms
Fill all NLM dependent histograms.
Definition: AliAnaPi0EbE.h:178