AliPhysics  7baac56 (7baac56)
 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 "AliMCEvent.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 < fNModules && 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  // Init the number of modules, set in the class AliCalorimeterUtils
954  //
955  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
956 
957  TString nlm[] = {"1 Local Maxima","2 Local Maxima", "NLM > 2"};
958 
959  TString ptype [] = {"#pi^{0}", "#eta", "#gamma (direct)","#gamma (#pi^{0})", "#gamma (#eta)", "#gamma (other)", "e^{#pm}" , "hadron/other combinations"};
960  TString pname [] = {"Pi0" , "Eta" , "Photon" ,"Pi0Decay" , "EtaDecay" , "OtherDecay" , "Electron", "Hadron"};
961 
962  Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins
963 
964  fhPt = new TH1F("hPt","Number of identified #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
965  fhPt->SetYTitle("#it{N}");
966  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
967  outputContainer->Add(fhPt) ;
968 
969  fhE = new TH1F("hE","Number of identified #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
970  fhE->SetYTitle("#it{N}");
971  fhE->SetXTitle("#it{E} (GeV)");
972  outputContainer->Add(fhE) ;
973 
974  fhPtPhi = new TH2F
975  ("hPtPhi","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
976  fhPtPhi->SetYTitle("#phi (rad)");
977  fhPtPhi->SetXTitle("#it{E} (GeV)");
978  outputContainer->Add(fhPtPhi) ;
979 
980  fhPtEta = new TH2F
981  ("hPtEta","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
982  fhPtEta->SetYTitle("#eta");
983  fhPtEta->SetXTitle("#it{E} (GeV)");
984  outputContainer->Add(fhPtEta) ;
985 
986  fhEtaPhi = new TH2F
987  ("hEtaPhi","Selected #pi^{0} (#eta) pairs: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
988  fhEtaPhi->SetYTitle("#phi (rad)");
989  fhEtaPhi->SetXTitle("#eta");
990  outputContainer->Add(fhEtaPhi) ;
991 
993  {
994  fhEtaPhiEMCALBC0 = new TH2F
995  ("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);
996  fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)");
997  fhEtaPhiEMCALBC0->SetXTitle("#eta");
998  outputContainer->Add(fhEtaPhiEMCALBC0) ;
999 
1000  fhEtaPhiEMCALBC1 = new TH2F
1001  ("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);
1002  fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)");
1003  fhEtaPhiEMCALBC1->SetXTitle("#eta");
1004  outputContainer->Add(fhEtaPhiEMCALBC1) ;
1005 
1006  fhEtaPhiEMCALBCN = new TH2F
1007  ("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);
1008  fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)");
1009  fhEtaPhiEMCALBCN->SetXTitle("#eta");
1010  outputContainer->Add(fhEtaPhiEMCALBCN) ;
1011 
1012  for(Int_t i = 0; i < 11; i++)
1013  {
1014  fhEtaPhiTriggerEMCALBC[i] = new TH2F
1015  (Form("hEtaPhiTriggerEMCALBC%d",i-5),
1016  Form("meson #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
1017  netabins,etamin,etamax,nphibins,phimin,phimax);
1018  fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
1019  fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
1020  outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
1021 
1022  fhTimeTriggerEMCALBC[i] = new TH2F
1023  (Form("hTimeTriggerEMCALBC%d",i-5),
1024  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1025  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1026  fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
1027  fhTimeTriggerEMCALBC[i]->SetYTitle("#it{t} (ns)");
1028  outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1029 
1031  (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
1032  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1033  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1034  fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1035  fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{t} (ns)");
1036  outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
1037 
1039  (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
1040  Form("meson #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
1041  netabins,etamin,etamax,nphibins,phimin,phimax);
1042  fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
1043  fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1044  outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1045 
1046  fhTimeTriggerEMCALBCUM[i] = new TH2F
1047  (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
1048  Form("meson #it{t} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-5),
1049  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1050  fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1051  fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{t} (ns)");
1052  outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
1053 
1054  }
1055 
1056  fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
1057  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time",
1058  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1059  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
1060  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{t} (ns)");
1061  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
1062 
1063 
1064  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
1065  "cluster #it{t} vs #it{E} of clusters, no match, rematch with neigbour parches",
1066  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1067  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
1068  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{t} (ns)");
1069  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
1070 
1071  fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
1072  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time and neigbour",
1073  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1074  fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
1075  fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{t} (ns)");
1076  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
1077 
1078  }
1079 
1081  {
1082  fhPtCentrality = new TH2F("hPtCentrality","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1083  fhPtCentrality->SetYTitle("centrality");
1084  fhPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1085  outputContainer->Add(fhPtCentrality) ;
1086 
1087  fhPtEventPlane = new TH2F("hPtEventPlane","event plane angle vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1088  fhPtEventPlane->SetYTitle("Event plane angle (rad)");
1089  fhPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1090  outputContainer->Add(fhPtEventPlane) ;
1091  }
1092 
1093  if(fAnaType == kSSCalo)
1094  {
1095  fhPtReject = new TH1F("hPtReject","Number of rejected as #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
1096  fhPtReject->SetYTitle("#it{N}");
1097  fhPtReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1098  outputContainer->Add(fhPtReject) ;
1099 
1100  fhEReject = new TH1F("hEReject","Number of rejected as #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
1101  fhEReject->SetYTitle("#it{N}");
1102  fhEReject->SetXTitle("#it{E} (GeV)");
1103  outputContainer->Add(fhEReject) ;
1104 
1105  fhPtPhiReject = new TH2F
1106  ("hPtPhiReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1107  fhPtPhiReject->SetYTitle("#phi (rad)");
1108  fhPtPhiReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1109  outputContainer->Add(fhPtPhiReject) ;
1110 
1111  fhPtEtaReject = new TH2F
1112  ("hPtEtaReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1113  fhPtEtaReject->SetYTitle("#eta");
1114  fhPtEtaReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1115  outputContainer->Add(fhPtEtaReject) ;
1116 
1117  fhEtaPhiReject = new TH2F
1118  ("hEtaPhiReject","Rejected #pi^{0} (#eta) cluster: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
1119  fhEtaPhiReject->SetYTitle("#phi (rad)");
1120  fhEtaPhiReject->SetXTitle("#eta");
1121  outputContainer->Add(fhEtaPhiReject) ;
1122 
1123  fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
1124  nptbins,ptmin,ptmax,20,0,20);
1125  fhNLocMaxPtReject ->SetYTitle("N maxima");
1126  fhNLocMaxPtReject ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1127  outputContainer->Add(fhNLocMaxPtReject) ;
1128  }
1129 
1130  fhMass = new TH2F
1131  ("hMass","all pairs #it{M}: #it{E} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1132  fhMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1133  fhMass->SetXTitle("#it{E} (GeV)");
1134  outputContainer->Add(fhMass) ;
1135 
1136  fhSelectedMass = new TH2F
1137  ("hSelectedMass","Selected #pi^{0} (#eta) pairs #it{M}: E vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1138  fhSelectedMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1139  fhSelectedMass->SetXTitle("#it{E} (GeV)");
1140  outputContainer->Add(fhSelectedMass) ;
1141 
1142  fhMassPt = new TH2F
1143  ("hMassPt","all pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1144  fhMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1145  fhMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1146  outputContainer->Add(fhMassPt) ;
1147 
1148  fhMassPtMaxPair = new TH2F
1149  ("hMassPtMaxPair","all pairs #it{M}: #it{p}_{T}^{max} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1150  fhMassPtMaxPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1151  fhMassPtMaxPair->SetXTitle("#it{p}_{T}^{max} (GeV/#it{c})");
1152  outputContainer->Add(fhMassPtMaxPair) ;
1153 
1154  fhMassPtMinPair = new TH2F
1155  ("hMassPtMinPair","all pairs #it{M}: #it{p}_{T}^{min} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1156  fhMassPtMinPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1157  fhMassPtMinPair->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1158  outputContainer->Add(fhMassPtMinPair) ;
1159 
1160  fhSelectedMassPt = new TH2F
1161  ("hSelectedMassPt","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1162  fhSelectedMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1163  fhSelectedMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1164  outputContainer->Add(fhSelectedMassPt) ;
1165 
1167  {
1168  fhMassPtIsoRCut = new TH2F
1169  ("hMassPtIsoRCut",Form("#it{M}: #it{p}_{T} vs #it{M}, for R = %1.1f, #it{p}_{T,1} < %2.2f",fR,fIsoCandMinPt),
1170  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1171  fhMassPtIsoRCut->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1172  fhMassPtIsoRCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1173  outputContainer->Add(fhMassPtIsoRCut) ;
1174  }
1175 
1176  if(fAnaType == kSSCalo)
1177  {
1179  ("hPtLambda0NoSplitCut","all clusters: #it{p}_{T} vs #lambda_{0}^{2}",nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1180  fhPtLambda0NoSplitCut->SetYTitle("#lambda_{0}^{2}");
1181  fhPtLambda0NoSplitCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1182  outputContainer->Add(fhPtLambda0NoSplitCut) ;
1183 
1184  for(Int_t inlm = 0; inlm < 3; inlm++)
1185  {
1186  fhMassPtLocMax[inlm] = new TH2F
1187  (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);
1188  fhMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1189  fhMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1190  outputContainer->Add(fhMassPtLocMax[inlm]) ;
1191 
1192  fhSelectedMassPtLocMax[inlm] = new TH2F
1193  (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);
1194  fhSelectedMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1195  fhSelectedMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1196  outputContainer->Add(fhSelectedMassPtLocMax[inlm]) ;
1197 
1199  {
1200  for(Int_t iSM = 0; iSM < fNModules; iSM++)
1201  {
1202  if(iSM < fFirstModule || iSM > fLastModule) continue;
1203 
1204  fhSelectedMassPtLocMaxSM[inlm][iSM] = new TH2F
1205  (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);
1206  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1207  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1208  outputContainer->Add(fhSelectedMassPtLocMaxSM[inlm][iSM]) ;
1209 
1210  fhSelectedLambda0PtLocMaxSM[inlm][iSM] = new TH2F
1211  (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);
1212  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetYTitle("#lambda_{0}^{2}");
1213  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1214  outputContainer->Add(fhSelectedLambda0PtLocMaxSM[inlm][iSM]) ;
1215  }
1216  }
1217 
1218  if(IsDataMC())
1219  {
1220  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1221  {
1222  fhMCSelectedMassPtLocMax[ipart][inlm] = new TH2F
1223  (Form("hSelectedMassPtLocMax%d_MC%s",inlm+1,pname[ipart].Data()),
1224  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()),
1225  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1226  fhMCSelectedMassPtLocMax[ipart][inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1227  fhMCSelectedMassPtLocMax[ipart][inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1228  outputContainer->Add(fhMCSelectedMassPtLocMax[ipart][inlm]) ;
1229  }
1230  }
1231  }
1232 
1233  if(IsDataMC())
1234  {
1235  fhMassNoOverlap = new TH2F
1236  ("hMassNoOverlap","all pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1237  fhMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1238  fhMassNoOverlap->SetXTitle("#it{E} (GeV)");
1239  outputContainer->Add(fhMassNoOverlap) ;
1240 
1242  ("hSelectedMassNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1243  fhSelectedMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1244  fhSelectedMassNoOverlap->SetXTitle("#it{E} (GeV)");
1245  outputContainer->Add(fhSelectedMassNoOverlap) ;
1246 
1247  fhMassPtNoOverlap = new TH2F
1248  ("hMassPtNoOverlap","all pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1249  fhMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1250  fhMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1251  outputContainer->Add(fhMassPtNoOverlap) ;
1252 
1254  ("hSelectedMassPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1255  fhSelectedMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1256  fhSelectedMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1257  outputContainer->Add(fhSelectedMassPtNoOverlap) ;
1258  }
1259  }
1260 
1261  if(fAnaType != kSSCalo)
1262  {
1263  fhPtDecay = new TH1F("hPtDecay","Selected #pi^{0} (#eta) decay photons",nptbins,ptmin,ptmax);
1264  fhPtDecay->SetYTitle("#it{N}");
1265  fhPtDecay->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1266  outputContainer->Add(fhPtDecay) ;
1267 
1268  if(IsDataMC())
1269  {
1270  fhMCPtDecayLostPairPi0 = new TH1F("hPtDecay_MCPi0DecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #pi^{0} decay, companion lost",
1271  nptbins,ptmin,ptmax);
1272  fhMCPtDecayLostPairPi0->SetYTitle("#it{N}");
1273  fhMCPtDecayLostPairPi0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1274  outputContainer->Add(fhMCPtDecayLostPairPi0) ;
1275 
1276  fhMCPtDecayLostPairEta = new TH1F("hPtDecay_MCEtaDecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #eta decay, companion lost",
1277  nptbins,ptmin,ptmax);
1278  fhMCPtDecayLostPairEta->SetYTitle("#it{N}");
1279  fhMCPtDecayLostPairEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1280  outputContainer->Add(fhMCPtDecayLostPairEta) ;
1281 
1282  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1283  {
1284  fhMCPtDecay[ipart] = new TH1F(Form("hPtDecay_MC%s",pname[ipart].Data()),
1285  Form("Selected #pi^{0} (#eta) decay photons, from MC %s",ptype[ipart].Data()),
1286  nptbins,ptmin,ptmax);
1287  fhMCPtDecay[ipart]->SetYTitle("#it{N}");
1288  fhMCPtDecay[ipart]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1289  outputContainer->Add(fhMCPtDecay[ipart]) ;
1290  }
1291  }
1292  }
1293 
1295 
1296  if( fFillSelectClHisto )
1297  {
1298  fhPtLambda0 = new TH2F
1299  ("hPtLambda0","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1300  fhPtLambda0->SetYTitle("#lambda_{0}^{2}");
1301  fhPtLambda0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1302  outputContainer->Add(fhPtLambda0) ;
1303 
1304  fhPtLambda1 = new TH2F
1305  ("hPtLambda1","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1306  fhPtLambda1->SetYTitle("#lambda_{1}^{2}");
1307  fhPtLambda1->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1308  outputContainer->Add(fhPtLambda1) ;
1309 
1311  {
1312  fhPtLambda0NoTRD = new TH2F
1313  ("hPtLambda0NoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, not behind TRD",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1314  fhPtLambda0NoTRD->SetYTitle("#lambda_{0}^{2}");
1315  fhPtLambda0NoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1316  outputContainer->Add(fhPtLambda0NoTRD) ;
1317 
1319  {
1321  ("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);
1322  fhPtFracMaxCellNoTRD->SetYTitle("Fraction");
1323  fhPtFracMaxCellNoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1324  outputContainer->Add(fhPtFracMaxCellNoTRD) ;
1325  }
1326  }
1327 
1329  {
1330  fhPtDispersion = new TH2F
1331  ("hPtDispersion","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1332  fhPtDispersion->SetYTitle("D^{2}");
1333  fhPtDispersion->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1334  outputContainer->Add(fhPtDispersion) ;
1335 
1337  ("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);
1338  fhPtLambda0FracMaxCellCut->SetYTitle("#lambda_{0}^{2}");
1339  fhPtLambda0FracMaxCellCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1340  outputContainer->Add(fhPtLambda0FracMaxCellCut) ;
1341 
1342  fhPtFracMaxCell = new TH2F
1343  ("hPtFracMaxCell","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy",nptbins,ptmin,ptmax,100,0,1);
1344  fhPtFracMaxCell->SetYTitle("Fraction");
1345  fhPtFracMaxCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1346  outputContainer->Add(fhPtFracMaxCell) ;
1347 
1348  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);
1349  fhPtDispEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1350  fhPtDispEta->SetYTitle("#sigma^{2}_{#eta #eta}");
1351  outputContainer->Add(fhPtDispEta);
1352 
1353  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);
1354  fhPtDispPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1355  fhPtDispPhi->SetYTitle("#sigma^{2}_{#phi #phi}");
1356  outputContainer->Add(fhPtDispPhi);
1357 
1358  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);
1359  fhPtSumEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1360  fhPtSumEta->SetYTitle("#delta^{2}_{#eta #eta}");
1361  outputContainer->Add(fhPtSumEta);
1362 
1363  fhPtSumPhi = new TH2F ("hPtSumPhi","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs #it{p}_{T}",
1364  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1365  fhPtSumPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1366  fhPtSumPhi->SetYTitle("#delta^{2}_{#phi #phi}");
1367  outputContainer->Add(fhPtSumPhi);
1368 
1369  fhPtSumEtaPhi = new TH2F ("hPtSumEtaPhi","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs #it{p}_{T}",
1370  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1371  fhPtSumEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1372  fhPtSumEtaPhi->SetYTitle("#delta^{2}_{#eta #phi}");
1373  outputContainer->Add(fhPtSumEtaPhi);
1374 
1375  fhPtDispEtaPhiDiff = new TH2F ("hPtDispEtaPhiDiff","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",
1376  nptbins,ptmin,ptmax,200, -10,10);
1377  fhPtDispEtaPhiDiff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1378  fhPtDispEtaPhiDiff->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1379  outputContainer->Add(fhPtDispEtaPhiDiff);
1380 
1381  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})",
1382  nptbins,ptmin,ptmax, 200, -1,1);
1383  fhPtSphericity->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1384  fhPtSphericity->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1385  outputContainer->Add(fhPtSphericity);
1386 
1387  for(Int_t i = 0; i < 7; i++)
1388  {
1389  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]),
1390  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1391  fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1392  fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1393  outputContainer->Add(fhDispEtaDispPhi[i]);
1394 
1395  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]),
1396  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1397  fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1398  fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1399  outputContainer->Add(fhLambda0DispEta[i]);
1400 
1401  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]),
1402  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1403  fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1404  fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1405  outputContainer->Add(fhLambda0DispPhi[i]);
1406  }
1407  }
1408 
1409  fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
1410  nptbins,ptmin,ptmax,20,0,20);
1411  fhNLocMaxPt ->SetYTitle("N maxima");
1412  fhNLocMaxPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1413  outputContainer->Add(fhNLocMaxPt) ;
1414 
1416  {
1417  for(Int_t iSM = 0; iSM < fNModules; iSM++)
1418  {
1419  if(iSM < fFirstModule || iSM > fLastModule) continue;
1420 
1421  fhNLocMaxPtSM[iSM] = new TH2F(Form("hNLocMaxPt_SM%d",iSM),Form("Number of local maxima in cluster, selected clusters in SM %d",iSM),
1422  nptbins,ptmin,ptmax,20,0,20);
1423  fhNLocMaxPtSM[iSM] ->SetYTitle("N maxima");
1424  fhNLocMaxPtSM[iSM] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1425  outputContainer->Add(fhNLocMaxPtSM[iSM]) ;
1426  }
1427 
1428  for (Int_t i = 0; i < 3; i++)
1429  {
1430  fhPtLambda0LocMax[i] = new TH2F(Form("hPtLambda0LocMax%d",i+1),
1431  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s",nlm[i].Data()),
1432  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1433  fhPtLambda0LocMax[i]->SetYTitle("#lambda_{0}^{2}");
1434  fhPtLambda0LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1435  outputContainer->Add(fhPtLambda0LocMax[i]) ;
1436 
1437  if(IsDataMC())
1438  {
1439  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1440  {
1441  fhMCPtLambda0LocMax[ipart][i] = new TH2F
1442  (Form("hPtLambda0LocMax%d_MC%s",i+1,pname[ipart].Data()),
1443  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s, MC %s",nlm[i].Data(),ptype[ipart].Data()),
1444  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1445  fhMCPtLambda0LocMax[ipart][i]->SetYTitle("#lambda_{0}^{2}");
1446  fhMCPtLambda0LocMax[ipart][i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1447  outputContainer->Add(fhMCPtLambda0LocMax[ipart][i]) ;
1448  }
1449  }
1450 
1451  fhPtLambda1LocMax[i] = new TH2F(Form("hPtLambda1LocMax%d",i+1),
1452  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}, %s",nlm[i].Data()),
1453  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1454  fhPtLambda1LocMax[i]->SetYTitle("#lambda_{1}^{2}");
1455  fhPtLambda1LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1456  outputContainer->Add(fhPtLambda1LocMax[i]) ;
1457 
1459  {
1460  fhPtDispersionLocMax[i] = new TH2F(Form("hPtDispersionLocMax%d",i+1),
1461  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion^{2}, %s",nlm[i].Data()),
1462  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1463  fhPtDispersionLocMax[i]->SetYTitle("dispersion^{2}");
1464  fhPtDispersionLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1465  outputContainer->Add(fhPtDispersionLocMax[i]) ;
1466 
1467  fhPtDispEtaLocMax[i] = new TH2F(Form("hPtDispEtaLocMax%d",i+1),
1468  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #eta}, %s",nlm[i].Data()),
1469  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1470  fhPtDispEtaLocMax[i]->SetYTitle("#sigma_{#eta #eta}");
1471  fhPtDispEtaLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1472  outputContainer->Add(fhPtDispEtaLocMax[i]) ;
1473 
1474  fhPtDispPhiLocMax[i] = new TH2F(Form("hPtDispPhiLocMax%d",i+1),
1475  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi}, %s",nlm[i].Data()),
1476  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1477  fhPtDispPhiLocMax[i]->SetYTitle("#sigma_{#phi #phi}");
1478  fhPtDispPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1479  outputContainer->Add(fhPtDispPhiLocMax[i]) ;
1480 
1481  fhPtSumEtaPhiLocMax[i] = new TH2F(Form("hPtSumEtaPhiLocMax%d",i+1),
1482  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #phi}, %s",nlm[i].Data()),
1483  nptbins,ptmin,ptmax,2*ssbins,-ssmax,ssmax);
1484  fhPtSumEtaPhiLocMax[i]->SetYTitle("#sigma_{#eta #phi}");
1485  fhPtSumEtaPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1486  outputContainer->Add(fhPtSumEtaPhiLocMax[i]) ;
1487 
1488  fhPtDispEtaPhiDiffLocMax[i] = new TH2F(Form("hPtDispEtaPhiDiffLocMax%d",i+1),
1489  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi} - #sigma_{#eta #eta}, %s",nlm[i].Data()),
1490  nptbins,ptmin,ptmax,200, -10,10);
1491  fhPtDispEtaPhiDiffLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta}");
1492  fhPtDispEtaPhiDiffLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1493  outputContainer->Add(fhPtDispEtaPhiDiffLocMax[i]) ;
1494 
1495  fhPtSphericityLocMax[i] = new TH2F(Form("hPtSphericityLocMax%d",i+1),
1496  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()),
1497  nptbins,ptmin,ptmax,200, -1,1);
1498  fhPtSphericityLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta} / (#sigma_{#phi #phi} + #sigma_{#eta #eta})");
1499  fhPtSphericityLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1500  outputContainer->Add(fhPtSphericityLocMax[i]) ;
1501  }
1502  }
1503  } // all NLM histos
1504 
1505  fhPtNCells = new TH2F ("hPtNCells","N cells in cluster vs E ", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1506  fhPtNCells->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1507  fhPtNCells->SetYTitle("# of cells in cluster");
1508  outputContainer->Add(fhPtNCells);
1509 
1510  fhPtTime = new TH2F("hPtTime","cluster time vs pair E",nptbins,ptmin,ptmax, tbins,tmin,tmax);
1511  fhPtTime->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1512  fhPtTime->SetYTitle("t (ns)");
1513  outputContainer->Add(fhPtTime);
1514 
1515  }
1516 
1517  if(fAnaType != kIMCaloTracks)
1518  {
1519  fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs E",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1520  fhEPairDiffTime->SetXTitle("#it{E}_{pair} (GeV)");
1521  fhEPairDiffTime->SetYTitle("#Delta t (ns)");
1522  outputContainer->Add(fhEPairDiffTime);
1523  }
1524 
1525  if(fAnaType == kIMCalo)
1526  {
1527  TString combiName [] = {"1LocMax","2LocMax","NLocMax","1LocMax2LocMax","1LocMaxNLocMax","2LocMaxNLocMax","1LocMaxSSBad","NLocMaxSSGood"};
1528  TString combiTitle[] = {"1 Local Maxima in both clusters","2 Local Maxima in both clusters","more than 2 Local Maxima in both clusters",
1529  "1 Local Maxima paired with 2 Local Maxima","1 Local Maxima paired with more than 2 Local Maxima",
1530  "2 Local Maxima paired with more than 2 Local Maxima",
1531  "1 Local Maxima paired with #lambda_{0}^{2}>0.3","N Local Maxima paired with 0.1<#lambda_{0}^{2}<0.3"};
1532 
1534  {
1535  for (Int_t i = 0; i < 8 ; i++)
1536  {
1537  if (fAnaType == kIMCaloTracks && i > 2 ) continue ;
1538 
1539  fhMassPairLocMax[i] = new TH2F
1540  (Form("MassPairLocMax%s",combiName[i].Data()),
1541  Form("#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}, %s", combiTitle[i].Data()),
1542  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1543  fhMassPairLocMax[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1544  fhMassPairLocMax[i]->SetXTitle("#it{E}_{pair} (GeV)");
1545  outputContainer->Add(fhMassPairLocMax[i]) ;
1546  }
1547  }
1548  }
1549 
1550  if(fFillTMHisto)
1551  {
1552  fhTrackMatchedDEta = new TH2F
1553  ("hTrackMatchedDEta",
1554  "d#eta of cluster-track vs cluster #it{p}_{T}",
1555  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1556  fhTrackMatchedDEta->SetYTitle("d#eta");
1557  fhTrackMatchedDEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1558 
1559  fhTrackMatchedDPhi = new TH2F
1560  ("hTrackMatchedDPhi",
1561  "d#phi of cluster-track vs cluster #it{p}_{T}",
1562  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1563  fhTrackMatchedDPhi->SetYTitle("d#phi (rad)");
1564  fhTrackMatchedDPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1565 
1567  ("hTrackMatchedDEtaDPhi",
1568  "d#eta vs d#phi of cluster-track",
1569  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1570  fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)");
1571  fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
1572 
1573  outputContainer->Add(fhTrackMatchedDEta) ;
1574  outputContainer->Add(fhTrackMatchedDPhi) ;
1575  outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
1576 
1578  ("hTrackMatchedDEtaPos",
1579  "d#eta of cluster-track vs cluster #it{p}_{T}",
1580  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1581  fhTrackMatchedDEtaPos->SetYTitle("d#eta");
1582  fhTrackMatchedDEtaPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1583 
1585  ("hTrackMatchedDPhiPos",
1586  "d#phi of cluster-track vs cluster #it{p}_{T}",
1587  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1588  fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)");
1589  fhTrackMatchedDPhiPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1590 
1592  ("hTrackMatchedDEtaDPhiPos",
1593  "d#eta vs d#phi of cluster-track",
1594  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1595  fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)");
1596  fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
1597 
1598  outputContainer->Add(fhTrackMatchedDEtaPos) ;
1599  outputContainer->Add(fhTrackMatchedDPhiPos) ;
1600  outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
1601 
1603  ("hTrackMatchedDEtaNeg",
1604  "d#eta of cluster-track vs cluster #it{p}_{T}",
1605  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1606  fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
1607  fhTrackMatchedDEtaNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1608 
1610  ("hTrackMatchedDPhiNeg",
1611  "d#phi of cluster-track vs cluster #it{p}_{T}",
1612  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1613  fhTrackMatchedDPhiNeg->SetYTitle("d#phi (rad)");
1614  fhTrackMatchedDPhiNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1615 
1617  ("hTrackMatchedDEtaDPhiNeg",
1618  "d#eta vs d#phi of cluster-track",
1619  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1620  fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#phi (rad)");
1621  fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
1622 
1623  outputContainer->Add(fhTrackMatchedDEtaNeg) ;
1624  outputContainer->Add(fhTrackMatchedDPhiNeg) ;
1625  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
1626 
1627  fhdEdx = new TH2F ("hdEdx","matched track <dE/dx> vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1628  fhdEdx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1629  fhdEdx->SetYTitle("<#it{dE}/#it{dx}>");
1630  outputContainer->Add(fhdEdx);
1631 
1632  fhEOverP = new TH2F ("hEOverP","matched track E/p vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1633  fhEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1634  fhEOverP->SetYTitle("#it{E}/#it{p}");
1635  outputContainer->Add(fhEOverP);
1636 
1638  {
1639  fhEOverPNoTRD = new TH2F ("hEOverPNoTRD","matched track E/p vs cluster E, SM not behind TRD ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1640  fhEOverPNoTRD->SetXTitle("#it{E} (GeV)");
1641  fhEOverPNoTRD->SetYTitle("#it{E}/#it{p}");
1642  outputContainer->Add(fhEOverPNoTRD);
1643  }
1644 
1645  if(IsDataMC() && fFillTMHisto)
1646  {
1648  ("hTrackMatchedMCParticlePt",
1649  "Origin of particle vs energy",
1650  nptbins,ptmin,ptmax,8,0,8);
1651  fhTrackMatchedMCParticlePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1652  //fhTrackMatchedMCParticlePt->SetYTitle("Particle type");
1653 
1654  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(1 ,"Photon");
1655  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(2 ,"Electron");
1656  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1657  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(4 ,"Rest");
1658  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1659  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1660  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1661  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1662 
1663  outputContainer->Add(fhTrackMatchedMCParticlePt);
1664 
1666  ("hTrackMatchedMCParticleDEta",
1667  "Origin of particle vs #eta residual",
1668  nresetabins,resetamin,resetamax,8,0,8);
1669  fhTrackMatchedMCParticleDEta->SetXTitle("#Delta #eta");
1670  //fhTrackMatchedMCParticleDEta->SetYTitle("Particle type");
1671 
1672  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(1 ,"Photon");
1673  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(2 ,"Electron");
1674  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1675  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(4 ,"Rest");
1676  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1677  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1678  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1679  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1680 
1681  outputContainer->Add(fhTrackMatchedMCParticleDEta);
1682 
1684  ("hTrackMatchedMCParticleDPhi",
1685  "Origin of particle vs #phi residual",
1686  nresphibins,resphimin,resphimax,8,0,8);
1687  fhTrackMatchedMCParticleDPhi->SetXTitle("#Delta #phi");
1688  //fhTrackMatchedMCParticleDPhi->SetYTitle("Particle type");
1689 
1690  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(1 ,"Photon");
1691  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(2 ,"Electron");
1692  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1693  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(4 ,"Rest");
1694  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1695  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1696  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1697  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1698 
1699  outputContainer->Add(fhTrackMatchedMCParticleDPhi);
1700  }
1701  }
1702 
1704  {
1705  fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1706  nptbins,ptmin,ptmax, 100,0,1.);
1707  fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1708  fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
1709  outputContainer->Add(fhECellClusterRatio);
1710 
1711  fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1712  nptbins,ptmin,ptmax, 100,-10,0);
1713  fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1714  fhECellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1715  outputContainer->Add(fhECellClusterLogRatio);
1716 
1717  fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1718  nptbins,ptmin,ptmax, 100,0,1.);
1719  fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1720  fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
1721  outputContainer->Add(fhEMaxCellClusterRatio);
1722 
1723  fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1724  nptbins,ptmin,ptmax, 100,-10,0);
1725  fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1726  fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1727  outputContainer->Add(fhEMaxCellClusterLogRatio);
1728 
1729  for(Int_t iw = 0; iw < 14; iw++)
1730  {
1731  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),
1732  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1733  fhLambda0ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1734  fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}");
1735  outputContainer->Add(fhLambda0ForW0[iw]);
1736 
1737  // 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),
1738  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1739  // fhLambda1ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1740  // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}");
1741  // outputContainer->Add(fhLambda1ForW0[iw]);
1742  }
1743  }
1744 
1745  if(IsDataMC())
1746  {
1747  // Origin
1748 
1749  fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1750  fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1751  fhMCPi0PtOrigin->SetYTitle("Origin");
1752  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1753  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1754  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1755  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1756  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1757  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1758  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1759  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1760  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1761  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1762  outputContainer->Add(fhMCPi0PtOrigin) ;
1763 
1764  fhMCNotResonancePi0PtOrigin = new TH2F("hMCNotResonancePi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1765  fhMCNotResonancePi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1766  fhMCNotResonancePi0PtOrigin->SetYTitle("Origin");
1767  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1768  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1769  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1770  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1771  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1772  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1773  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1774  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1775  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1776  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1777  outputContainer->Add(fhMCNotResonancePi0PtOrigin) ;
1778 
1779  fhMCPi0PtStatus = new TH2F("hMCPi0PtStatus","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs status",nptbins,ptmin,ptmax,101,-50,50) ;
1780  fhMCPi0PtStatus->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1781  fhMCPi0PtStatus->SetYTitle("Status");
1782  outputContainer->Add(fhMCPi0PtStatus) ;
1783 
1784  fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ;
1785  fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1786  fhMCEtaPtOrigin->SetYTitle("Origin");
1787  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1788  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1789  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1790  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1791  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other");
1792  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime");
1793  outputContainer->Add(fhMCEtaPtOrigin) ;
1794 
1795  fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1796  fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1797  fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)");
1798  outputContainer->Add(fhMCPi0ProdVertex) ;
1799 
1800  fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1801  fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1802  fhMCEtaProdVertex->SetYTitle("#it{R} (cm)");
1803  outputContainer->Add(fhMCEtaProdVertex) ;
1804 
1805  if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
1806  {
1807  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",
1808  nptbins,ptmin,ptmax,200,0,2);
1809  fhMCPi0PtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1810  fhMCPi0PtGenRecoFraction->SetYTitle("#it{E}^{#pi^{0} mother} / #it{E}^{rec}");
1811  outputContainer->Add(fhMCPi0PtGenRecoFraction) ;
1812 
1813  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",
1814  nptbins,ptmin,ptmax,200,0,2);
1815  fhMCEtaPtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1816  fhMCEtaPtGenRecoFraction->SetYTitle("#it{E}^{ #eta mother} / #it{E}^{rec}");
1817  outputContainer->Add(fhMCEtaPtGenRecoFraction) ;
1818 
1819  fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1820  fhMCPi0DecayPt->SetYTitle("#it{N}");
1821  fhMCPi0DecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1822  outputContainer->Add(fhMCPi0DecayPt) ;
1823 
1824  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}",
1825  nptbins,ptmin,ptmax,100,0,1);
1826  fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/#it{c})");
1827  fhMCPi0DecayPtFraction->SetYTitle("E^{gen} / E^{gen-mother}");
1828  outputContainer->Add(fhMCPi0DecayPtFraction) ;
1829 
1830  fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #eta decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1831  fhMCEtaDecayPt->SetYTitle("#it{N}");
1832  fhMCEtaDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1833  outputContainer->Add(fhMCEtaDecayPt) ;
1834 
1835  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",
1836  nptbins,ptmin,ptmax,100,0,1);
1837  fhMCEtaDecayPtFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1838  fhMCEtaDecayPtFraction->SetYTitle("#it{E}^{gen} / #it{E}^{gen-mother}");
1839  outputContainer->Add(fhMCEtaDecayPtFraction) ;
1840 
1841  fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma decay (not #eta or #pi^{0}) identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1842  fhMCOtherDecayPt->SetYTitle("#it{N}");
1843  fhMCOtherDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1844  outputContainer->Add(fhMCOtherDecayPt) ;
1845  }
1846 
1847  if(fAnaType!=kSSCalo)
1848  {
1849  fhAnglePairMCPi0 = new TH2F
1850  ("AnglePairMCPi0",
1851  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5);
1852  fhAnglePairMCPi0->SetYTitle("#alpha (rad)");
1853  fhAnglePairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1854  outputContainer->Add(fhAnglePairMCPi0) ;
1855 
1856  fhAnglePairMCEta = new TH2F
1857  ("AnglePairMCEta",
1858  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,250,0,0.5);
1859  fhAnglePairMCEta->SetYTitle("#alpha (rad)");
1860  fhAnglePairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1861  outputContainer->Add(fhAnglePairMCEta) ;
1862 
1863  fhMassPairMCPi0 = new TH2F
1864  ("MassPairMCPi0",
1865  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1866  fhMassPairMCPi0->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1867  fhMassPairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1868  outputContainer->Add(fhMassPairMCPi0) ;
1869 
1870  fhMassPairMCEta = new TH2F
1871  ("MassPairMCEta",
1872  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1873  fhMassPairMCEta->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1874  fhMassPairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1875  outputContainer->Add(fhMassPairMCEta) ;
1876  }
1877 
1878  Int_t ntypes = fgkNmcTypes;
1879  if(fAnaType != kSSCalo) ntypes = 2;
1880 
1881  for(Int_t i = 0; i < ntypes; i++)
1882  {
1883  fhMCE[i] = new TH1F
1884  (Form("hE_MC%s",pname[i].Data()),
1885  Form("Identified as #pi^{0} (#eta), cluster from %s",
1886  ptype[i].Data()),
1887  nptbins,ptmin,ptmax);
1888  fhMCE[i]->SetYTitle("#it{N}");
1889  fhMCE[i]->SetXTitle("#it{E} (GeV)");
1890  outputContainer->Add(fhMCE[i]) ;
1891 
1892  fhMCPt[i] = new TH1F
1893  (Form("hPt_MC%s",pname[i].Data()),
1894  Form("Identified as #pi^{0} (#eta), cluster from %s",
1895  ptype[i].Data()),
1896  nptbins,ptmin,ptmax);
1897  fhMCPt[i]->SetYTitle("#it{N}");
1898  fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1899  outputContainer->Add(fhMCPt[i]) ;
1900 
1902  {
1903  fhMCPtCentrality[i] = new TH2F
1904  (Form("hPtCentrality_MC%s",pname[i].Data()),
1905  Form("Identified as #pi^{0} (#eta), cluster from %s",
1906  ptype[i].Data()),
1907  nptbins,ptmin,ptmax, 100,0,100);
1908  fhMCPtCentrality[i]->SetYTitle("centrality");
1909  fhMCPtCentrality[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1910  outputContainer->Add(fhMCPtCentrality[i]) ;
1911  }
1912 
1913  if(fAnaType == kSSCalo)
1914  {
1915  fhMCNLocMaxPt[i] = new TH2F
1916  (Form("hNLocMaxPt_MC%s",pname[i].Data()),
1917  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, accepted",ptype[i].Data()),
1918  nptbins,ptmin,ptmax,20,0,20);
1919  fhMCNLocMaxPt[i] ->SetYTitle("#it{NLM}");
1920  fhMCNLocMaxPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1921  outputContainer->Add(fhMCNLocMaxPt[i]) ;
1922 
1923  fhMCNLocMaxPtReject[i] = new TH2F
1924  (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
1925  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, rejected",ptype[i].Data()),
1926  nptbins,ptmin,ptmax,20,0,20);
1927  fhMCNLocMaxPtReject[i] ->SetYTitle("#it{NLM}");
1928  fhMCNLocMaxPtReject[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1929  outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
1930 
1931  fhMCEReject[i] = new TH1F
1932  (Form("hEReject_MC%s",pname[i].Data()),
1933  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1934  ptype[i].Data()),
1935  nptbins,ptmin,ptmax);
1936  fhMCEReject[i]->SetYTitle("#it{N}");
1937  fhMCEReject[i]->SetXTitle("#it{E} (GeV)");
1938  outputContainer->Add(fhMCEReject[i]) ;
1939 
1940  fhMCPtReject[i] = new TH1F
1941  (Form("hPtReject_MC%s",pname[i].Data()),
1942  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1943  ptype[i].Data()),
1944  nptbins,ptmin,ptmax);
1945  fhMCPtReject[i]->SetYTitle("#it{N}");
1946  fhMCPtReject[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1947  outputContainer->Add(fhMCPtReject[i]) ;
1948  }
1949 
1950  fhMCPtPhi[i] = new TH2F
1951  (Form("hPtPhi_MC%s",pname[i].Data()),
1952  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
1953  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1954  fhMCPtPhi[i]->SetYTitle("#phi");
1955  fhMCPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1956  outputContainer->Add(fhMCPtPhi[i]) ;
1957 
1958  fhMCPtEta[i] = new TH2F
1959  (Form("hPtEta_MC%s",pname[i].Data()),
1960  Form("Identified as #pi^{0} (#eta), cluster from %s",
1961  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
1962  fhMCPtEta[i]->SetYTitle("#eta");
1963  fhMCPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1964  outputContainer->Add(fhMCPtEta[i]) ;
1965 
1966  fhMCMassPt[i] = new TH2F
1967  (Form("hMassPt_MC%s",pname[i].Data()),
1968  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1969  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1970  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1971  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1972  outputContainer->Add(fhMCMassPt[i]) ;
1973 
1974  fhMCSelectedMassPt[i] = new TH2F
1975  (Form("hSelectedMassPt_MC%s",pname[i].Data()),
1976  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1977  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1978  fhMCSelectedMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1979  fhMCSelectedMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1980  outputContainer->Add(fhMCSelectedMassPt[i]) ;
1981 
1982  if(fAnaType == kSSCalo)
1983  {
1984  fhMCMassPtNoOverlap[i] = new TH2F
1985  (Form("hMassPtNoOverlap_MC%s",pname[i].Data()),
1986  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1987  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1988  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1989  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1990  outputContainer->Add(fhMCMassPtNoOverlap[i]) ;
1991 
1993  (Form("hSelectedMassPtNoOverlap_MC%s",pname[i].Data()),
1994  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1995  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1996  fhMCSelectedMassPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1997  fhMCSelectedMassPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1998  outputContainer->Add(fhMCSelectedMassPtNoOverlap[i]) ;
1999  }
2000 
2001  if( fFillSelectClHisto )
2002  {
2003  fhMCPtLambda0[i] = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
2004  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptype[i].Data()),
2005  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2006  fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
2007  fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2008  outputContainer->Add(fhMCPtLambda0[i]) ;
2009 
2010  fhMCPtLambda1[i] = new TH2F(Form("hELambda1_MC%s",pname[i].Data()),
2011  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{1}^{2}",ptype[i].Data()),
2012  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2013  fhMCPtLambda1[i]->SetYTitle("#lambda_{1}^{2}");
2014  fhMCPtLambda1[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2015  outputContainer->Add(fhMCPtLambda1[i]) ;
2016 
2018  {
2019  fhMCPtLambda0NoTRD[i] = new TH2F(Form("hELambda0NoTRD_MC%s",pname[i].Data()),
2020  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, NoTRD",ptype[i].Data()),
2021  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2022  fhMCPtLambda0NoTRD[i]->SetYTitle("#lambda_{0}^{2}");
2023  fhMCPtLambda0NoTRD[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2024  outputContainer->Add(fhMCPtLambda0NoTRD[i]) ;
2025  }
2026 
2028  {
2029  fhMCPtDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pname[i].Data()),
2030  Form("Selected pair, cluster from %s : #it{p}_{T} vs dispersion^{2}",ptype[i].Data()),
2031  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2032  fhMCPtDispersion[i]->SetYTitle("#it{D}^{2}");
2033  fhMCPtDispersion[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2034  outputContainer->Add(fhMCPtDispersion[i]) ;
2035 
2036  fhMCPtDispEta[i] = new TH2F (Form("hPtDispEta_MC%s",pname[i].Data()),
2037  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()),
2038  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2039  fhMCPtDispEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2040  fhMCPtDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2041  outputContainer->Add(fhMCPtDispEta[i]);
2042 
2043  fhMCPtDispPhi[i] = new TH2F (Form("hPtDispPhi_MC%s",pname[i].Data()),
2044  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()),
2045  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2046  fhMCPtDispPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2047  fhMCPtDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2048  outputContainer->Add(fhMCPtDispPhi[i]);
2049 
2050  fhMCPtSumEtaPhi[i] = new TH2F (Form("hPtSumEtaPhi_MC%s",pname[i].Data()),
2051  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()),
2052  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2053  fhMCPtSumEtaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2054  fhMCPtSumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
2055  outputContainer->Add(fhMCPtSumEtaPhi[i]);
2056 
2057  fhMCPtDispEtaPhiDiff[i] = new TH2F (Form("hPtDispEtaPhiDiff_MC%s",pname[i].Data()),
2058  Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",ptype[i].Data()),
2059  nptbins,ptmin,ptmax,200,-10,10);
2060  fhMCPtDispEtaPhiDiff[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2061  fhMCPtDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
2062  outputContainer->Add(fhMCPtDispEtaPhiDiff[i]);
2063 
2064  fhMCPtSphericity[i] = new TH2F (Form("hPtSphericity_MC%s",pname[i].Data()),
2065  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()),
2066  nptbins,ptmin,ptmax, 200,-1,1);
2067  fhMCPtSphericity[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2068  fhMCPtSphericity[i]->SetYTitle("#it{s} = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
2069  outputContainer->Add(fhMCPtSphericity[i]);
2070 
2071  for(Int_t ie = 0; ie < 7; ie++)
2072  {
2073  fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2074  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]),
2075  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2076  fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2077  fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2078  outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2079 
2080  fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pname[i].Data()),
2081  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]),
2082  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2083  fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2084  fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2085  outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2086 
2087  fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2088  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]),
2089  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2090  fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2091  fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2092  outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2093  }
2094 
2095  fhMCPtLambda0FracMaxCellCut[i] = new TH2F(Form("hELambda0FracMaxCellCut_MC%s",pname[i].Data()),
2096  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, Max cell fraction of energy < 0.5 ",ptype[i].Data()),
2097  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2098  fhMCPtLambda0FracMaxCellCut[i]->SetYTitle("#lambda_{0}^{2}");
2099  fhMCPtLambda0FracMaxCellCut[i]->SetXTitle("#it{E} (GeV)");
2100  outputContainer->Add(fhMCPtLambda0FracMaxCellCut[i]) ;
2101 
2102  fhMCPtFracMaxCell[i] = new TH2F(Form("hEFracMaxCell_MC%s",pname[i].Data()),
2103  Form("Selected pair, cluster from %s : #it{p}_{T} vs Max cell fraction of energy",ptype[i].Data()),
2104  nptbins,ptmin,ptmax,100,0,1);
2105  fhMCPtFracMaxCell[i]->SetYTitle("#it{Fraction}");
2106  fhMCPtFracMaxCell[i]->SetXTitle("#it{E} (GeV)");
2107  outputContainer->Add(fhMCPtFracMaxCell[i]) ;
2108  }
2109  }
2110  }// MC particle loop
2111  }//Histos with MC
2112 
2113  if(fAnaType==kSSCalo)
2114  {
2115  fhAsymmetry = new TH2F ("hAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2116  nptbins,ptmin,ptmax, 200, -1,1);
2117  fhAsymmetry->SetXTitle("#it{E} (GeV)");
2118  fhAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2119  outputContainer->Add(fhAsymmetry);
2120 
2121  fhSelectedAsymmetry = new TH2F ("hSelectedAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2122  nptbins,ptmin,ptmax, 200, -1,1);
2123  fhSelectedAsymmetry->SetXTitle("#it{E} (GeV)");
2124  fhSelectedAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2125  outputContainer->Add(fhSelectedAsymmetry);
2126 
2127  fhSplitE = new TH1F
2128  ("hSplitE","Selected #pi^{0} (#eta) pairs energy sum of split sub-clusters",nptbins,ptmin,ptmax);
2129  fhSplitE->SetYTitle("counts");
2130  fhSplitE->SetXTitle("#it{E} (GeV)");
2131  outputContainer->Add(fhSplitE) ;
2132 
2133  fhSplitPt = new TH1F
2134  ("hSplitPt","Selected #pi^{0} (#eta) pairs #it{p}_{T} sum of split sub-clusters",nptbins,ptmin,ptmax);
2135  fhSplitPt->SetYTitle("counts");
2136  fhSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2137  outputContainer->Add(fhSplitPt) ;
2138 
2139 
2140  fhSplitPtPhi = new TH2F
2141  ("hSplitPtPhi","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2142  fhSplitPtPhi->SetYTitle("#phi (rad)");
2143  fhSplitPtPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2144  outputContainer->Add(fhSplitPtPhi) ;
2145 
2146  fhSplitPtEta = new TH2F
2147  ("hSplitPtEta","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
2148  fhSplitPtEta->SetYTitle("#eta");
2149  fhSplitPtEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2150  outputContainer->Add(fhSplitPtEta) ;
2151 
2152 
2153  fhNLocMaxSplitPt = new TH2F("hNLocMaxSplitPt","Number of local maxima in cluster",
2154  nptbins,ptmin,ptmax,20,0,20);
2155  fhNLocMaxSplitPt ->SetYTitle("#it{NLM}");
2156  fhNLocMaxSplitPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2157  outputContainer->Add(fhNLocMaxSplitPt) ;
2158 
2159 
2160  fhMassSplitPt = new TH2F
2161  ("hMassSplitPt","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2162  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2163  fhMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2164  fhMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2165  outputContainer->Add(fhMassSplitPt) ;
2166 
2168  ("hSelectedMassSplitPt","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2169  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2170  fhSelectedMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2171  fhSelectedMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2172  outputContainer->Add(fhSelectedMassSplitPt) ;
2173 
2174  if(IsDataMC())
2175  {
2177  ("hMassSplitPtNoOverlap","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2178  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2179  fhMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2180  fhMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2181  outputContainer->Add(fhMassSplitPtNoOverlap) ;
2182 
2184  ("hSelectedMassSplitPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2185  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2186  fhSelectedMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2187  fhSelectedMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2188  outputContainer->Add(fhSelectedMassSplitPtNoOverlap) ;
2189 
2190 
2192  ("hMCPi0PtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2193  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2194  fhMCPi0PtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2195  fhMCPi0PtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2196  outputContainer->Add(fhMCPi0PtRecoPtPrim ) ;
2197 
2199  ("hMCPi0PtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2200  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2201  fhMCPi0PtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2202  fhMCPi0PtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2203  outputContainer->Add(fhMCPi0PtRecoPtPrimNoOverlap ) ;
2204 
2206  ("hMCPi0SelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2207  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2208  fhMCPi0SelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2209  fhMCPi0SelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2210  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrim ) ;
2211 
2213  ("hMCPi0SelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2214  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2215  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2216  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2217  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimNoOverlap ) ;
2218 
2219 
2221  ("hMCPi0SplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2222  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2223  fhMCPi0SplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2224  fhMCPi0SplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2225  outputContainer->Add(fhMCPi0SplitPtRecoPtPrim ) ;
2226 
2228  ("hMCPi0SplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2229  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2230  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2231  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2232  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimNoOverlap ) ;
2233 
2235  ("hMCPi0SelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2236  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2237  fhMCPi0SelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2238  fhMCPi0SelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2239  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrim ) ;
2240 
2242  ("hMCPi0SelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2243  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2244  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2245  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2246  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ) ;
2247 
2249  ("hMCEtaPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2250  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2251  fhMCEtaPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2252  fhMCEtaPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2253  outputContainer->Add(fhMCEtaPtRecoPtPrim ) ;
2254 
2256  ("hMCEtaPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2257  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2258  fhMCEtaPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2259  fhMCEtaPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2260  outputContainer->Add(fhMCEtaPtRecoPtPrimNoOverlap ) ;
2261 
2263  ("hMCEtaSelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2264  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2265  fhMCEtaSelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2266  fhMCEtaSelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2267  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrim ) ;
2268 
2270  ("hMCEtaSelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2271  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2272  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2273  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2274  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimNoOverlap ) ;
2275 
2276 
2278  ("hMCEtaSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2279  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2280  fhMCEtaSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2281  fhMCEtaSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2282  outputContainer->Add(fhMCEtaSplitPtRecoPtPrim ) ;
2283 
2285  ("hMCEtaSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2286  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2287  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2288  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2289  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimNoOverlap ) ;
2290 
2292  ("hMCEtaSelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2293  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2294  fhMCEtaSelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2295  fhMCEtaSelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2296  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrim ) ;
2297 
2299  ("hMCEtaSelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2300  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2301  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2302  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2303  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ) ;
2304 
2305 
2306  for(Int_t inlm = 0; inlm < 3; inlm++)
2307  {
2308  fhMCPi0PtRecoPtPrimLocMax[inlm] = new TH2F
2309  (Form("hMCPi0PtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2310  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2311  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2312  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2313  outputContainer->Add(fhMCPi0PtRecoPtPrimLocMax[inlm] ) ;
2314 
2316  (Form("hMCPi0SelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2317  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2318  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2319  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2320  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ) ;
2321 
2323  (Form("hMCPi0SplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2324  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2325  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2326  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2327  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ) ;
2328 
2330  (Form("hMCPi0SelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2331  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2332  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2333  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2334  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2335 
2336  fhMCEtaPtRecoPtPrimLocMax[inlm] = new TH2F
2337  (Form("hMCEtaPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2338  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2339  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2340  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2341  outputContainer->Add(fhMCEtaPtRecoPtPrimLocMax[inlm] ) ;
2342 
2344  (Form("hMCEtaSelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2345  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2346  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2347  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2348  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ) ;
2349 
2351  (Form("hMCEtaSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2352  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2353  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2354  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2355  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ) ;
2356 
2358  (Form("hMCEtaSelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2359  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2360  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2361  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2362  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2363  }
2364 
2365  for(Int_t i = 0; i < fgkNmcTypes; i++)
2366  {
2367  fhMCPtAsymmetry[i] = new TH2F (Form("hEAsymmetry_MC%s",pname[i].Data()),
2368  Form("cluster from %s : #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",ptype[i].Data()),
2369  nptbins,ptmin,ptmax, 200,-1,1);
2370  fhMCPtAsymmetry[i]->SetXTitle("#it{E} (GeV)");
2371  fhMCPtAsymmetry[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2372  outputContainer->Add(fhMCPtAsymmetry[i]);
2373 
2374  fhMCSplitE[i] = new TH1F
2375  (Form("hSplitE_MC%s",pname[i].Data()),
2376  Form("cluster from %s, energy sum of split sub-clusters",ptype[i].Data()),
2377  nptbins,ptmin,ptmax);
2378  fhMCSplitE[i]->SetYTitle("counts");
2379  fhMCSplitE[i]->SetXTitle("#it{E} (GeV)");
2380  outputContainer->Add(fhMCSplitE[i]) ;
2381 
2382  fhMCSplitPt[i] = new TH1F
2383  (Form("hSplitPt_MC%s",pname[i].Data()),
2384  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters",ptype[i].Data()),
2385  nptbins,ptmin,ptmax);
2386  fhMCSplitPt[i]->SetYTitle("counts");
2387  fhMCSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2388  outputContainer->Add(fhMCSplitPt[i]) ;
2389 
2390 
2391  fhMCSplitPtPhi[i] = new TH2F
2392  (Form("hSplitPtPhi_MC%s",pname[i].Data()),
2393  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
2394  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2395  fhMCSplitPtPhi[i]->SetYTitle("#phi");
2396  fhMCSplitPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2397  outputContainer->Add(fhMCSplitPtPhi[i]) ;
2398 
2399  fhMCSplitPtEta[i] = new TH2F
2400  (Form("hSplitPtEta_MC%s",pname[i].Data()),
2401  Form("Identified as #pi^{0} (#eta), cluster from %s",
2402  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
2403  fhMCSplitPtEta[i]->SetYTitle("#eta");
2404  fhMCSplitPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2405  outputContainer->Add(fhMCSplitPtEta[i]) ;
2406 
2407 
2408  fhMCNLocMaxSplitPt[i] = new TH2F
2409  (Form("hNLocMaxSplitPt_MC%s",pname[i].Data()),
2410  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters, for NLM",ptype[i].Data()),
2411  nptbins,ptmin,ptmax,20,0,20);
2412  fhMCNLocMaxSplitPt[i] ->SetYTitle("#it{NLM}");
2413  fhMCNLocMaxSplitPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2414  outputContainer->Add(fhMCNLocMaxSplitPt[i]) ;
2415 
2416  fhMCMassSplitPt[i] = new TH2F
2417  (Form("hMassSplitPt_MC%s",pname[i].Data()),
2418  Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2419  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2420  fhMCMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2421  fhMCMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2422  outputContainer->Add(fhMCMassSplitPt[i]) ;
2423 
2424  fhMCSelectedMassSplitPt[i] = new TH2F
2425  (Form("hSelectedMassSplitPt_MC%s",pname[i].Data()),
2426  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2427  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2428  fhMCSelectedMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2429  fhMCSelectedMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2430  outputContainer->Add(fhMCSelectedMassSplitPt[i]) ;
2431 
2433  (Form("hMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2434  Form("all 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  fhMCMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2437  fhMCMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2438  outputContainer->Add(fhMCMassSplitPtNoOverlap[i]) ;
2439 
2441  (Form("hSelectedMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2442  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2443  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2444  fhMCSelectedMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2445  fhMCSelectedMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2446  outputContainer->Add(fhMCSelectedMassSplitPtNoOverlap[i]) ;
2447  }
2448  }
2449  }
2450 
2452  {
2453  for(Int_t i = 0; i< 3; i++)
2454  {
2455  fhPtAsymmetryLocMax[i] = new TH2F(Form("hEAsymmetryLocMax%d",i+1),
2456  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()),
2457  nptbins,ptmin,ptmax,200, -1,1);
2458  fhPtAsymmetryLocMax[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2459  fhPtAsymmetryLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2460  outputContainer->Add(fhPtAsymmetryLocMax[i]) ;
2461  }
2462 
2463  for(Int_t ie = 0; ie < 7; ie++)
2464  {
2465 
2466  fhAsymmetryLambda0[ie] = new TH2F (Form("hAsymmetryLambda0_EBin%d",ie),
2467  Form("#lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2468  ssbins,ssmin,ssmax , 200,-1,1);
2469  fhAsymmetryLambda0[ie]->SetXTitle("#lambda_{0}^{2}");
2470  fhAsymmetryLambda0[ie]->SetYTitle("A = ( E1 - E2 ) / ( E1 + E2 )");
2471  outputContainer->Add(fhAsymmetryLambda0[ie]);
2472 
2473  fhAsymmetryDispEta[ie] = new TH2F (Form("hAsymmetryDispEta_EBin%d",ie),
2474  Form("#sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2475  ssbins,ssmin,ssmax , 200,-1,1);
2476  fhAsymmetryDispEta[ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
2477  fhAsymmetryDispEta[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2478  outputContainer->Add(fhAsymmetryDispEta[ie]);
2479 
2480  fhAsymmetryDispPhi[ie] = new TH2F (Form("hAsymmetryDispPhi_EBin%d",ie),
2481  Form("#sigma^{2}_{#phi #phi} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2482  ssbins,ssmin,ssmax , 200,-1,1);
2483  fhAsymmetryDispPhi[ie]->SetXTitle("#sigma^{2}_{#phi #phi}");
2484  fhAsymmetryDispPhi[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2485  outputContainer->Add(fhAsymmetryDispPhi[ie]);
2486  }
2487 
2488 
2489  if(IsDataMC())
2490  {
2491  for(Int_t i = 0; i < fgkNmcTypes; i++)
2492  {
2493  for(Int_t ie = 0; ie < 7; ie++)
2494  {
2495  fhMCAsymmetryLambda0[ie][i] = new TH2F (Form("hMCAsymmetryLambda0_EBin%d_MC%s",ie,pname[i].Data()),
2496  Form("cluster from %s : #lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2497  ssbins,ssmin,ssmax , 200,-1,1);
2498  fhMCAsymmetryLambda0[ie][i]->SetXTitle("#lambda_{0}^{2}");
2499  fhMCAsymmetryLambda0[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2500  outputContainer->Add(fhMCAsymmetryLambda0[ie][i]);
2501 
2502  fhMCAsymmetryDispEta[ie][i] = new TH2F (Form("hMCAsymmetryDispEta_EBin%d_MC%s",ie,pname[i].Data()),
2503  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]),
2504  ssbins,ssmin,ssmax , 200,-1,1);
2505  fhMCAsymmetryDispEta[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2506  fhMCAsymmetryDispEta[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2507  outputContainer->Add(fhMCAsymmetryDispEta[ie][i]);
2508 
2509  fhMCAsymmetryDispPhi[ie][i] = new TH2F (Form("hMCAsymmetryDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2510  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]),
2511  ssbins,ssmin,ssmax , 200,-1,1);
2512  fhMCAsymmetryDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#phi #phi}");
2513  fhMCAsymmetryDispPhi[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2514  outputContainer->Add(fhMCAsymmetryDispPhi[ie][i]);
2515  }
2516  }
2517  }
2518  }
2519 
2520  if(IsPileUpAnalysisOn())
2521  {
2522 
2523  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2524 
2525  for(Int_t i = 0 ; i < 7 ; i++)
2526  {
2527  fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
2528  Form("Selected #pi^{0} (#eta) #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
2529  fhPtPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2530  outputContainer->Add(fhPtPileUp[i]);
2531 
2532  fhPtCellTimePileUp[i] = new TH2F(Form("hPtCellTimePileUp%s",pileUpName[i].Data()),
2533  Form("Pt vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()),
2534  nptbins,ptmin,ptmax,ntimptbins,timemin,timemax);
2535  fhPtCellTimePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2536  fhPtCellTimePileUp[i]->SetYTitle("#it{t}_{cell} (ns)");
2537  outputContainer->Add(fhPtCellTimePileUp[i]);
2538 
2539  fhPtTimeDiffPileUp[i] = new TH2F(Form("hPtTimeDiffPileUp%s",pileUpName[i].Data()),
2540  Form("Pt vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2541  nptbins,ptmin,ptmax,400,-200,200);
2542  fhPtTimeDiffPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2543  fhPtTimeDiffPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
2544  outputContainer->Add(fhPtTimeDiffPileUp[i]);
2545  }
2546 
2547  fhTimePtNoCut = new TH2F ("hTimePt_NoCut","#it{t} of cluster vs #it{E} of clusters, no cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2548  fhTimePtNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2549  fhTimePtNoCut->SetYTitle("#it{t} (ns)");
2550  outputContainer->Add(fhTimePtNoCut);
2551 
2552  fhTimePtSPD = new TH2F ("hTimePt_SPD","#it{t} of cluster vs #it{E} of clusters, SPD cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2553  fhTimePtSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2554  fhTimePtSPD->SetYTitle("#it{t} (ns)");
2555  outputContainer->Add(fhTimePtSPD);
2556 
2557  fhTimePtSPDMulti = new TH2F ("hTimePt_SPDMulti","time of cluster vs #it{E} of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2558  fhTimePtSPDMulti->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2559  fhTimePtSPDMulti->SetYTitle("#it{t} (ns)");
2560  outputContainer->Add(fhTimePtSPDMulti);
2561 
2562  fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","#it{t} of cluster vs #it{N} pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2563  fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
2564  fhTimeNPileUpVertSPD->SetXTitle("#it{t} (ns)");
2565  outputContainer->Add(fhTimeNPileUpVertSPD);
2566 
2567  fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","#it{t} of cluster vs #it{N} pile-up Tracks vertex", ntimptbins,timemin,timemax, 50,0,50 );
2568  fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
2569  fhTimeNPileUpVertTrack->SetXTitle("#it{t} (ns)");
2570  outputContainer->Add(fhTimeNPileUpVertTrack);
2571 
2572  fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","#it{t} of cluster vs #it{N} constributors to pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2573  fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
2574  fhTimeNPileUpVertContributors->SetXTitle("#it{t} (ns)");
2575  outputContainer->Add(fhTimeNPileUpVertContributors);
2576 
2577  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);
2578  fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{Z} (cm) ");
2579  fhTimePileUpMainVertexZDistance->SetXTitle("#it{t} (ns)");
2580  outputContainer->Add(fhTimePileUpMainVertexZDistance);
2581 
2582  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);
2583  fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{Z} (cm) ");
2584  fhTimePileUpMainVertexZDiamond->SetXTitle("#it{t} (ns)");
2585  outputContainer->Add(fhTimePileUpMainVertexZDiamond);
2586 
2587  fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","#it{p}_{T} of cluster vs #it{N} pile-up SPD vertex",
2588  nptbins,ptmin,ptmax,20,0,20);
2589  fhPtNPileUpSPDVtx->SetYTitle("# vertex ");
2590  fhPtNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2591  outputContainer->Add(fhPtNPileUpSPDVtx);
2592 
2593  fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","#it{p}_{T} of cluster vs #it{N} pile-up Tracks vertex",
2594  nptbins,ptmin,ptmax, 20,0,20 );
2595  fhPtNPileUpTrkVtx->SetYTitle("# vertex ");
2596  fhPtNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2597  outputContainer->Add(fhPtNPileUpTrkVtx);
2598 
2599  fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","#it{p}_{T} of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
2600  nptbins,ptmin,ptmax,20,0,20);
2601  fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
2602  fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2603  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut);
2604 
2605  fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","#it{p}_{T} of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
2606  nptbins,ptmin,ptmax, 20,0,20 );
2607  fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
2608  fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2609  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut);
2610 
2611  fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","#it{p}_{T} of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
2612  nptbins,ptmin,ptmax,20,0,20);
2613  fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
2614  fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2615  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2);
2616 
2617  fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","#it{p}_{T} of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
2618  nptbins,ptmin,ptmax, 20,0,20 );
2619  fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
2620  fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2621  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2);
2622 
2623  }
2624 
2625  // Keep neutral meson selection histograms if requiered
2626  // Setting done in AliNeutralMesonSelection
2627 
2629  {
2631 
2632  if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
2633  for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
2634 
2635  delete nmsHistos;
2636  }
2637 
2638  return outputContainer ;
2639 }
2640 
2641 //_____________________________________________
2644 //_____________________________________________
2646 {
2647  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
2648  {
2649  return kmcPi0 ;
2650  }//pi0
2651  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
2652  {
2653  return kmcEta ;
2654  }//eta
2655  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) ||
2657  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
2658  {
2659  return kmcPhoton ;
2660  }//direct photon
2661  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2663  {
2664  return kmcPi0Decay ;
2665  }//decay photon from pi0
2666  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2668  {
2669  return kmcEtaDecay ;
2670  }//decay photon from eta
2671  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
2672  {
2673  return kmcOtherDecay ;
2674  }//decay photon from other than eta or pi0
2675  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2676  {
2677  return kmcElectron ;
2678  }//electron
2679  else
2680  {
2681  return kmcHadron ;
2682  }//other particles
2683 }
2684 
2685 //__________________________________________________________________
2688 //__________________________________________________________________
2690  Int_t tag1 , Int_t tag2,
2691  Int_t & label, Int_t & tag)
2692 {
2693  if(label1 < 0 || label2 < 0 || label1 == label2) return ;
2694 
2695  AliDebug(0,Form("Origin of: photon1 %d; photon2 %d",tag1, tag2));
2696 
2697  if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) &&
2698  GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay) ) ||
2699  (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) &&
2701  )
2702  {
2703  Int_t pdg1 = -1;//, pdg2 = -1;
2704  Int_t ndaugh1 = -1, ndaugh2 = -1;
2705  //Check if pi0/eta mother is the same
2706  if(GetReader()->ReadStack())
2707  {
2708  if ( label1 >= 0 )
2709  {
2710  TParticle * mother1 = GetMC()->Particle(label1);//photon in kine tree
2711  label1 = mother1->GetFirstMother();
2712  mother1 = GetMC()->Particle(label1);//pi0
2713  pdg1=mother1->GetPdgCode();
2714  ndaugh1 = mother1->GetNDaughters();
2715  }
2716  if ( label2 >= 0 )
2717  {
2718  TParticle * mother2 = GetMC()->Particle(label2);//photon in kine tree
2719  label2 = mother2->GetFirstMother();
2720  mother2 = GetMC()->Particle(label2);//pi0
2721  //pdg2=mother2->GetPdgCode();
2722  ndaugh2 = mother2->GetNDaughters();
2723  }
2724  } // STACK
2725  else if(GetReader()->ReadAODMCParticles())
2726  {//&& (input > -1)){
2727  if ( label1 >= 0 )
2728  {
2729  AliAODMCParticle * mother1 = (AliAODMCParticle *) GetMC()->GetTrack(label1);//photon in kine tree
2730  label1 = mother1->GetMother();
2731  mother1 = (AliAODMCParticle *) GetMC()->GetTrack(label1);//pi0
2732  pdg1=mother1->GetPdgCode();
2733  ndaugh1 = mother1->GetNDaughters();
2734  }
2735 
2736  if ( label2 >= 0 )
2737  {
2738  AliAODMCParticle * mother2 = (AliAODMCParticle *) GetMC()->GetTrack(label2);//photon in kine tree
2739  label2 = mother2->GetMother();
2740  mother2 = (AliAODMCParticle *) GetMC()->GetTrack(label2);//pi0
2741  //pdg2=mother2->GetPdgCode();
2742  ndaugh2 = mother2->GetNDaughters();
2743  }
2744  } // AOD
2745 
2746 // printf("mother1 %d, mother2 %d\n",label1,label2);
2747  if ( label1 == label2 && label1 >= 0 && ndaugh1 == ndaugh2 && ndaugh1 == 2 )
2748  {
2749  label = label1;
2750 
2751  Double_t angle = fMomentum2.Angle(fMomentum1.Vect());
2753  Double_t epair = (fMomentum1+fMomentum2).E();
2754 
2755  if ( pdg1 == 111 )
2756  {
2757  fhMassPairMCPi0 ->Fill(epair, mass , GetEventWeight());
2758  fhAnglePairMCPi0->Fill(epair, angle, GetEventWeight());
2759 
2761 
2762 // printf("Real pi0 pair: pt %f, mass %f\n",(fMomentum1+fMomentum2).Pt(),mass);
2763 // printf(" Lab1 %d (%d), lab2 %d (%d), pdg1 %d, pdg2 %d, Is In calo %d, %d, Is lost %d, %d\n",
2764 // label1,photon1->GetLabel(),label2,photon2->GetLabel(), pdg1, pdg2,
2765 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2766 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2767 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost),
2768 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost));
2769  }
2770  else if ( pdg1 == 221 )
2771  {
2772  fhMassPairMCEta ->Fill(epair, mass , GetEventWeight());
2773  fhAnglePairMCEta->Fill(epair, angle, GetEventWeight());
2774 
2776 
2777 // printf("Real eta pair\n");
2778  }
2779 
2780  } // same label
2781  } // both from eta or pi0 decay
2782 }
2783 
2784 //_______________________
2787 //_______________________
2789 {
2790  if ( GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD() )
2791  AliFatal("STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!");
2792  else if ( GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD() )
2793  AliFatal("STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!");
2794 }
2795 
2796 //_________________________________
2798 //_________________________________
2800 {
2801  AddToHistogramsName("AnaPi0EbE_");
2802 
2803  fInputAODGammaConvName = "PhotonsCTS" ;
2804  fAnaType = kIMCalo ;
2805  fMinDist = 2.;
2806  fMinDist2 = 4.;
2807  fMinDist3 = 5.;
2808 
2809  fNLMECutMin[0] = 10.;
2810  fNLMECutMin[1] = 6. ;
2811  fNLMECutMin[2] = 6. ;
2812 
2813  fIsoCandMinPt = 8;
2814  fR = 0.4;
2815 
2816  fM02MinCutForIM = -1 ;
2817  fM02MaxCutForIM = -1 ;
2818 }
2819 
2820 //_______________________________________
2823 //_______________________________________
2825 {
2826  AliDebug(1,Form("Start analysis type %d",fAnaType));
2827 
2828  switch(fAnaType)
2829  {
2830  case kIMCalo:
2832  break;
2833 
2834  case kSSCalo:
2836  break;
2837 
2838  case kIMCaloTracks:
2840  break;
2841  }
2842 
2843  AliDebug(1,"End");
2844 }
2845 
2846 //____________________________________________
2852 //____________________________________________
2854 {
2855  if(!GetInputAODBranch())
2856  {
2857  AliFatal(Form("No input calo photons in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
2858  return; // coverity
2859  }
2860 
2861  // Create obj array of clusters in case it is requested
2862  TObjArray *clusters = 0;
2864  GetReader()->GetDataType()!=AliCaloTrackReader::kMC )
2865  {
2866  if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters();
2867  else if(GetCalorimeter()==kPHOS) clusters = GetPHOSClusters() ;
2868  }
2869 
2870  AliVCluster *cluster1 = 0;
2871  AliVCluster *cluster2 = 0;
2872 
2873  Int_t nphoton = GetInputAODBranch()->GetEntriesFast();
2874  for( Int_t iphoton = 0; iphoton < nphoton-1; iphoton++ )
2875  {
2876  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
2877 
2878  // Vertex cut in case of mixed events
2879  // Not really in use or tested recently, remove ...
2880  Int_t evtIndex1 = 0 ;
2881  if(GetMixedEvent())
2882  {
2883  evtIndex1 = GetMixedEvent()->EventIndexForCaloCluster(photon1->GetCaloLabel(0)) ;
2884  if(TMath::Abs(GetVertex(evtIndex1)[2]) > GetZvertexCut()) continue ; //vertex cut
2885  }
2886 
2887  // Get original cluster if requested
2888  Int_t iclus = -1;
2889  if( ( fFillSelectClHisto || IsPileUpAnalysisOn() ) &&
2891  {
2892  cluster1 = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
2893 
2894  if(!cluster1) AliWarning("First cluster not found");
2895  }
2896 
2897  // Get kinematics and other parameters
2898  fMomentum1 = *(photon1->Momentum());
2899 
2900  Float_t e1 = photon1->E();
2901  Float_t tof1 = photon1->GetTime();
2902  Int_t nMaxima1 = photon1->GetNLM();
2903  Int_t lab1 = photon1->GetLabel();
2904  Int_t tag1 = photon1->GetTag();
2905  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
2906 
2907  for( Int_t jphoton = iphoton+1; jphoton < nphoton; jphoton++ )
2908  {
2909  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(jphoton));
2910 
2911  // Do analysis only when one of the decays is isolated
2912  // Run AliAnaParticleIsolation before
2914  {
2915  Bool_t isolated2 = ((AliAODPWG4ParticleCorrelation*) photon2)->IsIsolated();
2916  if(!isolated1 && !isolated2) continue;
2917  }
2918 
2919  // Vertex cut in case of mixed events
2920  // Not really in use or tested recently, remove ...
2921  Int_t evtIndex2 = 0 ;
2922  if(GetMixedEvent())
2923  {
2924  evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
2925 
2926  if(evtIndex1 == evtIndex2)
2927  continue ;
2928 
2929  if(TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut()) continue ; //vertex cut
2930  }
2931 
2932  // Get kinematics and other parameters
2933  fMomentum2 = *(photon2->Momentum());
2934 
2935  Float_t e2 = photon2->E();
2936  Float_t tof2 = photon2->GetTime();
2937  Int_t nMaxima2 = photon2->GetNLM();
2938 
2939  //
2940  // Skip pairs of EMCal and DCal clusters
2941  Double_t angleOp = fMomentum1.Angle(fMomentum2.Vect());
2942 
2943  if(angleOp > DegToRad(100.)) continue;
2944 
2945  //
2946  // Select clusters with good time window difference
2947  Double_t t12diff = tof1-tof2;
2948 
2949  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
2950 
2951  if(TMath::Abs(t12diff) > GetPairTimeCut()) continue;
2952 
2953  //
2954  // Play with the MC stack if available
2955  //
2956  Int_t mcIndex = kmcHadron;
2957  Int_t tag = 0;
2958  Int_t label =-1;
2959  if( IsDataMC() )
2960  {
2961  HasPairSameMCMother(lab1, photon2->GetLabel(),
2962  tag1, photon2->GetTag(),
2963  label, tag) ;
2964  mcIndex = GetMCIndex(tag);
2965  }
2966 
2967  // Check the invariant mass for different selection on the local maxima
2968 
2970 
2971  Double_t mass = fMomentum.M();
2972  Double_t epair = fMomentum.E();
2973  Float_t ptpair = fMomentum.Pt();
2974 
2975  //
2976  // NLM dependent histograms
2977  //
2979  {
2980  if(nMaxima1==nMaxima2)
2981  {
2982  if (nMaxima1==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
2983  else if(nMaxima1==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
2984  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
2985  }
2986  else if(nMaxima1==1 || nMaxima2==1)
2987  {
2988  if (nMaxima1==2 || nMaxima2==2) fhMassPairLocMax[3]->Fill(epair, mass, GetEventWeight());
2989  else fhMassPairLocMax[4]->Fill(epair, mass, GetEventWeight());
2990  }
2991  else
2992  fhMassPairLocMax[5]->Fill(epair, mass, GetEventWeight());
2993 
2994  // Combinations with SS axis cut and NLM cut
2995  if(nMaxima1 == 1 && photon2->GetM02() > 0.3)
2996  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
2997 
2998  if(nMaxima2 == 1 && photon1->GetM02() > 0.3)
2999  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
3000 
3001  if(nMaxima1 > 1 && photon2->GetM02() < 0.3 && photon2->GetM02() > 0.1 )
3002  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
3003 
3004  if(nMaxima2 > 1 && photon1->GetM02() < 0.3 && photon1->GetM02() > 0.1 )
3005  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
3006  }
3007 
3008  //
3009  // Skip pairs with too few or too many NLM
3010  //
3011  if((nMaxima1 < fNLMCutMin || nMaxima1 > fNLMCutMax) || (nMaxima2 < fNLMCutMin || nMaxima2 > fNLMCutMax))
3012  {
3013  AliDebug(1,Form("NLM out of range: cluster1 %d, cluster2 %d",nMaxima1, nMaxima2));
3014  continue ;
3015  }
3016 
3017  //
3018  // Skip pairs with too large/small SS
3019  //
3020  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
3021  {
3022  Float_t m02Ph1 = photon1->GetM02();
3023  Float_t m02Ph2 = photon2->GetM02();
3024 
3025  if(m02Ph1 > fM02MaxCutForIM || m02Ph1 < fM02MinCutForIM) continue ;
3026  if(m02Ph2 > fM02MaxCutForIM || m02Ph2 < fM02MinCutForIM) continue ;
3027  }
3028 
3029  //
3030  // Mass of all pairs before selection
3031  //
3032  fhMass ->Fill( epair, mass, GetEventWeight());
3033  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3034 
3035  if(photon1->Pt() >= photon2->Pt())
3036  {
3037  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3038  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3039  }
3040  else
3041  {
3042  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3043  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3044  }
3045 
3046  if(IsDataMC() && mcIndex < 2) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3047 
3049  {
3050  Double_t radius = GetIsolationCut()->Radius(fMomentum1.Eta(),fMomentum1.Phi(),fMomentum2.Eta(),fMomentum2.Phi());
3051 
3052  if(radius < fR) fhMassPtIsoRCut->Fill(ptpair, mass, GetEventWeight());
3053 
3054 // 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);
3055  }
3056 
3057  //
3058  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3059  //
3060  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue;
3061 
3062  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",
3063  fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3064 
3065  //
3066  // Tag both photons as decay if not done before
3067  // set the corresponding bit for pi0 or eta or "side" case
3068  //
3069  Int_t bit1 = photon1->DecayTag();
3070  if( bit1 < 0 ) bit1 = 0 ;
3071  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3072  {
3073  AliDebug(1,Form("pT1 %2.2f; bit requested %d; decay bit1: In %d",fMomentum1.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit1));
3074 
3076  photon1->SetDecayTag(bit1);
3077 
3078  AliDebug(1,Form("\t Out %d", bit1));
3079 
3080  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3081 
3082  //
3083  // Fill some histograms about shower shape
3084  //
3086  {
3087  FillSelectedClusterHistograms(cluster1, fMomentum1.Pt(), nMaxima1, photon1->GetTag());
3088  }
3089 
3090  //
3091  // MC origin, lost pair
3092  //
3093  if(IsDataMC())
3094  {
3095  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3096  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3097 
3099  {
3100  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3101  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3102  }
3103  }
3104  }
3105 
3106  //
3107  // Histogram for cluster2 tagged as decay
3108  //
3109  Int_t bit2 = photon2->DecayTag();
3110  if( bit2 < 0 ) bit2 = 0 ;
3111  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3112  {
3113  AliDebug(1,Form("pT2 %2.2f; bit requested %d; decay bit2: In %d",fMomentum2.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit2));
3114 
3116  photon2->SetDecayTag(bit2);
3117 
3118  AliDebug(1,Form("\t Out %d", bit2));
3119 
3120  fhPtDecay->Fill(photon2->Pt(), GetEventWeight());
3121 
3122  // Fill some histograms about shower shape
3124  {
3125  // Get original cluster, to recover some information
3126 
3127  Int_t iclus2 = -1;
3128  cluster2 = FindCluster(clusters,photon2->GetCaloLabel(0),iclus2,iclus+1);
3129  // start new loop from iclus1+1 to gain some time
3130 
3131  if(!cluster2) AliWarning("Second cluster not found");
3132  else FillSelectedClusterHistograms(cluster2, fMomentum2.Pt(), nMaxima2, photon2->GetTag());
3133  }
3134 
3135  //
3136  // MC origin, lost pair
3137  //
3138  if(IsDataMC())
3139  {
3140  Int_t mcIndex2 = GetMCIndex(photon2->GetTag());
3141  fhMCPtDecay[mcIndex2]->Fill(photon2->Pt(), GetEventWeight());
3142 
3144  {
3145  if ( mcIndex2 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon2->Pt(), GetEventWeight());
3146  else if( mcIndex2 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon2->Pt(), GetEventWeight());
3147  }
3148  }
3149  }
3150 
3151  //
3152  // Mass of selected pairs
3153  //
3154  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3155  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3156  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3157 
3158  // Fill histograms to undertand pile-up before other cuts applied
3159  // Remember to relax time cuts in the reader
3160  if(cluster1 && IsPileUpAnalysisOn()) FillPileUpHistograms(ptpair,( photon1->GetTime() + photon2->GetTime() ) / 2, cluster1);
3161 
3162  //
3163  // Create AOD for analysis
3164  //
3165  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3166 
3167  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3168  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3169  else
3170  {
3171  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3172  return ;
3173  }
3174  pi0.SetDetectorTag(photon1->GetDetectorTag());
3175 
3176  // MC
3177  pi0.SetLabel(label);
3178  pi0.SetTag(tag);
3179 
3180  //Set the indeces of the original caloclusters
3181  pi0.SetCaloLabel(photon1->GetCaloLabel(0), photon2->GetCaloLabel(0));
3182  //pi0.SetInputFileIndex(input);
3183 
3184  AddAODParticle(pi0);
3185 
3186  }//2n photon loop
3187 
3188  }//1st photon loop
3189 
3190  AliDebug(1,"End fill AODs");
3191 }
3192 
3193 //__________________________________________________
3199 //__________________________________________________
3201 {
3202  // Check calorimeter input
3203  if(!GetInputAODBranch())
3204  {
3205  AliFatal(Form("No input calo photons in AOD branch with name < %s > , STOP",GetInputAODName().Data()));
3206  }
3207 
3208  // Get the array with conversion photons
3209  TClonesArray * inputAODGammaConv = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaConvName);
3210  if(!inputAODGammaConv)
3211  {
3212  inputAODGammaConv = (TClonesArray *) GetReader()->GetInputEvent()->FindListObject(fInputAODGammaConvName);
3213 
3214  if(!inputAODGammaConv)
3215  {
3216  AliFatal(Form("No input gamma conversions in AOD branch with name < %s >",fInputAODGammaConvName.Data()));
3217  return; // coverity
3218  }
3219  }
3220 
3221  // Get shower shape information of clusters
3222  TObjArray *clusters = 0;
3224  {
3225  if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters() ;
3226  else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters () ;
3227  }
3228 
3229  AliVCluster * cluster = 0;
3230 
3231  Int_t nCTS = inputAODGammaConv->GetEntriesFast();
3232  Int_t nCalo = GetInputAODBranch()->GetEntriesFast();
3233  if(nCTS<=0 || nCalo <=0)
3234  {
3235  AliDebug(1,Form("nCalo %d, nCTS %d, cannot loop",nCalo,nCTS));
3236  return;
3237  }
3238 
3239  AliDebug(1,Form("Number of conversion photons %d and number of clusters %d",nCTS,nCalo));
3240 
3241  // Do the loop, first calo, second CTS
3242  for(Int_t iphoton = 0; iphoton < GetInputAODBranch()->GetEntriesFast(); iphoton++)
3243  {
3244  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
3245  fMomentum1 = *(photon1->Momentum());
3246 
3247  // Do analysis only when one of the decays is isolated
3248  // Run AliAnaParticleIsolation before
3250  {
3251  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
3252  if(!isolated1) continue;
3253  }
3254 
3255  // Get original cluster, to recover some information
3256  Int_t iclus = -1;
3258  {
3259  cluster = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
3260 
3261  if(!cluster) AliWarning("Cluster not found");
3262  }
3263 
3264  // Skip cluster with too large/small SS
3265  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
3266  {
3267  Float_t m02 = photon1->GetM02();
3268 
3269  if(m02 > fM02MaxCutForIM || m02 < fM02MinCutForIM) continue ;
3270  }
3271 
3272  for(Int_t jphoton = 0; jphoton < nCTS; jphoton++)
3273  {
3274  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (inputAODGammaConv->At(jphoton));
3275 
3276  Int_t evtIndex = 0;
3277  if(GetMixedEvent())
3278  {
3279  evtIndex = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
3280  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3281  }
3282 
3283  fMomentum2 = *(photon2->Momentum());
3284 
3286 
3287  Double_t mass = fMomentum.M();
3288  Double_t epair = fMomentum.E();
3289  Float_t ptpair = fMomentum.Pt();
3290 
3291  Int_t nMaxima = photon1->GetNLM();
3293  {
3294  if (nMaxima==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
3295  else if(nMaxima==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
3296  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
3297  }
3298 
3299  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3300  {
3301  AliDebug(1,Form("NLM %d out of range",nMaxima));
3302  continue ;
3303  }
3304 
3305  // Play with the MC stack if available
3306  Int_t mcIndex = kmcHadron;
3307  Int_t tag = 0;
3308  Int_t label =-1;
3309  if(IsDataMC())
3310  {
3311  Int_t label2 = photon2->GetLabel();
3312  if(label2 >= 0 )photon2->SetTag(GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(),kCTS));
3313 
3314  HasPairSameMCMother(photon1->GetLabel(), photon2->GetLabel(),
3315  photon1->GetTag() , photon2->GetTag(),
3316  label, tag) ;
3317  mcIndex = GetMCIndex(tag);
3318  }
3319 
3320  // Mass of selected pairs
3321  fhMass ->Fill( epair, mass, GetEventWeight());
3322  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3323 
3324  if(photon1->Pt() >= photon2->Pt())
3325  {
3326  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3327  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3328  }
3329  else
3330  {
3331  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3332  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3333  }
3334 
3335  if(IsDataMC() && mcIndex < 2 ) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3336 
3337  //
3338  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3339  //
3340  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue ;
3341 
3342  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3343 
3344  //
3345  // Tag both photons as decay if not done before
3346  // set the corresponding bit for pi0 or eta or "side" case
3347  //
3348  Int_t bit1 = photon1->DecayTag();
3349  if( bit1 < 0 ) bit1 = 0 ;
3350  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3351  {
3353  photon1->SetDecayTag(bit1);
3354 
3355  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3356 
3357  // Fill some histograms about shower shape
3359  FillSelectedClusterHistograms(cluster, fMomentum1.Pt(), nMaxima, photon1->GetTag());
3360 
3361  if(IsDataMC())
3362  {
3363  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3364  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3365 
3367  {
3368  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3369  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3370  }
3371  }
3372  }
3373 
3374  Int_t bit2 = photon2->DecayTag();
3375  if( bit2 < 0 ) bit2 = 0 ;
3376  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3377  {
3379  photon2->SetDecayTag(bit2);
3380  }
3381 
3382  //
3383  // Mass of selected pairs
3384  //
3385  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3386  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3387  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3388 
3389  // Fill histograms to undertand pile-up before other cuts applied
3390  // Remember to relax time cuts in the reader
3391  if( cluster && IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),photon1->GetTime(),cluster);
3392 
3393  //
3394  // Create AOD for analysis
3395  //
3396  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3397 
3398  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3399  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3400  else
3401  {
3402  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3403  return ;
3404  }
3405 
3406  pi0.SetDetectorTag(photon1->GetDetectorTag());
3407 
3408  // MC
3409  pi0.SetLabel(label);
3410  pi0.SetTag(tag);
3411 
3412  // Set the indeces of the original tracks or caloclusters
3413  pi0.SetCaloLabel (photon1->GetCaloLabel(0) , -1);
3414  pi0.SetTrackLabel(photon2->GetTrackLabel(0), photon2->GetTrackLabel(1));
3415  //pi0.SetInputFileIndex(input);
3416 
3417  AddAODParticle(pi0);
3418 
3419  }//2n photon loop
3420 
3421  }//1st photon loop
3422 
3423  AliDebug(1,"End fill AODs");
3424 }
3425 
3426 //_________________________________________________
3438 //_________________________________________________
3440 {
3441  TObjArray * pl = 0x0;
3442  AliVCaloCells * cells = 0x0;
3443 
3444  // Select the Calorimeter of the photon
3445  if (GetCalorimeter() == kEMCAL )
3446  {
3447  pl = GetEMCALClusters();
3448  cells = GetEMCALCells();
3449  }
3450  else if (GetCalorimeter() == kPHOS)
3451  {
3452  AliFatal("kSSCalo case not implememted for PHOS");
3453  return; // for coverity
3454 
3455  //pl = GetPHOSClusters();
3456  //cells = GetPHOSCells();
3457  }
3458 
3459  if(!pl)
3460  {
3461  AliInfo(Form("TObjArray with %s clusters is NULL!",GetCalorimeterString().Data()));
3462  return;
3463  }
3464 
3465  for(Int_t icalo = 0; icalo < pl->GetEntriesFast(); icalo++)
3466  {
3467  AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
3468 
3469  Int_t evtIndex = 0 ;
3470  if (GetMixedEvent())
3471  {
3472  evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
3473  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3474  }
3475 
3476  // Get Momentum vector,
3477  Double_t vertex[]={0,0,0};
3479  {
3480  calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
3481  } // Assume that come from vertex in straight line
3482  else
3483  {
3484  calo->GetMomentum(fMomentum,vertex) ;
3485  }
3486 
3487  // If too small or big pt, skip it
3488  if(fMomentum.E() < GetMinEnergy() || fMomentum.E() > GetMaxEnergy() ) continue ;
3489 
3490  // Check acceptance selection
3491  if(IsFiducialCutOn())
3492  {
3494  if(! in ) continue ;
3495  }
3496 
3497  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()));
3498 
3499  // Play with the MC stack if available
3500  // Check origin of the candidates
3501  Int_t tag = 0 ;
3502  if(IsDataMC())
3503  {
3504  tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
3505  //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
3506  AliDebug(1,Form("Origin of candidate %d",tag));
3507  }
3508 
3509  //Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
3510 
3511  // Check Distance to Bad channel, set bit.
3512  Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
3513  if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
3514  if(distBad < fMinDist)
3515  {
3516  // In bad channel (PHOS cristal size 2.2x2.2 cm)
3517  // FillRejectedClusterHistograms(tag,nMaxima);
3518  continue ;
3519  }
3520 
3521  AliDebug(1,Form("Bad channel cut passed %4.2f",distBad));
3522 
3523  // If too low number of cells, skip it
3524  if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells())
3525  {
3526  //FillRejectedClusterHistograms(tag,nMaxima);
3527  continue ;
3528  }
3529 
3530  AliDebug(1,Form("N cells cut passed %d > %d",calo->GetNCells(), GetCaloPID()->GetClusterSplittingMinNCells()));
3531 
3532  //.......................................
3533  // TOF cut, BE CAREFUL WITH THIS CUT
3534  Double_t tof = calo->GetTOF()*1e9;
3535  if(tof < fTimeCutMin || tof > fTimeCutMax)
3536  {
3537  //FillRejectedClusterHistograms(tag,nMaxima);
3538  continue ;
3539  }
3540 
3541  // Check PID
3542  // PID selection or bit setting
3543  Int_t nMaxima = 0;
3544  Double_t mass = 0, angle = 0;
3545  Int_t absId1 =-1, absId2 =-1;
3546  Float_t distbad1 =-1, distbad2 =-1;
3547  Bool_t fidcut1 = 0, fidcut2 = 0;
3548 
3550  GetVertex(evtIndex),nMaxima,
3551  mass,angle,
3553  absId1,absId2,
3554  distbad1,distbad2,
3555  fidcut1,fidcut2) ;
3556 
3557 
3558  AliDebug(1,Form("PDG of identified particle %d",idPartType));
3559 
3560  // Skip events where one of the new clusters (lowest energy) is close to an EMCal border or a bad channel
3561  if( (fCheckSplitDistToBad) &&
3562  (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
3563  {
3564  AliDebug(1,Form("Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d",
3565  calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2));
3566 
3567  //FillRejectedClusterHistograms(tag,nMaxima);
3568  continue ;
3569  }
3570 
3571  // Skip events with too few or too many NLM
3572  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3573  {
3574  //FillRejectedClusterHistograms(tag,nMaxima);
3575  continue ;
3576  }
3577 
3578  AliDebug(1,Form("NLM %d accepted",nMaxima));
3579 
3580  // Skip matched clusters with tracks
3581  if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
3582  {
3583  FillRejectedClusterHistograms(tag,nMaxima);
3584  continue ;
3585  }
3586 
3587  Float_t l0 = calo->GetM02();
3588  Float_t l1 = calo->GetM20();
3589  Float_t e1 = fMomentum1.Energy();
3590  Float_t e2 = fMomentum2.Energy();
3592  Float_t ptSplit = fMomentum12.Pt();
3593  Float_t eSplit = e1+e2;
3594 
3595  // Mass of all clusters
3596  fhMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3597  fhMassPt->Fill(fMomentum.Pt(), mass, GetEventWeight());
3598 
3599  if(fMomentum1.Pt() >= fMomentum2.Pt())
3600  {
3602  fhMassPtMinPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3603  }
3604  else
3605  {
3606  fhMassPtMaxPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3608  }
3609 
3610  fhMassSplitPt->Fill(ptSplit, mass, GetEventWeight());
3611  fhPtLambda0NoSplitCut->Fill(fMomentum.Pt(), l0, GetEventWeight());
3612 
3613  // Asymmetry of all clusters
3614  Float_t asy =-10;
3615  if(e1+e2 > 0) asy = (e1-e2) / (e1+e2);
3616  fhAsymmetry->Fill(fMomentum.E(), asy, GetEventWeight());
3617 
3618  // Divide NLM in 3 cases, 1 local maxima, 2 local maxima, more than 2 local maxima
3619  Int_t indexMax = -1;
3620  if (nMaxima==1) indexMax = 0 ;
3621  else if(nMaxima==2) indexMax = 1 ;
3622  else indexMax = 2 ;
3623 
3624  fhMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3625 
3626  Int_t mcIndex = -1;
3627  Int_t noverlaps = 0;
3628  Float_t ptprim = 0;
3629  Int_t mesonLabel = -1;
3630 
3631  if(IsDataMC())
3632  {
3633  mcIndex = GetMCIndex(tag);
3634 
3635  Bool_t ok = kFALSE;
3636  Int_t mcLabel = calo->GetLabel();
3637 
3639 
3640 
3641  if(mcIndex == kmcPi0 || mcIndex == kmcEta)
3642  {
3643  if(mcIndex == kmcPi0)
3644  {
3645  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetReader(),ok,mesonLabel);
3646  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3647  }
3648  else
3649  {
3650  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetReader(),ok,mesonLabel);
3651  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3652  }
3653  }
3654 
3655  const UInt_t nlabels = calo->GetNLabels();
3656  Int_t overpdg[nlabels];
3657  Int_t overlab[nlabels];
3658  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(calo->GetLabels(), nlabels, tag, mesonLabel, GetReader(), overpdg, overlab);
3659 
3660  fhMCMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3661  fhMCMassSplitPt[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3662 
3663  if(mcIndex==kmcPi0)
3664  {
3665  fhMCPi0PtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3666  fhMCPi0SplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3667  fhMCPi0PtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3668  fhMCPi0SplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3669 
3670  }
3671  else if(mcIndex==kmcEta)
3672  {
3673  fhMCEtaPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3674  fhMCEtaSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3675  fhMCEtaPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3676  fhMCEtaSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3677  }
3678 
3679  if(noverlaps==0)
3680  {
3681  if(mcIndex==kmcPi0)
3682  {
3683  fhMCPi0PtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3684  fhMCPi0SplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3685  }
3686  else if(mcIndex==kmcEta)
3687  {
3688  fhMCEtaPtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3689  fhMCEtaSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3690  }
3691 
3692  fhMassNoOverlap ->Fill(fMomentum.E() , mass, GetEventWeight());
3694  fhMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3695 
3696  fhMCMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3697  fhMCMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3698  }
3699 
3700  fhMCPtAsymmetry[mcIndex]->Fill(fMomentum.Pt(), asy, GetEventWeight());
3701  }
3702 
3703  // If cluster does not pass pid, not pi0/eta, skip it.
3704  if (GetOutputAODName().Contains("Pi0") && idPartType != AliCaloPID::kPi0)
3705  {
3706  AliDebug(1,"Cluster is not Pi0");
3707  FillRejectedClusterHistograms(tag,nMaxima);
3708  continue ;
3709  }
3710 
3711  else if(GetOutputAODName().Contains("Eta") && idPartType != AliCaloPID::kEta)
3712  {
3713  AliDebug(1,"Cluster is not Eta");
3714  FillRejectedClusterHistograms(tag,nMaxima);
3715  continue ;
3716  }
3717 
3718  AliDebug(1,Form("Pi0/Eta selection cuts passed: pT %3.2f, pdg %d",fMomentum.Pt(), idPartType));
3719 
3720  // Mass and asymmetry of selected pairs
3721  fhSelectedAsymmetry ->Fill(fMomentum.E() , asy , GetEventWeight());
3722  fhSelectedMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3723  fhSelectedMassPt ->Fill(fMomentum.Pt(), mass, GetEventWeight());
3724  fhSelectedMassSplitPt->Fill(ptSplit , mass, GetEventWeight());
3725 
3726  fhSelectedMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3727 
3728  Int_t nSM = GetModuleNumber(calo);
3729  if(nSM < fNModules && nSM >=0 && fFillAllNLMHistograms)
3730  {
3731  fhSelectedMassPtLocMaxSM [indexMax][nSM]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3732  fhSelectedLambda0PtLocMaxSM[indexMax][nSM]->Fill(fMomentum.Pt(), l0 , GetEventWeight());
3733  }
3734 
3735  if(IsDataMC())
3736  {
3737  if(mcIndex==kmcPi0)
3738  {
3739  fhMCPi0SelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3740  fhMCPi0SelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3741  fhMCPi0SelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3742  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3743  }
3744  else if(mcIndex==kmcEta)
3745  {
3746  fhMCEtaSelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3747  fhMCEtaSelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3748  fhMCEtaSelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3749  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3750  }
3751 
3752  if(noverlaps==0)
3753  {
3756  fhSelectedMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3757 
3758  if(mcIndex==kmcPi0)
3759  {
3761  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3762  }
3763  else if(mcIndex==kmcEta)
3764  {
3766  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3767  }
3768  }
3769  }
3770 
3771  Float_t phi = fMomentum.Phi();
3772  if(phi<0) phi+=TMath::TwoPi();
3773 
3774  fhSplitE ->Fill( eSplit, GetEventWeight());
3775  fhSplitPt ->Fill(ptSplit, GetEventWeight());
3776  fhSplitPtPhi ->Fill(ptSplit, phi , GetEventWeight());
3777  fhSplitPtEta ->Fill(ptSplit, fMomentum.Eta(), GetEventWeight());
3778  fhNLocMaxSplitPt->Fill(ptSplit, nMaxima , GetEventWeight());
3779 
3780  // Check split-clusters with good time window difference
3781  Double_t tof1 = cells->GetCellTime(absId1);
3782  GetCaloUtils()->RecalibrateCellTime(tof1, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3783  tof1*=1.e9;
3784 
3785  Double_t tof2 = cells->GetCellTime(absId2);
3786  GetCaloUtils()->RecalibrateCellTime(tof2, GetCalorimeter(), absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3787  tof2*=1.e9;
3788 
3789  Double_t t12diff = tof1-tof2;
3790  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
3791 
3792  if(IsDataMC())
3793  {
3794  fhMCSplitE [mcIndex]->Fill( eSplit, GetEventWeight());
3795  fhMCSplitPt [mcIndex]->Fill(ptSplit, GetEventWeight());
3796  fhMCSplitPtPhi [mcIndex]->Fill(ptSplit , phi , GetEventWeight());
3797  fhMCSplitPtEta [mcIndex]->Fill(ptSplit , fMomentum.Eta(), GetEventWeight());
3798  fhMCNLocMaxSplitPt[mcIndex]->Fill(ptSplit , nMaxima , GetEventWeight());
3799  fhMCNLocMaxPt [mcIndex]->Fill(fMomentum.Pt(), nMaxima , GetEventWeight());
3800 
3801  fhMCSelectedMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3802  fhMCSelectedMassSplitPt [mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3803  fhMCSelectedMassPtLocMax[mcIndex][indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3804 
3805  if(noverlaps==0)
3806  {
3807  fhMCSelectedMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3808  fhMCSelectedMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3809  }
3810  }
3811 
3812  // Remove clusters with NLM=x depeding on a minimim energy cut
3813  if(nMaxima == 1 && fNLMECutMin[0] > fMomentum.E()) continue;
3814  if(nMaxima == 2 && fNLMECutMin[1] > fMomentum.E()) continue;
3815  if(nMaxima > 2 && fNLMECutMin[2] > fMomentum.E()) continue;
3816 
3817  // Fill some histograms about shower shape
3819  {
3820  FillSelectedClusterHistograms(calo, fMomentum.Pt(), nMaxima, tag, asy);
3821  }
3822 
3823  // Fill histograms to undertand pile-up before other cuts applied
3824  // Remember to relax time cuts in the reader
3825  Double_t tofcluster = calo->GetTOF()*1e9;
3826 
3827  if ( IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),tofcluster,calo);
3828 
3830  FillEMCALBCHistograms(fMomentum.E(), fMomentum.Eta(), fMomentum.Phi(), tofcluster);
3831 
3832  //------------------------
3833  // Create AOD for analysis
3834 
3835  AliAODPWG4Particle aodpi0 = AliAODPWG4Particle(fMomentum);
3836  aodpi0.SetLabel(mesonLabel);
3837 
3838  // Set the indeces of the original caloclusters
3839  aodpi0.SetCaloLabel(calo->GetID(),-1);
3840  aodpi0.SetDetectorTag(GetCalorimeter());
3841 
3842  if (distBad > fMinDist3) aodpi0.SetDistToBad(2) ;
3843  else if(distBad > fMinDist2) aodpi0.SetDistToBad(1) ;
3844  else aodpi0.SetDistToBad(0) ;
3845 
3846  // Check if cluster is pi0 via cluster splitting
3847  aodpi0.SetIdentifiedParticleType(idPartType);
3848 
3849  aodpi0.SetM02(l0);
3850  aodpi0.SetM20(l1);
3851  aodpi0.SetNLM(nMaxima);
3852  aodpi0.SetTime(tofcluster);
3853  aodpi0.SetNCells(calo->GetNCells());
3854  aodpi0.SetSModNumber(nSM);
3855 
3856  aodpi0.SetTag(tag);
3857 
3858  // Add AOD with pi0 object to aod branch
3859  AddAODParticle(aodpi0);
3860 
3861  } // loop
3862 
3863  AliDebug(1,"End fill AODs");
3864 }
3865 
3866 //______________________________________________
3869 //______________________________________________
3871 {
3872  if(!GetOutputAODBranch())
3873  {
3874  AliFatal(Form("No output pi0 in AOD branch with name < %s >,STOP",GetOutputAODName().Data()));
3875  return;
3876  }
3877 
3878  // Loop on stored AOD pi0
3879  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
3880 
3881  AliDebug(1,Form("AOD branch entries %d", naod));
3882 
3883  Float_t cen = GetEventCentrality();
3884  Float_t ep = GetEventPlaneAngle();
3885 
3886  for(Int_t iaod = 0; iaod < naod ; iaod++)
3887  {
3888  AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
3889  Int_t pdg = pi0->GetIdentifiedParticleType();
3890 
3891  if( ( pdg != AliCaloPID::kPi0 && pdg != AliCaloPID::kEta ) ) continue;
3892 
3893  // Fill pi0 histograms
3894  Float_t ener = pi0->E();
3895  Float_t pt = pi0->Pt();
3896  Float_t phi = pi0->Phi();
3897  if(phi < 0) phi+=TMath::TwoPi();
3898  Float_t eta = pi0->Eta();
3899 
3900  fhPt ->Fill(pt , GetEventWeight());
3901  fhE ->Fill(ener, GetEventWeight());
3902 
3903  fhPtEta ->Fill(pt , eta, GetEventWeight());
3904  fhPtPhi ->Fill(pt , phi, GetEventWeight());
3905  fhEtaPhi ->Fill(eta , phi, GetEventWeight());
3906 
3908  {
3909  fhPtCentrality ->Fill(pt, cen, GetEventWeight()) ;
3910  fhPtEventPlane ->Fill(pt, ep , GetEventWeight()) ;
3911  }
3912 
3913  if(IsDataMC())
3914  {
3915  Int_t tag = pi0->GetTag();
3916  Int_t label = pi0->GetLabel();
3917  Int_t mcIndex = GetMCIndex(tag);
3918 
3919  if(fAnaType != kSSCalo && mcIndex > 1) continue;
3920 
3921  fhMCE [mcIndex] ->Fill(ener, GetEventWeight());
3922  fhMCPt [mcIndex] ->Fill(pt , GetEventWeight());
3923  fhMCPtPhi[mcIndex] ->Fill(pt , phi, GetEventWeight());
3924  fhMCPtEta[mcIndex] ->Fill(pt , eta, GetEventWeight());
3925 
3926  if ( IsHighMultiplicityAnalysisOn() ) fhMCPtCentrality[mcIndex]->Fill(pt, cen, GetEventWeight());
3927 
3928  if((mcIndex==kmcPi0Decay || mcIndex==kmcEtaDecay ||
3929  mcIndex==kmcPi0 || mcIndex==kmcEta ) &&
3930  fAnaType==kSSCalo)
3931  {
3932  Float_t efracMC = 0;
3933  Int_t momlabel = -1;
3934  Bool_t ok = kFALSE;
3935 
3937  if(!ok) continue;
3938 
3939  if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
3940  {
3941  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3942  if(fGrandMotherMom.E() > 0 && ok)
3943  {
3944  efracMC = fGrandMotherMom.E()/ener;
3945  fhMCPi0PtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3946  }
3947  }
3948  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
3949  {
3950  fhMCPi0DecayPt->Fill(pt, GetEventWeight());
3951  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3952 
3953  if(fGrandMotherMom.E() > 0 && ok)
3954  {
3955  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3956  fhMCPi0DecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3957  }
3958  }
3959  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
3960  {
3961  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3962  if(fGrandMotherMom.E() > 0 && ok)
3963  {
3964  efracMC = fGrandMotherMom.E()/ener;
3965  fhMCEtaPtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3966  }
3967  }
3968  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
3969  {
3970  fhMCEtaDecayPt->Fill(pt, GetEventWeight());
3971  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3972 
3973  if(fGrandMotherMom.E() > 0 && ok)
3974  {
3975  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3976  fhMCEtaDecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3977  }
3978  }
3979  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
3980  {
3981  fhMCOtherDecayPt->Fill(pt, GetEventWeight());
3982  }
3983  }
3984 
3985  if( mcIndex==kmcPi0 || mcIndex==kmcEta )
3986  {
3987  Float_t prodR = -1;
3988  Int_t momindex = -1;
3989  Int_t mompdg = -1;
3990  Int_t momstatus = -1;
3991  Int_t status = -1;
3992  if(GetReader()->ReadStack())
3993  {
3994  TParticle* ancestor = GetMC()->Particle(label);
3995  status = ancestor->GetStatusCode();
3996  momindex = ancestor->GetFirstMother();
3997  if(momindex < 0) return;
3998  TParticle* mother = GetMC()->Particle(momindex);
3999  mompdg = TMath::Abs(mother->GetPdgCode());
4000  momstatus = mother->GetStatusCode();
4001  prodR = mother->R();
4002  }
4003  else
4004  {
4005  AliAODMCParticle* ancestor = (AliAODMCParticle *) GetMC()->GetTrack(label);
4006  status = ancestor->GetStatus();
4007  momindex = ancestor->GetMother();
4008 
4009  if(momindex < 0) return;
4010 
4011  AliAODMCParticle* mother = (AliAODMCParticle *) GetMC()->GetTrack(momindex);
4012  mompdg = TMath::Abs(mother->GetPdgCode());
4013  momstatus = mother->GetStatus();
4014  prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv());
4015  }
4016 
4017  if( mcIndex==kmcPi0 )
4018  {
4019  fhMCPi0ProdVertex->Fill(pt, prodR , GetEventWeight());
4020  fhMCPi0PtStatus ->Fill(pt, status, GetEventWeight());
4021 
4022  if (momstatus == 21) fhMCPi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4023  else if(mompdg < 22 ) fhMCPi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4024  else if(mompdg > 2100 && mompdg < 2210) fhMCPi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4025  else if(mompdg == 221) fhMCPi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4026  else if(mompdg == 331) fhMCPi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4027  else if(mompdg == 213) fhMCPi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4028  else if(mompdg == 223) fhMCPi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4029  else if(mompdg >= 310 && mompdg <= 323) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4030  else if(mompdg == 130) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4031  else if(momstatus == 11 || momstatus == 12 ) fhMCPi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4032  else fhMCPi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4033 
4034  if(status != 11)
4035  {
4036  if (momstatus == 21) fhMCNotResonancePi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4037  else if(mompdg < 22 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4038  else if(mompdg > 2100 && mompdg < 2210) fhMCNotResonancePi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4039  else if(mompdg == 221) fhMCNotResonancePi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4040  else if(mompdg == 331) fhMCNotResonancePi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4041  else if(mompdg == 213) fhMCNotResonancePi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4042  else if(mompdg == 223) fhMCNotResonancePi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4043  else if(mompdg >= 310 && mompdg <= 323) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4044  else if(mompdg == 130) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4045  else if(momstatus == 11 || momstatus == 12 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4046  else fhMCNotResonancePi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4047  }
4048  }
4049  else if (mcIndex==kmcEta )
4050  {
4051  fhMCEtaProdVertex->Fill(pt, prodR, GetEventWeight());
4052 
4053  if (momstatus == 21) fhMCEtaPtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4054  else if(mompdg < 22 ) fhMCEtaPtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4055  else if(mompdg > 2100 && mompdg < 2210) fhMCEtaPtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4056  else if(mompdg == 221) fhMCEtaPtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4057  else if(mompdg == 331) fhMCEtaPtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4058  else if(mompdg == 213) fhMCEtaPtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4059  else if(mompdg == 223) fhMCEtaPtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4060  else if(mompdg >= 310 && mompdg <= 323) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4061  else if(mompdg == 130) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4062  else if(momstatus == 11 || momstatus == 12 ) fhMCEtaPtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4063  else fhMCEtaPtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4064  }
4065  }
4066  } // Histograms with MC
4067  }// aod loop
4068 
4069  AliDebug(1,"End");
4070 }
4071 
4072 //__________________________________________________
4074 //__________________________________________________
4075 void AliAnaPi0EbE::Print(const Option_t * opt) const
4076 {
4077  if(! opt)
4078  return;
4079 
4080  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4081 
4083 
4084  printf("Analysis Type = %d \n", fAnaType) ;
4085 
4086  if(fAnaType == kSSCalo)
4087  {
4088  printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
4089  printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
4090  printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
4091  printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
4092  }
4093 
4094  printf(" \n") ;
4095 }
4096 
4097 
4098 
4099 
4100 
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
Int_t fLastModule
Last EMCAL/PHOS module, set in CaloUtils or depending fidutial cuts.
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
Int_t fNModules
Number of EMCAL/PHOS modules to use in analysis, set in CaloUtils.
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:948
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 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:266
Int_t GetHistoTrackResidualPhiBins() 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