1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //_________________________________________________________________________
18 // Class for the photon identification.
19 // Clusters from calorimeters are identified as photons
20 // and kept in the AOD. Few histograms produced.
21 // Produces input for other analysis classes like AliAnaPi0,
22 // AliAnaParticleHadronCorrelation ...
24 // -- Author: Gustavo Conesa (LNF-INFN)
25 //////////////////////////////////////////////////////////////////////////////
28 // --- ROOT system ---
30 #include <TClonesArray.h>
31 #include <TObjString.h>
32 #include "TParticle.h"
33 #include "TDatabasePDG.h"
35 // --- Analysis system ---
36 #include "AliAnaPhoton.h"
37 #include "AliCaloTrackReader.h"
39 #include "AliCaloPID.h"
40 #include "AliMCAnalysisUtils.h"
41 #include "AliFiducialCut.h"
42 #include "AliVCluster.h"
43 #include "AliAODMCParticle.h"
44 #include "AliMixedEvent.h"
45 #include "AliAODEvent.h"
46 #include "AliESDEvent.h"
49 #include "AliPHOSGeoUtils.h"
50 #include "AliEMCALGeometry.h"
52 ClassImp(AliAnaPhoton)
54 //____________________________
55 AliAnaPhoton::AliAnaPhoton() :
56 AliAnaCaloTrackCorrBaseClass(),
57 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
58 fRejectTrackMatch(0), fFillTMHisto(kFALSE),
59 fTimeCutMin(-10000), fTimeCutMax(10000),
61 fNLMCutMin(-1), fNLMCutMax(10),
62 fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
63 fNOriginHistograms(8), fNPrimaryHistograms(4),
64 fMomentum(), fPrimaryMom(),
68 fhNCellsE(0), fhCellsE(0),
69 fhMaxCellDiffClusterE(0), fhTimePt(0), fhEtaPhi(0),
71 fhEPhoton(0), fhPtPhoton(0),
72 fhPhiPhoton(0), fhEtaPhoton(0),
73 fhEtaPhiPhoton(0), fhEtaPhi05Photon(0),
74 fhPtCentralityPhoton(0), fhPtEventPlanePhoton(0),
76 // Shower shape histograms
78 fhDispE(0), fhLam0E(0), fhLam1E(0),
79 fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0),
80 fhDispETM(0), fhLam0ETM(0), fhLam1ETM(0),
81 fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam1ETMTRD(0),
83 fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0),
84 fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0),
86 fhEtaLam0LowE(0), fhPhiLam0LowE(0),
87 fhEtaLam0HighE(0), fhPhiLam0HighE(0),
88 fhLam0DispLowE(0), fhLam0DispHighE(0),
89 fhLam1Lam0LowE(0), fhLam1Lam0HighE(0),
90 fhDispLam1LowE(0), fhDispLam1HighE(0),
91 fhDispEtaE(0), fhDispPhiE(0),
92 fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
93 fhDispEtaPhiDiffE(0), fhSphericityE(0),
94 fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0),
97 fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0),
99 fhEmbeddedSignalFractionEnergy(0),
100 fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0),
101 fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0),
102 fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0),
103 fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0),
105 fhTimePtPhotonNoCut(0), fhTimePtPhotonSPD(0),
106 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
107 fhPtPhotonNPileUpSPDVtx(0), fhPtPhotonNPileUpTrkVtx(0),
108 fhPtPhotonNPileUpSPDVtxTimeCut(0), fhPtPhotonNPileUpTrkVtxTimeCut(0),
109 fhPtPhotonNPileUpSPDVtxTimeCut2(0), fhPtPhotonNPileUpTrkVtxTimeCut2(0),
111 fhEClusterSM(0), fhEPhotonSM(0),
112 fhPtClusterSM(0), fhPtPhotonSM(0)
116 for(Int_t i = 0; i < 14; i++)
128 for(Int_t i = 0; i < 7; i++)
136 fhPtPrimMCAcc [i] = 0;
137 fhEPrimMCAcc [i] = 0;
138 fhPhiPrimMCAcc[i] = 0;
139 fhEtaPrimMCAcc[i] = 0;
140 fhYPrimMCAcc [i] = 0;
142 fhDispEtaDispPhi[i] = 0;
143 fhLambda0DispPhi[i] = 0;
144 fhLambda0DispEta[i] = 0;
146 fhPtPhotonPileUp[i] = 0;
147 fhClusterTimeDiffPhotonPileUp [i] = 0;
149 for(Int_t j = 0; j < 6; j++)
151 fhMCDispEtaDispPhi[i][j] = 0;
152 fhMCLambda0DispEta[i][j] = 0;
153 fhMCLambda0DispPhi[i][j] = 0;
157 for(Int_t i = 0; i < 6; i++)
159 fhMCELambda0 [i] = 0;
160 fhMCELambda1 [i] = 0;
161 fhMCEDispersion [i] = 0;
163 fhMCMaxCellDiffClusterE[i] = 0;
164 fhLambda0DispEta[i] = 0;
165 fhLambda0DispPhi[i] = 0;
167 fhMCLambda0vsClusterMaxCellDiffE0[i] = 0;
168 fhMCLambda0vsClusterMaxCellDiffE2[i] = 0;
169 fhMCLambda0vsClusterMaxCellDiffE6[i] = 0;
170 fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0;
171 fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0;
172 fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0;
174 fhMCEDispEta [i] = 0;
175 fhMCEDispPhi [i] = 0;
176 fhMCESumEtaPhi [i] = 0;
177 fhMCEDispEtaPhiDiff[i] = 0;
178 fhMCESphericity [i] = 0;
181 for(Int_t i = 0; i < 5; i++)
183 fhClusterCutsE [i] = 0;
184 fhClusterCutsPt[i] = 0;
187 // Track matching residuals
188 for(Int_t i = 0; i < 2; i++)
190 fhTrackMatchedDEta [i] = 0; fhTrackMatchedDPhi [i] = 0; fhTrackMatchedDEtaDPhi [i] = 0;
191 fhTrackMatchedDEtaNeg[i] = 0; fhTrackMatchedDPhiNeg[i] = 0; fhTrackMatchedDEtaDPhiNeg[i] = 0;
192 fhTrackMatchedDEtaPos[i] = 0; fhTrackMatchedDPhiPos[i] = 0; fhTrackMatchedDEtaDPhiPos[i] = 0;
193 fhTrackMatchedDEtaTRD[i] = 0; fhTrackMatchedDPhiTRD[i] = 0;
194 fhTrackMatchedDEtaMCOverlap[i] = 0; fhTrackMatchedDPhiMCOverlap[i] = 0;
195 fhTrackMatchedDEtaMCNoOverlap[i] = 0; fhTrackMatchedDPhiMCNoOverlap[i] = 0;
196 fhTrackMatchedDEtaMCConversion[i] = 0; fhTrackMatchedDPhiMCConversion[i] = 0;
197 fhTrackMatchedMCParticle[i] = 0; fhTrackMatchedMCParticle[i] = 0;
198 fhdEdx[i] = 0; fhEOverP[i] = 0;
202 //Initialize parameters
207 //_________________________________________________________________________________________
208 Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, Int_t nMaxima)
210 //Select clusters if they pass different cuts
212 Float_t ptcluster = fMomentum.Pt();
213 Float_t ecluster = fMomentum.E();
214 Float_t etacluster = fMomentum.Eta();
215 Float_t phicluster = fMomentum.Phi();
217 if(phicluster < 0) phicluster+=TMath::TwoPi();
219 Bool_t matched = IsTrackMatched(calo,GetReader()->GetInputEvent());
222 printf("AliAnaPhoton::ClusterSelected() - Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
223 GetReader()->GetEventNumber(),
224 ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster);
226 fhClusterCutsE [1]->Fill( ecluster);
227 fhClusterCutsPt[1]->Fill(ptcluster);
229 if(ecluster > 0.5) fhEtaPhi->Fill(etacluster, phicluster);
231 Int_t nSM = GetModuleNumber(calo);
232 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
234 fhEClusterSM ->Fill(ecluster ,nSM);
235 fhPtClusterSM->Fill(ptcluster,nSM);
238 //.......................................
239 //If too small or big energy, skip it
240 if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ;
242 if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
244 fhClusterCutsE [2]->Fill( ecluster);
245 fhClusterCutsPt[2]->Fill(ptcluster);
247 //.......................................
248 // TOF cut, BE CAREFUL WITH THIS CUT
249 Double_t tof = calo->GetTOF()*1e9;
250 if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
252 if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID());
254 fhClusterCutsE [3]->Fill( ecluster);
255 fhClusterCutsPt[3]->Fill(ptcluster);
257 //.......................................
258 if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
260 if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID());
262 fhClusterCutsE [4]->Fill( ecluster);
263 fhClusterCutsPt[4]->Fill(ptcluster);
265 if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ;
266 if(GetDebug() > 2) printf(" \t Cluster %d pass NLM %d of out of range \n",calo->GetID(), nMaxima);
268 fhClusterCutsE [5]->Fill( ecluster);
269 fhClusterCutsPt[5]->Fill(ptcluster);
271 //.......................................
272 //Check acceptance selection
273 if(IsFiducialCutOn())
275 Bool_t in = GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),GetCalorimeter()) ;
276 if(! in ) return kFALSE ;
279 if(GetDebug() > 2) printf("\t Fiducial cut passed \n");
281 fhClusterCutsE [6]->Fill( ecluster);
282 fhClusterCutsPt[6]->Fill(ptcluster);
284 //.......................................
285 //Skip matched clusters with tracks
287 // Fill matching residual histograms before PID cuts
288 if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,0);
290 if(fRejectTrackMatch)
294 if(GetDebug() > 2) printf("\t Reject track-matched clusters\n");
298 if(GetDebug() > 2) printf(" Track-matching cut passed \n");
299 }// reject matched clusters
301 fhClusterCutsE [7]->Fill( ecluster);
302 fhClusterCutsPt[7]->Fill(ptcluster);
304 //.......................................
305 //Check Distance to Bad channel, set bit.
306 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
307 if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
308 if(distBad < fMinDist)
309 {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
312 else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist);
314 fhClusterCutsE [8]->Fill( ecluster);
315 fhClusterCutsPt[8]->Fill(ptcluster);
318 printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
319 GetReader()->GetEventNumber(),
320 ecluster, ptcluster,fMomentum.Phi()*TMath::RadToDeg(),fMomentum.Eta());
322 //All checks passed, cluster selected
327 //___________________________________________
328 void AliAnaPhoton::FillAcceptanceHistograms()
330 //Fill acceptance histograms if MC data is available
332 Double_t photonY = -100 ;
333 Double_t photonE = -1 ;
334 Double_t photonPt = -1 ;
335 Double_t photonPhi = 100 ;
336 Double_t photonEta = -1 ;
343 Bool_t inacceptance = kFALSE ;
345 TParticle * primStack = 0;
346 AliAODMCParticle * primAOD = 0;
348 // Get the ESD MC particles container
349 AliStack * stack = 0;
350 if( GetReader()->ReadStack() )
352 stack = GetMCStack();
354 nprim = stack->GetNtrack();
357 // Get the AOD MC particles container
358 TClonesArray * mcparticles = 0;
359 if( GetReader()->ReadAODMCParticles() )
361 mcparticles = GetReader()->GetAODMCParticles();
362 if( !mcparticles ) return;
363 nprim = mcparticles->GetEntriesFast();
366 for(Int_t i=0 ; i < nprim; i++)
368 if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ;
370 if(GetReader()->ReadStack())
372 primStack = stack->Particle(i) ;
375 printf("AliAnaPhoton::FillAcceptanceHistograms() - ESD primaries pointer not available!!\n");
379 pdg = primStack->GetPdgCode();
380 status = primStack->GetStatusCode();
382 if(primStack->Energy() == TMath::Abs(primStack->Pz())) continue ; //Protection against floating point exception
384 //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
385 // prim->GetName(), prim->GetPdgCode());
388 primStack->Momentum(fMomentum);
390 photonY = 0.5*TMath::Log((primStack->Energy()+primStack->Pz())/(primStack->Energy()-primStack->Pz())) ;
394 primAOD = (AliAODMCParticle *) mcparticles->At(i);
397 printf("AliAnaPhoton::FillAcceptanceHistograms() - AOD primaries pointer not available!!\n");
401 pdg = primAOD->GetPdgCode();
402 status = primAOD->GetStatus();
404 if(primAOD->E() == TMath::Abs(primAOD->Pz())) continue ; //Protection against floating point exception
407 fMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
409 photonY = 0.5*TMath::Log((primAOD->E()+primAOD->Pz())/(primAOD->E()-primAOD->Pz())) ;
412 // Select only photons in the final state
413 if(pdg != 22 ) continue ;
415 // If too small or too large pt, skip, same cut as for data analysis
416 photonPt = fMomentum.Pt () ;
418 if(photonPt < GetMinPt() || photonPt > GetMaxPt() ) continue ;
420 photonE = fMomentum.E () ;
421 photonEta = fMomentum.Eta() ;
422 photonPhi = fMomentum.Phi() ;
424 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
426 // Check if photons hit desired acceptance
427 inacceptance = kTRUE;
429 // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
430 if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),GetCalorimeter())) inacceptance = kFALSE ;
432 // Check if photons hit the Calorimeter acceptance
433 if(IsRealCaloAcceptanceOn()) // defined on base class
435 if(GetReader()->ReadStack() &&
436 !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primStack)) inacceptance = kFALSE ;
437 if(GetReader()->ReadAODMCParticles() &&
438 !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primAOD )) inacceptance = kFALSE ;
441 // Get tag of this particle photon from fragmentation, decay, prompt ...
442 // Set the origin of the photon.
443 tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader(),GetCalorimeter());
445 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
447 // A conversion photon from a hadron, skip this kind of photon
448 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
449 // GetMCAnalysisUtils()->PrintMCTag(tag);
454 // Consider only final state particles, but this depends on generator,
455 // status 1 is the usual one, in case of not being ok, leave the possibility
456 // to not consider this.
457 if(status > 1) continue ; // Avoid "partonic" photons
459 Bool_t takeIt = kFALSE ;
460 if(status == 1 && GetMCAnalysisUtils()->GetMCGenerator() != AliMCAnalysisUtils::kBoxLike ) takeIt = kTRUE ;
462 if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) continue;
465 if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt))
467 mcIndex = kmcPPrompt;
469 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation))
471 mcIndex = kmcPFragmentation ;
473 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
477 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
479 mcIndex = kmcPPi0Decay;
481 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
482 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)))
484 mcIndex = kmcPOtherDecay;
488 // Other decay but from non final state particle
489 mcIndex = kmcPOtherDecay;
492 if(!takeIt && (mcIndex == kmcPPi0Decay || mcIndex == kmcPOtherDecay)) takeIt = kTRUE ;
494 if(!takeIt) continue ;
496 //Fill histograms for all photons
497 fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ;
498 if(TMath::Abs(photonY) < 1.0)
500 fhEPrimMC [kmcPPhoton]->Fill(photonE ) ;
501 fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ;
502 fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ;
503 fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ;
508 fhEPrimMCAcc [kmcPPhoton]->Fill(photonE ) ;
509 fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt) ;
510 fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ;
511 fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta) ;
512 fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY) ;
515 //Fill histograms for photons origin
516 if(mcIndex < fNPrimaryHistograms)
518 fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ;
519 if(TMath::Abs(photonY) < 1.0)
521 fhEPrimMC [mcIndex]->Fill(photonE ) ;
522 fhPtPrimMC [mcIndex]->Fill(photonPt) ;
523 fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ;
524 fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta) ;
529 fhEPrimMCAcc [mcIndex]->Fill(photonE ) ;
530 fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ;
531 fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ;
532 fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta) ;
533 fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ;
540 //________________________________________________________________________________
541 void AliAnaPhoton::FillPileUpHistograms(AliVCluster* cluster, AliVCaloCells *cells,
544 // Fill some histograms to understand pile-up
546 Float_t pt = fMomentum.Pt();
547 Float_t time = cluster->GetTOF()*1.e9;
549 AliVEvent * event = GetReader()->GetInputEvent();
551 if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(pt);
552 if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(pt);
553 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(pt);
554 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(pt);
555 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(pt);
556 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(pt);
557 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(pt);
559 fhTimePtPhotonNoCut->Fill(pt,time);
560 if(GetReader()->IsPileUpFromSPD()) fhTimePtPhotonSPD->Fill(pt,time);
562 // cells inside the cluster
564 //Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
565 if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(time) < 30)
567 for (Int_t ipos = 0; ipos < cluster->GetNCells(); ipos++)
569 Int_t absId = cluster->GetCellsAbsId()[ipos];
571 if( absId == absIdMax ) continue ;
573 Double_t tcell = cells->GetCellTime(absId);
574 Float_t amp = cells->GetCellAmplitude(absId);
575 Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
577 GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,tcell,cells);
580 Float_t diff = (time-tcell);
582 if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
584 if(GetReader()->IsPileUpFromSPD()) fhClusterTimeDiffPhotonPileUp[0]->Fill(pt, diff);
585 if(GetReader()->IsPileUpFromEMCal()) fhClusterTimeDiffPhotonPileUp[1]->Fill(pt, diff);
586 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhClusterTimeDiffPhotonPileUp[2]->Fill(pt, diff);
587 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhClusterTimeDiffPhotonPileUp[3]->Fill(pt, diff);
588 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhClusterTimeDiffPhotonPileUp[4]->Fill(pt, diff);
589 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhClusterTimeDiffPhotonPileUp[5]->Fill(pt, diff);
590 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhClusterTimeDiffPhotonPileUp[6]->Fill(pt, diff);
595 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
596 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
598 // N pile up vertices
604 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
605 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
610 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
611 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
616 fhTimeNPileUpVertSPD ->Fill(time,nVtxSPD);
617 fhTimeNPileUpVertTrack->Fill(time,nVtxTrk);
620 fhPtPhotonNPileUpSPDVtx->Fill(pt,nVtxSPD);
621 fhPtPhotonNPileUpTrkVtx->Fill(pt,nVtxTrk);
623 if(TMath::Abs(time) < 25)
625 fhPtPhotonNPileUpSPDVtxTimeCut->Fill(pt,nVtxSPD);
626 fhPtPhotonNPileUpTrkVtxTimeCut->Fill(pt,nVtxTrk);
629 if(time < 75 && time > -25)
631 fhPtPhotonNPileUpSPDVtxTimeCut2->Fill(pt,nVtxSPD);
632 fhPtPhotonNPileUpTrkVtxTimeCut2->Fill(pt,nVtxTrk);
637 //_______________________________________________________________________________
638 void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster,
639 Int_t mcTag, Int_t maxCellFraction)
641 //Fill cluster Shower Shape histograms
643 if(!fFillSSHistograms || GetMixedEvent()) return;
645 Float_t energy = cluster->E();
646 Int_t ncells = cluster->GetNCells();
647 Float_t lambda0 = cluster->GetM02();
648 Float_t lambda1 = cluster->GetM20();
649 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
651 Float_t eta = fMomentum.Eta();
652 Float_t phi = fMomentum.Phi();
653 if(phi < 0) phi+=TMath::TwoPi();
655 fhLam0E ->Fill(energy,lambda0);
656 fhLam1E ->Fill(energy,lambda1);
657 fhDispE ->Fill(energy,disp);
659 if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
660 GetModuleNumber(cluster) >= GetFirstSMCoveredByTRD() )
662 fhLam0ETRD->Fill(energy,lambda0);
663 fhLam1ETRD->Fill(energy,lambda1);
664 fhDispETRD->Fill(energy,disp);
667 Float_t l0 = 0., l1 = 0.;
668 Float_t dispp= 0., dEta = 0., dPhi = 0.;
669 Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
670 if(GetCalorimeter() == kEMCAL && !fFillOnlySimpleSSHisto)
672 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
673 l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
674 //printf("AliAnaPhoton::FillShowerShapeHistogram - l0 %2.6f, l1 %2.6f, disp %2.6f, dEta %2.6f, dPhi %2.6f, sEta %2.6f, sPhi %2.6f, sEtaPhi %2.6f \n",
675 // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi );
676 //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n",
677 // disp, dPhi+dEta );
678 fhDispEtaE -> Fill(energy,dEta);
679 fhDispPhiE -> Fill(energy,dPhi);
680 fhSumEtaE -> Fill(energy,sEta);
681 fhSumPhiE -> Fill(energy,sPhi);
682 fhSumEtaPhiE -> Fill(energy,sEtaPhi);
683 fhDispEtaPhiDiffE -> Fill(energy,dPhi-dEta);
684 if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
685 if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.));
686 if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.));
689 if (energy < 2 ) ebin = 0;
690 else if (energy < 4 ) ebin = 1;
691 else if (energy < 6 ) ebin = 2;
692 else if (energy < 10) ebin = 3;
693 else if (energy < 15) ebin = 4;
694 else if (energy < 20) ebin = 5;
697 fhDispEtaDispPhi[ebin]->Fill(dEta ,dPhi);
698 fhLambda0DispEta[ebin]->Fill(lambda0,dEta);
699 fhLambda0DispPhi[ebin]->Fill(lambda0,dPhi);
703 // if track-matching was of, check effect of track-matching residual cut
705 if(!fRejectTrackMatch)
707 Float_t dZ = cluster->GetTrackDz();
708 Float_t dR = cluster->GetTrackDx();
709 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
711 dR = 2000., dZ = 2000.;
712 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
715 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
717 fhLam0ETM ->Fill(energy,lambda0);
718 fhLam1ETM ->Fill(energy,lambda1);
719 fhDispETM ->Fill(energy,disp);
721 if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
722 GetModuleNumber(cluster) >= GetFirstSMCoveredByTRD() )
724 fhLam0ETMTRD->Fill(energy,lambda0);
725 fhLam1ETMTRD->Fill(energy,lambda1);
726 fhDispETMTRD->Fill(energy,disp);
729 }// if track-matching was of, check effect of matching residual cut
732 if(!fFillOnlySimpleSSHisto)
736 fhNCellsLam0LowE ->Fill(ncells,lambda0);
737 fhNCellsLam1LowE ->Fill(ncells,lambda1);
738 fhNCellsDispLowE ->Fill(ncells,disp);
740 fhLam1Lam0LowE ->Fill(lambda1,lambda0);
741 fhLam0DispLowE ->Fill(lambda0,disp);
742 fhDispLam1LowE ->Fill(disp,lambda1);
743 fhEtaLam0LowE ->Fill(eta,lambda0);
744 fhPhiLam0LowE ->Fill(phi,lambda0);
748 fhNCellsLam0HighE ->Fill(ncells,lambda0);
749 fhNCellsLam1HighE ->Fill(ncells,lambda1);
750 fhNCellsDispHighE ->Fill(ncells,disp);
752 fhLam1Lam0HighE ->Fill(lambda1,lambda0);
753 fhLam0DispHighE ->Fill(lambda0,disp);
754 fhDispLam1HighE ->Fill(disp,lambda1);
755 fhEtaLam0HighE ->Fill(eta, lambda0);
756 fhPhiLam0HighE ->Fill(phi, lambda0);
762 AliVCaloCells* cells = 0;
763 if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
764 else cells = GetPHOSCells();
766 //Fill histograms to check shape of embedded clusters
767 Float_t fraction = 0;
768 // printf("check embedding %i\n",GetReader()->IsEmbeddedClusterSelectionOn());
770 if(GetReader()->IsEmbeddedClusterSelectionOn())
771 {//Only working for EMCAL
772 // printf("embedded\n");
773 Float_t clusterE = 0; // recalculate in case corrections applied.
775 for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
777 cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell));
779 fraction+=cellE*cluster->GetCellAmplitudeFraction(icell);
782 //Fraction of total energy due to the embedded signal
786 printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE);
788 fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction);
790 } // embedded fraction
792 // Check the origin and fill histograms
796 if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
797 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
798 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
799 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
801 mcIndex = kmcssPhoton ;
803 if(!GetReader()->IsEmbeddedClusterSelectionOn())
805 //Check particle overlaps in cluster
807 // Compare the primary depositing more energy with the rest,
808 // if no photon/electron as comon ancestor (conversions), count as other particle
809 const UInt_t nlabels = cluster->GetNLabels();
810 Int_t overpdg[nlabels];
811 Int_t noverlaps = GetMCAnalysisUtils()->GetNOverlaps(cluster->GetLabels(), nlabels,mcTag,-1,GetReader(),overpdg);
813 //printf("N overlaps %d \n",noverlaps);
817 fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0);
819 else if(noverlaps == 1)
821 fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0);
823 else if(noverlaps > 1)
825 fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0);
829 printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!\n", noverlaps);
833 //Fill histograms to check shape of embedded clusters
834 if(GetReader()->IsEmbeddedClusterSelectionOn())
838 fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0);
840 else if(fraction > 0.5)
842 fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0);
844 else if(fraction > 0.1)
846 fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0);
850 fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0);
854 }//photon no conversion
855 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
856 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
857 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
858 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
860 mcIndex = kmcssConversion ;
863 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron))
865 mcIndex = kmcssElectron ;
867 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) )
871 //Fill histograms to check shape of embedded clusters
872 if(GetReader()->IsEmbeddedClusterSelectionOn())
876 fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0);
878 else if(fraction > 0.5)
880 fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0);
882 else if(fraction > 0.1)
884 fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0);
888 fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0);
893 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) )
899 mcIndex = kmcssOther ;
902 fhMCELambda0 [mcIndex]->Fill(energy, lambda0);
903 fhMCELambda1 [mcIndex]->Fill(energy, lambda1);
904 fhMCEDispersion [mcIndex]->Fill(energy, disp);
905 fhMCNCellsE [mcIndex]->Fill(energy, ncells);
906 fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction);
908 if(!fFillOnlySimpleSSHisto)
912 fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction);
913 fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction);
917 fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction);
918 fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction);
922 fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction);
923 fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction);
926 if(GetCalorimeter() == kEMCAL)
928 fhMCEDispEta [mcIndex]-> Fill(energy,dEta);
929 fhMCEDispPhi [mcIndex]-> Fill(energy,dPhi);
930 fhMCESumEtaPhi [mcIndex]-> Fill(energy,sEtaPhi);
931 fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy,dPhi-dEta);
932 if(dEta+dPhi>0)fhMCESphericity[mcIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
935 if (energy < 2 ) ebin = 0;
936 else if (energy < 4 ) ebin = 1;
937 else if (energy < 6 ) ebin = 2;
938 else if (energy < 10) ebin = 3;
939 else if (energy < 15) ebin = 4;
940 else if (energy < 20) ebin = 5;
943 fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta ,dPhi);
944 fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0,dEta);
945 fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0,dPhi);
952 //__________________________________________________________________________
953 void AliAnaPhoton::FillTrackMatchingResidualHistograms(AliVCluster* cluster,
956 // If selected, fill histograms with residuals of matched clusters, help to define track matching cut
957 // Residual filled for different cuts 0 (No cut), after 1 PID cut
959 Float_t dZ = cluster->GetTrackDz();
960 Float_t dR = cluster->GetTrackDx();
962 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
964 dR = 2000., dZ = 2000.;
965 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
968 AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
970 Bool_t positive = kFALSE;
971 if(track) positive = (track->Charge()>0);
973 if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999)
975 fhTrackMatchedDEta[cut]->Fill(cluster->E(),dZ);
976 fhTrackMatchedDPhi[cut]->Fill(cluster->E(),dR);
977 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ,dR);
983 fhTrackMatchedDEtaPos[cut]->Fill(cluster->E(),dZ);
984 fhTrackMatchedDPhiPos[cut]->Fill(cluster->E(),dR);
985 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiPos[cut]->Fill(dZ,dR);
989 fhTrackMatchedDEtaNeg[cut]->Fill(cluster->E(),dZ);
990 fhTrackMatchedDPhiNeg[cut]->Fill(cluster->E(),dR);
991 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiNeg[cut]->Fill(dZ,dR);
995 Int_t nSMod = GetModuleNumber(cluster);
997 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
998 nSMod >= GetFirstSMCoveredByTRD() )
1000 fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(),dZ);
1001 fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(),dR);
1004 // Check dEdx and E/p of matched clusters
1006 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
1010 Float_t dEdx = track->GetTPCsignal();
1011 Float_t eOverp = cluster->E()/track->P();
1013 fhdEdx[cut] ->Fill(cluster->E(), dEdx);
1014 fhEOverP[cut]->Fill(cluster->E(), eOverp);
1016 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
1017 nSMod >= GetFirstSMCoveredByTRD() )
1018 fhEOverPTRD[cut]->Fill(cluster->E(), eOverp);
1023 printf("AliAnaPhoton::FillTrackMatchingResidualHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
1030 Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader(),GetCalorimeter());
1032 if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
1034 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1035 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5 );
1036 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5 );
1037 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5 );
1038 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5 );
1040 // Check if several particles contributed to cluster and discard overlapped mesons
1041 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1042 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1044 if(cluster->GetNLabels()==1)
1046 fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(),dZ);
1047 fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(),dR);
1051 fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(),dZ);
1052 fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(),dR);
1060 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1061 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5 );
1062 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5 );
1063 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5 );
1064 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5 );
1066 // Check if several particles contributed to cluster
1067 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1068 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1070 fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(),dZ);
1071 fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(),dR);
1079 } // residuals window
1085 //___________________________________________
1086 TObjString * AliAnaPhoton::GetAnalysisCuts()
1088 //Save parameters used for analysis
1089 TString parList ; //this will be list of parameters used for this analysis.
1090 const Int_t buffersize = 255;
1091 char onePar[buffersize] ;
1093 snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ;
1095 snprintf(onePar,buffersize,"Calorimeter: %s\n",GetCalorimeterString().Data()) ;
1097 snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ;
1099 snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ;
1101 snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ;
1103 snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ;
1106 //Get parameters set in base class.
1107 parList += GetBaseParametersList() ;
1109 //Get parameters set in PID class.
1110 parList += GetCaloPID()->GetPIDParametersList() ;
1112 //Get parameters set in FiducialCut class (not available yet)
1113 //parlist += GetFidCut()->GetFidCutParametersList()
1115 return new TObjString(parList) ;
1118 //________________________________________________________________________
1119 TList * AliAnaPhoton::GetCreateOutputObjects()
1121 // Create histograms to be saved in output file and
1122 // store them in outputContainer
1123 TList * outputContainer = new TList() ;
1124 outputContainer->SetName("PhotonHistos") ;
1126 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
1127 Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
1128 Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1129 Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin();
1130 Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin();
1131 Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
1133 Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
1134 Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
1135 Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
1136 Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
1137 Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
1138 Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
1140 Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
1141 Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
1142 Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
1143 Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
1144 Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
1145 Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
1147 Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies
1149 TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"};
1150 for (Int_t i = 0; i < 10 ; i++)
1152 fhClusterCutsE[i] = new TH1F(Form("hE_Cut_%d_%s", i, cut[i].Data()),
1153 Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
1154 nptbins,ptmin,ptmax);
1155 fhClusterCutsE[i]->SetYTitle("d#it{N}/d#it{E} ");
1156 fhClusterCutsE[i]->SetXTitle("#it{E} (GeV)");
1157 outputContainer->Add(fhClusterCutsE[i]) ;
1159 fhClusterCutsPt[i] = new TH1F(Form("hPt_Cut_%d_%s", i, cut[i].Data()),
1160 Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
1161 nptbins,ptmin,ptmax);
1162 fhClusterCutsPt[i]->SetYTitle("d#it{N}/d#it{E} ");
1163 fhClusterCutsPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1164 outputContainer->Add(fhClusterCutsPt[i]) ;
1167 fhEClusterSM = new TH2F("hEClusterSM","Raw clusters E and super-module number",
1168 nptbins,ptmin,ptmax,
1169 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1170 fhEClusterSM->SetYTitle("SuperModule ");
1171 fhEClusterSM->SetXTitle("#it{E} (GeV)");
1172 outputContainer->Add(fhEClusterSM) ;
1174 fhPtClusterSM = new TH2F("hPtClusterSM","Raw clusters #it{p}_{T} and super-module number",
1175 nptbins,ptmin,ptmax,
1176 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1177 fhPtClusterSM->SetYTitle("SuperModule ");
1178 fhPtClusterSM->SetXTitle("#it{E} (GeV)");
1179 outputContainer->Add(fhPtClusterSM) ;
1181 fhEPhotonSM = new TH2F("hEPhotonSM","Selected clusters E and super-module number",
1182 nptbins,ptmin,ptmax,
1183 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1184 fhEPhotonSM->SetYTitle("SuperModule ");
1185 fhEPhotonSM->SetXTitle("#it{E} (GeV)");
1186 outputContainer->Add(fhEPhotonSM) ;
1188 fhPtPhotonSM = new TH2F("hPtPhotonSM","Selected clusters #it{p}_{T} and super-module number",
1189 nptbins,ptmin,ptmax,
1190 GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1191 fhPtPhotonSM->SetYTitle("SuperModule ");
1192 fhPtPhotonSM->SetXTitle("#it{E} (GeV)");
1193 outputContainer->Add(fhPtPhotonSM) ;
1195 fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1196 fhNCellsE->SetXTitle("#it{E} (GeV)");
1197 fhNCellsE->SetYTitle("# of cells in cluster");
1198 outputContainer->Add(fhNCellsE);
1200 fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax);
1201 fhCellsE->SetXTitle("#it{E}_{cluster} (GeV)");
1202 fhCellsE->SetYTitle("#it{E}_{cell} (GeV)");
1203 outputContainer->Add(fhCellsE);
1205 fhTimePt = new TH2F ("hTimePt","time of cluster vs pT of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1206 fhTimePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1207 fhTimePt->SetYTitle("#it{time} (ns)");
1208 outputContainer->Add(fhTimePt);
1210 fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
1211 nptbins,ptmin,ptmax, 500,0,1.);
1212 fhMaxCellDiffClusterE->SetXTitle("#it{E}_{cluster} (GeV) ");
1213 fhMaxCellDiffClusterE->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1214 outputContainer->Add(fhMaxCellDiffClusterE);
1216 fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax);
1217 fhEPhoton->SetYTitle("#it{counts}");
1218 fhEPhoton->SetXTitle("#it{E}_{#gamma}(GeV)");
1219 outputContainer->Add(fhEPhoton) ;
1221 fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs #it{p}_{T}",nptbins,ptmin,ptmax);
1222 fhPtPhoton->SetYTitle("#it{counts}");
1223 fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/#it{c})");
1224 outputContainer->Add(fhPtPhoton) ;
1226 if(IsHighMultiplicityAnalysisOn())
1228 fhPtCentralityPhoton = new TH2F("hPtCentralityPhoton","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1229 fhPtCentralityPhoton->SetYTitle("Centrality");
1230 fhPtCentralityPhoton->SetXTitle("#it{p}_{T}(GeV/#it{c})");
1231 outputContainer->Add(fhPtCentralityPhoton) ;
1233 fhPtEventPlanePhoton = new TH2F("hPtEventPlanePhoton","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1234 fhPtEventPlanePhoton->SetYTitle("Event plane angle (rad)");
1235 fhPtEventPlanePhoton->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1236 outputContainer->Add(fhPtEventPlanePhoton) ;
1240 ("hEtaPhi","cluster,#it{E} > 0.5 GeV, #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1241 fhEtaPhi->SetYTitle("#phi (rad)");
1242 fhEtaPhi->SetXTitle("#eta");
1243 outputContainer->Add(fhEtaPhi) ;
1245 fhPhiPhoton = new TH2F
1246 ("hPhiPhoton","#phi_{#gamma} vs #it{p}_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1247 fhPhiPhoton->SetYTitle("#phi (rad)");
1248 fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
1249 outputContainer->Add(fhPhiPhoton) ;
1251 fhEtaPhoton = new TH2F
1252 ("hEtaPhoton","#eta_{#gamma} vs #it{p}_{T}",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1253 fhEtaPhoton->SetYTitle("#eta");
1254 fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
1255 outputContainer->Add(fhEtaPhoton) ;
1257 fhEtaPhiPhoton = new TH2F
1258 ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1259 fhEtaPhiPhoton->SetYTitle("#phi (rad)");
1260 fhEtaPhiPhoton->SetXTitle("#eta");
1261 outputContainer->Add(fhEtaPhiPhoton) ;
1262 if(GetMinPt() < 0.5)
1264 fhEtaPhi05Photon = new TH2F
1265 ("hEtaPhi05Photon","#eta vs #phi, E < 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
1266 fhEtaPhi05Photon->SetYTitle("#phi (rad)");
1267 fhEtaPhi05Photon->SetXTitle("#eta");
1268 outputContainer->Add(fhEtaPhi05Photon) ;
1271 fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster",
1272 nptbins,ptmin,ptmax,10,0,10);
1273 fhNLocMax ->SetYTitle("N maxima");
1274 fhNLocMax ->SetXTitle("#it{E} (GeV)");
1275 outputContainer->Add(fhNLocMax) ;
1278 if(fFillSSHistograms)
1280 fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1281 fhLam0E->SetYTitle("#lambda_{0}^{2}");
1282 fhLam0E->SetXTitle("#it{E} (GeV)");
1283 outputContainer->Add(fhLam0E);
1285 fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1286 fhLam1E->SetYTitle("#lambda_{1}^{2}");
1287 fhLam1E->SetXTitle("#it{E} (GeV)");
1288 outputContainer->Add(fhLam1E);
1290 fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1291 fhDispE->SetYTitle("D^{2}");
1292 fhDispE->SetXTitle("#it{E} (GeV) ");
1293 outputContainer->Add(fhDispE);
1295 if(!fRejectTrackMatch)
1297 fhLam0ETM = new TH2F ("hLam0ETM","#lambda_{0}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1298 fhLam0ETM->SetYTitle("#lambda_{0}^{2}");
1299 fhLam0ETM->SetXTitle("#it{E} (GeV)");
1300 outputContainer->Add(fhLam0ETM);
1302 fhLam1ETM = new TH2F ("hLam1ETM","#lambda_{1}^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1303 fhLam1ETM->SetYTitle("#lambda_{1}^{2}");
1304 fhLam1ETM->SetXTitle("#it{E} (GeV)");
1305 outputContainer->Add(fhLam1ETM);
1307 fhDispETM = new TH2F ("hDispETM"," dispersion^{2} vs E, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1308 fhDispETM->SetYTitle("D^{2}");
1309 fhDispETM->SetXTitle("#it{E} (GeV) ");
1310 outputContainer->Add(fhDispETM);
1313 if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
1315 fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1316 fhLam0ETRD->SetYTitle("#lambda_{0}^{2}");
1317 fhLam0ETRD->SetXTitle("#it{E} (GeV)");
1318 outputContainer->Add(fhLam0ETRD);
1320 fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1321 fhLam1ETRD->SetYTitle("#lambda_{1}^{2}");
1322 fhLam1ETRD->SetXTitle("#it{E} (GeV)");
1323 outputContainer->Add(fhLam1ETRD);
1325 fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1326 fhDispETRD->SetYTitle("Dispersion^{2}");
1327 fhDispETRD->SetXTitle("#it{E} (GeV) ");
1328 outputContainer->Add(fhDispETRD);
1330 if(!fRejectTrackMatch && GetFirstSMCoveredByTRD() >=0 )
1332 fhLam0ETMTRD = new TH2F ("hLam0ETMTRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1333 fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}");
1334 fhLam0ETMTRD->SetXTitle("#it{E} (GeV)");
1335 outputContainer->Add(fhLam0ETMTRD);
1337 fhLam1ETMTRD = new TH2F ("hLam1ETMTRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1338 fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}");
1339 fhLam1ETMTRD->SetXTitle("#it{E} (GeV)");
1340 outputContainer->Add(fhLam1ETMTRD);
1342 fhDispETMTRD = new TH2F ("hDispETMTRD"," dispersion^{2} vs E, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1343 fhDispETMTRD->SetYTitle("Dispersion^{2}");
1344 fhDispETMTRD->SetXTitle("#it{E} (GeV) ");
1345 outputContainer->Add(fhDispETMTRD);
1349 if(!fFillOnlySimpleSSHisto)
1351 fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1352 fhNCellsLam0LowE->SetXTitle("N_{cells}");
1353 fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}");
1354 outputContainer->Add(fhNCellsLam0LowE);
1356 fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1357 fhNCellsLam0HighE->SetXTitle("N_{cells}");
1358 fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}");
1359 outputContainer->Add(fhNCellsLam0HighE);
1361 fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1362 fhNCellsLam1LowE->SetXTitle("N_{cells}");
1363 fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}");
1364 outputContainer->Add(fhNCellsLam1LowE);
1366 fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1367 fhNCellsLam1HighE->SetXTitle("N_{cells}");
1368 fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}");
1369 outputContainer->Add(fhNCellsLam1HighE);
1371 fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1372 fhNCellsDispLowE->SetXTitle("N_{cells}");
1373 fhNCellsDispLowE->SetYTitle("D^{2}");
1374 outputContainer->Add(fhNCellsDispLowE);
1376 fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1377 fhNCellsDispHighE->SetXTitle("N_{cells}");
1378 fhNCellsDispHighE->SetYTitle("D^{2}");
1379 outputContainer->Add(fhNCellsDispHighE);
1381 fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1382 fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}");
1383 fhEtaLam0LowE->SetXTitle("#eta");
1384 outputContainer->Add(fhEtaLam0LowE);
1386 fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1387 fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}");
1388 fhPhiLam0LowE->SetXTitle("#phi");
1389 outputContainer->Add(fhPhiLam0LowE);
1391 fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, #it{E} > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1392 fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}");
1393 fhEtaLam0HighE->SetXTitle("#eta");
1394 outputContainer->Add(fhEtaLam0HighE);
1396 fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, #it{E} > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1397 fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}");
1398 fhPhiLam0HighE->SetXTitle("#phi");
1399 outputContainer->Add(fhPhiLam0HighE);
1401 fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1402 fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}");
1403 fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}");
1404 outputContainer->Add(fhLam1Lam0LowE);
1406 fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1407 fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}");
1408 fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}");
1409 outputContainer->Add(fhLam1Lam0HighE);
1411 fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1412 fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}");
1413 fhLam0DispLowE->SetYTitle("D^{2}");
1414 outputContainer->Add(fhLam0DispLowE);
1416 fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1417 fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}");
1418 fhLam0DispHighE->SetYTitle("D^{2}");
1419 outputContainer->Add(fhLam0DispHighE);
1421 fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1422 fhDispLam1LowE->SetXTitle("D^{2}");
1423 fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}");
1424 outputContainer->Add(fhDispLam1LowE);
1426 fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1427 fhDispLam1HighE->SetXTitle("D^{2}");
1428 fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}");
1429 outputContainer->Add(fhDispLam1HighE);
1431 if(GetCalorimeter() == kEMCAL)
1433 fhDispEtaE = new TH2F ("hDispEtaE","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1434 fhDispEtaE->SetXTitle("#it{E} (GeV)");
1435 fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}");
1436 outputContainer->Add(fhDispEtaE);
1438 fhDispPhiE = new TH2F ("hDispPhiE","#sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1439 fhDispPhiE->SetXTitle("#it{E} (GeV)");
1440 fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}");
1441 outputContainer->Add(fhDispPhiE);
1443 fhSumEtaE = new TH2F ("hSumEtaE","#delta^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1444 fhSumEtaE->SetXTitle("#it{E} (GeV)");
1445 fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}");
1446 outputContainer->Add(fhSumEtaE);
1448 fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",
1449 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1450 fhSumPhiE->SetXTitle("#it{E} (GeV)");
1451 fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}");
1452 outputContainer->Add(fhSumPhiE);
1454 fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",
1455 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1456 fhSumEtaPhiE->SetXTitle("#it{E} (GeV)");
1457 fhSumEtaPhiE->SetYTitle("#delta^{2}_{#eta #phi}");
1458 outputContainer->Add(fhSumEtaPhiE);
1460 fhDispEtaPhiDiffE = new TH2F ("hDispEtaPhiDiffE","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",
1461 nptbins,ptmin,ptmax,200, -10,10);
1462 fhDispEtaPhiDiffE->SetXTitle("#it{E} (GeV)");
1463 fhDispEtaPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1464 outputContainer->Add(fhDispEtaPhiDiffE);
1466 fhSphericityE = new TH2F ("hSphericityE","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",
1467 nptbins,ptmin,ptmax, 200, -1,1);
1468 fhSphericityE->SetXTitle("#it{E} (GeV)");
1469 fhSphericityE->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1470 outputContainer->Add(fhSphericityE);
1472 fhDispSumEtaDiffE = new TH2F ("hDispSumEtaDiffE","#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1473 fhDispSumEtaDiffE->SetXTitle("#it{E} (GeV)");
1474 fhDispSumEtaDiffE->SetYTitle("#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average");
1475 outputContainer->Add(fhDispSumEtaDiffE);
1477 fhDispSumPhiDiffE = new TH2F ("hDispSumPhiDiffE","#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1478 fhDispSumPhiDiffE->SetXTitle("#it{E} (GeV)");
1479 fhDispSumPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average");
1480 outputContainer->Add(fhDispSumPhiDiffE);
1482 for(Int_t i = 0; i < 7; i++)
1484 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]),
1485 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1486 fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1487 fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1488 outputContainer->Add(fhDispEtaDispPhi[i]);
1490 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]),
1491 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1492 fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1493 fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1494 outputContainer->Add(fhLambda0DispEta[i]);
1496 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]),
1497 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1498 fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1499 fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1500 outputContainer->Add(fhLambda0DispPhi[i]);
1510 TString cutTM [] = {"NoCut",""};
1512 for(Int_t i = 0; i < 2; i++)
1514 fhTrackMatchedDEta[i] = new TH2F
1515 (Form("hTrackMatchedDEta%s",cutTM[i].Data()),
1516 Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1517 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1518 fhTrackMatchedDEta[i]->SetYTitle("d#eta");
1519 fhTrackMatchedDEta[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1521 fhTrackMatchedDPhi[i] = new TH2F
1522 (Form("hTrackMatchedDPhi%s",cutTM[i].Data()),
1523 Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1524 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1525 fhTrackMatchedDPhi[i]->SetYTitle("d#phi (rad)");
1526 fhTrackMatchedDPhi[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1528 fhTrackMatchedDEtaDPhi[i] = new TH2F
1529 (Form("hTrackMatchedDEtaDPhi%s",cutTM[i].Data()),
1530 Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1531 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1532 fhTrackMatchedDEtaDPhi[i]->SetYTitle("d#phi (rad)");
1533 fhTrackMatchedDEtaDPhi[i]->SetXTitle("d#eta");
1535 fhTrackMatchedDEtaPos[i] = new TH2F
1536 (Form("hTrackMatchedDEtaPos%s",cutTM[i].Data()),
1537 Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1538 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1539 fhTrackMatchedDEtaPos[i]->SetYTitle("d#eta");
1540 fhTrackMatchedDEtaPos[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1542 fhTrackMatchedDPhiPos[i] = new TH2F
1543 (Form("hTrackMatchedDPhiPos%s",cutTM[i].Data()),
1544 Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1545 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1546 fhTrackMatchedDPhiPos[i]->SetYTitle("d#phi (rad)");
1547 fhTrackMatchedDPhiPos[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1549 fhTrackMatchedDEtaDPhiPos[i] = new TH2F
1550 (Form("hTrackMatchedDEtaDPhiPos%s",cutTM[i].Data()),
1551 Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1552 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1553 fhTrackMatchedDEtaDPhiPos[i]->SetYTitle("d#phi (rad)");
1554 fhTrackMatchedDEtaDPhiPos[i]->SetXTitle("d#eta");
1556 fhTrackMatchedDEtaNeg[i] = new TH2F
1557 (Form("hTrackMatchedDEtaNeg%s",cutTM[i].Data()),
1558 Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1559 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1560 fhTrackMatchedDEtaNeg[i]->SetYTitle("d#eta");
1561 fhTrackMatchedDEtaNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1563 fhTrackMatchedDPhiNeg[i] = new TH2F
1564 (Form("hTrackMatchedDPhiNeg%s",cutTM[i].Data()),
1565 Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1566 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1567 fhTrackMatchedDPhiNeg[i]->SetYTitle("d#phi (rad)");
1568 fhTrackMatchedDPhiNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1570 fhTrackMatchedDEtaDPhiNeg[i] = new TH2F
1571 (Form("hTrackMatchedDEtaDPhiNeg%s",cutTM[i].Data()),
1572 Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1573 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1574 fhTrackMatchedDEtaDPhiNeg[i]->SetYTitle("d#phi (rad)");
1575 fhTrackMatchedDEtaDPhiNeg[i]->SetXTitle("d#eta");
1577 fhdEdx[i] = new TH2F (Form("hdEdx%s",cutTM[i].Data()),Form("matched track <dE/dx> vs cluster E, %s",cutTM[i].Data()),
1578 nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1579 fhdEdx[i]->SetXTitle("#it{E} (GeV)");
1580 fhdEdx[i]->SetYTitle("<dE/dx>");
1582 fhEOverP[i] = new TH2F (Form("hEOverP%s",cutTM[i].Data()),Form("matched track E/p vs cluster E, %s",cutTM[i].Data()),
1583 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1584 fhEOverP[i]->SetXTitle("#it{E} (GeV)");
1585 fhEOverP[i]->SetYTitle("E/p");
1587 outputContainer->Add(fhTrackMatchedDEta[i]) ;
1588 outputContainer->Add(fhTrackMatchedDPhi[i]) ;
1589 outputContainer->Add(fhTrackMatchedDEtaDPhi[i]) ;
1590 outputContainer->Add(fhTrackMatchedDEtaPos[i]) ;
1591 outputContainer->Add(fhTrackMatchedDPhiPos[i]) ;
1592 outputContainer->Add(fhTrackMatchedDEtaDPhiPos[i]) ;
1593 outputContainer->Add(fhTrackMatchedDEtaNeg[i]) ;
1594 outputContainer->Add(fhTrackMatchedDPhiNeg[i]) ;
1595 outputContainer->Add(fhTrackMatchedDEtaDPhiNeg[i]) ;
1596 outputContainer->Add(fhdEdx[i]);
1597 outputContainer->Add(fhEOverP[i]);
1599 if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >=0 )
1601 fhTrackMatchedDEtaTRD[i] = new TH2F
1602 (Form("hTrackMatchedDEtaTRD%s",cutTM[i].Data()),
1603 Form("d#eta of cluster-track vs cluster energy, SM behind TRD, %s",cutTM[i].Data()),
1604 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1605 fhTrackMatchedDEtaTRD[i]->SetYTitle("d#eta");
1606 fhTrackMatchedDEtaTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1608 fhTrackMatchedDPhiTRD[i] = new TH2F
1609 (Form("hTrackMatchedDPhiTRD%s",cutTM[i].Data()),
1610 Form("d#phi of cluster-track vs cluster energy, SM behing TRD, %s",cutTM[i].Data()),
1611 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1612 fhTrackMatchedDPhiTRD[i]->SetYTitle("d#phi (rad)");
1613 fhTrackMatchedDPhiTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1615 fhEOverPTRD[i] = new TH2F
1616 (Form("hEOverPTRD%s",cutTM[i].Data()),
1617 Form("matched track E/p vs cluster E, behind TRD, %s",cutTM[i].Data()),
1618 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1619 fhEOverPTRD[i]->SetXTitle("#it{E} (GeV)");
1620 fhEOverPTRD[i]->SetYTitle("E/p");
1622 outputContainer->Add(fhTrackMatchedDEtaTRD[i]) ;
1623 outputContainer->Add(fhTrackMatchedDPhiTRD[i]) ;
1624 outputContainer->Add(fhEOverPTRD[i]);
1629 fhTrackMatchedDEtaMCNoOverlap[i] = new TH2F
1630 (Form("hTrackMatchedDEtaMCNoOverlap%s",cutTM[i].Data()),
1631 Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()),
1632 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1633 fhTrackMatchedDEtaMCNoOverlap[i]->SetYTitle("d#eta");
1634 fhTrackMatchedDEtaMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1636 fhTrackMatchedDPhiMCNoOverlap[i] = new TH2F
1637 (Form("hTrackMatchedDPhiMCNoOverlap%s",cutTM[i].Data()),
1638 Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()),
1639 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1640 fhTrackMatchedDPhiMCNoOverlap[i]->SetYTitle("d#phi (rad)");
1641 fhTrackMatchedDPhiMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1643 outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[i]) ;
1644 outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[i]) ;
1645 fhTrackMatchedDEtaMCOverlap[i] = new TH2F
1646 (Form("hTrackMatchedDEtaMCOverlap%s",cutTM[i].Data()),
1647 Form("d#eta of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()),
1648 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1649 fhTrackMatchedDEtaMCOverlap[i]->SetYTitle("d#eta");
1650 fhTrackMatchedDEtaMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1652 fhTrackMatchedDPhiMCOverlap[i] = new TH2F
1653 (Form("hTrackMatchedDPhiMCOverlap%s",cutTM[i].Data()),
1654 Form("d#phi of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()),
1655 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1656 fhTrackMatchedDPhiMCOverlap[i]->SetYTitle("d#phi (rad)");
1657 fhTrackMatchedDPhiMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1659 outputContainer->Add(fhTrackMatchedDEtaMCOverlap[i]) ;
1660 outputContainer->Add(fhTrackMatchedDPhiMCOverlap[i]) ;
1662 fhTrackMatchedDEtaMCConversion[i] = new TH2F
1663 (Form("hTrackMatchedDEtaMCConversion%s",cutTM[i].Data()),
1664 Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()),
1665 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1666 fhTrackMatchedDEtaMCConversion[i]->SetYTitle("d#eta");
1667 fhTrackMatchedDEtaMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1669 fhTrackMatchedDPhiMCConversion[i] = new TH2F
1670 (Form("hTrackMatchedDPhiMCConversion%s",cutTM[i].Data()),
1671 Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()),
1672 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1673 fhTrackMatchedDPhiMCConversion[i]->SetYTitle("d#phi (rad)");
1674 fhTrackMatchedDPhiMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1676 outputContainer->Add(fhTrackMatchedDEtaMCConversion[i]) ;
1677 outputContainer->Add(fhTrackMatchedDPhiMCConversion[i]) ;
1679 fhTrackMatchedMCParticle[i] = new TH2F
1680 (Form("hTrackMatchedMCParticle%s",cutTM[i].Data()),
1681 Form("Origin of particle vs energy %s",cutTM[i].Data()),
1682 nptbins,ptmin,ptmax,8,0,8);
1683 fhTrackMatchedMCParticle[i]->SetXTitle("#it{E} (GeV)");
1684 //fhTrackMatchedMCParticle[i]->SetYTitle("Particle type");
1686 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(1 ,"Photon");
1687 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(2 ,"Electron");
1688 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1689 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(4 ,"Rest");
1690 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1691 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1692 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1693 fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1695 outputContainer->Add(fhTrackMatchedMCParticle[i]);
1700 if(IsPileUpAnalysisOn())
1702 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1704 for(Int_t i = 0 ; i < 7 ; i++)
1706 fhPtPhotonPileUp[i] = new TH1F(Form("hPtPhotonPileUp%s",pileUpName[i].Data()),
1707 Form("Selected photon #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1708 fhPtPhotonPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1709 outputContainer->Add(fhPtPhotonPileUp[i]);
1711 fhClusterTimeDiffPhotonPileUp[i] = new TH2F(Form("hClusterTimeDiffPhotonPileUp%s",pileUpName[i].Data()),
1712 Form("Photon cluster E vs #it{t}_{max}-#it{t}_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
1713 nptbins,ptmin,ptmax,400,-200,200);
1714 fhClusterTimeDiffPhotonPileUp[i]->SetXTitle("#it{E} (GeV)");
1715 fhClusterTimeDiffPhotonPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
1716 outputContainer->Add(fhClusterTimeDiffPhotonPileUp[i]);
1719 fhTimePtPhotonNoCut = new TH2F ("hTimePtPhoton_NoCut","time of photon cluster vs pT of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1720 fhTimePtPhotonNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1721 fhTimePtPhotonNoCut->SetYTitle("#it{time} (ns)");
1722 outputContainer->Add(fhTimePtPhotonNoCut);
1724 fhTimePtPhotonSPD = new TH2F ("hTimePtPhoton_SPD","time of photon cluster vs pT of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1725 fhTimePtPhotonSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1726 fhTimePtPhotonSPD->SetYTitle("#it{time} (ns)");
1727 outputContainer->Add(fhTimePtPhotonSPD);
1729 fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,20,0,20);
1730 fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
1731 fhTimeNPileUpVertSPD->SetXTitle("#it{time} (ns)");
1732 outputContainer->Add(fhTimeNPileUpVertSPD);
1734 fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 20,0,20 );
1735 fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
1736 fhTimeNPileUpVertTrack->SetXTitle("#it{time} (ns)");
1737 outputContainer->Add(fhTimeNPileUpVertTrack);
1739 fhPtPhotonNPileUpSPDVtx = new TH2F ("hPtPhoton_NPileUpVertSPD","pT of cluster vs N pile-up SPD vertex",
1740 nptbins,ptmin,ptmax,20,0,20);
1741 fhPtPhotonNPileUpSPDVtx->SetYTitle("# vertex ");
1742 fhPtPhotonNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1743 outputContainer->Add(fhPtPhotonNPileUpSPDVtx);
1745 fhPtPhotonNPileUpTrkVtx = new TH2F ("hPtPhoton_NPileUpVertTracks","pT of cluster vs N pile-up Tracks vertex",
1746 nptbins,ptmin,ptmax, 20,0,20 );
1747 fhPtPhotonNPileUpTrkVtx->SetYTitle("# vertex ");
1748 fhPtPhotonNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1749 outputContainer->Add(fhPtPhotonNPileUpTrkVtx);
1751 fhPtPhotonNPileUpSPDVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut","pT of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
1752 nptbins,ptmin,ptmax,20,0,20);
1753 fhPtPhotonNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
1754 fhPtPhotonNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1755 outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut);
1757 fhPtPhotonNPileUpTrkVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut","pT of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
1758 nptbins,ptmin,ptmax, 20,0,20 );
1759 fhPtPhotonNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
1760 fhPtPhotonNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1761 outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut);
1763 fhPtPhotonNPileUpSPDVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut2","pT of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
1764 nptbins,ptmin,ptmax,20,0,20);
1765 fhPtPhotonNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
1766 fhPtPhotonNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1767 outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut2);
1769 fhPtPhotonNPileUpTrkVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut2","pT of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
1770 nptbins,ptmin,ptmax, 20,0,20 );
1771 fhPtPhotonNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
1772 fhPtPhotonNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1773 outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut2);
1781 TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
1782 "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P",
1783 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String" } ;
1785 TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
1786 "Conversion", "Hadron", "AntiNeutron","AntiProton",
1787 "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ;
1789 for(Int_t i = 0; i < fNOriginHistograms; i++)
1791 fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()),
1792 Form("cluster from %s : E ",ptype[i].Data()),
1793 nptbins,ptmin,ptmax);
1794 fhMCE[i]->SetXTitle("#it{E} (GeV)");
1795 outputContainer->Add(fhMCE[i]) ;
1797 fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()),
1798 Form("cluster from %s : #it{p}_{T} ",ptype[i].Data()),
1799 nptbins,ptmin,ptmax);
1800 fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1801 outputContainer->Add(fhMCPt[i]) ;
1803 fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()),
1804 Form("cluster from %s : #eta ",ptype[i].Data()),
1805 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1806 fhMCEta[i]->SetYTitle("#eta");
1807 fhMCEta[i]->SetXTitle("#it{E} (GeV)");
1808 outputContainer->Add(fhMCEta[i]) ;
1810 fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()),
1811 Form("cluster from %s : #phi ",ptype[i].Data()),
1812 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1813 fhMCPhi[i]->SetYTitle("#phi (rad)");
1814 fhMCPhi[i]->SetXTitle("#it{E} (GeV)");
1815 outputContainer->Add(fhMCPhi[i]) ;
1818 fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()),
1819 Form("MC - Reco E from %s",pname[i].Data()),
1820 nptbins,ptmin,ptmax, 200,-50,50);
1821 fhMCDeltaE[i]->SetYTitle("#Delta #it{E} (GeV)");
1822 fhMCDeltaE[i]->SetXTitle("#it{E} (GeV)");
1823 outputContainer->Add(fhMCDeltaE[i]);
1825 fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()),
1826 Form("MC - Reco #it{p}_{T} from %s",pname[i].Data()),
1827 nptbins,ptmin,ptmax, 200,-50,50);
1828 fhMCDeltaPt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})");
1829 fhMCDeltaPt[i]->SetYTitle("#Delta #it{p}_{T} (GeV/#it{c})");
1830 outputContainer->Add(fhMCDeltaPt[i]);
1832 fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()),
1833 Form("E distribution, reconstructed vs generated from %s",pname[i].Data()),
1834 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1835 fhMC2E[i]->SetXTitle("#it{E}_{rec} (GeV)");
1836 fhMC2E[i]->SetYTitle("#it{E}_{gen} (GeV)");
1837 outputContainer->Add(fhMC2E[i]);
1839 fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()),
1840 Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()),
1841 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1842 fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})");
1843 fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/#it{c})");
1844 outputContainer->Add(fhMC2Pt[i]);
1849 TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}",
1850 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ;
1852 TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay",
1853 "PhotonPrompt","PhotonFragmentation","PhotonISR"} ;
1855 for(Int_t i = 0; i < fNPrimaryHistograms; i++)
1857 fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()),
1858 Form("primary photon %s : E ",pptype[i].Data()),
1859 nptbins,ptmin,ptmax);
1860 fhEPrimMC[i]->SetXTitle("#it{E} (GeV)");
1861 outputContainer->Add(fhEPrimMC[i]) ;
1863 fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()),
1864 Form("primary photon %s : #it{p}_{T} ",pptype[i].Data()),
1865 nptbins,ptmin,ptmax);
1866 fhPtPrimMC[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1867 outputContainer->Add(fhPtPrimMC[i]) ;
1869 fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()),
1870 Form("primary photon %s : Rapidity ",pptype[i].Data()),
1871 nptbins,ptmin,ptmax,200,-2,2);
1872 fhYPrimMC[i]->SetYTitle("Rapidity");
1873 fhYPrimMC[i]->SetXTitle("#it{E} (GeV)");
1874 outputContainer->Add(fhYPrimMC[i]) ;
1876 fhEtaPrimMC[i] = new TH2F(Form("hEtaPrim_MC%s",ppname[i].Data()),
1877 Form("primary photon %s : #eta",pptype[i].Data()),
1878 nptbins,ptmin,ptmax,200,-2,2);
1879 fhEtaPrimMC[i]->SetYTitle("#eta");
1880 fhEtaPrimMC[i]->SetXTitle("#it{E} (GeV)");
1881 outputContainer->Add(fhEtaPrimMC[i]) ;
1883 fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()),
1884 Form("primary photon %s : #phi ",pptype[i].Data()),
1885 nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
1886 fhPhiPrimMC[i]->SetYTitle("#phi (rad)");
1887 fhPhiPrimMC[i]->SetXTitle("#it{E} (GeV)");
1888 outputContainer->Add(fhPhiPrimMC[i]) ;
1891 fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()),
1892 Form("primary photon %s in acceptance: E ",pptype[i].Data()),
1893 nptbins,ptmin,ptmax);
1894 fhEPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
1895 outputContainer->Add(fhEPrimMCAcc[i]) ;
1897 fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()),
1898 Form("primary photon %s in acceptance: #it{p}_{T} ",pptype[i].Data()),
1899 nptbins,ptmin,ptmax);
1900 fhPtPrimMCAcc[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1901 outputContainer->Add(fhPtPrimMCAcc[i]) ;
1903 fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()),
1904 Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()),
1905 nptbins,ptmin,ptmax,100,-1,1);
1906 fhYPrimMCAcc[i]->SetYTitle("Rapidity");
1907 fhYPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
1908 outputContainer->Add(fhYPrimMCAcc[i]) ;
1910 fhEtaPrimMCAcc[i] = new TH2F(Form("hEtaPrimAcc_MC%s",ppname[i].Data()),
1911 Form("primary photon %s in acceptance: #eta ",pptype[i].Data()),
1912 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1913 fhEtaPrimMCAcc[i]->SetYTitle("#eta");
1914 fhEtaPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
1915 outputContainer->Add(fhEtaPrimMCAcc[i]) ;
1917 fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()),
1918 Form("primary photon %s in acceptance: #phi ",pptype[i].Data()),
1919 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1920 fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)");
1921 fhPhiPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
1922 outputContainer->Add(fhPhiPrimMCAcc[i]) ;
1926 if(fFillSSHistograms)
1928 TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
1930 TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ;
1932 for(Int_t i = 0; i < 6; i++)
1934 fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()),
1935 Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()),
1936 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1937 fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}");
1938 fhMCELambda0[i]->SetXTitle("#it{E} (GeV)");
1939 outputContainer->Add(fhMCELambda0[i]) ;
1941 fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()),
1942 Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()),
1943 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1944 fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}");
1945 fhMCELambda1[i]->SetXTitle("#it{E} (GeV)");
1946 outputContainer->Add(fhMCELambda1[i]) ;
1948 fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()),
1949 Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()),
1950 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1951 fhMCEDispersion[i]->SetYTitle("D^{2}");
1952 fhMCEDispersion[i]->SetXTitle("#it{E} (GeV)");
1953 outputContainer->Add(fhMCEDispersion[i]) ;
1955 fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()),
1956 Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()),
1957 nptbins,ptmin,ptmax, nbins,nmin,nmax);
1958 fhMCNCellsE[i]->SetXTitle("#it{E} (GeV)");
1959 fhMCNCellsE[i]->SetYTitle("# of cells in cluster");
1960 outputContainer->Add(fhMCNCellsE[i]);
1962 fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()),
1963 Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()),
1964 nptbins,ptmin,ptmax, 500,0,1.);
1965 fhMCMaxCellDiffClusterE[i]->SetXTitle("#it{E}_{cluster} (GeV) ");
1966 fhMCMaxCellDiffClusterE[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1967 outputContainer->Add(fhMCMaxCellDiffClusterE[i]);
1969 if(!fFillOnlySimpleSSHisto)
1971 fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
1972 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
1973 ssbins,ssmin,ssmax,500,0,1.);
1974 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}");
1975 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1976 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ;
1978 fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
1979 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
1980 ssbins,ssmin,ssmax,500,0,1.);
1981 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}");
1982 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1983 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ;
1985 fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
1986 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()),
1987 ssbins,ssmin,ssmax,500,0,1.);
1988 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}");
1989 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1990 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ;
1992 fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
1993 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
1994 nbins/5,nmin,nmax/5,500,0,1.);
1995 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster");
1996 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1997 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ;
1999 fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
2000 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
2001 nbins/5,nmin,nmax/5,500,0,1.);
2002 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster");
2003 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2004 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ;
2006 fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
2007 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()),
2008 nbins/5,nmin,nmax/5,500,0,1.);
2009 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster");
2010 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("#it{E} (GeV)");
2011 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ;
2013 if(GetCalorimeter()==kEMCAL)
2015 fhMCEDispEta[i] = new TH2F (Form("hEDispEtaE_MC%s",pnamess[i].Data()),
2016 Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data()),
2017 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2018 fhMCEDispEta[i]->SetXTitle("#it{E} (GeV)");
2019 fhMCEDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2020 outputContainer->Add(fhMCEDispEta[i]);
2022 fhMCEDispPhi[i] = new TH2F (Form("hEDispPhiE_MC%s",pnamess[i].Data()),
2023 Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",ptypess[i].Data()),
2024 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2025 fhMCEDispPhi[i]->SetXTitle("#it{E} (GeV)");
2026 fhMCEDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2027 outputContainer->Add(fhMCEDispPhi[i]);
2029 fhMCESumEtaPhi[i] = new TH2F (Form("hESumEtaPhiE_MC%s",pnamess[i].Data()),
2030 Form("cluster from %s : #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",ptypess[i].Data()),
2031 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2032 fhMCESumEtaPhi[i]->SetXTitle("#it{E} (GeV)");
2033 fhMCESumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
2034 outputContainer->Add(fhMCESumEtaPhi[i]);
2036 fhMCEDispEtaPhiDiff[i] = new TH2F (Form("hEDispEtaPhiDiffE_MC%s",pnamess[i].Data()),
2037 Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",ptypess[i].Data()),
2038 nptbins,ptmin,ptmax,200,-10,10);
2039 fhMCEDispEtaPhiDiff[i]->SetXTitle("#it{E} (GeV)");
2040 fhMCEDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
2041 outputContainer->Add(fhMCEDispEtaPhiDiff[i]);
2043 fhMCESphericity[i] = new TH2F (Form("hESphericity_MC%s",pnamess[i].Data()),
2044 Form("cluster from %s : (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",ptypess[i].Data()),
2045 nptbins,ptmin,ptmax, 200,-1,1);
2046 fhMCESphericity[i]->SetXTitle("#it{E} (GeV)");
2047 fhMCESphericity[i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
2048 outputContainer->Add(fhMCESphericity[i]);
2050 for(Int_t ie = 0; ie < 7; ie++)
2052 fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2053 Form("cluster from %s : #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]),
2054 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2055 fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2056 fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2057 outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2059 fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pnamess[i].Data()),
2060 Form("cluster from %s : #lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]),
2061 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2062 fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2063 fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2064 outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2066 fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2067 Form("cluster from %s :#lambda^{2}_{0} vs #sigma^{2}_{#phi #phi} for %d < E < %d GeV",pnamess[i].Data(),bin[ie],bin[ie+1]),
2068 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2069 fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2070 fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2071 outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2077 if(!GetReader()->IsEmbeddedClusterSelectionOn())
2079 fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap",
2080 "cluster from Photon : E vs #lambda_{0}^{2}",
2081 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2082 fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}");
2083 fhMCPhotonELambda0NoOverlap->SetXTitle("#it{E} (GeV)");
2084 outputContainer->Add(fhMCPhotonELambda0NoOverlap) ;
2086 fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap",
2087 "cluster from Photon : E vs #lambda_{0}^{2}",
2088 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2089 fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}");
2090 fhMCPhotonELambda0TwoOverlap->SetXTitle("#it{E} (GeV)");
2091 outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ;
2093 fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap",
2094 "cluster from Photon : E vs #lambda_{0}^{2}",
2095 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2096 fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}");
2097 fhMCPhotonELambda0NOverlap->SetXTitle("#it{E} (GeV)");
2098 outputContainer->Add(fhMCPhotonELambda0NOverlap) ;
2102 if(GetReader()->IsEmbeddedClusterSelectionOn())
2105 fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy",
2106 "Energy Fraction of embedded signal versus cluster energy",
2107 nptbins,ptmin,ptmax,100,0.,1.);
2108 fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction");
2109 fhEmbeddedSignalFractionEnergy->SetXTitle("#it{E} (GeV)");
2110 outputContainer->Add(fhEmbeddedSignalFractionEnergy) ;
2112 fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal",
2113 "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2114 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2115 fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2116 fhEmbedPhotonELambda0FullSignal->SetXTitle("#it{E} (GeV)");
2117 outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ;
2119 fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal",
2120 "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2121 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2122 fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2123 fhEmbedPhotonELambda0MostlySignal->SetXTitle("#it{E} (GeV)");
2124 outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ;
2126 fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg",
2127 "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2128 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2129 fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2130 fhEmbedPhotonELambda0MostlyBkg->SetXTitle("#it{E} (GeV)");
2131 outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ;
2133 fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg",
2134 "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2135 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2136 fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2137 fhEmbedPhotonELambda0FullBkg->SetXTitle("#it{E} (GeV)");
2138 outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ;
2140 fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal",
2141 "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2142 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2143 fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2144 fhEmbedPi0ELambda0FullSignal->SetXTitle("#it{E} (GeV)");
2145 outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ;
2147 fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal",
2148 "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2149 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2150 fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2151 fhEmbedPi0ELambda0MostlySignal->SetXTitle("#it{E} (GeV)");
2152 outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ;
2154 fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg",
2155 "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2156 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2157 fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2158 fhEmbedPi0ELambda0MostlyBkg->SetXTitle("#it{E} (GeV)");
2159 outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ;
2161 fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg",
2162 "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2163 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2164 fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2165 fhEmbedPi0ELambda0FullBkg->SetXTitle("#it{E} (GeV)");
2166 outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ;
2168 }// embedded histograms
2171 }// Fill SS MC histograms
2175 return outputContainer ;
2179 //_______________________
2180 void AliAnaPhoton::Init()
2185 if(GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD())
2187 printf("AliAnaPhoton::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
2190 else if(GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD())
2192 printf("AliAnaPhoton::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
2196 if(GetReader()->GetDataType() == AliCaloTrackReader::kMC) GetCaloPID()->SwitchOnBayesian();
2200 //____________________________________________________________________________
2201 void AliAnaPhoton::InitParameters()
2204 //Initialize the parameters of the analysis.
2205 AddToHistogramsName("AnaPhoton_");
2211 fTimeCutMin =-1000000;
2212 fTimeCutMax = 1000000;
2215 fRejectTrackMatch = kTRUE ;
2219 //__________________________________________________________________
2220 void AliAnaPhoton::MakeAnalysisFillAOD()
2222 //Do photon analysis and fill aods
2225 Double_t v[3] = {0,0,0}; //vertex ;
2226 GetReader()->GetVertex(v);
2228 //Select the Calorimeter of the photon
2229 TObjArray * pl = 0x0;
2230 AliVCaloCells* cells = 0;
2231 if (GetCalorimeter() == kPHOS )
2233 pl = GetPHOSClusters();
2234 cells = GetPHOSCells();
2236 else if (GetCalorimeter() == kEMCAL)
2238 pl = GetEMCALClusters();
2239 cells = GetEMCALCells();
2244 Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",GetCalorimeterString().Data());
2248 // Loop on raw clusters before filtering in the reader and fill control histogram
2249 if((GetReader()->GetEMCALClusterListName()=="" && GetCalorimeter()==kEMCAL) || GetCalorimeter()==kPHOS)
2251 for(Int_t iclus = 0; iclus < GetReader()->GetInputEvent()->GetNumberOfCaloClusters(); iclus++ )
2253 AliVCluster * clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus);
2254 if (GetCalorimeter() == kPHOS && clus->IsPHOS() && clus->E() > GetReader()->GetPHOSPtMin() )
2256 fhClusterCutsE [0]->Fill(clus->E());
2258 clus->GetMomentum(fMomentum,GetVertex(0)) ;
2259 fhClusterCutsPt[0]->Fill(fMomentum.Pt());
2261 else if(GetCalorimeter() == kEMCAL && clus->IsEMCAL() && clus->E() > GetReader()->GetEMCALPtMin())
2263 fhClusterCutsE [0]->Fill(clus->E());
2265 clus->GetMomentum(fMomentum,GetVertex(0)) ;
2266 fhClusterCutsPt[0]->Fill(fMomentum.Pt());
2272 TClonesArray * clusterList = 0;
2274 if(GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()))
2275 clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2276 else if(GetReader()->GetOutputEvent())
2277 clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2281 Int_t nclusters = clusterList->GetEntriesFast();
2282 for (Int_t iclus = 0; iclus < nclusters; iclus++)
2284 AliVCluster * clus = dynamic_cast<AliVCluster*> (clusterList->At(iclus));
2287 fhClusterCutsE [0]->Fill(clus->E());
2289 clus->GetMomentum(fMomentum,GetVertex(0)) ;
2290 fhClusterCutsPt[0]->Fill(fMomentum.Pt());
2296 // Init arrays, variables, get number of clusters
2297 Int_t nCaloClusters = pl->GetEntriesFast();
2299 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillAOD() - input %s cluster entries %d\n", GetCalorimeterString().Data(), nCaloClusters);
2301 //----------------------------------------------------
2302 // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects
2303 //----------------------------------------------------
2305 for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
2307 AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
2308 //printf("calo %d, %f\n",icalo,calo->E());
2310 //Get the index where the cluster comes, to retrieve the corresponding vertex
2311 Int_t evtIndex = 0 ;
2312 if (GetMixedEvent())
2314 evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
2315 //Get the vertex and check it is not too large in z
2316 if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue;
2319 //Cluster selection, not charged, with photon id and in fiducial cut
2320 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
2322 calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
2323 }//Assume that come from vertex in straight line
2326 Double_t vertex[]={0,0,0};
2327 calo->GetMomentum(fMomentum,vertex) ;
2330 //-----------------------------
2331 // Cluster selection
2332 //-----------------------------
2333 Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
2334 if(!ClusterSelected(calo,nMaxima)) continue;
2336 //----------------------------
2337 // Create AOD for analysis
2338 //----------------------------
2339 AliAODPWG4Particle aodph = AliAODPWG4Particle(fMomentum);
2341 //...............................................
2342 //Set the indeces of the original caloclusters (MC, ID), and calorimeter
2343 Int_t label = calo->GetLabel();
2344 aodph.SetLabel(label);
2345 aodph.SetCaloLabel(calo->GetID(),-1);
2346 aodph.SetDetectorTag(GetCalorimeter());
2347 //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
2349 //...............................................
2350 //Set bad channel distance bit
2351 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
2352 if (distBad > fMinDist3) aodph.SetDistToBad(2) ;
2353 else if(distBad > fMinDist2) aodph.SetDistToBad(1) ;
2354 else aodph.SetDistToBad(0) ;
2355 //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad());
2357 //-------------------------------------
2358 // Play with the MC stack if available
2359 //-------------------------------------
2361 //Check origin of the candidates
2366 tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
2370 printf("AliAnaPhoton::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag());
2371 }//Work with stack also
2373 //--------------------------------------------------------
2374 // Fill some shower shape histograms before PID is applied
2375 //--------------------------------------------------------
2377 Float_t maxCellFraction = 0;
2378 Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, calo, maxCellFraction);
2379 if( absIdMax < 0 ) AliFatal("Wrong absID");
2381 FillShowerShapeHistograms(calo,tag,maxCellFraction);
2383 aodph.SetM02(calo->GetM02());
2384 aodph.SetNLM(nMaxima);
2386 //-------------------------------------
2387 // PID selection or bit setting
2388 //-------------------------------------
2390 //...............................................
2391 // Data, PID check on
2394 // Get most probable PID, 2 options check bayesian PID weights or redo PID
2395 // By default, redo PID
2397 aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(calo));
2399 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType());
2401 //If cluster does not pass pid, not photon, skip it.
2402 if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ;
2406 //...............................................
2407 // Data, PID check off
2410 //Set PID bits for later selection (AliAnaPi0 for example)
2411 //GetIdentifiedParticleType already called in SetPIDBits.
2413 GetCaloPID()->SetPIDBits(calo,&aodph, GetCaloUtils(),GetReader()->GetInputEvent());
2415 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n");
2418 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n",
2419 aodph.Pt(), aodph.GetIdentifiedParticleType());
2421 fhClusterCutsE [9]->Fill(calo->E());
2422 fhClusterCutsPt[9]->Fill(fMomentum.Pt());
2424 Int_t nSM = GetModuleNumber(calo);
2425 if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
2427 fhEPhotonSM ->Fill(fMomentum.E (),nSM);
2428 fhPtPhotonSM->Fill(fMomentum.Pt(),nSM);
2431 fhNLocMax->Fill(calo->E(),nMaxima);
2433 // Few more control histograms for selected clusters
2434 fhMaxCellDiffClusterE->Fill(calo->E() ,maxCellFraction);
2435 fhNCellsE ->Fill(calo->E() ,calo->GetNCells());
2436 fhTimePt ->Fill(fMomentum.Pt() ,calo->GetTOF()*1.e9);
2440 for(Int_t icell = 0; icell < calo->GetNCells(); icell++)
2441 fhCellsE->Fill(calo->E(),cells->GetCellAmplitude(calo->GetCellsAbsId()[icell]));
2444 // Matching after cuts
2445 if( fFillTMHisto ) FillTrackMatchingResidualHistograms(calo,1);
2447 // Fill histograms to undertand pile-up before other cuts applied
2448 // Remember to relax time cuts in the reader
2449 if( IsPileUpAnalysisOn() ) FillPileUpHistograms(calo,cells, absIdMax);
2451 // Add AOD with photon object to aod branch
2452 AddAODParticle(aodph);
2456 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast());
2460 //______________________________________________
2461 void AliAnaPhoton::MakeAnalysisFillHistograms()
2465 //In case of simulated data, fill acceptance histograms
2466 if(IsDataMC()) FillAcceptanceHistograms();
2469 Double_t v[3] = {0,0,0}; //vertex ;
2470 GetReader()->GetVertex(v);
2471 //fhVertex->Fill(v[0],v[1],v[2]);
2472 if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event
2474 //----------------------------------
2475 //Loop on stored AOD photons
2476 Int_t naod = GetOutputAODBranch()->GetEntriesFast();
2477 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod);
2479 Float_t cen = GetEventCentrality();
2480 // printf("++++++++++ GetEventCentrality() %f\n",cen);
2482 Float_t ep = GetEventPlaneAngle();
2484 for(Int_t iaod = 0; iaod < naod ; iaod++)
2486 AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
2487 Int_t pdg = ph->GetIdentifiedParticleType();
2490 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - PDG %d, MC TAG %d, Calorimeter <%d>\n",
2491 ph->GetIdentifiedParticleType(),ph->GetTag(), ph->GetDetectorTag()) ;
2493 //If PID used, fill histos with photons in Calorimeter GetCalorimeter()
2494 if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue;
2496 if(((Int_t) ph->GetDetectorTag()) != GetCalorimeter()) continue;
2499 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - ID Photon: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ;
2501 //................................
2502 //Fill photon histograms
2503 Float_t ptcluster = ph->Pt();
2504 Float_t phicluster = ph->Phi();
2505 Float_t etacluster = ph->Eta();
2506 Float_t ecluster = ph->E();
2508 fhEPhoton ->Fill(ecluster);
2509 fhPtPhoton ->Fill(ptcluster);
2510 fhPhiPhoton ->Fill(ptcluster,phicluster);
2511 fhEtaPhoton ->Fill(ptcluster,etacluster);
2512 if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster);
2513 else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster);
2515 if(IsHighMultiplicityAnalysisOn())
2517 fhPtCentralityPhoton ->Fill(ptcluster,cen) ;
2518 fhPtEventPlanePhoton ->Fill(ptcluster,ep ) ;
2521 // Comment this part, not needed but in case to know how to do it in the future
2522 // //Get original cluster, to recover some information
2523 // AliVCaloCells* cells = 0;
2524 // TObjArray * clusters = 0;
2525 // if(GetCalorimeter() == kEMCAL)
2527 // cells = GetEMCALCells();
2528 // clusters = GetEMCALClusters();
2532 // cells = GetPHOSCells();
2533 // clusters = GetPHOSClusters();
2536 // Int_t iclus = -1;
2537 // AliVCluster *cluster = FindCluster(clusters,ph->GetCaloLabel(0),iclus);
2540 //.......................................
2541 //Play with the MC data if available
2546 if(GetReader()->ReadStack() && !GetMCStack())
2548 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called?\n");
2550 else if(GetReader()->ReadAODMCParticles() && !GetReader()->GetAODMCParticles())
2552 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n");
2556 //....................................................................
2557 // Access MC information in stack if requested, check that it exists.
2558 Int_t label =ph->GetLabel();
2562 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label);
2569 fPrimaryMom = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok);
2572 eprim = fPrimaryMom.Energy();
2573 ptprim = fPrimaryMom.Pt();
2576 Int_t tag =ph->GetTag();
2577 Int_t mcParticleTag = -1;
2578 if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[kmcPhoton])
2580 fhMCE [kmcPhoton] ->Fill(ecluster);
2581 fhMCPt [kmcPhoton] ->Fill(ptcluster);
2582 fhMCPhi[kmcPhoton] ->Fill(ecluster,phicluster);
2583 fhMCEta[kmcPhoton] ->Fill(ecluster,etacluster);
2585 fhMC2E [kmcPhoton] ->Fill(ecluster, eprim);
2586 fhMC2Pt [kmcPhoton] ->Fill(ptcluster, ptprim);
2587 fhMCDeltaE [kmcPhoton] ->Fill(ecluster,eprim-ecluster);
2588 fhMCDeltaPt[kmcPhoton] ->Fill(ptcluster,ptprim-ptcluster);
2590 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) &&
2591 fhMCE[kmcConversion])
2593 fhMCE [kmcConversion] ->Fill(ecluster);
2594 fhMCPt [kmcConversion] ->Fill(ptcluster);
2595 fhMCPhi[kmcConversion] ->Fill(ecluster,phicluster);
2596 fhMCEta[kmcConversion] ->Fill(ecluster,etacluster);
2598 fhMC2E [kmcConversion] ->Fill(ecluster, eprim);
2599 fhMC2Pt [kmcConversion] ->Fill(ptcluster, ptprim);
2600 fhMCDeltaE [kmcConversion] ->Fill(ecluster,eprim-ecluster);
2601 fhMCDeltaPt[kmcConversion] ->Fill(ptcluster,ptprim-ptcluster);
2604 if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt))
2606 mcParticleTag = kmcPrompt;
2608 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation))
2610 mcParticleTag = kmcFragmentation;
2612 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
2614 mcParticleTag = kmcISR;
2616 else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) &&
2617 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
2619 mcParticleTag = kmcPi0Decay;
2621 else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
2623 mcParticleTag = kmcPi0;
2625 else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) &&
2626 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
2628 mcParticleTag = kmcEta;
2632 mcParticleTag = kmcOtherDecay;
2635 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron))
2637 mcParticleTag = kmcAntiNeutron;
2639 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton))
2641 mcParticleTag = kmcAntiProton;
2643 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2645 mcParticleTag = kmcElectron;
2647 else if( fhMCE[kmcOther])
2649 mcParticleTag = kmcOther;
2651 // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ",
2652 // ph->GetLabel(),ph->Pt());
2653 // for(Int_t i = 0; i < 20; i++) {
2654 // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i);
2660 if(mcParticleTag >= 0 && fhMCE[mcParticleTag])
2662 fhMCE [mcParticleTag]->Fill(ecluster);
2663 fhMCPt [mcParticleTag]->Fill(ptcluster);
2664 fhMCPhi[mcParticleTag]->Fill(ecluster,phicluster);
2665 fhMCEta[mcParticleTag]->Fill(ecluster,etacluster);
2667 fhMC2E [mcParticleTag]->Fill(ecluster, eprim);
2668 fhMC2Pt [mcParticleTag]->Fill(ptcluster, ptprim);
2669 fhMCDeltaE [mcParticleTag]->Fill(ecluster,eprim-ecluster);
2670 fhMCDeltaPt[mcParticleTag]->Fill(ptcluster,ptprim-ptcluster);
2672 }//Histograms with MC
2679 //__________________________________________________________________
2680 void AliAnaPhoton::Print(const Option_t * opt) const
2682 //Print some relevant parameters set for the analysis
2687 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
2688 AliAnaCaloTrackCorrBaseClass::Print(" ");
2690 printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
2691 printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
2692 printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
2693 printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
2694 printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch);
2695 printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax);
2696 printf("Number of cells in cluster is > %d \n", fNCellsCut);