move the decay bit definition from AliAnaPi0EbE to AliNeutralSelection, define there...
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaPi0EbE.cxx
CommitLineData
477d6cee 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
21a4b1c0 8 * documentation strictly for non-commercial purposes is hereby granted *
477d6cee 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 **************************************************************************/
477d6cee 15
16//_________________________________________________________________________
17// Class for the analysis of high pT pi0 event by event
09273901 18// Pi0/Eta identified by one of the following:
477d6cee 19// -Invariant mass of 2 cluster in calorimeter
20// -Shower shape analysis in calorimeter
21a4b1c0 21// -Invariant mass of one cluster in calorimeter and one photon reconstructed in CTS
477d6cee 22//
23// -- Author: Gustavo Conesa (LNF-INFN) & Raphaelle Ichou (SUBATECH)
24//////////////////////////////////////////////////////////////////////////////
85c4406e 25
26
27// --- ROOT system ---
477d6cee 28#include <TList.h>
29#include <TClonesArray.h>
0c1383b5 30#include <TObjString.h>
477d6cee 31
85c4406e 32// --- Analysis system ---
33#include "AliAnaPi0EbE.h"
477d6cee 34#include "AliCaloTrackReader.h"
35#include "AliIsolationCut.h"
36#include "AliNeutralMesonSelection.h"
37#include "AliCaloPID.h"
38#include "AliMCAnalysisUtils.h"
477d6cee 39#include "AliStack.h"
ff45398a 40#include "AliFiducialCut.h"
477d6cee 41#include "TParticle.h"
0ae57829 42#include "AliVCluster.h"
2ad19c3d 43#include "AliESDEvent.h"
477d6cee 44#include "AliAODEvent.h"
591cc579 45#include "AliAODMCParticle.h"
477d6cee 46
47ClassImp(AliAnaPi0EbE)
34c16486 48
85c4406e 49//____________________________
50AliAnaPi0EbE::AliAnaPi0EbE() :
5df76288 51AliAnaCaloTrackCorrBaseClass(),
a39c9b1b 52fAnaType(kIMCalo), fCalorimeter(""),
3a4c49b7 53fMinDist(0.),fMinDist2(0.), fMinDist3(0.),
54fNLMCutMin(-1), fNLMCutMax(10),
55fTimeCutMin(-10000), fTimeCutMax(10000),
85c4406e 56fRejectTrackMatch(kTRUE),
57fFillPileUpHistograms(0),
3a4c49b7 58fFillWeightHistograms(kFALSE), fFillTMHisto(0),
5df76288 59fFillSelectClHisto(0), fFillOnlySimpleSSHisto(1),
60fFillEMCALBCHistograms(0), fFillHighMultHistograms(0),
61fFillAllNLMHistograms(0),
85c4406e 62fInputAODGammaConvName(""),
9f48b3f0 63fCheckSplitDistToBad(0),
85c4406e 64// Histograms
3a4c49b7 65fhPt(0), fhE(0),
3a4c49b7 66fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
67fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
126b8c62 68fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
69fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
70fhTimeTriggerEMCALBC0UMReMatchBoth(0),
3a4c49b7 71fhPtCentrality(), fhPtEventPlane(0),
72fhPtReject(0), fhEReject(0),
08c09f10 73fhPtEtaReject(0), fhPtPhiReject(0), fhEtaPhiReject(0),
3a4c49b7 74fhMass(0), fhMassPt(0), fhMassSplitPt(0),
08c09f10 75fhSelectedMass(), fhSelectedMassPt(0), fhSelectedMassSplitPt(0),
3a4c49b7 76fhMassNoOverlap(0), fhMassPtNoOverlap(0), fhMassSplitPtNoOverlap(0),
77fhSelectedMassNoOverlap(0), fhSelectedMassPtNoOverlap(0), fhSelectedMassSplitPtNoOverlap(0),
1e90d4df 78fhMCPi0PtRecoPtPrim(0), fhMCEtaPtRecoPtPrim(0),
79fhMCPi0PtRecoPtPrimNoOverlap(0), fhMCEtaPtRecoPtPrimNoOverlap(0),
80fhMCPi0SplitPtRecoPtPrim(0), fhMCEtaSplitPtRecoPtPrim(0),
1253480f 81fhMCPi0SplitPtRecoPtPrimNoOverlap(0), fhMCEtaSplitPtRecoPtPrimNoOverlap(0),
82fhMCPi0SelectedPtRecoPtPrim(0), fhMCEtaSelectedPtRecoPtPrim(0),
83fhMCPi0SelectedPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedPtRecoPtPrimNoOverlap(0),
84fhMCPi0SelectedSplitPtRecoPtPrim(0), fhMCEtaSelectedSplitPtRecoPtPrim(0),
85fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap(0),
3a4c49b7 86fhAsymmetry(0), fhSelectedAsymmetry(0),
87fhSplitE(0), fhSplitPt(0),
88fhSplitPtEta(0), fhSplitPtPhi(0),
85c4406e 89fhNLocMaxSplitPt(0),
5df76288 90fhPtDecay(0),
85c4406e 91// Shower shape histos
452656d1 92fhPtDispersion(0), fhPtLambda0(0), fhPtLambda0NoSplitCut(0),
93fhPtLambda1(0), fhPtLambda0NoTRD(0), fhPtLambda0FracMaxCellCut(0),
08c09f10 94fhPtFracMaxCell(0), fhPtFracMaxCellNoTRD(0),
95fhPtNCells(0), fhPtTime(0), fhEPairDiffTime(0),
96fhPtDispEta(0), fhPtDispPhi(0),
97fhPtSumEta(0), fhPtSumPhi(0), fhPtSumEtaPhi(0),
98fhPtDispEtaPhiDiff(0), fhPtSphericity(0),
85c4406e 99
100// MC histos
3a4c49b7 101fhMCE(), fhMCPt(),
08c09f10 102fhMCPtPhi(), fhMCPtEta(),
3a4c49b7 103fhMCEReject(), fhMCPtReject(),
85c4406e 104fhMCPtCentrality(),
3a4c49b7 105fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
106fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
107fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
85c4406e 108fhMCOtherDecayPt(0),
3a4c49b7 109fhMassPairMCPi0(0), fhMassPairMCEta(0),
110fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
4bbe6213 111fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0),
112fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0),
4bbe6213 113
85c4406e 114// Weight studies
3a4c49b7 115fhECellClusterRatio(0), fhECellClusterLogRatio(0),
116fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
117fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
118fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
119fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
08c09f10 120fhTrackMatchedMCParticlePt(0),
3a4c49b7 121fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
122fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
85c4406e 123// Number of local maxima in cluster
08c09f10 124fhNLocMaxPt(0), fhNLocMaxPtReject(0),
85c4406e 125// PileUp
3a4c49b7 126fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
85c4406e 127fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
128fhTimeNPileUpVertContributors(0),
129fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
130fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
131fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0),
132fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0)
477d6cee 133{
134 //default ctor
135
5df76288 136 for(Int_t i = 0; i < 7; i++)
34c16486 137 {
40d3ce60 138 fhMCE [i] = 0;
3455f821 139 fhMCPt [i] = 0;
08c09f10 140 fhMCPtPhi [i] = 0;
141 fhMCPtEta [i] = 0;
17f5b4b6 142 fhMCPtCentrality [i] = 0;
143
cfdf2b91 144 fhMCSplitE [i] = 0;
145 fhMCSplitPt [i] = 0;
29250849 146 fhMCSplitPtPhi [i] = 0;
147 fhMCSplitPtEta [i] = 0;
3a4c49b7 148
149 fhMCNLocMaxPt [i] = 0;
6e66993c 150 fhMCNLocMaxSplitPt [i] = 0;
3a4c49b7 151 fhMCNLocMaxPtReject[i] = 0;
cfdf2b91 152
5df76288 153 fhMCPtDecay [i] = 0;
08c09f10 154 fhMCPtLambda0 [i] = 0;
155 fhMCPtLambda0NoTRD [i] = 0;
156 fhMCPtLambda0FracMaxCellCut[i]= 0;
157 fhMCPtFracMaxCell [i] = 0;
158 fhMCPtLambda1 [i] = 0;
159 fhMCPtDispersion [i] = 0;
34c16486 160
08c09f10 161 fhMCPtDispEta [i] = 0;
162 fhMCPtDispPhi [i] = 0;
163 fhMCPtSumEtaPhi [i] = 0;
164 fhMCPtDispEtaPhiDiff[i] = 0;
165 fhMCPtSphericity [i] = 0;
166 fhMCPtAsymmetry [i] = 0;
85c4406e 167
29250849 168 fhMCMassPt [i]=0;
169 fhMCMassSplitPt [i]=0;
170 fhMCSelectedMassPt [i]=0;
171 fhMCSelectedMassSplitPt[i]=0;
172
1253480f 173 fhMCMassPtNoOverlap [i]=0;
174 fhMCMassSplitPtNoOverlap [i]=0;
175 fhMCSelectedMassPtNoOverlap [i]=0;
176 fhMCSelectedMassSplitPtNoOverlap[i]=0;
177
d2655d46 178 for(Int_t j = 0; j < 7; j++)
85c4406e 179 {
bfdcf7fb 180 fhMCLambda0DispEta [j][i] = 0;
181 fhMCLambda0DispPhi [j][i] = 0;
85c4406e 182 fhMCDispEtaDispPhi [j][i] = 0;
183 fhMCAsymmetryLambda0 [j][i] = 0;
184 fhMCAsymmetryDispEta [j][i] = 0;
bfdcf7fb 185 fhMCAsymmetryDispPhi [j][i] = 0;
186 }
34c16486 187 }
188
d2655d46 189 for(Int_t j = 0; j < 7; j++)
85c4406e 190 {
bfdcf7fb 191 fhLambda0DispEta [j] = 0;
192 fhLambda0DispPhi [j] = 0;
85c4406e 193 fhDispEtaDispPhi [j] = 0;
194 fhAsymmetryLambda0 [j] = 0;
195 fhAsymmetryDispEta [j] = 0;
bfdcf7fb 196 fhAsymmetryDispPhi [j] = 0;
5e5e056f 197
126b8c62 198 fhPtPileUp [j] = 0;
5e5e056f 199 }
bfdcf7fb 200
34c16486 201 for(Int_t i = 0; i < 3; i++)
202 {
08c09f10 203 fhPtLambda0LocMax [i] = 0;
204 fhPtLambda1LocMax [i] = 0;
205 fhPtDispersionLocMax [i] = 0;
206 fhPtDispEtaLocMax [i] = 0;
207 fhPtDispPhiLocMax [i] = 0;
208 fhPtSumEtaPhiLocMax [i] = 0;
209 fhPtDispEtaPhiDiffLocMax[i] = 0;
210 fhPtSphericityLocMax [i] = 0;
211 fhPtAsymmetryLocMax [i] = 0;
212 fhMassPtLocMax [i] = 0;
213 fhSelectedMassPtLocMax [i] = 0;
5df76288 214 for(Int_t ipart = 0; ipart<7; ipart++)
08c09f10 215 {
216 fhMCPtLambda0LocMax [ipart][i] = 0;
217 fhMCSelectedMassPtLocMax[ipart][i] = 0;
218 }
afba5771 219
220 fhMCPi0PtRecoPtPrimLocMax [i] = 0;
221 fhMCEtaPtRecoPtPrimLocMax [i] = 0;
222 fhMCPi0SplitPtRecoPtPrimLocMax [i] = 0;
223 fhMCEtaSplitPtRecoPtPrimLocMax [i] = 0;
224
225 fhMCPi0SelectedPtRecoPtPrimLocMax [i] = 0;
226 fhMCEtaSelectedPtRecoPtPrimLocMax [i] = 0;
227 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[i] = 0;
228 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[i] = 0;
229
521636d2 230 }
231
78a28af3 232 //Weight studies
1a72f6c5 233 for(Int_t i =0; i < 14; i++){
78a28af3 234 fhLambda0ForW0[i] = 0;
1a72f6c5 235 //fhLambda1ForW0[i] = 0;
3c1d9afb 236 if(i<8)fhMassPairLocMax[i] = 0;
78a28af3 237 }
238
afb3af8a 239 for(Int_t i = 0; i < 11; i++)
c2a62a94 240 {
370169ad 241 fhEtaPhiTriggerEMCALBC [i] = 0 ;
242 fhTimeTriggerEMCALBC [i] = 0 ;
243 fhTimeTriggerEMCALBCPileUpSPD[i] = 0 ;
afb3af8a 244
245 fhEtaPhiTriggerEMCALBCUM [i] = 0 ;
246 fhTimeTriggerEMCALBCUM [i] = 0 ;
85c4406e 247
c2a62a94 248 }
249
9605388f 250 for(Int_t iSM = 0; iSM < 22; iSM++)
251 {
252 fhNLocMaxPtSM[iSM] = 0;
253 for(Int_t inlm = 0; inlm < 3; inlm++)
254 {
255 fhSelectedMassPtLocMaxSM [inlm][iSM] = 0;
256 fhSelectedLambda0PtLocMaxSM [inlm][iSM] = 0;
257 }
258 }
477d6cee 259 //Initialize parameters
260 InitParameters();
261
262}
477d6cee 263
385a3b29 264//______________________________________________________________________________________________
265void AliAnaPi0EbE::FillEMCALBCHistograms(Float_t energy, Float_t eta, Float_t phi, Float_t time)
266{
267 // EMCal trigger cluster BC studies
268
269 Int_t id = GetReader()->GetTriggerClusterId();
270 if( id < 0 ) return;
271
272 Int_t bc = GetReader()->GetTriggerClusterBC();
273 if(TMath::Abs(bc) >= 6)
274 Info("FillEMCALBCHistograms","Trigger BC not expected = %d\n",bc);
275
276 if(phi < 0) phi+=TMath::TwoPi();
277
278 if(energy > 2)
279 {
280 Double_t timeUS = TMath::Abs(time);
281
282 if (timeUS < 25) fhEtaPhiEMCALBC0->Fill(eta, phi);
283 else if (timeUS < 75) fhEtaPhiEMCALBC1->Fill(eta, phi);
284 else fhEtaPhiEMCALBCN->Fill(eta, phi);
285 }
286
287 if(TMath::Abs(bc) >= 6) return ;
288
289 if(GetReader()->IsBadCellTriggerEvent() || GetReader()->IsExoticEvent()) return ;
290
291 if(GetReader()->IsTriggerMatched())
292 {
293 if(energy > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(eta, phi);
294 fhTimeTriggerEMCALBC[bc+5]->Fill(energy, time);
295 if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(energy, time);
296 }
297 else
298 {
299 if(energy > 2) fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(eta, phi);
300 fhTimeTriggerEMCALBCUM[bc+5]->Fill(energy, time);
301
302 if(bc==0)
303 {
304 if(GetReader()->IsTriggerMatchedOpenCuts(0)) fhTimeTriggerEMCALBC0UMReMatchOpenTime ->Fill(energy, time);
305 if(GetReader()->IsTriggerMatchedOpenCuts(1)) fhTimeTriggerEMCALBC0UMReMatchCheckNeigh ->Fill(energy, time);
306 if(GetReader()->IsTriggerMatchedOpenCuts(2)) fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(energy, time);
307 }
308 }
309}
310
b94e038e 311//___________________________________________________________________________________
312void AliAnaPi0EbE::FillPileUpHistograms(Float_t pt, Float_t time, AliVCluster * calo)
2ad19c3d 313{
314 // Fill some histograms to understand pile-up
315 if(!fFillPileUpHistograms) return;
316
317 //printf("E %f, time %f\n",energy,time);
318 AliVEvent * event = GetReader()->GetInputEvent();
319
126b8c62 320 fhTimePtNoCut->Fill(pt,time);
321 if(GetReader()->IsPileUpFromSPD())
2ad19c3d 322
126b8c62 323 if(GetReader()->IsPileUpFromSPD()) { fhPtPileUp[0]->Fill(pt); fhTimePtSPD ->Fill(pt,time); }
324 if(GetReader()->IsPileUpFromEMCal()) fhPtPileUp[1]->Fill(pt);
325 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPileUp[2]->Fill(pt);
326 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPileUp[3]->Fill(pt);
327 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPileUp[4]->Fill(pt);
328 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPileUp[5]->Fill(pt);
329 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPileUp[6]->Fill(pt);
330
331 if(event->IsPileupFromSPDInMultBins()) fhTimePtSPDMulti->Fill(pt,time);
332
333 // cells in cluster
334
335 AliVCaloCells* cells = 0;
336 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
337 else cells = GetPHOSCells();
338
339 Float_t maxCellFraction = 0.;
340 Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells,calo,maxCellFraction);
341
342 Double_t tmax = cells->GetCellTime(absIdMax);
343 GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
344 tmax*=1.e9;
345
346 //Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
347 if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30)
348 {
349 for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
350 {
351 Int_t absId = calo->GetCellsAbsId()[ipos];
352
353 if( absId == absIdMax ) continue ;
354
355 Double_t timecell = cells->GetCellTime(absId);
356 Float_t amp = cells->GetCellAmplitude(absId);
357 Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
358 GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,timecell,cells);
359 timecell*=1e9;
360
361 Float_t diff = (tmax-timecell);
362
36769d30 363 if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
126b8c62 364
365 if(GetReader()->IsPileUpFromSPD())
366 {
367 fhPtCellTimePileUp[0]->Fill(pt, timecell);
368 fhPtTimeDiffPileUp[0]->Fill(pt, diff);
369 }
370
371 if(GetReader()->IsPileUpFromEMCal())
372 {
373 fhPtCellTimePileUp[1]->Fill(pt, timecell);
374 fhPtTimeDiffPileUp[1]->Fill(pt, diff);
375 }
376
377 if(GetReader()->IsPileUpFromSPDOrEMCal())
378 {
379 fhPtCellTimePileUp[2]->Fill(pt, timecell);
380 fhPtTimeDiffPileUp[2]->Fill(pt, diff);
381 }
382
383 if(GetReader()->IsPileUpFromSPDAndEMCal())
384 {
385 fhPtCellTimePileUp[3]->Fill(pt, timecell);
386 fhPtTimeDiffPileUp[3]->Fill(pt, diff);
387 }
388
389 if(GetReader()->IsPileUpFromSPDAndNotEMCal())
390 {
391 fhPtCellTimePileUp[4]->Fill(pt, timecell);
392 fhPtTimeDiffPileUp[4]->Fill(pt, diff);
393 }
394
395 if(GetReader()->IsPileUpFromEMCalAndNotSPD())
396 {
397 fhPtCellTimePileUp[5]->Fill(pt, timecell);
398 fhPtTimeDiffPileUp[5]->Fill(pt, diff);
399 }
400
401 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal())
402 {
403 fhPtCellTimePileUp[6]->Fill(pt, timecell);
404 fhPtTimeDiffPileUp[6]->Fill(pt, diff);
405 }
406 }//loop
407 }
408
409 if(pt < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
2ad19c3d 410
411 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
412 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
413
414 // N pile up vertices
0f7e7205 415 Int_t nVtxSPD = -1;
416 Int_t nVtxTrk = -1;
2ad19c3d 417
418 if (esdEv)
419 {
0f7e7205 420 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
421 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
2ad19c3d 422
423 }//ESD
424 else if (aodEv)
425 {
0f7e7205 426 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
427 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
2ad19c3d 428 }//AOD
429
0f7e7205 430 fhTimeNPileUpVertSPD ->Fill(time,nVtxSPD);
431 fhTimeNPileUpVertTrack->Fill(time,nVtxTrk);
2ad19c3d 432
85c4406e 433 fhPtNPileUpSPDVtx->Fill(pt,nVtxSPD);
0f7e7205 434 fhPtNPileUpTrkVtx->Fill(pt,nVtxTrk);
435
436 if(TMath::Abs(time) < 25)
85c4406e 437 {
438 fhPtNPileUpSPDVtxTimeCut ->Fill(pt,nVtxSPD);
439 fhPtNPileUpTrkVtxTimeCut ->Fill(pt,nVtxTrk);
440 }
441
442 if(time < 75 && time > -25)
443 {
444 fhPtNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD);
445 fhPtNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk);
446 }
447
448 //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
0f7e7205 449 // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTracks);
2ad19c3d 450
451 Int_t ncont = -1;
5559f30a 452 Float_t z1 = -1, z2 = -1;
2ad19c3d 453 Float_t diamZ = -1;
0f7e7205 454 for(Int_t iVert=0; iVert<nVtxSPD;iVert++)
2ad19c3d 455 {
456 if (esdEv)
457 {
458 const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
459 ncont=pv->GetNContributors();
460 z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
461 z2 = pv->GetZ();
462 diamZ = esdEv->GetDiamondZ();
463 }//ESD
464 else if (aodEv)
465 {
466 AliAODVertex *pv=aodEv->GetVertex(iVert);
467 if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
468 ncont=pv->GetNContributors();
469 z1=aodEv->GetPrimaryVertexSPD()->GetZ();
470 z2=pv->GetZ();
471 diamZ = aodEv->GetDiamondZ();
472 }// AOD
473
474 Double_t distZ = TMath::Abs(z2-z1);
475 diamZ = TMath::Abs(z2-diamZ);
476
477 fhTimeNPileUpVertContributors ->Fill(time,ncont);
478 fhTimePileUpMainVertexZDistance->Fill(time,distZ);
479 fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ);
480
126b8c62 481 }// vertex loop
2ad19c3d 482}
483
40d3ce60 484
b94e038e 485//______________________________________________________________________________________________
486void AliAnaPi0EbE::FillRejectedClusterHistograms(TLorentzVector mom, Int_t mctag, Int_t nMaxima)
40d3ce60 487{
85c4406e 488 // Fill histograms that do not pass the identification (SS case only)
40d3ce60 489
490 Float_t ener = mom.E();
491 Float_t pt = mom.Pt();
492 Float_t phi = mom.Phi();
493 if(phi < 0) phi+=TMath::TwoPi();
494 Float_t eta = mom.Eta();
5df76288 495
40d3ce60 496 fhPtReject ->Fill(pt);
497 fhEReject ->Fill(ener);
5df76288 498
08c09f10 499 fhPtEtaReject ->Fill(ener,eta);
500 fhPtPhiReject ->Fill(ener,phi);
40d3ce60 501 fhEtaPhiReject ->Fill(eta,phi);
3a4c49b7 502 fhNLocMaxPtReject->Fill(pt,nMaxima);
503
40d3ce60 504 if(IsDataMC())
505 {
506 Int_t mcIndex = GetMCIndex(mctag);
507 fhMCEReject [mcIndex] ->Fill(ener);
508 fhMCPtReject [mcIndex] ->Fill(pt);
5df76288 509 if(fFillAllNLMHistograms) fhMCNLocMaxPtReject[mcIndex]->Fill(pt,nMaxima);
85c4406e 510 }
5df76288 511
40d3ce60 512}
513
b94e038e 514//___________________________________________________________________________________
08c09f10 515void AliAnaPi0EbE::FillSelectedClusterHistograms(AliVCluster* cluster, Float_t pt, Int_t nMaxima,
b94e038e 516 Int_t tag, Float_t asy)
5c46c992 517{
42d47cb7 518 // Fill shower shape, timing and other histograms for selected clusters from decay
519
08c09f10 520 Float_t ener = cluster->E();
42d47cb7 521 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
522 Float_t l0 = cluster->GetM02();
85c4406e 523 Float_t l1 = cluster->GetM20();
42d47cb7 524 Int_t nSM = GetModuleNumber(cluster);
85c4406e 525
08c09f10 526 Int_t ptbin = -1;
527 if (pt < 2 ) ptbin = 0;
528 else if (pt < 4 ) ptbin = 1;
529 else if (pt < 6 ) ptbin = 2;
530 else if (pt < 10) ptbin = 3;
531 else if (pt < 15) ptbin = 4;
532 else if (pt < 20) ptbin = 5;
533 else ptbin = 6;
85c4406e 534
bfdcf7fb 535 Int_t indexMax = -1;
536 if (nMaxima==1) indexMax = 0 ;
85c4406e 537 else if(nMaxima==2) indexMax = 1 ;
538 else indexMax = 2 ;
bfdcf7fb 539
42d47cb7 540 FillWeightHistograms(cluster);
541
08c09f10 542 fhPtLambda0 ->Fill(pt, l0 );
543 fhPtLambda1 ->Fill(pt, l1 );
42d47cb7 544
5df76288 545 fhNLocMaxPt->Fill(pt,nMaxima);
546
547 if(fFillAllNLMHistograms)
548 {
549 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
550 fhNLocMaxPtSM[nSM]->Fill(pt,nMaxima);
551
552 fhPtLambda0LocMax [indexMax]->Fill(pt,l0);
553 fhPtLambda1LocMax [indexMax]->Fill(pt,l1);
554 }
555
34c16486 556 Float_t ll0 = 0., ll1 = 0.;
85c4406e 557 Float_t dispp= 0., dEta = 0., dPhi = 0.;
558 Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
5df76288 559 AliVCaloCells * cell = 0x0;
560 Float_t maxCellFraction = 0;
561
764ab1f4 562 if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto)
34c16486 563 {
5df76288 564 cell = GetEMCALCells();
565
566 GetCaloUtils()->GetMaxEnergyCell(cell, cluster, maxCellFraction);
567 fhPtFracMaxCell->Fill(pt,maxCellFraction);
568
569 if(maxCellFraction < 0.5)
570 fhPtLambda0FracMaxCellCut->Fill(pt, l0 );
764ab1f4 571
5df76288 572 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(),
573 cell, cluster,
574 ll0, ll1, dispp, dEta, dPhi,
575 sEta, sPhi, sEtaPhi);
576 fhPtDispersion -> Fill(pt,disp);
08c09f10 577 fhPtDispEta -> Fill(pt,dEta);
578 fhPtDispPhi -> Fill(pt,dPhi);
579 fhPtSumEta -> Fill(pt,sEta);
580 fhPtSumPhi -> Fill(pt,sPhi);
581 fhPtSumEtaPhi -> Fill(pt,sEtaPhi);
582 fhPtDispEtaPhiDiff-> Fill(pt,dPhi-dEta);
583 if(dEta+dPhi>0)fhPtSphericity-> Fill(pt,(dPhi-dEta)/(dEta+dPhi));
34c16486 584
08c09f10 585 fhDispEtaDispPhi[ptbin]->Fill(dEta,dPhi);
586 fhLambda0DispEta[ptbin]->Fill(l0 ,dEta);
587 fhLambda0DispPhi[ptbin]->Fill(l0 ,dPhi);
34c16486 588
bfdcf7fb 589 if (fAnaType==kSSCalo)
590 {
591 // Asymmetry histograms
08c09f10 592 fhAsymmetryLambda0[ptbin]->Fill(l0 ,asy);
593 fhAsymmetryDispEta[ptbin]->Fill(dEta,asy);
594 fhAsymmetryDispPhi[ptbin]->Fill(dPhi,asy);
bfdcf7fb 595 }
2dc84d31 596
5df76288 597 if(fFillAllNLMHistograms)
598 {
599 fhPtDispersionLocMax [indexMax]->Fill(pt,disp);
600 fhPtDispEtaLocMax [indexMax]-> Fill(pt,dEta);
601 fhPtDispPhiLocMax [indexMax]-> Fill(pt,dPhi);
602 fhPtSumEtaPhiLocMax [indexMax]-> Fill(pt,sEtaPhi);
603 fhPtDispEtaPhiDiffLocMax[indexMax]-> Fill(pt,dPhi-dEta);
604 if(dEta+dPhi>0) fhPtSphericityLocMax[indexMax]->Fill(pt,(dPhi-dEta)/(dEta+dPhi));
605 if(fAnaType==kSSCalo) fhPtAsymmetryLocMax [indexMax]->Fill(pt ,asy);
606 }
34c16486 607 }
608
5df76288 609
4d1d8f00 610 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >= 0 &&
611 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
b5dbb99b 612 {
08c09f10 613 fhPtLambda0NoTRD ->Fill(pt, l0 );
5df76288 614 if(!fFillOnlySimpleSSHisto)
615 fhPtFracMaxCellNoTRD->Fill(pt,maxCellFraction);
42d47cb7 616 }
617
08c09f10 618 fhPtTime ->Fill(pt, cluster->GetTOF()*1.e9);
619 fhPtNCells->Fill(pt, cluster->GetNCells());
42d47cb7 620
09273901 621 // Fill Track matching control histograms
b5dbb99b 622 if(fFillTMHisto)
623 {
09273901 624 Float_t dZ = cluster->GetTrackDz();
625 Float_t dR = cluster->GetTrackDx();
85c4406e 626
b5dbb99b 627 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
628 {
09273901 629 dR = 2000., dZ = 2000.;
31ae6d59 630 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
85c4406e 631 }
09273901 632 //printf("Pi0EbE: dPhi %f, dEta %f\n",dR,dZ);
85c4406e 633
b2e375c7 634 AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
635
636 Bool_t positive = kFALSE;
637 if(track) positive = (track->Charge()>0);
638
b5dbb99b 639 if(fhTrackMatchedDEta && TMath::Abs(dR) < 999)
640 {
08c09f10 641 fhTrackMatchedDEta->Fill(pt,dZ);
642 fhTrackMatchedDPhi->Fill(pt,dR);
643 if(ener > 0.5) fhTrackMatchedDEtaDPhi->Fill(dZ,dR);
b2e375c7 644
645 if(track)
646 {
647 if(positive)
648 {
08c09f10 649 fhTrackMatchedDEtaPos->Fill(pt,dZ);
650 fhTrackMatchedDPhiPos->Fill(pt,dR);
651 if(ener > 0.5) fhTrackMatchedDEtaDPhiPos->Fill(dZ,dR);
b2e375c7 652 }
653 else
654 {
08c09f10 655 fhTrackMatchedDEtaNeg->Fill(pt,dZ);
656 fhTrackMatchedDPhiNeg->Fill(pt,dR);
657 if(ener > 0.5) fhTrackMatchedDEtaDPhiNeg->Fill(dZ,dR);
b2e375c7 658 }
659 }
09273901 660 }
31ae6d59 661 // Check dEdx and E/p of matched clusters
662
663 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
b2e375c7 664 {
85c4406e 665 if(track)
34c16486 666 {
31ae6d59 667 Float_t dEdx = track->GetTPCsignal();
08c09f10 668 fhdEdx->Fill(pt, dEdx);
31ae6d59 669
08c09f10 670 Float_t eOverp = cluster->E()/track->P();
671 fhEOverP->Fill(pt, eOverp);
4bfeae64 672
08c09f10 673 // Change nSM for year > 2011 (< 4 in 2012-13, none after)
4d1d8f00 674 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >= 0 &&
675 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
676 fhEOverPNoTRD->Fill(pt, eOverp);
85c4406e 677
31ae6d59 678 }
85c4406e 679 //else
4bfeae64 680 // printf("AliAnaPi0EbE::FillSelectedClusterHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
681
b5dbb99b 682 if(IsDataMC())
683 {
f7d8e6b8 684 Float_t mctag = -1;
31ae6d59 685 if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
686 {
687 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
08c09f10 688 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 2.5 ;
5dde270e 689 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 0.5 ;
690 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 1.5 ;
691 else mctag = 3.5 ;
31ae6d59 692
693 }
694 else
695 {
696 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
08c09f10 697 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 6.5 ;
5dde270e 698 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 4.5 ;
699 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 5.5 ;
700 else mctag = 7.5 ;
701 }
702
5df76288 703 fhTrackMatchedMCParticlePt ->Fill(pt, mctag);
5dde270e 704 fhTrackMatchedMCParticleDEta->Fill(dZ, mctag);
705 fhTrackMatchedMCParticleDPhi->Fill(dR, mctag);
706
707 } // MC
31ae6d59 708 }
85c4406e 709 }// Track matching histograms
09273901 710
85c4406e 711 if(IsDataMC())
b5dbb99b 712 {
3455f821 713 Int_t mcIndex = GetMCIndex(tag);
34c16486 714
08c09f10 715 fhMCPtLambda0[mcIndex] ->Fill(pt, l0);
716 fhMCPtLambda1[mcIndex] ->Fill(pt, l1);
5df76288 717 if(fFillAllNLMHistograms) fhMCPtLambda0LocMax[mcIndex][indexMax]->Fill(pt,l0);
08c09f10 718
4d1d8f00 719 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >= 0 &&
720 GetModuleNumber(cluster) < GetFirstSMCoveredByTRD() )
08c09f10 721 fhMCPtLambda0NoTRD[mcIndex]->Fill(pt, l0 );
764ab1f4 722
764ab1f4 723 if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto)
34c16486 724 {
5df76288 725 if(maxCellFraction < 0.5)
726 fhMCPtLambda0FracMaxCellCut[mcIndex]->Fill(pt, l0 );
727
728 fhMCPtDispersion [mcIndex]->Fill(pt, disp);
729 fhMCPtFracMaxCell [mcIndex]->Fill(pt,maxCellFraction);
730
08c09f10 731 fhMCPtDispEta [mcIndex]-> Fill(pt,dEta);
732 fhMCPtDispPhi [mcIndex]-> Fill(pt,dPhi);
733 fhMCPtSumEtaPhi [mcIndex]-> Fill(pt,sEtaPhi);
734 fhMCPtDispEtaPhiDiff [mcIndex]-> Fill(pt,dPhi-dEta);
5df76288 735 if(dEta+dPhi > 0) fhMCPtSphericity[mcIndex]-> Fill(pt,(dPhi-dEta)/(dEta+dPhi));
85c4406e 736
bfdcf7fb 737 if (fAnaType==kSSCalo)
738 {
08c09f10 739 fhMCAsymmetryLambda0[ptbin][mcIndex]->Fill(l0 ,asy);
740 fhMCAsymmetryDispEta[ptbin][mcIndex]->Fill(dEta,asy);
741 fhMCAsymmetryDispPhi[ptbin][mcIndex]->Fill(dPhi,asy);
bfdcf7fb 742 }
743
08c09f10 744 fhMCDispEtaDispPhi[ptbin][mcIndex]->Fill(dEta,dPhi);
745 fhMCLambda0DispEta[ptbin][mcIndex]->Fill(l0 ,dEta);
746 fhMCLambda0DispPhi[ptbin][mcIndex]->Fill(l0 ,dPhi);
5df76288 747 }// only SS simple?
34c16486 748
42d47cb7 749 }//MC
5df76288 750
42d47cb7 751}
752
753//________________________________________________________
754void AliAnaPi0EbE::FillWeightHistograms(AliVCluster *clus)
755{
756 // Calculate weights and fill histograms
757
758 if(!fFillWeightHistograms || GetMixedEvent()) return;
759
760 AliVCaloCells* cells = 0;
761 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
762 else cells = GetPHOSCells();
763
764 // First recalculate energy in case non linearity was applied
765 Float_t energy = 0;
85c4406e 766 Float_t ampMax = 0;
767 for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
b5dbb99b 768 {
42d47cb7 769
770 Int_t id = clus->GetCellsAbsId()[ipos];
771
772 //Recalibrate cell energy if needed
773 Float_t amp = cells->GetCellAmplitude(id);
dbba06ca 774 GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
42d47cb7 775
776 energy += amp;
777
85c4406e 778 if(amp> ampMax)
42d47cb7 779 ampMax = amp;
780
85c4406e 781 } // energy loop
42d47cb7 782
85c4406e 783 if(energy <=0 )
b5dbb99b 784 {
42d47cb7 785 printf("AliAnaPi0EbE::WeightHistograms()- Wrong calculated energy %f\n",energy);
786 return;
787 }
788
789 fhEMaxCellClusterRatio ->Fill(energy,ampMax/energy);
790 fhEMaxCellClusterLogRatio->Fill(energy,TMath::Log(ampMax/energy));
791
792 //Get the ratio and log ratio to all cells in cluster
85c4406e 793 for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
b5dbb99b 794 {
42d47cb7 795 Int_t id = clus->GetCellsAbsId()[ipos];
796
797 //Recalibrate cell energy if needed
798 Float_t amp = cells->GetCellAmplitude(id);
dbba06ca 799 GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
42d47cb7 800
801 fhECellClusterRatio ->Fill(energy,amp/energy);
802 fhECellClusterLogRatio->Fill(energy,TMath::Log(amp/energy));
85c4406e 803 }
42d47cb7 804
805 //Recalculate shower shape for different W0
806 if(fCalorimeter=="EMCAL"){
807
808 Float_t l0org = clus->GetM02();
809 Float_t l1org = clus->GetM20();
810 Float_t dorg = clus->GetDispersion();
811
b5dbb99b 812 for(Int_t iw = 0; iw < 14; iw++)
813 {
85c4406e 814 GetCaloUtils()->GetEMCALRecoUtils()->SetW0(1+iw*0.5);
42d47cb7 815 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), cells, clus);
816
817 fhLambda0ForW0[iw]->Fill(energy,clus->GetM02());
1a72f6c5 818 //fhLambda1ForW0[iw]->Fill(energy,clus->GetM20());
42d47cb7 819
820 } // w0 loop
821
822 // Set the original values back
823 clus->SetM02(l0org);
824 clus->SetM20(l1org);
825 clus->SetDispersion(dorg);
826
827 }// EMCAL
828}
829
b5dbb99b 830//__________________________________________
831TObjString * AliAnaPi0EbE::GetAnalysisCuts()
85c4406e 832{
0c1383b5 833 //Save parameters used for analysis
521636d2 834 TString parList ; //this will be list of parameters used for this analysis.
835 const Int_t buffersize = 255;
836 char onePar[buffersize] ;
837
838 snprintf(onePar,buffersize,"--- AliAnaPi0EbE ---\n") ;
85c4406e 839 parList+=onePar ;
b7937ba1 840 snprintf(onePar,buffersize,"fAnaType=%d (selection type) \n",fAnaType) ;
521636d2 841 parList+=onePar ;
de2e61cd 842 snprintf(onePar,buffersize,"Calorimeter: %s;",fCalorimeter.Data()) ;
843 parList+=onePar ;
385a3b29 844 snprintf(onePar,buffersize,"Local maxima in cluster: %d < nlm < %d;",fNLMCutMin,fNLMCutMax) ;
845 parList+=onePar ;
521636d2 846
b5dbb99b 847 if(fAnaType == kSSCalo)
848 {
b7937ba1 849 snprintf(onePar,buffersize,"E cut: %2.2f<E<%2.2f;",GetMinEnergy(),GetMaxEnergy()) ;
850 parList+=onePar ;
385a3b29 851 snprintf(onePar,buffersize,"N cell cut: N > %d;",GetCaloPID()->GetClusterSplittingMinNCells()) ;
852 parList+=onePar ;
de2e61cd 853 snprintf(onePar,buffersize,"Min Dist to Bad channel: fMinDist =%2.2f; fMinDist2=%2.2f, fMinDist3=%2.2f;",fMinDist, fMinDist2,fMinDist3) ;
521636d2 854 parList+=onePar ;
de2e61cd 855 snprintf(onePar,buffersize,"Min E cut for NLM cases: 1) %2.2f; 2) %2.2f; 3) %2.2f;",fNLMECutMin[0],fNLMECutMin[1],fNLMECutMin[2]) ;
521636d2 856 parList+=onePar ;
de2e61cd 857 snprintf(onePar,buffersize,"Reject Matched tracks?: %d;",fRejectTrackMatch) ;
521636d2 858 parList+=onePar ;
385a3b29 859 snprintf(onePar,buffersize,"Reject split cluster close to border or bad?: %d;",fCheckSplitDistToBad) ;
860 parList+=onePar ;
de2e61cd 861 snprintf(onePar,buffersize,"Time cut: %2.2f<t<%2.2f;",fTimeCutMin,fTimeCutMax) ;
862 parList+=onePar ;
863 //Get parameters set in PID class.
864 parList += GetCaloPID()->GetPIDParametersList() ;
865 }
b7937ba1 866 else if(fAnaType == kIMCalo || fAnaType == kIMCaloTracks)
de2e61cd 867 {
b7937ba1 868 snprintf(onePar,buffersize,"Select %s;", (GetNeutralMesonSelection()->GetParticle()).Data()) ;
de2e61cd 869 parList+=onePar ;
b7937ba1 870 snprintf(onePar,buffersize,"Mass cut: %2.2f<M<%2.2f;",GetNeutralMesonSelection()->GetInvMassMinCut() ,GetNeutralMesonSelection()->GetInvMassMaxCut()) ;
871 parList+=onePar ;
de2e61cd 872 }
873 else if(fAnaType == kIMCaloTracks)
874 {
b7937ba1 875 snprintf(onePar,buffersize,"Photon Conv Array: %s;",fInputAODGammaConvName.Data()) ;
de2e61cd 876 parList+=onePar ;
b7937ba1 877 }
878 else if(fAnaType == kIMCalo)
879 {
880 snprintf(onePar,buffersize,"Time Diff: %2.2f;",GetPairTimeCut()) ;
521636d2 881 parList+=onePar ;
882 }
883
884 //Get parameters set in base class.
de2e61cd 885 //parList += GetBaseParametersList() ;
521636d2 886
887 return new TObjString(parList) ;
0c1383b5 888}
889
78a28af3 890//_____________________________________________
477d6cee 891TList * AliAnaPi0EbE::GetCreateOutputObjects()
85c4406e 892{
893 // Create histograms to be saved in output file and
477d6cee 894 // store them in outputContainer
85c4406e 895 TList * outputContainer = new TList() ;
896 outputContainer->SetName("Pi0EbEHistos") ;
477d6cee 897
745913ae 898 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
899 Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
900 Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
901 Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin();
902 Int_t tdbins = GetHistogramRanges()->GetHistoDiffTimeBins() ; Float_t tdmax = GetHistogramRanges()->GetHistoDiffTimeMax(); Float_t tdmin = GetHistogramRanges()->GetHistoDiffTimeMin();
903 Int_t tbins = GetHistogramRanges()->GetHistoTimeBins() ; Float_t tmax = GetHistogramRanges()->GetHistoTimeMax(); Float_t tmin = GetHistogramRanges()->GetHistoTimeMin();
85c4406e 904 Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin();
905
906 Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins();
907 Float_t massmin = GetHistogramRanges()->GetHistoMassMin();
b5dbb99b 908 Float_t massmax = GetHistogramRanges()->GetHistoMassMax();
909
85c4406e 910 Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
911 Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
09273901 912 Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
85c4406e 913 Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
914 Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
09273901 915 Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
916
85c4406e 917 Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
918 Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
31ae6d59 919 Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
85c4406e 920 Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
921 Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
31ae6d59 922 Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
923
5ba76d0d 924 Int_t ntimptbins = GetHistogramRanges()->GetHistoTimeBins();
925 Float_t timemax = GetHistogramRanges()->GetHistoTimeMax();
926 Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
2ad19c3d 927
5ba76d0d 928 TString nlm[] = {"1 Local Maxima","2 Local Maxima", "NLM > 2"};
5df76288 929
930 TString ptype [] = {"#gamma (#pi^{0})", "#gamma (#eta)", "#gamma (other)", "#pi^{0}", "#eta", "e^{#pm}" , "hadron/other combinations"};
931 TString pname [] = {"Pi0Decay" , "EtaDecay" , "OtherDecay" , "Pi0" , "Eta" , "Electron", "Hadron"};
932
d2655d46 933 Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins
85c4406e 934
935 fhPt = new TH1F("hPt","Number of identified #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
5ba76d0d 936 fhPt->SetYTitle("#it{N}");
937 fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 938 outputContainer->Add(fhPt) ;
09273901 939
85c4406e 940 fhE = new TH1F("hE","Number of identified #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
5ba76d0d 941 fhE->SetYTitle("#it{N}");
942 fhE->SetXTitle("#it{E} (GeV)");
85c4406e 943 outputContainer->Add(fhE) ;
09273901 944
08c09f10 945 fhPtPhi = new TH2F
5ba76d0d 946 ("hPtPhi","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
08c09f10 947 fhPtPhi->SetYTitle("#phi (rad)");
5ba76d0d 948 fhPtPhi->SetXTitle("#it{E} (GeV)");
08c09f10 949 outputContainer->Add(fhPtPhi) ;
09273901 950
08c09f10 951 fhPtEta = new TH2F
5ba76d0d 952 ("hPtEta","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
08c09f10 953 fhPtEta->SetYTitle("#eta");
5ba76d0d 954 fhPtEta->SetXTitle("#it{E} (GeV)");
08c09f10 955 outputContainer->Add(fhPtEta) ;
85c4406e 956
09273901 957 fhEtaPhi = new TH2F
85c4406e 958 ("hEtaPhi","Selected #pi^{0} (#eta) pairs: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
b9947879 959 fhEtaPhi->SetYTitle("#phi (rad)");
960 fhEtaPhi->SetXTitle("#eta");
85c4406e 961 outputContainer->Add(fhEtaPhi) ;
09273901 962
c2a62a94 963 if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms)
964 {
965 fhEtaPhiEMCALBC0 = new TH2F
5ba76d0d 966 ("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);
c2a62a94 967 fhEtaPhiEMCALBC0->SetYTitle("#phi (rad)");
968 fhEtaPhiEMCALBC0->SetXTitle("#eta");
969 outputContainer->Add(fhEtaPhiEMCALBC0) ;
970
971 fhEtaPhiEMCALBC1 = new TH2F
5ba76d0d 972 ("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);
c2a62a94 973 fhEtaPhiEMCALBC1->SetYTitle("#phi (rad)");
974 fhEtaPhiEMCALBC1->SetXTitle("#eta");
975 outputContainer->Add(fhEtaPhiEMCALBC1) ;
976
977 fhEtaPhiEMCALBCN = new TH2F
5ba76d0d 978 ("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);
c2a62a94 979 fhEtaPhiEMCALBCN->SetYTitle("#phi (rad)");
980 fhEtaPhiEMCALBCN->SetXTitle("#eta");
981 outputContainer->Add(fhEtaPhiEMCALBCN) ;
982
afb3af8a 983 for(Int_t i = 0; i < 11; i++)
c2a62a94 984 {
985 fhEtaPhiTriggerEMCALBC[i] = new TH2F
986 (Form("hEtaPhiTriggerEMCALBC%d",i-5),
5ba76d0d 987 Form("meson #it{E} > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
c2a62a94 988 netabins,etamin,etamax,nphibins,phimin,phimax);
989 fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
990 fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
991 outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
992
993 fhTimeTriggerEMCALBC[i] = new TH2F
994 (Form("hTimeTriggerEMCALBC%d",i-5),
5ba76d0d 995 Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
08c09f10 996 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 997 fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
998 fhTimeTriggerEMCALBC[i]->SetYTitle("#it{t} (ns)");
c2a62a94 999 outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1000
1001 fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F
1002 (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
5ba76d0d 1003 Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
08c09f10 1004 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 1005 fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1006 fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{t} (ns)");
c2a62a94 1007 outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
afb3af8a 1008
1009 fhEtaPhiTriggerEMCALBCUM[i] = new TH2F
1010 (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
5ba76d0d 1011 Form("meson #it{E} > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
afb3af8a 1012 netabins,etamin,etamax,nphibins,phimin,phimax);
1013 fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
1014 fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1015 outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1016
1017 fhTimeTriggerEMCALBCUM[i] = new TH2F
1018 (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
5ba76d0d 1019 Form("meson #it{t} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-5),
08c09f10 1020 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 1021 fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1022 fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{t} (ns)");
afb3af8a 1023 outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
85c4406e 1024
c2a62a94 1025 }
126b8c62 1026
1027 fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
5ba76d0d 1028 "cluster #it{t} vs #it{E} of clusters, no match, rematch open time",
08c09f10 1029 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 1030 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
1031 fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{t} (ns)");
126b8c62 1032 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
1033
1034
1035 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
5ba76d0d 1036 "cluster #it{t} vs #it{E} of clusters, no match, rematch with neigbour parches",
08c09f10 1037 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 1038 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
1039 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{t} (ns)");
126b8c62 1040 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
1041
1042 fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
5ba76d0d 1043 "cluster #it{t} vs #it{E} of clusters, no match, rematch open time and neigbour",
08c09f10 1044 nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
5ba76d0d 1045 fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
1046 fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{t} (ns)");
126b8c62 1047 outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
1048
c2a62a94 1049 }
1050
5df76288 1051 if(fFillHighMultHistograms)
1052 {
1053 fhPtCentrality = new TH2F("hPtCentrality","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1054 fhPtCentrality->SetYTitle("centrality");
1055 fhPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1056 outputContainer->Add(fhPtCentrality) ;
1057
1058 fhPtEventPlane = new TH2F("hPtEventPlane","event plane angle vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1059 fhPtEventPlane->SetYTitle("Event plane angle (rad)");
1060 fhPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1061 outputContainer->Add(fhPtEventPlane) ;
1062 }
c8710850 1063
40d3ce60 1064 if(fAnaType == kSSCalo)
1065 {
85c4406e 1066 fhPtReject = new TH1F("hPtReject","Number of rejected as #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
5ba76d0d 1067 fhPtReject->SetYTitle("#it{N}");
1068 fhPtReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 1069 outputContainer->Add(fhPtReject) ;
40d3ce60 1070
85c4406e 1071 fhEReject = new TH1F("hEReject","Number of rejected as #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
5ba76d0d 1072 fhEReject->SetYTitle("#it{N}");
1073 fhEReject->SetXTitle("#it{E} (GeV)");
85c4406e 1074 outputContainer->Add(fhEReject) ;
40d3ce60 1075
08c09f10 1076 fhPtPhiReject = new TH2F
5ba76d0d 1077 ("hPtPhiReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
08c09f10 1078 fhPtPhiReject->SetYTitle("#phi (rad)");
5ba76d0d 1079 fhPtPhiReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1080 outputContainer->Add(fhPtPhiReject) ;
40d3ce60 1081
08c09f10 1082 fhPtEtaReject = new TH2F
5ba76d0d 1083 ("hPtEtaReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
08c09f10 1084 fhPtEtaReject->SetYTitle("#eta");
5ba76d0d 1085 fhPtEtaReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1086 outputContainer->Add(fhPtEtaReject) ;
40d3ce60 1087
1088 fhEtaPhiReject = new TH2F
85c4406e 1089 ("hEtaPhiReject","Rejected #pi^{0} (#eta) cluster: #eta vs #phi",netabins,etamin,etamax, nphibins,phimin,phimax);
40d3ce60 1090 fhEtaPhiReject->SetYTitle("#phi (rad)");
1091 fhEtaPhiReject->SetXTitle("#eta");
85c4406e 1092 outputContainer->Add(fhEtaPhiReject) ;
5df76288 1093
1094 fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
1095 nptbins,ptmin,ptmax,20,0,20);
1096 fhNLocMaxPtReject ->SetYTitle("N maxima");
1097 fhNLocMaxPtReject ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1098 outputContainer->Add(fhNLocMaxPtReject) ;
1099
40d3ce60 1100 }
1101
f02db2c0 1102 fhMass = new TH2F
5ba76d0d 1103 ("hMass","all pairs #it{M}: #it{E} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1104 fhMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1105 fhMass->SetXTitle("#it{E} (GeV)");
85c4406e 1106 outputContainer->Add(fhMass) ;
f02db2c0 1107
1108 fhSelectedMass = new TH2F
5ba76d0d 1109 ("hSelectedMass","Selected #pi^{0} (#eta) pairs #it{M}: E vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1110 fhSelectedMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1111 fhSelectedMass->SetXTitle("#it{E} (GeV)");
85c4406e 1112 outputContainer->Add(fhSelectedMass) ;
1113
5df76288 1114 fhMassPt = new TH2F
1115 ("hMassPt","all pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1116 fhMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1117 fhMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1118 outputContainer->Add(fhMassPt) ;
1119
1120 fhSelectedMassPt = new TH2F
1121 ("hSelectedMassPt","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1122 fhSelectedMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1123 fhSelectedMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1124 outputContainer->Add(fhSelectedMassPt) ;
1125
08c09f10 1126 if(fAnaType == kSSCalo)
1253480f 1127 {
452656d1 1128 fhPtLambda0NoSplitCut = new TH2F
1129 ("hPtLambda0NoSplitCut","all clusters: #it{p}_{T} vs #lambda_{0}^{2}",nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1130 fhPtLambda0NoSplitCut->SetYTitle("#lambda_{0}^{2}");
1131 fhPtLambda0NoSplitCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1132 outputContainer->Add(fhPtLambda0NoSplitCut) ;
08c09f10 1133
1134 for(Int_t inlm = 0; inlm < 3; inlm++)
1135 {
1136 fhMassPtLocMax[inlm] = new TH2F
5ba76d0d 1137 (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);
1138 fhMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1139 fhMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1140 outputContainer->Add(fhMassPtLocMax[inlm]) ;
1141
1142 fhSelectedMassPtLocMax[inlm] = new TH2F
5ba76d0d 1143 (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);
1144 fhSelectedMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1145 fhSelectedMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1146 outputContainer->Add(fhSelectedMassPtLocMax[inlm]) ;
1147
5df76288 1148 if(fFillAllNLMHistograms)
9605388f 1149 {
5df76288 1150 for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
1151 {
1152 fhSelectedMassPtLocMaxSM[inlm][iSM] = new TH2F
1153 (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);
1154 fhSelectedMassPtLocMaxSM[inlm][iSM]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1155 fhSelectedMassPtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1156 outputContainer->Add(fhSelectedMassPtLocMaxSM[inlm][iSM]) ;
1157
1158 fhSelectedLambda0PtLocMaxSM[inlm][iSM] = new TH2F
1159 (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);
1160 fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetYTitle("#lambda_{0}^{2}");
1161 fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1162 outputContainer->Add(fhSelectedLambda0PtLocMaxSM[inlm][iSM]) ;
1163 }
9605388f 1164 }
1165
08c09f10 1166 if(IsDataMC())
1167 {
5df76288 1168 for(Int_t ipart = 0; ipart < 7; ipart++)
08c09f10 1169 {
1170 fhMCSelectedMassPtLocMax[ipart][inlm] = new TH2F
1171 (Form("hSelectedMassPtLocMax%d_MC%s",inlm+1,pname[ipart].Data()),
5df76288 1172 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()),
08c09f10 1173 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 1174 fhMCSelectedMassPtLocMax[ipart][inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1175 fhMCSelectedMassPtLocMax[ipart][inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1176 outputContainer->Add(fhMCSelectedMassPtLocMax[ipart][inlm]) ;
1177 }
1178 }
1179 }
1180
1181 if(IsDataMC())
1182 {
1183 fhMassNoOverlap = new TH2F
5ba76d0d 1184 ("hMassNoOverlap","all pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1185 fhMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1186 fhMassNoOverlap->SetXTitle("#it{E} (GeV)");
08c09f10 1187 outputContainer->Add(fhMassNoOverlap) ;
1188
1189 fhSelectedMassNoOverlap = new TH2F
5ba76d0d 1190 ("hSelectedMassNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1191 fhSelectedMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1192 fhSelectedMassNoOverlap->SetXTitle("#it{E} (GeV)");
08c09f10 1193 outputContainer->Add(fhSelectedMassNoOverlap) ;
1194
1195 fhMassPtNoOverlap = new TH2F
5ba76d0d 1196 ("hMassPtNoOverlap","all pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1197 fhMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1198 fhMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1199 outputContainer->Add(fhMassPtNoOverlap) ;
1200
1201 fhSelectedMassPtNoOverlap = new TH2F
5ba76d0d 1202 ("hSelectedMassPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1203 fhSelectedMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1204 fhSelectedMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1205 outputContainer->Add(fhSelectedMassPtNoOverlap) ;
1206 }
1253480f 1207 }
85c4406e 1208
34c16486 1209 if(fAnaType != kSSCalo)
1210 {
5df76288 1211 fhPtDecay = new TH1F("hPtDecay","Selected #pi^{0} (#eta) decay photons",nptbins,ptmin,ptmax);
5ba76d0d 1212 fhPtDecay->SetYTitle("#it{N}");
1213 fhPtDecay->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 1214 outputContainer->Add(fhPtDecay) ;
34c16486 1215
5df76288 1216 if(IsDataMC())
1217 {
1218 for(Int_t ipart = 0; ipart < 7; ipart++)
1219 {
1220 fhMCPtDecay[ipart] = new TH1F(Form("hPtDecay_MC%s",pname[ipart].Data()),
1221 Form("Selected #pi^{0} (#eta) decay photons, from MC %s",ptype[ipart].Data()),
1222 nptbins,ptmin,ptmax);
1223 fhMCPtDecay[ipart]->SetYTitle("#it{N}");
1224 fhMCPtDecay[ipart]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1225 outputContainer->Add(fhMCPtDecay[ipart]) ;
1226 }
1227 }
34c16486 1228 }
57b97dc6 1229
c4a7d28a 1230 ////////
57b97dc6 1231
34c16486 1232 if( fFillSelectClHisto )
b5dbb99b 1233 {
08c09f10 1234 fhPtLambda0 = new TH2F
5ba76d0d 1235 ("hPtLambda0","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
08c09f10 1236 fhPtLambda0->SetYTitle("#lambda_{0}^{2}");
5ba76d0d 1237 fhPtLambda0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1238 outputContainer->Add(fhPtLambda0) ;
1239
1240 fhPtLambda1 = new TH2F
5ba76d0d 1241 ("hPtLambda1","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
08c09f10 1242 fhPtLambda1->SetYTitle("#lambda_{1}^{2}");
5ba76d0d 1243 fhPtLambda1->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1244 outputContainer->Add(fhPtLambda1) ;
1245
4d1d8f00 1246 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >=0 )
06e81356 1247 {
08c09f10 1248 fhPtLambda0NoTRD = new TH2F
5ba76d0d 1249 ("hPtLambda0NoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, not behind TRD",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
08c09f10 1250 fhPtLambda0NoTRD->SetYTitle("#lambda_{0}^{2}");
5ba76d0d 1251 fhPtLambda0NoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1252 outputContainer->Add(fhPtLambda0NoTRD) ;
1253
764ab1f4 1254 if(!fFillOnlySimpleSSHisto)
34c16486 1255 {
5df76288 1256 fhPtFracMaxCellNoTRD = new TH2F
1257 ("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);
1258 fhPtFracMaxCellNoTRD->SetYTitle("Fraction");
1259 fhPtFracMaxCellNoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1260 outputContainer->Add(fhPtFracMaxCellNoTRD) ;
1261 }
1262 }
1263
1264 if(!fFillOnlySimpleSSHisto)
1265 {
1266 fhPtDispersion = new TH2F
1267 ("hPtDispersion","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1268 fhPtDispersion->SetYTitle("D^{2}");
1269 fhPtDispersion->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1270 outputContainer->Add(fhPtDispersion) ;
1271
1272 fhPtLambda0FracMaxCellCut = new TH2F
1273 ("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);
1274 fhPtLambda0FracMaxCellCut->SetYTitle("#lambda_{0}^{2}");
1275 fhPtLambda0FracMaxCellCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1276 outputContainer->Add(fhPtLambda0FracMaxCellCut) ;
1277
1278 fhPtFracMaxCell = new TH2F
1279 ("hPtFracMaxCell","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy",nptbins,ptmin,ptmax,100,0,1);
1280 fhPtFracMaxCell->SetYTitle("Fraction");
1281 fhPtFracMaxCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1282 outputContainer->Add(fhPtFracMaxCell) ;
1283
1284 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);
1285 fhPtDispEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1286 fhPtDispEta->SetYTitle("#sigma^{2}_{#eta #eta}");
1287 outputContainer->Add(fhPtDispEta);
1288
1289 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);
1290 fhPtDispPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1291 fhPtDispPhi->SetYTitle("#sigma^{2}_{#phi #phi}");
1292 outputContainer->Add(fhPtDispPhi);
1293
1294 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);
1295 fhPtSumEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1296 fhPtSumEta->SetYTitle("#delta^{2}_{#eta #eta}");
1297 outputContainer->Add(fhPtSumEta);
1298
1299 fhPtSumPhi = new TH2F ("hPtSumPhi","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs #it{p}_{T}",
1300 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1301 fhPtSumPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1302 fhPtSumPhi->SetYTitle("#delta^{2}_{#phi #phi}");
1303 outputContainer->Add(fhPtSumPhi);
1304
1305 fhPtSumEtaPhi = new TH2F ("hPtSumEtaPhi","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs #it{p}_{T}",
1306 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1307 fhPtSumEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1308 fhPtSumEtaPhi->SetYTitle("#delta^{2}_{#eta #phi}");
1309 outputContainer->Add(fhPtSumEtaPhi);
1310
1311 fhPtDispEtaPhiDiff = new TH2F ("hPtDispEtaPhiDiff","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",
1312 nptbins,ptmin,ptmax,200, -10,10);
1313 fhPtDispEtaPhiDiff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1314 fhPtDispEtaPhiDiff->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1315 outputContainer->Add(fhPtDispEtaPhiDiff);
1316
1317 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})",
1318 nptbins,ptmin,ptmax, 200, -1,1);
1319 fhPtSphericity->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1320 fhPtSphericity->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1321 outputContainer->Add(fhPtSphericity);
1322
1323 for(Int_t i = 0; i < 7; i++)
1324 {
1325 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]),
1326 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1327 fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1328 fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1329 outputContainer->Add(fhDispEtaDispPhi[i]);
1330
1331 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]),
1332 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1333 fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1334 fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1335 outputContainer->Add(fhLambda0DispEta[i]);
1336
1337 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]),
1338 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1339 fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1340 fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1341 outputContainer->Add(fhLambda0DispPhi[i]);
bfdcf7fb 1342
34c16486 1343 }
85c4406e 1344 }
5df76288 1345
08c09f10 1346 fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
1347 nptbins,ptmin,ptmax,20,0,20);
1348 fhNLocMaxPt ->SetYTitle("N maxima");
5ba76d0d 1349 fhNLocMaxPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1350 outputContainer->Add(fhNLocMaxPt) ;
521636d2 1351
5df76288 1352 if(fFillAllNLMHistograms)
34c16486 1353 {
5df76288 1354 for(Int_t iSM = 0; iSM < GetCaloUtils()->GetNumberOfSuperModulesUsed(); iSM++)
08c09f10 1355 {
5df76288 1356 fhNLocMaxPtSM[iSM] = new TH2F(Form("hNLocMaxPt_SM%d",iSM),Form("Number of local maxima in cluster, selected clusters in SM %d",iSM),
1357 nptbins,ptmin,ptmax,20,0,20);
1358 fhNLocMaxPtSM[iSM] ->SetYTitle("N maxima");
1359 fhNLocMaxPtSM[iSM] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1360 outputContainer->Add(fhNLocMaxPtSM[iSM]) ;
08c09f10 1361 }
34c16486 1362
5df76288 1363 for (Int_t i = 0; i < 3; i++)
34c16486 1364 {
5df76288 1365 fhPtLambda0LocMax[i] = new TH2F(Form("hPtLambda0LocMax%d",i+1),
1366 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s",nlm[i].Data()),
1367 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1368 fhPtLambda0LocMax[i]->SetYTitle("#lambda_{0}^{2}");
1369 fhPtLambda0LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1370 outputContainer->Add(fhPtLambda0LocMax[i]) ;
34c16486 1371
5df76288 1372 if(IsDataMC())
1373 {
1374 for(Int_t ipart = 0; ipart < 7; ipart++)
1375 {
1376 fhMCPtLambda0LocMax[ipart][i] = new TH2F
1377 (Form("hPtLambda0LocMax%d_MC%s",i+1,pname[ipart].Data()),
1378 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s, MC %s",nlm[i].Data(),ptype[ipart].Data()),
1379 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1380 fhMCPtLambda0LocMax[ipart][i]->SetYTitle("#lambda_{0}^{2}");
1381 fhMCPtLambda0LocMax[ipart][i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1382 outputContainer->Add(fhMCPtLambda0LocMax[ipart][i]) ;
1383 }
1384 }
34c16486 1385
5df76288 1386 fhPtLambda1LocMax[i] = new TH2F(Form("hPtLambda1LocMax%d",i+1),
1387 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}, %s",nlm[i].Data()),
1388 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1389 fhPtLambda1LocMax[i]->SetYTitle("#lambda_{1}^{2}");
1390 fhPtLambda1LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1391 outputContainer->Add(fhPtLambda1LocMax[i]) ;
34c16486 1392
5df76288 1393 if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto)
1394 {
1395 fhPtDispersionLocMax[i] = new TH2F(Form("hPtDispersionLocMax%d",i+1),
1396 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion^{2}, %s",nlm[i].Data()),
1397 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1398 fhPtDispersionLocMax[i]->SetYTitle("dispersion^{2}");
1399 fhPtDispersionLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1400 outputContainer->Add(fhPtDispersionLocMax[i]) ;
1401
1402 fhPtDispEtaLocMax[i] = new TH2F(Form("hPtDispEtaLocMax%d",i+1),
1403 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #eta}, %s",nlm[i].Data()),
1404 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1405 fhPtDispEtaLocMax[i]->SetYTitle("#sigma_{#eta #eta}");
1406 fhPtDispEtaLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1407 outputContainer->Add(fhPtDispEtaLocMax[i]) ;
1408
1409 fhPtDispPhiLocMax[i] = new TH2F(Form("hPtDispPhiLocMax%d",i+1),
1410 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi}, %s",nlm[i].Data()),
1411 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1412 fhPtDispPhiLocMax[i]->SetYTitle("#sigma_{#phi #phi}");
1413 fhPtDispPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1414 outputContainer->Add(fhPtDispPhiLocMax[i]) ;
1415
1416 fhPtSumEtaPhiLocMax[i] = new TH2F(Form("hPtSumEtaPhiLocMax%d",i+1),
1417 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #phi}, %s",nlm[i].Data()),
1418 nptbins,ptmin,ptmax,2*ssbins,-ssmax,ssmax);
1419 fhPtSumEtaPhiLocMax[i]->SetYTitle("#sigma_{#eta #phi}");
1420 fhPtSumEtaPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1421 outputContainer->Add(fhPtSumEtaPhiLocMax[i]) ;
1422
1423 fhPtDispEtaPhiDiffLocMax[i] = new TH2F(Form("hPtDispEtaPhiDiffLocMax%d",i+1),
1424 Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#phi #phi} - #sigma_{#eta #eta}, %s",nlm[i].Data()),
1425 nptbins,ptmin,ptmax,200, -10,10);
1426 fhPtDispEtaPhiDiffLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta}");
1427 fhPtDispEtaPhiDiffLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1428 outputContainer->Add(fhPtDispEtaPhiDiffLocMax[i]) ;
1429
1430 fhPtSphericityLocMax[i] = new TH2F(Form("hPtSphericityLocMax%d",i+1),
1431 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()),
1432 nptbins,ptmin,ptmax,200, -1,1);
1433 fhPtSphericityLocMax[i]->SetYTitle("#sigma_{#phi #phi} - #sigma_{#eta #eta} / (#sigma_{#phi #phi} + #sigma_{#eta #eta})");
1434 fhPtSphericityLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1435 outputContainer->Add(fhPtSphericityLocMax[i]) ;
1436 }
34c16486 1437 }
5df76288 1438 } // all NLM histos
85c4406e 1439
08c09f10 1440 fhPtNCells = new TH2F ("hPtNCells","N cells in cluster vs E ", nptbins,ptmin,ptmax, nbins,nmin,nmax);
5ba76d0d 1441 fhPtNCells->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1442 fhPtNCells->SetYTitle("# of cells in cluster");
1443 outputContainer->Add(fhPtNCells);
42d47cb7 1444
08c09f10 1445 fhPtTime = new TH2F("hPtTime","cluster time vs pair E",nptbins,ptmin,ptmax, tbins,tmin,tmax);
5ba76d0d 1446 fhPtTime->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1447 fhPtTime->SetYTitle("t (ns)");
1448 outputContainer->Add(fhPtTime);
521636d2 1449
764ab1f4 1450 }
e7fd282f 1451
5df76288 1452 if(fAnaType != kIMCaloTracks)
1453 {
1454 fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs E",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1455 fhEPairDiffTime->SetXTitle("#it{E}_{pair} (GeV)");
1456 fhEPairDiffTime->SetYTitle("#Delta t (ns)");
1457 outputContainer->Add(fhEPairDiffTime);
1458 }
a1fd1b69 1459
1460 if(fAnaType == kIMCalo)
1461 {
3c1d9afb 1462 TString combiName [] = {"1LocMax","2LocMax","NLocMax","1LocMax2LocMax","1LocMaxNLocMax","2LocMaxNLocMax","1LocMaxSSBad","NLocMaxSSGood"};
5c46c992 1463 TString combiTitle[] = {"1 Local Maxima in both clusters","2 Local Maxima in both clusters","more than 2 Local Maxima in both clusters",
1464 "1 Local Maxima paired with 2 Local Maxima","1 Local Maxima paired with more than 2 Local Maxima",
3c1d9afb 1465 "2 Local Maxima paired with more than 2 Local Maxima",
1466 "1 Local Maxima paired with #lambda_{0}^{2}>0.3","N Local Maxima paired with 0.1<#lambda_{0}^{2}<0.3"};
85c4406e 1467
5df76288 1468 if(fFillAllNLMHistograms)
5c46c992 1469 {
5df76288 1470 for (Int_t i = 0; i < 8 ; i++)
1471 {
1472 if (fAnaType == kIMCaloTracks && i > 2 ) continue ;
1473
1474 fhMassPairLocMax[i] = new TH2F
1475 (Form("MassPairLocMax%s",combiName[i].Data()),
1476 Form("#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}, %s", combiTitle[i].Data()),
1477 nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1478 fhMassPairLocMax[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1479 fhMassPairLocMax[i]->SetXTitle("#it{E}_{pair} (GeV)");
1480 outputContainer->Add(fhMassPairLocMax[i]) ;
1481 }
5c46c992 1482 }
e7fd282f 1483 }
477d6cee 1484
b5dbb99b 1485 if(fFillTMHisto)
1486 {
09273901 1487 fhTrackMatchedDEta = new TH2F
31ae6d59 1488 ("hTrackMatchedDEta",
5ba76d0d 1489 "d#eta of cluster-track vs cluster #it{p}_{T}",
85c4406e 1490 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
09273901 1491 fhTrackMatchedDEta->SetYTitle("d#eta");
5ba76d0d 1492 fhTrackMatchedDEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
09273901 1493
1494 fhTrackMatchedDPhi = new TH2F
31ae6d59 1495 ("hTrackMatchedDPhi",
5ba76d0d 1496 "d#phi of cluster-track vs cluster #it{p}_{T}",
85c4406e 1497 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
09273901 1498 fhTrackMatchedDPhi->SetYTitle("d#phi (rad)");
5ba76d0d 1499 fhTrackMatchedDPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
09273901 1500
1501 fhTrackMatchedDEtaDPhi = new TH2F
31ae6d59 1502 ("hTrackMatchedDEtaDPhi",
08c09f10 1503 "d#eta vs d#phi of cluster-track",
85c4406e 1504 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
09273901 1505 fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)");
85c4406e 1506 fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
09273901 1507
85c4406e 1508 outputContainer->Add(fhTrackMatchedDEta) ;
09273901 1509 outputContainer->Add(fhTrackMatchedDPhi) ;
1510 outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
5df76288 1511
b2e375c7 1512 fhTrackMatchedDEtaPos = new TH2F
1513 ("hTrackMatchedDEtaPos",
5ba76d0d 1514 "d#eta of cluster-track vs cluster #it{p}_{T}",
b2e375c7 1515 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1516 fhTrackMatchedDEtaPos->SetYTitle("d#eta");
5ba76d0d 1517 fhTrackMatchedDEtaPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
b2e375c7 1518
1519 fhTrackMatchedDPhiPos = new TH2F
1520 ("hTrackMatchedDPhiPos",
5ba76d0d 1521 "d#phi of cluster-track vs cluster #it{p}_{T}",
b2e375c7 1522 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1523 fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)");
5ba76d0d 1524 fhTrackMatchedDPhiPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
b2e375c7 1525
1526 fhTrackMatchedDEtaDPhiPos = new TH2F
1527 ("hTrackMatchedDEtaDPhiPos",
08c09f10 1528 "d#eta vs d#phi of cluster-track",
b2e375c7 1529 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1530 fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)");
1531 fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
1532
1533 outputContainer->Add(fhTrackMatchedDEtaPos) ;
1534 outputContainer->Add(fhTrackMatchedDPhiPos) ;
1535 outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
5df76288 1536
b2e375c7 1537 fhTrackMatchedDEtaNeg = new TH2F
1538 ("hTrackMatchedDEtaNeg",
5ba76d0d 1539 "d#eta of cluster-track vs cluster #it{p}_{T}",
b2e375c7 1540 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1541 fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
5ba76d0d 1542 fhTrackMatchedDEtaNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
b2e375c7 1543
1544 fhTrackMatchedDPhiNeg = new TH2F
1545 ("hTrackMatchedDPhiNeg",
5ba76d0d 1546 "d#phi of cluster-track vs cluster #it{p}_{T}",
b2e375c7 1547 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1548 fhTrackMatchedDPhiNeg->SetYTitle("d#phi (rad)");
5ba76d0d 1549 fhTrackMatchedDPhiNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
b2e375c7 1550
1551 fhTrackMatchedDEtaDPhiNeg = new TH2F
1552 ("hTrackMatchedDEtaDPhiNeg",
08c09f10 1553 "d#eta vs d#phi of cluster-track",
b2e375c7 1554 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1555 fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#phi (rad)");
1556 fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
1557
1558 outputContainer->Add(fhTrackMatchedDEtaNeg) ;
1559 outputContainer->Add(fhTrackMatchedDPhiNeg) ;
1560 outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
31ae6d59 1561
5ba76d0d 1562 fhdEdx = new TH2F ("hdEdx","matched track <dE/dx> vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1563 fhdEdx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1564 fhdEdx->SetYTitle("<#it{dE}/#it{dx}>");
85c4406e 1565 outputContainer->Add(fhdEdx);
31ae6d59 1566
5ba76d0d 1567 fhEOverP = new TH2F ("hEOverP","matched track E/p vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1568 fhEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1569 fhEOverP->SetYTitle("#it{E}/#it{p}");
85c4406e 1570 outputContainer->Add(fhEOverP);
b5dbb99b 1571
4d1d8f00 1572 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >=0)
b5dbb99b 1573 {
85c4406e 1574 fhEOverPNoTRD = new TH2F ("hEOverPNoTRD","matched track E/p vs cluster E, SM not behind TRD ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
5ba76d0d 1575 fhEOverPNoTRD->SetXTitle("#it{E} (GeV)");
1576 fhEOverPNoTRD->SetYTitle("#it{E}/#it{p}");
85c4406e 1577 outputContainer->Add(fhEOverPNoTRD);
1578 }
31ae6d59 1579
764ab1f4 1580 if(IsDataMC() && fFillTMHisto)
31ae6d59 1581 {
08c09f10 1582 fhTrackMatchedMCParticlePt = new TH2F
1583 ("hTrackMatchedMCParticlePt",
31ae6d59 1584 "Origin of particle vs energy",
85c4406e 1585 nptbins,ptmin,ptmax,8,0,8);
5ba76d0d 1586 fhTrackMatchedMCParticlePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1587 //fhTrackMatchedMCParticlePt->SetYTitle("Particle type");
5dde270e 1588
08c09f10 1589 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(1 ,"Photon");
1590 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(2 ,"Electron");
1591 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1592 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(4 ,"Rest");
1593 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1594 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1595 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1596 fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
5dde270e 1597
08c09f10 1598 outputContainer->Add(fhTrackMatchedMCParticlePt);
5dde270e 1599
1600 fhTrackMatchedMCParticleDEta = new TH2F
1601 ("hTrackMatchedMCParticleDEta",
1602 "Origin of particle vs #eta residual",
1603 nresetabins,resetamin,resetamax,8,0,8);
1604 fhTrackMatchedMCParticleDEta->SetXTitle("#Delta #eta");
1605 //fhTrackMatchedMCParticleDEta->SetYTitle("Particle type");
31ae6d59 1606
5dde270e 1607 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(1 ,"Photon");
1608 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(2 ,"Electron");
1609 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1610 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(4 ,"Rest");
1611 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1612 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1613 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1614 fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1615
1616 outputContainer->Add(fhTrackMatchedMCParticleDEta);
85c4406e 1617
5dde270e 1618 fhTrackMatchedMCParticleDPhi = new TH2F
1619 ("hTrackMatchedMCParticleDPhi",
1620 "Origin of particle vs #phi residual",
1621 nresphibins,resphimin,resphimax,8,0,8);
1622 fhTrackMatchedMCParticleDPhi->SetXTitle("#Delta #phi");
1623 //fhTrackMatchedMCParticleDPhi->SetYTitle("Particle type");
1624
1625 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(1 ,"Photon");
1626 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(2 ,"Electron");
1627 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1628 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(4 ,"Rest");
1629 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1630 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1631 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1632 fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1633
1634 outputContainer->Add(fhTrackMatchedMCParticleDPhi);
31ae6d59 1635 }
85c4406e 1636 }
09273901 1637
b5dbb99b 1638 if(fFillWeightHistograms)
1639 {
78a28af3 1640 fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
85c4406e 1641 nptbins,ptmin,ptmax, 100,0,1.);
5ba76d0d 1642 fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1643 fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
78a28af3 1644 outputContainer->Add(fhECellClusterRatio);
1645
1646 fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
85c4406e 1647 nptbins,ptmin,ptmax, 100,-10,0);
5ba76d0d 1648 fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1649 fhECellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
78a28af3 1650 outputContainer->Add(fhECellClusterLogRatio);
1651
1652 fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
85c4406e 1653 nptbins,ptmin,ptmax, 100,0,1.);
5ba76d0d 1654 fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1655 fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
78a28af3 1656 outputContainer->Add(fhEMaxCellClusterRatio);
1657
1658 fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
85c4406e 1659 nptbins,ptmin,ptmax, 100,-10,0);
5ba76d0d 1660 fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1661 fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
78a28af3 1662 outputContainer->Add(fhEMaxCellClusterLogRatio);
1663
b5dbb99b 1664 for(Int_t iw = 0; iw < 14; iw++)
1665 {
1a72f6c5 1666 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),
85c4406e 1667 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
5ba76d0d 1668 fhLambda0ForW0[iw]->SetXTitle("#it{E}_{cluster}");
78a28af3 1669 fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}");
85c4406e 1670 outputContainer->Add(fhLambda0ForW0[iw]);
78a28af3 1671
85c4406e 1672 // 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),
1673 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
5ba76d0d 1674 // fhLambda1ForW0[iw]->SetXTitle("#it{E}_{cluster}");
85c4406e 1675 // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}");
1676 // outputContainer->Add(fhLambda1ForW0[iw]);
78a28af3 1677
1678 }
85c4406e 1679 }
78a28af3 1680
85c4406e 1681 if(IsDataMC())
b5dbb99b 1682 {
4bbe6213 1683 // Origin
1684
1685 fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1686 fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1687 fhMCPi0PtOrigin->SetYTitle("Origin");
1688 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1689 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1690 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1691 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1692 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1693 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1694 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1695 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1696 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1697 fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1698 outputContainer->Add(fhMCPi0PtOrigin) ;
1699
1700 fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ;
1701 fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1702 fhMCEtaPtOrigin->SetYTitle("Origin");
1703 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1704 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1705 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1706 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1707 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other");
1708 fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime");
1709 outputContainer->Add(fhMCEtaPtOrigin) ;
1710
d4546932 1711 fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
4bbe6213 1712 fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1713 fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)");
1714 outputContainer->Add(fhMCPi0ProdVertex) ;
1715
d4546932 1716 fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
4bbe6213 1717 fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1718 fhMCEtaProdVertex->SetYTitle("#it{R} (cm)");
1719 outputContainer->Add(fhMCEtaProdVertex) ;
1720
3455f821 1721 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
1722 {
5ba76d0d 1723 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",
85c4406e 1724 nptbins,ptmin,ptmax,200,0,2);
5ba76d0d 1725 fhMCPi0PtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1726 fhMCPi0PtGenRecoFraction->SetYTitle("#it{E}^{#pi^{0} mother} / #it{E}^{rec}");
85c4406e 1727 outputContainer->Add(fhMCPi0PtGenRecoFraction) ;
1728
5ba76d0d 1729 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",
85c4406e 1730 nptbins,ptmin,ptmax,200,0,2);
5ba76d0d 1731 fhMCEtaPtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1732 fhMCEtaPtGenRecoFraction->SetYTitle("#it{E}^{ #eta mother} / #it{E}^{rec}");
85c4406e 1733 outputContainer->Add(fhMCEtaPtGenRecoFraction) ;
51a0ace5 1734
85c4406e 1735 fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
5ba76d0d 1736 fhMCPi0DecayPt->SetYTitle("#it{N}");
1737 fhMCPi0DecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
85c4406e 1738 outputContainer->Add(fhMCPi0DecayPt) ;
3455f821 1739
5ba76d0d 1740 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}",
85c4406e 1741 nptbins,ptmin,ptmax,100,0,1);
5ba76d0d 1742 fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/#it{c})");
883411b2 1743 fhMCPi0DecayPtFraction->SetYTitle("E^{gen} / E^{gen-mother}");
85c4406e 1744 outputContainer->Add(fhMCPi0DecayPtFraction) ;
3455f821 1745
85c4406e 1746 fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #eta decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
5ba76d0d 1747 fhMCEtaDecayPt->SetYTitle("#it{N}");
1748 fhMCEtaDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
85c4406e 1749 outputContainer->Add(fhMCEtaDecayPt) ;
3455f821 1750
5ba76d0d 1751 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",
85c4406e 1752 nptbins,ptmin,ptmax,100,0,1);
5ba76d0d 1753 fhMCEtaDecayPtFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1754 fhMCEtaDecayPtFraction->SetYTitle("#it{E}^{gen} / #it{E}^{gen-mother}");
85c4406e 1755 outputContainer->Add(fhMCEtaDecayPtFraction) ;
3455f821 1756
85c4406e 1757 fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma decay (not #eta or #pi^{0}) identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
5ba76d0d 1758 fhMCOtherDecayPt->SetYTitle("#it{N}");
1759 fhMCOtherDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
85c4406e 1760 outputContainer->Add(fhMCOtherDecayPt) ;
3455f821 1761 }
85c4406e 1762
5df76288 1763 if(fAnaType!=kSSCalo)
b5dbb99b 1764 {
b5dbb99b 1765 fhAnglePairMCPi0 = new TH2F
1766 ("AnglePairMCPi0",
5ba76d0d 1767 "Angle between decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5);
b5dbb99b 1768 fhAnglePairMCPi0->SetYTitle("#alpha (rad)");
5ba76d0d 1769 fhAnglePairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
85c4406e 1770 outputContainer->Add(fhAnglePairMCPi0) ;
1771
5df76288 1772 fhAnglePairMCEta = new TH2F
1773 ("AnglePairMCEta",
1774 "Angle between decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,250,0,0.5);
1775 fhAnglePairMCEta->SetYTitle("#alpha (rad)");
1776 fhAnglePairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1777 outputContainer->Add(fhAnglePairMCEta) ;
1778
1779 fhMassPairMCPi0 = new TH2F
1780 ("MassPairMCPi0",
1781 "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1782 fhMassPairMCPi0->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1783 fhMassPairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1784 outputContainer->Add(fhMassPairMCPi0) ;
1785
1786 fhMassPairMCEta = new TH2F
1787 ("MassPairMCEta",
1788 "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1789 fhMassPairMCEta->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1790 fhMassPairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1791 outputContainer->Add(fhMassPairMCEta) ;
1792 }
1793
1794 for(Int_t i = 0; i < 7; i++)
1795 {
1796 fhMCE[i] = new TH1F
1797 (Form("hE_MC%s",pname[i].Data()),
1798 Form("Identified as #pi^{0} (#eta), cluster from %s",
1799 ptype[i].Data()),
1800 nptbins,ptmin,ptmax);
1801 fhMCE[i]->SetYTitle("#it{N}");
1802 fhMCE[i]->SetXTitle("#it{E} (GeV)");
1803 outputContainer->Add(fhMCE[i]) ;
1804
1805 fhMCPt[i] = new TH1F
1806 (Form("hPt_MC%s",pname[i].Data()),
1807 Form("Identified as #pi^{0} (#eta), cluster from %s",
1808 ptype[i].Data()),
1809 nptbins,ptmin,ptmax);
1810 fhMCPt[i]->SetYTitle("#it{N}");
1811 fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1812 outputContainer->Add(fhMCPt[i]) ;
1813
1814 if(fFillHighMultHistograms)
85c4406e 1815 {
17f5b4b6 1816 fhMCPtCentrality[i] = new TH2F
1817 (Form("hPtCentrality_MC%s",pname[i].Data()),
1818 Form("Identified as #pi^{0} (#eta), cluster from %s",
1819 ptype[i].Data()),
1820 nptbins,ptmin,ptmax, 100,0,100);
1821 fhMCPtCentrality[i]->SetYTitle("centrality");
5ba76d0d 1822 fhMCPtCentrality[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
17f5b4b6 1823 outputContainer->Add(fhMCPtCentrality[i]) ;
5df76288 1824 }
1825
1826 if(fAnaType == kSSCalo)
1827 {
1828 fhMCNLocMaxPt[i] = new TH2F
1829 (Form("hNLocMaxPt_MC%s",pname[i].Data()),
1830 Form("cluster from %s, #it{p}_{T} of cluster vs NLM, accepted",ptype[i].Data()),
1831 nptbins,ptmin,ptmax,20,0,20);
1832 fhMCNLocMaxPt[i] ->SetYTitle("#it{NLM}");
1833 fhMCNLocMaxPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1834 outputContainer->Add(fhMCNLocMaxPt[i]) ;
1835
1836 fhMCNLocMaxPtReject[i] = new TH2F
1837 (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
1838 Form("cluster from %s, #it{p}_{T} of cluster vs NLM, rejected",ptype[i].Data()),
1839 nptbins,ptmin,ptmax,20,0,20);
1840 fhMCNLocMaxPtReject[i] ->SetYTitle("#it{NLM}");
1841 fhMCNLocMaxPtReject[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1842 outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
17f5b4b6 1843
5df76288 1844 fhMCEReject[i] = new TH1F
1845 (Form("hEReject_MC%s",pname[i].Data()),
1846 Form("Rejected as #pi^{0} (#eta), cluster from %s",
1847 ptype[i].Data()),
1848 nptbins,ptmin,ptmax);
1849 fhMCEReject[i]->SetYTitle("#it{N}");
1850 fhMCEReject[i]->SetXTitle("#it{E} (GeV)");
1851 outputContainer->Add(fhMCEReject[i]) ;
85c4406e 1852
5df76288 1853 fhMCPtReject[i] = new TH1F
1854 (Form("hPtReject_MC%s",pname[i].Data()),
1855 Form("Rejected as #pi^{0} (#eta), cluster from %s",
1856 ptype[i].Data()),
1857 nptbins,ptmin,ptmax);
1858 fhMCPtReject[i]->SetYTitle("#it{N}");
1859 fhMCPtReject[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1860 outputContainer->Add(fhMCPtReject[i]) ;
1861 }
1862
1863 fhMCPtPhi[i] = new TH2F
1864 (Form("hPtPhi_MC%s",pname[i].Data()),
1865 Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
1866 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1867 fhMCPtPhi[i]->SetYTitle("#phi");
1868 fhMCPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1869 outputContainer->Add(fhMCPtPhi[i]) ;
1870
1871 fhMCPtEta[i] = new TH2F
1872 (Form("hPtEta_MC%s",pname[i].Data()),
1873 Form("Identified as #pi^{0} (#eta), cluster from %s",
1874 ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
1875 fhMCPtEta[i]->SetYTitle("#eta");
1876 fhMCPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1877 outputContainer->Add(fhMCPtEta[i]) ;
1878
1879 fhMCMassPt[i] = new TH2F
1880 (Form("hMassPt_MC%s",pname[i].Data()),
1881 Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1882 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1883 fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1884 fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1885 outputContainer->Add(fhMCMassPt[i]) ;
1886
1887 fhMCSelectedMassPt[i] = new TH2F
1888 (Form("hSelectedMassPt_MC%s",pname[i].Data()),
1889 Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1890 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1891 fhMCSelectedMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1892 fhMCSelectedMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1893 outputContainer->Add(fhMCSelectedMassPt[i]) ;
1894
1895 if(fAnaType == kSSCalo)
1896 {
1897 fhMCMassPtNoOverlap[i] = new TH2F
1898 (Form("hMassPtNoOverlap_MC%s",pname[i].Data()),
1899 Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
29250849 1900 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 1901 fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1902 fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
5df76288 1903 outputContainer->Add(fhMCMassPtNoOverlap[i]) ;
3455f821 1904
5df76288 1905 fhMCSelectedMassPtNoOverlap[i] = new TH2F
1906 (Form("hSelectedMassPtNoOverlap_MC%s",pname[i].Data()),
1907 Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
29250849 1908 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5df76288 1909 fhMCSelectedMassPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1910 fhMCSelectedMassPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1911 outputContainer->Add(fhMCSelectedMassPtNoOverlap[i]) ;
1912 }
1913
1914 if( fFillSelectClHisto )
1915 {
1916 fhMCPtLambda0[i] = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
1917 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptype[i].Data()),
1918 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1919 fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
1920 fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1921 outputContainer->Add(fhMCPtLambda0[i]) ;
1922
1923 fhMCPtLambda1[i] = new TH2F(Form("hELambda1_MC%s",pname[i].Data()),
1924 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{1}^{2}",ptype[i].Data()),
1925 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1926 fhMCPtLambda1[i]->SetYTitle("#lambda_{1}^{2}");
1927 fhMCPtLambda1[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1928 outputContainer->Add(fhMCPtLambda1[i]) ;
1929
1930 if(fCalorimeter=="EMCAL" && GetFirstSMCoveredByTRD() >= 0)
1253480f 1931 {
5df76288 1932 fhMCPtLambda0NoTRD[i] = new TH2F(Form("hELambda0NoTRD_MC%s",pname[i].Data()),
1933 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, NoTRD",ptype[i].Data()),
1934 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1935 fhMCPtLambda0NoTRD[i]->SetYTitle("#lambda_{0}^{2}");
1936 fhMCPtLambda0NoTRD[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1937 outputContainer->Add(fhMCPtLambda0NoTRD[i]) ;
1253480f 1938 }
3455f821 1939
5df76288 1940 if(!fFillOnlySimpleSSHisto)
3455f821 1941 {
08c09f10 1942 fhMCPtDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pname[i].Data()),
5df76288 1943 Form("Selected pair, cluster from %s : #it{p}_{T} vs dispersion^{2}",ptype[i].Data()),
1944 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
5ba76d0d 1945 fhMCPtDispersion[i]->SetYTitle("#it{D}^{2}");
1946 fhMCPtDispersion[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 1947 outputContainer->Add(fhMCPtDispersion[i]) ;
34c16486 1948
5df76288 1949 fhMCPtDispEta[i] = new TH2F (Form("hPtDispEta_MC%s",pname[i].Data()),
1950 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()),
1951 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1952 fhMCPtDispEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1953 fhMCPtDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1954 outputContainer->Add(fhMCPtDispEta[i]);
1955
1956 fhMCPtDispPhi[i] = new TH2F (Form("hPtDispPhi_MC%s",pname[i].Data()),
1957 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()),
1958 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1959 fhMCPtDispPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1960 fhMCPtDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1961 outputContainer->Add(fhMCPtDispPhi[i]);
1962
1963 fhMCPtSumEtaPhi[i] = new TH2F (Form("hPtSumEtaPhi_MC%s",pname[i].Data()),
1964 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()),
1965 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1966 fhMCPtSumEtaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1967 fhMCPtSumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
1968 outputContainer->Add(fhMCPtSumEtaPhi[i]);
1969
1970 fhMCPtDispEtaPhiDiff[i] = new TH2F (Form("hPtDispEtaPhiDiff_MC%s",pname[i].Data()),
1971 Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",ptype[i].Data()),
1972 nptbins,ptmin,ptmax,200,-10,10);
1973 fhMCPtDispEtaPhiDiff[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1974 fhMCPtDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1975 outputContainer->Add(fhMCPtDispEtaPhiDiff[i]);
1976
1977 fhMCPtSphericity[i] = new TH2F (Form("hPtSphericity_MC%s",pname[i].Data()),
1978 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()),
1979 nptbins,ptmin,ptmax, 200,-1,1);
1980 fhMCPtSphericity[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1981 fhMCPtSphericity[i]->SetYTitle("#it{s} = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1982 outputContainer->Add(fhMCPtSphericity[i]);
1983
1984 for(Int_t ie = 0; ie < 7; ie++)
34c16486 1985 {
5df76288 1986 fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
1987 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]),
1988 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1989 fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1990 fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1991 outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
1992
1993 fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pname[i].Data()),
1994 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]),
1995 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1996 fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
1997 fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1998 outputContainer->Add(fhMCLambda0DispEta[ie][i]);
1999
2000 fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2001 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]),
2002 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2003 fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2004 fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2005 outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
bfdcf7fb 2006
e4ef72be 2007 }
2008
08c09f10 2009 fhMCPtLambda0FracMaxCellCut[i] = new TH2F(Form("hELambda0FracMaxCellCut_MC%s",pname[i].Data()),
5df76288 2010 Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, Max cell fraction of energy < 0.5 ",ptype[i].Data()),
2011 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
08c09f10 2012 fhMCPtLambda0FracMaxCellCut[i]->SetYTitle("#lambda_{0}^{2}");
5ba76d0d 2013 fhMCPtLambda0FracMaxCellCut[i]->SetXTitle("#it{E} (GeV)");
08c09f10 2014 outputContainer->Add(fhMCPtLambda0FracMaxCellCut[i]) ;
e4ef72be 2015
08c09f10 2016 fhMCPtFracMaxCell[i] = new TH2F(Form("hEFracMaxCell_MC%s",pname[i].Data()),
5df76288 2017 Form("Selected pair, cluster from %s : #it{p}_{T} vs Max cell fraction of energy",ptype[i].Data()),
2018 nptbins,ptmin,ptmax,100,0,1);
5ba76d0d 2019 fhMCPtFracMaxCell[i]->SetYTitle("#it{Fraction}");
2020 fhMCPtFracMaxCell[i]->SetXTitle("#it{E} (GeV)");
08c09f10 2021 outputContainer->Add(fhMCPtFracMaxCell[i]) ;
e4ef72be 2022
5df76288 2023 }
2024 }
2025 }// MC particle loop
477d6cee 2026 }//Histos with MC
2027
4650f5cf 2028 if(fAnaType==kSSCalo)
2029 {
5ba76d0d 2030 fhAsymmetry = new TH2F ("hAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
85c4406e 2031 nptbins,ptmin,ptmax, 200, -1,1);
5ba76d0d 2032 fhAsymmetry->SetXTitle("#it{E} (GeV)");
2033 fhAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
4650f5cf 2034 outputContainer->Add(fhAsymmetry);
2035
5ba76d0d 2036 fhSelectedAsymmetry = new TH2F ("hSelectedAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
85c4406e 2037 nptbins,ptmin,ptmax, 200, -1,1);
5ba76d0d 2038 fhSelectedAsymmetry->SetXTitle("#it{E} (GeV)");
2039 fhSelectedAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
4650f5cf 2040 outputContainer->Add(fhSelectedAsymmetry);
2041
cfdf2b91 2042 fhSplitE = new TH1F
2043 ("hSplitE","Selected #pi^{0} (#eta) pairs energy sum of split sub-clusters",nptbins,ptmin,ptmax);
2044 fhSplitE->SetYTitle("counts");
5ba76d0d 2045 fhSplitE->SetXTitle("#it{E} (GeV)");
cfdf2b91 2046 outputContainer->Add(fhSplitE) ;
2047
2048 fhSplitPt = new TH1F
5ba76d0d 2049 ("hSplitPt","Selected #pi^{0} (#eta) pairs #it{p}_{T} sum of split sub-clusters",nptbins,ptmin,ptmax);
cfdf2b91 2050 fhSplitPt->SetYTitle("counts");
5ba76d0d 2051 fhSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
cfdf2b91 2052 outputContainer->Add(fhSplitPt) ;
2053
29250849 2054
2055 fhSplitPtPhi = new TH2F
5ba76d0d 2056 ("hSplitPtPhi","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #phi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
29250849 2057 fhSplitPtPhi->SetYTitle("#phi (rad)");
5ba76d0d 2058 fhSplitPtPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2059 outputContainer->Add(fhSplitPtPhi) ;
2060
2061 fhSplitPtEta = new TH2F
5ba76d0d 2062 ("hSplitPtEta","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
29250849 2063 fhSplitPtEta->SetYTitle("#eta");
5ba76d0d 2064 fhSplitPtEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2065 outputContainer->Add(fhSplitPtEta) ;
85c4406e 2066
29250849 2067
6e66993c 2068 fhNLocMaxSplitPt = new TH2F("hNLocMaxSplitPt","Number of local maxima in cluster",
08c09f10 2069 nptbins,ptmin,ptmax,20,0,20);
5ba76d0d 2070 fhNLocMaxSplitPt ->SetYTitle("#it{NLM}");
2071 fhNLocMaxSplitPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
6e66993c 2072 outputContainer->Add(fhNLocMaxSplitPt) ;
85c4406e 2073
6e66993c 2074
29250849 2075 fhMassSplitPt = new TH2F
5ba76d0d 2076 ("hMassSplitPt","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
1253480f 2077 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2078 fhMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2079 fhMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2080 outputContainer->Add(fhMassSplitPt) ;
2081
2082 fhSelectedMassSplitPt = new TH2F
5ba76d0d 2083 ("hSelectedMassSplitPt","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
1253480f 2084 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2085 fhSelectedMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2086 fhSelectedMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2087 outputContainer->Add(fhSelectedMassSplitPt) ;
2088
4650f5cf 2089 if(IsDataMC())
2090 {
1253480f 2091 fhMassSplitPtNoOverlap = new TH2F
5ba76d0d 2092 ("hMassSplitPtNoOverlap","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
1253480f 2093 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2094 fhMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2095 fhMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1253480f 2096 outputContainer->Add(fhMassSplitPtNoOverlap) ;
2097
2098 fhSelectedMassSplitPtNoOverlap = new TH2F
5ba76d0d 2099 ("hSelectedMassSplitPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
1253480f 2100 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2101 fhSelectedMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2102 fhSelectedMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1253480f 2103 outputContainer->Add(fhSelectedMassSplitPtNoOverlap) ;
5df76288 2104
1253480f 2105
2106 fhMCPi0PtRecoPtPrim = new TH2F
5ba76d0d 2107 ("hMCPi0PtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
1253480f 2108 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2109 fhMCPi0PtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2110 fhMCPi0PtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2111 outputContainer->Add(fhMCPi0PtRecoPtPrim ) ;
2112
2113 fhMCPi0PtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2114 ("hMCPi0PtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
1253480f 2115 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2116 fhMCPi0PtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2117 fhMCPi0PtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2118 outputContainer->Add(fhMCPi0PtRecoPtPrimNoOverlap ) ;
2119
2120 fhMCPi0SelectedPtRecoPtPrim = new TH2F
5ba76d0d 2121 ("hMCPi0SelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
1253480f 2122 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2123 fhMCPi0SelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2124 fhMCPi0SelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2125 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrim ) ;
2126
2127 fhMCPi0SelectedPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2128 ("hMCPi0SelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
1253480f 2129 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2130 fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2131 fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2132 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimNoOverlap ) ;
5df76288 2133
1253480f 2134
2135 fhMCPi0SplitPtRecoPtPrim = new TH2F
5ba76d0d 2136 ("hMCPi0SplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
1253480f 2137 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2138 fhMCPi0SplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2139 fhMCPi0SplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2140 outputContainer->Add(fhMCPi0SplitPtRecoPtPrim ) ;
2141
2142 fhMCPi0SplitPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2143 ("hMCPi0SplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
1253480f 2144 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2145 fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2146 fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2147 outputContainer->Add(fhMCPi0SplitPtRecoPtPrimNoOverlap ) ;
2148
2149 fhMCPi0SelectedSplitPtRecoPtPrim = new TH2F
5ba76d0d 2150 ("hMCPi0SelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
1253480f 2151 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2152 fhMCPi0SelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2153 fhMCPi0SelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2154 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrim ) ;
2155
2156 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2157 ("hMCPi0SelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
1253480f 2158 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2159 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2160 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2161 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ) ;
5df76288 2162
1253480f 2163 fhMCEtaPtRecoPtPrim = new TH2F
5ba76d0d 2164 ("hMCEtaPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
1253480f 2165 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2166 fhMCEtaPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2167 fhMCEtaPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2168 outputContainer->Add(fhMCEtaPtRecoPtPrim ) ;
2169
2170 fhMCEtaPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2171 ("hMCEtaPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
1253480f 2172 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2173 fhMCEtaPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2174 fhMCEtaPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2175 outputContainer->Add(fhMCEtaPtRecoPtPrimNoOverlap ) ;
2176
2177 fhMCEtaSelectedPtRecoPtPrim = new TH2F
5ba76d0d 2178 ("hMCEtaSelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
1253480f 2179 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2180 fhMCEtaSelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2181 fhMCEtaSelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2182 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrim ) ;
2183
2184 fhMCEtaSelectedPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2185 ("hMCEtaSelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
1253480f 2186 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2187 fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2188 fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2189 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimNoOverlap ) ;
2190
2191
2192 fhMCEtaSplitPtRecoPtPrim = new TH2F
5ba76d0d 2193 ("hMCEtaSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
1253480f 2194 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2195 fhMCEtaSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2196 fhMCEtaSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2197 outputContainer->Add(fhMCEtaSplitPtRecoPtPrim ) ;
2198
2199 fhMCEtaSplitPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2200 ("hMCEtaSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
1253480f 2201 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2202 fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2203 fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2204 outputContainer->Add(fhMCEtaSplitPtRecoPtPrimNoOverlap ) ;
2205
2206 fhMCEtaSelectedSplitPtRecoPtPrim = new TH2F
5ba76d0d 2207 ("hMCEtaSelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
1253480f 2208 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2209 fhMCEtaSelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2210 fhMCEtaSelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2211 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrim ) ;
2212
2213 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap = new TH2F
5ba76d0d 2214 ("hMCEtaSelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
1253480f 2215 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2216 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2217 fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
1253480f 2218 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ) ;
2219
afba5771 2220
2221 for(Int_t inlm = 0; inlm < 3; inlm++)
2222 {
2223 fhMCPi0PtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2224 (Form("hMCPi0PtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2225 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2226 fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2227 fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2228 outputContainer->Add(fhMCPi0PtRecoPtPrimLocMax[inlm] ) ;
2229
2230 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2231 (Form("hMCPi0SelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2232 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2233 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2234 fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2235 outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ) ;
2236
2237 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2238 (Form("hMCPi0SplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2239 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2240 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2241 fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2242 outputContainer->Add(fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ) ;
2243
2244 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2245 (Form("hMCPi0SelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2246 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2247 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2248 fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2249 outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2250
2251 fhMCEtaPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2252 (Form("hMCEtaPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2253 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2254 fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2255 fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2256 outputContainer->Add(fhMCEtaPtRecoPtPrimLocMax[inlm] ) ;
2257
2258 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2259 (Form("hMCEtaSelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2260 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2261 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2262 fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2263 outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ) ;
2264
2265 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2266 (Form("hMCEtaSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2267 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2268 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2269 fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2270 outputContainer->Add(fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ) ;
2271
2272 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] = new TH2F
5ba76d0d 2273 (Form("hMCEtaSelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
afba5771 2274 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
5ba76d0d 2275 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2276 fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
afba5771 2277 outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2278
2279 }
2280
5df76288 2281 for(Int_t i = 0; i< 7; i++)
4650f5cf 2282 {
08c09f10 2283 fhMCPtAsymmetry[i] = new TH2F (Form("hEAsymmetry_MC%s",pname[i].Data()),
5df76288 2284 Form("cluster from %s : #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",ptype[i].Data()),
2285 nptbins,ptmin,ptmax, 200,-1,1);
5ba76d0d 2286 fhMCPtAsymmetry[i]->SetXTitle("#it{E} (GeV)");
2287 fhMCPtAsymmetry[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
08c09f10 2288 outputContainer->Add(fhMCPtAsymmetry[i]);
cfdf2b91 2289
2290 fhMCSplitE[i] = new TH1F
2928c46d 2291 (Form("hSplitE_MC%s",pname[i].Data()),
cfdf2b91 2292 Form("cluster from %s, energy sum of split sub-clusters",ptype[i].Data()),
2293 nptbins,ptmin,ptmax);
2294 fhMCSplitE[i]->SetYTitle("counts");
5ba76d0d 2295 fhMCSplitE[i]->SetXTitle("#it{E} (GeV)");
cfdf2b91 2296 outputContainer->Add(fhMCSplitE[i]) ;
85c4406e 2297
cfdf2b91 2298 fhMCSplitPt[i] = new TH1F
2299 (Form("hSplitPt_MC%s",pname[i].Data()),
5ba76d0d 2300 Form("cluster from %s, #it{p}_{T} sum of split sub-clusters",ptype[i].Data()),
cfdf2b91 2301 nptbins,ptmin,ptmax);
2302 fhMCSplitPt[i]->SetYTitle("counts");
5ba76d0d 2303 fhMCSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
cfdf2b91 2304 outputContainer->Add(fhMCSplitPt[i]) ;
2305
29250849 2306
2307 fhMCSplitPtPhi[i] = new TH2F
2308 (Form("hSplitPtPhi_MC%s",pname[i].Data()),
2309 Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
2310 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2311 fhMCSplitPtPhi[i]->SetYTitle("#phi");
5ba76d0d 2312 fhMCSplitPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2313 outputContainer->Add(fhMCSplitPtPhi[i]) ;
2314
2315 fhMCSplitPtEta[i] = new TH2F
2316 (Form("hSplitPtEta_MC%s",pname[i].Data()),
2317 Form("Identified as #pi^{0} (#eta), cluster from %s",
2318 ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
2319 fhMCSplitPtEta[i]->SetYTitle("#eta");
5ba76d0d 2320 fhMCSplitPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2321 outputContainer->Add(fhMCSplitPtEta[i]) ;
85c4406e 2322
29250849 2323
6e66993c 2324 fhMCNLocMaxSplitPt[i] = new TH2F
2325 (Form("hNLocMaxSplitPt_MC%s",pname[i].Data()),
5ba76d0d 2326 Form("cluster from %s, #it{p}_{T} sum of split sub-clusters, for NLM",ptype[i].Data()),
08c09f10 2327 nptbins,ptmin,ptmax,20,0,20);
5ba76d0d 2328 fhMCNLocMaxSplitPt[i] ->SetYTitle("#it{NLM}");
2329 fhMCNLocMaxSplitPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
6e66993c 2330 outputContainer->Add(fhMCNLocMaxSplitPt[i]) ;
2331
29250849 2332 fhMCMassSplitPt[i] = new TH2F
2333 (Form("hMassSplitPt_MC%s",pname[i].Data()),
5ba76d0d 2334 Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
29250849 2335 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2336 fhMCMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2337 fhMCMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2338 outputContainer->Add(fhMCMassSplitPt[i]) ;
2339
2340 fhMCSelectedMassSplitPt[i] = new TH2F
2341 (Form("hSelectedMassSplitPt_MC%s",pname[i].Data()),
5ba76d0d 2342 Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
29250849 2343 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2344 fhMCSelectedMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2345 fhMCSelectedMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
29250849 2346 outputContainer->Add(fhMCSelectedMassSplitPt[i]) ;
5df76288 2347
1253480f 2348 fhMCMassSplitPtNoOverlap[i] = new TH2F
2349 (Form("hMassSplitPtNoOverlap_MC%s",pname[i].Data()),
5ba76d0d 2350 Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1253480f 2351 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2352 fhMCMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2353 fhMCMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1253480f 2354 outputContainer->Add(fhMCMassSplitPtNoOverlap[i]) ;
29250849 2355
1253480f 2356 fhMCSelectedMassSplitPtNoOverlap[i] = new TH2F
2357 (Form("hSelectedMassSplitPtNoOverlap_MC%s",pname[i].Data()),
5ba76d0d 2358 Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1253480f 2359 nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
5ba76d0d 2360 fhMCSelectedMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2361 fhMCSelectedMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1253480f 2362 outputContainer->Add(fhMCSelectedMassSplitPtNoOverlap[i]) ;
85c4406e 2363 }
4650f5cf 2364 }
2365 }
477d6cee 2366
764ab1f4 2367 if(fAnaType==kSSCalo && fFillSelectClHisto && !fFillOnlySimpleSSHisto )
bfdcf7fb 2368 {
bfdcf7fb 2369 for(Int_t i = 0; i< 3; i++)
2370 {
08c09f10 2371 fhPtAsymmetryLocMax[i] = new TH2F(Form("hEAsymmetryLocMax%d",i+1),
5df76288 2372 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()),
2373 nptbins,ptmin,ptmax,200, -1,1);
5ba76d0d 2374 fhPtAsymmetryLocMax[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2375 fhPtAsymmetryLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
08c09f10 2376 outputContainer->Add(fhPtAsymmetryLocMax[i]) ;
bfdcf7fb 2377 }
2378
d2655d46 2379 for(Int_t ie = 0; ie< 7; ie++)
bfdcf7fb 2380 {
2381
2382 fhAsymmetryLambda0[ie] = new TH2F (Form("hAsymmetryLambda0_EBin%d",ie),
5ba76d0d 2383 Form("#lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
85c4406e 2384 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2385 fhAsymmetryLambda0[ie]->SetXTitle("#lambda_{0}^{2}");
2386 fhAsymmetryLambda0[ie]->SetYTitle("A = ( E1 - E2 ) / ( E1 + E2 )");
85c4406e 2387 outputContainer->Add(fhAsymmetryLambda0[ie]);
bfdcf7fb 2388
2389 fhAsymmetryDispEta[ie] = new TH2F (Form("hAsymmetryDispEta_EBin%d",ie),
5ba76d0d 2390 Form("#sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
85c4406e 2391 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2392 fhAsymmetryDispEta[ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
5ba76d0d 2393 fhAsymmetryDispEta[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
85c4406e 2394 outputContainer->Add(fhAsymmetryDispEta[ie]);
bfdcf7fb 2395
2396 fhAsymmetryDispPhi[ie] = new TH2F (Form("hAsymmetryDispPhi_EBin%d",ie),
5ba76d0d 2397 Form("#sigma^{2}_{#phi #phi} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
85c4406e 2398 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2399 fhAsymmetryDispPhi[ie]->SetXTitle("#sigma^{2}_{#phi #phi}");
5ba76d0d 2400 fhAsymmetryDispPhi[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
85c4406e 2401 outputContainer->Add(fhAsymmetryDispPhi[ie]);
2402 }
bfdcf7fb 2403
2404
85c4406e 2405 if(IsDataMC())
bfdcf7fb 2406 {
5df76288 2407 for(Int_t i = 0; i< 7; i++)
bfdcf7fb 2408 {
d2655d46 2409 for(Int_t ie = 0; ie < 7; ie++)
bfdcf7fb 2410 {
2411 fhMCAsymmetryLambda0[ie][i] = new TH2F (Form("hMCAsymmetryLambda0_EBin%d_MC%s",ie,pname[i].Data()),
5df76288 2412 Form("cluster from %s : #lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
85c4406e 2413 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2414 fhMCAsymmetryLambda0[ie][i]->SetXTitle("#lambda_{0}^{2}");
5ba76d0d 2415 fhMCAsymmetryLambda0[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
85c4406e 2416 outputContainer->Add(fhMCAsymmetryLambda0[ie][i]);
bfdcf7fb 2417
2418 fhMCAsymmetryDispEta[ie][i] = new TH2F (Form("hMCAsymmetryDispEta_EBin%d_MC%s",ie,pname[i].Data()),
5df76288 2419 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]),
85c4406e 2420 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2421 fhMCAsymmetryDispEta[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
5ba76d0d 2422 fhMCAsymmetryDispEta[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
85c4406e 2423 outputContainer->Add(fhMCAsymmetryDispEta[ie][i]);
bfdcf7fb 2424
2425 fhMCAsymmetryDispPhi[ie][i] = new TH2F (Form("hMCAsymmetryDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
5df76288 2426 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]),
85c4406e 2427 ssbins,ssmin,ssmax , 200,-1,1);
bfdcf7fb 2428 fhMCAsymmetryDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#phi #phi}");
5ba76d0d 2429 fhMCAsymmetryDispPhi[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
85c4406e 2430 outputContainer->Add(fhMCAsymmetryDispPhi[ie][i]);
2431 }
bfdcf7fb 2432 }
2433 }
bfdcf7fb 2434 }
2435
2ad19c3d 2436 if(fFillPileUpHistograms)
2437 {
5e5e056f 2438
2439 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
85c4406e 2440
5e5e056f 2441 for(Int_t i = 0 ; i < 7 ; i++)
2442 {
126b8c62 2443 fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
5df76288 2444 Form("Selected #pi^{0} (#eta) #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
5ba76d0d 2445 fhPtPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
126b8c62 2446 outputContainer->Add(fhPtPileUp[i]);
2447
2448 fhPtCellTimePileUp[i] = new TH2F(Form("hPtCellTimePileUp%s",pileUpName[i].Data()),
5df76288 2449 Form("Pt vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()),
2450 nptbins,ptmin,ptmax,ntimptbins,timemin,timemax);
5ba76d0d 2451 fhPtCellTimePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2452 fhPtCellTimePileUp[i]->SetYTitle("#it{t}_{cell} (ns)");
126b8c62 2453 outputContainer->Add(fhPtCellTimePileUp[i]);
2454
2455 fhPtTimeDiffPileUp[i] = new TH2F(Form("hPtTimeDiffPileUp%s",pileUpName[i].Data()),
5df76288 2456 Form("Pt vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2457 nptbins,ptmin,ptmax,400,-200,200);
5ba76d0d 2458 fhPtTimeDiffPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2459 fhPtTimeDiffPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
126b8c62 2460 outputContainer->Add(fhPtTimeDiffPileUp[i]);
5df76288 2461
5e5e056f 2462 }
2463
5ba76d0d 2464 fhTimePtNoCut = new TH2F ("hTimePt_NoCut","#it{t} of cluster vs #it{E} of clusters, no cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2465 fhTimePtNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2466 fhTimePtNoCut->SetYTitle("#it{t} (ns)");
126b8c62 2467 outputContainer->Add(fhTimePtNoCut);
2ad19c3d 2468
5ba76d0d 2469 fhTimePtSPD = new TH2F ("hTimePt_SPD","#it{t} of cluster vs #it{E} of clusters, SPD cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2470 fhTimePtSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2471 fhTimePtSPD->SetYTitle("#it{t} (ns)");
126b8c62 2472 outputContainer->Add(fhTimePtSPD);
2ad19c3d 2473
5ba76d0d 2474 fhTimePtSPDMulti = new TH2F ("hTimePt_SPDMulti","time of cluster vs #it{E} of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2475 fhTimePtSPDMulti->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2476 fhTimePtSPDMulti->SetYTitle("#it{t} (ns)");
126b8c62 2477 outputContainer->Add(fhTimePtSPDMulti);
2ad19c3d 2478
5ba76d0d 2479 fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","#it{t} of cluster vs #it{N} pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2ad19c3d 2480 fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
5ba76d0d 2481 fhTimeNPileUpVertSPD->SetXTitle("#it{t} (ns)");
85c4406e 2482 outputContainer->Add(fhTimeNPileUpVertSPD);
2ad19c3d 2483
5ba76d0d 2484 fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","#it{t} of cluster vs #it{N} pile-up Tracks vertex", ntimptbins,timemin,timemax, 50,0,50 );
2ad19c3d 2485 fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
5ba76d0d 2486 fhTimeNPileUpVertTrack->SetXTitle("#it{t} (ns)");
85c4406e 2487 outputContainer->Add(fhTimeNPileUpVertTrack);
2ad19c3d 2488
5ba76d0d 2489 fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","#it{t} of cluster vs #it{N} constributors to pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2ad19c3d 2490 fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
5ba76d0d 2491 fhTimeNPileUpVertContributors->SetXTitle("#it{t} (ns)");
85c4406e 2492 outputContainer->Add(fhTimeNPileUpVertContributors);
2ad19c3d 2493
5ba76d0d 2494 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);
2495 fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{Z} (cm) ");
2496 fhTimePileUpMainVertexZDistance->SetXTitle("#it{t} (ns)");
85c4406e 2497 outputContainer->Add(fhTimePileUpMainVertexZDistance);
2ad19c3d 2498
5ba76d0d 2499 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);
2500 fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{Z} (cm) ");
2501 fhTimePileUpMainVertexZDiamond->SetXTitle("#it{t} (ns)");
85c4406e 2502 outputContainer->Add(fhTimePileUpMainVertexZDiamond);
0f7e7205 2503
5ba76d0d 2504 fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","#it{p}_{T} of cluster vs #it{N} pile-up SPD vertex",
85c4406e 2505 nptbins,ptmin,ptmax,20,0,20);
0f7e7205 2506 fhPtNPileUpSPDVtx->SetYTitle("# vertex ");
5ba76d0d 2507 fhPtNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
0f7e7205 2508 outputContainer->Add(fhPtNPileUpSPDVtx);
2509
5ba76d0d 2510 fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","#it{p}_{T} of cluster vs #it{N} pile-up Tracks vertex",
85c4406e 2511 nptbins,ptmin,ptmax, 20,0,20 );
0f7e7205 2512 fhPtNPileUpTrkVtx->SetYTitle("# vertex ");
5ba76d0d 2513 fhPtNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 2514 outputContainer->Add(fhPtNPileUpTrkVtx);
0f7e7205 2515
5ba76d0d 2516 fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","#it{p}_{T} of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
85c4406e 2517 nptbins,ptmin,ptmax,20,0,20);
0f7e7205 2518 fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
5ba76d0d 2519 fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
0f7e7205 2520 outputContainer->Add(fhPtNPileUpSPDVtxTimeCut);
2521
5ba76d0d 2522 fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","#it{p}_{T} of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
85c4406e 2523 nptbins,ptmin,ptmax, 20,0,20 );
0f7e7205 2524 fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
5ba76d0d 2525 fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 2526 outputContainer->Add(fhPtNPileUpTrkVtxTimeCut);
2527
5ba76d0d 2528 fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","#it{p}_{T} of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
85c4406e 2529 nptbins,ptmin,ptmax,20,0,20);
2530 fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
5ba76d0d 2531 fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 2532 outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2);
2533
5ba76d0d 2534 fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","#it{p}_{T} of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
85c4406e 2535 nptbins,ptmin,ptmax, 20,0,20 );
2536 fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
5ba76d0d 2537 fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
85c4406e 2538 outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2);
2539
2ad19c3d 2540 }
2541
477d6cee 2542 //Keep neutral meson selection histograms if requiered
2543 //Setting done in AliNeutralMesonSelection
2544
e4ef72be 2545 if(fAnaType!=kSSCalo && GetNeutralMesonSelection())
2546 {
477d6cee 2547 TList * nmsHistos = GetNeutralMesonSelection()->GetCreateOutputObjects() ;
e4ef72be 2548
477d6cee 2549 if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
2550 for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
e4ef72be 2551
5ae09196 2552 delete nmsHistos;
477d6cee 2553 }
2554
477d6cee 2555 return outputContainer ;
2556
2557}
2558
3455f821 2559//_____________________________________________
2560Int_t AliAnaPi0EbE::GetMCIndex(const Int_t tag)
85c4406e 2561{
58e28a28 2562 // Assign mc index depending on MC bit set
3455f821 2563
2564 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
2565 {
85c4406e 2566 return kmcPi0 ;
3455f821 2567 }//pi0
2568 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
2569 {
85c4406e 2570 return kmcEta ;
2571 }//eta
3455f821 2572 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
5df76288 2573 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) )
3455f821 2574 {
5df76288 2575 return kmcPi0Decay ;
2576 }//decay photon from pi0
2577 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2578 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) )
3455f821 2579 {
5df76288 2580 return kmcEtaDecay ;
2581 }//decay photon from pi0
3455f821 2582 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2583 {
85c4406e 2584 return kmcElectron ;
3455f821 2585 }//electron
85c4406e 2586 else
3455f821 2587 {
85c4406e 2588 return kmcHadron ;
2589 }//other particles
3455f821 2590
2591}
2592
2593//__________________________________________________________________
85c4406e 2594void AliAnaPi0EbE::HasPairSameMCMother(AliAODPWG4Particle * photon1,
2595 AliAODPWG4Particle * photon2,
3455f821 2596 Int_t & label, Int_t & tag)
2597{
2598 // Check the labels of pare in case mother was same pi0 or eta
2599 // Set the new AOD accordingly
2600
2601 Int_t label1 = photon1->GetLabel();
2602 Int_t label2 = photon2->GetLabel();
2603
2604 if(label1 < 0 || label2 < 0 ) return ;
2605
2644ead9 2606 //Int_t tag1 = GetMCAnalysisUtils()->CheckOrigin(label1, GetReader());
2607 //Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(label2, GetReader());
3455f821 2608 Int_t tag1 = photon1->GetTag();
2609 Int_t tag2 = photon2->GetTag();
2610
2611 if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Origin of: photon1 %d; photon2 %d \n",tag1, tag2);
85c4406e 2612 if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) &&
3455f821 2613 GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay) ) ||
08c09f10 2614 (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) &&
2615 GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCEtaDecay) )
3455f821 2616 )
2617 {