1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //_________________________________________________________________________
17 // Class for the analysis of high pT pi0 event by event
18 // Pi0/Eta identified by one of the following:
19 // -Invariant mass of 2 cluster in calorimeter
20 // -Shower shape analysis in calorimeter
21 // -Invariant mass of one cluster in calorimeter and one photon reconstructed in CTS
23 // -- Author: Gustavo Conesa (LNF-INFN) & Raphaelle Ichou (SUBATECH)
24 //////////////////////////////////////////////////////////////////////////////
27 // --- ROOT system ---
29 #include <TClonesArray.h>
30 #include <TObjString.h>
32 // --- Analysis system ---
33 #include "AliAnaPi0EbE.h"
34 #include "AliCaloTrackReader.h"
35 #include "AliIsolationCut.h"
36 #include "AliNeutralMesonSelection.h"
37 #include "AliCaloPID.h"
38 #include "AliMCAnalysisUtils.h"
40 #include "AliFiducialCut.h"
41 #include "TParticle.h"
42 #include "AliVCluster.h"
43 #include "AliESDEvent.h"
44 #include "AliAODEvent.h"
45 #include "AliAODMCParticle.h"
47 ClassImp(AliAnaPi0EbE)
49 //____________________________
50 AliAnaPi0EbE::AliAnaPi0EbE() :
51 AliAnaCaloTrackCorrBaseClass(),
53 fMinDist(0.),fMinDist2(0.), fMinDist3(0.),
54 fNLMCutMin(-1), fNLMCutMax(10),
55 fTimeCutMin(-10000), fTimeCutMax(10000),
56 fRejectTrackMatch(kTRUE), fSelectIsolatedDecay(kFALSE),
57 fFillWeightHistograms(kFALSE), fFillTMHisto(0),
58 fFillSelectClHisto(0), fFillOnlySimpleSSHisto(1),
59 fFillEMCALBCHistograms(0),
60 fFillAllNLMHistograms(0),
61 fInputAODGammaConvName(""),
62 fCheckSplitDistToBad(0),
65 fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
66 fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
67 fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
68 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
69 fhTimeTriggerEMCALBC0UMReMatchBoth(0),
70 fhPtCentrality(), fhPtEventPlane(0), fhMCPtCentrality(),
71 fhPtReject(0), fhEReject(0),
72 fhPtEtaReject(0), fhPtPhiReject(0), fhEtaPhiReject(0),
73 fhMass(0), fhMassPt(0), fhMassSplitPt(0),
74 fhSelectedMass(), fhSelectedMassPt(0), fhSelectedMassSplitPt(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),
90 // Shower shape histos
91 fhPtDispersion(0), fhPtLambda0(0), fhPtLambda0NoSplitCut(0),
92 fhPtLambda1(0), fhPtLambda0NoTRD(0), fhPtLambda0FracMaxCellCut(0),
93 fhPtFracMaxCell(0), fhPtFracMaxCellNoTRD(0),
94 fhPtNCells(0), fhPtTime(0), fhEPairDiffTime(0),
95 fhPtDispEta(0), fhPtDispPhi(0),
96 fhPtSumEta(0), fhPtSumPhi(0), fhPtSumEtaPhi(0),
97 fhPtDispEtaPhiDiff(0), fhPtSphericity(0),
100 fhMCPtDecayLostPairPi0(0), fhMCPtDecayLostPairEta(0),
102 fhMCPtPhi(), fhMCPtEta(),
103 fhMCEReject(), fhMCPtReject(),
104 fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
105 fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
106 fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
108 fhMassPairMCPi0(0), fhMassPairMCEta(0),
109 fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
110 fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0),
111 fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0),
114 fhECellClusterRatio(0), fhECellClusterLogRatio(0),
115 fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
116 fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
117 fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
118 fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
119 fhTrackMatchedMCParticlePt(0),
120 fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
121 fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
122 // Number of local maxima in cluster
123 fhNLocMaxPt(0), fhNLocMaxPtReject(0),
125 fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
126 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
127 fhTimeNPileUpVertContributors(0),
128 fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
129 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
130 fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0),
131 fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0)
135 for(Int_t i = 0; i < fgkNmcTypes; i++)
141 fhMCPtCentrality [i] = 0;
145 fhMCSplitPtPhi [i] = 0;
146 fhMCSplitPtEta [i] = 0;
148 fhMCNLocMaxPt [i] = 0;
149 fhMCNLocMaxSplitPt [i] = 0;
150 fhMCNLocMaxPtReject[i] = 0;
153 fhMCPtLambda0 [i] = 0;
154 fhMCPtLambda0NoTRD [i] = 0;
155 fhMCPtLambda0FracMaxCellCut[i]= 0;
156 fhMCPtFracMaxCell [i] = 0;
157 fhMCPtLambda1 [i] = 0;
158 fhMCPtDispersion [i] = 0;
160 fhMCPtDispEta [i] = 0;
161 fhMCPtDispPhi [i] = 0;
162 fhMCPtSumEtaPhi [i] = 0;
163 fhMCPtDispEtaPhiDiff[i] = 0;
164 fhMCPtSphericity [i] = 0;
165 fhMCPtAsymmetry [i] = 0;
168 fhMCMassSplitPt [i]=0;
169 fhMCSelectedMassPt [i]=0;
170 fhMCSelectedMassSplitPt[i]=0;
172 fhMCMassPtNoOverlap [i]=0;
173 fhMCMassSplitPtNoOverlap [i]=0;
174 fhMCSelectedMassPtNoOverlap [i]=0;
175 fhMCSelectedMassSplitPtNoOverlap[i]=0;
177 for(Int_t j = 0; j < 7; j++)
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;
188 for(Int_t j = 0; j < 7; j++)
190 fhLambda0DispEta [j] = 0;
191 fhLambda0DispPhi [j] = 0;
192 fhDispEtaDispPhi [j] = 0;
193 fhAsymmetryLambda0 [j] = 0;
194 fhAsymmetryDispEta [j] = 0;
195 fhAsymmetryDispPhi [j] = 0;
200 for(Int_t i = 0; i < 3; i++)
202 fhPtLambda0LocMax [i] = 0;
203 fhPtLambda1LocMax [i] = 0;
204 fhPtDispersionLocMax [i] = 0;
205 fhPtDispEtaLocMax [i] = 0;
206 fhPtDispPhiLocMax [i] = 0;
207 fhPtSumEtaPhiLocMax [i] = 0;
208 fhPtDispEtaPhiDiffLocMax[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++)
215 fhMCPtLambda0LocMax [ipart][i] = 0;
216 fhMCSelectedMassPtLocMax[ipart][i] = 0;
219 fhMCPi0PtRecoPtPrimLocMax [i] = 0;
220 fhMCEtaPtRecoPtPrimLocMax [i] = 0;
221 fhMCPi0SplitPtRecoPtPrimLocMax [i] = 0;
222 fhMCEtaSplitPtRecoPtPrimLocMax [i] = 0;
224 fhMCPi0SelectedPtRecoPtPrimLocMax [i] = 0;
225 fhMCEtaSelectedPtRecoPtPrimLocMax [i] = 0;
226 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[i] = 0;
227 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[i] = 0;
232 for(Int_t i =0; i < 14; i++){
233 fhLambda0ForW0[i] = 0;
234 //fhLambda1ForW0[i] = 0;
235 if(i<8)fhMassPairLocMax[i] = 0;
238 for(Int_t i = 0; i < 11; i++)
240 fhEtaPhiTriggerEMCALBC [i] = 0 ;
241 fhTimeTriggerEMCALBC [i] = 0 ;
242 fhTimeTriggerEMCALBCPileUpSPD[i] = 0 ;
244 fhEtaPhiTriggerEMCALBCUM [i] = 0 ;
245 fhTimeTriggerEMCALBCUM [i] = 0 ;
249 for(Int_t iSM = 0; iSM < 22; iSM++)
251 fhNLocMaxPtSM[iSM] = 0;
252 for(Int_t inlm = 0; inlm < 3; inlm++)
254 fhSelectedMassPtLocMaxSM [inlm][iSM] = 0;
255 fhSelectedLambda0PtLocMaxSM [inlm][iSM] = 0;
258 //Initialize parameters
263 //______________________________________________________________________________________________
264 void AliAnaPi0EbE::FillEMCALBCHistograms(Float_t energy, Float_t eta, Float_t phi, Float_t time)
266 // EMCal trigger cluster BC studies
268 Int_t id = GetReader()->GetTriggerClusterId();
271 Int_t bc = GetReader()->GetTriggerClusterBC();
272 if(TMath::Abs(bc) >= 6)
273 Info("FillEMCALBCHistograms","Trigger BC not expected = %d\n",bc);
275 if(phi < 0) phi+=TMath::TwoPi();
279 Double_t timeUS = TMath::Abs(time);
281 if (timeUS < 25) fhEtaPhiEMCALBC0->Fill(eta, phi);
282 else if (timeUS < 75) fhEtaPhiEMCALBC1->Fill(eta, phi);
283 else fhEtaPhiEMCALBCN->Fill(eta, phi);
286 if(TMath::Abs(bc) >= 6) return ;
288 if(GetReader()->IsBadCellTriggerEvent() || GetReader()->IsExoticEvent()) return ;
290 if(GetReader()->IsTriggerMatched())
292 if(energy > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(eta, phi);
293 fhTimeTriggerEMCALBC[bc+5]->Fill(energy, time);
294 if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(energy, time);
298 if(energy > 2) fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(eta, phi);
299 fhTimeTriggerEMCALBCUM[bc+5]->Fill(energy, time);
303 if(GetReader()->IsTriggerMatchedOpenCuts(0)) fhTimeTriggerEMCALBC0UMReMatchOpenTime ->Fill(energy, time);
304 if(GetReader()->IsTriggerMatchedOpenCuts(1)) fhTimeTriggerEMCALBC0UMReMatchCheckNeigh ->Fill(energy, time);
305 if(GetReader()->IsTriggerMatchedOpenCuts(2)) fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(energy, time);
310 //___________________________________________________________________________________
311 void AliAnaPi0EbE::FillPileUpHistograms(Float_t pt, Float_t time, AliVCluster * calo)
313 // Fill some histograms to understand pile-up
314 if(!IsPileUpAnalysisOn()) return;
316 //printf("E %f, time %f\n",energy,time);
317 AliVEvent * event = GetReader()->GetInputEvent();
319 fhTimePtNoCut->Fill(pt,time);
320 if(GetReader()->IsPileUpFromSPD())
322 if(GetReader()->IsPileUpFromSPD()) { fhPtPileUp[0]->Fill(pt); fhTimePtSPD ->Fill(pt,time); }
323 if(GetReader()->IsPileUpFromEMCal()) fhPtPileUp[1]->Fill(pt);
324 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPileUp[2]->Fill(pt);
325 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPileUp[3]->Fill(pt);
326 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPileUp[4]->Fill(pt);
327 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPileUp[5]->Fill(pt);
328 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPileUp[6]->Fill(pt);
330 if(event->IsPileupFromSPDInMultBins()) fhTimePtSPDMulti->Fill(pt,time);
334 AliVCaloCells* cells = 0;
335 if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
336 else cells = GetPHOSCells();
338 Float_t maxCellFraction = 0.;
339 Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells,calo,maxCellFraction);
341 Double_t tmax = cells->GetCellTime(absIdMax);
342 GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
345 //Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
346 if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30)
348 for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
350 Int_t absId = calo->GetCellsAbsId()[ipos];
352 if( absId == absIdMax ) continue ;
354 Double_t timecell = cells->GetCellTime(absId);
355 Float_t amp = cells->GetCellAmplitude(absId);
356 Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
357 GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,timecell,cells);
360 Float_t diff = (tmax-timecell);
362 if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
364 if(GetReader()->IsPileUpFromSPD())
366 fhPtCellTimePileUp[0]->Fill(pt, timecell);
367 fhPtTimeDiffPileUp[0]->Fill(pt, diff);
370 if(GetReader()->IsPileUpFromEMCal())
372 fhPtCellTimePileUp[1]->Fill(pt, timecell);
373 fhPtTimeDiffPileUp[1]->Fill(pt, diff);
376 if(GetReader()->IsPileUpFromSPDOrEMCal())
378 fhPtCellTimePileUp[2]->Fill(pt, timecell);
379 fhPtTimeDiffPileUp[2]->Fill(pt, diff);
382 if(GetReader()->IsPileUpFromSPDAndEMCal())
384 fhPtCellTimePileUp[3]->Fill(pt, timecell);
385 fhPtTimeDiffPileUp[3]->Fill(pt, diff);
388 if(GetReader()->IsPileUpFromSPDAndNotEMCal())
390 fhPtCellTimePileUp[4]->Fill(pt, timecell);
391 fhPtTimeDiffPileUp[4]->Fill(pt, diff);
394 if(GetReader()->IsPileUpFromEMCalAndNotSPD())
396 fhPtCellTimePileUp[5]->Fill(pt, timecell);
397 fhPtTimeDiffPileUp[5]->Fill(pt, diff);
400 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal())
402 fhPtCellTimePileUp[6]->Fill(pt, timecell);
403 fhPtTimeDiffPileUp[6]->Fill(pt, diff);
408 if(pt < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
410 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
411 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
413 // N pile up vertices
419 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
420 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
425 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
426 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
429 fhTimeNPileUpVertSPD ->Fill(time,nVtxSPD);
430 fhTimeNPileUpVertTrack->Fill(time,nVtxTrk);
432 fhPtNPileUpSPDVtx->Fill(pt,nVtxSPD);
433 fhPtNPileUpTrkVtx->Fill(pt,nVtxTrk);
435 if(TMath::Abs(time) < 25)
437 fhPtNPileUpSPDVtxTimeCut ->Fill(pt,nVtxSPD);
438 fhPtNPileUpTrkVtxTimeCut ->Fill(pt,nVtxTrk);
441 if(time < 75 && time > -25)
443 fhPtNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD);
444 fhPtNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk);
447 //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
448 // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTracks);
451 Float_t z1 = -1, z2 = -1;
453 for(Int_t iVert=0; iVert<nVtxSPD;iVert++)
457 const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
458 ncont=pv->GetNContributors();
459 z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
461 diamZ = esdEv->GetDiamondZ();
465 AliAODVertex *pv=aodEv->GetVertex(iVert);
466 if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
467 ncont=pv->GetNContributors();
468 z1=aodEv->GetPrimaryVertexSPD()->GetZ();
470 diamZ = aodEv->GetDiamondZ();
473 Double_t distZ = TMath::Abs(z2-z1);
474 diamZ = TMath::Abs(z2-diamZ);
476 fhTimeNPileUpVertContributors ->Fill(time,ncont);
477 fhTimePileUpMainVertexZDistance->Fill(time,distZ);
478 fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ);
484 //______________________________________________________________________________________________
485 void AliAnaPi0EbE::FillRejectedClusterHistograms(TLorentzVector mom, Int_t mctag, Int_t nMaxima)
487 // Fill histograms that do not pass the identification (SS case only)
489 Float_t ener = mom.E();
490 Float_t pt = mom.Pt();
491 Float_t phi = mom.Phi();
492 if(phi < 0) phi+=TMath::TwoPi();
493 Float_t eta = mom.Eta();
495 fhPtReject ->Fill(pt);
496 fhEReject ->Fill(ener);
498 fhPtEtaReject ->Fill(ener,eta);
499 fhPtPhiReject ->Fill(ener,phi);
500 fhEtaPhiReject ->Fill(eta,phi);
501 fhNLocMaxPtReject->Fill(pt,nMaxima);
505 Int_t mcIndex = GetMCIndex(mctag);
506 fhMCEReject [mcIndex] ->Fill(ener);
507 fhMCPtReject [mcIndex] ->Fill(pt);
508 if(fFillAllNLMHistograms) fhMCNLocMaxPtReject[mcIndex]->Fill(pt,nMaxima);
513 //___________________________________________________________________________________
514 void AliAnaPi0EbE::FillSelectedClusterHistograms(AliVCluster* cluster, Float_t pt, Int_t nMaxima,
515 Int_t tag, Float_t asy)
517 // Fill shower shape, timing and other histograms for selected clusters from decay
519 Float_t ener = cluster->E();
520 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
521 Float_t l0 = cluster->GetM02();
522 Float_t l1 = cluster->GetM20();
523 Int_t nSM = GetModuleNumber(cluster);
526 if (pt < 2 ) ptbin = 0;
527 else if (pt < 4 ) ptbin = 1;
528 else if (pt < 6 ) ptbin = 2;
529 else if (pt < 10) ptbin = 3;
530 else if (pt < 15) ptbin = 4;
531 else if (pt < 20) ptbin = 5;
535 if (nMaxima==1) indexMax = 0 ;
536 else if(nMaxima==2) indexMax = 1 ;
539 FillWeightHistograms(cluster);
541 fhPtLambda0 ->Fill(pt, l0 );
542 fhPtLambda1 ->Fill(pt, l1 );
544 fhNLocMaxPt->Fill(pt,nMaxima);
546 if(fFillAllNLMHistograms)
548 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
549 fhNLocMaxPtSM[nSM]->Fill(pt,nMaxima);
551 fhPtLambda0LocMax [indexMax]->Fill(pt,l0);
552 fhPtLambda1LocMax [indexMax]->Fill(pt,l1);
555 Float_t ll0 = 0., ll1 = 0.;
556 Float_t dispp= 0., dEta = 0., dPhi = 0.;
557 Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
558 AliVCaloCells * cell = 0x0;
559 Float_t maxCellFraction = 0;
561 if(GetCalorimeter() == kEMCAL && !fFillOnlySimpleSSHisto)
563 cell = GetEMCALCells();
565 GetCaloUtils()->GetMaxEnergyCell(cell, cluster, maxCellFraction);
566 fhPtFracMaxCell->Fill(pt,maxCellFraction);
568 if(maxCellFraction < 0.5)
569 fhPtLambda0FracMaxCellCut->Fill(pt, l0 );
571 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(),
573 ll0, ll1, dispp, dEta, dPhi,
574 sEta, sPhi, sEtaPhi);
575 fhPtDispersion -> Fill(pt,disp);
576 fhPtDispEta -> Fill(pt,dEta);
577 fhPtDispPhi -> Fill(pt,dPhi);
578 fhPtSumEta -> Fill(pt,sEta);
579 fhPtSumPhi -> Fill(pt,sPhi);
580 fhPtSumEtaPhi -> Fill(pt,sEtaPhi);
581 fhPtDispEtaPhiDiff-> Fill(pt,dPhi-dEta);
582 if(dEta+dPhi>0)fhPtSphericity-> Fill(pt,(dPhi-dEta)/(dEta+dPhi));
584 fhDispEtaDispPhi[ptbin]->Fill(dEta,dPhi);
585 fhLambda0DispEta[ptbin]->Fill(l0 ,dEta);
586 fhLambda0DispPhi[ptbin]->Fill(l0 ,dPhi);
588 if (fAnaType==kSSCalo)
590 // Asymmetry histograms
591 fhAsymmetryLambda0[ptbin]->Fill(l0 ,asy);
592 fhAsymmetryDispEta[ptbin]->Fill(dEta,asy);
593 fhAsymmetryDispPhi[ptbin]->Fill(dPhi,asy);
596 if(fFillAllNLMHistograms)
598 fhPtDispersionLocMax [indexMax]->Fill(pt,disp);
599 fhPtDispEtaLocMax [indexMax]-> Fill(pt,dEta);
600 fhPtDispPhiLocMax [indexMax]-> Fill(pt,dPhi);
601 fhPtSumEtaPhiLocMax [indexMax]-> Fill(pt,sEtaPhi);
602 fhPtDispEtaPhiDiffLocMax[indexMax]-> Fill(pt,dPhi-dEta);
603 if(dEta+dPhi>0) fhPtSphericityLocMax[indexMax]->Fill(pt,(dPhi-dEta)/(dEta+dPhi));
604 if(fAnaType==kSSCalo) fhPtAsymmetryLocMax [indexMax]->Fill(pt ,asy);
609 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
610 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
612 fhPtLambda0NoTRD ->Fill(pt, l0 );
613 if(!fFillOnlySimpleSSHisto)
614 fhPtFracMaxCellNoTRD->Fill(pt,maxCellFraction);
617 fhPtTime ->Fill(pt, cluster->GetTOF()*1.e9);
618 fhPtNCells->Fill(pt, cluster->GetNCells());
620 // Fill Track matching control histograms
623 Float_t dZ = cluster->GetTrackDz();
624 Float_t dR = cluster->GetTrackDx();
626 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
628 dR = 2000., dZ = 2000.;
629 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
631 //printf("Pi0EbE: dPhi %f, dEta %f\n",dR,dZ);
633 AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
635 Bool_t positive = kFALSE;
636 if(track) positive = (track->Charge()>0);
638 if(fhTrackMatchedDEta && TMath::Abs(dR) < 999)
640 fhTrackMatchedDEta->Fill(pt,dZ);
641 fhTrackMatchedDPhi->Fill(pt,dR);
642 if(ener > 0.5) fhTrackMatchedDEtaDPhi->Fill(dZ,dR);
648 fhTrackMatchedDEtaPos->Fill(pt,dZ);
649 fhTrackMatchedDPhiPos->Fill(pt,dR);
650 if(ener > 0.5) fhTrackMatchedDEtaDPhiPos->Fill(dZ,dR);
654 fhTrackMatchedDEtaNeg->Fill(pt,dZ);
655 fhTrackMatchedDPhiNeg->Fill(pt,dR);
656 if(ener > 0.5) fhTrackMatchedDEtaDPhiNeg->Fill(dZ,dR);
660 // Check dEdx and E/p of matched clusters
662 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
666 Float_t dEdx = track->GetTPCsignal();
667 fhdEdx->Fill(pt, dEdx);
669 Float_t eOverp = cluster->E()/track->P();
670 fhEOverP->Fill(pt, eOverp);
672 // Change nSM for year > 2011 (< 4 in 2012-13, none after)
673 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
674 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
675 fhEOverPNoTRD->Fill(pt, eOverp);
679 // printf("AliAnaPi0EbE::FillSelectedClusterHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
684 if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
686 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
687 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 2.5 ;
688 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 0.5 ;
689 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 1.5 ;
695 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
696 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 6.5 ;
697 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 4.5 ;
698 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 5.5 ;
702 fhTrackMatchedMCParticlePt ->Fill(pt, mctag);
703 fhTrackMatchedMCParticleDEta->Fill(dZ, mctag);
704 fhTrackMatchedMCParticleDPhi->Fill(dR, mctag);
708 }// Track matching histograms
712 Int_t mcIndex = GetMCIndex(tag);
714 fhMCPtLambda0[mcIndex] ->Fill(pt, l0);
715 fhMCPtLambda1[mcIndex] ->Fill(pt, l1);
716 if(fFillAllNLMHistograms) fhMCPtLambda0LocMax[mcIndex][indexMax]->Fill(pt,l0);
718 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
719 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
720 fhMCPtLambda0NoTRD[mcIndex]->Fill(pt, l0 );
722 if(GetCalorimeter() == kEMCAL && !fFillOnlySimpleSSHisto)
724 if(maxCellFraction < 0.5)
725 fhMCPtLambda0FracMaxCellCut[mcIndex]->Fill(pt, l0 );
727 fhMCPtDispersion [mcIndex]->Fill(pt, disp);
728 fhMCPtFracMaxCell [mcIndex]->Fill(pt,maxCellFraction);
730 fhMCPtDispEta [mcIndex]-> Fill(pt,dEta);
731 fhMCPtDispPhi [mcIndex]-> Fill(pt,dPhi);
732 fhMCPtSumEtaPhi [mcIndex]-> Fill(pt,sEtaPhi);
733 fhMCPtDispEtaPhiDiff [mcIndex]-> Fill(pt,dPhi-dEta);
734 if(dEta+dPhi > 0) fhMCPtSphericity[mcIndex]-> Fill(pt,(dPhi-dEta)/(dEta+dPhi));
736 if (fAnaType==kSSCalo)
738 fhMCAsymmetryLambda0[ptbin][mcIndex]->Fill(l0 ,asy);
739 fhMCAsymmetryDispEta[ptbin][mcIndex]->Fill(dEta,asy);
740 fhMCAsymmetryDispPhi[ptbin][mcIndex]->Fill(dPhi,asy);
743 fhMCDispEtaDispPhi[ptbin][mcIndex]->Fill(dEta,dPhi);
744 fhMCLambda0DispEta[ptbin][mcIndex]->Fill(l0 ,dEta);
745 fhMCLambda0DispPhi[ptbin][mcIndex]->Fill(l0 ,dPhi);
752 //________________________________________________________
753 void AliAnaPi0EbE::FillWeightHistograms(AliVCluster *clus)
755 // Calculate weights and fill histograms
757 if(!fFillWeightHistograms || GetMixedEvent()) return;
759 AliVCaloCells* cells = 0;
760 if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
761 else cells = GetPHOSCells();
763 // First recalculate energy in case non linearity was applied
766 for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
769 Int_t id = clus->GetCellsAbsId()[ipos];
771 //Recalibrate cell energy if needed
772 Float_t amp = cells->GetCellAmplitude(id);
773 GetCaloUtils()->RecalibrateCellAmplitude(amp,GetCalorimeter(), id);
784 printf("AliAnaPi0EbE::WeightHistograms()- Wrong calculated energy %f\n",energy);
788 fhEMaxCellClusterRatio ->Fill(energy,ampMax/energy);
789 fhEMaxCellClusterLogRatio->Fill(energy,TMath::Log(ampMax/energy));
791 //Get the ratio and log ratio to all cells in cluster
792 for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
794 Int_t id = clus->GetCellsAbsId()[ipos];
796 //Recalibrate cell energy if needed
797 Float_t amp = cells->GetCellAmplitude(id);
798 GetCaloUtils()->RecalibrateCellAmplitude(amp,GetCalorimeter(), id);
800 fhECellClusterRatio ->Fill(energy,amp/energy);
801 fhECellClusterLogRatio->Fill(energy,TMath::Log(amp/energy));
804 //Recalculate shower shape for different W0
805 if(GetCalorimeter()==kEMCAL){
807 Float_t l0org = clus->GetM02();
808 Float_t l1org = clus->GetM20();
809 Float_t dorg = clus->GetDispersion();
811 for(Int_t iw = 0; iw < 14; iw++)
813 GetCaloUtils()->GetEMCALRecoUtils()->SetW0(1+iw*0.5);
814 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), cells, clus);
816 fhLambda0ForW0[iw]->Fill(energy,clus->GetM02());
817 //fhLambda1ForW0[iw]->Fill(energy,clus->GetM20());
821 // Set the original values back
824 clus->SetDispersion(dorg);
829 //__________________________________________
830 TObjString * AliAnaPi0EbE::GetAnalysisCuts()
832 //Save parameters used for analysis
833 TString parList ; //this will be list of parameters used for this analysis.
834 const Int_t buffersize = 255;
835 char onePar[buffersize] ;
837 snprintf(onePar,buffersize,"--- AliAnaPi0EbE ---\n") ;
839 snprintf(onePar,buffersize,"fAnaType=%d (selection type) \n",fAnaType) ;
841 snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
843 snprintf(onePar,buffersize,"Local maxima in cluster: %d < nlm < %d;",fNLMCutMin,fNLMCutMax) ;
846 if(fAnaType == kSSCalo)
848 snprintf(onePar,buffersize,"E cut: %2.2f<E<%2.2f;",GetMinEnergy(),GetMaxEnergy()) ;
850 snprintf(onePar,buffersize,"N cell cut: N > %d;",GetCaloPID()->GetClusterSplittingMinNCells()) ;
852 snprintf(onePar,buffersize,"Min Dist to Bad channel: fMinDist =%2.2f; fMinDist2=%2.2f, fMinDist3=%2.2f;",fMinDist, fMinDist2,fMinDist3) ;
854 snprintf(onePar,buffersize,"Min E cut for NLM cases: 1) %2.2f; 2) %2.2f; 3) %2.2f;",fNLMECutMin[0],fNLMECutMin[1],fNLMECutMin[2]) ;
856 snprintf(onePar,buffersize,"Reject Matched tracks?: %d;",fRejectTrackMatch) ;
858 snprintf(onePar,buffersize,"Reject split cluster close to border or bad?: %d;",fCheckSplitDistToBad) ;
860 snprintf(onePar,buffersize,"Time cut: %2.2f<t<%2.2f;",fTimeCutMin,fTimeCutMax) ;
862 //Get parameters set in PID class.
863 parList += GetCaloPID()->GetPIDParametersList() ;
865 else if(fAnaType == kIMCalo || fAnaType == kIMCaloTracks)
867 snprintf(onePar,buffersize,"Select %s;", (GetNeutralMesonSelection()->GetParticle()).Data()) ;
869 snprintf(onePar,buffersize,"Mass cut: %2.2f<M<%2.2f;",GetNeutralMesonSelection()->GetInvMassMinCut() ,GetNeutralMesonSelection()->GetInvMassMaxCut()) ;
872 else if(fAnaType == kIMCaloTracks)
874 snprintf(onePar,buffersize,"Photon Conv Array: %s;",fInputAODGammaConvName.Data()) ;
877 else if(fAnaType == kIMCalo)
879 snprintf(onePar,buffersize,"Time Diff: %2.2f;",GetPairTimeCut()) ;
883 //Get parameters set in base class.
884 //parList += GetBaseParametersList() ;
886 return new TObjString(parList) ;
889 //_____________________________________________
890 TList * AliAnaPi0EbE::GetCreateOutputObjects()
892 // Create histograms to be saved in output file and
893 // store them in outputContainer
894 TList * outputContainer = new TList() ;
895 outputContainer->SetName("Pi0EbEHistos") ;
897 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
898 Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
899 Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
900 Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin();
901 Int_t tdbins = GetHistogramRanges()->GetHistoDiffTimeBins() ; Float_t tdmax = GetHistogramRanges()->GetHistoDiffTimeMax(); Float_t tdmin = GetHistogramRanges()->GetHistoDiffTimeMin();
902 Int_t tbins = GetHistogramRanges()->GetHistoTimeBins() ; Float_t tmax = GetHistogramRanges()->GetHistoTimeMax(); Float_t tmin = GetHistogramRanges()->GetHistoTimeMin();
903 Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin();
905 Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins();
906 Float_t massmin = GetHistogramRanges()->GetHistoMassMin();
907 Float_t massmax = GetHistogramRanges()->GetHistoMassMax();
909 Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
910 Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
911 Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
912 Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
913 Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
914 Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
916 Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
917 Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
918 Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
919 Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
920 Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
921 Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
923 Int_t ntimptbins = GetHistogramRanges()->GetHistoTimeBins();
924 Float_t timemax = GetHistogramRanges()->GetHistoTimeMax();
925 Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
927 TString nlm[] = {"1 Local Maxima","2 Local Maxima", "NLM > 2"};
929 TString ptype [] = {"#pi^{0}", "#eta", "#gamma (direct)","#gamma (#pi^{0})", "#gamma (#eta)", "#gamma (other)", "e^{#pm}" , "hadron/other combinations"};
930 TString pname [] = {"Pi0" , "Eta" , "Photon" ,"Pi0Decay" , "EtaDecay" , "OtherDecay" , "Electron", "Hadron"};
932 Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins
934 fhPt = new TH1F("hPt","Number of identified #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
935 fhPt->SetYTitle("#it{N}");
936 fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
937 outputContainer->Add(fhPt) ;
939 fhE = new TH1F("hE","Number of identified #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
940 fhE->SetYTitle("#it{N}");
941 fhE->SetXTitle("#it{E} (GeV)");
942 outputContainer->Add(fhE) ;
945 ("hPtPhi","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
946 fhPtPhi->SetYTitle("#phi (rad)");
947 fhPtPhi->SetXTitle("#it{E} (GeV)");
948 outputContainer->Add(fhPtPhi) ;
951 ("hPtEta","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
952 fhPtEta->SetYTitle("#eta");
953 fhPtEta->SetXTitle("#it{E} (GeV)");
954 outputContainer->Add(fhPtEta) ;
957 ("hEtaPhi","Selected #pi^{0} (#eta) pairs: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
958 fhEtaPhi->SetYTitle("#phi (rad)");
959 fhEtaPhi->SetXTitle("#eta");
960 outputContainer->Add(fhEtaPhi) ;
962 if(GetCalorimeter()==kEMCAL && fFillEMCALBCHistograms)
964 fhEtaPhiEMCALBC0 = new TH2F
965 ("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);
966 fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)");
967 fhEtaPhiEMCALBC0->SetXTitle("#eta");
968 outputContainer->Add(fhEtaPhiEMCALBC0) ;
970 fhEtaPhiEMCALBC1 = new TH2F
971 ("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);
972 fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)");
973 fhEtaPhiEMCALBC1->SetXTitle("#eta");
974 outputContainer->Add(fhEtaPhiEMCALBC1) ;
976 fhEtaPhiEMCALBCN = new TH2F
977 ("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);
978 fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)");
979 fhEtaPhiEMCALBCN->SetXTitle("#eta");
980 outputContainer->Add(fhEtaPhiEMCALBCN) ;
982 for(Int_t i = 0; i < 11; i++)
984 fhEtaPhiTriggerEMCALBC[i] = new TH2F
985 (Form("hEtaPhiTriggerEMCALBC%d",i-5),
986 Form("meson #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
987 netabins,etamin,etamax,nphibins,phimin,phimax);
988 fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
989 fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
990 outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
992 fhTimeTriggerEMCALBC[i] = new TH2F
993 (Form("hTimeTriggerEMCALBC%d",i-5),
994 Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
995 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
996 fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
997 fhTimeTriggerEMCALBC[i]->SetYTitle("#it{t} (ns)");
998 outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1000 fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F
1001 (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
1002 Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1003 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1004 fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1005 fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{t} (ns)");
1006 outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
1008 fhEtaPhiTriggerEMCALBCUM[i] = new TH2F
1009 (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
1010 Form("meson #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
1011 netabins,etamin,etamax,nphibins,phimin,phimax);
1012 fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
1013 fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1014 outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1016 fhTimeTriggerEMCALBCUM[i] = new TH2F
1017 (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
1018 Form("meson #it{t} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-5),
1019 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1020 fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1021 fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{t} (ns)");
1022 outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
1026 fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
1027 "cluster #it{t} vs #it{E} of clusters, no match, rematch open time",
1028 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1029 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
1030 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{t} (ns)");
1031 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
1034 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
1035 "cluster #it{t} vs #it{E} of clusters, no match, rematch with neigbour parches",
1036 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1037 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
1038 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{t} (ns)");
1039 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
1041 fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
1042 "cluster #it{t} vs #it{E} of clusters, no match, rematch open time and neigbour",
1043 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1044 fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
1045 fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{t} (ns)");
1046 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
1050 if(IsHighMultiplicityAnalysisOn())
1052 fhPtCentrality = new TH2F("hPtCentrality","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1053 fhPtCentrality->SetYTitle("centrality");
1054 fhPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1055 outputContainer->Add(fhPtCentrality) ;
1057 fhPtEventPlane = new TH2F("hPtEventPlane","event plane angle vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1058 fhPtEventPlane->SetYTitle("Event plane angle (rad)");
1059 fhPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1060 outputContainer->Add(fhPtEventPlane) ;
1063 if(fAnaType == kSSCalo)
1065 fhPtReject = new TH1F("hPtReject","Number of rejected as #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
1066 fhPtReject->SetYTitle("#it{N}");
1067 fhPtReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1068 outputContainer->Add(fhPtReject) ;
1070 fhEReject = new TH1F("hEReject","Number of rejected as #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
1071 fhEReject->SetYTitle("#it{N}");
1072 fhEReject->SetXTitle("#it{E} (GeV)");
1073 outputContainer->Add(fhEReject) ;
1075 fhPtPhiReject = new TH2F
1076 ("hPtPhiReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1077 fhPtPhiReject->SetYTitle("#phi (rad)");
1078 fhPtPhiReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1079 outputContainer->Add(fhPtPhiReject) ;
1081 fhPtEtaReject = new TH2F
1082 ("hPtEtaReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1083 fhPtEtaReject->SetYTitle("#eta");
1084 fhPtEtaReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1085 outputContainer->Add(fhPtEtaReject) ;
1087 fhEtaPhiReject = new TH2F
1088 ("hEtaPhiReject","Rejected #pi^{0} (#eta) cluster: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
1089 fhEtaPhiReject->SetYTitle("#phi (rad)");
1090 fhEtaPhiReject->SetXTitle("#eta");
1091 outputContainer->Add(fhEtaPhiReject) ;
1093 fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
1094 nptbins,ptmin,ptmax,20,0,20);
1095 fhNLocMaxPtReject ->SetYTitle("N maxima");
1096 fhNLocMaxPtReject ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1097 outputContainer->Add(fhNLocMaxPtReject) ;
1102 ("hMass","all pairs #it{M}: #it{E} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1103 fhMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1104 fhMass->SetXTitle("#it{E} (GeV)");
1105 outputContainer->Add(fhMass) ;
1107 fhSelectedMass = new TH2F
1108 ("hSelectedMass","Selected #pi^{0} (#eta) pairs #it{M}: E vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1109 fhSelectedMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1110 fhSelectedMass->SetXTitle("#it{E} (GeV)");
1111 outputContainer->Add(fhSelectedMass) ;
1114 ("hMassPt","all pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1115 fhMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1116 fhMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1117 outputContainer->Add(fhMassPt) ;
1119 fhSelectedMassPt = new TH2F
1120 ("hSelectedMassPt","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1121 fhSelectedMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1122 fhSelectedMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1123 outputContainer->Add(fhSelectedMassPt) ;
1125 if(fAnaType == kSSCalo)
1127 fhPtLambda0NoSplitCut = new TH2F
1128 ("hPtLambda0NoSplitCut","all clusters: #it{p}_{T} vs #lambda_{0}^{2}",nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1129 fhPtLambda0NoSplitCut->SetYTitle("#lambda_{0}^{2}");
1130 fhPtLambda0NoSplitCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1131 outputContainer->Add(fhPtLambda0NoSplitCut) ;
1133 for(Int_t inlm = 0; inlm < 3; inlm++)
1135 fhMassPtLocMax[inlm] = new TH2F
1136 (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);
1137 fhMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1138 fhMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1139 outputContainer->Add(fhMassPtLocMax[inlm]) ;
1141 fhSelectedMassPtLocMax[inlm] = new TH2F
1142 (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);
1143 fhSelectedMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1144 fhSelectedMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1145 outputContainer->Add(fhSelectedMassPtLocMax[inlm]) ;
1147 if(fFillAllNLMHistograms)
1149 for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
1151 fhSelectedMassPtLocMaxSM[inlm][iSM] = new TH2F
1152 (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);
1153 fhSelectedMassPtLocMaxSM[inlm][iSM]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1154 fhSelectedMassPtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1155 outputContainer->Add(fhSelectedMassPtLocMaxSM[inlm][iSM]) ;
1157 fhSelectedLambda0PtLocMaxSM[inlm][iSM] = new TH2F
1158 (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);
1159 fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetYTitle("#lambda_{0}^{2}");
1160 fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1161 outputContainer->Add(fhSelectedLambda0PtLocMaxSM[inlm][iSM]) ;
1167 for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1169 fhMCSelectedMassPtLocMax[ipart][inlm] = new TH2F
1170 (Form("hSelectedMassPtLocMax%d_MC%s",inlm+1,pname[ipart].Data()),
1171 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()),
1172 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1173 fhMCSelectedMassPtLocMax[ipart][inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1174 fhMCSelectedMassPtLocMax[ipart][inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1175 outputContainer->Add(fhMCSelectedMassPtLocMax[ipart][inlm]) ;
1182 fhMassNoOverlap = new TH2F
1183 ("hMassNoOverlap","all pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1184 fhMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1185 fhMassNoOverlap->SetXTitle("#it{E} (GeV)");
1186 outputContainer->Add(fhMassNoOverlap) ;
1188 fhSelectedMassNoOverlap = new TH2F
1189 ("hSelectedMassNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1190 fhSelectedMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1191 fhSelectedMassNoOverlap->SetXTitle("#it{E} (GeV)");
1192 outputContainer->Add(fhSelectedMassNoOverlap) ;
1194 fhMassPtNoOverlap = new TH2F
1195 ("hMassPtNoOverlap","all pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1196 fhMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1197 fhMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1198 outputContainer->Add(fhMassPtNoOverlap) ;
1200 fhSelectedMassPtNoOverlap = new TH2F
1201 ("hSelectedMassPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1202 fhSelectedMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1203 fhSelectedMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1204 outputContainer->Add(fhSelectedMassPtNoOverlap) ;
1208 if(fAnaType != kSSCalo)
1210 fhPtDecay = new TH1F("hPtDecay","Selected #pi^{0} (#eta) decay photons",nptbins,ptmin,ptmax);
1211 fhPtDecay->SetYTitle("#it{N}");
1212 fhPtDecay->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1213 outputContainer->Add(fhPtDecay) ;
1217 fhMCPtDecayLostPairPi0 = new TH1F("hPtDecay_MCPi0DecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #pi^{0} decay, companion lost",
1218 nptbins,ptmin,ptmax);
1219 fhMCPtDecayLostPairPi0->SetYTitle("#it{N}");
1220 fhMCPtDecayLostPairPi0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1221 outputContainer->Add(fhMCPtDecayLostPairPi0) ;
1223 fhMCPtDecayLostPairEta = new TH1F("hPtDecay_MCEtaDecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #eta decay, companion lost",
1224 nptbins,ptmin,ptmax);
1225 fhMCPtDecayLostPairEta->SetYTitle("#it{N}");
1226 fhMCPtDecayLostPairEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1227 outputContainer->Add(fhMCPtDecayLostPairEta) ;
1229 for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1231 fhMCPtDecay[ipart] = new TH1F(Form("hPtDecay_MC%s",pname[ipart].Data()),
1232 Form("Selected #pi^{0} (#eta) decay photons, from MC %s",ptype[ipart].Data()),
1233 nptbins,ptmin,ptmax);
1234 fhMCPtDecay[ipart]->SetYTitle("#it{N}");
1235 fhMCPtDecay[ipart]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1236 outputContainer->Add(fhMCPtDecay[ipart]) ;
1243 if( fFillSelectClHisto )
1245 fhPtLambda0 = new TH2F
1246 ("hPtLambda0","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1247 fhPtLambda0->SetYTitle("#lambda_{0}^{2}");
1248 fhPtLambda0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1249 outputContainer->Add(fhPtLambda0) ;
1251 fhPtLambda1 = new TH2F
1252 ("hPtLambda1","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1253 fhPtLambda1->SetYTitle("#lambda_{1}^{2}");
1254 fhPtLambda1->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1255 outputContainer->Add(fhPtLambda1) ;
1257 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >=0 )
1259 fhPtLambda0NoTRD = new TH2F
1260 ("hPtLambda0NoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, not behind TRD",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1261 fhPtLambda0NoTRD->SetYTitle("#lambda_{0}^{2}");
1262 fhPtLambda0NoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1263 outputContainer->Add(fhPtLambda0NoTRD) ;
1265 if(!fFillOnlySimpleSSHisto)
1267 fhPtFracMaxCellNoTRD = new TH2F
1268 ("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);
1269 fhPtFracMaxCellNoTRD->SetYTitle("Fraction");
1270 fhPtFracMaxCellNoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1271 outputContainer->Add(fhPtFracMaxCellNoTRD) ;
1275 if(!fFillOnlySimpleSSHisto)
1277 fhPtDispersion = new TH2F
1278 ("hPtDispersion","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1279 fhPtDispersion->SetYTitle("D^{2}");
1280 fhPtDispersion->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1281 outputContainer->Add(fhPtDispersion) ;
1283 fhPtLambda0FracMaxCellCut = new TH2F
1284 ("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);
1285 fhPtLambda0FracMaxCellCut->SetYTitle("#lambda_{0}^{2}");
1286 fhPtLambda0FracMaxCellCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1287 outputContainer->Add(fhPtLambda0FracMaxCellCut) ;
1289 fhPtFracMaxCell = new TH2F
1290 ("hPtFracMaxCell","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy",nptbins,ptmin,ptmax,100,0,1);
1291 fhPtFracMaxCell->SetYTitle("Fraction");
1292 fhPtFracMaxCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1293 outputContainer->Add(fhPtFracMaxCell) ;
1295 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);
1296 fhPtDispEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1297 fhPtDispEta->SetYTitle("#sigma^{2}_{#eta #eta}");
1298 outputContainer->Add(fhPtDispEta);
1300 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);
1301 fhPtDispPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1302 fhPtDispPhi->SetYTitle("#sigma^{2}_{#phi #phi}");
1303 outputContainer->Add(fhPtDispPhi);
1305 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);
1306 fhPtSumEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1307 fhPtSumEta->SetYTitle("#delta^{2}_{#eta #eta}");
1308 outputContainer->Add(fhPtSumEta);
1310 fhPtSumPhi = new TH2F ("hPtSumPhi","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs #it{p}_{T}",
1311 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1312 fhPtSumPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1313 fhPtSumPhi->SetYTitle("#delta^{2}_{#phi #phi}");
1314 outputContainer->Add(fhPtSumPhi);
1316 fhPtSumEtaPhi = new TH2F ("hPtSumEtaPhi","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs #it{p}_{T}",
1317 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1318 fhPtSumEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1319 fhPtSumEtaPhi->SetYTitle("#delta^{2}_{#eta #phi}");
1320 outputContainer->Add(fhPtSumEtaPhi);
1322 fhPtDispEtaPhiDiff = new TH2F ("hPtDispEtaPhiDiff","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",
1323 nptbins,ptmin,ptmax,200, -10,10);
1324 fhPtDispEtaPhiDiff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1325 fhPtDispEtaPhiDiff->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1326 outputContainer->Add(fhPtDispEtaPhiDiff);
1328 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})",
1329 nptbins,ptmin,ptmax, 200, -1,1);
1330 fhPtSphericity->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1331 fhPtSphericity->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1332 outputContainer->Add(fhPtSphericity);
1334 for(Int_t i = 0; i < 7; i++)
1336 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]),
1337 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1338 fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1339 fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1340 outputContainer->Add(fhDispEtaDispPhi[i]);
1342 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]),
1343 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1344 fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1345 fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1346 outputContainer->Add(fhLambda0DispEta[i]);
1348 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]),
1349 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1350 fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1351 fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1352 outputContainer->Add(fhLambda0DispPhi[i]);
1357 fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
1358 nptbins,ptmin,ptmax,20,0,20);
1359 fhNLocMaxPt ->SetYTitle("N maxima");
1360 fhNLocMaxPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1361 outputContainer->Add(fhNLocMaxPt) ;
1363 if(fFillAllNLMHistograms)
1365 for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
1367 fhNLocMaxPtSM[iSM] = new TH2F(Form("hNLocMaxPt_SM%d",iSM),Form("Number of local maxima in cluster, selected clusters in SM %d",iSM),
1368 nptbins,ptmin,ptmax,20,0,20);
1369 fhNLocMaxPtSM[iSM] ->SetYTitle("N maxima");
1370 fhNLocMaxPtSM[iSM] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1371 outputContainer->Add(fhNLocMaxPtSM[iSM]) ;
1374 for (Int_t i = 0; i < 3; i++)
1376 fhPtLambda0LocMax[i] = new TH2F(Form("hPtLambda0LocMax%d",i+1),
1377 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s",nlm[i].Data()),
1378 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1379 fhPtLambda0LocMax[i]->SetYTitle("#lambda_{0}^{2}");
1380 fhPtLambda0LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1381 outputContainer->Add(fhPtLambda0LocMax[i]) ;
1385 for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1387 fhMCPtLambda0LocMax[ipart][i] = new TH2F
1388 (Form("hPtLambda0LocMax%d_MC%s",i+1,pname[ipart].Data()),
1389 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s, MC %s",nlm[i].Data(),ptype[ipart].Data()),
1390 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1391 fhMCPtLambda0LocMax[ipart][i]->SetYTitle("#lambda_{0}^{2}");
1392 fhMCPtLambda0LocMax[ipart][i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1393 outputContainer->Add(fhMCPtLambda0LocMax[ipart][i]) ;
1397 fhPtLambda1LocMax[i] = new TH2F(Form("hPtLambda1LocMax%d",i+1),
1398 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}, %s",nlm[i].Data()),
1399 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1400 fhPtLambda1LocMax[i]->SetYTitle("#lambda_{1}^{2}");
1401 fhPtLambda1LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1402 outputContainer->Add(fhPtLambda1LocMax[i]) ;
1404 if(GetCalorimeter() == kEMCAL && !fFillOnlySimpleSSHisto)
1406 fhPtDispersionLocMax[i] = new TH2F(Form("hPtDispersionLocMax%d",i+1),
1407 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion^{2}, %s",nlm[i].Data()),
1408 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1409 fhPtDispersionLocMax[i]->SetYTitle("dispersion^{2}");
1410 fhPtDispersionLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1411 outputContainer->Add(fhPtDispersionLocMax[i]) ;
1413 fhPtDispEtaLocMax[i] = new TH2F(Form("hPtDispEtaLocMax%d",i+1),
1414 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #eta}, %s",nlm[i].Data()),
1415 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1416 fhPtDispEtaLocMax[i]->SetYTitle("#sigma_{#eta #eta}");
1417 fhPtDispEtaLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1418 outputContainer->Add(fhPtDispEtaLocMax[i]) ;
1420 fhPtDispPhiLocMax[i] = new TH2F(Form("hPtDispPhiLocMax%d",i+1),
1421 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi}, %s",nlm[i].Data()),
1422 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1423 fhPtDispPhiLocMax[i]->SetYTitle("#sigma_{#phi #phi}");
1424 fhPtDispPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1425 outputContainer->Add(fhPtDispPhiLocMax[i]) ;
1427 fhPtSumEtaPhiLocMax[i] = new TH2F(Form("hPtSumEtaPhiLocMax%d",i+1),
1428 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #phi}, %s",nlm[i].Data()),
1429 nptbins,ptmin,ptmax,2*ssbins,-ssmax,ssmax);
1430 fhPtSumEtaPhiLocMax[i]->SetYTitle("#sigma_{#eta #phi}");
1431 fhPtSumEtaPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1432 outputContainer->Add(fhPtSumEtaPhiLocMax[i]) ;
1434 fhPtDispEtaPhiDiffLocMax[i] = new TH2F(Form("hPtDispEtaPhiDiffLocMax%d",i+1),
1435 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi} - #sigma_{#eta #eta}, %s",nlm[i].Data()),
1436 nptbins,ptmin,ptmax,200, -10,10);
1437 fhPtDispEtaPhiDiffLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta}");
1438 fhPtDispEtaPhiDiffLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1439 outputContainer->Add(fhPtDispEtaPhiDiffLocMax[i]) ;
1441 fhPtSphericityLocMax[i] = new TH2F(Form("hPtSphericityLocMax%d",i+1),
1442 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()),
1443 nptbins,ptmin,ptmax,200, -1,1);
1444 fhPtSphericityLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta} / (#sigma_{#phi #phi} + #sigma_{#eta #eta})");
1445 fhPtSphericityLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1446 outputContainer->Add(fhPtSphericityLocMax[i]) ;
1451 fhPtNCells = new TH2F ("hPtNCells","N cells in cluster vs E ", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1452 fhPtNCells->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1453 fhPtNCells->SetYTitle("# of cells in cluster");
1454 outputContainer->Add(fhPtNCells);
1456 fhPtTime = new TH2F("hPtTime","cluster time vs pair E",nptbins,ptmin,ptmax, tbins,tmin,tmax);
1457 fhPtTime->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1458 fhPtTime->SetYTitle("t (ns)");
1459 outputContainer->Add(fhPtTime);
1463 if(fAnaType != kIMCaloTracks)
1465 fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs E",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1466 fhEPairDiffTime->SetXTitle("#it{E}_{pair} (GeV)");
1467 fhEPairDiffTime->SetYTitle("#Delta t (ns)");
1468 outputContainer->Add(fhEPairDiffTime);
1471 if(fAnaType == kIMCalo)
1473 TString combiName [] = {"1LocMax","2LocMax","NLocMax","1LocMax2LocMax","1LocMaxNLocMax","2LocMaxNLocMax","1LocMaxSSBad","NLocMaxSSGood"};
1474 TString combiTitle[] = {"1 Local Maxima in both clusters","2 Local Maxima in both clusters","more than 2 Local Maxima in both clusters",
1475 "1 Local Maxima paired with 2 Local Maxima","1 Local Maxima paired with more than 2 Local Maxima",
1476 "2 Local Maxima paired with more than 2 Local Maxima",
1477 "1 Local Maxima paired with #lambda_{0}^{2}>0.3","N Local Maxima paired with 0.1<#lambda_{0}^{2}<0.3"};
1479 if(fFillAllNLMHistograms)
1481 for (Int_t i = 0; i < 8 ; i++)
1483 if (fAnaType == kIMCaloTracks && i > 2 ) continue ;
1485 fhMassPairLocMax[i] = new TH2F
1486 (Form("MassPairLocMax%s",combiName[i].Data()),
1487 Form("#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}, %s", combiTitle[i].Data()),
1488 nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1489 fhMassPairLocMax[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1490 fhMassPairLocMax[i]->SetXTitle("#it{E}_{pair} (GeV)");
1491 outputContainer->Add(fhMassPairLocMax[i]) ;
1498 fhTrackMatchedDEta = new TH2F
1499 ("hTrackMatchedDEta",
1500 "d#eta of cluster-track vs cluster #it{p}_{T}",
1501 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1502 fhTrackMatchedDEta->SetYTitle("d#eta");
1503 fhTrackMatchedDEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1505 fhTrackMatchedDPhi = new TH2F
1506 ("hTrackMatchedDPhi",
1507 "d#phi of cluster-track vs cluster #it{p}_{T}",
1508 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1509 fhTrackMatchedDPhi->SetYTitle("d#phi (rad)");
1510 fhTrackMatchedDPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1512 fhTrackMatchedDEtaDPhi = new TH2F
1513 ("hTrackMatchedDEtaDPhi",
1514 "d#eta vs d#phi of cluster-track",
1515 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1516 fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)");
1517 fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
1519 outputContainer->Add(fhTrackMatchedDEta) ;
1520 outputContainer->Add(fhTrackMatchedDPhi) ;
1521 outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
1523 fhTrackMatchedDEtaPos = new TH2F
1524 ("hTrackMatchedDEtaPos",
1525 "d#eta of cluster-track vs cluster #it{p}_{T}",
1526 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1527 fhTrackMatchedDEtaPos->SetYTitle("d#eta");
1528 fhTrackMatchedDEtaPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1530 fhTrackMatchedDPhiPos = new TH2F
1531 ("hTrackMatchedDPhiPos",
1532 "d#phi of cluster-track vs cluster #it{p}_{T}",
1533 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1534 fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)");
1535 fhTrackMatchedDPhiPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1537 fhTrackMatchedDEtaDPhiPos = new TH2F
1538 ("hTrackMatchedDEtaDPhiPos",
1539 "d#eta vs d#phi of cluster-track",
1540 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1541 fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)");
1542 fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
1544 outputContainer->Add(fhTrackMatchedDEtaPos) ;
1545 outputContainer->Add(fhTrackMatchedDPhiPos) ;
1546 outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
1548 fhTrackMatchedDEtaNeg = new TH2F
1549 ("hTrackMatchedDEtaNeg",
1550 "d#eta of cluster-track vs cluster #it{p}_{T}",
1551 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1552 fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
1553 fhTrackMatchedDEtaNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1555 fhTrackMatchedDPhiNeg = new TH2F
1556 ("hTrackMatchedDPhiNeg",
1557 "d#phi of cluster-track vs cluster #it{p}_{T}",
1558 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1559 fhTrackMatchedDPhiNeg->SetYTitle("d#phi (rad)");
1560 fhTrackMatchedDPhiNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1562 fhTrackMatchedDEtaDPhiNeg = new TH2F
1563 ("hTrackMatchedDEtaDPhiNeg",
1564 "d#eta vs d#phi of cluster-track",
1565 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1566 fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#phi (rad)");
1567 fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
1569 outputContainer->Add(fhTrackMatchedDEtaNeg) ;
1570 outputContainer->Add(fhTrackMatchedDPhiNeg) ;
1571 outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
1573 fhdEdx = new TH2F ("hdEdx","matched track <dE/dx> vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1574 fhdEdx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1575 fhdEdx->SetYTitle("<#it{dE}/#it{dx}>");
1576 outputContainer->Add(fhdEdx);
1578 fhEOverP = new TH2F ("hEOverP","matched track E/p vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1579 fhEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1580 fhEOverP->SetYTitle("#it{E}/#it{p}");
1581 outputContainer->Add(fhEOverP);
1583 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >=0)
1585 fhEOverPNoTRD = new TH2F ("hEOverPNoTRD","matched track E/p vs cluster E, SM not behind TRD ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1586 fhEOverPNoTRD->SetXTitle("#it{E} (GeV)");
1587 fhEOverPNoTRD->SetYTitle("#it{E}/#it{p}");
1588 outputContainer->Add(fhEOverPNoTRD);
1591 if(IsDataMC() && fFillTMHisto)
1593 fhTrackMatchedMCParticlePt = new TH2F
1594 ("hTrackMatchedMCParticlePt",
1595 "Origin of particle vs energy",
1596 nptbins,ptmin,ptmax,8,0,8);
1597 fhTrackMatchedMCParticlePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1598 //fhTrackMatchedMCParticlePt->SetYTitle("Particle type");
1600 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(1 ,"Photon");
1601 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(2 ,"Electron");
1602 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1603 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(4 ,"Rest");
1604 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1605 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1606 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1607 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1609 outputContainer->Add(fhTrackMatchedMCParticlePt);
1611 fhTrackMatchedMCParticleDEta = new TH2F
1612 ("hTrackMatchedMCParticleDEta",
1613 "Origin of particle vs #eta residual",
1614 nresetabins,resetamin,resetamax,8,0,8);
1615 fhTrackMatchedMCParticleDEta->SetXTitle("#Delta #eta");
1616 //fhTrackMatchedMCParticleDEta->SetYTitle("Particle type");
1618 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(1 ,"Photon");
1619 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(2 ,"Electron");
1620 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1621 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(4 ,"Rest");
1622 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1623 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1624 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1625 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1627 outputContainer->Add(fhTrackMatchedMCParticleDEta);
1629 fhTrackMatchedMCParticleDPhi = new TH2F
1630 ("hTrackMatchedMCParticleDPhi",
1631 "Origin of particle vs #phi residual",
1632 nresphibins,resphimin,resphimax,8,0,8);
1633 fhTrackMatchedMCParticleDPhi->SetXTitle("#Delta #phi");
1634 //fhTrackMatchedMCParticleDPhi->SetYTitle("Particle type");
1636 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(1 ,"Photon");
1637 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(2 ,"Electron");
1638 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1639 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(4 ,"Rest");
1640 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1641 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1642 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1643 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1645 outputContainer->Add(fhTrackMatchedMCParticleDPhi);
1649 if(fFillWeightHistograms)
1651 fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1652 nptbins,ptmin,ptmax, 100,0,1.);
1653 fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1654 fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
1655 outputContainer->Add(fhECellClusterRatio);
1657 fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1658 nptbins,ptmin,ptmax, 100,-10,0);
1659 fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1660 fhECellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1661 outputContainer->Add(fhECellClusterLogRatio);
1663 fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1664 nptbins,ptmin,ptmax, 100,0,1.);
1665 fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1666 fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
1667 outputContainer->Add(fhEMaxCellClusterRatio);
1669 fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1670 nptbins,ptmin,ptmax, 100,-10,0);
1671 fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1672 fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1673 outputContainer->Add(fhEMaxCellClusterLogRatio);
1675 for(Int_t iw = 0; iw < 14; iw++)
1677 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),
1678 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1679 fhLambda0ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1680 fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}");
1681 outputContainer->Add(fhLambda0ForW0[iw]);
1683 // 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),
1684 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1685 // fhLambda1ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1686 // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}");
1687 // outputContainer->Add(fhLambda1ForW0[iw]);
1696 fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1697 fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1698 fhMCPi0PtOrigin->SetYTitle("Origin");
1699 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1700 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1701 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1702 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1703 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1704 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1705 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1706 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1707 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1708 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1709 outputContainer->Add(fhMCPi0PtOrigin) ;
1711 fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ;
1712 fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1713 fhMCEtaPtOrigin->SetYTitle("Origin");
1714 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1715 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1716 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1717 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1718 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other");
1719 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime");
1720 outputContainer->Add(fhMCEtaPtOrigin) ;
1722 fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1723 fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1724 fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)");
1725 outputContainer->Add(fhMCPi0ProdVertex) ;
1727 fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1728 fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1729 fhMCEtaProdVertex->SetYTitle("#it{R} (cm)");
1730 outputContainer->Add(fhMCEtaProdVertex) ;
1732 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
1734 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",
1735 nptbins,ptmin,ptmax,200,0,2);
1736 fhMCPi0PtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1737 fhMCPi0PtGenRecoFraction->SetYTitle("#it{E}^{#pi^{0} mother} / #it{E}^{rec}");
1738 outputContainer->Add(fhMCPi0PtGenRecoFraction) ;
1740 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",
1741 nptbins,ptmin,ptmax,200,0,2);
1742 fhMCEtaPtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1743 fhMCEtaPtGenRecoFraction->SetYTitle("#it{E}^{ #eta mother} / #it{E}^{rec}");
1744 outputContainer->Add(fhMCEtaPtGenRecoFraction) ;
1746 fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1747 fhMCPi0DecayPt->SetYTitle("#it{N}");
1748 fhMCPi0DecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1749 outputContainer->Add(fhMCPi0DecayPt) ;
1751 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}",
1752 nptbins,ptmin,ptmax,100,0,1);
1753 fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/#it{c})");
1754 fhMCPi0DecayPtFraction->SetYTitle("E^{gen} / E^{gen-mother}");
1755 outputContainer->Add(fhMCPi0DecayPtFraction) ;
1757 fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #eta decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1758 fhMCEtaDecayPt->SetYTitle("#it{N}");
1759 fhMCEtaDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1760 outputContainer->Add(fhMCEtaDecayPt) ;
1762 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",
1763 nptbins,ptmin,ptmax,100,0,1);
1764 fhMCEtaDecayPtFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1765 fhMCEtaDecayPtFraction->SetYTitle("#it{E}^{gen} / #it{E}^{gen-mother}");
1766 outputContainer->Add(fhMCEtaDecayPtFraction) ;
1768 fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma decay (not #eta or #pi^{0}) identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1769 fhMCOtherDecayPt->SetYTitle("#it{N}");
1770 fhMCOtherDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1771 outputContainer->Add(fhMCOtherDecayPt) ;
1774 if(fAnaType!=kSSCalo)
1776 fhAnglePairMCPi0 = new TH2F
1778 "Angle between decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5);
1779 fhAnglePairMCPi0->SetYTitle("#alpha (rad)");
1780 fhAnglePairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1781 outputContainer->Add(fhAnglePairMCPi0) ;
1783 fhAnglePairMCEta = new TH2F
1785 "Angle between decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,250,0,0.5);
1786 fhAnglePairMCEta->SetYTitle("#alpha (rad)");
1787 fhAnglePairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1788 outputContainer->Add(fhAnglePairMCEta) ;
1790 fhMassPairMCPi0 = new TH2F
1792 "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1793 fhMassPairMCPi0->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1794 fhMassPairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1795 outputContainer->Add(fhMassPairMCPi0) ;
1797 fhMassPairMCEta = new TH2F
1799 "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1800 fhMassPairMCEta->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1801 fhMassPairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1802 outputContainer->Add(fhMassPairMCEta) ;
1805 Int_t ntypes = fgkNmcTypes;
1806 if(fAnaType != kSSCalo) ntypes = 2;
1808 for(Int_t i = 0; i < ntypes; i++)
1811 (Form("hE_MC%s",pname[i].Data()),
1812 Form("Identified as #pi^{0} (#eta), cluster from %s",
1814 nptbins,ptmin,ptmax);
1815 fhMCE[i]->SetYTitle("#it{N}");
1816 fhMCE[i]->SetXTitle("#it{E} (GeV)");
1817 outputContainer->Add(fhMCE[i]) ;
1819 fhMCPt[i] = new TH1F
1820 (Form("hPt_MC%s",pname[i].Data()),
1821 Form("Identified as #pi^{0} (#eta), cluster from %s",
1823 nptbins,ptmin,ptmax);
1824 fhMCPt[i]->SetYTitle("#it{N}");
1825 fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1826 outputContainer->Add(fhMCPt[i]) ;
1828 if(IsHighMultiplicityAnalysisOn())
1830 fhMCPtCentrality[i] = new TH2F
1831 (Form("hPtCentrality_MC%s",pname[i].Data()),
1832 Form("Identified as #pi^{0} (#eta), cluster from %s",
1834 nptbins,ptmin,ptmax, 100,0,100);
1835 fhMCPtCentrality[i]->SetYTitle("centrality");
1836 fhMCPtCentrality[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1837 outputContainer->Add(fhMCPtCentrality[i]) ;
1840 if(fAnaType == kSSCalo)
1842 fhMCNLocMaxPt[i] = new TH2F
1843 (Form("hNLocMaxPt_MC%s",pname[i].Data()),
1844 Form("cluster from %s, #it{p}_{T} of cluster vs NLM, accepted",ptype[i].Data()),
1845 nptbins,ptmin,ptmax,20,0,20);
1846 fhMCNLocMaxPt[i] ->SetYTitle("#it{NLM}");
1847 fhMCNLocMaxPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1848 outputContainer->Add(fhMCNLocMaxPt[i]) ;
1850 fhMCNLocMaxPtReject[i] = new TH2F
1851 (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
1852 Form("cluster from %s, #it{p}_{T} of cluster vs NLM, rejected",ptype[i].Data()),
1853 nptbins,ptmin,ptmax,20,0,20);
1854 fhMCNLocMaxPtReject[i] ->SetYTitle("#it{NLM}");
1855 fhMCNLocMaxPtReject[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1856 outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
1858 fhMCEReject[i] = new TH1F
1859 (Form("hEReject_MC%s",pname[i].Data()),
1860 Form("Rejected as #pi^{0} (#eta), cluster from %s",
1862 nptbins,ptmin,ptmax);
1863 fhMCEReject[i]->SetYTitle("#it{N}");
1864 fhMCEReject[i]->SetXTitle("#it{E} (GeV)");
1865 outputContainer->Add(fhMCEReject[i]) ;
1867 fhMCPtReject[i] = new TH1F
1868 (Form("hPtReject_MC%s",pname[i].Data()),
1869 Form("Rejected as #pi^{0} (#eta), cluster from %s",
1871 nptbins,ptmin,ptmax);
1872 fhMCPtReject[i]->SetYTitle("#it{N}");
1873 fhMCPtReject[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1874 outputContainer->Add(fhMCPtReject[i]) ;
1877 fhMCPtPhi[i] = new TH2F
1878 (Form("hPtPhi_MC%s",pname[i].Data()),
1879 Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
1880 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1881 fhMCPtPhi[i]->SetYTitle("#phi");
1882 fhMCPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1883 outputContainer->Add(fhMCPtPhi[i]) ;
1885 fhMCPtEta[i] = new TH2F
1886 (Form("hPtEta_MC%s",pname[i].Data()),
1887 Form("Identified as #pi^{0} (#eta), cluster from %s",
1888 ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
1889 fhMCPtEta[i]->SetYTitle("#eta");
1890 fhMCPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1891 outputContainer->Add(fhMCPtEta[i]) ;
1893 fhMCMassPt[i] = new TH2F
1894 (Form("hMassPt_MC%s",pname[i].Data()),
1895 Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1896 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1897 fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1898 fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1899 outputContainer->Add(fhMCMassPt[i]) ;
1901 fhMCSelectedMassPt[i] = new TH2F
1902 (Form("hSelectedMassPt_MC%s",pname[i].Data()),
1903 Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1904 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1905 fhMCSelectedMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1906 fhMCSelectedMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1907 outputContainer->Add(fhMCSelectedMassPt[i]) ;
1909 if(fAnaType == kSSCalo)
1911 fhMCMassPtNoOverlap[i] = new TH2F
1912 (Form("hMassPtNoOverlap_MC%s",pname[i].Data()),
1913 Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1914 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1915 fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1916 fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1917 outputContainer->Add(fhMCMassPtNoOverlap[i]) ;
1919 fhMCSelectedMassPtNoOverlap[i] = new TH2F
1920 (Form("hSelectedMassPtNoOverlap_MC%s",pname[i].Data()),
1921 Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1922 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1923 fhMCSelectedMassPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1924 fhMCSelectedMassPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1925 outputContainer->Add(fhMCSelectedMassPtNoOverlap[i]) ;
1928 if( fFillSelectClHisto )
1930 fhMCPtLambda0[i] = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
1931 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptype[i].Data()),
1932 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1933 fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
1934 fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1935 outputContainer->Add(fhMCPtLambda0[i]) ;
1937 fhMCPtLambda1[i] = new TH2F(Form("hELambda1_MC%s",pname[i].Data()),
1938 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{1}^{2}",ptype[i].Data()),
1939 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1940 fhMCPtLambda1[i]->SetYTitle("#lambda_{1}^{2}");
1941 fhMCPtLambda1[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1942 outputContainer->Add(fhMCPtLambda1[i]) ;
1944 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0)
1946 fhMCPtLambda0NoTRD[i] = new TH2F(Form("hELambda0NoTRD_MC%s",pname[i].Data()),
1947 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, NoTRD",ptype[i].Data()),
1948 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1949 fhMCPtLambda0NoTRD[i]->SetYTitle("#lambda_{0}^{2}");
1950 fhMCPtLambda0NoTRD[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1951 outputContainer->Add(fhMCPtLambda0NoTRD[i]) ;
1954 if(!fFillOnlySimpleSSHisto)
1956 fhMCPtDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pname[i].Data()),
1957 Form("Selected pair, cluster from %s : #it{p}_{T} vs dispersion^{2}",ptype[i].Data()),
1958 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1959 fhMCPtDispersion[i]->SetYTitle("#it{D}^{2}");
1960 fhMCPtDispersion[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1961 outputContainer->Add(fhMCPtDispersion[i]) ;
1963 fhMCPtDispEta[i] = new TH2F (Form("hPtDispEta_MC%s",pname[i].Data()),
1964 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()),
1965 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1966 fhMCPtDispEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1967 fhMCPtDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1968 outputContainer->Add(fhMCPtDispEta[i]);
1970 fhMCPtDispPhi[i] = new TH2F (Form("hPtDispPhi_MC%s",pname[i].Data()),
1971 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()),
1972 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1973 fhMCPtDispPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1974 fhMCPtDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1975 outputContainer->Add(fhMCPtDispPhi[i]);
1977 fhMCPtSumEtaPhi[i] = new TH2F (Form("hPtSumEtaPhi_MC%s",pname[i].Data()),
1978 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()),
1979 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1980 fhMCPtSumEtaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1981 fhMCPtSumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
1982 outputContainer->Add(fhMCPtSumEtaPhi[i]);
1984 fhMCPtDispEtaPhiDiff[i] = new TH2F (Form("hPtDispEtaPhiDiff_MC%s",pname[i].Data()),
1985 Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",ptype[i].Data()),
1986 nptbins,ptmin,ptmax,200,-10,10);
1987 fhMCPtDispEtaPhiDiff[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1988 fhMCPtDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1989 outputContainer->Add(fhMCPtDispEtaPhiDiff[i]);
1991 fhMCPtSphericity[i] = new TH2F (Form("hPtSphericity_MC%s",pname[i].Data()),
1992 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()),
1993 nptbins,ptmin,ptmax, 200,-1,1);
1994 fhMCPtSphericity[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1995 fhMCPtSphericity[i]->SetYTitle("#it{s} = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1996 outputContainer->Add(fhMCPtSphericity[i]);
1998 for(Int_t ie = 0; ie < 7; ie++)
2000 fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2001 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]),
2002 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2003 fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2004 fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2005 outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2007 fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pname[i].Data()),
2008 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]),
2009 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2010 fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2011 fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2012 outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2014 fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2015 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]),
2016 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2017 fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2018 fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2019 outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2023 fhMCPtLambda0FracMaxCellCut[i] = new TH2F(Form("hELambda0FracMaxCellCut_MC%s",pname[i].Data()),
2024 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, Max cell fraction of energy < 0.5 ",ptype[i].Data()),
2025 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2026 fhMCPtLambda0FracMaxCellCut[i]->SetYTitle("#lambda_{0}^{2}");
2027 fhMCPtLambda0FracMaxCellCut[i]->SetXTitle("#it{E} (GeV)");
2028 outputContainer->Add(fhMCPtLambda0FracMaxCellCut[i]) ;
2030 fhMCPtFracMaxCell[i] = new TH2F(Form("hEFracMaxCell_MC%s",pname[i].Data()),
2031 Form("Selected pair, cluster from %s : #it{p}_{T} vs Max cell fraction of energy",ptype[i].Data()),
2032 nptbins,ptmin,ptmax,100,0,1);
2033 fhMCPtFracMaxCell[i]->SetYTitle("#it{Fraction}");
2034 fhMCPtFracMaxCell[i]->SetXTitle("#it{E} (GeV)");
2035 outputContainer->Add(fhMCPtFracMaxCell[i]) ;
2039 }// MC particle loop
2042 if(fAnaType==kSSCalo)
2044 fhAsymmetry = new TH2F ("hAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2045 nptbins,ptmin,ptmax, 200, -1,1);
2046 fhAsymmetry->SetXTitle("#it{E} (GeV)");
2047 fhAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2048 outputContainer->Add(fhAsymmetry);
2050 fhSelectedAsymmetry = new TH2F ("hSelectedAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2051 nptbins,ptmin,ptmax, 200, -1,1);
2052 fhSelectedAsymmetry->SetXTitle("#it{E} (GeV)");
2053 fhSelectedAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2054 outputContainer->Add(fhSelectedAsymmetry);
2057 ("hSplitE","Selected #pi^{0} (#eta) pairs energy sum of split sub-clusters",nptbins,ptmin,ptmax);
2058 fhSplitE->SetYTitle("counts");
2059 fhSplitE->SetXTitle("#it{E} (GeV)");
2060 outputContainer->Add(fhSplitE) ;
2062 fhSplitPt = new TH1F
2063 ("hSplitPt","Selected #pi^{0} (#eta) pairs #it{p}_{T} sum of split sub-clusters",nptbins,ptmin,ptmax);
2064 fhSplitPt->SetYTitle("counts");
2065 fhSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2066 outputContainer->Add(fhSplitPt) ;
2069 fhSplitPtPhi = new TH2F
2070 ("hSplitPtPhi","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2071 fhSplitPtPhi->SetYTitle("#phi (rad)");
2072 fhSplitPtPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2073 outputContainer->Add(fhSplitPtPhi) ;
2075 fhSplitPtEta = new TH2F
2076 ("hSplitPtEta","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
2077 fhSplitPtEta->SetYTitle("#eta");
2078 fhSplitPtEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2079 outputContainer->Add(fhSplitPtEta) ;
2082 fhNLocMaxSplitPt = new TH2F("hNLocMaxSplitPt","Number of local maxima in cluster",
2083 nptbins,ptmin,ptmax,20,0,20);
2084 fhNLocMaxSplitPt ->SetYTitle("#it{NLM}");
2085 fhNLocMaxSplitPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2086 outputContainer->Add(fhNLocMaxSplitPt) ;
2089 fhMassSplitPt = new TH2F
2090 ("hMassSplitPt","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2091 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2092 fhMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2093 fhMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2094 outputContainer->Add(fhMassSplitPt) ;
2096 fhSelectedMassSplitPt = new TH2F
2097 ("hSelectedMassSplitPt","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2098 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2099 fhSelectedMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2100 fhSelectedMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2101 outputContainer->Add(fhSelectedMassSplitPt) ;
2105 fhMassSplitPtNoOverlap = new TH2F
2106 ("hMassSplitPtNoOverlap","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2107 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2108 fhMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2109 fhMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2110 outputContainer->Add(fhMassSplitPtNoOverlap) ;
2112 fhSelectedMassSplitPtNoOverlap = new TH2F
2113 ("hSelectedMassSplitPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2114 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2115 fhSelectedMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2116 fhSelectedMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2117 outputContainer->Add(fhSelectedMassSplitPtNoOverlap) ;
2120 fhMCPi0PtRecoPtPrim = new TH2F
2121 ("hMCPi0PtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2122 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2123 fhMCPi0PtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2124 fhMCPi0PtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2125 outputContainer->Add(fhMCPi0PtRecoPtPrim ) ;
2127 fhMCPi0PtRecoPtPrimNoOverlap = new TH2F
2128 ("hMCPi0PtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2129 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2130 fhMCPi0PtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2131 fhMCPi0PtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2132 outputContainer->Add(fhMCPi0PtRecoPtPrimNoOverlap ) ;
2134 fhMCPi0SelectedPtRecoPtPrim = new TH2F
2135 ("hMCPi0SelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2136 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2137 fhMCPi0SelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2138 fhMCPi0SelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2139 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrim ) ;
2141 fhMCPi0SelectedPtRecoPtPrimNoOverlap = new TH2F
2142 ("hMCPi0SelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2143 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2144 fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2145 fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2146 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimNoOverlap ) ;
2149 fhMCPi0SplitPtRecoPtPrim = new TH2F
2150 ("hMCPi0SplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2151 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2152 fhMCPi0SplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2153 fhMCPi0SplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2154 outputContainer->Add(fhMCPi0SplitPtRecoPtPrim ) ;
2156 fhMCPi0SplitPtRecoPtPrimNoOverlap = new TH2F
2157 ("hMCPi0SplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2158 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2159 fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2160 fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2161 outputContainer->Add(fhMCPi0SplitPtRecoPtPrimNoOverlap ) ;
2163 fhMCPi0SelectedSplitPtRecoPtPrim = new TH2F
2164 ("hMCPi0SelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2165 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2166 fhMCPi0SelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2167 fhMCPi0SelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2168 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrim ) ;
2170 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap = new TH2F
2171 ("hMCPi0SelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2172 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2173 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2174 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2175 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ) ;
2177 fhMCEtaPtRecoPtPrim = new TH2F
2178 ("hMCEtaPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2179 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2180 fhMCEtaPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2181 fhMCEtaPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2182 outputContainer->Add(fhMCEtaPtRecoPtPrim ) ;
2184 fhMCEtaPtRecoPtPrimNoOverlap = new TH2F
2185 ("hMCEtaPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2186 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2187 fhMCEtaPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2188 fhMCEtaPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2189 outputContainer->Add(fhMCEtaPtRecoPtPrimNoOverlap ) ;
2191 fhMCEtaSelectedPtRecoPtPrim = new TH2F
2192 ("hMCEtaSelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2193 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2194 fhMCEtaSelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2195 fhMCEtaSelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2196 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrim ) ;
2198 fhMCEtaSelectedPtRecoPtPrimNoOverlap = new TH2F
2199 ("hMCEtaSelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2200 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2201 fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2202 fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2203 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimNoOverlap ) ;
2206 fhMCEtaSplitPtRecoPtPrim = new TH2F
2207 ("hMCEtaSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2208 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2209 fhMCEtaSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2210 fhMCEtaSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2211 outputContainer->Add(fhMCEtaSplitPtRecoPtPrim ) ;
2213 fhMCEtaSplitPtRecoPtPrimNoOverlap = new TH2F
2214 ("hMCEtaSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2215 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2216 fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2217 fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2218 outputContainer->Add(fhMCEtaSplitPtRecoPtPrimNoOverlap ) ;
2220 fhMCEtaSelectedSplitPtRecoPtPrim = new TH2F
2221 ("hMCEtaSelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2222 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2223 fhMCEtaSelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2224 fhMCEtaSelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2225 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrim ) ;
2227 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap = new TH2F
2228 ("hMCEtaSelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2229 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2230 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2231 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2232 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ) ;
2235 for(Int_t inlm = 0; inlm < 3; inlm++)
2237 fhMCPi0PtRecoPtPrimLocMax[inlm] = new TH2F
2238 (Form("hMCPi0PtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2239 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2240 fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2241 fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2242 outputContainer->Add(fhMCPi0PtRecoPtPrimLocMax[inlm] ) ;
2244 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] = new TH2F
2245 (Form("hMCPi0SelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2246 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2247 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2248 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2249 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ) ;
2251 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] = new TH2F
2252 (Form("hMCPi0SplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2253 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2254 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2255 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2256 outputContainer->Add(fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ) ;
2258 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] = new TH2F
2259 (Form("hMCPi0SelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2260 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2261 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2262 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2263 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2265 fhMCEtaPtRecoPtPrimLocMax[inlm] = new TH2F
2266 (Form("hMCEtaPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2267 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2268 fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2269 fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2270 outputContainer->Add(fhMCEtaPtRecoPtPrimLocMax[inlm] ) ;
2272 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] = new TH2F
2273 (Form("hMCEtaSelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2274 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2275 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2276 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2277 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ) ;
2279 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] = new TH2F
2280 (Form("hMCEtaSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2281 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2282 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2283 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2284 outputContainer->Add(fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ) ;
2286 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] = new TH2F
2287 (Form("hMCEtaSelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2288 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2289 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2290 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2291 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2295 for(Int_t i = 0; i < fgkNmcTypes; i++)
2297 fhMCPtAsymmetry[i] = new TH2F (Form("hEAsymmetry_MC%s",pname[i].Data()),
2298 Form("cluster from %s : #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",ptype[i].Data()),
2299 nptbins,ptmin,ptmax, 200,-1,1);
2300 fhMCPtAsymmetry[i]->SetXTitle("#it{E} (GeV)");
2301 fhMCPtAsymmetry[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2302 outputContainer->Add(fhMCPtAsymmetry[i]);
2304 fhMCSplitE[i] = new TH1F
2305 (Form("hSplitE_MC%s",pname[i].Data()),
2306 Form("cluster from %s, energy sum of split sub-clusters",ptype[i].Data()),
2307 nptbins,ptmin,ptmax);
2308 fhMCSplitE[i]->SetYTitle("counts");
2309 fhMCSplitE[i]->SetXTitle("#it{E} (GeV)");
2310 outputContainer->Add(fhMCSplitE[i]) ;
2312 fhMCSplitPt[i] = new TH1F
2313 (Form("hSplitPt_MC%s",pname[i].Data()),
2314 Form("cluster from %s, #it{p}_{T} sum of split sub-clusters",ptype[i].Data()),
2315 nptbins,ptmin,ptmax);
2316 fhMCSplitPt[i]->SetYTitle("counts");
2317 fhMCSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2318 outputContainer->Add(fhMCSplitPt[i]) ;
2321 fhMCSplitPtPhi[i] = new TH2F
2322 (Form("hSplitPtPhi_MC%s",pname[i].Data()),
2323 Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
2324 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2325 fhMCSplitPtPhi[i]->SetYTitle("#phi");
2326 fhMCSplitPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2327 outputContainer->Add(fhMCSplitPtPhi[i]) ;
2329 fhMCSplitPtEta[i] = new TH2F
2330 (Form("hSplitPtEta_MC%s",pname[i].Data()),
2331 Form("Identified as #pi^{0} (#eta), cluster from %s",
2332 ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
2333 fhMCSplitPtEta[i]->SetYTitle("#eta");
2334 fhMCSplitPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2335 outputContainer->Add(fhMCSplitPtEta[i]) ;
2338 fhMCNLocMaxSplitPt[i] = new TH2F
2339 (Form("hNLocMaxSplitPt_MC%s",pname[i].Data()),
2340 Form("cluster from %s, #it{p}_{T} sum of split sub-clusters, for NLM",ptype[i].Data()),
2341 nptbins,ptmin,ptmax,20,0,20);
2342 fhMCNLocMaxSplitPt[i] ->SetYTitle("#it{NLM}");
2343 fhMCNLocMaxSplitPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2344 outputContainer->Add(fhMCNLocMaxSplitPt[i]) ;
2346 fhMCMassSplitPt[i] = new TH2F
2347 (Form("hMassSplitPt_MC%s",pname[i].Data()),
2348 Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2349 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2350 fhMCMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2351 fhMCMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2352 outputContainer->Add(fhMCMassSplitPt[i]) ;
2354 fhMCSelectedMassSplitPt[i] = new TH2F
2355 (Form("hSelectedMassSplitPt_MC%s",pname[i].Data()),
2356 Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2357 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2358 fhMCSelectedMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2359 fhMCSelectedMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2360 outputContainer->Add(fhMCSelectedMassSplitPt[i]) ;
2362 fhMCMassSplitPtNoOverlap[i] = new TH2F
2363 (Form("hMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2364 Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2365 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2366 fhMCMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2367 fhMCMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2368 outputContainer->Add(fhMCMassSplitPtNoOverlap[i]) ;
2370 fhMCSelectedMassSplitPtNoOverlap[i] = new TH2F
2371 (Form("hSelectedMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2372 Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2373 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2374 fhMCSelectedMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2375 fhMCSelectedMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2376 outputContainer->Add(fhMCSelectedMassSplitPtNoOverlap[i]) ;
2381 if(fAnaType==kSSCalo && fFillSelectClHisto && !fFillOnlySimpleSSHisto )
2383 for(Int_t i = 0; i< 3; i++)
2385 fhPtAsymmetryLocMax[i] = new TH2F(Form("hEAsymmetryLocMax%d",i+1),
2386 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()),
2387 nptbins,ptmin,ptmax,200, -1,1);
2388 fhPtAsymmetryLocMax[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2389 fhPtAsymmetryLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2390 outputContainer->Add(fhPtAsymmetryLocMax[i]) ;
2393 for(Int_t ie = 0; ie < 7; ie++)
2396 fhAsymmetryLambda0[ie] = new TH2F (Form("hAsymmetryLambda0_EBin%d",ie),
2397 Form("#lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2398 ssbins,ssmin,ssmax , 200,-1,1);
2399 fhAsymmetryLambda0[ie]->SetXTitle("#lambda_{0}^{2}");
2400 fhAsymmetryLambda0[ie]->SetYTitle("A = ( E1 - E2 ) / ( E1 + E2 )");
2401 outputContainer->Add(fhAsymmetryLambda0[ie]);
2403 fhAsymmetryDispEta[ie] = new TH2F (Form("hAsymmetryDispEta_EBin%d",ie),
2404 Form("#sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2405 ssbins,ssmin,ssmax , 200,-1,1);
2406 fhAsymmetryDispEta[ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
2407 fhAsymmetryDispEta[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2408 outputContainer->Add(fhAsymmetryDispEta[ie]);
2410 fhAsymmetryDispPhi[ie] = new TH2F (Form("hAsymmetryDispPhi_EBin%d",ie),
2411 Form("#sigma^{2}_{#phi #phi} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2412 ssbins,ssmin,ssmax , 200,-1,1);
2413 fhAsymmetryDispPhi[ie]->SetXTitle("#sigma^{2}_{#phi #phi}");
2414 fhAsymmetryDispPhi[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2415 outputContainer->Add(fhAsymmetryDispPhi[ie]);
2421 for(Int_t i = 0; i < fgkNmcTypes; i++)
2423 for(Int_t ie = 0; ie < 7; ie++)
2425 fhMCAsymmetryLambda0[ie][i] = new TH2F (Form("hMCAsymmetryLambda0_EBin%d_MC%s",ie,pname[i].Data()),
2426 Form("cluster from %s : #lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2427 ssbins,ssmin,ssmax , 200,-1,1);
2428 fhMCAsymmetryLambda0[ie][i]->SetXTitle("#lambda_{0}^{2}");
2429 fhMCAsymmetryLambda0[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2430 outputContainer->Add(fhMCAsymmetryLambda0[ie][i]);
2432 fhMCAsymmetryDispEta[ie][i] = new TH2F (Form("hMCAsymmetryDispEta_EBin%d_MC%s",ie,pname[i].Data()),
2433 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]),
2434 ssbins,ssmin,ssmax , 200,-1,1);
2435 fhMCAsymmetryDispEta[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2436 fhMCAsymmetryDispEta[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2437 outputContainer->Add(fhMCAsymmetryDispEta[ie][i]);
2439 fhMCAsymmetryDispPhi[ie][i] = new TH2F (Form("hMCAsymmetryDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2440 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]),
2441 ssbins,ssmin,ssmax , 200,-1,1);
2442 fhMCAsymmetryDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#phi #phi}");
2443 fhMCAsymmetryDispPhi[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2444 outputContainer->Add(fhMCAsymmetryDispPhi[ie][i]);
2450 if(IsPileUpAnalysisOn())
2453 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2455 for(Int_t i = 0 ; i < 7 ; i++)
2457 fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
2458 Form("Selected #pi^{0} (#eta) #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
2459 fhPtPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2460 outputContainer->Add(fhPtPileUp[i]);
2462 fhPtCellTimePileUp[i] = new TH2F(Form("hPtCellTimePileUp%s",pileUpName[i].Data()),
2463 Form("Pt vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()),
2464 nptbins,ptmin,ptmax,ntimptbins,timemin,timemax);
2465 fhPtCellTimePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2466 fhPtCellTimePileUp[i]->SetYTitle("#it{t}_{cell} (ns)");
2467 outputContainer->Add(fhPtCellTimePileUp[i]);
2469 fhPtTimeDiffPileUp[i] = new TH2F(Form("hPtTimeDiffPileUp%s",pileUpName[i].Data()),
2470 Form("Pt vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2471 nptbins,ptmin,ptmax,400,-200,200);
2472 fhPtTimeDiffPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2473 fhPtTimeDiffPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
2474 outputContainer->Add(fhPtTimeDiffPileUp[i]);
2478 fhTimePtNoCut = new TH2F ("hTimePt_NoCut","#it{t} of cluster vs #it{E} of clusters, no cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2479 fhTimePtNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2480 fhTimePtNoCut->SetYTitle("#it{t} (ns)");
2481 outputContainer->Add(fhTimePtNoCut);
2483 fhTimePtSPD = new TH2F ("hTimePt_SPD","#it{t} of cluster vs #it{E} of clusters, SPD cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2484 fhTimePtSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2485 fhTimePtSPD->SetYTitle("#it{t} (ns)");
2486 outputContainer->Add(fhTimePtSPD);
2488 fhTimePtSPDMulti = new TH2F ("hTimePt_SPDMulti","time of cluster vs #it{E} of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2489 fhTimePtSPDMulti->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2490 fhTimePtSPDMulti->SetYTitle("#it{t} (ns)");
2491 outputContainer->Add(fhTimePtSPDMulti);
2493 fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","#it{t} of cluster vs #it{N} pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2494 fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
2495 fhTimeNPileUpVertSPD->SetXTitle("#it{t} (ns)");
2496 outputContainer->Add(fhTimeNPileUpVertSPD);
2498 fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","#it{t} of cluster vs #it{N} pile-up Tracks vertex", ntimptbins,timemin,timemax, 50,0,50 );
2499 fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
2500 fhTimeNPileUpVertTrack->SetXTitle("#it{t} (ns)");
2501 outputContainer->Add(fhTimeNPileUpVertTrack);
2503 fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","#it{t} of cluster vs #it{N} constributors to pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2504 fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
2505 fhTimeNPileUpVertContributors->SetXTitle("#it{t} (ns)");
2506 outputContainer->Add(fhTimeNPileUpVertContributors);
2508 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);
2509 fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{Z} (cm) ");
2510 fhTimePileUpMainVertexZDistance->SetXTitle("#it{t} (ns)");
2511 outputContainer->Add(fhTimePileUpMainVertexZDistance);
2513 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);
2514 fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{Z} (cm) ");
2515 fhTimePileUpMainVertexZDiamond->SetXTitle("#it{t} (ns)");
2516 outputContainer->Add(fhTimePileUpMainVertexZDiamond);
2518 fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","#it{p}_{T} of cluster vs #it{N} pile-up SPD vertex",
2519 nptbins,ptmin,ptmax,20,0,20);
2520 fhPtNPileUpSPDVtx->SetYTitle("# vertex ");
2521 fhPtNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2522 outputContainer->Add(fhPtNPileUpSPDVtx);
2524 fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","#it{p}_{T} of cluster vs #it{N} pile-up Tracks vertex",
2525 nptbins,ptmin,ptmax, 20,0,20 );
2526 fhPtNPileUpTrkVtx->SetYTitle("# vertex ");
2527 fhPtNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2528 outputContainer->Add(fhPtNPileUpTrkVtx);
2530 fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","#it{p}_{T} of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
2531 nptbins,ptmin,ptmax,20,0,20);
2532 fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
2533 fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2534 outputContainer->Add(fhPtNPileUpSPDVtxTimeCut);
2536 fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","#it{p}_{T} of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
2537 nptbins,ptmin,ptmax, 20,0,20 );
2538 fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
2539 fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2540 outputContainer->Add(fhPtNPileUpTrkVtxTimeCut);
2542 fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","#it{p}_{T} of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
2543 nptbins,ptmin,ptmax,20,0,20);
2544 fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
2545 fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2546 outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2);
2548 fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","#it{p}_{T} of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
2549 nptbins,ptmin,ptmax, 20,0,20 );
2550 fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
2551 fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2552 outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2);
2556 //Keep neutral meson selection histograms if requiered
2557 //Setting done in AliNeutralMesonSelection
2559 if(fAnaType!=kSSCalo && GetNeutralMesonSelection())
2561 TList * nmsHistos = GetNeutralMesonSelection()->GetCreateOutputObjects() ;
2563 if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
2564 for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
2569 return outputContainer ;
2573 //_____________________________________________
2574 Int_t AliAnaPi0EbE::GetMCIndex(const Int_t tag)
2576 // Assign mc index depending on MC bit set
2578 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
2582 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
2586 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) ||
2587 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) ||
2588 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
2592 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2593 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) )
2595 return kmcPi0Decay ;
2596 }//decay photon from pi0
2597 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2598 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) )
2600 return kmcEtaDecay ;
2601 }//decay photon from eta
2602 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2603 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) )
2605 return kmcOtherDecay ;
2606 }//decay photon from other than eta or pi0
2607 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2609 return kmcElectron ;
2618 //__________________________________________________________________
2619 void AliAnaPi0EbE::HasPairSameMCMother(AliAODPWG4Particle * photon1,
2620 AliAODPWG4Particle * photon2,
2621 Int_t & label, Int_t & tag)
2623 // Check the labels of pair in case mother was same pi0 or eta
2624 // Set the new AOD accordingly
2626 Int_t label1 = photon1->GetLabel();
2627 Int_t label2 = photon2->GetLabel();
2629 if(label1 < 0 || label2 < 0 || label1 == label2) return ;
2631 //Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader());
2632 //Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader());
2633 Int_t tag1 = photon1->GetTag();
2634 Int_t tag2 = photon2->GetTag();
2636 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2);
2637 if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) &&
2638 GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay) ) ||
2639 (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) &&
2640 GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCEtaDecay) )
2643 Int_t pdg1 = -1;//, pdg2 = -1;
2644 Int_t ndaugh1 = -1, ndaugh2 = -1;
2645 //Check if pi0/eta mother is the same
2646 if(GetReader()->ReadStack())
2650 TParticle * mother1 = GetMCStack()->Particle(label1);//photon in kine tree
2651 label1 = mother1->GetFirstMother();
2652 mother1 = GetMCStack()->Particle(label1);//pi0
2653 pdg1=mother1->GetPdgCode();
2654 ndaugh1 = mother1->GetNDaughters();
2658 TParticle * mother2 = GetMCStack()->Particle(label2);//photon in kine tree
2659 label2 = mother2->GetFirstMother();
2660 mother2 = GetMCStack()->Particle(label2);//pi0
2661 //pdg2=mother2->GetPdgCode();
2662 ndaugh2 = mother2->GetNDaughters();
2665 else if(GetReader()->ReadAODMCParticles())
2666 {//&& (input > -1)){
2669 AliAODMCParticle * mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label1);//photon in kine tree
2670 label1 = mother1->GetMother();
2671 mother1 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label1);//pi0
2672 pdg1=mother1->GetPdgCode();
2673 ndaugh1 = mother1->GetNDaughters();
2677 AliAODMCParticle * mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label2);//photon in kine tree
2678 label2 = mother2->GetMother();
2679 mother2 = (AliAODMCParticle *) (GetReader()->GetAODMCParticles())->At(label2);//pi0
2680 //pdg2=mother2->GetPdgCode();
2681 ndaugh2 = mother2->GetNDaughters();
2685 //printf("mother1 %d, mother2 %d\n",label1,label2);
2686 if( label1 == label2 && label1>=0 && ndaugh1==ndaugh2 && ndaugh1==2)
2690 TLorentzVector mom1 = *(photon1->Momentum());
2691 TLorentzVector mom2 = *(photon2->Momentum());
2693 Double_t angle = mom2.Angle(mom1.Vect());
2694 Double_t mass = (mom1+mom2).M();
2695 Double_t epair = (mom1+mom2).E();
2699 //printf("Real pi0 pair: pt %f, mass %f\n",(mom1+mom2).Pt(),mass);
2700 fhMassPairMCPi0 ->Fill(epair,mass);
2701 fhAnglePairMCPi0->Fill(epair,angle);
2702 GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCPi0);
2703 // printf(" Lab1 %d (%d), lab2 %d (%d), pdg1 %d, pdg2 %d, Is In calo %d, %d, Is lost %d, %d\n",
2704 // label1,photon1->GetLabel(),label2,photon2->GetLabel(), pdg1, pdg2,
2705 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2706 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2707 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost),
2708 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost));
2712 //printf("Real eta pair\n");
2713 fhMassPairMCEta ->Fill(epair,mass);
2714 fhAnglePairMCEta->Fill(epair,angle);
2715 GetMCAnalysisUtils()->SetTagBit(tag,AliMCAnalysisUtils::kMCEta);
2719 } // both from eta or pi0 decay
2723 //____________________________________________________________________________
2724 void AliAnaPi0EbE::Init()
2728 if(GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD()){
2729 printf("AliAnaPi0EbE::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
2732 else if(GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD()){
2733 printf("AliAnaPi0EbE::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
2739 //____________________________________________________________________________
2740 void AliAnaPi0EbE::InitParameters()
2742 //Initialize the parameters of the analysis.
2743 AddToHistogramsName("AnaPi0EbE_");
2745 fInputAODGammaConvName = "PhotonsCTS" ;
2746 fAnaType = kIMCalo ;
2751 fNLMECutMin[0] = 10.;
2752 fNLMECutMin[1] = 6. ;
2753 fNLMECutMin[2] = 6. ;
2756 //__________________________________________________________________
2757 void AliAnaPi0EbE::MakeAnalysisFillAOD()
2759 //Do analysis and fill aods
2761 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeAnalysisFillAOD() - Start analysis type %d\n",fAnaType);
2766 MakeInvMassInCalorimeter();
2770 MakeShowerShapeIdentification();
2774 MakeInvMassInCalorimeterAndCTS();
2779 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeAnalysisFillAOD() - End\n");
2783 //____________________________________________
2784 void AliAnaPi0EbE::MakeInvMassInCalorimeter()
2786 //Do analysis and fill aods
2787 //Search for the photon decay in calorimeters
2788 //Read photon list from AOD, produced in class AliAnaPhoton
2789 //Check if 2 photons have the mass of the pi0.
2791 TLorentzVector mom1;
2792 TLorentzVector mom2;
2793 TLorentzVector mom ;
2795 if(!GetInputAODBranch())
2797 AliFatal(Form("No input calo photons in AOD with name branch < %s >, STOP \n",GetInputAODName().Data()));
2801 //Get shower shape information of clusters
2802 TObjArray *clusters = 0;
2803 if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters();
2804 else if(GetCalorimeter()==kPHOS) clusters = GetPHOSClusters() ;
2806 Int_t nphoton = GetInputAODBranch()->GetEntriesFast();
2807 for(Int_t iphoton = 0; iphoton < nphoton-1; iphoton++)
2809 AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
2811 // Vertex cut in case of mixed events
2812 Int_t evtIndex1 = 0 ;
2815 evtIndex1 = GetMixedEvent()->EventIndexForCaloCluster(photon1->GetCaloLabel(0)) ;
2816 if(TMath::Abs(GetVertex(evtIndex1)[2]) > GetZvertexCut()) continue ; //vertex cut
2819 mom1 = *(photon1->Momentum());
2821 //Get original cluster, to recover some information
2823 AliVCluster *cluster1 = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
2827 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - First cluster not found\n");
2831 for(Int_t jphoton = iphoton+1; jphoton < nphoton; jphoton++)
2833 AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(jphoton));
2835 // Do analysis only when one of the decays is isolated
2836 // Run AliAnaParticleIsolation before
2837 if(fSelectIsolatedDecay)
2839 Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
2840 Bool_t isolated2 = ((AliAODPWG4ParticleCorrelation*) photon2)->IsIsolated();
2841 if(!isolated1 && !isolated2) continue;
2844 // Vertex cut in case of mixed events
2845 Int_t evtIndex2 = 0 ;
2848 evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
2850 if(evtIndex1 == evtIndex2)
2853 if(TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut()) continue ; //vertex cut
2856 mom2 = *(photon2->Momentum());
2858 //Get original cluster, to recover some information
2860 AliVCluster *cluster2 = FindCluster(clusters,photon2->GetCaloLabel(0),iclus2,iclus+1);
2861 // start new loop from iclus1+1 to gain some time
2865 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Second cluster not found\n");
2869 Float_t e1 = photon1->E();
2870 Float_t e2 = photon2->E();
2872 //Select clusters with good time window difference
2873 Float_t tof1 = cluster1->GetTOF()*1e9;;
2874 Float_t tof2 = cluster2->GetTOF()*1e9;;
2875 Double_t t12diff = tof1-tof2;
2876 fhEPairDiffTime->Fill(e1+e2, t12diff);
2877 if(TMath::Abs(t12diff) > GetPairTimeCut()) continue;
2879 //Play with the MC stack if available
2880 Int_t mcIndex = kmcHadron;
2885 HasPairSameMCMother(photon1, photon2, label, tag) ;
2886 mcIndex = GetMCIndex(tag);
2889 // Check the invariant mass for different selection on the local maxima
2890 Int_t nMaxima1 = photon1->GetNLM();
2891 Int_t nMaxima2 = photon2->GetNLM();
2895 Double_t mass = mom.M();
2896 Double_t epair = mom.E();
2897 Float_t ptpair = mom.Pt();
2899 if(fFillAllNLMHistograms)
2901 if(nMaxima1==nMaxima2)
2903 if (nMaxima1==1) fhMassPairLocMax[0]->Fill(epair,mass);
2904 else if(nMaxima1==2) fhMassPairLocMax[1]->Fill(epair,mass);
2905 else fhMassPairLocMax[2]->Fill(epair,mass);
2907 else if(nMaxima1==1 || nMaxima2==1)
2909 if (nMaxima1==2 || nMaxima2==2) fhMassPairLocMax[3]->Fill(epair,mass);
2910 else fhMassPairLocMax[4]->Fill(epair,mass);
2913 fhMassPairLocMax[5]->Fill(epair,mass);
2915 // combinations with SS axis cut and NLM cut
2916 if(nMaxima1 == 1 && cluster2->GetM02() > 0.3) fhMassPairLocMax[6]->Fill(epair,mass);
2917 if(nMaxima2 == 1 && cluster1->GetM02() > 0.3) fhMassPairLocMax[6]->Fill(epair,mass);
2918 if(nMaxima1 > 1 && cluster2->GetM02() < 0.3 && cluster2->GetM02()> 0.1 ) fhMassPairLocMax[7]->Fill(epair,mass);
2919 if(nMaxima2 > 1 && cluster1->GetM02() < 0.3 && cluster1->GetM02()> 0.1 ) fhMassPairLocMax[7]->Fill(epair,mass);
2923 // Skip events with too few or too many NLM
2925 if((nMaxima1 < fNLMCutMin || nMaxima1 > fNLMCutMax) || (nMaxima2 < fNLMCutMin || nMaxima2 > fNLMCutMax)) continue ;
2927 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - NLM of out of range: cluster1 %d, cluster2 %d \n",nMaxima1, nMaxima2);
2930 fhMass ->Fill( epair,mass);
2931 fhMassPt->Fill(ptpair,mass);
2932 if(IsDataMC() && mcIndex < 2) fhMCMassPt[mcIndex]->Fill(ptpair,mass);
2935 // Select good pair (good phi, pt cuts, aperture and invariant mass)
2937 if(!GetNeutralMesonSelection()->SelectPair(mom1, mom2,GetCalorimeter())) continue;
2940 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Selected gamma pair: pt %f, phi %f, eta%f \n",
2941 mom.Pt(), mom.Phi()*TMath::RadToDeg(), mom.Eta());
2944 // Tag both photons as decay if not done before
2945 // set the corresponding bit for pi0 or eta or "side" case
2947 Int_t bit1 = photon1->DecayTag();
2948 if( bit1 < 0 ) bit1 = 0 ;
2949 if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
2951 if( GetDebug() > 1 )
2952 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter - pT1 %2.2f; bit requested %d; decay bit1: In %d, ",
2953 mom1.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit1);
2955 GetNeutralMesonSelection()->SetDecayBit(bit1);
2956 photon1->SetDecayTag(bit1);
2958 if( GetDebug() > 1 )
2959 printf("Out %d \n", bit1);
2961 fhPtDecay->Fill(photon1->Pt());
2963 //Fill some histograms about shower shape
2964 if(fFillSelectClHisto && cluster1 && GetReader()->GetDataType()!=AliCaloTrackReader::kMC)
2965 FillSelectedClusterHistograms(cluster1, mom1.Pt(), nMaxima1, photon1->GetTag());
2969 Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
2970 fhMCPtDecay[mcIndex1]->Fill(photon1->Pt());
2971 if(GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost))
2973 if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt());
2974 else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt());
2979 Int_t bit2 = photon2->DecayTag();
2980 if( bit2 < 0 ) bit2 = 0 ;
2981 if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
2983 if( GetDebug() > 1 )
2984 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter - pT2 %2.2f; bit requested %d; decay bit2: In %d, ",
2985 mom2.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit2);
2987 GetNeutralMesonSelection()->SetDecayBit(bit2);
2988 photon2->SetDecayTag(bit2);
2990 if( GetDebug() > 1 )
2991 printf("Out %d \n", bit2);
2993 fhPtDecay->Fill(photon2->Pt());
2995 //Fill some histograms about shower shape
2996 if(fFillSelectClHisto && cluster2 && GetReader()->GetDataType()!=AliCaloTrackReader::kMC)
2997 FillSelectedClusterHistograms(cluster2, mom2.Pt(), nMaxima2, photon2->GetTag());
3001 Int_t mcIndex2 = GetMCIndex(photon2->GetTag());
3002 fhMCPtDecay[mcIndex2]->Fill(photon2->Pt());
3003 if(GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost))
3005 if ( mcIndex2 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon2->Pt());
3006 else if( mcIndex2 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon2->Pt());
3011 //Mass of selected pairs
3012 fhSelectedMass ->Fill( epair,mass);
3013 fhSelectedMassPt->Fill(ptpair,mass);
3014 if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair,mass);
3016 // Fill histograms to undertand pile-up before other cuts applied
3017 // Remember to relax time cuts in the reader
3018 FillPileUpHistograms(ptpair,((cluster1->GetTOF()+cluster2->GetTOF())*1e9)/2,cluster1);
3020 //Create AOD for analysis
3021 AliAODPWG4Particle pi0 = AliAODPWG4Particle(mom);
3023 if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3024 else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3027 printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Particle type declared in AliNeutralMeson not correct, do not add \n");
3030 pi0.SetDetectorTag(photon1->GetDetectorTag());
3033 pi0.SetLabel(label);
3036 //Set the indeces of the original caloclusters
3037 pi0.SetCaloLabel(photon1->GetCaloLabel(0), photon2->GetCaloLabel(0));
3038 //pi0.SetInputFileIndex(input);
3040 AddAODParticle(pi0);
3046 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - End fill AODs \n");
3050 //__________________________________________________
3051 void AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS()
3053 //Do analysis and fill aods
3054 //Search for the photon decay in calorimeters
3055 //Read photon list from AOD, produced in class AliAnaPhoton and AliGammaConversion
3056 //Check if 2 photons have the mass of the pi0.
3058 TLorentzVector mom1;
3059 TLorentzVector mom2;
3060 TLorentzVector mom ;
3062 // Check calorimeter input
3063 if(!GetInputAODBranch())
3065 printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - No input calo photons in AOD branch with name < %s > , STOP\n",GetInputAODName().Data());
3069 // Get the array with conversion photons
3070 TClonesArray * inputAODGammaConv = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaConvName);
3071 if(!inputAODGammaConv)
3073 inputAODGammaConv = (TClonesArray *) GetReader()->GetInputEvent()->FindListObject(fInputAODGammaConvName);
3075 if(!inputAODGammaConv)
3077 printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - No input gamma conversions in AOD branch with name < %s >\n",fInputAODGammaConvName.Data());
3083 //Get shower shape information of clusters
3084 TObjArray *clusters = 0;
3085 if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters();
3086 else if(GetCalorimeter()==kPHOS) clusters = GetPHOSClusters() ;
3088 Int_t nCTS = inputAODGammaConv->GetEntriesFast();
3089 Int_t nCalo = GetInputAODBranch()->GetEntriesFast();
3090 if(nCTS<=0 || nCalo <=0)
3092 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - nCalo %d, nCTS %d, cannot loop\n",nCalo,nCTS);
3097 printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - Number of conversion photons %d\n",nCTS);
3099 // Do the loop, first calo, second CTS
3100 for(Int_t iphoton = 0; iphoton < GetInputAODBranch()->GetEntriesFast(); iphoton++)
3102 AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
3103 mom1 = *(photon1->Momentum());
3105 // Do analysis only when one of the decays is isolated
3106 // Run AliAnaParticleIsolation before
3107 if(fSelectIsolatedDecay)
3109 Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
3110 if(!isolated1) continue;
3113 //Get original cluster, to recover some information
3115 AliVCluster *cluster = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
3117 for(Int_t jphoton = 0; jphoton < nCTS; jphoton++)
3119 AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (inputAODGammaConv->At(jphoton));
3124 evtIndex = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
3125 if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3128 mom2 = *(photon2->Momentum());
3132 Double_t mass = mom.M();
3133 Double_t epair = mom.E();
3134 Float_t ptpair = mom.Pt();
3136 Int_t nMaxima = photon1->GetNLM();
3137 if(fFillAllNLMHistograms)
3139 if (nMaxima==1) fhMassPairLocMax[0]->Fill(epair,mass);
3140 else if(nMaxima==2) fhMassPairLocMax[1]->Fill(epair,mass);
3141 else fhMassPairLocMax[2]->Fill(epair,mass);
3144 if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) continue ;
3145 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - NLM %d of out of range \n",nMaxima);
3147 //Play with the MC stack if available
3148 Int_t mcIndex = kmcHadron;
3153 Int_t label2 = photon2->GetLabel();
3154 if(label2 >= 0 )photon2->SetTag(GetMCAnalysisUtils()->CheckOrigin(label2, GetReader(),"CTS"));
3156 HasPairSameMCMother(photon1, photon2, label, tag) ;
3157 mcIndex = GetMCIndex(tag);
3160 //Mass of selected pairs
3161 fhMass ->Fill( epair,mass);
3162 fhMassPt->Fill(ptpair,mass);
3163 if(IsDataMC() && mcIndex < 2 ) fhMCMassPt[mcIndex]->Fill(ptpair,mass);
3166 // Select good pair (good phi, pt cuts, aperture and invariant mass)
3168 if(!GetNeutralMesonSelection()->SelectPair(mom1, mom2,GetCalorimeter())) continue ;
3170 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - Selected gamma pair: pt %f, phi %f, eta%f\n",
3171 mom.Pt(), mom.Phi()*TMath::RadToDeg(), mom.Eta());
3174 // Tag both photons as decay if not done before
3175 // set the corresponding bit for pi0 or eta or "side" case
3177 Int_t bit1 = photon1->DecayTag();
3178 if( bit1 < 0 ) bit1 = 0 ;
3179 if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3181 GetNeutralMesonSelection()->SetDecayBit(bit1);
3182 photon1->SetDecayTag(bit1);
3184 fhPtDecay->Fill(photon1->Pt());
3186 //Fill some histograms about shower shape
3187 if(fFillSelectClHisto && cluster && GetReader()->GetDataType()!=AliCaloTrackReader::kMC)
3188 FillSelectedClusterHistograms(cluster, mom1.Pt(), nMaxima, photon1->GetTag());
3192 Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3193 fhMCPtDecay[mcIndex1]->Fill(photon1->Pt());
3194 if(GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost))
3196 if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt());
3197 else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt());
3202 Int_t bit2 = photon2->DecayTag();
3203 if( bit2 < 0 ) bit2 = 0 ;
3204 if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3206 GetNeutralMesonSelection()->SetDecayBit(bit2);
3207 photon2->SetDecayTag(bit2);
3210 //Mass of selected pairs
3211 fhSelectedMass ->Fill( epair,mass);
3212 fhSelectedMassPt->Fill(ptpair,mass);
3213 if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair,mass);
3215 // Fill histograms to undertand pile-up before other cuts applied
3216 // Remember to relax time cuts in the reader
3217 if(cluster) FillPileUpHistograms(mom.Pt(),cluster->GetTOF()*1e9,cluster);
3219 //Create AOD for analysis
3221 AliAODPWG4Particle pi0 = AliAODPWG4Particle(mom);
3223 if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3224 else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3227 printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - Particle type declared in AliNeutralMeson not correct, do not add \n");
3230 pi0.SetDetectorTag(photon1->GetDetectorTag());
3233 pi0.SetLabel(label);
3236 //Set the indeces of the original tracks or caloclusters
3237 pi0.SetCaloLabel (photon1->GetCaloLabel(0) , -1);
3238 pi0.SetTrackLabel(photon2->GetTrackLabel(0), photon2->GetTrackLabel(1));
3239 //pi0.SetInputFileIndex(input);
3241 AddAODParticle(pi0);
3247 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS() - End fill AODs \n");
3251 //_________________________________________________
3252 void AliAnaPi0EbE::MakeShowerShapeIdentification()
3254 //Search for pi0 in GetCalorimeter() with shower shape analysis
3256 TObjArray * pl = 0x0;
3257 AliVCaloCells * cells = 0x0;
3258 //Select the Calorimeter of the photon
3259 if (GetCalorimeter() == kEMCAL )
3261 pl = GetEMCALClusters();
3262 cells = GetEMCALCells();
3264 else if (GetCalorimeter() == kPHOS)
3266 AliFatal("kSSCalo case not implememted for PHOS");
3267 return; // for coverity
3269 //pl = GetPHOSClusters();
3270 //cells = GetPHOSCells();
3275 Info("MakeShowerShapeIdentification","TObjArray with %s clusters is NULL!\n",GetCalorimeterString().Data());
3279 TLorentzVector mom ;
3280 for(Int_t icalo = 0; icalo < pl->GetEntriesFast(); icalo++)
3282 AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
3284 Int_t evtIndex = 0 ;
3285 if (GetMixedEvent())
3287 evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
3288 if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3291 //Get Momentum vector,
3292 Double_t vertex[]={0,0,0};
3293 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
3295 calo->GetMomentum(mom,GetVertex(evtIndex)) ;
3296 }//Assume that come from vertex in straight line
3299 calo->GetMomentum(mom,vertex) ;
3302 //If too small or big pt, skip it
3303 if(mom.E() < GetMinEnergy() || mom.E() > GetMaxEnergy() ) continue ;
3305 //Check acceptance selection
3306 if(IsFiducialCutOn())
3308 Bool_t in = GetFiducialCut()->IsInFiducialCut(mom.Eta(),mom.Phi(),GetCalorimeter()) ;
3309 if(! in ) continue ;
3313 printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: Min pt cut and fiducial cut passed: pt %3.2f, phi %2.2f, eta %1.2f\n",mom.Pt(),mom.Phi(),mom.Eta());
3315 //Play with the MC stack if available
3316 //Check origin of the candidates
3320 tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
3321 //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
3322 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Origin of candidate %d\n",tag);
3325 //Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
3327 //Check Distance to Bad channel, set bit.
3328 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
3329 if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
3330 if(distBad < fMinDist){ //In bad channel (PHOS cristal size 2.2x2.2 cm)
3331 //FillRejectedClusterHistograms(mom,tag,nMaxima);
3335 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: Bad channel cut passed %4.2f\n",distBad);
3337 //If too low number of cells, skip it
3338 if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells())
3340 //FillRejectedClusterHistograms(mom,tag,nMaxima);
3345 printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: N cells cut passed %d > %d\n",
3346 calo->GetNCells(), GetCaloPID()->GetClusterSplittingMinNCells());
3348 //.......................................
3349 // TOF cut, BE CAREFUL WITH THIS CUT
3350 Double_t tof = calo->GetTOF()*1e9;
3351 if(tof < fTimeCutMin || tof > fTimeCutMax)
3353 //FillRejectedClusterHistograms(mom,tag,nMaxima);
3358 //PID selection or bit setting
3360 Double_t mass = 0, angle = 0;
3361 Int_t absId1 =-1, absId2 =-1;
3362 Float_t distbad1 =-1, distbad2 =-1;
3363 Bool_t fidcut1 = 0, fidcut2 = 0;
3364 TLorentzVector l1, l2;
3366 Int_t idPartType = GetCaloPID()->GetIdentifiedParticleTypeFromClusterSplitting(calo,cells,GetCaloUtils(),
3367 GetVertex(evtIndex),nMaxima,
3368 mass,angle,l1,l2,absId1,absId2,
3369 distbad1,distbad2,fidcut1,fidcut2) ;
3372 if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - PDG of identified particle %d\n",idPartType);
3374 // Skip events where one of the new clusters (lowest energy) is close to an EMCal border or a bad channel
3375 if( (fCheckSplitDistToBad) &&
3376 (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
3379 Info("MakeShowerShapeIdentification", "Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d \n",
3380 calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2);
3382 //FillRejectedClusterHistograms(mom,tag,nMaxima);
3386 //Skip events with too few or too many NLM
3387 if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3389 //FillRejectedClusterHistograms(mom,tag,nMaxima);
3394 printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - NLM %d accepted \n",nMaxima);
3396 //Skip matched clusters with tracks
3397 if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
3399 FillRejectedClusterHistograms(mom,tag,nMaxima);
3403 Float_t l0 = calo->GetM02();
3404 Float_t e1 = l1.Energy();
3405 Float_t e2 = l2.Energy();
3406 TLorentzVector l12 = l1+l2;
3407 Float_t ptSplit = l12.Pt();
3408 Float_t eSplit = e1+e2;
3410 //mass of all clusters
3411 fhMass ->Fill(mom.E() ,mass);
3412 fhMassPt ->Fill(mom.Pt(),mass);
3413 fhMassSplitPt->Fill(ptSplit ,mass);
3414 fhPtLambda0NoSplitCut->Fill(mom.Pt(),l0);
3416 // Asymmetry of all clusters
3419 if(e1+e2 > 0) asy = (e1-e2) / (e1+e2);
3420 fhAsymmetry->Fill(mom.E(),asy);
3422 // Divide NLM in 3 cases, 1 local maxima, 2 local maxima, more than 2 local maxima
3423 Int_t indexMax = -1;
3424 if (nMaxima==1) indexMax = 0 ;
3425 else if(nMaxima==2) indexMax = 1 ;
3427 fhMassPtLocMax[indexMax]->Fill(mom.Pt(),mass);
3430 Int_t noverlaps = 0;
3434 mcIndex = GetMCIndex(tag);
3437 Int_t mcLabel = calo->GetLabel();
3439 TLorentzVector primary = GetMCAnalysisUtils()->GetMother(mcLabel,GetReader(),ok);
3441 Int_t mesonLabel = -1;
3443 if(mcIndex == kmcPi0 || mcIndex == kmcEta)
3445 if(mcIndex == kmcPi0)
3447 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetReader(),ok,mesonLabel);
3448 if(grandmom.E() > 0 && ok) ptprim = grandmom.Pt();
3452 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetReader(),ok,mesonLabel);
3453 if(grandmom.E() > 0 && ok) ptprim = grandmom.Pt();
3457 const UInt_t nlabels = calo->GetNLabels();
3458 Int_t overpdg[nlabels];
3459 noverlaps = GetMCAnalysisUtils()->GetNOverlaps(calo->GetLabels(), nlabels,tag,mesonLabel,GetReader(),overpdg);
3461 fhMCMassPt [mcIndex]->Fill(mom.Pt(),mass);
3462 fhMCMassSplitPt[mcIndex]->Fill(ptSplit ,mass);
3465 fhMCPi0PtRecoPtPrim ->Fill(mom.Pt(),ptprim);
3466 fhMCPi0SplitPtRecoPtPrim ->Fill(ptSplit ,ptprim);
3467 fhMCPi0PtRecoPtPrimLocMax [indexMax]->Fill(mom.Pt(),ptprim);
3468 fhMCPi0SplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit ,ptprim);
3471 else if(mcIndex==kmcEta)
3473 fhMCEtaPtRecoPtPrim ->Fill(mom.Pt(),ptprim);
3474 fhMCEtaSplitPtRecoPtPrim ->Fill(ptSplit ,ptprim);
3475 fhMCEtaPtRecoPtPrimLocMax [indexMax]->Fill(mom.Pt(),ptprim);
3476 fhMCEtaSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit ,ptprim);
3483 fhMCPi0PtRecoPtPrimNoOverlap ->Fill(mom.Pt(),ptprim);
3484 fhMCPi0SplitPtRecoPtPrimNoOverlap->Fill(ptSplit ,ptprim);
3486 else if(mcIndex==kmcEta)
3488 fhMCEtaPtRecoPtPrimNoOverlap ->Fill(mom.Pt(),ptprim);
3489 fhMCEtaSplitPtRecoPtPrimNoOverlap->Fill(ptSplit ,ptprim);
3492 fhMassNoOverlap ->Fill(mom.E() ,mass);
3493 fhMassPtNoOverlap ->Fill(mom.Pt(),mass);
3494 fhMassSplitPtNoOverlap->Fill(ptSplit ,mass);
3496 fhMCMassPtNoOverlap [mcIndex]->Fill(mom.Pt(),mass);
3497 fhMCMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit ,mass);
3500 fhMCPtAsymmetry[mcIndex]->Fill(mom.Pt(),asy);
3503 // If cluster does not pass pid, not pi0/eta, skip it.
3504 if (GetOutputAODName().Contains("Pi0") && idPartType != AliCaloPID::kPi0)
3506 if(GetDebug() > 1) Info("MakeShowerShapeIdentification","Cluster is not Pi0\n");
3507 FillRejectedClusterHistograms(mom,tag,nMaxima);
3511 else if(GetOutputAODName().Contains("Eta") && idPartType != AliCaloPID::kEta)
3513 if(GetDebug() > 1) Info("MakeShowerShapeIdentification","Cluster is not Eta\n");
3514 FillRejectedClusterHistograms(mom,tag,nMaxima);
3519 Info("MakeShowerShapeIdentification","Pi0/Eta selection cuts passed: pT %3.2f, pdg %d\n",
3520 mom.Pt(), idPartType);
3522 //Mass and asymmetry of selected pairs
3523 fhSelectedAsymmetry ->Fill(mom.E() ,asy );
3524 fhSelectedMass ->Fill(mom.E() ,mass);
3525 fhSelectedMassPt ->Fill(mom.Pt(),mass);
3526 fhSelectedMassSplitPt->Fill(ptSplit ,mass);
3527 if(fFillAllNLMHistograms) fhSelectedMassPtLocMax[indexMax]->Fill(mom.Pt(),mass);
3529 Int_t nSM = GetModuleNumber(calo);
3530 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0 && fFillAllNLMHistograms)
3532 fhSelectedMassPtLocMaxSM [indexMax][nSM]->Fill(mom.Pt(),mass);
3533 fhSelectedLambda0PtLocMaxSM[indexMax][nSM]->Fill(mom.Pt(),l0 );
3540 fhMCPi0SelectedPtRecoPtPrim ->Fill(mom.Pt(),ptprim);
3541 fhMCPi0SelectedSplitPtRecoPtPrim ->Fill(ptSplit ,ptprim);
3542 fhMCPi0SelectedPtRecoPtPrimLocMax [indexMax]->Fill(mom.Pt(),ptprim);
3543 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit ,ptprim);
3545 else if(mcIndex==kmcEta)
3547 fhMCEtaSelectedPtRecoPtPrim ->Fill(mom.Pt(),ptprim);
3548 fhMCEtaSelectedSplitPtRecoPtPrim ->Fill(ptSplit ,ptprim);
3549 fhMCEtaSelectedPtRecoPtPrimLocMax [indexMax]->Fill(mom.Pt(),ptprim);
3550 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit ,ptprim);
3555 fhSelectedMassNoOverlap ->Fill(mom.E() ,mass);
3556 fhSelectedMassPtNoOverlap ->Fill(mom.Pt(),mass);
3557 fhSelectedMassSplitPtNoOverlap->Fill(ptSplit ,mass);
3561 fhMCPi0SelectedPtRecoPtPrimNoOverlap ->Fill(mom.Pt(),ptprim);
3562 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit ,ptprim);
3564 else if(mcIndex==kmcEta)
3566 fhMCEtaSelectedPtRecoPtPrimNoOverlap ->Fill(mom.Pt(),ptprim);
3567 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit ,ptprim);
3572 fhSplitE ->Fill( eSplit);
3573 fhSplitPt ->Fill(ptSplit);
3574 Float_t phi = mom.Phi();
3575 if(phi<0) phi+=TMath::TwoPi();
3576 fhSplitPtPhi ->Fill(ptSplit,phi);
3577 fhSplitPtEta ->Fill(ptSplit,mom.Eta());
3578 fhNLocMaxSplitPt->Fill(ptSplit ,nMaxima);
3580 //Check split-clusters with good time window difference
3581 Double_t tof1 = cells->GetCellTime(absId1);
3582 GetCaloUtils()->RecalibrateCellTime(tof1, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3585 Double_t tof2 = cells->GetCellTime(absId2);
3586 GetCaloUtils()->RecalibrateCellTime(tof2, GetCalorimeter(), absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3589 Double_t t12diff = tof1-tof2;
3590 fhEPairDiffTime->Fill(e1+e2, t12diff);
3594 fhMCSplitE [mcIndex]->Fill( eSplit);
3595 fhMCSplitPt [mcIndex]->Fill(ptSplit);
3596 fhMCSplitPtPhi [mcIndex]->Fill(ptSplit,phi);
3597 fhMCSplitPtEta [mcIndex]->Fill(ptSplit,mom.Eta());
3598 fhMCNLocMaxSplitPt[mcIndex]->Fill(ptSplit ,nMaxima);
3599 fhMCNLocMaxPt [mcIndex]->Fill(mom.Pt(),nMaxima);
3601 fhMCSelectedMassPt [mcIndex]->Fill(mom.Pt(),mass);
3602 fhMCSelectedMassSplitPt[mcIndex]->Fill(ptSplit,mass);
3603 fhMCSelectedMassPtLocMax[mcIndex][indexMax]->Fill(mom.Pt(),mass);
3607 fhMCSelectedMassPtNoOverlap [mcIndex]->Fill(mom.Pt(),mass);
3608 fhMCSelectedMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit,mass);
3612 // Remove clusters with NLM=x depeding on a minimim energy cut
3613 if(nMaxima == 1 && fNLMECutMin[0] > mom.E()) continue;
3614 if(nMaxima == 2 && fNLMECutMin[1] > mom.E()) continue;
3615 if(nMaxima > 2 && fNLMECutMin[2] > mom.E()) continue;
3617 //Fill some histograms about shower shape
3618 if(fFillSelectClHisto && GetReader()->GetDataType()!=AliCaloTrackReader::kMC)
3620 FillSelectedClusterHistograms(calo, mom.Pt(), nMaxima, tag, asy);
3623 // Fill histograms to undertand pile-up before other cuts applied
3624 // Remember to relax time cuts in the reader
3625 Double_t tofcluster = calo->GetTOF()*1e9;
3627 FillPileUpHistograms(mom.Pt(),tofcluster,calo);
3629 if(fFillEMCALBCHistograms && GetCalorimeter()==kEMCAL)
3630 FillEMCALBCHistograms(mom.E(), mom.Eta(), mom.Phi(), tofcluster);
3632 //-----------------------
3633 //Create AOD for analysis
3635 AliAODPWG4Particle aodpi0 = AliAODPWG4Particle(mom);
3636 aodpi0.SetLabel(calo->GetLabel());
3638 //Set the indeces of the original caloclusters
3639 aodpi0.SetCaloLabel(calo->GetID(),-1);
3640 aodpi0.SetDetectorTag(GetCalorimeter());
3642 if (distBad > fMinDist3) aodpi0.SetDistToBad(2) ;
3643 else if(distBad > fMinDist2) aodpi0.SetDistToBad(1) ;
3644 else aodpi0.SetDistToBad(0) ;
3646 // Check if cluster is pi0 via cluster splitting
3647 aodpi0.SetIdentifiedParticleType(idPartType);
3649 // Add number of local maxima to AOD, method name in AOD to be FIXED
3650 aodpi0.SetNLM(nMaxima);
3654 //Add AOD with pi0 object to aod branch
3655 AddAODParticle(aodpi0);
3659 if(GetDebug() > 1) Info("MakeShowerShapeIdentification","End fill AODs \n");
3663 //______________________________________________
3664 void AliAnaPi0EbE::MakeAnalysisFillHistograms()
3666 //Do analysis and fill histograms
3668 if(!GetOutputAODBranch())
3670 AliFatal(Form("No output pi0 in AOD branch with name < %s >,STOP \n",GetOutputAODName().Data()));
3674 //Loop on stored AOD pi0
3675 Int_t naod = GetOutputAODBranch()->GetEntriesFast();
3676 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod);
3678 Float_t cen = GetEventCentrality();
3679 Float_t ep = GetEventPlaneAngle();
3681 for(Int_t iaod = 0; iaod < naod ; iaod++)
3683 AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
3684 Int_t pdg = pi0->GetIdentifiedParticleType();
3686 if( ( pdg != AliCaloPID::kPi0 && pdg != AliCaloPID::kEta ) ) continue;
3688 //Fill pi0 histograms
3689 Float_t ener = pi0->E();
3690 Float_t pt = pi0->Pt();
3691 Float_t phi = pi0->Phi();
3692 if(phi < 0) phi+=TMath::TwoPi();
3693 Float_t eta = pi0->Eta();
3698 fhPtEta ->Fill(pt ,eta);
3699 fhPtPhi ->Fill(pt ,phi);
3700 fhEtaPhi ->Fill(eta ,phi);
3702 if(IsHighMultiplicityAnalysisOn())
3704 fhPtCentrality ->Fill(pt,cen) ;
3705 fhPtEventPlane ->Fill(pt,ep ) ;
3710 Int_t tag = pi0->GetTag();
3711 Int_t label = pi0->GetLabel();
3712 Int_t mcIndex = GetMCIndex(tag);
3714 if(fAnaType!=kSSCalo && mcIndex > 1) continue;
3716 fhMCE [mcIndex] ->Fill(ener);
3717 fhMCPt [mcIndex] ->Fill(pt);
3718 fhMCPtPhi[mcIndex] ->Fill(pt,phi);
3719 fhMCPtEta[mcIndex] ->Fill(pt,eta);
3721 if(IsHighMultiplicityAnalysisOn()) fhMCPtCentrality[mcIndex]->Fill(pt,cen);
3723 if((mcIndex==kmcPi0Decay || mcIndex==kmcEtaDecay ||
3724 mcIndex==kmcPi0 || mcIndex==kmcEta ) &&
3727 Float_t efracMC = 0;
3728 Int_t momlabel = -1;
3731 TLorentzVector mom = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok);
3734 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
3736 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3737 if(grandmom.E() > 0 && ok)
3739 efracMC = grandmom.E()/ener;
3740 fhMCPi0PtGenRecoFraction ->Fill(pt,efracMC);
3743 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
3745 fhMCPi0DecayPt->Fill(pt);
3746 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetReader(),ok,momlabel);
3747 if(grandmom.E() > 0 && ok)
3749 efracMC = mom.E()/grandmom.E();
3750 fhMCPi0DecayPtFraction ->Fill(pt,efracMC);
3753 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
3755 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3756 if(grandmom.E() > 0 && ok)
3758 efracMC = grandmom.E()/ener;
3759 fhMCEtaPtGenRecoFraction ->Fill(pt,efracMC);
3762 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
3764 fhMCEtaDecayPt->Fill(pt);
3765 TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetReader(),ok,momlabel);
3766 if(grandmom.E() > 0 && ok)
3768 efracMC = mom.E()/grandmom.E();
3769 fhMCEtaDecayPtFraction ->Fill(pt,efracMC);
3772 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay))
3774 fhMCOtherDecayPt->Fill(pt);
3779 if( mcIndex==kmcPi0 || mcIndex==kmcEta )
3782 Int_t momindex = -1;
3784 Int_t momstatus = -1;
3786 if(GetReader()->ReadStack())
3788 TParticle* ancestor = GetMCStack()->Particle(label);
3789 momindex = ancestor->GetFirstMother();
3790 if(momindex < 0) return;
3791 TParticle* mother = GetMCStack()->Particle(momindex);
3792 mompdg = TMath::Abs(mother->GetPdgCode());
3793 momstatus = mother->GetStatusCode();
3794 prodR = mother->R();
3798 TClonesArray * mcparticles = GetReader()->GetAODMCParticles();
3799 AliAODMCParticle* ancestor = (AliAODMCParticle *) mcparticles->At(label);
3800 momindex = ancestor->GetMother();
3801 if(momindex < 0) return;
3802 AliAODMCParticle* mother = (AliAODMCParticle *) mcparticles->At(momindex);
3803 mompdg = TMath::Abs(mother->GetPdgCode());
3804 momstatus = mother->GetStatus();
3805 prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv());
3808 if( mcIndex==kmcPi0 )
3810 fhMCPi0ProdVertex->Fill(pt,prodR);
3812 if (momstatus == 21) fhMCPi0PtOrigin->Fill(pt,0.5);//parton
3813 else if(mompdg < 22 ) fhMCPi0PtOrigin->Fill(pt,1.5);//quark
3814 else if(mompdg > 2100 && mompdg < 2210) fhMCPi0PtOrigin->Fill(pt,2.5);// resonances
3815 else if(mompdg == 221) fhMCPi0PtOrigin->Fill(pt,8.5);//eta
3816 else if(mompdg == 331) fhMCPi0PtOrigin->Fill(pt,9.5);//eta prime
3817 else if(mompdg == 213) fhMCPi0PtOrigin->Fill(pt,4.5);//rho
3818 else if(mompdg == 223) fhMCPi0PtOrigin->Fill(pt,5.5);//omega
3819 else if(mompdg >= 310 && mompdg <= 323) fhMCPi0PtOrigin->Fill(pt,6.5);//k0S, k+-,k*
3820 else if(mompdg == 130) fhMCPi0PtOrigin->Fill(pt,6.5);//k0L
3821 else if(momstatus == 11 || momstatus == 12 ) fhMCPi0PtOrigin->Fill(pt,3.5);//resonances
3822 else fhMCPi0PtOrigin->Fill(pt,7.5);//other?
3824 else if (mcIndex==kmcEta )
3826 fhMCEtaProdVertex->Fill(pt,prodR);
3828 if (momstatus == 21) fhMCEtaPtOrigin->Fill(pt,0.5);//parton
3829 else if(mompdg < 22 ) fhMCEtaPtOrigin->Fill(pt,1.5);//quark
3830 else if(mompdg > 2100 && mompdg < 2210) fhMCEtaPtOrigin->Fill(pt,2.5);// resonances
3831 else if(mompdg == 221) fhMCEtaPtOrigin->Fill(pt,8.5);//eta
3832 else if(mompdg == 331) fhMCEtaPtOrigin->Fill(pt,9.5);//eta prime
3833 else if(mompdg == 213) fhMCEtaPtOrigin->Fill(pt,4.5);//rho
3834 else if(mompdg == 223) fhMCEtaPtOrigin->Fill(pt,5.5);//omega
3835 else if(mompdg >= 310 && mompdg <= 323) fhMCEtaPtOrigin->Fill(pt,6.5);//k0S, k+-,k*
3836 else if(mompdg == 130) fhMCEtaPtOrigin->Fill(pt,6.5);//k0L
3837 else if(momstatus == 11 || momstatus == 12 ) fhMCEtaPtOrigin->Fill(pt,3.5);//resonances
3838 else fhMCEtaPtOrigin->Fill(pt,7.5);//other?
3842 }//Histograms with MC
3846 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeAnalysisFillHistograms() - end\n");
3850 //__________________________________________________________________
3851 void AliAnaPi0EbE::Print(const Option_t * opt) const
3853 //Print some relevant parameters set for the analysis
3857 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3858 AliAnaCaloTrackCorrBaseClass::Print("");
3859 printf("Analysis Type = %d \n", fAnaType) ;
3860 if(fAnaType == kSSCalo)
3862 printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
3863 printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
3864 printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
3865 printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);