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 ---
31 #include <TClonesArray.h>
32 #include <TObjString.h>
33 #include "TParticle.h"
34 #include "TDatabasePDG.h"
36 // --- Analysis system ---
37 #include "AliAnaPhoton.h"
38 #include "AliCaloTrackReader.h"
40 #include "AliCaloPID.h"
41 #include "AliMCAnalysisUtils.h"
42 #include "AliFiducialCut.h"
43 #include "AliVCluster.h"
44 #include "AliAODMCParticle.h"
45 #include "AliMixedEvent.h"
46 #include "AliAODEvent.h"
47 #include "AliESDEvent.h"
50 #include "AliPHOSGeoUtils.h"
51 #include "AliEMCALGeometry.h"
53 ClassImp(AliAnaPhoton)
55 //____________________________
56 AliAnaPhoton::AliAnaPhoton() :
57 AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
58 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
59 fRejectTrackMatch(0), fFillTMHisto(kFALSE),
60 fTimeCutMin(-10000), fTimeCutMax(10000),
62 fNLMCutMin(-1), fNLMCutMax(10),
63 fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
64 fNOriginHistograms(8), fNPrimaryHistograms(4),
65 fFillPileUpHistograms(0),
67 fhNCellsE(0), fhCellsE(0), // Control histograms
68 fhMaxCellDiffClusterE(0), fhTimeE(0), // Control histograms
69 fhEPhoton(0), fhPtPhoton(0),
70 fhPhiPhoton(0), fhEtaPhoton(0),
71 fhEtaPhiPhoton(0), fhEtaPhi05Photon(0),
73 // Shower shape histograms
75 fhDispE(0), fhLam0E(0), fhLam1E(0),
76 fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0),
77 fhDispETM(0), fhLam0ETM(0), fhLam1ETM(0),
78 fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam1ETMTRD(0),
80 fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0),
81 fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0),
83 fhEtaLam0LowE(0), fhPhiLam0LowE(0),
84 fhEtaLam0HighE(0), fhPhiLam0HighE(0),
85 fhLam0DispLowE(0), fhLam0DispHighE(0),
86 fhLam1Lam0LowE(0), fhLam1Lam0HighE(0),
87 fhDispLam1LowE(0), fhDispLam1HighE(0),
88 fhDispEtaE(0), fhDispPhiE(0),
89 fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
90 fhDispEtaPhiDiffE(0), fhSphericityE(0),
91 fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0),
94 fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0),
96 fhEmbeddedSignalFractionEnergy(0),
97 fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0),
98 fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0),
99 fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0),
100 fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0),
102 fhTimeENoCut(0), fhTimeESPD(0), fhTimeESPDMulti(0),
103 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
104 fhTimeNPileUpVertContributors(0),
105 fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
106 fhClusterMultSPDPileUp(), fhClusterMultNoPileUp()
110 for(Int_t i = 0; i < 14; i++)
122 for(Int_t i = 0; i < 7; i++)
129 fhPtPrimMCAcc [i] = 0;
130 fhEPrimMCAcc [i] = 0;
131 fhPhiPrimMCAcc[i] = 0;
132 fhYPrimMCAcc [i] = 0;
134 fhDispEtaDispPhi[i] = 0;
135 fhLambda0DispPhi[i] = 0;
136 fhLambda0DispEta[i] = 0;
138 fhPtPhotonPileUp[i] = 0;
140 for(Int_t j = 0; j < 6; j++)
142 fhMCDispEtaDispPhi[i][j] = 0;
143 fhMCLambda0DispEta[i][j] = 0;
144 fhMCLambda0DispPhi[i][j] = 0;
148 for(Int_t i = 0; i < 6; i++)
150 fhMCELambda0 [i] = 0;
151 fhMCELambda1 [i] = 0;
152 fhMCEDispersion [i] = 0;
154 fhMCMaxCellDiffClusterE[i] = 0;
155 fhLambda0DispEta[i] = 0;
156 fhLambda0DispPhi[i] = 0;
158 fhMCLambda0vsClusterMaxCellDiffE0[i] = 0;
159 fhMCLambda0vsClusterMaxCellDiffE2[i] = 0;
160 fhMCLambda0vsClusterMaxCellDiffE6[i] = 0;
161 fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0;
162 fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0;
163 fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0;
165 fhMCEDispEta [i] = 0;
166 fhMCEDispPhi [i] = 0;
167 fhMCESumEtaPhi [i] = 0;
168 fhMCEDispEtaPhiDiff[i] = 0;
169 fhMCESphericity [i] = 0;
172 for(Int_t i = 0; i < 5; i++)
174 fhClusterCuts[i] = 0;
177 // Track matching residuals
178 for(Int_t i = 0; i < 2; i++)
180 fhTrackMatchedDEta[i] = 0; fhTrackMatchedDPhi[i] = 0; fhTrackMatchedDEtaDPhi[i] = 0;
181 fhTrackMatchedDEtaTRD[i] = 0; fhTrackMatchedDPhiTRD[i] = 0;
182 fhTrackMatchedDEtaMCOverlap[i] = 0; fhTrackMatchedDPhiMCOverlap[i] = 0;
183 fhTrackMatchedDEtaMCNoOverlap[i] = 0; fhTrackMatchedDPhiMCNoOverlap[i] = 0;
184 fhTrackMatchedDEtaMCConversion[i] = 0; fhTrackMatchedDPhiMCConversion[i] = 0;
185 fhTrackMatchedMCParticle[i] = 0; fhTrackMatchedMCParticle[i] = 0;
186 fhdEdx[i] = 0; fhEOverP[i] = 0;
190 for(Int_t i = 0; i < 4; i++)
192 fhClusterMultSPDPileUp[i] = 0;
193 fhClusterMultNoPileUp [i] = 0;
196 //Initialize parameters
201 //_____________________________________________________________________________________________________
202 Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, const TLorentzVector mom, const Int_t nMaxima)
204 //Select clusters if they pass different cuts
206 printf("AliAnaPhoton::ClusterSelected() Current Event %d; Before selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
207 GetReader()->GetEventNumber(),
208 calo->E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
210 fhClusterCuts[1]->Fill(calo->E());
212 //.......................................
213 //If too small or big energy, skip it
214 if(calo->E() < GetMinEnergy() || calo->E() > GetMaxEnergy() ) return kFALSE ;
216 if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
218 fhClusterCuts[2]->Fill(calo->E());
220 //.......................................
221 // TOF cut, BE CAREFUL WITH THIS CUT
222 Double_t tof = calo->GetTOF()*1e9;
223 if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
225 if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID());
227 fhClusterCuts[3]->Fill(calo->E());
229 //.......................................
230 if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
232 if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID());
234 fhClusterCuts[4]->Fill(calo->E());
236 if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ;
237 if(GetDebug() > 2) printf(" \t Cluster %d pass NLM %d of out of range \n",calo->GetID(), nMaxima);
239 fhClusterCuts[5]->Fill(calo->E());
241 //.......................................
242 //Check acceptance selection
243 if(IsFiducialCutOn())
245 Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ;
246 if(! in ) return kFALSE ;
249 if(GetDebug() > 2) printf("Fiducial cut passed \n");
251 fhClusterCuts[6]->Fill(calo->E());
253 //.......................................
254 //Skip matched clusters with tracks
256 // Fill matching residual histograms before PID cuts
257 if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,0);
259 if(fRejectTrackMatch)
261 if(IsTrackMatched(calo,GetReader()->GetInputEvent()))
263 if(GetDebug() > 2) printf("\t Reject track-matched clusters\n");
267 if(GetDebug() > 2) printf(" Track-matching cut passed \n");
268 }// reject matched clusters
270 fhClusterCuts[7]->Fill(calo->E());
272 //.......................................
273 //Check Distance to Bad channel, set bit.
274 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
275 if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
276 if(distBad < fMinDist)
277 {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
280 else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist);
282 fhClusterCuts[8]->Fill(calo->E());
285 printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
286 GetReader()->GetEventNumber(),
287 calo->E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
289 //All checks passed, cluster selected
294 //___________________________________________
295 void AliAnaPhoton::FillAcceptanceHistograms()
297 //Fill acceptance histograms if MC data is available
299 Double_t photonY = -100 ;
300 Double_t photonE = -1 ;
301 Double_t photonPt = -1 ;
302 Double_t photonPhi = 100 ;
303 Double_t photonEta = -1 ;
308 Bool_t inacceptance = kFALSE;
310 if(GetReader()->ReadStack())
312 AliStack * stack = GetMCStack();
315 for(Int_t i=0 ; i<stack->GetNtrack(); i++)
317 TParticle * prim = stack->Particle(i) ;
318 pdg = prim->GetPdgCode();
319 //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
320 // prim->GetName(), prim->GetPdgCode());
324 // Get tag of this particle photon from fragmentation, decay, prompt ...
325 tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader(), 0);
326 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
328 //A conversion photon from a hadron, skip this kind of photon
329 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
330 // GetMCAnalysisUtils()->PrintMCTag(tag);
335 //Get photon kinematics
336 if(prim->Energy() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
338 photonY = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ;
339 photonE = prim->Energy() ;
340 photonPt = prim->Pt() ;
341 photonPhi = TMath::RadToDeg()*prim->Phi() ;
342 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
343 photonEta = prim->Eta() ;
345 //Check if photons hit the Calorimeter
348 inacceptance = kFALSE;
349 if (fCalorimeter == "PHOS")
351 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet())
355 if(GetPHOSGeometry()->ImpactOnEmc(prim,mod,z,x))
356 inacceptance = kTRUE;
357 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
361 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
362 inacceptance = kTRUE ;
363 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
366 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
368 if(GetEMCALGeometry())
372 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
375 inacceptance = kTRUE;
377 // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2))
378 // inacceptance = kTRUE;
379 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
383 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
384 inacceptance = kTRUE ;
385 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
390 fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ;
391 if(TMath::Abs(photonY) < 1.0)
393 fhEPrimMC [kmcPPhoton]->Fill(photonE ) ;
394 fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ;
395 fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ;
396 fhYPrimMC [kmcPPhoton]->Fill(photonE , photonEta) ;
400 fhEPrimMCAcc [kmcPPhoton]->Fill(photonE ) ;
401 fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt) ;
402 fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ;
403 fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY) ;
407 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt])
409 mcIndex = kmcPPrompt;
411 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation])
413 mcIndex = kmcPFragmentation ;
415 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR])
419 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay])
421 mcIndex = kmcPPi0Decay;
423 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
424 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay])
426 mcIndex = kmcPOtherDecay;
428 else if(fhEPrimMC[kmcPOther])
433 fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ;
434 if(TMath::Abs(photonY) < 1.0)
436 fhEPrimMC [mcIndex]->Fill(photonE ) ;
437 fhPtPrimMC [mcIndex]->Fill(photonPt) ;
438 fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ;
439 fhYPrimMC [mcIndex]->Fill(photonE , photonEta) ;
443 fhEPrimMCAcc [mcIndex]->Fill(photonE ) ;
444 fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ;
445 fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ;
446 fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ;
451 }//stack exists and data is MC
453 else if(GetReader()->ReadAODMCParticles())
455 TClonesArray * mcparticles = GetReader()->GetAODMCParticles(0);
458 Int_t nprim = mcparticles->GetEntriesFast();
460 for(Int_t i=0; i < nprim; i++)
462 AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i);
464 pdg = prim->GetPdgCode();
468 // Get tag of this particle photon from fragmentation, decay, prompt ...
469 tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader(), 0);
470 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
472 //A conversion photon from a hadron, skip this kind of photon
473 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
474 // GetMCAnalysisUtils()->PrintMCTag(tag);
479 //Get photon kinematics
480 if(prim->E() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
482 photonY = 0.5*TMath::Log((prim->E()-prim->Pz())/(prim->E()+prim->Pz())) ;
483 photonE = prim->E() ;
484 photonPt = prim->Pt() ;
485 photonPhi = prim->Phi() ;
486 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
487 photonEta = prim->Eta() ;
489 //Check if photons hit the Calorimeter
491 lv.SetPxPyPzE(prim->Px(),prim->Py(),prim->Pz(),prim->E());
492 inacceptance = kFALSE;
493 if (fCalorimeter == "PHOS")
495 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet())
499 Double_t vtx[]={prim->Xv(),prim->Yv(),prim->Zv()};
500 if(GetPHOSGeometry()->ImpactOnEmc(vtx, prim->Theta(),prim->Phi(),mod,z,x))
501 inacceptance = kTRUE;
502 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
506 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
507 inacceptance = kTRUE ;
508 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
511 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
513 if(GetEMCALGeometry())
517 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
520 inacceptance = kTRUE;
522 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
526 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
527 inacceptance = kTRUE ;
528 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
534 fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY) ;
535 if(TMath::Abs(photonY) < 1.0)
537 fhEPrimMC [kmcPPhoton]->Fill(photonE ) ;
538 fhPtPrimMC [kmcPPhoton]->Fill(photonPt) ;
539 fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi) ;
540 fhYPrimMC[kmcPPhoton]->Fill(photonE , photonEta) ;
545 fhEPrimMCAcc[kmcPPhoton] ->Fill(photonE ) ;
546 fhPtPrimMCAcc[kmcPPhoton] ->Fill(photonPt) ;
547 fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi) ;
548 fhYPrimMCAcc[kmcPPhoton] ->Fill(photonE , photonY) ;
552 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[kmcPPrompt])
554 mcIndex = kmcPPrompt;
556 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[kmcPFragmentation])
558 mcIndex = kmcPFragmentation ;
560 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[kmcPISR])
564 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[kmcPPi0Decay])
566 mcIndex = kmcPPi0Decay;
568 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
569 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[kmcPOtherDecay])
571 mcIndex = kmcPOtherDecay;
573 else if(fhEPrimMC[kmcPOther])
578 fhYPrimMC[mcIndex]->Fill(photonPt, photonY) ;
579 if(TMath::Abs(photonY) < 1.0)
581 fhEPrimMC [mcIndex]->Fill(photonE ) ;
582 fhPtPrimMC [mcIndex]->Fill(photonPt) ;
583 fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi) ;
584 fhYPrimMC [mcIndex]->Fill(photonE , photonEta) ;
588 fhEPrimMCAcc [mcIndex]->Fill(photonE ) ;
589 fhPtPrimMCAcc [mcIndex]->Fill(photonPt) ;
590 fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi) ;
591 fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY) ;
597 }//kmc array exists and data is MC
601 //___________________________________________________________________
602 void AliAnaPhoton::FillPileUpHistogramsPerEvent(TObjArray * clusters)
604 // Fill some histograms per event to understand pile-up
605 // Open the time cut in the reader to be more meaningful
607 if(!fFillPileUpHistograms) return;
609 // Loop on clusters, get the maximum energy cluster as reference
610 Int_t nclusters = clusters->GetEntriesFast();
614 for(Int_t iclus = 0; iclus < nclusters ; iclus++)
616 AliVCluster * clus = (AliVCluster*) (clusters->At(iclus));
617 if(clus->E() > eMax && TMath::Abs(clus->GetTOF()*1e9) < 20)
620 tMax = clus->GetTOF()*1e9;
627 // Loop again on clusters to compare this max cluster t and the rest of the clusters, if E > 0.3
633 for(Int_t iclus = 0; iclus < nclusters ; iclus++)
635 AliVCluster * clus = (AliVCluster*) (clusters->At(iclus));
637 if(clus->E() < 0.3 || iclus==idMax) continue;
639 Float_t tdiff = TMath::Abs(tMax-clus->GetTOF()*1e9);
641 if(tdiff < 20) nOK++;
645 if(tdiff > 40 ) n40++;
649 // Check pile-up and fill histograms depending on the different cluster multiplicities
650 if(GetReader()->IsPileUpFromSPD())
652 fhClusterMultSPDPileUp[0]->Fill(eMax,n );
653 fhClusterMultSPDPileUp[1]->Fill(eMax,nOK);
654 fhClusterMultSPDPileUp[2]->Fill(eMax,n20);
655 fhClusterMultSPDPileUp[3]->Fill(eMax,n40);
659 fhClusterMultNoPileUp[0]->Fill(eMax,n );
660 fhClusterMultNoPileUp[1]->Fill(eMax,nOK);
661 fhClusterMultNoPileUp[2]->Fill(eMax,n20);
662 fhClusterMultNoPileUp[3]->Fill(eMax,n40);
668 //___________________________________________________________________
669 void AliAnaPhoton::FillPileUpHistograms(const Float_t energy, const Float_t time)
671 // Fill some histograms to understand pile-up
672 if(!fFillPileUpHistograms) return;
674 //printf("E %f, time %f\n",energy,time);
675 AliVEvent * event = GetReader()->GetInputEvent();
677 fhTimeENoCut->Fill(energy,time);
678 if(GetReader()->IsPileUpFromSPD()) fhTimeESPD ->Fill(energy,time);
679 if(event->IsPileupFromSPDInMultBins()) fhTimeESPDMulti->Fill(energy,time);
681 if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
683 AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
684 AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
686 // N pile up vertices
687 Int_t nVerticesSPD = -1;
688 Int_t nVerticesTracks = -1;
692 nVerticesSPD = esdEv->GetNumberOfPileupVerticesSPD();
693 nVerticesTracks = esdEv->GetNumberOfPileupVerticesTracks();
698 nVerticesSPD = aodEv->GetNumberOfPileupVerticesSPD();
699 nVerticesTracks = aodEv->GetNumberOfPileupVerticesTracks();
702 fhTimeNPileUpVertSPD ->Fill(time,nVerticesSPD);
703 fhTimeNPileUpVertTrack->Fill(time,nVerticesTracks);
705 //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
706 // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVerticesSPD,nVerticesTracks);
709 Float_t z1 = -1, z2 = -1;
711 for(Int_t iVert=0; iVert<nVerticesSPD;iVert++)
715 const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
716 ncont=pv->GetNContributors();
717 z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
719 diamZ = esdEv->GetDiamondZ();
723 AliAODVertex *pv=aodEv->GetVertex(iVert);
724 if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
725 ncont=pv->GetNContributors();
726 z1=aodEv->GetPrimaryVertexSPD()->GetZ();
728 diamZ = aodEv->GetDiamondZ();
731 Double_t distZ = TMath::Abs(z2-z1);
732 diamZ = TMath::Abs(z2-diamZ);
734 fhTimeNPileUpVertContributors ->Fill(time,ncont);
735 fhTimePileUpMainVertexZDistance->Fill(time,distZ);
736 fhTimePileUpMainVertexZDiamond ->Fill(time,diamZ);
741 //____________________________________________________________________________________
742 void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster, const Int_t mcTag)
744 //Fill cluster Shower Shape histograms
746 if(!fFillSSHistograms || GetMixedEvent()) return;
748 Float_t energy = cluster->E();
749 Int_t ncells = cluster->GetNCells();
750 Float_t lambda0 = cluster->GetM02();
751 Float_t lambda1 = cluster->GetM20();
752 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
755 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
757 cluster->GetMomentum(mom,GetVertex(0)) ;
758 }//Assume that come from vertex in straight line
761 Double_t vertex[]={0,0,0};
762 cluster->GetMomentum(mom,vertex) ;
765 Float_t eta = mom.Eta();
766 Float_t phi = mom.Phi();
767 if(phi < 0) phi+=TMath::TwoPi();
769 fhLam0E ->Fill(energy,lambda0);
770 fhLam1E ->Fill(energy,lambda1);
771 fhDispE ->Fill(energy,disp);
773 if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5)
775 fhLam0ETRD->Fill(energy,lambda0);
776 fhLam1ETRD->Fill(energy,lambda1);
777 fhDispETRD->Fill(energy,disp);
780 Float_t l0 = 0., l1 = 0.;
781 Float_t dispp= 0., dEta = 0., dPhi = 0.;
782 Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
783 if(fCalorimeter == "EMCAL" && !fFillOnlySimpleSSHisto)
785 GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
786 l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
787 //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",
788 // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi );
789 //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n",
790 // disp, dPhi+dEta );
791 fhDispEtaE -> Fill(energy,dEta);
792 fhDispPhiE -> Fill(energy,dPhi);
793 fhSumEtaE -> Fill(energy,sEta);
794 fhSumPhiE -> Fill(energy,sPhi);
795 fhSumEtaPhiE -> Fill(energy,sEtaPhi);
796 fhDispEtaPhiDiffE -> Fill(energy,dPhi-dEta);
797 if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
798 if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.));
799 if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.));
802 if (energy < 2 ) ebin = 0;
803 else if (energy < 4 ) ebin = 1;
804 else if (energy < 6 ) ebin = 2;
805 else if (energy < 10) ebin = 3;
806 else if (energy < 15) ebin = 4;
807 else if (energy < 20) ebin = 5;
810 fhDispEtaDispPhi[ebin]->Fill(dEta ,dPhi);
811 fhLambda0DispEta[ebin]->Fill(lambda0,dEta);
812 fhLambda0DispPhi[ebin]->Fill(lambda0,dPhi);
816 // if track-matching was of, check effect of track-matching residual cut
818 if(!fRejectTrackMatch)
820 Float_t dZ = cluster->GetTrackDz();
821 Float_t dR = cluster->GetTrackDx();
822 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
824 dR = 2000., dZ = 2000.;
825 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
828 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
830 fhLam0ETM ->Fill(energy,lambda0);
831 fhLam1ETM ->Fill(energy,lambda1);
832 fhDispETM ->Fill(energy,disp);
834 if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5)
836 fhLam0ETMTRD->Fill(energy,lambda0);
837 fhLam1ETMTRD->Fill(energy,lambda1);
838 fhDispETMTRD->Fill(energy,disp);
841 }// if track-matching was of, check effect of matching residual cut
844 if(!fFillOnlySimpleSSHisto){
847 fhNCellsLam0LowE ->Fill(ncells,lambda0);
848 fhNCellsLam1LowE ->Fill(ncells,lambda1);
849 fhNCellsDispLowE ->Fill(ncells,disp);
851 fhLam1Lam0LowE ->Fill(lambda1,lambda0);
852 fhLam0DispLowE ->Fill(lambda0,disp);
853 fhDispLam1LowE ->Fill(disp,lambda1);
854 fhEtaLam0LowE ->Fill(eta,lambda0);
855 fhPhiLam0LowE ->Fill(phi,lambda0);
859 fhNCellsLam0HighE ->Fill(ncells,lambda0);
860 fhNCellsLam1HighE ->Fill(ncells,lambda1);
861 fhNCellsDispHighE ->Fill(ncells,disp);
863 fhLam1Lam0HighE ->Fill(lambda1,lambda0);
864 fhLam0DispHighE ->Fill(lambda0,disp);
865 fhDispLam1HighE ->Fill(disp,lambda1);
866 fhEtaLam0HighE ->Fill(eta, lambda0);
867 fhPhiLam0HighE ->Fill(phi, lambda0);
873 AliVCaloCells* cells = 0;
874 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
875 else cells = GetPHOSCells();
877 //Fill histograms to check shape of embedded clusters
878 Float_t fraction = 0;
879 if(GetReader()->IsEmbeddedClusterSelectionOn())
880 {//Only working for EMCAL
881 Float_t clusterE = 0; // recalculate in case corrections applied.
883 for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
885 cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell));
887 fraction+=cellE*cluster->GetCellAmplitudeFraction(icell);
890 //Fraction of total energy due to the embedded signal
894 printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE);
896 fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction);
898 } // embedded fraction
900 // Get the fraction of the cluster energy that carries the cell with highest energy
902 Float_t maxCellFraction = 0.;
904 absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction);
906 // Check the origin and fill histograms
910 if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
911 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
912 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
913 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
915 mcIndex = kmcssPhoton ;
917 if(!GetReader()->IsEmbeddedClusterSelectionOn())
919 //Check particle overlaps in cluster
921 // Compare the primary depositing more energy with the rest,
922 // if no photon/electron as comon ancestor (conversions), count as other particle
923 Int_t ancPDG = 0, ancStatus = -1;
924 TLorentzVector momentum; TVector3 prodVertex;
927 for (UInt_t ilab = 0; ilab < cluster->GetNLabels(); ilab++ )
929 ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster->GetLabels()[0],cluster->GetLabels()[ilab],
930 GetReader(),ancPDG,ancStatus,momentum,prodVertex);
931 if(ancPDG!=22 && TMath::Abs(ancPDG)!=11) noverlaps++;
933 //printf("N overlaps %d \n",noverlaps);
937 fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0);
939 else if(noverlaps == 2)
941 fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0);
943 else if(noverlaps > 2)
945 fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0);
949 printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!", noverlaps);
953 //Fill histograms to check shape of embedded clusters
954 if(GetReader()->IsEmbeddedClusterSelectionOn())
958 fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0);
960 else if(fraction > 0.5)
962 fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0);
964 else if(fraction > 0.1)
966 fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0);
970 fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0);
974 }//photon no conversion
975 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron))
977 mcIndex = kmcssElectron ;
979 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
980 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
982 mcIndex = kmcssConversion ;
984 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) )
988 //Fill histograms to check shape of embedded clusters
989 if(GetReader()->IsEmbeddedClusterSelectionOn())
993 fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0);
995 else if(fraction > 0.5)
997 fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0);
999 else if(fraction > 0.1)
1001 fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0);
1005 fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0);
1010 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) )
1012 mcIndex = kmcssEta ;
1016 mcIndex = kmcssOther ;
1019 fhMCELambda0 [mcIndex]->Fill(energy, lambda0);
1020 fhMCELambda1 [mcIndex]->Fill(energy, lambda1);
1021 fhMCEDispersion [mcIndex]->Fill(energy, disp);
1022 fhMCNCellsE [mcIndex]->Fill(energy, ncells);
1023 fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction);
1025 if(!fFillOnlySimpleSSHisto)
1029 fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction);
1030 fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction);
1032 else if(energy < 6.)
1034 fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction);
1035 fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction);
1039 fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction);
1040 fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction);
1043 if(fCalorimeter == "EMCAL")
1045 fhMCEDispEta [mcIndex]-> Fill(energy,dEta);
1046 fhMCEDispPhi [mcIndex]-> Fill(energy,dPhi);
1047 fhMCESumEtaPhi [mcIndex]-> Fill(energy,sEtaPhi);
1048 fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy,dPhi-dEta);
1049 if(dEta+dPhi>0)fhMCESphericity[mcIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
1052 if (energy < 2 ) ebin = 0;
1053 else if (energy < 4 ) ebin = 1;
1054 else if (energy < 6 ) ebin = 2;
1055 else if (energy < 10) ebin = 3;
1056 else if (energy < 15) ebin = 4;
1057 else if (energy < 20) ebin = 5;
1060 fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta ,dPhi);
1061 fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0,dEta);
1062 fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0,dPhi);
1069 //__________________________________________________________________________
1070 void AliAnaPhoton::FillTrackMatchingResidualHistograms(AliVCluster* cluster,
1073 // If selected, fill histograms with residuals of matched clusters, help to define track matching cut
1074 // Residual filled for different cuts 0 (No cut), after 1 PID cut
1076 Float_t dZ = cluster->GetTrackDz();
1077 Float_t dR = cluster->GetTrackDx();
1079 if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
1081 dR = 2000., dZ = 2000.;
1082 GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
1085 if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999)
1087 fhTrackMatchedDEta[cut]->Fill(cluster->E(),dZ);
1088 fhTrackMatchedDPhi[cut]->Fill(cluster->E(),dR);
1090 if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ,dR);
1092 Int_t nSMod = GetModuleNumber(cluster);
1094 if(fCalorimeter=="EMCAL" && nSMod > 5)
1096 fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(),dZ);
1097 fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(),dR);
1100 // Check dEdx and E/p of matched clusters
1102 if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
1105 AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
1110 Float_t dEdx = track->GetTPCsignal();
1111 Float_t eOverp = cluster->E()/track->P();
1113 fhdEdx[cut] ->Fill(cluster->E(), dEdx);
1114 fhEOverP[cut]->Fill(cluster->E(), eOverp);
1116 if(fCalorimeter=="EMCAL" && nSMod > 5)
1117 fhEOverPTRD[cut]->Fill(cluster->E(), eOverp);
1122 printf("AliAnaPhoton::FillTrackMatchingResidualHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
1129 Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader(), 0);
1131 if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
1133 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1134 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5 );
1135 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5 );
1136 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5 );
1137 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5 );
1139 // Check if several particles contributed to cluster and discard overlapped mesons
1140 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1141 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1143 if(cluster->GetNLabels()==1)
1145 fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(),dZ);
1146 fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(),dR);
1150 fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(),dZ);
1151 fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(),dR);
1159 if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1160 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5 );
1161 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5 );
1162 else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5 );
1163 else fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5 );
1165 // Check if several particles contributed to cluster
1166 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
1167 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
1169 fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(),dZ);
1170 fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(),dR);
1178 } // residuals window
1184 //___________________________________________
1185 TObjString * AliAnaPhoton::GetAnalysisCuts()
1187 //Save parameters used for analysis
1188 TString parList ; //this will be list of parameters used for this analysis.
1189 const Int_t buffersize = 255;
1190 char onePar[buffersize] ;
1192 snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ;
1194 snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ;
1196 snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ;
1198 snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ;
1200 snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ;
1202 snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ;
1205 //Get parameters set in base class.
1206 parList += GetBaseParametersList() ;
1208 //Get parameters set in PID class.
1209 parList += GetCaloPID()->GetPIDParametersList() ;
1211 //Get parameters set in FiducialCut class (not available yet)
1212 //parlist += GetFidCut()->GetFidCutParametersList()
1214 return new TObjString(parList) ;
1217 //________________________________________________________________________
1218 TList * AliAnaPhoton::GetCreateOutputObjects()
1220 // Create histograms to be saved in output file and
1221 // store them in outputContainer
1222 TList * outputContainer = new TList() ;
1223 outputContainer->SetName("PhotonHistos") ;
1225 Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
1226 Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
1227 Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
1228 Int_t ssbins = GetHistogramRanges()->GetHistoShowerShapeBins(); Float_t ssmax = GetHistogramRanges()->GetHistoShowerShapeMax(); Float_t ssmin = GetHistogramRanges()->GetHistoShowerShapeMin();
1229 Int_t nbins = GetHistogramRanges()->GetHistoNClusterCellBins(); Int_t nmax = GetHistogramRanges()->GetHistoNClusterCellMax(); Int_t nmin = GetHistogramRanges()->GetHistoNClusterCellMin();
1230 Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
1232 Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
1233 Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
1234 Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
1235 Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
1236 Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
1237 Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
1239 Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
1240 Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
1241 Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
1242 Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
1243 Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
1244 Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
1246 Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies
1248 TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"};
1249 for (Int_t i = 0; i < 10 ; i++)
1251 fhClusterCuts[i] = new TH1F(Form("hCut_%d_%s", i, cut[i].Data()),
1252 Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
1253 nptbins,ptmin,ptmax);
1254 fhClusterCuts[i]->SetYTitle("dN/dE ");
1255 fhClusterCuts[i]->SetXTitle("E (GeV)");
1256 outputContainer->Add(fhClusterCuts[i]) ;
1259 fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1260 fhNCellsE->SetXTitle("E (GeV)");
1261 fhNCellsE->SetYTitle("# of cells in cluster");
1262 outputContainer->Add(fhNCellsE);
1264 fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax);
1265 fhCellsE->SetXTitle("E_{cluster} (GeV)");
1266 fhCellsE->SetYTitle("E_{cell} (GeV)");
1267 outputContainer->Add(fhCellsE);
1269 fhTimeE = new TH2F ("hTimeE","time of cluster vs E of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1270 fhTimeE->SetXTitle("E (GeV)");
1271 fhTimeE->SetYTitle("time (ns)");
1272 outputContainer->Add(fhTimeE);
1274 fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
1275 nptbins,ptmin,ptmax, 500,0,1.);
1276 fhMaxCellDiffClusterE->SetXTitle("E_{cluster} (GeV) ");
1277 fhMaxCellDiffClusterE->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1278 outputContainer->Add(fhMaxCellDiffClusterE);
1280 fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax);
1281 fhEPhoton->SetYTitle("N");
1282 fhEPhoton->SetXTitle("E_{#gamma}(GeV)");
1283 outputContainer->Add(fhEPhoton) ;
1285 fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs p_{T}",nptbins,ptmin,ptmax);
1286 fhPtPhoton->SetYTitle("N");
1287 fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/c)");
1288 outputContainer->Add(fhPtPhoton) ;
1290 fhPhiPhoton = new TH2F
1291 ("hPhiPhoton","#phi_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1292 fhPhiPhoton->SetYTitle("#phi (rad)");
1293 fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/c)");
1294 outputContainer->Add(fhPhiPhoton) ;
1296 fhEtaPhoton = new TH2F
1297 ("hEtaPhoton","#eta_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1298 fhEtaPhoton->SetYTitle("#eta");
1299 fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/c)");
1300 outputContainer->Add(fhEtaPhoton) ;
1302 fhEtaPhiPhoton = new TH2F
1303 ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1304 fhEtaPhiPhoton->SetYTitle("#phi (rad)");
1305 fhEtaPhiPhoton->SetXTitle("#eta");
1306 outputContainer->Add(fhEtaPhiPhoton) ;
1307 if(GetMinPt() < 0.5)
1309 fhEtaPhi05Photon = new TH2F
1310 ("hEtaPhi05Photon","#eta vs #phi, E > 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
1311 fhEtaPhi05Photon->SetYTitle("#phi (rad)");
1312 fhEtaPhi05Photon->SetXTitle("#eta");
1313 outputContainer->Add(fhEtaPhi05Photon) ;
1316 fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster",
1317 nptbins,ptmin,ptmax,10,0,10);
1318 fhNLocMax ->SetYTitle("N maxima");
1319 fhNLocMax ->SetXTitle("E (GeV)");
1320 outputContainer->Add(fhNLocMax) ;
1323 if(fFillSSHistograms)
1325 fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1326 fhLam0E->SetYTitle("#lambda_{0}^{2}");
1327 fhLam0E->SetXTitle("E (GeV)");
1328 outputContainer->Add(fhLam0E);
1330 fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1331 fhLam1E->SetYTitle("#lambda_{1}^{2}");
1332 fhLam1E->SetXTitle("E (GeV)");
1333 outputContainer->Add(fhLam1E);
1335 fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1336 fhDispE->SetYTitle("D^{2}");
1337 fhDispE->SetXTitle("E (GeV) ");
1338 outputContainer->Add(fhDispE);
1340 if(!fRejectTrackMatch)
1342 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);
1343 fhLam0ETM->SetYTitle("#lambda_{0}^{2}");
1344 fhLam0ETM->SetXTitle("E (GeV)");
1345 outputContainer->Add(fhLam0ETM);
1347 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);
1348 fhLam1ETM->SetYTitle("#lambda_{1}^{2}");
1349 fhLam1ETM->SetXTitle("E (GeV)");
1350 outputContainer->Add(fhLam1ETM);
1352 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);
1353 fhDispETM->SetYTitle("D^{2}");
1354 fhDispETM->SetXTitle("E (GeV) ");
1355 outputContainer->Add(fhDispETM);
1358 if(fCalorimeter == "EMCAL")
1360 fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1361 fhLam0ETRD->SetYTitle("#lambda_{0}^{2}");
1362 fhLam0ETRD->SetXTitle("E (GeV)");
1363 outputContainer->Add(fhLam0ETRD);
1365 fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1366 fhLam1ETRD->SetYTitle("#lambda_{1}^{2}");
1367 fhLam1ETRD->SetXTitle("E (GeV)");
1368 outputContainer->Add(fhLam1ETRD);
1370 fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1371 fhDispETRD->SetYTitle("Dispersion^{2}");
1372 fhDispETRD->SetXTitle("E (GeV) ");
1373 outputContainer->Add(fhDispETRD);
1375 if(!fRejectTrackMatch)
1377 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);
1378 fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}");
1379 fhLam0ETMTRD->SetXTitle("E (GeV)");
1380 outputContainer->Add(fhLam0ETMTRD);
1382 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);
1383 fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}");
1384 fhLam1ETMTRD->SetXTitle("E (GeV)");
1385 outputContainer->Add(fhLam1ETMTRD);
1387 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);
1388 fhDispETMTRD->SetYTitle("Dispersion^{2}");
1389 fhDispETMTRD->SetXTitle("E (GeV) ");
1390 outputContainer->Add(fhDispETMTRD);
1394 if(!fFillOnlySimpleSSHisto)
1396 fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1397 fhNCellsLam0LowE->SetXTitle("N_{cells}");
1398 fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}");
1399 outputContainer->Add(fhNCellsLam0LowE);
1401 fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1402 fhNCellsLam0HighE->SetXTitle("N_{cells}");
1403 fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}");
1404 outputContainer->Add(fhNCellsLam0HighE);
1406 fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1407 fhNCellsLam1LowE->SetXTitle("N_{cells}");
1408 fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}");
1409 outputContainer->Add(fhNCellsLam1LowE);
1411 fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1412 fhNCellsLam1HighE->SetXTitle("N_{cells}");
1413 fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}");
1414 outputContainer->Add(fhNCellsLam1HighE);
1416 fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1417 fhNCellsDispLowE->SetXTitle("N_{cells}");
1418 fhNCellsDispLowE->SetYTitle("D^{2}");
1419 outputContainer->Add(fhNCellsDispLowE);
1421 fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1422 fhNCellsDispHighE->SetXTitle("N_{cells}");
1423 fhNCellsDispHighE->SetYTitle("D^{2}");
1424 outputContainer->Add(fhNCellsDispHighE);
1426 fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1427 fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}");
1428 fhEtaLam0LowE->SetXTitle("#eta");
1429 outputContainer->Add(fhEtaLam0LowE);
1431 fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1432 fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}");
1433 fhPhiLam0LowE->SetXTitle("#phi");
1434 outputContainer->Add(fhPhiLam0LowE);
1436 fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, E > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1437 fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}");
1438 fhEtaLam0HighE->SetXTitle("#eta");
1439 outputContainer->Add(fhEtaLam0HighE);
1441 fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, E > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1442 fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}");
1443 fhPhiLam0HighE->SetXTitle("#phi");
1444 outputContainer->Add(fhPhiLam0HighE);
1446 fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1447 fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}");
1448 fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}");
1449 outputContainer->Add(fhLam1Lam0LowE);
1451 fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1452 fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}");
1453 fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}");
1454 outputContainer->Add(fhLam1Lam0HighE);
1456 fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1457 fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}");
1458 fhLam0DispLowE->SetYTitle("D^{2}");
1459 outputContainer->Add(fhLam0DispLowE);
1461 fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1462 fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}");
1463 fhLam0DispHighE->SetYTitle("D^{2}");
1464 outputContainer->Add(fhLam0DispHighE);
1466 fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1467 fhDispLam1LowE->SetXTitle("D^{2}");
1468 fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}");
1469 outputContainer->Add(fhDispLam1LowE);
1471 fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1472 fhDispLam1HighE->SetXTitle("D^{2}");
1473 fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}");
1474 outputContainer->Add(fhDispLam1HighE);
1476 if(fCalorimeter == "EMCAL")
1478 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);
1479 fhDispEtaE->SetXTitle("E (GeV)");
1480 fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}");
1481 outputContainer->Add(fhDispEtaE);
1483 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);
1484 fhDispPhiE->SetXTitle("E (GeV)");
1485 fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}");
1486 outputContainer->Add(fhDispPhiE);
1488 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);
1489 fhSumEtaE->SetXTitle("E (GeV)");
1490 fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}");
1491 outputContainer->Add(fhSumEtaE);
1493 fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",
1494 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1495 fhSumPhiE->SetXTitle("E (GeV)");
1496 fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}");
1497 outputContainer->Add(fhSumPhiE);
1499 fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",
1500 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1501 fhSumEtaPhiE->SetXTitle("E (GeV)");
1502 fhSumEtaPhiE->SetYTitle("#delta^{2}_{#eta #phi}");
1503 outputContainer->Add(fhSumEtaPhiE);
1505 fhDispEtaPhiDiffE = new TH2F ("hDispEtaPhiDiffE","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",
1506 nptbins,ptmin,ptmax,200, -10,10);
1507 fhDispEtaPhiDiffE->SetXTitle("E (GeV)");
1508 fhDispEtaPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1509 outputContainer->Add(fhDispEtaPhiDiffE);
1511 fhSphericityE = new TH2F ("hSphericityE","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",
1512 nptbins,ptmin,ptmax, 200, -1,1);
1513 fhSphericityE->SetXTitle("E (GeV)");
1514 fhSphericityE->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1515 outputContainer->Add(fhSphericityE);
1517 fhDispSumEtaDiffE = new TH2F ("hDispSumEtaDiffE","#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1518 fhDispSumEtaDiffE->SetXTitle("E (GeV)");
1519 fhDispSumEtaDiffE->SetYTitle("#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average");
1520 outputContainer->Add(fhDispSumEtaDiffE);
1522 fhDispSumPhiDiffE = new TH2F ("hDispSumPhiDiffE","#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1523 fhDispSumPhiDiffE->SetXTitle("E (GeV)");
1524 fhDispSumPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average");
1525 outputContainer->Add(fhDispSumPhiDiffE);
1527 for(Int_t i = 0; i < 7; i++)
1529 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]),
1530 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1531 fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1532 fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1533 outputContainer->Add(fhDispEtaDispPhi[i]);
1535 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]),
1536 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1537 fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1538 fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1539 outputContainer->Add(fhLambda0DispEta[i]);
1541 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]),
1542 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1543 fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1544 fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1545 outputContainer->Add(fhLambda0DispPhi[i]);
1555 fhTrackMatchedDEta[0] = new TH2F
1556 ("hTrackMatchedDEtaNoCut",
1557 "d#eta of cluster-track vs cluster energy, no photon cuts",
1558 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1559 fhTrackMatchedDEta[0]->SetYTitle("d#eta");
1560 fhTrackMatchedDEta[0]->SetXTitle("E_{cluster} (GeV)");
1562 fhTrackMatchedDPhi[0] = new TH2F
1563 ("hTrackMatchedDPhiNoCut",
1564 "d#phi of cluster-track vs cluster energy, no photon cuts",
1565 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1566 fhTrackMatchedDPhi[0]->SetYTitle("d#phi (rad)");
1567 fhTrackMatchedDPhi[0]->SetXTitle("E_{cluster} (GeV)");
1569 fhTrackMatchedDEtaDPhi[0] = new TH2F
1570 ("hTrackMatchedDEtaDPhiNoCut",
1571 "d#eta vs d#phi of cluster-track vs cluster energy, no photon cuts",
1572 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1573 fhTrackMatchedDEtaDPhi[0]->SetYTitle("d#phi (rad)");
1574 fhTrackMatchedDEtaDPhi[0]->SetXTitle("d#eta");
1576 fhdEdx[0] = new TH2F ("hdEdxNoCut","matched track <dE/dx> vs cluster E, no photon cuts ",
1577 nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1578 fhdEdx[0]->SetXTitle("E (GeV)");
1579 fhdEdx[0]->SetYTitle("<dE/dx>");
1581 fhEOverP[0] = new TH2F ("hEOverPNoCut","matched track E/p vs cluster E, no photon cuts ",
1582 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1583 fhEOverP[0]->SetXTitle("E (GeV)");
1584 fhEOverP[0]->SetYTitle("E/p");
1586 outputContainer->Add(fhTrackMatchedDEta[0]) ;
1587 outputContainer->Add(fhTrackMatchedDPhi[0]) ;
1588 outputContainer->Add(fhTrackMatchedDEtaDPhi[0]) ;
1589 outputContainer->Add(fhdEdx[0]);
1590 outputContainer->Add(fhEOverP[0]);
1592 fhTrackMatchedDEta[1] = new TH2F
1593 ("hTrackMatchedDEta",
1594 "d#eta of cluster-track vs cluster energy, no photon cuts",
1595 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1596 fhTrackMatchedDEta[1]->SetYTitle("d#eta");
1597 fhTrackMatchedDEta[1]->SetXTitle("E_{cluster} (GeV)");
1599 fhTrackMatchedDPhi[1] = new TH2F
1600 ("hTrackMatchedDPhi",
1601 "d#phi of cluster-track vs cluster energy, no photon cuts",
1602 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1603 fhTrackMatchedDPhi[1]->SetYTitle("d#phi (rad)");
1604 fhTrackMatchedDPhi[1]->SetXTitle("E_{cluster} (GeV)");
1606 fhTrackMatchedDEtaDPhi[1] = new TH2F
1607 ("hTrackMatchedDEtaDPhi",
1608 "d#eta vs d#phi of cluster-track vs cluster energy, no photon cuts",
1609 nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1610 fhTrackMatchedDEtaDPhi[1]->SetYTitle("d#phi (rad)");
1611 fhTrackMatchedDEtaDPhi[1]->SetXTitle("d#eta");
1613 fhdEdx[1] = new TH2F ("hdEdx","matched track <dE/dx> vs cluster E ",
1614 nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1615 fhdEdx[1]->SetXTitle("E (GeV)");
1616 fhdEdx[1]->SetYTitle("<dE/dx>");
1618 fhEOverP[1] = new TH2F ("hEOverP","matched track E/p vs cluster E ",
1619 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1620 fhEOverP[1]->SetXTitle("E (GeV)");
1621 fhEOverP[1]->SetYTitle("E/p");
1623 outputContainer->Add(fhTrackMatchedDEta[1]) ;
1624 outputContainer->Add(fhTrackMatchedDPhi[1]) ;
1625 outputContainer->Add(fhTrackMatchedDEtaDPhi[1]) ;
1626 outputContainer->Add(fhdEdx[1]);
1627 outputContainer->Add(fhEOverP[1]);
1629 if(fCalorimeter=="EMCAL")
1631 fhTrackMatchedDEtaTRD[0] = new TH2F
1632 ("hTrackMatchedDEtaTRDNoCut",
1633 "d#eta of cluster-track vs cluster energy, SM behind TRD, no photon cuts",
1634 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1635 fhTrackMatchedDEtaTRD[0]->SetYTitle("d#eta");
1636 fhTrackMatchedDEtaTRD[0]->SetXTitle("E_{cluster} (GeV)");
1638 fhTrackMatchedDPhiTRD[0] = new TH2F
1639 ("hTrackMatchedDPhiTRDNoCut",
1640 "d#phi of cluster-track vs cluster energy, SM behing TRD, no photon cuts",
1641 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1642 fhTrackMatchedDPhiTRD[0]->SetYTitle("d#phi (rad)");
1643 fhTrackMatchedDPhiTRD[0]->SetXTitle("E_{cluster} (GeV)");
1645 fhEOverPTRD[0] = new TH2F ("hEOverPTRDNoCut","matched track E/p vs cluster E, behind TRD, no photon cuts ",
1646 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1647 fhEOverPTRD[0]->SetXTitle("E (GeV)");
1648 fhEOverPTRD[0]->SetYTitle("E/p");
1650 outputContainer->Add(fhTrackMatchedDEtaTRD[0]) ;
1651 outputContainer->Add(fhTrackMatchedDPhiTRD[0]) ;
1652 outputContainer->Add(fhEOverPTRD[0]);
1654 fhTrackMatchedDEtaTRD[1] = new TH2F
1655 ("hTrackMatchedDEtaTRD",
1656 "d#eta of cluster-track vs cluster energy, SM behind TRD",
1657 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1658 fhTrackMatchedDEtaTRD[1]->SetYTitle("d#eta");
1659 fhTrackMatchedDEtaTRD[1]->SetXTitle("E_{cluster} (GeV)");
1661 fhTrackMatchedDPhiTRD[1] = new TH2F
1662 ("hTrackMatchedDPhiTRD",
1663 "d#phi of cluster-track vs cluster energy, SM behing TRD",
1664 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1665 fhTrackMatchedDPhiTRD[1]->SetYTitle("d#phi (rad)");
1666 fhTrackMatchedDPhiTRD[1]->SetXTitle("E_{cluster} (GeV)");
1668 fhEOverPTRD[1] = new TH2F ("hEOverPTRD","matched track E/p vs cluster E, behind TRD ",
1669 nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1670 fhEOverPTRD[1]->SetXTitle("E (GeV)");
1671 fhEOverPTRD[1]->SetYTitle("E/p");
1673 outputContainer->Add(fhTrackMatchedDEtaTRD[1]) ;
1674 outputContainer->Add(fhTrackMatchedDPhiTRD[1]) ;
1675 outputContainer->Add(fhEOverPTRD[1]);
1681 fhTrackMatchedDEtaMCNoOverlap[0] = new TH2F
1682 ("hTrackMatchedDEtaMCNoOverlapNoCut",
1683 "d#eta of cluster-track vs cluster energy, no other MC particles overlap",
1684 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1685 fhTrackMatchedDEtaMCNoOverlap[0]->SetYTitle("d#eta");
1686 fhTrackMatchedDEtaMCNoOverlap[0]->SetXTitle("E_{cluster} (GeV)");
1688 fhTrackMatchedDPhiMCNoOverlap[0] = new TH2F
1689 ("hTrackMatchedDPhiMCNoOverlapNoCut",
1690 "d#phi of cluster-track vs cluster energy, no other MC particles overlap",
1691 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1692 fhTrackMatchedDPhiMCNoOverlap[0]->SetYTitle("d#phi (rad)");
1693 fhTrackMatchedDPhiMCNoOverlap[0]->SetXTitle("E_{cluster} (GeV)");
1695 outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[0]) ;
1696 outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[0]) ;
1698 fhTrackMatchedDEtaMCNoOverlap[1] = new TH2F
1699 ("hTrackMatchedDEtaMCNoOverlap",
1700 "d#eta of cluster-track vs cluster energy, no other MC particles overlap",
1701 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1702 fhTrackMatchedDEtaMCNoOverlap[1]->SetYTitle("d#eta");
1703 fhTrackMatchedDEtaMCNoOverlap[1]->SetXTitle("E_{cluster} (GeV)");
1705 fhTrackMatchedDPhiMCNoOverlap[1] = new TH2F
1706 ("hTrackMatchedDPhiMCNoOverlap",
1707 "d#phi of cluster-track vs cluster energy, no other MC particles overlap",
1708 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1709 fhTrackMatchedDPhiMCNoOverlap[1]->SetYTitle("d#phi (rad)");
1710 fhTrackMatchedDPhiMCNoOverlap[1]->SetXTitle("E_{cluster} (GeV)");
1712 outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[1]) ;
1713 outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[1]) ;
1715 fhTrackMatchedDEtaMCOverlap[0] = new TH2F
1716 ("hTrackMatchedDEtaMCOverlapNoCut",
1717 "d#eta of cluster-track vs cluster energy, several MC particles overlap",
1718 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1719 fhTrackMatchedDEtaMCOverlap[0]->SetYTitle("d#eta");
1720 fhTrackMatchedDEtaMCOverlap[0]->SetXTitle("E_{cluster} (GeV)");
1722 fhTrackMatchedDPhiMCOverlap[0] = new TH2F
1723 ("hTrackMatchedDPhiMCOverlapNoCut",
1724 "d#phi of cluster-track vs cluster energy, several MC particles overlap",
1725 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1726 fhTrackMatchedDPhiMCOverlap[0]->SetYTitle("d#phi (rad)");
1727 fhTrackMatchedDPhiMCOverlap[0]->SetXTitle("E_{cluster} (GeV)");
1729 outputContainer->Add(fhTrackMatchedDEtaMCOverlap[0]) ;
1730 outputContainer->Add(fhTrackMatchedDPhiMCOverlap[0]) ;
1732 fhTrackMatchedDEtaMCOverlap[1] = new TH2F
1733 ("hTrackMatchedDEtaMCOverlap",
1734 "d#eta of cluster-track vs cluster energy, several MC particles overlap",
1735 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1736 fhTrackMatchedDEtaMCOverlap[1]->SetYTitle("d#eta");
1737 fhTrackMatchedDEtaMCOverlap[1]->SetXTitle("E_{cluster} (GeV)");
1739 fhTrackMatchedDPhiMCOverlap[1] = new TH2F
1740 ("hTrackMatchedDPhiMCOverlap",
1741 "d#phi of cluster-track vs cluster energy, several MC particles overlap",
1742 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1743 fhTrackMatchedDPhiMCOverlap[1]->SetYTitle("d#phi (rad)");
1744 fhTrackMatchedDPhiMCOverlap[1]->SetXTitle("E_{cluster} (GeV)");
1746 outputContainer->Add(fhTrackMatchedDEtaMCOverlap[1]) ;
1747 outputContainer->Add(fhTrackMatchedDPhiMCOverlap[1]) ;
1749 fhTrackMatchedDEtaMCConversion[0] = new TH2F
1750 ("hTrackMatchedDEtaMCConversionNoCut",
1751 "d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions",
1752 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1753 fhTrackMatchedDEtaMCConversion[0]->SetYTitle("d#eta");
1754 fhTrackMatchedDEtaMCConversion[0]->SetXTitle("E_{cluster} (GeV)");
1756 fhTrackMatchedDPhiMCConversion[0] = new TH2F
1757 ("hTrackMatchedDPhiMCConversionNoCut",
1758 "d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions",
1759 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1760 fhTrackMatchedDPhiMCConversion[0]->SetYTitle("d#phi (rad)");
1761 fhTrackMatchedDPhiMCConversion[0]->SetXTitle("E_{cluster} (GeV)");
1763 outputContainer->Add(fhTrackMatchedDEtaMCConversion[0]) ;
1764 outputContainer->Add(fhTrackMatchedDPhiMCConversion[0]) ;
1767 fhTrackMatchedDEtaMCConversion[1] = new TH2F
1768 ("hTrackMatchedDEtaMCConversion",
1769 "d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions",
1770 nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1771 fhTrackMatchedDEtaMCConversion[1]->SetYTitle("d#eta");
1772 fhTrackMatchedDEtaMCConversion[1]->SetXTitle("E_{cluster} (GeV)");
1774 fhTrackMatchedDPhiMCConversion[1] = new TH2F
1775 ("hTrackMatchedDPhiMCConversion",
1776 "d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions",
1777 nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1778 fhTrackMatchedDPhiMCConversion[1]->SetYTitle("d#phi (rad)");
1779 fhTrackMatchedDPhiMCConversion[1]->SetXTitle("E_{cluster} (GeV)");
1781 outputContainer->Add(fhTrackMatchedDEtaMCConversion[1]) ;
1782 outputContainer->Add(fhTrackMatchedDPhiMCConversion[1]) ;
1785 fhTrackMatchedMCParticle[0] = new TH2F
1786 ("hTrackMatchedMCParticleNoCut",
1787 "Origin of particle vs energy",
1788 nptbins,ptmin,ptmax,8,0,8);
1789 fhTrackMatchedMCParticle[0]->SetXTitle("E (GeV)");
1790 //fhTrackMatchedMCParticle[0]->SetYTitle("Particle type");
1792 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(1 ,"Photon");
1793 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(2 ,"Electron");
1794 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1795 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(4 ,"Rest");
1796 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1797 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1798 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1799 fhTrackMatchedMCParticle[0]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1801 fhTrackMatchedMCParticle[1] = new TH2F
1802 ("hTrackMatchedMCParticle",
1803 "Origin of particle vs energy",
1804 nptbins,ptmin,ptmax,8,0,8);
1805 fhTrackMatchedMCParticle[1]->SetXTitle("E (GeV)");
1806 //fhTrackMatchedMCParticle[1]->SetYTitle("Particle type");
1808 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(1 ,"Photon");
1809 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(2 ,"Electron");
1810 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1811 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(4 ,"Rest");
1812 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1813 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1814 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1815 fhTrackMatchedMCParticle[1]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1817 outputContainer->Add(fhTrackMatchedMCParticle[0]);
1818 outputContainer->Add(fhTrackMatchedMCParticle[1]);
1823 if(fFillPileUpHistograms)
1826 TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
1828 for(Int_t i = 0 ; i < 7 ; i++)
1830 fhPtPhotonPileUp[i] = new TH1F(Form("hPtPhotonPileUp%s",pileUpName[i].Data()),
1831 Form("Selected photon p_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
1832 fhPtPhotonPileUp[i]->SetXTitle("p_{T} (GeV/c)");
1833 outputContainer->Add(fhPtPhotonPileUp[i]);
1836 fhTimeENoCut = new TH2F ("hTimeE_NoCut","time of cluster vs E of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1837 fhTimeENoCut->SetXTitle("E (GeV)");
1838 fhTimeENoCut->SetYTitle("time (ns)");
1839 outputContainer->Add(fhTimeENoCut);
1841 fhTimeESPD = new TH2F ("hTimeE_SPD","time of cluster vs E of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1842 fhTimeESPD->SetXTitle("E (GeV)");
1843 fhTimeESPD->SetYTitle("time (ns)");
1844 outputContainer->Add(fhTimeESPD);
1846 fhTimeESPDMulti = new TH2F ("hTimeE_SPDMulti","time of cluster vs E of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1847 fhTimeESPDMulti->SetXTitle("E (GeV)");
1848 fhTimeESPDMulti->SetYTitle("time (ns)");
1849 outputContainer->Add(fhTimeESPDMulti);
1851 fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50);
1852 fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
1853 fhTimeNPileUpVertSPD->SetXTitle("time (ns)");
1854 outputContainer->Add(fhTimeNPileUpVertSPD);
1856 fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 50,0,50 );
1857 fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
1858 fhTimeNPileUpVertTrack->SetXTitle("time (ns)");
1859 outputContainer->Add(fhTimeNPileUpVertTrack);
1861 fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","time of cluster vs N constributors to pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50);
1862 fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
1863 fhTimeNPileUpVertContributors->SetXTitle("time (ns)");
1864 outputContainer->Add(fhTimeNPileUpVertContributors);
1866 fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","time of cluster vs distance in Z pile-up SPD vertex - main SPD vertex",ntimebins,timemin,timemax,100,0,50);
1867 fhTimePileUpMainVertexZDistance->SetYTitle("distance Z (cm) ");
1868 fhTimePileUpMainVertexZDistance->SetXTitle("time (ns)");
1869 outputContainer->Add(fhTimePileUpMainVertexZDistance);
1871 fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","time of cluster vs distance in Z pile-up SPD vertex - z diamond",ntimebins,timemin,timemax,100,0,50);
1872 fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance Z (cm) ");
1873 fhTimePileUpMainVertexZDiamond->SetXTitle("time (ns)");
1874 outputContainer->Add(fhTimePileUpMainVertexZDiamond);
1876 TString title[] = {"no |t diff| cut","|t diff|<20 ns","|t diff|>20 ns","|t diff|>40 ns"};
1877 TString name [] = {"TDiffNoCut","TDiffSmaller20ns","TDiffLarger20ns","TDiffLarger40ns"};
1878 for(Int_t i = 0; i < 4; i++)
1880 fhClusterMultSPDPileUp[i] = new TH2F(Form("fhClusterMultSPDPileUp_%s", name[i].Data()),
1881 Form("Number of clusters per pile up event with E > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()),
1882 nptbins,ptmin,ptmax,100,0,100);
1883 fhClusterMultSPDPileUp[i]->SetYTitle("n clusters ");
1884 fhClusterMultSPDPileUp[i]->SetXTitle("E_{cluster max} (GeV)");
1885 outputContainer->Add(fhClusterMultSPDPileUp[i]) ;
1887 fhClusterMultNoPileUp[i] = new TH2F(Form("fhClusterMultNoPileUp_%s", name[i].Data()),
1888 Form("Number of clusters per non pile up event with E > 0.5 and %s respect cluster max vs cluster max E ",title[i].Data()),
1889 nptbins,ptmin,ptmax,100,0,100);
1890 fhClusterMultNoPileUp[i]->SetYTitle("n clusters ");
1891 fhClusterMultNoPileUp[i]->SetXTitle("E_{cluster max} (GeV)");
1892 outputContainer->Add(fhClusterMultNoPileUp[i]) ;
1899 TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
1900 "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P",
1901 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String" } ;
1903 TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
1904 "Conversion", "Hadron", "AntiNeutron","AntiProton",
1905 "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ;
1907 for(Int_t i = 0; i < fNOriginHistograms; i++)
1909 fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()),
1910 Form("cluster from %s : E ",ptype[i].Data()),
1911 nptbins,ptmin,ptmax);
1912 fhMCE[i]->SetXTitle("E (GeV)");
1913 outputContainer->Add(fhMCE[i]) ;
1915 fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()),
1916 Form("cluster from %s : p_{T} ",ptype[i].Data()),
1917 nptbins,ptmin,ptmax);
1918 fhMCPt[i]->SetXTitle("p_{T} (GeV/c)");
1919 outputContainer->Add(fhMCPt[i]) ;
1921 fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()),
1922 Form("cluster from %s : #eta ",ptype[i].Data()),
1923 nptbins,ptmin,ptmax,netabins,etamin,etamax);
1924 fhMCEta[i]->SetYTitle("#eta");
1925 fhMCEta[i]->SetXTitle("E (GeV)");
1926 outputContainer->Add(fhMCEta[i]) ;
1928 fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()),
1929 Form("cluster from %s : #phi ",ptype[i].Data()),
1930 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1931 fhMCPhi[i]->SetYTitle("#phi (rad)");
1932 fhMCPhi[i]->SetXTitle("E (GeV)");
1933 outputContainer->Add(fhMCPhi[i]) ;
1936 fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()),
1937 Form("MC - Reco E from %s",pname[i].Data()),
1938 nptbins,ptmin,ptmax, 200,-50,50);
1939 fhMCDeltaE[i]->SetXTitle("#Delta E (GeV)");
1940 outputContainer->Add(fhMCDeltaE[i]);
1942 fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()),
1943 Form("MC - Reco p_{T} from %s",pname[i].Data()),
1944 nptbins,ptmin,ptmax, 200,-50,50);
1945 fhMCDeltaPt[i]->SetXTitle("#Delta p_{T} (GeV/c)");
1946 outputContainer->Add(fhMCDeltaPt[i]);
1948 fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()),
1949 Form("E distribution, reconstructed vs generated from %s",pname[i].Data()),
1950 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1951 fhMC2E[i]->SetXTitle("E_{rec} (GeV)");
1952 fhMC2E[i]->SetYTitle("E_{gen} (GeV)");
1953 outputContainer->Add(fhMC2E[i]);
1955 fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()),
1956 Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()),
1957 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1958 fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/c)");
1959 fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/c)");
1960 outputContainer->Add(fhMC2Pt[i]);
1965 TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}","hadron?",
1966 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ;
1968 TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Hadron",
1969 "PhotonPrompt","PhotonFragmentation","PhotonISR"} ;
1971 for(Int_t i = 0; i < fNPrimaryHistograms; i++)
1973 fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()),
1974 Form("primary photon %s : E ",pptype[i].Data()),
1975 nptbins,ptmin,ptmax);
1976 fhEPrimMC[i]->SetXTitle("E (GeV)");
1977 outputContainer->Add(fhEPrimMC[i]) ;
1979 fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()),
1980 Form("primary photon %s : p_{T} ",pptype[i].Data()),
1981 nptbins,ptmin,ptmax);
1982 fhPtPrimMC[i]->SetXTitle("p_{T} (GeV/c)");
1983 outputContainer->Add(fhPtPrimMC[i]) ;
1985 fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()),
1986 Form("primary photon %s : Rapidity ",pptype[i].Data()),
1987 nptbins,ptmin,ptmax,800,-8,8);
1988 fhYPrimMC[i]->SetYTitle("Rapidity");
1989 fhYPrimMC[i]->SetXTitle("E (GeV)");
1990 outputContainer->Add(fhYPrimMC[i]) ;
1992 fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()),
1993 Form("primary photon %s : #phi ",pptype[i].Data()),
1994 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1995 fhPhiPrimMC[i]->SetYTitle("#phi (rad)");
1996 fhPhiPrimMC[i]->SetXTitle("E (GeV)");
1997 outputContainer->Add(fhPhiPrimMC[i]) ;
2000 fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()),
2001 Form("primary photon %s in acceptance: E ",pptype[i].Data()),
2002 nptbins,ptmin,ptmax);
2003 fhEPrimMCAcc[i]->SetXTitle("E (GeV)");
2004 outputContainer->Add(fhEPrimMCAcc[i]) ;
2006 fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()),
2007 Form("primary photon %s in acceptance: p_{T} ",pptype[i].Data()),
2008 nptbins,ptmin,ptmax);
2009 fhPtPrimMCAcc[i]->SetXTitle("p_{T} (GeV/c)");
2010 outputContainer->Add(fhPtPrimMCAcc[i]) ;
2012 fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()),
2013 Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()),
2014 nptbins,ptmin,ptmax,100,-1,1);
2015 fhYPrimMCAcc[i]->SetYTitle("Rapidity");
2016 fhYPrimMCAcc[i]->SetXTitle("E (GeV)");
2017 outputContainer->Add(fhYPrimMCAcc[i]) ;
2019 fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()),
2020 Form("primary photon %s in acceptance: #phi ",pptype[i].Data()),
2021 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2022 fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)");
2023 fhPhiPrimMCAcc[i]->SetXTitle("E (GeV)");
2024 outputContainer->Add(fhPhiPrimMCAcc[i]) ;
2028 if(fFillSSHistograms)
2030 TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
2032 TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ;
2034 for(Int_t i = 0; i < 6; i++)
2036 fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()),
2037 Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()),
2038 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2039 fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}");
2040 fhMCELambda0[i]->SetXTitle("E (GeV)");
2041 outputContainer->Add(fhMCELambda0[i]) ;
2043 fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()),
2044 Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()),
2045 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2046 fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}");
2047 fhMCELambda1[i]->SetXTitle("E (GeV)");
2048 outputContainer->Add(fhMCELambda1[i]) ;
2050 fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()),
2051 Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()),
2052 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2053 fhMCEDispersion[i]->SetYTitle("D^{2}");
2054 fhMCEDispersion[i]->SetXTitle("E (GeV)");
2055 outputContainer->Add(fhMCEDispersion[i]) ;
2057 fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()),
2058 Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()),
2059 nptbins,ptmin,ptmax, nbins,nmin,nmax);
2060 fhMCNCellsE[i]->SetXTitle("E (GeV)");
2061 fhMCNCellsE[i]->SetYTitle("# of cells in cluster");
2062 outputContainer->Add(fhMCNCellsE[i]);
2064 fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()),
2065 Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()),
2066 nptbins,ptmin,ptmax, 500,0,1.);
2067 fhMCMaxCellDiffClusterE[i]->SetXTitle("E_{cluster} (GeV) ");
2068 fhMCMaxCellDiffClusterE[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2069 outputContainer->Add(fhMCMaxCellDiffClusterE[i]);
2071 if(!fFillOnlySimpleSSHisto)
2073 fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
2074 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
2075 ssbins,ssmin,ssmax,500,0,1.);
2076 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}");
2077 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2078 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ;
2080 fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
2081 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
2082 ssbins,ssmin,ssmax,500,0,1.);
2083 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}");
2084 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2085 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ;
2087 fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
2088 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()),
2089 ssbins,ssmin,ssmax,500,0,1.);
2090 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}");
2091 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2092 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ;
2094 fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
2095 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
2096 nbins/5,nmin,nmax/5,500,0,1.);
2097 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster");
2098 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2099 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ;
2101 fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
2102 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
2103 nbins/5,nmin,nmax/5,500,0,1.);
2104 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster");
2105 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
2106 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ;
2108 fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
2109 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()),
2110 nbins/5,nmin,nmax/5,500,0,1.);
2111 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster");
2112 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("E (GeV)");
2113 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ;
2115 if(fCalorimeter=="EMCAL")
2117 fhMCEDispEta[i] = new TH2F (Form("hEDispEtaE_MC%s",pnamess[i].Data()),
2118 Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data()),
2119 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2120 fhMCEDispEta[i]->SetXTitle("E (GeV)");
2121 fhMCEDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2122 outputContainer->Add(fhMCEDispEta[i]);
2124 fhMCEDispPhi[i] = new TH2F (Form("hEDispPhiE_MC%s",pnamess[i].Data()),
2125 Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",ptypess[i].Data()),
2126 nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2127 fhMCEDispPhi[i]->SetXTitle("E (GeV)");
2128 fhMCEDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2129 outputContainer->Add(fhMCEDispPhi[i]);
2131 fhMCESumEtaPhi[i] = new TH2F (Form("hESumEtaPhiE_MC%s",pnamess[i].Data()),
2132 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()),
2133 nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2134 fhMCESumEtaPhi[i]->SetXTitle("E (GeV)");
2135 fhMCESumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
2136 outputContainer->Add(fhMCESumEtaPhi[i]);
2138 fhMCEDispEtaPhiDiff[i] = new TH2F (Form("hEDispEtaPhiDiffE_MC%s",pnamess[i].Data()),
2139 Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",ptypess[i].Data()),
2140 nptbins,ptmin,ptmax,200,-10,10);
2141 fhMCEDispEtaPhiDiff[i]->SetXTitle("E (GeV)");
2142 fhMCEDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
2143 outputContainer->Add(fhMCEDispEtaPhiDiff[i]);
2145 fhMCESphericity[i] = new TH2F (Form("hESphericity_MC%s",pnamess[i].Data()),
2146 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()),
2147 nptbins,ptmin,ptmax, 200,-1,1);
2148 fhMCESphericity[i]->SetXTitle("E (GeV)");
2149 fhMCESphericity[i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
2150 outputContainer->Add(fhMCESphericity[i]);
2152 for(Int_t ie = 0; ie < 7; ie++)
2154 fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2155 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]),
2156 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2157 fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2158 fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2159 outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2161 fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pnamess[i].Data()),
2162 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]),
2163 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2164 fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2165 fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2166 outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2168 fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2169 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]),
2170 ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2171 fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2172 fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2173 outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2179 if(!GetReader()->IsEmbeddedClusterSelectionOn())
2181 fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap",
2182 "cluster from Photon : E vs #lambda_{0}^{2}",
2183 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2184 fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}");
2185 fhMCPhotonELambda0NoOverlap->SetXTitle("E (GeV)");
2186 outputContainer->Add(fhMCPhotonELambda0NoOverlap) ;
2188 fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap",
2189 "cluster from Photon : E vs #lambda_{0}^{2}",
2190 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2191 fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}");
2192 fhMCPhotonELambda0TwoOverlap->SetXTitle("E (GeV)");
2193 outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ;
2195 fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap",
2196 "cluster from Photon : E vs #lambda_{0}^{2}",
2197 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2198 fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}");
2199 fhMCPhotonELambda0NOverlap->SetXTitle("E (GeV)");
2200 outputContainer->Add(fhMCPhotonELambda0NOverlap) ;
2204 //Fill histograms to check shape of embedded clusters
2205 if(GetReader()->IsEmbeddedClusterSelectionOn())
2208 fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy",
2209 "Energy Fraction of embedded signal versus cluster energy",
2210 nptbins,ptmin,ptmax,100,0.,1.);
2211 fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction");
2212 fhEmbeddedSignalFractionEnergy->SetXTitle("E (GeV)");
2213 outputContainer->Add(fhEmbeddedSignalFractionEnergy) ;
2215 fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal",
2216 "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2217 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2218 fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2219 fhEmbedPhotonELambda0FullSignal->SetXTitle("E (GeV)");
2220 outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ;
2222 fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal",
2223 "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2224 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2225 fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2226 fhEmbedPhotonELambda0MostlySignal->SetXTitle("E (GeV)");
2227 outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ;
2229 fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg",
2230 "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2231 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2232 fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2233 fhEmbedPhotonELambda0MostlyBkg->SetXTitle("E (GeV)");
2234 outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ;
2236 fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg",
2237 "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2238 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2239 fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2240 fhEmbedPhotonELambda0FullBkg->SetXTitle("E (GeV)");
2241 outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ;
2243 fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal",
2244 "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2245 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2246 fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2247 fhEmbedPi0ELambda0FullSignal->SetXTitle("E (GeV)");
2248 outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ;
2250 fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal",
2251 "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2252 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2253 fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2254 fhEmbedPi0ELambda0MostlySignal->SetXTitle("E (GeV)");
2255 outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ;
2257 fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg",
2258 "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2259 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2260 fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2261 fhEmbedPi0ELambda0MostlyBkg->SetXTitle("E (GeV)");
2262 outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ;
2264 fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg",
2265 "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2266 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2267 fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2268 fhEmbedPi0ELambda0FullBkg->SetXTitle("E (GeV)");
2269 outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ;
2271 }// embedded histograms
2274 }// Fill SS MC histograms
2278 return outputContainer ;
2282 //_______________________
2283 void AliAnaPhoton::Init()
2288 if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD())
2290 printf("AliAnaPhoton::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
2293 else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD())
2295 printf("AliAnaPhoton::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
2299 if(GetReader()->GetDataType() == AliCaloTrackReader::kMC) GetCaloPID()->SwitchOnBayesian();
2303 //____________________________________________________________________________
2304 void AliAnaPhoton::InitParameters()
2307 //Initialize the parameters of the analysis.
2308 AddToHistogramsName("AnaPhoton_");
2310 fCalorimeter = "EMCAL" ;
2315 fTimeCutMin =-1000000;
2316 fTimeCutMax = 1000000;
2319 fRejectTrackMatch = kTRUE ;
2323 //__________________________________________________________________
2324 void AliAnaPhoton::MakeAnalysisFillAOD()
2326 //Do photon analysis and fill aods
2329 Double_t v[3] = {0,0,0}; //vertex ;
2330 GetReader()->GetVertex(v);
2332 //Select the Calorimeter of the photon
2333 TObjArray * pl = 0x0;
2334 AliVCaloCells* cells = 0;
2335 if (fCalorimeter == "PHOS" )
2337 pl = GetPHOSClusters();
2338 cells = GetPHOSCells();
2340 else if (fCalorimeter == "EMCAL")
2342 pl = GetEMCALClusters();
2343 cells = GetEMCALCells();
2348 Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data());
2352 FillPileUpHistogramsPerEvent(pl);
2354 // Loop on raw clusters before filtering in the reader and fill control histogram
2355 if((GetReader()->GetEMCALClusterListName()=="" && fCalorimeter=="EMCAL") || fCalorimeter=="PHOS")
2357 for(Int_t iclus = 0; iclus < GetReader()->GetInputEvent()->GetNumberOfCaloClusters(); iclus++ )
2359 AliVCluster * clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus);
2360 if (fCalorimeter == "PHOS" && clus->IsPHOS() && clus->E() > GetReader()->GetPHOSPtMin() ) fhClusterCuts[0]->Fill(clus->E());
2361 else if(fCalorimeter == "EMCAL" && clus->IsEMCAL() && clus->E() > GetReader()->GetEMCALPtMin()) fhClusterCuts[0]->Fill(clus->E());
2366 TClonesArray * clusterList = 0;
2368 if(GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()))
2369 clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2370 else if(GetReader()->GetOutputEvent())
2371 clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2375 Int_t nclusters = clusterList->GetEntriesFast();
2376 for (Int_t iclus = 0; iclus < nclusters; iclus++)
2378 AliVCluster * clus = dynamic_cast<AliVCluster*> (clusterList->At(iclus));
2379 if(clus)fhClusterCuts[0]->Fill(clus->E());
2384 //Init arrays, variables, get number of clusters
2385 TLorentzVector mom, mom2 ;
2386 Int_t nCaloClusters = pl->GetEntriesFast();
2388 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillAOD() - input %s cluster entries %d\n", fCalorimeter.Data(), nCaloClusters);
2390 //----------------------------------------------------
2391 // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects
2392 //----------------------------------------------------
2394 for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
2396 AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
2397 //printf("calo %d, %f\n",icalo,calo->E());
2399 //Get the index where the cluster comes, to retrieve the corresponding vertex
2400 Int_t evtIndex = 0 ;
2401 if (GetMixedEvent())
2403 evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
2404 //Get the vertex and check it is not too large in z
2405 if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue;
2408 //Cluster selection, not charged, with photon id and in fiducial cut
2409 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
2411 calo->GetMomentum(mom,GetVertex(evtIndex)) ;}//Assume that come from vertex in straight line
2414 Double_t vertex[]={0,0,0};
2415 calo->GetMomentum(mom,vertex) ;
2418 //--------------------------------------
2419 // Cluster selection
2420 //--------------------------------------
2421 Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
2422 if(!ClusterSelected(calo,mom,nMaxima)) continue;
2424 //----------------------------
2425 //Create AOD for analysis
2426 //----------------------------
2427 AliAODPWG4Particle aodph = AliAODPWG4Particle(mom);
2429 //...............................................
2430 //Set the indeces of the original caloclusters (MC, ID), and calorimeter
2431 Int_t label = calo->GetLabel();
2432 aodph.SetLabel(label);
2433 aodph.SetCaloLabel(calo->GetID(),-1);
2434 aodph.SetDetector(fCalorimeter);
2435 //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
2437 //...............................................
2438 //Set bad channel distance bit
2439 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
2440 if (distBad > fMinDist3) aodph.SetDistToBad(2) ;
2441 else if(distBad > fMinDist2) aodph.SetDistToBad(1) ;
2442 else aodph.SetDistToBad(0) ;
2443 //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad());
2445 //--------------------------------------------------------------------------------------
2446 // Play with the MC stack if available
2447 //--------------------------------------------------------------------------------------
2449 //Check origin of the candidates
2454 tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(), aodph.GetInputFileIndex());
2458 printf("AliAnaPhoton::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag());
2459 }//Work with stack also
2462 //--------------------------------------------------------------------------------------
2463 //Fill some shower shape histograms before PID is applied
2464 //--------------------------------------------------------------------------------------
2466 FillShowerShapeHistograms(calo,tag);
2468 //-------------------------------------
2469 //PID selection or bit setting
2470 //-------------------------------------
2472 //...............................................
2473 // Data, PID check on
2476 // Get most probable PID, 2 options check bayesian PID weights or redo PID
2477 // By default, redo PID
2479 aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(calo));
2481 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType());
2483 //If cluster does not pass pid, not photon, skip it.
2484 if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ;
2488 //...............................................
2489 // Data, PID check off
2492 //Set PID bits for later selection (AliAnaPi0 for example)
2493 //GetIdentifiedParticleType already called in SetPIDBits.
2495 GetCaloPID()->SetPIDBits(calo,&aodph, GetCaloUtils(),GetReader()->GetInputEvent());
2497 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n");
2500 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n",
2501 aodph.Pt(), aodph.GetIdentifiedParticleType());
2503 fhClusterCuts[9]->Fill(calo->E());
2505 fhNLocMax->Fill(calo->E(),nMaxima);
2507 // Matching after cuts
2508 if(fFillTMHisto) FillTrackMatchingResidualHistograms(calo,1);
2510 // Fill histograms to undertand pile-up before other cuts applied
2511 // Remember to relax time cuts in the reader
2512 FillPileUpHistograms(calo->E(),calo->GetTOF()*1e9);
2514 // Add number of local maxima to AOD, method name in AOD to be FIXED
2515 aodph.SetFiducialArea(nMaxima);
2518 //Add AOD with photon object to aod branch
2519 AddAODParticle(aodph);
2523 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast());
2527 //__________________________________________________________________
2528 void AliAnaPhoton::MakeAnalysisFillHistograms()
2533 Double_t v[3] = {0,0,0}; //vertex ;
2534 GetReader()->GetVertex(v);
2535 //fhVertex->Fill(v[0],v[1],v[2]);
2536 if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event
2538 //----------------------------------
2539 //Loop on stored AOD photons
2540 Int_t naod = GetOutputAODBranch()->GetEntriesFast();
2541 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod);
2543 for(Int_t iaod = 0; iaod < naod ; iaod++)
2545 AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
2546 Int_t pdg = ph->GetIdentifiedParticleType();
2549 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - PDG %d, MC TAG %d, Calorimeter %s\n",
2550 ph->GetIdentifiedParticleType(),ph->GetTag(), (ph->GetDetector()).Data()) ;
2552 //If PID used, fill histos with photons in Calorimeter fCalorimeter
2553 if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue;
2554 if(ph->GetDetector() != fCalorimeter) continue;
2557 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - ID Photon: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ;
2559 //................................
2560 //Fill photon histograms
2561 Float_t ptcluster = ph->Pt();
2562 Float_t phicluster = ph->Phi();
2563 Float_t etacluster = ph->Eta();
2564 Float_t ecluster = ph->E();
2566 fhEPhoton ->Fill(ecluster);
2567 fhPtPhoton ->Fill(ptcluster);
2568 fhPhiPhoton ->Fill(ptcluster,phicluster);
2569 fhEtaPhoton ->Fill(ptcluster,etacluster);
2570 if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster);
2571 else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster);
2573 if(fFillPileUpHistograms)
2575 if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(ptcluster);
2576 if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(ptcluster);
2577 if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(ptcluster);
2578 if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(ptcluster);
2579 if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(ptcluster);
2580 if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(ptcluster);
2581 if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(ptcluster);
2584 //Get original cluster, to recover some information
2586 Float_t maxCellFraction = 0;
2587 AliVCaloCells* cells = 0;
2588 TObjArray * clusters = 0;
2589 if(fCalorimeter == "EMCAL")
2591 cells = GetEMCALCells();
2592 clusters = GetEMCALClusters();
2596 cells = GetPHOSCells();
2597 clusters = GetPHOSClusters();
2601 AliVCluster *cluster = FindCluster(clusters,ph->GetCaloLabel(0),iclus);
2604 absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction);
2606 // Control histograms
2607 fhMaxCellDiffClusterE->Fill(ph->E(),maxCellFraction);
2608 fhNCellsE ->Fill(ph->E(),cluster->GetNCells());
2609 fhTimeE ->Fill(ph->E(),cluster->GetTOF()*1.e9);
2612 for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
2613 fhCellsE->Fill(ph->E(),cells->GetCellAmplitude(cluster->GetCellsAbsId()[icell]));
2617 //.......................................
2618 //Play with the MC data if available
2623 if(GetReader()->ReadStack() && !GetMCStack())
2625 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called?\n");
2627 else if(GetReader()->ReadAODMCParticles() && !GetReader()->GetAODMCParticles(0))
2629 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n");
2633 FillAcceptanceHistograms();
2635 //....................................................................
2636 // Access MC information in stack if requested, check that it exists.
2637 Int_t label =ph->GetLabel();
2641 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label);
2648 TLorentzVector primary = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok);
2651 eprim = primary.Energy();
2652 ptprim = primary.Pt();
2655 Int_t tag =ph->GetTag();
2656 Int_t mcParticleTag = -1;
2657 if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[kmcPhoton])
2659 fhMCE [kmcPhoton] ->Fill(ecluster);
2660 fhMCPt [kmcPhoton] ->Fill(ptcluster);
2661 fhMCPhi[kmcPhoton] ->Fill(ecluster,phicluster);
2662 fhMCEta[kmcPhoton] ->Fill(ecluster,etacluster);
2664 fhMC2E [kmcPhoton] ->Fill(ecluster, eprim);
2665 fhMC2Pt [kmcPhoton] ->Fill(ptcluster, ptprim);
2666 fhMCDeltaE [kmcPhoton] ->Fill(ecluster,eprim-ecluster);
2667 fhMCDeltaPt[kmcPhoton] ->Fill(ptcluster,ptprim-ptcluster);
2669 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) &&
2670 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2671 fhMCE[kmcConversion])
2673 fhMCE [kmcConversion] ->Fill(ecluster);
2674 fhMCPt [kmcConversion] ->Fill(ptcluster);
2675 fhMCPhi[kmcConversion] ->Fill(ecluster,phicluster);
2676 fhMCEta[kmcConversion] ->Fill(ecluster,etacluster);
2678 fhMC2E [kmcConversion] ->Fill(ecluster, eprim);
2679 fhMC2Pt [kmcConversion] ->Fill(ptcluster, ptprim);
2680 fhMCDeltaE [kmcConversion] ->Fill(ecluster,eprim-ecluster);
2681 fhMCDeltaPt[kmcConversion] ->Fill(ptcluster,ptprim-ptcluster);
2684 if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhMCE[kmcPrompt])
2686 mcParticleTag = kmcPrompt;
2688 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)&& fhMCE[kmcFragmentation])
2690 mcParticleTag = kmcFragmentation;
2692 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR)&& fhMCE[kmcISR])
2694 mcParticleTag = kmcISR;
2696 else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) &&
2697 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[kmcPi0Decay])
2699 mcParticleTag = kmcPi0Decay;
2701 else if((( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) &&
2702 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) ||
2703 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) ) && fhMCE[kmcOtherDecay])
2705 mcParticleTag = kmcOtherDecay;
2707 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[kmcPi0])
2709 mcParticleTag = kmcPi0;
2711 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) && fhMCE[kmcEta])
2713 mcParticleTag = kmcEta;
2716 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) && fhMCE[kmcAntiNeutron])
2718 mcParticleTag = kmcAntiNeutron;
2720 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) && fhMCE[kmcAntiProton])
2722 mcParticleTag = kmcAntiProton;
2724 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) && fhMCE[kmcElectron])
2726 mcParticleTag = kmcElectron;
2728 else if( fhMCE[kmcOther])
2730 mcParticleTag = kmcOther;
2732 // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ",
2733 // ph->GetLabel(),ph->Pt());
2734 // for(Int_t i = 0; i < 20; i++) {
2735 // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i);
2741 fhMCE [mcParticleTag] ->Fill(ecluster);
2742 fhMCPt [mcParticleTag] ->Fill(ptcluster);
2743 fhMCPhi[mcParticleTag] ->Fill(ecluster,phicluster);
2744 fhMCEta[mcParticleTag] ->Fill(ecluster,etacluster);
2746 fhMC2E[mcParticleTag] ->Fill(ecluster, eprim);
2747 fhMC2Pt[mcParticleTag] ->Fill(ptcluster, ptprim);
2748 fhMCDeltaE[mcParticleTag] ->Fill(ecluster,eprim-ecluster);
2749 fhMCDeltaPt[mcParticleTag]->Fill(ptcluster,ptprim-ptcluster);
2751 }//Histograms with MC
2758 //__________________________________________________________________
2759 void AliAnaPhoton::Print(const Option_t * opt) const
2761 //Print some relevant parameters set for the analysis
2766 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
2767 AliAnaCaloTrackCorrBaseClass::Print(" ");
2769 printf("Calorimeter = %s\n", fCalorimeter.Data()) ;
2770 printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
2771 printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
2772 printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
2773 printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch);
2774 printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax);
2775 printf("Number of cells in cluster is > %d \n", fNCellsCut);