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