AliPhysics  7dff9e1 (7dff9e1)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliAnaPhoton.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
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  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include <TH2F.h>
18 #include <TClonesArray.h>
19 #include <TObjString.h>
20 #include "TParticle.h"
21 #include "TDatabasePDG.h"
22 
23 // --- Analysis system ---
24 #include "AliAnaPhoton.h"
25 #include "AliCaloTrackReader.h"
26 #include "AliStack.h"
27 #include "AliCaloPID.h"
28 #include "AliMCAnalysisUtils.h"
29 #include "AliFiducialCut.h"
30 #include "AliVCluster.h"
31 #include "AliAODMCParticle.h"
32 #include "AliMixedEvent.h"
33 #include "AliAODEvent.h"
34 #include "AliESDEvent.h"
35 
36 // --- Detectors ---
37 #include "AliPHOSGeoUtils.h"
38 #include "AliEMCALGeometry.h"
39 
43 
44 //____________________________
47 //____________________________
50 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
51 fRejectTrackMatch(0), fFillTMHisto(kFALSE),
52 fTimeCutMin(-10000), fTimeCutMax(10000),
53 fNCellsCut(0),
54 fNLMCutMin(-1), fNLMCutMax(10),
55 fFillSSHistograms(0), fFillEMCALRegionSSHistograms(0), fFillOnlySimpleSSHisto(1),
56 fNOriginHistograms(9), fNPrimaryHistograms(5),
57 fMomentum(), fPrimaryMom(), fProdVertex(),
58 // Histograms
59 
60 // Control histograms
61 fhNCellsE(0), fhCellsE(0),
62 fhMaxCellDiffClusterE(0), fhTimePt(0), fhEtaPhi(0),
63 
64 fhEPhoton(0), fhPtPhoton(0),
65 fhPhiPhoton(0), fhEtaPhoton(0),
66 fhEtaPhiPhoton(0), fhEtaPhi05Photon(0),
67 fhPtCentralityPhoton(0), fhPtEventPlanePhoton(0),
68 
69 // Shower shape histograms
70 fhNLocMax(0),
71 fhDispE(0), fhLam0E(0), fhLam0Pt(0), fhLam1E(0),
72 fhDispETRD(0), fhLam0ETRD(0), fhLam0PtTRD(0), fhLam1ETRD(0),
73 fhDispETM(0), fhLam0ETM(0), fhLam0PtTM(0), fhLam1ETM(0),
74 fhDispETMTRD(0), fhLam0ETMTRD(0), fhLam0PtTMTRD(0), fhLam1ETMTRD(0),
75 
76 fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0),
77 fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0),
78 
79 fhEtaLam0LowE(0), fhPhiLam0LowE(0),
80 fhEtaLam0HighE(0), fhPhiLam0HighE(0),
81 fhLam0DispLowE(0), fhLam0DispHighE(0),
82 fhLam1Lam0LowE(0), fhLam1Lam0HighE(0),
83 fhDispLam1LowE(0), fhDispLam1HighE(0),
84 fhDispEtaE(0), fhDispPhiE(0),
85 fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
86 fhDispEtaPhiDiffE(0), fhSphericityE(0),
87 fhDispSumEtaDiffE(0), fhDispSumPhiDiffE(0),
88 
89 // MC histograms
90 fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0),
91 // Embedding
92 fhEmbeddedSignalFractionEnergy(0),
93 fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0),
94 fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0),
95 fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0),
96 fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0),
97 
98 fhTimePtPhotonNoCut(0), fhTimePtPhotonSPD(0),
99 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
100 fhPtPhotonNPileUpSPDVtx(0), fhPtPhotonNPileUpTrkVtx(0),
101 fhPtPhotonNPileUpSPDVtxTimeCut(0), fhPtPhotonNPileUpTrkVtxTimeCut(0),
102 fhPtPhotonNPileUpSPDVtxTimeCut2(0), fhPtPhotonNPileUpTrkVtxTimeCut2(0),
103 
104 fhEClusterSM(0), fhEPhotonSM(0),
105 fhPtClusterSM(0), fhPtPhotonSM(0),
106 fhMCConversionVertex(0), fhMCConversionVertexTRD(0)
107 {
108  for(Int_t i = 0; i < fgkNmcTypes; i++)
109  {
110  fhMCPt [i] = 0;
111  fhMCE [i] = 0;
112  fhMCPhi [i] = 0;
113  fhMCEta [i] = 0;
114  fhMCDeltaE [i] = 0;
115  fhMCDeltaPt[i] = 0;
116  fhMC2E [i] = 0;
117  fhMC2Pt [i] = 0;
118  }
119 
120  for(Int_t i = 0; i < fgkNmcPrimTypes; i++)
121  {
122  fhPtPrimMC [i] = 0;
123  fhEPrimMC [i] = 0;
124  fhPhiPrimMC[i] = 0;
125  fhEtaPrimMC[i] = 0;
126  fhYPrimMC [i] = 0;
127 
128  fhPtPrimMCAcc [i] = 0;
129  fhEPrimMCAcc [i] = 0;
130  fhPhiPrimMCAcc[i] = 0;
131  fhEtaPrimMCAcc[i] = 0;
132  fhYPrimMCAcc [i] = 0;
133  }
134 
135  for(Int_t i = 0; i < 7; i++)
136  {
137  fhDispEtaDispPhi[i] = 0;
138  fhLambda0DispPhi[i] = 0;
139  fhLambda0DispEta[i] = 0;
140 
141  fhPtPhotonPileUp[i] = 0;
143 
144  for(Int_t j = 0; j < fgkNssTypes; j++)
145  {
146  fhMCDispEtaDispPhi[i][j] = 0;
147  fhMCLambda0DispEta[i][j] = 0;
148  fhMCLambda0DispPhi[i][j] = 0;
149  }
150  }
151 
152  for(Int_t i = 0; i < fgkNssTypes; i++)
153  {
154  fhMCELambda0 [i] = 0;
155  fhMCPtLambda0 [i] = 0;
156  fhMCELambda1 [i] = 0;
157  fhMCEDispersion [i] = 0;
158  fhMCNCellsE [i] = 0;
160  fhLambda0DispEta[i] = 0;
161  fhLambda0DispPhi[i] = 0;
162 
169 
170  fhMCEDispEta [i] = 0;
171  fhMCEDispPhi [i] = 0;
172  fhMCESumEtaPhi [i] = 0;
173  fhMCEDispEtaPhiDiff[i] = 0;
174  fhMCESphericity [i] = 0;
175  }
176 
177  for(Int_t i = 0; i < 5; i++)
178  {
179  fhClusterCutsE [i] = 0;
180  fhClusterCutsPt[i] = 0;
181  }
182 
183  // Track matching residuals
184  for(Int_t i = 0; i < 2; i++)
185  {
194  fhdEdx[i] = 0; fhEOverP[i] = 0;
195  fhEOverPTRD[i] = 0;
196  }
197 
198  for(Int_t i = 0; i < 6; i++)
199  {
200  fhMCConversionLambda0Rcut [i] = 0;
202  fhMCConversionLambda1Rcut [i] = 0;
204  }
205 
206  for(Int_t ieta = 0; ieta < 4; ieta++)
207  {
208  for(Int_t iphi = 0; iphi < 3; iphi++)
209  {
210 // fhLam0EMCALRegion [ieta][iphi] = 0;
211 // fhLam0EMCALRegionTRD[ieta][iphi] = 0;
212 //
213 // for(Int_t i = 0; i < 6; i++)
214 // {
215 // fhLam0EMCALRegionMCConvRcut [ieta][iphi][i] = 0;
216 // fhLam0EMCALRegionTRDMCConvRcut[ieta][iphi][i] = 0;
217 // }
218  for(Int_t ism =0; ism < 20; ism++)
219  {
220  fhLam0EMCALRegionPerSM[ieta][iphi][ism] = 0;
221  fhLam1EMCALRegionPerSM[ieta][iphi][ism] = 0;
222  }
223  }
224  }
225 
226  for(Int_t il0 = 0; il0 < 2; il0++)
227  {
228  for(Int_t i = 0; i < 7; i++)
229  {
230  fhEtaPhiLam0BinPtBin [il0][i] = 0 ;
231  fhColRowLam0BinPtBin [il0][i] = 0 ;
232  fhColRowLam0BinPtBinWeighted[il0][i] = 0 ;
233  }
234 
235  for(Int_t ism =0; ism < 20; ism++)
236  {
237  fhLam1Lam0BinPerSM [il0][ism] = 0;
238  fhTimeLam0BinPerSM [il0][ism] = 0;
239  fhTimeLam0BinPerSMWeighted [il0][ism] = 0;
240  fhDTimeLam0BinPerSM [il0][ism] = 0;
241  fhDTimeLam0BinPerSMWeighted [il0][ism] = 0;
242  fhCellClusterEFracLam0BinPerSM [il0][ism] = 0;
244  fhCellClusterELam0BinPerSM [il0][ism] = 0;
246  }
247  }
248 
249  for(Int_t il0 = 0; il0 < 2; il0++)
250  {
251  for(Int_t i = 0; i < 7; i++)
252  {
253  fhEtaPhiLam0BinPtBinSMShared [il0][i] = 0 ;
254  fhColRowLam0BinPtBinSMShared [il0][i] = 0 ;
255  fhEtaPhiLargeTimeInClusterCell [il0][i] = 0 ;
257  }
258 
259  for(Int_t ism =0; ism < 12; ism++)
260  {
261  fhTimeLam0BinPerSMShared[il0][ism] = 0;
262  fhLam0PerSMShared [ism] = 0;
263  fhLam1PerSMShared [ism] = 0;
264  }
265  }
266 
267  for(Int_t ism =0; ism < 20; ism++)
268  {
269  fhLam0PerSM [ism] = 0;
270  fhLam1PerSM [ism] = 0;
273  fhLam0PerSMSPDPileUp [ism] = 0;
274  fhLam1PerSMSPDPileUp [ism] = 0;
275  }
276 
277  // Initialize parameters
278  InitParameters();
279 }
280 
281 //_____________________________________________________________________
297 //_____________________________________________________________________
298 Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, Int_t nMaxima)
299 {
300  Float_t ptcluster = fMomentum.Pt();
301  Float_t ecluster = fMomentum.E();
302  Float_t etacluster = fMomentum.Eta();
303  Float_t phicluster = fMomentum.Phi();
304 
305  if(phicluster < 0) phicluster+=TMath::TwoPi();
306 
307  Bool_t matched = IsTrackMatched(calo,GetReader()->GetInputEvent());
308 
309  AliDebug(2,Form("Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f",
311  ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster));
312 
313  fhClusterCutsE [1]->Fill( ecluster, GetEventWeight());
314  fhClusterCutsPt[1]->Fill(ptcluster, GetEventWeight());
315 
316  if(ecluster > 0.5) fhEtaPhi->Fill(etacluster, phicluster, GetEventWeight());
317 
318  Int_t nSM = GetModuleNumber(calo);
319  if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
320  {
321  fhEClusterSM ->Fill(ecluster , nSM, GetEventWeight());
322  fhPtClusterSM->Fill(ptcluster, nSM, GetEventWeight());
323  }
324 
325  //.......................................
326  //If too small or big energy, skip it
327  if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ;
328 
329  AliDebug(2,Form("\t Cluster %d Pass E Cut",calo->GetID()));
330 
331  fhClusterCutsE [2]->Fill( ecluster, GetEventWeight());
332  fhClusterCutsPt[2]->Fill(ptcluster, GetEventWeight());
333 
334  //.......................................
335  // TOF cut, BE CAREFUL WITH THIS CUT
336  Double_t tof = calo->GetTOF()*1e9;
337  if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
338 
339  AliDebug(2,Form("\t Cluster %d Pass Time Cut",calo->GetID()));
340 
341  fhClusterCutsE [3]->Fill( ecluster, GetEventWeight());
342  fhClusterCutsPt[3]->Fill(ptcluster, GetEventWeight());
343 
344  //.......................................
345  if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
346 
347  AliDebug(2,Form("\t Cluster %d Pass NCell Cut",calo->GetID()));
348 
349  fhClusterCutsE [4]->Fill( ecluster, GetEventWeight());
350  fhClusterCutsPt[4]->Fill(ptcluster, GetEventWeight());
351 
352  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ;
353  AliDebug(2,Form("\t Cluster %d pass NLM %d of out of range",calo->GetID(), nMaxima));
354 
355  fhClusterCutsE [5]->Fill( ecluster, GetEventWeight());
356  fhClusterCutsPt[5]->Fill(ptcluster, GetEventWeight());
357 
358  //.......................................
359  //Check acceptance selection
360  if(IsFiducialCutOn())
361  {
362  Bool_t in = GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),GetCalorimeter()) ;
363  if(! in ) return kFALSE ;
364  }
365 
366  AliDebug(2,Form("\t Fiducial cut passed"));
367 
368  fhClusterCutsE [6]->Fill( ecluster, GetEventWeight());
369  fhClusterCutsPt[6]->Fill(ptcluster, GetEventWeight());
370 
371  //.......................................
372  //Skip matched clusters with tracks
373 
374  // Fill matching residual histograms before PID cuts
376 
378  {
379  if(matched)
380  {
381  AliDebug(2,"\t Reject track-matched clusters");
382  return kFALSE ;
383  }
384  else
385  AliDebug(2,"\t Track-matching cut passed");
386  }// reject matched clusters
387 
388  fhClusterCutsE [7]->Fill( ecluster, GetEventWeight());
389  fhClusterCutsPt[7]->Fill(ptcluster, GetEventWeight());
390 
391  //.......................................
392  //Check Distance to Bad channel, set bit.
393  Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
394  if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
395  if(distBad < fMinDist)
396  {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
397  return kFALSE ;
398  }
399  else AliDebug(2,Form("\t Bad channel cut passed %4.2f > %2.2f",distBad, fMinDist));
400 
401  fhClusterCutsE [8]->Fill( ecluster, GetEventWeight());
402  fhClusterCutsPt[8]->Fill(ptcluster, GetEventWeight());
403 
404  AliDebug(1,Form("Current Event %d; After selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f",
406  ecluster, ptcluster,fMomentum.Phi()*TMath::RadToDeg(),fMomentum.Eta()));
407 
408  //All checks passed, cluster selected
409  return kTRUE;
410 
411 }
412 
413 //___________________________________________
418 //___________________________________________
420 {
421  Double_t photonY = -100 ;
422  Double_t photonE = -1 ;
423  Double_t photonPt = -1 ;
424  Double_t photonPhi = 100 ;
425  Double_t photonEta = -1 ;
426 
427  Int_t pdg = 0 ;
428  Int_t tag = 0 ;
429  Int_t status = 0 ;
430  Int_t mcIndex = 0 ;
431  Int_t nprim = 0 ;
432  Bool_t inacceptance = kFALSE ;
433 
434  TParticle * primStack = 0;
435  AliAODMCParticle * primAOD = 0;
436 
437  // Get the ESD MC particles container
438  AliStack * stack = 0;
439  if( GetReader()->ReadStack() )
440  {
441  stack = GetMCStack();
442  if( !stack )
443  {
444  AliFatal("Stack not available, is the MC handler called? STOP");
445  return;
446  }
447  nprim = stack->GetNtrack();
448  }
449 
450  // Get the AOD MC particles container
451  TClonesArray * mcparticles = 0;
452  if( GetReader()->ReadAODMCParticles() )
453  {
454  mcparticles = GetReader()->GetAODMCParticles();
455  if( !mcparticles )
456  {
457  AliFatal("Standard MCParticles not available!");
458  return;
459  }
460  nprim = mcparticles->GetEntriesFast();
461  }
462 
463  for(Int_t i=0 ; i < nprim; i++)
464  {
465  if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ;
466 
467  if(GetReader()->ReadStack())
468  {
469  primStack = stack->Particle(i) ;
470  if(!primStack)
471  {
472  AliWarning("ESD primaries pointer not available!!");
473  continue;
474  }
475 
476  pdg = primStack->GetPdgCode();
477  status = primStack->GetStatusCode();
478 
479  if(primStack->Energy() == TMath::Abs(primStack->Pz())) continue ; //Protection against floating point exception
480 
481  //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
482  // prim->GetName(), prim->GetPdgCode());
483 
484  // Photon kinematics
485  primStack->Momentum(fMomentum);
486 
487  photonY = 0.5*TMath::Log((primStack->Energy()+primStack->Pz())/(primStack->Energy()-primStack->Pz())) ;
488  }
489  else
490  {
491  primAOD = (AliAODMCParticle *) mcparticles->At(i);
492  if(!primAOD)
493  {
494  AliWarning("AOD primaries pointer not available!!");
495  continue;
496  }
497 
498  pdg = primAOD->GetPdgCode();
499  status = primAOD->GetStatus();
500 
501  if(primAOD->E() == TMath::Abs(primAOD->Pz())) continue ; //Protection against floating point exception
502 
503  // Photon kinematics
504  fMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
505 
506  photonY = 0.5*TMath::Log((primAOD->E()+primAOD->Pz())/(primAOD->E()-primAOD->Pz())) ;
507  }
508 
509  // Select only photons in the final state
510  if(pdg != 22 ) continue ;
511 
512  // If too small or too large pt, skip, same cut as for data analysis
513  photonPt = fMomentum.Pt () ;
514 
515  if(photonPt < GetMinPt() || photonPt > GetMaxPt() ) continue ;
516 
517  photonE = fMomentum.E () ;
518  photonEta = fMomentum.Eta() ;
519  photonPhi = fMomentum.Phi() ;
520 
521  if(photonPhi < 0) photonPhi+=TMath::TwoPi();
522 
523  // Check if photons hit desired acceptance
524  inacceptance = kTRUE;
525 
526  // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
527  if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),GetCalorimeter())) inacceptance = kFALSE ;
528 
529  // Check if photons hit the Calorimeter acceptance
530  if(IsRealCaloAcceptanceOn()) // defined on base class
531  {
532  if(GetReader()->ReadStack() &&
533  !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primStack)) inacceptance = kFALSE ;
534  if(GetReader()->ReadAODMCParticles() &&
535  !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primAOD )) inacceptance = kFALSE ;
536  }
537 
538  // Get tag of this particle photon from fragmentation, decay, prompt ...
539  // Set the origin of the photon.
541 
542  if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
543  {
544  // A conversion photon from a hadron, skip this kind of photon
545  // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!\n ");
546  // GetMCAnalysisUtils()->PrintMCTag(tag);
547 
548  continue;
549  }
550 
551  // Consider only final state particles, but this depends on generator,
552  // status 1 is the usual one, in case of not being ok, leave the possibility
553  // to not consider this.
554  if(status > 1) continue ; // Avoid "partonic" photons
555 
556  Bool_t takeIt = kFALSE ;
557  if(status == 1 && GetMCAnalysisUtils()->GetMCGenerator() != AliMCAnalysisUtils::kBoxLike ) takeIt = kTRUE ;
558 
559  if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) continue;
560 
561  // Origin of photon
562  if (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt))
563  {
564  mcIndex = kmcPPrompt;
565  }
566  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation))
567  {
568  mcIndex = kmcPFragmentation ;
569  }
570  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
571  {
572  mcIndex = kmcPISR;
573  }
574  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
575  {
576  mcIndex = kmcPPi0Decay;
577  }
578  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
579  {
580  mcIndex = kmcPEtaDecay;
581  }
582  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay))
583  {
584  mcIndex = kmcPOtherDecay;
585  }
586  else
587  {
588  // Other decay but from non final state particle
589  mcIndex = kmcPOtherDecay;
590  } // Other origin
591 
592  if(!takeIt && (mcIndex == kmcPPi0Decay || mcIndex == kmcPOtherDecay)) takeIt = kTRUE ;
593 
594  if(!takeIt) continue ;
595 
596  // Fill histograms for all photons
597  fhYPrimMC[kmcPPhoton]->Fill(photonPt, photonY, GetEventWeight()) ;
598  if(TMath::Abs(photonY) < 1.0)
599  {
600  fhEPrimMC [kmcPPhoton]->Fill(photonE , GetEventWeight()) ;
601  fhPtPrimMC [kmcPPhoton]->Fill(photonPt, GetEventWeight()) ;
602  fhPhiPrimMC[kmcPPhoton]->Fill(photonE , photonPhi, GetEventWeight()) ;
603  fhEtaPrimMC[kmcPPhoton]->Fill(photonE , photonEta, GetEventWeight()) ;
604  }
605 
606  if(inacceptance)
607  {
608  fhEPrimMCAcc [kmcPPhoton]->Fill(photonE , GetEventWeight()) ;
609  fhPtPrimMCAcc [kmcPPhoton]->Fill(photonPt, GetEventWeight()) ;
610  fhPhiPrimMCAcc[kmcPPhoton]->Fill(photonE , photonPhi, GetEventWeight()) ;
611  fhEtaPrimMCAcc[kmcPPhoton]->Fill(photonE , photonEta, GetEventWeight()) ;
612  fhYPrimMCAcc [kmcPPhoton]->Fill(photonE , photonY , GetEventWeight()) ;
613  } // Accepted
614 
615  // Fill histograms for photons origin
616  if(mcIndex < fNPrimaryHistograms)
617  {
618  fhYPrimMC[mcIndex]->Fill(photonPt, photonY, GetEventWeight()) ;
619  if(TMath::Abs(photonY) < 1.0)
620  {
621  fhEPrimMC [mcIndex]->Fill(photonE , GetEventWeight()) ;
622  fhPtPrimMC [mcIndex]->Fill(photonPt, GetEventWeight()) ;
623  fhPhiPrimMC[mcIndex]->Fill(photonE , photonPhi, GetEventWeight()) ;
624  fhEtaPrimMC[mcIndex]->Fill(photonE , photonEta, GetEventWeight()) ;
625  }
626 
627  if(inacceptance)
628  {
629  fhEPrimMCAcc [mcIndex]->Fill(photonE , GetEventWeight()) ;
630  fhPtPrimMCAcc [mcIndex]->Fill(photonPt, GetEventWeight()) ;
631  fhPhiPrimMCAcc[mcIndex]->Fill(photonE , photonPhi, GetEventWeight()) ;
632  fhEtaPrimMCAcc[mcIndex]->Fill(photonE , photonEta, GetEventWeight()) ;
633  fhYPrimMCAcc [mcIndex]->Fill(photonE , photonY , GetEventWeight()) ;
634  } // Accepted
635  }
636  } // loop on primaries
637 }
638 
639 //________________________________________________________________________________
641 //________________________________________________________________________________
642 void AliAnaPhoton::FillPileUpHistograms(AliVCluster* cluster, AliVCaloCells *cells,
643  Int_t absIdMax)
644 {
645  Float_t pt = fMomentum.Pt();
646  Float_t time = cluster->GetTOF()*1.e9;
647 
648  AliVEvent * event = GetReader()->GetInputEvent();
649 
650  if(GetReader()->IsPileUpFromSPD()) fhPtPhotonPileUp[0]->Fill(pt, GetEventWeight()) ;
651  if(GetReader()->IsPileUpFromEMCal()) fhPtPhotonPileUp[1]->Fill(pt, GetEventWeight()) ;
652  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPhotonPileUp[2]->Fill(pt, GetEventWeight()) ;
653  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPhotonPileUp[3]->Fill(pt, GetEventWeight()) ;
654  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPhotonPileUp[4]->Fill(pt, GetEventWeight()) ;
655  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPhotonPileUp[5]->Fill(pt, GetEventWeight()) ;
656  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPhotonPileUp[6]->Fill(pt, GetEventWeight()) ;
657 
658  fhTimePtPhotonNoCut->Fill(pt, time, GetEventWeight());
659  if(GetReader()->IsPileUpFromSPD()) fhTimePtPhotonSPD->Fill(pt, time, GetEventWeight());
660 
661  //
662  // Cells inside the cluster
663  //
664 
665  // Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
666  if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(time) < 30)
667  {
668  for (Int_t ipos = 0; ipos < cluster->GetNCells(); ipos++)
669  {
670  Int_t absId = cluster->GetCellsAbsId()[ipos];
671 
672  if( absId == absIdMax ) continue ;
673 
674  Double_t tcell = cells->GetCellTime(absId);
675  Float_t amp = cells->GetCellAmplitude(absId);
676  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
677 
678  GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,tcell,cells);
679  tcell*=1e9;
680 
681  Float_t diff = (time-tcell);
682 
683  if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
684 
692 
693  } // loop
694  }
695 
696  AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
697  AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
698 
699  //
700  // N pile up vertices
701  //
702 
703  Int_t nVtxSPD = -1;
704  Int_t nVtxTrk = -1;
705 
706  if (esdEv)
707  {
708  nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
709  nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
710 
711  } // ESD
712  else if (aodEv)
713  {
714  nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
715  nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
716  } // AOD
717 
718  if(pt < 8)
719  {
720  fhTimeNPileUpVertSPD ->Fill(time, nVtxSPD, GetEventWeight());
721  fhTimeNPileUpVertTrack->Fill(time, nVtxTrk, GetEventWeight());
722  }
723 
724  fhPtPhotonNPileUpSPDVtx->Fill(pt, nVtxSPD, GetEventWeight());
725  fhPtPhotonNPileUpTrkVtx->Fill(pt, nVtxTrk, GetEventWeight());
726 
727  if(TMath::Abs(time) < 25)
728  {
729  fhPtPhotonNPileUpSPDVtxTimeCut->Fill(pt, nVtxSPD, GetEventWeight());
730  fhPtPhotonNPileUpTrkVtxTimeCut->Fill(pt, nVtxTrk, GetEventWeight());
731  }
732 
733  if(time < 75 && time > -25)
734  {
735  fhPtPhotonNPileUpSPDVtxTimeCut2->Fill(pt, nVtxSPD, GetEventWeight());
736  fhPtPhotonNPileUpTrkVtxTimeCut2->Fill(pt, nVtxTrk, GetEventWeight());
737  }
738 }
739 
740 //_________________________________________________________________________________
742 //_________________________________________________________________________________
743 void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster,
744  Int_t mcTag, Float_t maxCellFraction)
745 {
746  if(!fFillSSHistograms || GetMixedEvent()) return;
747 
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();
753 
754  Float_t pt = fMomentum.Pt();
755  Float_t eta = fMomentum.Eta();
756  Float_t phi = fMomentum.Phi();
757  if(phi < 0) phi+=TMath::TwoPi();
758 
759  fhLam0E ->Fill(energy, lambda0, GetEventWeight());
760  fhLam0Pt->Fill(pt , lambda0, GetEventWeight());
761  fhLam1E ->Fill(energy, lambda1, GetEventWeight());
762  fhDispE ->Fill(energy, disp , GetEventWeight());
763 
764  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
766  {
767  fhLam0ETRD ->Fill(energy, lambda0, GetEventWeight());
768  fhLam0PtTRD->Fill(pt , lambda0, GetEventWeight());
769  fhLam1ETRD ->Fill(energy, lambda1, GetEventWeight());
770  fhDispETRD ->Fill(energy, disp, GetEventWeight());
771  }
772 
773  //
774  // EMCal SM regions
775  //
776  if(cluster->IsEMCAL() && fFillEMCALRegionSSHistograms)
777  {
778  Int_t sm = GetModuleNumber(cluster);
779 
780  Bool_t shared = GetCaloUtils()->IsClusterSharedByTwoSuperModules(GetEMCALGeometry(),cluster);
781 
782  fhLam0PerSM[sm]->Fill(pt, lambda0, GetEventWeight());
783  fhLam1PerSM[sm]->Fill(pt, lambda1, GetEventWeight());
784 
785  if(GetReader()->IsPileUpFromSPD())
786  {
787  fhLam0PerSMSPDPileUp[sm]->Fill(pt, lambda0, GetEventWeight());
788  fhLam1PerSMSPDPileUp[sm]->Fill(pt, lambda1, GetEventWeight());
789  }
790 
791  Int_t etaRegion = -1, phiRegion = -1;
792  GetCaloUtils()->GetEMCALSubregion(cluster,GetReader()->GetEMCALCells(),etaRegion,phiRegion);
793  if(etaRegion >= 0 && etaRegion < 4 && phiRegion >=0 && phiRegion < 3)
794  {
795 
796  // fhLam0EMCALRegion[etaRegion][phiRegion]->Fill(pt,lambda0, GetEventWeight());
797  //
798  // if(GetFirstSMCoveredByTRD() >= 0 && sm >= GetFirstSMCoveredByTRD() )
799  // {
800  // fhLam0EMCALRegionTRD[etaRegion][phiRegion]->Fill(pt, lambda0, GetEventWeight());
801  // }
802 
803  fhLam0EMCALRegionPerSM[etaRegion][phiRegion][sm]->Fill(pt,lambda0, GetEventWeight());
804  fhLam1EMCALRegionPerSM[etaRegion][phiRegion][sm]->Fill(pt,lambda1, GetEventWeight());
805 
806  if(shared)
807  {
808  fhLam0PerSMShared[sm]->Fill(pt,lambda0, GetEventWeight());
809  fhLam1PerSMShared[sm]->Fill(pt,lambda1, GetEventWeight());
810  }
811  }
812 
813  // Define l0 bin and cluster pt bin
814  Int_t l0bin = -1;
815  if ( lambda0 >=0.30 && lambda0 <= 0.40 ) l0bin = 1;
816  else if( lambda0 >=0.23 && lambda0 <= 0.26 ) l0bin = 0;
817 
818  Float_t ptLimit[] = {2,3,4,5,6,8,10,12};
819  Int_t ptbin = -1;
820  for(Int_t ipt = 0; ipt < 7; ipt++)
821  {
822  if( pt >= ptLimit[ipt] && pt < ptLimit[ipt+1] )
823  {
824  ptbin = ipt;
825  break;
826  }
827  }
828 
829  if(l0bin!=-1)
830  {
831  fhLam1Lam0BinPerSM[l0bin][sm]->Fill(pt,lambda1);
832 
833  if(ptbin >= 0)
834  {
835  fhEtaPhiLam0BinPtBin[l0bin][ptbin]->Fill(eta, phi, GetEventWeight());
836  if(shared) fhEtaPhiLam0BinPtBinSMShared[l0bin][ptbin]->Fill(eta, phi, GetEventWeight());
837  }
838  }
839 
840  //
841  // Histograms with time of secondary cells, only if they contribute with a non null
842  // weight to the shower shape
843  //
844  AliVCaloCells* cells = GetReader()->GetEMCALCells();
845 
846  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
847 
848  // Cell max in cluster
849  Float_t maxCellFraction = 0;
850  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, cluster, maxCellFraction);
851  Float_t cellEMax = cells->GetCellAmplitude(absIdMax);
852  Double_t cellTimeMax = cells->GetCellTime(absIdMax);
853 
854  Int_t icolMax = -1, icolMaxAbs = -1;
855  Int_t irowMax = -1, irowMaxAbs = -1;
856  Int_t iRCUMax = -1;
857  Int_t nModuleMax = GetModuleNumberCellIndexesAbsCaloMap(absIdMax,GetCalorimeter(), icolMax, irowMax, iRCUMax, icolMaxAbs,irowMaxAbs);
858 
859  GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absIdMax,bc,cellEMax,cellTimeMax,cells);
860  cellTimeMax*=1e9;
861 
862  //
863  // Cluster cell loop, select only secondary cells with enough contribution to cluster
864  //
865  Bool_t largeTime = kFALSE;
866  for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
867  {
868  Int_t absId = cluster->GetCellAbsId(icell);
869 
870  if ( absId == absIdMax ) continue;
871 
872  Float_t cellE = cells->GetCellAmplitude(absId);
873  Double_t cellTime = cells->GetCellTime(absId);
874 
875  GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,cellE,cellTime,cells);
876  cellTime*=1e9;
877 
878  Float_t weight = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cellE,cluster->E());
879 
880  //printf("Cluster E %2.2f, cell E %2.2f, time %2.2f, weight %2.3f\n",cluster->E(),cellE,cellTime,weight);
881  if(weight < 0.01) continue;
882 
883  if ( TMath::Abs(cellTime) > 50 )
884  largeTime = kTRUE;
885 
886  if ( l0bin == -1 ) continue;
887 
888  Int_t icol = -1, icolAbs = -1;
889  Int_t irow = -1, irowAbs = -1;
890  Int_t iRCU = -1;
891  Int_t nModule = GetModuleNumberCellIndexesAbsCaloMap(absId,GetCalorimeter(), icol, irow, iRCU, icolAbs, irowAbs);
892 
893  if(ptbin >= 0 && largeTime)
894  {
895  Int_t colDiff = TMath::Abs(icolMaxAbs - icolAbs);
896  Int_t rowDiff = TMath::Abs(irowMaxAbs - irowAbs);
897  Int_t diff = colDiff;
898  if(rowDiff > colDiff) diff = rowDiff;
899  fhCellIndexDiffLargeTimeInClusterCell[l0bin][ptbin]->Fill(cellE,diff) ;
900  }
901 
902  fhTimeLam0BinPerSM [l0bin][sm]->Fill(pt, cellTime, GetEventWeight());
903  fhTimeLam0BinPerSMWeighted[l0bin][sm]->Fill(pt, cellTime, weight*GetEventWeight());
904 
905  fhDTimeLam0BinPerSM [l0bin][sm]->Fill(pt, cellTimeMax-cellTime, GetEventWeight());
906  fhDTimeLam0BinPerSMWeighted[l0bin][sm]->Fill(pt, cellTimeMax-cellTime, weight*GetEventWeight());
907 
908  fhCellClusterEFracLam0BinPerSM [l0bin][sm]->Fill(pt, cellE/cluster->E(), GetEventWeight());
909  fhCellClusterEFracLam0BinPerSMWeighted[l0bin][sm]->Fill(pt, cellE/cluster->E(), weight*GetEventWeight());
910 
911  fhCellClusterELam0BinPerSM [l0bin][sm]->Fill(pt, cellE, GetEventWeight());
912  fhCellClusterELam0BinPerSMWeighted[l0bin][sm]->Fill(pt, cellE, weight*GetEventWeight());
913 
914  if(shared)
915  fhTimeLam0BinPerSMShared[l0bin][sm]->Fill(pt, cellTime, GetEventWeight());
916 
917  if(ptbin >= 0)
918  {
919  fhColRowLam0BinPtBin [l0bin][ptbin]->Fill(icolAbs, irowAbs, GetEventWeight());
920  fhColRowLam0BinPtBinWeighted[l0bin][ptbin]->Fill(icolAbs, irowAbs, weight*GetEventWeight());
921  if(shared) fhColRowLam0BinPtBinSMShared[l0bin][ptbin]->Fill(icolAbs, irowAbs, GetEventWeight());
922  }
923 
924  } // cluster cell loop
925 
926  if ( largeTime )
927  {
928  if(l0bin != -1 && ptbin >= 0 )
929  fhEtaPhiLargeTimeInClusterCell[l0bin][ptbin]->Fill(eta, phi, GetEventWeight());
930 
931  fhLam0PerSMLargeTimeInClusterCell[sm]->Fill(pt, lambda0, GetEventWeight());
932  fhLam1PerSMLargeTimeInClusterCell[sm]->Fill(pt, lambda1, GetEventWeight());
933  }
934 
935  //printf("Cluster %d, E %2.2f, sm %d, eta %2.2f, phi %2.2f ---> region %d %d\n",cluster->GetID(),cluster->E(),GetModuleNumber(cluster),eta,RadToDeg(phi),etaRegion,phiRegion);
936  } // Check EMCal SM and regions
937 
938  Float_t l0 = 0., l1 = 0.;
939  Float_t dispp= 0., dEta = 0., dPhi = 0.;
940  Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
942  {
943  GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
944  l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
945  //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",
946  // l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi );
947  //printf("AliAnaPhoton::FillShowerShapeHistogram - dispersion %f, dispersion eta+phi %f \n",
948  // disp, dPhi+dEta );
949  fhDispEtaE -> Fill(energy, dEta , GetEventWeight());
950  fhDispPhiE -> Fill(energy, dPhi , GetEventWeight());
951  fhSumEtaE -> Fill(energy, sEta , GetEventWeight());
952  fhSumPhiE -> Fill(energy, sPhi , GetEventWeight());
953  fhSumEtaPhiE -> Fill(energy, sEtaPhi , GetEventWeight());
954  fhDispEtaPhiDiffE -> Fill(energy, dPhi-dEta, GetEventWeight());
955 
956  if(dEta+dPhi>0)fhSphericityE -> Fill(energy,(dPhi-dEta)/(dEta+dPhi) , GetEventWeight());
957  if(dEta+sEta>0)fhDispSumEtaDiffE -> Fill(energy,(dEta-sEta)/((dEta+sEta)/2.), GetEventWeight());
958  if(dPhi+sPhi>0)fhDispSumPhiDiffE -> Fill(energy,(dPhi-sPhi)/((dPhi+sPhi)/2.), GetEventWeight());
959 
960  Int_t ebin = -1;
961  if (energy < 2 ) ebin = 0;
962  else if (energy < 4 ) ebin = 1;
963  else if (energy < 6 ) ebin = 2;
964  else if (energy < 10) ebin = 3;
965  else if (energy < 15) ebin = 4;
966  else if (energy < 20) ebin = 5;
967  else ebin = 6;
968 
969  fhDispEtaDispPhi[ebin]->Fill(dEta , dPhi, GetEventWeight());
970  fhLambda0DispEta[ebin]->Fill(lambda0, dEta, GetEventWeight());
971  fhLambda0DispPhi[ebin]->Fill(lambda0, dPhi, GetEventWeight());
972  }
973 
974  // If track-matching was off, check effect of track-matching residual cut
975 
976  if(!fRejectTrackMatch)
977  {
978  Float_t dZ = cluster->GetTrackDz();
979  Float_t dR = cluster->GetTrackDx();
980 // if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
981 // {
982 // dR = 2000., dZ = 2000.;
983 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
984 // }
985 
986  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
987  {
988  fhLam0ETM ->Fill(energy, lambda0, GetEventWeight());
989  fhLam0PtTM->Fill(pt , lambda0, GetEventWeight());
990  fhLam1ETM ->Fill(energy, lambda1, GetEventWeight());
991  fhDispETM ->Fill(energy, disp , GetEventWeight());
992 
993  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
995  {
996  fhLam0ETMTRD ->Fill(energy, lambda0, GetEventWeight());
997  fhLam0PtTMTRD->Fill(pt , lambda0, GetEventWeight());
998  fhLam1ETMTRD ->Fill(energy, lambda1, GetEventWeight());
999  fhDispETMTRD ->Fill(energy, disp , GetEventWeight());
1000  }
1001  }
1002  } // If track-matching was off, check effect of matching residual cut
1003 
1005  {
1006  if(energy < 2)
1007  {
1008  fhNCellsLam0LowE ->Fill(ncells, lambda0, GetEventWeight());
1009  fhNCellsLam1LowE ->Fill(ncells, lambda1, GetEventWeight());
1010  fhNCellsDispLowE ->Fill(ncells, disp , GetEventWeight());
1011 
1012  fhLam1Lam0LowE ->Fill(lambda1, lambda0, GetEventWeight());
1013  fhLam0DispLowE ->Fill(lambda0, disp , GetEventWeight());
1014  fhDispLam1LowE ->Fill(disp , lambda1, GetEventWeight());
1015  fhEtaLam0LowE ->Fill(eta , lambda0, GetEventWeight());
1016  fhPhiLam0LowE ->Fill(phi , lambda0, GetEventWeight());
1017  }
1018  else
1019  {
1020  fhNCellsLam0HighE ->Fill(ncells, lambda0, GetEventWeight());
1021  fhNCellsLam1HighE ->Fill(ncells, lambda1, GetEventWeight());
1022  fhNCellsDispHighE ->Fill(ncells, disp , GetEventWeight());
1023 
1024  fhLam1Lam0HighE ->Fill(lambda1, lambda0, GetEventWeight());
1025  fhLam0DispHighE ->Fill(lambda0, disp , GetEventWeight());
1026  fhDispLam1HighE ->Fill(disp , lambda1, GetEventWeight());
1027  fhEtaLam0HighE ->Fill(eta , lambda0, GetEventWeight());
1028  fhPhiLam0HighE ->Fill(phi , lambda0, GetEventWeight());
1029  }
1030  }
1031 
1032  if(IsDataMC())
1033  {
1034  AliVCaloCells* cells = 0;
1035  if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
1036  else cells = GetPHOSCells();
1037 
1038  // Fill histograms to check shape of embedded clusters
1039  Float_t fraction = 0;
1040  // printf("check embedding %i\n",GetReader()->IsEmbeddedClusterSelectionOn());
1041 
1042  if(GetReader()->IsEmbeddedClusterSelectionOn())
1043  {
1044  // Only working for EMCAL
1045  // printf("embedded\n");
1046 
1047  Float_t clusterE = 0; // recalculate in case corrections applied.
1048  Float_t cellE = 0;
1049  for(Int_t icell = 0; icell < cluster->GetNCells(); icell++)
1050  {
1051  cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell));
1052  clusterE+=cellE;
1053  fraction+=cellE*cluster->GetCellAmplitudeFraction(icell);
1054  }
1055 
1056  //Fraction of total energy due to the embedded signal
1057  fraction/=clusterE;
1058 
1059  AliDebug(1,Form("Energy fraction of embedded signal %2.3f, Energy %2.3f",fraction, clusterE));
1060 
1061  fhEmbeddedSignalFractionEnergy->Fill(clusterE, fraction, GetEventWeight());
1062  } // embedded fraction
1063 
1064  // Check the origin and fill histograms
1065 
1066  Int_t mcIndex = -1;
1067 
1068  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
1069  !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
1070  !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
1071  !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
1072  {
1073  mcIndex = kmcssPhoton ;
1074 
1075  if(!GetReader()->IsEmbeddedClusterSelectionOn())
1076  {
1077  //Check particle overlaps in cluster
1078 
1079  // Compare the primary depositing more energy with the rest,
1080  // if no photon/electron as comon ancestor (conversions), count as other particle
1081  const UInt_t nlabels = cluster->GetNLabels();
1082  Int_t overpdg[nlabels];
1083  Int_t noverlaps = GetMCAnalysisUtils()->GetNOverlaps(cluster->GetLabels(), nlabels,mcTag,-1,GetReader(),overpdg);
1084 
1085  //printf("N overlaps %d \n",noverlaps);
1086 
1087  if(noverlaps == 0)
1088  {
1089  fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0, GetEventWeight());
1090  }
1091  else if(noverlaps == 1)
1092  {
1093  fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0, GetEventWeight());
1094  }
1095  else if(noverlaps > 1)
1096  {
1097  fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0, GetEventWeight());
1098  }
1099  else
1100  {
1101  AliWarning(Form("n overlaps = %d!!", noverlaps));
1102  }
1103  } // No embedding
1104 
1105  // Fill histograms to check shape of embedded clusters
1106  if(GetReader()->IsEmbeddedClusterSelectionOn())
1107  {
1108  if (fraction > 0.9)
1109  {
1110  fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0, GetEventWeight());
1111  }
1112  else if(fraction > 0.5)
1113  {
1114  fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0, GetEventWeight());
1115  }
1116  else if(fraction > 0.1)
1117  {
1118  fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0, GetEventWeight());
1119  }
1120  else
1121  {
1122  fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0, GetEventWeight());
1123  }
1124  } // embedded
1125  } // photon no conversion
1126  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
1127  GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
1128  !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
1129  !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
1130  {
1131  mcIndex = kmcssConversion ;
1132  }//conversion photon
1133 
1134  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron))
1135  {
1136  mcIndex = kmcssElectron ;
1137  }//electron
1138  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) )
1139  {
1140  mcIndex = kmcssPi0 ;
1141 
1142  //Fill histograms to check shape of embedded clusters
1143  if(GetReader()->IsEmbeddedClusterSelectionOn())
1144  {
1145  if (fraction > 0.9)
1146  {
1147  fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0, GetEventWeight());
1148  }
1149  else if(fraction > 0.5)
1150  {
1151  fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0, GetEventWeight());
1152  }
1153  else if(fraction > 0.1)
1154  {
1155  fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0, GetEventWeight());
1156  }
1157  else
1158  {
1159  fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0, GetEventWeight());
1160  }
1161  } // embedded
1162 
1163  }//pi0
1164  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) )
1165  {
1166  mcIndex = kmcssEta ;
1167  }//eta
1168  else
1169  {
1170  mcIndex = kmcssOther ;
1171  }//other particles
1172 
1173  fhMCELambda0 [mcIndex]->Fill(energy, lambda0, GetEventWeight());
1174  fhMCPtLambda0 [mcIndex]->Fill(pt , lambda0, GetEventWeight());
1175  fhMCELambda1 [mcIndex]->Fill(energy, lambda1, GetEventWeight());
1176  fhMCEDispersion [mcIndex]->Fill(energy, disp , GetEventWeight());
1177  fhMCNCellsE [mcIndex]->Fill(energy, ncells , GetEventWeight());
1178  fhMCMaxCellDiffClusterE[mcIndex]->Fill(energy, maxCellFraction, GetEventWeight());
1179 
1181  {
1182  if (energy < 2.)
1183  {
1184  fhMCLambda0vsClusterMaxCellDiffE0[mcIndex]->Fill(lambda0, maxCellFraction, GetEventWeight());
1185  fhMCNCellsvsClusterMaxCellDiffE0 [mcIndex]->Fill(ncells, maxCellFraction, GetEventWeight());
1186  }
1187  else if(energy < 6.)
1188  {
1189  fhMCLambda0vsClusterMaxCellDiffE2[mcIndex]->Fill(lambda0, maxCellFraction, GetEventWeight());
1190  fhMCNCellsvsClusterMaxCellDiffE2 [mcIndex]->Fill(ncells, maxCellFraction, GetEventWeight());
1191  }
1192  else
1193  {
1194  fhMCLambda0vsClusterMaxCellDiffE6[mcIndex]->Fill(lambda0, maxCellFraction, GetEventWeight());
1195  fhMCNCellsvsClusterMaxCellDiffE6 [mcIndex]->Fill(ncells, maxCellFraction, GetEventWeight());
1196  }
1197 
1198  if(GetCalorimeter() == kEMCAL)
1199  {
1200  fhMCEDispEta [mcIndex]-> Fill(energy, dEta , GetEventWeight());
1201  fhMCEDispPhi [mcIndex]-> Fill(energy, dPhi , GetEventWeight());
1202  fhMCESumEtaPhi [mcIndex]-> Fill(energy, sEtaPhi , GetEventWeight());
1203  fhMCEDispEtaPhiDiff [mcIndex]-> Fill(energy, dPhi-dEta, GetEventWeight());
1204 
1205  if( dEta+dPhi > 0 ) fhMCESphericity[mcIndex]-> Fill(energy, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
1206 
1207  Int_t ebin = -1;
1208  if (energy < 2 ) ebin = 0;
1209  else if (energy < 4 ) ebin = 1;
1210  else if (energy < 6 ) ebin = 2;
1211  else if (energy < 10) ebin = 3;
1212  else if (energy < 15) ebin = 4;
1213  else if (energy < 20) ebin = 5;
1214  else ebin = 6;
1215 
1216  fhMCDispEtaDispPhi[ebin][mcIndex]->Fill(dEta , dPhi, GetEventWeight());
1217  fhMCLambda0DispEta[ebin][mcIndex]->Fill(lambda0, dEta, GetEventWeight());
1218  fhMCLambda0DispPhi[ebin][mcIndex]->Fill(lambda0, dPhi, GetEventWeight());
1219  }
1220  }
1221  }// MC data
1222 }
1223 
1224 //__________________________________________________________________________
1230 //__________________________________________________________________________
1232  Int_t cut)
1233 {
1234  Float_t dZ = cluster->GetTrackDz();
1235  Float_t dR = cluster->GetTrackDx();
1236 
1237 // if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
1238 // {
1239 // dR = 2000., dZ = 2000.;
1240 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
1241 // }
1242 
1243  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
1244 
1245  Bool_t positive = kFALSE;
1246  if(track) positive = (track->Charge()>0);
1247 
1248  if(fhTrackMatchedDEta[cut] && TMath::Abs(dR) < 999)
1249  {
1250  fhTrackMatchedDEta[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1251  fhTrackMatchedDPhi[cut]->Fill(cluster->E(), dR, GetEventWeight());
1252  if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhi[cut]->Fill(dZ, dR, GetEventWeight());
1253 
1254  if(track)
1255  {
1256  if(positive)
1257  {
1258  fhTrackMatchedDEtaPos[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1259  fhTrackMatchedDPhiPos[cut]->Fill(cluster->E(), dR, GetEventWeight());
1260  if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiPos[cut]->Fill(dZ,dR, GetEventWeight());
1261  }
1262  else
1263  {
1264  fhTrackMatchedDEtaNeg[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1265  fhTrackMatchedDPhiNeg[cut]->Fill(cluster->E(), dR, GetEventWeight());
1266  if(cluster->E() > 0.5) fhTrackMatchedDEtaDPhiNeg[cut]->Fill(dZ, dR, GetEventWeight());
1267  }
1268  }
1269 
1270  Int_t nSMod = GetModuleNumber(cluster);
1271 
1272  if( GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
1273  nSMod >= GetFirstSMCoveredByTRD() )
1274  {
1275  fhTrackMatchedDEtaTRD[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1276  fhTrackMatchedDPhiTRD[cut]->Fill(cluster->E(), dR, GetEventWeight());
1277  }
1278 
1279  // Check dEdx and E/p of matched clusters
1280 
1281  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
1282  {
1283  if(track)
1284  {
1285  Float_t dEdx = track->GetTPCsignal();
1286  Float_t eOverp = cluster->E()/track->P();
1287 
1288  fhdEdx[cut] ->Fill(cluster->E(), dEdx , GetEventWeight());
1289  fhEOverP[cut]->Fill(cluster->E(), eOverp, GetEventWeight());
1290 
1291  if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
1292  nSMod >= GetFirstSMCoveredByTRD() )
1293  fhEOverPTRD[cut]->Fill(cluster->E(), eOverp, GetEventWeight());
1294 
1295 
1296  }
1297  else
1298  AliWarning(Form("Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT?", dR,dZ));
1299 
1300  if(IsDataMC())
1301  {
1302 
1303  Int_t tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(),GetReader(),GetCalorimeter());
1304 
1306  {
1309  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 2.5, GetEventWeight());
1311  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 0.5, GetEventWeight());
1313  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 1.5, GetEventWeight());
1314  else
1315  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 3.5, GetEventWeight());
1316 
1317  // Check if several particles contributed to cluster and discard overlapped mesons
1320  {
1321  if(cluster->GetNLabels()==1)
1322  {
1323  fhTrackMatchedDEtaMCNoOverlap[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1324  fhTrackMatchedDPhiMCNoOverlap[cut]->Fill(cluster->E(), dR, GetEventWeight());
1325  }
1326  else
1327  {
1328  fhTrackMatchedDEtaMCOverlap[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1329  fhTrackMatchedDPhiMCOverlap[cut]->Fill(cluster->E(), dR, GetEventWeight());
1330  }
1331 
1332  }// Check overlaps
1333 
1334  }
1335  else
1336  {
1339  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 6.5, GetEventWeight());
1341  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 4.5, GetEventWeight());
1343  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 5.5, GetEventWeight());
1344  else
1345  fhTrackMatchedMCParticle[cut]->Fill(cluster->E(), 7.5, GetEventWeight());
1346 
1347  // Check if several particles contributed to cluster
1350  {
1351  fhTrackMatchedDEtaMCConversion[cut]->Fill(cluster->E(), dZ, GetEventWeight());
1352  fhTrackMatchedDPhiMCConversion[cut]->Fill(cluster->E(), dR, GetEventWeight());
1353 
1354  }// Check overlaps
1355 
1356  }
1357 
1358  } // MC
1359 
1360  } // residuals window
1361 
1362  } // Small residual
1363 }
1364 
1365 //___________________________________________
1367 //___________________________________________
1369 {
1370  TString parList ; //this will be list of parameters used for this analysis.
1371  const Int_t buffersize = 255;
1372  char onePar[buffersize] ;
1373 
1374  snprintf(onePar,buffersize,"--- AliAnaPhoton ---:") ;
1375  parList+=onePar ;
1376  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
1377  parList+=onePar ;
1378  snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster);",fMinDist) ;
1379  parList+=onePar ;
1380  snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation);",fMinDist2) ;
1381  parList+=onePar ;
1382  snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study);",fMinDist3) ;
1383  parList+=onePar ;
1384  snprintf(onePar,buffersize,"fRejectTrackMatch: %d",fRejectTrackMatch) ;
1385  parList+=onePar ;
1386 
1387  // Get parameters set in base class.
1388  parList += GetBaseParametersList() ;
1389 
1390  // Get parameters set in PID class.
1391  parList += GetCaloPID()->GetPIDParametersList() ;
1392 
1393  // Get parameters set in FiducialCut class (not available yet)
1394  //parlist += GetFidCut()->GetFidCutParametersList()
1395 
1396  return new TObjString(parList) ;
1397 }
1398 
1399 //_____________________________________________
1402 //_____________________________________________
1404 {
1405  TList * outputContainer = new TList() ;
1406  outputContainer->SetName("PhotonHistos") ;
1407 
1409  Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins(); Float_t phimax = GetHistogramRanges()->GetHistoPhiMax(); Float_t phimin = GetHistogramRanges()->GetHistoPhiMin();
1413  Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
1414 
1415  Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
1416  Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
1417  Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
1418  Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
1419  Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
1420  Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
1421 
1422  Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
1423  Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax();
1424  Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
1425  Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
1426  Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
1427  Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
1428 
1429  Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins for SS studies
1430 
1431  TString cut[] = {"Open","Reader","E","Time","NCells","NLM","Fidutial","Matching","Bad","PID"};
1432  for (Int_t i = 0; i < 10 ; i++)
1433  {
1434  fhClusterCutsE[i] = new TH1F(Form("hE_Cut_%d_%s", i, cut[i].Data()),
1435  Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
1436  nptbins,ptmin,ptmax);
1437  fhClusterCutsE[i]->SetYTitle("d#it{N}/d#it{E} ");
1438  fhClusterCutsE[i]->SetXTitle("#it{E} (GeV)");
1439  outputContainer->Add(fhClusterCutsE[i]) ;
1440 
1441  fhClusterCutsPt[i] = new TH1F(Form("hPt_Cut_%d_%s", i, cut[i].Data()),
1442  Form("Number of clusters that pass cuts <= %d, %s", i, cut[i].Data()),
1443  nptbins,ptmin,ptmax);
1444  fhClusterCutsPt[i]->SetYTitle("d#it{N}/d#it{E} ");
1445  fhClusterCutsPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1446  outputContainer->Add(fhClusterCutsPt[i]) ;
1447  }
1448 
1449  fhEClusterSM = new TH2F("hEClusterSM","Raw clusters E and super-module number",
1450  nptbins,ptmin,ptmax,
1451  GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1452  fhEClusterSM->SetYTitle("SuperModule ");
1453  fhEClusterSM->SetXTitle("#it{E} (GeV)");
1454  outputContainer->Add(fhEClusterSM) ;
1455 
1456  fhPtClusterSM = new TH2F("hPtClusterSM","Raw clusters #it{p}_{T} and super-module number",
1457  nptbins,ptmin,ptmax,
1458  GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1459  fhPtClusterSM->SetYTitle("SuperModule ");
1460  fhPtClusterSM->SetXTitle("#it{E} (GeV)");
1461  outputContainer->Add(fhPtClusterSM) ;
1462 
1463  fhEPhotonSM = new TH2F("hEPhotonSM","Selected clusters E and super-module number",
1464  nptbins,ptmin,ptmax,
1465  GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1466  fhEPhotonSM->SetYTitle("SuperModule ");
1467  fhEPhotonSM->SetXTitle("#it{E} (GeV)");
1468  outputContainer->Add(fhEPhotonSM) ;
1469 
1470  fhPtPhotonSM = new TH2F("hPtPhotonSM","Selected clusters #it{p}_{T} and super-module number",
1471  nptbins,ptmin,ptmax,
1472  GetCaloUtils()->GetNumberOfSuperModulesUsed(),0,GetCaloUtils()->GetNumberOfSuperModulesUsed());
1473  fhPtPhotonSM->SetYTitle("SuperModule ");
1474  fhPtPhotonSM->SetXTitle("#it{E} (GeV)");
1475  outputContainer->Add(fhPtPhotonSM) ;
1476 
1477  fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1478  fhNCellsE->SetXTitle("#it{E} (GeV)");
1479  fhNCellsE->SetYTitle("# of cells in cluster");
1480  outputContainer->Add(fhNCellsE);
1481 
1482  fhCellsE = new TH2F ("hCellsE","energy of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nptbins*2,ptmin,ptmax);
1483  fhCellsE->SetXTitle("#it{E}_{cluster} (GeV)");
1484  fhCellsE->SetYTitle("#it{E}_{cell} (GeV)");
1485  outputContainer->Add(fhCellsE);
1486 
1487  fhTimePt = new TH2F ("hTimePt","time of cluster vs pT of clusters", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
1488  fhTimePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1489  fhTimePt->SetYTitle("#it{time} (ns)");
1490  outputContainer->Add(fhTimePt);
1491 
1492  fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
1493  nptbins,ptmin,ptmax, 500,0,1.);
1494  fhMaxCellDiffClusterE->SetXTitle("#it{E}_{cluster} (GeV) ");
1495  fhMaxCellDiffClusterE->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
1496  outputContainer->Add(fhMaxCellDiffClusterE);
1497 
1498  fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax);
1499  fhEPhoton->SetYTitle("#it{counts}");
1500  fhEPhoton->SetXTitle("#it{E}_{#gamma}(GeV)");
1501  outputContainer->Add(fhEPhoton) ;
1502 
1503  fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs #it{p}_{T}",nptbins,ptmin,ptmax);
1504  fhPtPhoton->SetYTitle("#it{counts}");
1505  fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/#it{c})");
1506  outputContainer->Add(fhPtPhoton) ;
1507 
1509  {
1510  fhPtCentralityPhoton = new TH2F("hPtCentralityPhoton","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1511  fhPtCentralityPhoton->SetYTitle("Centrality");
1512  fhPtCentralityPhoton->SetXTitle("#it{p}_{T}(GeV/#it{c})");
1513  outputContainer->Add(fhPtCentralityPhoton) ;
1514 
1515  fhPtEventPlanePhoton = new TH2F("hPtEventPlanePhoton","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1516  fhPtEventPlanePhoton->SetYTitle("Event plane angle (rad)");
1517  fhPtEventPlanePhoton->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1518  outputContainer->Add(fhPtEventPlanePhoton) ;
1519  }
1520 
1521  fhEtaPhi = new TH2F
1522  ("hEtaPhi","cluster,#it{E} > 0.5 GeV, #eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1523  fhEtaPhi->SetYTitle("#phi (rad)");
1524  fhEtaPhi->SetXTitle("#eta");
1525  outputContainer->Add(fhEtaPhi) ;
1526 
1527  fhPhiPhoton = new TH2F
1528  ("hPhiPhoton","#phi_{#gamma} vs #it{p}_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1529  fhPhiPhoton->SetYTitle("#phi (rad)");
1530  fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
1531  outputContainer->Add(fhPhiPhoton) ;
1532 
1533  fhEtaPhoton = new TH2F
1534  ("hEtaPhoton","#eta_{#gamma} vs #it{p}_{T}",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1535  fhEtaPhoton->SetYTitle("#eta");
1536  fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/#it{c})");
1537  outputContainer->Add(fhEtaPhoton) ;
1538 
1539  fhEtaPhiPhoton = new TH2F
1540  ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1541  fhEtaPhiPhoton->SetYTitle("#phi (rad)");
1542  fhEtaPhiPhoton->SetXTitle("#eta");
1543  outputContainer->Add(fhEtaPhiPhoton) ;
1544  if(GetMinPt() < 0.5)
1545  {
1546  fhEtaPhi05Photon = new TH2F
1547  ("hEtaPhi05Photon","#eta vs #phi, E < 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
1548  fhEtaPhi05Photon->SetYTitle("#phi (rad)");
1549  fhEtaPhi05Photon->SetXTitle("#eta");
1550  outputContainer->Add(fhEtaPhi05Photon) ;
1551  }
1552 
1553  fhNLocMax = new TH2F("hNLocMax","Number of local maxima in cluster",
1554  nptbins,ptmin,ptmax,10,0,10);
1555  fhNLocMax ->SetYTitle("N maxima");
1556  fhNLocMax ->SetXTitle("#it{E} (GeV)");
1557  outputContainer->Add(fhNLocMax) ;
1558 
1559  //Shower shape
1560  if(fFillSSHistograms)
1561  {
1562  fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1563  fhLam0E->SetYTitle("#lambda_{0}^{2}");
1564  fhLam0E->SetXTitle("#it{E} (GeV)");
1565  outputContainer->Add(fhLam0E);
1566 
1567  fhLam0Pt = new TH2F ("hLam0Pt","#lambda_{0}^{2} vs #it{p}_{T}", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1568  fhLam0Pt->SetYTitle("#lambda_{0}^{2}");
1569  fhLam0Pt->SetXTitle("#it{p}_{T} (GeV)");
1570  outputContainer->Add(fhLam0Pt);
1571 
1572  fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1573  fhLam1E->SetYTitle("#lambda_{1}^{2}");
1574  fhLam1E->SetXTitle("#it{E} (GeV)");
1575  outputContainer->Add(fhLam1E);
1576 
1577  fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1578  fhDispE->SetYTitle("D^{2}");
1579  fhDispE->SetXTitle("#it{E} (GeV) ");
1580  outputContainer->Add(fhDispE);
1581 
1582  if(!fRejectTrackMatch)
1583  {
1584  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);
1585  fhLam0ETM->SetYTitle("#lambda_{0}^{2}");
1586  fhLam0ETM->SetXTitle("#it{E} (GeV)");
1587  outputContainer->Add(fhLam0ETM);
1588 
1589  fhLam0PtTM = new TH2F ("hLam0PtTM","#lambda_{0}^{2} vs #it{p}_{T}, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1590  fhLam0PtTM->SetYTitle("#lambda_{0}^{2}");
1591  fhLam0PtTM->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1592  outputContainer->Add(fhLam0PtTM);
1593 
1594  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);
1595  fhLam1ETM->SetYTitle("#lambda_{1}^{2}");
1596  fhLam1ETM->SetXTitle("#it{E} (GeV)");
1597  outputContainer->Add(fhLam1ETM);
1598 
1599  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);
1600  fhDispETM->SetYTitle("D^{2}");
1601  fhDispETM->SetXTitle("#it{E} (GeV) ");
1602  outputContainer->Add(fhDispETM);
1603  }
1604 
1605  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
1606  {
1607  fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1608  fhLam0ETRD->SetYTitle("#lambda_{0}^{2}");
1609  fhLam0ETRD->SetXTitle("#it{E} (GeV)");
1610  outputContainer->Add(fhLam0ETRD);
1611 
1612  fhLam0PtTRD = new TH2F ("hLam0PtTRD","#lambda_{0}^{2} vs #it{p}_{T}, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1613  fhLam0PtTRD->SetYTitle("#lambda_{0}^{2}");
1614  fhLam0PtTRD->SetXTitle("#it{E} (GeV)");
1615  outputContainer->Add(fhLam0PtTRD);
1616 
1617  fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1618  fhLam1ETRD->SetYTitle("#lambda_{1}^{2}");
1619  fhLam1ETRD->SetXTitle("#it{E} (GeV)");
1620  outputContainer->Add(fhLam1ETRD);
1621 
1622  fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1623  fhDispETRD->SetYTitle("Dispersion^{2}");
1624  fhDispETRD->SetXTitle("#it{E} (GeV) ");
1625  outputContainer->Add(fhDispETRD);
1626 
1628  {
1629  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);
1630  fhLam0ETMTRD->SetYTitle("#lambda_{0}^{2}");
1631  fhLam0ETMTRD->SetXTitle("#it{E} (GeV)");
1632  outputContainer->Add(fhLam0ETMTRD);
1633 
1634  fhLam0PtTMTRD = new TH2F ("hLam0PtTMTRD","#lambda_{0}^{2} vs #it{p}_{T}, EMCAL SM covered by TRD, cut on track-matching residual |#Delta #eta| < 0.05, |#Delta #phi| < 0.05", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1635  fhLam0PtTMTRD->SetYTitle("#lambda_{0}^{2}");
1636  fhLam0PtTMTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1637  outputContainer->Add(fhLam0PtTMTRD);
1638 
1639  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);
1640  fhLam1ETMTRD->SetYTitle("#lambda_{1}^{2}");
1641  fhLam1ETMTRD->SetXTitle("#it{E} (GeV)");
1642  outputContainer->Add(fhLam1ETMTRD);
1643 
1644  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);
1645  fhDispETMTRD->SetYTitle("Dispersion^{2}");
1646  fhDispETMTRD->SetXTitle("#it{E} (GeV) ");
1647  outputContainer->Add(fhDispETMTRD);
1648  }
1649  }
1650 
1652  {
1653  fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1654  fhNCellsLam0LowE->SetXTitle("N_{cells}");
1655  fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}");
1656  outputContainer->Add(fhNCellsLam0LowE);
1657 
1658  fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1659  fhNCellsLam0HighE->SetXTitle("N_{cells}");
1660  fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}");
1661  outputContainer->Add(fhNCellsLam0HighE);
1662 
1663  fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1664  fhNCellsLam1LowE->SetXTitle("N_{cells}");
1665  fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}");
1666  outputContainer->Add(fhNCellsLam1LowE);
1667 
1668  fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, #it{E} > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1669  fhNCellsLam1HighE->SetXTitle("N_{cells}");
1670  fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}");
1671  outputContainer->Add(fhNCellsLam1HighE);
1672 
1673  fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1674  fhNCellsDispLowE->SetXTitle("N_{cells}");
1675  fhNCellsDispLowE->SetYTitle("D^{2}");
1676  outputContainer->Add(fhNCellsDispLowE);
1677 
1678  fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
1679  fhNCellsDispHighE->SetXTitle("N_{cells}");
1680  fhNCellsDispHighE->SetYTitle("D^{2}");
1681  outputContainer->Add(fhNCellsDispHighE);
1682 
1683  fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1684  fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}");
1685  fhEtaLam0LowE->SetXTitle("#eta");
1686  outputContainer->Add(fhEtaLam0LowE);
1687 
1688  fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1689  fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}");
1690  fhPhiLam0LowE->SetXTitle("#phi");
1691  outputContainer->Add(fhPhiLam0LowE);
1692 
1693  fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, #it{E} > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1694  fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}");
1695  fhEtaLam0HighE->SetXTitle("#eta");
1696  outputContainer->Add(fhEtaLam0HighE);
1697 
1698  fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, #it{E} > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1699  fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}");
1700  fhPhiLam0HighE->SetXTitle("#phi");
1701  outputContainer->Add(fhPhiLam0HighE);
1702 
1703  fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1704  fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}");
1705  fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}");
1706  outputContainer->Add(fhLam1Lam0LowE);
1707 
1708  fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1709  fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}");
1710  fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}");
1711  outputContainer->Add(fhLam1Lam0HighE);
1712 
1713  fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1714  fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}");
1715  fhLam0DispLowE->SetYTitle("D^{2}");
1716  outputContainer->Add(fhLam0DispLowE);
1717 
1718  fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1719  fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}");
1720  fhLam0DispHighE->SetYTitle("D^{2}");
1721  outputContainer->Add(fhLam0DispHighE);
1722 
1723  fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1724  fhDispLam1LowE->SetXTitle("D^{2}");
1725  fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}");
1726  outputContainer->Add(fhDispLam1LowE);
1727 
1728  fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of #it{E} > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1729  fhDispLam1HighE->SetXTitle("D^{2}");
1730  fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}");
1731  outputContainer->Add(fhDispLam1HighE);
1732 
1733  if(GetCalorimeter() == kEMCAL)
1734  {
1735  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);
1736  fhDispEtaE->SetXTitle("#it{E} (GeV)");
1737  fhDispEtaE->SetYTitle("#sigma^{2}_{#eta #eta}");
1738  outputContainer->Add(fhDispEtaE);
1739 
1740  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);
1741  fhDispPhiE->SetXTitle("#it{E} (GeV)");
1742  fhDispPhiE->SetYTitle("#sigma^{2}_{#phi #phi}");
1743  outputContainer->Add(fhDispPhiE);
1744 
1745  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);
1746  fhSumEtaE->SetXTitle("#it{E} (GeV)");
1747  fhSumEtaE->SetYTitle("#delta^{2}_{#eta #eta}");
1748  outputContainer->Add(fhSumEtaE);
1749 
1750  fhSumPhiE = new TH2F ("hSumPhiE","#delta^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",
1751  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1752  fhSumPhiE->SetXTitle("#it{E} (GeV)");
1753  fhSumPhiE->SetYTitle("#delta^{2}_{#phi #phi}");
1754  outputContainer->Add(fhSumPhiE);
1755 
1756  fhSumEtaPhiE = new TH2F ("hSumEtaPhiE","#delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",
1757  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1758  fhSumEtaPhiE->SetXTitle("#it{E} (GeV)");
1759  fhSumEtaPhiE->SetYTitle("#delta^{2}_{#eta #phi}");
1760  outputContainer->Add(fhSumEtaPhiE);
1761 
1762  fhDispEtaPhiDiffE = new TH2F ("hDispEtaPhiDiffE","#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",
1763  nptbins,ptmin,ptmax,200, -10,10);
1764  fhDispEtaPhiDiffE->SetXTitle("#it{E} (GeV)");
1765  fhDispEtaPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
1766  outputContainer->Add(fhDispEtaPhiDiffE);
1767 
1768  fhSphericityE = new TH2F ("hSphericityE","(#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",
1769  nptbins,ptmin,ptmax, 200, -1,1);
1770  fhSphericityE->SetXTitle("#it{E} (GeV)");
1771  fhSphericityE->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
1772  outputContainer->Add(fhSphericityE);
1773 
1774  fhDispSumEtaDiffE = new TH2F ("hDispSumEtaDiffE","#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1775  fhDispSumEtaDiffE->SetXTitle("#it{E} (GeV)");
1776  fhDispSumEtaDiffE->SetYTitle("#sigma^{2}_{#eta #eta} - #delta^{2}_{#eta #eta} / average");
1777  outputContainer->Add(fhDispSumEtaDiffE);
1778 
1779  fhDispSumPhiDiffE = new TH2F ("hDispSumPhiDiffE","#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average vs E", nptbins,ptmin,ptmax, 200,-0.01,0.01);
1780  fhDispSumPhiDiffE->SetXTitle("#it{E} (GeV)");
1781  fhDispSumPhiDiffE->SetYTitle("#sigma^{2}_{#phi #phi} - #delta^{2}_{#phi #phi} / average");
1782  outputContainer->Add(fhDispSumPhiDiffE);
1783 
1784  for(Int_t i = 0; i < 7; i++)
1785  {
1786  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]),
1787  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1788  fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1789  fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1790  outputContainer->Add(fhDispEtaDispPhi[i]);
1791 
1792  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]),
1793  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1794  fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1795  fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1796  outputContainer->Add(fhLambda0DispEta[i]);
1797 
1798  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]),
1799  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1800  fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1801  fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
1802  outputContainer->Add(fhLambda0DispPhi[i]);
1803  }
1804  }
1805  }
1806  } // Shower shape
1807 
1808  // Track Matching
1809 
1810  if(fFillTMHisto)
1811  {
1812  TString cutTM [] = {"NoCut",""};
1813 
1814  for(Int_t i = 0; i < 2; i++)
1815  {
1816  fhTrackMatchedDEta[i] = new TH2F
1817  (Form("hTrackMatchedDEta%s",cutTM[i].Data()),
1818  Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1819  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1820  fhTrackMatchedDEta[i]->SetYTitle("d#eta");
1821  fhTrackMatchedDEta[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1822 
1823  fhTrackMatchedDPhi[i] = new TH2F
1824  (Form("hTrackMatchedDPhi%s",cutTM[i].Data()),
1825  Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1826  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1827  fhTrackMatchedDPhi[i]->SetYTitle("d#phi (rad)");
1828  fhTrackMatchedDPhi[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1829 
1830  fhTrackMatchedDEtaDPhi[i] = new TH2F
1831  (Form("hTrackMatchedDEtaDPhi%s",cutTM[i].Data()),
1832  Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1833  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1834  fhTrackMatchedDEtaDPhi[i]->SetYTitle("d#phi (rad)");
1835  fhTrackMatchedDEtaDPhi[i]->SetXTitle("d#eta");
1836 
1837  fhTrackMatchedDEtaPos[i] = new TH2F
1838  (Form("hTrackMatchedDEtaPos%s",cutTM[i].Data()),
1839  Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1840  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1841  fhTrackMatchedDEtaPos[i]->SetYTitle("d#eta");
1842  fhTrackMatchedDEtaPos[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1843 
1844  fhTrackMatchedDPhiPos[i] = new TH2F
1845  (Form("hTrackMatchedDPhiPos%s",cutTM[i].Data()),
1846  Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1847  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1848  fhTrackMatchedDPhiPos[i]->SetYTitle("d#phi (rad)");
1849  fhTrackMatchedDPhiPos[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1850 
1851  fhTrackMatchedDEtaDPhiPos[i] = new TH2F
1852  (Form("hTrackMatchedDEtaDPhiPos%s",cutTM[i].Data()),
1853  Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1854  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1855  fhTrackMatchedDEtaDPhiPos[i]->SetYTitle("d#phi (rad)");
1856  fhTrackMatchedDEtaDPhiPos[i]->SetXTitle("d#eta");
1857 
1858  fhTrackMatchedDEtaNeg[i] = new TH2F
1859  (Form("hTrackMatchedDEtaNeg%s",cutTM[i].Data()),
1860  Form("d#eta of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1861  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1862  fhTrackMatchedDEtaNeg[i]->SetYTitle("d#eta");
1863  fhTrackMatchedDEtaNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1864 
1865  fhTrackMatchedDPhiNeg[i] = new TH2F
1866  (Form("hTrackMatchedDPhiNeg%s",cutTM[i].Data()),
1867  Form("d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1868  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1869  fhTrackMatchedDPhiNeg[i]->SetYTitle("d#phi (rad)");
1870  fhTrackMatchedDPhiNeg[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1871 
1872  fhTrackMatchedDEtaDPhiNeg[i] = new TH2F
1873  (Form("hTrackMatchedDEtaDPhiNeg%s",cutTM[i].Data()),
1874  Form("d#eta vs d#phi of cluster-track vs cluster energy, %s",cutTM[i].Data()),
1875  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1876  fhTrackMatchedDEtaDPhiNeg[i]->SetYTitle("d#phi (rad)");
1877  fhTrackMatchedDEtaDPhiNeg[i]->SetXTitle("d#eta");
1878 
1879  fhdEdx[i] = new TH2F (Form("hdEdx%s",cutTM[i].Data()),Form("matched track <dE/dx> vs cluster E, %s",cutTM[i].Data()),
1880  nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1881  fhdEdx[i]->SetXTitle("#it{E} (GeV)");
1882  fhdEdx[i]->SetYTitle("<dE/dx>");
1883 
1884  fhEOverP[i] = new TH2F (Form("hEOverP%s",cutTM[i].Data()),Form("matched track E/p vs cluster E, %s",cutTM[i].Data()),
1885  nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1886  fhEOverP[i]->SetXTitle("#it{E} (GeV)");
1887  fhEOverP[i]->SetYTitle("E/p");
1888 
1889  outputContainer->Add(fhTrackMatchedDEta[i]) ;
1890  outputContainer->Add(fhTrackMatchedDPhi[i]) ;
1891  outputContainer->Add(fhTrackMatchedDEtaDPhi[i]) ;
1892  outputContainer->Add(fhTrackMatchedDEtaPos[i]) ;
1893  outputContainer->Add(fhTrackMatchedDPhiPos[i]) ;
1894  outputContainer->Add(fhTrackMatchedDEtaDPhiPos[i]) ;
1895  outputContainer->Add(fhTrackMatchedDEtaNeg[i]) ;
1896  outputContainer->Add(fhTrackMatchedDPhiNeg[i]) ;
1897  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg[i]) ;
1898  outputContainer->Add(fhdEdx[i]);
1899  outputContainer->Add(fhEOverP[i]);
1900 
1902  {
1903  fhTrackMatchedDEtaTRD[i] = new TH2F
1904  (Form("hTrackMatchedDEtaTRD%s",cutTM[i].Data()),
1905  Form("d#eta of cluster-track vs cluster energy, SM behind TRD, %s",cutTM[i].Data()),
1906  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1907  fhTrackMatchedDEtaTRD[i]->SetYTitle("d#eta");
1908  fhTrackMatchedDEtaTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1909 
1910  fhTrackMatchedDPhiTRD[i] = new TH2F
1911  (Form("hTrackMatchedDPhiTRD%s",cutTM[i].Data()),
1912  Form("d#phi of cluster-track vs cluster energy, SM behing TRD, %s",cutTM[i].Data()),
1913  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1914  fhTrackMatchedDPhiTRD[i]->SetYTitle("d#phi (rad)");
1915  fhTrackMatchedDPhiTRD[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1916 
1917  fhEOverPTRD[i] = new TH2F
1918  (Form("hEOverPTRD%s",cutTM[i].Data()),
1919  Form("matched track E/p vs cluster E, behind TRD, %s",cutTM[i].Data()),
1920  nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1921  fhEOverPTRD[i]->SetXTitle("#it{E} (GeV)");
1922  fhEOverPTRD[i]->SetYTitle("E/p");
1923 
1924  outputContainer->Add(fhTrackMatchedDEtaTRD[i]) ;
1925  outputContainer->Add(fhTrackMatchedDPhiTRD[i]) ;
1926  outputContainer->Add(fhEOverPTRD[i]);
1927  }
1928 
1929  if(IsDataMC())
1930  {
1931  fhTrackMatchedDEtaMCNoOverlap[i] = new TH2F
1932  (Form("hTrackMatchedDEtaMCNoOverlap%s",cutTM[i].Data()),
1933  Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()),
1934  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1935  fhTrackMatchedDEtaMCNoOverlap[i]->SetYTitle("d#eta");
1936  fhTrackMatchedDEtaMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1937 
1938  fhTrackMatchedDPhiMCNoOverlap[i] = new TH2F
1939  (Form("hTrackMatchedDPhiMCNoOverlap%s",cutTM[i].Data()),
1940  Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap %s",cutTM[i].Data()),
1941  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1942  fhTrackMatchedDPhiMCNoOverlap[i]->SetYTitle("d#phi (rad)");
1943  fhTrackMatchedDPhiMCNoOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1944 
1945  outputContainer->Add(fhTrackMatchedDEtaMCNoOverlap[i]) ;
1946  outputContainer->Add(fhTrackMatchedDPhiMCNoOverlap[i]) ;
1947  fhTrackMatchedDEtaMCOverlap[i] = new TH2F
1948  (Form("hTrackMatchedDEtaMCOverlap%s",cutTM[i].Data()),
1949  Form("d#eta of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()),
1950  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1951  fhTrackMatchedDEtaMCOverlap[i]->SetYTitle("d#eta");
1952  fhTrackMatchedDEtaMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1953 
1954  fhTrackMatchedDPhiMCOverlap[i] = new TH2F
1955  (Form("hTrackMatchedDPhiMCOverlap%s",cutTM[i].Data()),
1956  Form("d#phi of cluster-track vs cluster energy, several MC particles overlap %s",cutTM[i].Data()),
1957  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1958  fhTrackMatchedDPhiMCOverlap[i]->SetYTitle("d#phi (rad)");
1959  fhTrackMatchedDPhiMCOverlap[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1960 
1961  outputContainer->Add(fhTrackMatchedDEtaMCOverlap[i]) ;
1962  outputContainer->Add(fhTrackMatchedDPhiMCOverlap[i]) ;
1963 
1964  fhTrackMatchedDEtaMCConversion[i] = new TH2F
1965  (Form("hTrackMatchedDEtaMCConversion%s",cutTM[i].Data()),
1966  Form("d#eta of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()),
1967  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1968  fhTrackMatchedDEtaMCConversion[i]->SetYTitle("d#eta");
1969  fhTrackMatchedDEtaMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1970 
1971  fhTrackMatchedDPhiMCConversion[i] = new TH2F
1972  (Form("hTrackMatchedDPhiMCConversion%s",cutTM[i].Data()),
1973  Form("d#phi of cluster-track vs cluster energy, no other MC particles overlap appart from conversions %s",cutTM[i].Data()),
1974  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1975  fhTrackMatchedDPhiMCConversion[i]->SetYTitle("d#phi (rad)");
1976  fhTrackMatchedDPhiMCConversion[i]->SetXTitle("#it{E}_{cluster} (GeV)");
1977 
1978  outputContainer->Add(fhTrackMatchedDEtaMCConversion[i]) ;
1979  outputContainer->Add(fhTrackMatchedDPhiMCConversion[i]) ;
1980 
1981  fhTrackMatchedMCParticle[i] = new TH2F
1982  (Form("hTrackMatchedMCParticle%s",cutTM[i].Data()),
1983  Form("Origin of particle vs energy %s",cutTM[i].Data()),
1984  nptbins,ptmin,ptmax,8,0,8);
1985  fhTrackMatchedMCParticle[i]->SetXTitle("#it{E} (GeV)");
1986  //fhTrackMatchedMCParticle[i]->SetYTitle("Particle type");
1987 
1988  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(1 ,"Photon");
1989  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(2 ,"Electron");
1990  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1991  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(4 ,"Rest");
1992  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1993  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1994  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1995  fhTrackMatchedMCParticle[i]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1996 
1997  outputContainer->Add(fhTrackMatchedMCParticle[i]);
1998  }
1999  }
2000  }
2001 
2002  if(IsPileUpAnalysisOn())
2003  {
2004  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2005 
2006  for(Int_t i = 0 ; i < 7 ; i++)
2007  {
2008  fhPtPhotonPileUp[i] = new TH1F(Form("hPtPhotonPileUp%s",pileUpName[i].Data()),
2009  Form("Selected photon #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
2010  fhPtPhotonPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2011  outputContainer->Add(fhPtPhotonPileUp[i]);
2012 
2013  fhClusterTimeDiffPhotonPileUp[i] = new TH2F(Form("hClusterTimeDiffPhotonPileUp%s",pileUpName[i].Data()),
2014  Form("Photon cluster E vs #it{t}_{max}-#it{t}_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2015  nptbins,ptmin,ptmax,400,-200,200);
2016  fhClusterTimeDiffPhotonPileUp[i]->SetXTitle("#it{E} (GeV)");
2017  fhClusterTimeDiffPhotonPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
2018  outputContainer->Add(fhClusterTimeDiffPhotonPileUp[i]);
2019  }
2020 
2021  fhTimePtPhotonNoCut = new TH2F ("hTimePtPhoton_NoCut","time of photon cluster vs pT of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
2022  fhTimePtPhotonNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2023  fhTimePtPhotonNoCut->SetYTitle("#it{time} (ns)");
2024  outputContainer->Add(fhTimePtPhotonNoCut);
2025 
2026  fhTimePtPhotonSPD = new TH2F ("hTimePtPhoton_SPD","time of photon cluster vs pT of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
2027  fhTimePtPhotonSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2028  fhTimePtPhotonSPD->SetYTitle("#it{time} (ns)");
2029  outputContainer->Add(fhTimePtPhotonSPD);
2030 
2031  fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,20,0,20);
2032  fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
2033  fhTimeNPileUpVertSPD->SetXTitle("#it{time} (ns)");
2034  outputContainer->Add(fhTimeNPileUpVertSPD);
2035 
2036  fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 20,0,20 );
2037  fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
2038  fhTimeNPileUpVertTrack->SetXTitle("#it{time} (ns)");
2039  outputContainer->Add(fhTimeNPileUpVertTrack);
2040 
2041  fhPtPhotonNPileUpSPDVtx = new TH2F ("hPtPhoton_NPileUpVertSPD","pT of cluster vs N pile-up SPD vertex",
2042  nptbins,ptmin,ptmax,20,0,20);
2043  fhPtPhotonNPileUpSPDVtx->SetYTitle("# vertex ");
2044  fhPtPhotonNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2045  outputContainer->Add(fhPtPhotonNPileUpSPDVtx);
2046 
2047  fhPtPhotonNPileUpTrkVtx = new TH2F ("hPtPhoton_NPileUpVertTracks","pT of cluster vs N pile-up Tracks vertex",
2048  nptbins,ptmin,ptmax, 20,0,20 );
2049  fhPtPhotonNPileUpTrkVtx->SetYTitle("# vertex ");
2050  fhPtPhotonNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2051  outputContainer->Add(fhPtPhotonNPileUpTrkVtx);
2052 
2053  fhPtPhotonNPileUpSPDVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut","pT of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
2054  nptbins,ptmin,ptmax,20,0,20);
2055  fhPtPhotonNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
2056  fhPtPhotonNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2057  outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut);
2058 
2059  fhPtPhotonNPileUpTrkVtxTimeCut = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut","pT of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
2060  nptbins,ptmin,ptmax, 20,0,20 );
2061  fhPtPhotonNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
2062  fhPtPhotonNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2063  outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut);
2064 
2065  fhPtPhotonNPileUpSPDVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertSPD_TimeCut2","pT of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
2066  nptbins,ptmin,ptmax,20,0,20);
2067  fhPtPhotonNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
2068  fhPtPhotonNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2069  outputContainer->Add(fhPtPhotonNPileUpSPDVtxTimeCut2);
2070 
2071  fhPtPhotonNPileUpTrkVtxTimeCut2 = new TH2F ("hPtPhoton_NPileUpVertTracks_TimeCut2","pT of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
2072  nptbins,ptmin,ptmax, 20,0,20 );
2073  fhPtPhotonNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
2074  fhPtPhotonNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2075  outputContainer->Add(fhPtPhotonNPileUpTrkVtxTimeCut2);
2076 
2077  }
2078 
2080  {
2081  for(Int_t ieta = 0; ieta < 4; ieta++)
2082  {
2083  for(Int_t iphi = 0; iphi < 3; iphi++)
2084  {
2085 // fhLam0EMCALRegion[ieta][iphi] =
2086 // new TH2F(Form("hLam0_eta%d_phi%d",ieta,iphi),
2087 // Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, region eta %d, phi %d",ieta,iphi),
2088 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2089 // fhLam0EMCALRegion[ieta][iphi]->SetYTitle("#lambda_{0}^{2}");
2090 // fhLam0EMCALRegion[ieta][iphi]->SetXTitle("#it{p}_{T} (GeV)");
2091 // outputContainer->Add(fhLam0EMCALRegion[ieta][iphi]) ;
2092 //
2093 // if(GetFirstSMCoveredByTRD() >= 0)
2094 // {
2095 // fhLam0EMCALRegionTRD[ieta][iphi] =
2096 // new TH2F(Form("hLam0TRD_eta%d_phi%d",ieta,iphi),
2097 // Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, region eta %d, phi %d, SM covered by TRD",ieta,iphi),
2098 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2099 // fhLam0EMCALRegionTRD[ieta][iphi]->SetYTitle("#lambda_{0}^{2}");
2100 // fhLam0EMCALRegionTRD[ieta][iphi]->SetXTitle("#it{p}_{T} (GeV)");
2101 // outputContainer->Add(fhLam0EMCALRegionTRD[ieta][iphi]) ;
2102 // } // TRD
2103 
2104  for(Int_t ism = 0; ism < GetCaloUtils()->GetNumberOfSuperModulesUsed(); ism++)
2105  {
2106  fhLam0EMCALRegionPerSM[ieta][iphi][ism] =
2107  new TH2F(Form("hLam0_eta%d_phi%d_sm%d",ieta,iphi,ism),
2108  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, sm %d, region eta %d, phi %d",ism,ieta,iphi),
2109  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2110  fhLam0EMCALRegionPerSM[ieta][iphi][ism]->SetYTitle("#lambda_{0}^{2}");
2111  fhLam0EMCALRegionPerSM[ieta][iphi][ism]->SetXTitle("#it{p}_{T} (GeV)");
2112  outputContainer->Add(fhLam0EMCALRegionPerSM[ieta][iphi][ism]) ;
2113 
2114  fhLam1EMCALRegionPerSM[ieta][iphi][ism] =
2115  new TH2F(Form("hLam1_eta%d_phi%d_sm%d",ieta,iphi,ism),
2116  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{1}^{2}, sm %d, region eta %d, phi %d",ism,ieta,iphi),
2117  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2118  fhLam1EMCALRegionPerSM[ieta][iphi][ism]->SetYTitle("#lambda_{1}^{2}");
2119  fhLam1EMCALRegionPerSM[ieta][iphi][ism]->SetXTitle("#it{p}_{T} (GeV)");
2120  outputContainer->Add(fhLam1EMCALRegionPerSM[ieta][iphi][ism]) ;
2121  }
2122  } // iphi
2123  } // ieta
2124 
2125  Float_t ptLimit[] = {2,3,4,5,6,8,10,12};
2126  TString l0bin [] = {"0.23<#lambda^{2}_{0}<0.26","0.3<#lambda^{2}_{0}<0.4"};
2127 
2128  for(Int_t il0 = 0; il0 < 2; il0++)
2129  {
2130  for(Int_t ipt = 0; ipt < 7; ipt++)
2131  {
2132  fhEtaPhiLam0BinPtBin[il0][ipt] = new TH2F
2133  (Form("hEtaPhiLam0Bin%d_PtBin%d",il0,ipt),
2134  Form("#eta vs #phi in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, %s",
2135  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2136  netabins,etamin,etamax,nphibins,phimin,phimax);
2137  fhEtaPhiLam0BinPtBin[il0][ipt]->SetYTitle("#phi (rad)");
2138  fhEtaPhiLam0BinPtBin[il0][ipt]->SetXTitle("#eta");
2139  outputContainer->Add(fhEtaPhiLam0BinPtBin[il0][ipt]) ;
2140 
2141  fhColRowLam0BinPtBin[il0][ipt] = new TH2F
2142  (Form("hColRowLam0Bin%d_PtBin%d",il0,ipt),
2143  Form("row vs column in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, %s, w > 0",
2144  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2145  96,0,96,5*24,0,5*24); // fix to generalize to other periods
2146  fhColRowLam0BinPtBin[il0][ipt]->SetYTitle("row");
2147  fhColRowLam0BinPtBin[il0][ipt]->SetXTitle("column");
2148  outputContainer->Add(fhColRowLam0BinPtBin[il0][ipt]) ;
2149 
2150  fhColRowLam0BinPtBinWeighted[il0][ipt] = new TH2F
2151  (Form("hColRowLam0Bin%d_PtBin%dWeighted",il0,ipt),
2152  Form("cluster cell row vs column weighted in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, %s",
2153  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2154  96,0,96,5*24,0,5*24); // fix to generalize to other periods
2155  fhColRowLam0BinPtBinWeighted[il0][ipt]->SetYTitle("row");
2156  fhColRowLam0BinPtBinWeighted[il0][ipt]->SetXTitle("column");
2157  outputContainer->Add(fhColRowLam0BinPtBinWeighted[il0][ipt]) ;
2158 
2159  fhEtaPhiLam0BinPtBinSMShared[il0][ipt] = new TH2F
2160  (Form("hEtaPhiLam0Bin%d_PtBin%d_SMShared",il0,ipt),
2161  Form("#eta vs #phi in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, %s",
2162  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2163  netabins,etamin,etamax,nphibins,phimin,phimax);
2164  fhEtaPhiLam0BinPtBinSMShared[il0][ipt]->SetYTitle("#phi (rad)");
2165  fhEtaPhiLam0BinPtBinSMShared[il0][ipt]->SetXTitle("#eta");
2166  outputContainer->Add(fhEtaPhiLam0BinPtBinSMShared[il0][ipt]) ;
2167 
2168  fhColRowLam0BinPtBinSMShared[il0][ipt] = new TH2F
2169  (Form("hColRowLam0Bin%d_PtBin%d_SMShared",il0,ipt),
2170  Form("row vs column in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, %s, w > 0",
2171  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2172  96,0,96,5*24,0,5*24); // fix to generalize to other periods
2173  fhColRowLam0BinPtBinSMShared[il0][ipt]->SetYTitle("row");
2174  fhColRowLam0BinPtBinSMShared[il0][ipt]->SetXTitle("column");
2175  outputContainer->Add(fhColRowLam0BinPtBinSMShared[il0][ipt]) ;
2176 
2177  fhEtaPhiLargeTimeInClusterCell[il0][ipt] = new TH2F
2178  (Form("hEtaPhiLam0Bin%d_PtBin%d_LargeTimeInClusterCell",il0,ipt),
2179  Form("#eta vs #phi in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, secondary cell t > 50 ns, %s",
2180  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2181  netabins,etamin,etamax,nphibins,phimin,phimax);
2182  fhEtaPhiLargeTimeInClusterCell[il0][ipt]->SetYTitle("#phi (rad)");
2183  fhEtaPhiLargeTimeInClusterCell[il0][ipt]->SetXTitle("#eta");
2184  outputContainer->Add(fhEtaPhiLargeTimeInClusterCell[il0][ipt]) ;
2185 
2186  fhCellIndexDiffLargeTimeInClusterCell[il0][ipt] = new TH2F
2187  (Form("hCellIndexDiffLam0Bin%d_PtBin%d_LargeTimeInClusterCell",il0,ipt),
2188  Form("row/col_cell-row/coll_cellMax vs cellE, in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c}, secondary cell t > 50 ns, %s",
2189  ptLimit[ipt],ptLimit[ipt+1],l0bin[il0].Data()),
2190  200,0,10,20,0,20);
2191  fhCellIndexDiffLargeTimeInClusterCell[il0][ipt]->SetYTitle("index - index_{Max}");
2192  fhCellIndexDiffLargeTimeInClusterCell[il0][ipt]->SetXTitle("E_{cell} (GeV)");
2193  outputContainer->Add(fhCellIndexDiffLargeTimeInClusterCell[il0][ipt]) ;
2194  } // pt bin
2195 
2196  for(Int_t ism = 0; ism < GetCaloUtils()->GetNumberOfSuperModulesUsed(); ism++)
2197  {
2198  fhLam1Lam0BinPerSM[il0][ism] = new TH2F
2199  (Form("hLam1Lam0Bin%d_sm%d",il0,ism),
2200  Form("#it{p}_{T} vs #lambda^{2}_{1} in sm %d, %s",ism,l0bin[il0].Data()),
2201  nptbins,ptmin,ptmax,40,0,0.4);
2202  fhLam1Lam0BinPerSM[il0][ism]->SetYTitle("#lambda^{2}_{1}");
2203  fhLam1Lam0BinPerSM[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2204  outputContainer->Add(fhLam1Lam0BinPerSM[il0][ism]) ;
2205 
2206  fhTimeLam0BinPerSM[il0][ism] = new TH2F
2207  (Form("hTimeLam0Bin%d_sm%d",il0,ism),
2208  Form("#it{p}_{T} vs cluster cell time in sm %d, %s, w > 0",ism,l0bin[il0].Data()),
2209  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2210  fhTimeLam0BinPerSM[il0][ism]->SetYTitle("cell time (ns)");
2211  fhTimeLam0BinPerSM[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2212  outputContainer->Add(fhTimeLam0BinPerSM[il0][ism]) ;
2213 
2214  fhTimeLam0BinPerSMWeighted[il0][ism] = new TH2F
2215  (Form("hTimeLam0Bin%d_sm%d_Weighted",il0,ism),
2216  Form("#it{p}_{T} vs cluster cell time weighted in sm %d, %s",ism,l0bin[il0].Data()),
2217  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2218  fhTimeLam0BinPerSMWeighted[il0][ism]->SetYTitle("cell time (ns)");
2219  fhTimeLam0BinPerSMWeighted[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2220  outputContainer->Add(fhTimeLam0BinPerSMWeighted[il0][ism]) ;
2221 
2222  fhDTimeLam0BinPerSM[il0][ism] = new TH2F
2223  (Form("hDTimeLam0Bin%d_sm%d",il0,ism),
2224  Form("#it{p}_{T} vs t_{cluster}-t_{cell} in sm %d, %s, w > 0",ism,l0bin[il0].Data()),
2225  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2226  fhDTimeLam0BinPerSM[il0][ism]->SetYTitle("t_{cluster}-t_{cell} (ns)");
2227  fhDTimeLam0BinPerSM[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2228  outputContainer->Add(fhDTimeLam0BinPerSM[il0][ism]) ;
2229 
2230  fhDTimeLam0BinPerSMWeighted[il0][ism] = new TH2F
2231  (Form("hDTimeLam0Bin%d_sm%d_Weighted",il0,ism),
2232  Form("#it{p}_{T} vs t_{cluster}-t_{cell} weighted in sm %d, %s",ism,l0bin[il0].Data()),
2233  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2234  fhDTimeLam0BinPerSMWeighted[il0][ism]->SetYTitle("t_{cluster}-t_{cell} (ns)");
2235  fhDTimeLam0BinPerSMWeighted[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2236  outputContainer->Add(fhDTimeLam0BinPerSMWeighted[il0][ism]) ;
2237 
2238  fhCellClusterEFracLam0BinPerSM[il0][ism] = new TH2F
2239  (Form("hCellClusterEFracLam0Bin%d_sm%d",il0,ism),
2240  Form("#it{p}_{T} vs cell E / cluster E in sm %d, %s, w > 0",ism,l0bin[il0].Data()),
2241  nptbins,ptmin,ptmax,100,0,1);
2242  fhCellClusterEFracLam0BinPerSM[il0][ism]->SetYTitle("cell E / cluster E ");
2243  fhCellClusterEFracLam0BinPerSM[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2244  outputContainer->Add(fhCellClusterEFracLam0BinPerSM[il0][ism]) ;
2245 
2246  fhCellClusterEFracLam0BinPerSMWeighted[il0][ism] = new TH2F
2247  (Form("hCellClusterEFracLam0Bin%d_sm%d_Weighted",il0,ism),
2248  Form("#it{p}_{T} vs cell E / cluster E weighted in sm %d, %s",ism,l0bin[il0].Data()),
2249  nptbins,ptmin,ptmax,100,0,1);
2250  fhCellClusterEFracLam0BinPerSMWeighted[il0][ism]->SetYTitle("cell E / cluster E ");
2251  fhCellClusterEFracLam0BinPerSMWeighted[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2252  outputContainer->Add(fhCellClusterEFracLam0BinPerSMWeighted[il0][ism]) ;
2253 
2254  fhCellClusterELam0BinPerSM[il0][ism] = new TH2F
2255  (Form("hCellClusterELam0Bin%d_sm%d",il0,ism),
2256  Form("#it{p}_{T} vs cell E in sm %d, %s, w > 0",ism,l0bin[il0].Data()),
2257  nptbins,ptmin,ptmax,500,0,10);
2258  fhCellClusterELam0BinPerSM[il0][ism]->SetYTitle("cell E (GeV)");
2259  fhCellClusterELam0BinPerSM[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2260  outputContainer->Add(fhCellClusterELam0BinPerSM[il0][ism]) ;
2261 
2262  fhCellClusterELam0BinPerSMWeighted[il0][ism] = new TH2F
2263  (Form("hCellClusterELam0Bin%d_sm%d_Weighted",il0,ism),
2264  Form("#it{p}_{T} vs cell E weighted in sm %d, %s",ism,l0bin[il0].Data()),
2265  nptbins,ptmin,ptmax,500,0,10);
2266  fhCellClusterELam0BinPerSMWeighted[il0][ism]->SetYTitle("cell E (GeV)");
2267  fhCellClusterELam0BinPerSMWeighted[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2268  outputContainer->Add(fhCellClusterELam0BinPerSMWeighted[il0][ism]) ;
2269 
2270  if(ism < 12)
2271  {
2272  fhTimeLam0BinPerSMShared[il0][ism] = new TH2F
2273  (Form("hTimeLam0Bin%d_sm%d_SMShared",il0,ism),
2274  Form("#it{p}_{T} vs cluster cell time in sm %d, %s, w > 0",ism,l0bin[il0].Data()),
2275  nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
2276  fhTimeLam0BinPerSMShared[il0][ism]->SetYTitle("cell time (ns)");
2277  fhTimeLam0BinPerSMShared[il0][ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2278  outputContainer->Add(fhTimeLam0BinPerSMShared[il0][ism]) ;
2279  } // Run 1 SM
2280  } // sm
2281  } // l0 bin
2282 
2283  for(Int_t ism = 0; ism < GetCaloUtils()->GetNumberOfSuperModulesUsed(); ism++)
2284  {
2285  fhLam0PerSM[ism] = new TH2F
2286  (Form("hLam0_sm%d",ism),
2287  Form("#it{p}_{T} vs #lambda^{2}_{0} in sm %d",ism),
2288  nptbins,ptmin,ptmax,40,0,0.4);
2289  fhLam0PerSM[ism]->SetYTitle("#lambda^{2}_{0}");
2290  fhLam0PerSM[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2291  outputContainer->Add(fhLam0PerSM[ism]) ;
2292 
2293  fhLam1PerSM[ism] = new TH2F
2294  (Form("hLam1_sm%d",ism),
2295  Form("#it{p}_{T} vs #lambda^{2}_{1} in sm %d",ism),
2296  nptbins,ptmin,ptmax,40,0,0.4);
2297  fhLam1PerSM[ism]->SetYTitle("#lambda^{2}_{1}");
2298  fhLam1PerSM[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2299  outputContainer->Add(fhLam1PerSM[ism]) ;
2300 
2301  fhLam0PerSMLargeTimeInClusterCell[ism] = new TH2F
2302  (Form("hLam0_sm%d_LargeTimeInClusterCell",ism),
2303  Form("#it{p}_{T} vs #lambda^{2}_{0} in sm %d,|t_{secondary cell}| > 50 ns",ism),
2304  nptbins,ptmin,ptmax,40,0,0.4);
2305  fhLam0PerSMLargeTimeInClusterCell[ism]->SetYTitle("#lambda^{2}_{0}");
2306  fhLam0PerSMLargeTimeInClusterCell[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2307  outputContainer->Add(fhLam0PerSMLargeTimeInClusterCell[ism]) ;
2308 
2309  fhLam1PerSMLargeTimeInClusterCell[ism] = new TH2F
2310  (Form("hLam1_sm%d_LargeTimeInClusterCell",ism),
2311  Form("#it{p}_{T} vs #lambda^{2}_{1} in sm %d, |t_{secondary cell}| > 50 ns",ism),
2312  nptbins,ptmin,ptmax,40,0,0.4);
2313  fhLam1PerSMLargeTimeInClusterCell[ism]->SetYTitle("#lambda^{2}_{1}");
2314  fhLam1PerSMLargeTimeInClusterCell[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2315  outputContainer->Add(fhLam1PerSMLargeTimeInClusterCell[ism]) ;
2316 
2317  fhLam0PerSMSPDPileUp[ism] = new TH2F
2318  (Form("hLam0_sm%d_SPDPileUp",ism),
2319  Form("#it{p}_{T} vs #lambda^{2}_{0} in sm %d, Pile-up event SPD",ism),
2320  nptbins,ptmin,ptmax,40,0,0.4);
2321  fhLam0PerSMSPDPileUp[ism]->SetYTitle("#lambda^{2}_{0}");
2322  fhLam0PerSMSPDPileUp[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2323  outputContainer->Add(fhLam0PerSMSPDPileUp[ism]) ;
2324 
2325  fhLam1PerSMSPDPileUp[ism] = new TH2F
2326  (Form("hLam1_sm%d_SPDPileUp",ism),
2327  Form("#it{p}_{T} vs #lambda^{2}_{1} in sm %d, Pile-up event SPD",ism),
2328  nptbins,ptmin,ptmax,40,0,0.4);
2329  fhLam1PerSMSPDPileUp[ism]->SetYTitle("#lambda^{2}_{1}");
2330  fhLam1PerSMSPDPileUp[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2331  outputContainer->Add(fhLam1PerSMSPDPileUp[ism]) ;
2332 
2333  if(ism < 12)
2334  {
2335  fhLam0PerSMShared[ism] = new TH2F
2336  (Form("hLam0_sm%d_SMShared",ism),
2337  Form("#it{p}_{T} vs #lambda^{2}_{0} in sm %d, SM shared",ism),
2338  nptbins,ptmin,ptmax,40,0,0.4);
2339  fhLam0PerSMShared[ism]->SetYTitle("#lambda^{2}_{0}");
2340  fhLam0PerSMShared[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2341  outputContainer->Add(fhLam0PerSMShared[ism]) ;
2342 
2343  fhLam1PerSMShared[ism] = new TH2F
2344  (Form("hLam1_sm%d_SMShared",ism),
2345  Form("#it{p}_{T} vs #lambda^{2}_{1} in sm %d, SM shared",ism),
2346  nptbins,ptmin,ptmax,40,0,0.4);
2347  fhLam1PerSMShared[ism]->SetYTitle("#lambda^{2}_{1}");
2348  fhLam1PerSMShared[ism]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2349  outputContainer->Add(fhLam1PerSMShared[ism]) ;
2350  } // run1
2351  } // sm
2352 
2353  } // regions in EMCal
2354 
2355 
2356  if(IsDataMC())
2357  {
2358  TString ptype[] = { "#gamma" , "#gamma_{#pi decay}" , "#gamma_{#eta decay}", "#gamma_{other decay}",
2359  "#pi^{0}" , "#eta" , "e^{#pm}" , "#gamma->e^{#pm}" ,
2360  "hadron?" , "Anti-N" , "Anti-P" ,
2361  "#gamma_{prompt}", "#gamma_{fragmentation}", "#gamma_{ISR}" , "String" } ;
2362 
2363  TString pname[] = { "Photon" , "PhotonPi0Decay" , "PhotonEtaDecay", "PhotonOtherDecay",
2364  "Pi0" , "Eta" , "Electron" , "Conversion" ,
2365  "Hadron" , "AntiNeutron" , "AntiProton" ,
2366  "PhotonPrompt", "PhotonFragmentation", "PhotonISR" , "String" } ;
2367 
2368  for(Int_t i = 0; i < fNOriginHistograms; i++)
2369  {
2370  fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()),
2371  Form("cluster from %s : E ",ptype[i].Data()),
2372  nptbins,ptmin,ptmax);
2373  fhMCE[i]->SetXTitle("#it{E} (GeV)");
2374  outputContainer->Add(fhMCE[i]) ;
2375 
2376  fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()),
2377  Form("cluster from %s : #it{p}_{T} ",ptype[i].Data()),
2378  nptbins,ptmin,ptmax);
2379  fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2380  outputContainer->Add(fhMCPt[i]) ;
2381 
2382  fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()),
2383  Form("cluster from %s : #eta ",ptype[i].Data()),
2384  nptbins,ptmin,ptmax,netabins,etamin,etamax);
2385  fhMCEta[i]->SetYTitle("#eta");
2386  fhMCEta[i]->SetXTitle("#it{E} (GeV)");
2387  outputContainer->Add(fhMCEta[i]) ;
2388 
2389  fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()),
2390  Form("cluster from %s : #phi ",ptype[i].Data()),
2391  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2392  fhMCPhi[i]->SetYTitle("#phi (rad)");
2393  fhMCPhi[i]->SetXTitle("#it{E} (GeV)");
2394  outputContainer->Add(fhMCPhi[i]) ;
2395 
2396 
2397  fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()),
2398  Form("MC - Reco E from %s",pname[i].Data()),
2399  nptbins,ptmin,ptmax, 200,-50,50);
2400  fhMCDeltaE[i]->SetYTitle("#Delta #it{E} (GeV)");
2401  fhMCDeltaE[i]->SetXTitle("#it{E} (GeV)");
2402  outputContainer->Add(fhMCDeltaE[i]);
2403 
2404  fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()),
2405  Form("MC - Reco #it{p}_{T} from %s",pname[i].Data()),
2406  nptbins,ptmin,ptmax, 200,-50,50);
2407  fhMCDeltaPt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})");
2408  fhMCDeltaPt[i]->SetYTitle("#Delta #it{p}_{T} (GeV/#it{c})");
2409  outputContainer->Add(fhMCDeltaPt[i]);
2410 
2411  fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()),
2412  Form("E distribution, reconstructed vs generated from %s",pname[i].Data()),
2413  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2414  fhMC2E[i]->SetXTitle("#it{E}_{rec} (GeV)");
2415  fhMC2E[i]->SetYTitle("#it{E}_{gen} (GeV)");
2416  outputContainer->Add(fhMC2E[i]);
2417 
2418  fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()),
2419  Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()),
2420  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2421  fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/#it{c})");
2422  fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/#it{c})");
2423  outputContainer->Add(fhMC2Pt[i]);
2424  }
2425 
2426  TString pptype[] = { "#gamma" , "#gamma_{#pi decay}" ,
2427  "#gamma_{#eta decay}", "#gamma_{other decay}" ,
2428  "#gamma_{prompt}" , "#gamma_{fragmentation}", "#gamma_{ISR}" } ;
2429 
2430  TString ppname[] = { "Photon" , "PhotonPi0Decay" ,
2431  "PhotonEtaDecay", "PhotonOtherDecay" ,
2432  "PhotonPrompt" , "PhotonFragmentation", "PhotonISR" } ;
2433 
2434  for(Int_t i = 0; i < fNPrimaryHistograms; i++)
2435  {
2436  fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()),
2437  Form("primary photon %s : E ",pptype[i].Data()),
2438  nptbins,ptmin,ptmax);
2439  fhEPrimMC[i]->SetXTitle("#it{E} (GeV)");
2440  outputContainer->Add(fhEPrimMC[i]) ;
2441 
2442  fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()),
2443  Form("primary photon %s : #it{p}_{T} ",pptype[i].Data()),
2444  nptbins,ptmin,ptmax);
2445  fhPtPrimMC[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2446  outputContainer->Add(fhPtPrimMC[i]) ;
2447 
2448  fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()),
2449  Form("primary photon %s : Rapidity ",pptype[i].Data()),
2450  nptbins,ptmin,ptmax,200,-2,2);
2451  fhYPrimMC[i]->SetYTitle("Rapidity");
2452  fhYPrimMC[i]->SetXTitle("#it{E} (GeV)");
2453  outputContainer->Add(fhYPrimMC[i]) ;
2454 
2455  fhEtaPrimMC[i] = new TH2F(Form("hEtaPrim_MC%s",ppname[i].Data()),
2456  Form("primary photon %s : #eta",pptype[i].Data()),
2457  nptbins,ptmin,ptmax,200,-2,2);
2458  fhEtaPrimMC[i]->SetYTitle("#eta");
2459  fhEtaPrimMC[i]->SetXTitle("#it{E} (GeV)");
2460  outputContainer->Add(fhEtaPrimMC[i]) ;
2461 
2462  fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()),
2463  Form("primary photon %s : #phi ",pptype[i].Data()),
2464  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
2465  fhPhiPrimMC[i]->SetYTitle("#phi (rad)");
2466  fhPhiPrimMC[i]->SetXTitle("#it{E} (GeV)");
2467  outputContainer->Add(fhPhiPrimMC[i]) ;
2468 
2469 
2470  fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()),
2471  Form("primary photon %s in acceptance: E ",pptype[i].Data()),
2472  nptbins,ptmin,ptmax);
2473  fhEPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
2474  outputContainer->Add(fhEPrimMCAcc[i]) ;
2475 
2476  fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()),
2477  Form("primary photon %s in acceptance: #it{p}_{T} ",pptype[i].Data()),
2478  nptbins,ptmin,ptmax);
2479  fhPtPrimMCAcc[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2480  outputContainer->Add(fhPtPrimMCAcc[i]) ;
2481 
2482  fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()),
2483  Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()),
2484  nptbins,ptmin,ptmax,100,-1,1);
2485  fhYPrimMCAcc[i]->SetYTitle("Rapidity");
2486  fhYPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
2487  outputContainer->Add(fhYPrimMCAcc[i]) ;
2488 
2489  fhEtaPrimMCAcc[i] = new TH2F(Form("hEtaPrimAcc_MC%s",ppname[i].Data()),
2490  Form("primary photon %s in acceptance: #eta ",pptype[i].Data()),
2491  nptbins,ptmin,ptmax,netabins,etamin,etamax);
2492  fhEtaPrimMCAcc[i]->SetYTitle("#eta");
2493  fhEtaPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
2494  outputContainer->Add(fhEtaPrimMCAcc[i]) ;
2495 
2496  fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()),
2497  Form("primary photon %s in acceptance: #phi ",pptype[i].Data()),
2498  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2499  fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)");
2500  fhPhiPrimMCAcc[i]->SetXTitle("#it{E} (GeV)");
2501  outputContainer->Add(fhPhiPrimMCAcc[i]) ;
2502  }
2503 
2504  if(fFillSSHistograms)
2505  {
2506  TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
2507 
2508  TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ;
2509 
2510  for(Int_t i = 0; i < 6; i++)
2511  {
2512  fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()),
2513  Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()),
2514  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2515  fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}");
2516  fhMCELambda0[i]->SetXTitle("#it{E} (GeV)");
2517  outputContainer->Add(fhMCELambda0[i]) ;
2518 
2519  fhMCPtLambda0[i] = new TH2F(Form("hPtLambda0_MC%s",pnamess[i].Data()),
2520  Form("cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptypess[i].Data()),
2521  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2522  fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
2523  fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2524  outputContainer->Add(fhMCPtLambda0[i]) ;
2525 
2526  fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()),
2527  Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()),
2528  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2529  fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}");
2530  fhMCELambda1[i]->SetXTitle("#it{E} (GeV)");
2531  outputContainer->Add(fhMCELambda1[i]) ;
2532 
2533  fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()),
2534  Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()),
2535  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2536  fhMCEDispersion[i]->SetYTitle("D^{2}");
2537  fhMCEDispersion[i]->SetXTitle("#it{E} (GeV)");
2538  outputContainer->Add(fhMCEDispersion[i]) ;
2539 
2540  fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()),
2541  Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()),
2542  nptbins,ptmin,ptmax, nbins,nmin,nmax);
2543  fhMCNCellsE[i]->SetXTitle("#it{E} (GeV)");
2544  fhMCNCellsE[i]->SetYTitle("# of cells in cluster");
2545  outputContainer->Add(fhMCNCellsE[i]);
2546 
2547  fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()),
2548  Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()),
2549  nptbins,ptmin,ptmax, 500,0,1.);
2550  fhMCMaxCellDiffClusterE[i]->SetXTitle("#it{E}_{cluster} (GeV) ");
2551  fhMCMaxCellDiffClusterE[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2552  outputContainer->Add(fhMCMaxCellDiffClusterE[i]);
2553 
2555  {
2556  fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
2557  Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
2558  ssbins,ssmin,ssmax,500,0,1.);
2559  fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}");
2560  fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2561  outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ;
2562 
2563  fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
2564  Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
2565  ssbins,ssmin,ssmax,500,0,1.);
2566  fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}");
2567  fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2568  outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ;
2569 
2570  fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
2571  Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()),
2572  ssbins,ssmin,ssmax,500,0,1.);
2573  fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}");
2574  fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2575  outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ;
2576 
2577  fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
2578  Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
2579  nbins/5,nmin,nmax/5,500,0,1.);
2580  fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster");
2581  fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2582  outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ;
2583 
2584  fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
2585  Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
2586  nbins/5,nmin,nmax/5,500,0,1.);
2587  fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster");
2588  fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(#it{E}_{cluster} - #it{E}_{cell max})/ #it{E}_{cluster}");
2589  outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ;
2590 
2591  fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
2592  Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, #it{E} > 6 GeV",ptypess[i].Data()),
2593  nbins/5,nmin,nmax/5,500,0,1.);
2594  fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster");
2595  fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("#it{E} (GeV)");
2596  outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ;
2597 
2598  if(GetCalorimeter()==kEMCAL)
2599  {
2600  fhMCEDispEta[i] = new TH2F (Form("hEDispEtaE_MC%s",pnamess[i].Data()),
2601  Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data()),
2602  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2603  fhMCEDispEta[i]->SetXTitle("#it{E} (GeV)");
2604  fhMCEDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2605  outputContainer->Add(fhMCEDispEta[i]);
2606 
2607  fhMCEDispPhi[i] = new TH2F (Form("hEDispPhiE_MC%s",pnamess[i].Data()),
2608  Form("cluster from %s : #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",ptypess[i].Data()),
2609  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2610  fhMCEDispPhi[i]->SetXTitle("#it{E} (GeV)");
2611  fhMCEDispPhi[i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2612  outputContainer->Add(fhMCEDispPhi[i]);
2613 
2614  fhMCESumEtaPhi[i] = new TH2F (Form("hESumEtaPhiE_MC%s",pnamess[i].Data()),
2615  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()),
2616  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2617  fhMCESumEtaPhi[i]->SetXTitle("#it{E} (GeV)");
2618  fhMCESumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #phi}");
2619  outputContainer->Add(fhMCESumEtaPhi[i]);
2620 
2621  fhMCEDispEtaPhiDiff[i] = new TH2F (Form("hEDispEtaPhiDiffE_MC%s",pnamess[i].Data()),
2622  Form("cluster from %s : #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",ptypess[i].Data()),
2623  nptbins,ptmin,ptmax,200,-10,10);
2624  fhMCEDispEtaPhiDiff[i]->SetXTitle("#it{E} (GeV)");
2625  fhMCEDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
2626  outputContainer->Add(fhMCEDispEtaPhiDiff[i]);
2627 
2628  fhMCESphericity[i] = new TH2F (Form("hESphericity_MC%s",pnamess[i].Data()),
2629  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()),
2630  nptbins,ptmin,ptmax, 200,-1,1);
2631  fhMCESphericity[i]->SetXTitle("#it{E} (GeV)");
2632  fhMCESphericity[i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
2633  outputContainer->Add(fhMCESphericity[i]);
2634 
2635  for(Int_t ie = 0; ie < 7; ie++)
2636  {
2637  fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2638  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]),
2639  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2640  fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2641  fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2642  outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2643 
2644  fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pnamess[i].Data()),
2645  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]),
2646  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2647  fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2648  fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2649  outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2650 
2651  fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pnamess[i].Data()),
2652  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]),
2653  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2654  fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2655  fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
2656  outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2657  }
2658  }
2659  }
2660  }// loop
2661 
2662  if(!GetReader()->IsEmbeddedClusterSelectionOn())
2663  {
2664  fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap",
2665  "cluster from Photon : E vs #lambda_{0}^{2}",
2666  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2667  fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}");
2668  fhMCPhotonELambda0NoOverlap->SetXTitle("#it{E} (GeV)");
2669  outputContainer->Add(fhMCPhotonELambda0NoOverlap) ;
2670 
2671  fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap",
2672  "cluster from Photon : E vs #lambda_{0}^{2}",
2673  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2674  fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}");
2675  fhMCPhotonELambda0TwoOverlap->SetXTitle("#it{E} (GeV)");
2676  outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ;
2677 
2678  fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap",
2679  "cluster from Photon : E vs #lambda_{0}^{2}",
2680  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2681  fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}");
2682  fhMCPhotonELambda0NOverlap->SetXTitle("#it{E} (GeV)");
2683  outputContainer->Add(fhMCPhotonELambda0NOverlap) ;
2684  } // No embedding
2685 
2686  if(GetReader()->IsEmbeddedClusterSelectionOn())
2687  {
2688  fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy",
2689  "Energy Fraction of embedded signal versus cluster energy",
2690  nptbins,ptmin,ptmax,100,0.,1.);
2691  fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction");
2692  fhEmbeddedSignalFractionEnergy->SetXTitle("#it{E} (GeV)");
2693  outputContainer->Add(fhEmbeddedSignalFractionEnergy) ;
2694 
2695  fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal",
2696  "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2697  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2698  fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2699  fhEmbedPhotonELambda0FullSignal->SetXTitle("#it{E} (GeV)");
2700  outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ;
2701 
2702  fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal",
2703  "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2704  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2705  fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2706  fhEmbedPhotonELambda0MostlySignal->SetXTitle("#it{E} (GeV)");
2707  outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ;
2708 
2709  fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg",
2710  "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2711  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2712  fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2713  fhEmbedPhotonELambda0MostlyBkg->SetXTitle("#it{E} (GeV)");
2714  outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ;
2715 
2716  fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg",
2717  "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2718  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2719  fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2720  fhEmbedPhotonELambda0FullBkg->SetXTitle("#it{E} (GeV)");
2721  outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ;
2722 
2723  fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal",
2724  "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
2725  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2726  fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
2727  fhEmbedPi0ELambda0FullSignal->SetXTitle("#it{E} (GeV)");
2728  outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ;
2729 
2730  fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal",
2731  "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
2732  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2733  fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
2734  fhEmbedPi0ELambda0MostlySignal->SetXTitle("#it{E} (GeV)");
2735  outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ;
2736 
2737  fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg",
2738  "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
2739  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2740  fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
2741  fhEmbedPi0ELambda0MostlyBkg->SetXTitle("#it{E} (GeV)");
2742  outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ;
2743 
2744  fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg",
2745  "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
2746  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2747  fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
2748  fhEmbedPi0ELambda0FullBkg->SetXTitle("#it{E} (GeV)");
2749  outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ;
2750  }// embedded histograms
2751  }// Fill SS MC histograms
2752 
2753  fhMCConversionVertex = new TH2F("hMCPhotonConversionVertex","cluster from converted photon, #it{p}_{T} vs vertex distance",
2754  nptbins,ptmin,ptmax,500,0,500);
2755  fhMCConversionVertex->SetYTitle("#it{R} (cm)");
2756  fhMCConversionVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2757  outputContainer->Add(fhMCConversionVertex) ;
2758 
2759  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
2760  {
2761  fhMCConversionVertexTRD = new TH2F("hMCPhotonConversionVertexTRD","cluster from converted photon, #it{p}_{T} vs vertex distance, SM covered by TRD",
2762  nptbins,ptmin,ptmax,500,0,500);
2763  fhMCConversionVertexTRD->SetYTitle("#it{R} (cm)");
2764  fhMCConversionVertexTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2765  outputContainer->Add(fhMCConversionVertexTRD) ;
2766  }
2767 
2768  if(fFillSSHistograms)
2769  {
2770  TString region[] = {"ITS","TPC","TRD","TOF","Top EMCal","In EMCal"};
2771  for(Int_t iR = 0; iR < 6; iR++)
2772  {
2773  fhMCConversionLambda0Rcut[iR] = new TH2F(Form("hMCPhotonConversionLambda0_R%d",iR),
2774  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s",region[iR].Data()),
2775  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2776  fhMCConversionLambda0Rcut[iR]->SetYTitle("#lambda_{0}^{2}");
2777  fhMCConversionLambda0Rcut[iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2778  outputContainer->Add(fhMCConversionLambda0Rcut[iR]) ;
2779 
2780  fhMCConversionLambda1Rcut[iR] = new TH2F(Form("hMCPhotonConversionLambda1_R%d",iR),
2781  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{1}^{2}, conversion in %s",region[iR].Data()),
2782  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2783  fhMCConversionLambda1Rcut[iR]->SetYTitle("#lambda_{1}^{2}");
2784  fhMCConversionLambda1Rcut[iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2785  outputContainer->Add(fhMCConversionLambda1Rcut[iR]) ;
2786  } // R cut
2787 
2788 
2789  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
2790  {
2791  for(Int_t iR = 0; iR < 6; iR++)
2792  {
2793  fhMCConversionLambda0RcutTRD[iR] = new TH2F(Form("hMCPhotonConversionLambda0TRD_R%d",iR),
2794  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, SM covered by TRD",region[iR].Data()),
2795  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2796  fhMCConversionLambda0RcutTRD[iR]->SetYTitle("#lambda_{0}^{2}");
2797  fhMCConversionLambda0RcutTRD[iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2798  outputContainer->Add(fhMCConversionLambda0RcutTRD[iR]) ;
2799 
2800  fhMCConversionLambda1RcutTRD[iR] = new TH2F(Form("hMCPhotonConversionLambda1TRD_R%d",iR),
2801  Form("cluster from converted photon, #it{p}_{T} vs #lambda_{1}^{2}, conversion in %s, SM covered by TRD",region[iR].Data()),
2802  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2803  fhMCConversionLambda1RcutTRD[iR]->SetYTitle("#lambda_{1}^{2}");
2804  fhMCConversionLambda1RcutTRD[iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2805  outputContainer->Add(fhMCConversionLambda1RcutTRD[iR]) ;
2806  } // R cut
2807  }
2808 
2809 // if(GetCalorimeter() == kEMCAL && fFillEMCALRegionSSHistograms)
2810 // {
2811 // for(Int_t ieta = 0; ieta < 4; ieta++)
2812 // {
2813 // for(Int_t iphi = 0; iphi < 3; iphi++)
2814 // {
2815 // for(Int_t iR = 0; iR < 6; iR++)
2816 // {
2817 // fhLam0EMCALRegionMCConvRcut[ieta][iphi][iR] =
2818 // new TH2F(Form("hMCPhotonConversionLambda0_R%d_eta%d_phi%d",iR,ieta,iphi),
2819 // Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, region eta %d, phi %d",region[iR].Data(),ieta,iphi),
2820 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2821 // fhLam0EMCALRegionMCConvRcut[ieta][iphi][iR]->SetYTitle("#lambda_{0}^{2}");
2822 // fhLam0EMCALRegionMCConvRcut[ieta][iphi][iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2823 // outputContainer->Add(fhLam0EMCALRegionMCConvRcut[ieta][iphi][iR]) ;
2824 //
2825 // if(GetFirstSMCoveredByTRD() >= 0)
2826 // {
2827 // fhLam0EMCALRegionTRDMCConvRcut[ieta][iphi][iR] =
2828 // new TH2F(Form("hMCPhotonConversionLambda0TRD_R%d_eta%d_phi%d",iR,ieta,iphi),
2829 // Form("cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, region eta %d, phi %d, SM covered by TRD",region[iR].Data(),ieta,iphi),
2830 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2831 // fhLam0EMCALRegionTRDMCConvRcut[ieta][iphi][iR]->SetYTitle("#lambda_{0}^{2}");
2832 // fhLam0EMCALRegionTRDMCConvRcut[ieta][iphi][iR]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2833 // outputContainer->Add(fhLam0EMCALRegionTRDMCConvRcut[ieta][iphi][iR]) ;
2834 // } // TRD
2835 //
2836 // } // iR
2837 // } // iphi
2838 // } // ieta
2839 // } // regions in EMCal
2840 
2841  } // shower shape
2842  } // Histos with MC
2843 
2844  return outputContainer ;
2845 }
2846 
2847 //_______________________
2849 //_______________________
2851 {
2852  if ( GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD() )
2853  AliFatal("!!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!");
2854  else if( GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD() )
2855  AliFatal("!!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!");
2856 
2857  // Trick to select primary photon particles in the analysis of pure MC input
2858  if(GetReader()->GetDataType() == AliCaloTrackReader::kMC) GetCaloPID()->SwitchOnBayesian();
2859 }
2860 
2861 //_________________________________
2863 //_________________________________
2865 {
2866  AddToHistogramsName("AnaPhoton_");
2867 
2868  fMinDist = 2.;
2869  fMinDist2 = 4.;
2870  fMinDist3 = 5.;
2871 
2872  fTimeCutMin =-1000000;
2873  fTimeCutMax = 1000000;
2874  fNCellsCut = 0;
2875 
2876  fRejectTrackMatch = kTRUE ;
2877 }
2878 
2879 //_______________________________________
2883 //_______________________________________
2885 {
2886  // Get the vertex
2887  Double_t v[3] = {0,0,0}; //vertex ;
2888  GetReader()->GetVertex(v);
2889 
2890  // Select the Calorimeter of the photon
2891  TObjArray * pl = 0x0;
2892  AliVCaloCells* cells = 0;
2893  if (GetCalorimeter() == kPHOS )
2894  {
2895  pl = GetPHOSClusters();
2896  cells = GetPHOSCells();
2897  }
2898  else if (GetCalorimeter() == kEMCAL)
2899  {
2900  pl = GetEMCALClusters();
2901  cells = GetEMCALCells();
2902  }
2903 
2904  if(!pl)
2905  {
2906  AliWarning(Form("TObjArray with %s clusters is NULL!",GetCalorimeterString().Data()));
2907  return;
2908  }
2909 
2910  // Loop on raw clusters before filtering in the reader and fill control histogram
2911  if((GetReader()->GetEMCALClusterListName()=="" && GetCalorimeter()==kEMCAL) || GetCalorimeter()==kPHOS)
2912  {
2913  for(Int_t iclus = 0; iclus < GetReader()->GetInputEvent()->GetNumberOfCaloClusters(); iclus++ )
2914  {
2915  AliVCluster * clus = GetReader()->GetInputEvent()->GetCaloCluster(iclus);
2916 
2917  if (GetCalorimeter() == kPHOS && clus->IsPHOS() && clus->E() > GetReader()->GetPHOSPtMin() )
2918  {
2919  clus->GetMomentum(fMomentum,GetVertex(0)) ;
2920 
2921  fhClusterCutsE [0]->Fill(fMomentum.E() , GetEventWeight());
2922  fhClusterCutsPt[0]->Fill(fMomentum.Pt(), GetEventWeight());
2923  }
2924  else if(GetCalorimeter() == kEMCAL && clus->IsEMCAL() && clus->E() > GetReader()->GetEMCALPtMin())
2925  {
2926  clus->GetMomentum(fMomentum,GetVertex(0)) ;
2927 
2928  fhClusterCutsE [0]->Fill(fMomentum.E(), GetEventWeight());
2929  fhClusterCutsPt[0]->Fill(fMomentum.Pt(), GetEventWeight());
2930  }
2931  }
2932  }
2933  else
2934  { // reclusterized
2935  TClonesArray * clusterList = 0;
2936 
2937  if(GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()))
2938  clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetInputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2939  else if(GetReader()->GetOutputEvent())
2940  clusterList = dynamic_cast<TClonesArray*> (GetReader()->GetOutputEvent()->FindListObject(GetReader()->GetEMCALClusterListName()));
2941 
2942  if(clusterList)
2943  {
2944  Int_t nclusters = clusterList->GetEntriesFast();
2945  for (Int_t iclus = 0; iclus < nclusters; iclus++)
2946  {
2947  AliVCluster * clus = dynamic_cast<AliVCluster*> (clusterList->At(iclus));
2948 
2949  if(clus && clus->E() > GetReader()->GetEMCALPtMin())
2950  {
2951  clus->GetMomentum(fMomentum,GetVertex(0)) ;
2952 
2953  fhClusterCutsE [0]->Fill(clus->E() , GetEventWeight());
2954  fhClusterCutsPt[0]->Fill(fMomentum.Pt(), GetEventWeight());
2955  }
2956  }
2957  }
2958  }
2959 
2960  // Init arrays, variables, get number of clusters
2961  Int_t nCaloClusters = pl->GetEntriesFast();
2962 
2963  AliDebug(1,Form("Input %s cluster entries %d", GetCalorimeterString().Data(), nCaloClusters));
2964 
2965  //----------------------------------------------------
2966  // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects
2967  //----------------------------------------------------
2968  // Loop on clusters
2969  for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
2970  {
2971  AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
2972  //printf("calo %d, %f\n",icalo,calo->E());
2973 
2974  //Get the index where the cluster comes, to retrieve the corresponding vertex
2975  Int_t evtIndex = 0 ;
2976  if (GetMixedEvent())
2977  {
2978  evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
2979  //Get the vertex and check it is not too large in z
2980  if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue;
2981  }
2982 
2983  //Cluster selection, not charged, with photon id and in fiducial cut
2985  {
2986  calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
2987  }//Assume that come from vertex in straight line
2988  else
2989  {
2990  Double_t vertex[]={0,0,0};
2991  calo->GetMomentum(fMomentum,vertex) ;
2992  }
2993 
2994  //-----------------------------
2995  // Cluster selection
2996  //-----------------------------
2997  Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
2998  if(!ClusterSelected(calo,nMaxima)) continue;
2999 
3000  //----------------------------
3001  // Create AOD for analysis
3002  //----------------------------
3003  AliAODPWG4Particle aodph = AliAODPWG4Particle(fMomentum);
3004 
3005  //...............................................
3006  // Set the indeces of the original caloclusters (MC, ID), and calorimeter
3007  Int_t label = calo->GetLabel();
3008  aodph.SetLabel(label);
3009  aodph.SetCaloLabel(calo->GetID(),-1);
3010  aodph.SetDetectorTag(GetCalorimeter());
3011  //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
3012 
3013  //...............................................
3014  // Set bad channel distance bit
3015  Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
3016  if (distBad > fMinDist3) aodph.SetDistToBad(2) ;
3017  else if(distBad > fMinDist2) aodph.SetDistToBad(1) ;
3018  else aodph.SetDistToBad(0) ;
3019  //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad());
3020 
3021  //-------------------------------------
3022  // Play with the MC stack if available
3023  //-------------------------------------
3024 
3025  // Check origin of the candidates
3026  Int_t tag = -1;
3027 
3028  if(IsDataMC())
3029  {
3030  tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
3031  aodph.SetTag(tag);
3032 
3033  AliDebug(1,Form("Origin of candidate, bit map %d",aodph.GetTag()));
3034  }//Work with stack also
3035 
3036  //--------------------------------------------------------
3037  // Fill some shower shape histograms before PID is applied
3038  //--------------------------------------------------------
3039 
3040  Float_t maxCellFraction = 0;
3041  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, calo, maxCellFraction);
3042  if( absIdMax < 0 ) AliFatal("Wrong absID");
3043 
3044  FillShowerShapeHistograms(calo,tag,maxCellFraction);
3045 
3046  aodph.SetM02(calo->GetM02());
3047  //aodph.SetM20(calo->GetM20());
3048  aodph.SetNLM(nMaxima);
3049  aodph.SetTime(calo->GetTOF()*1e9);
3050  aodph.SetNCells(calo->GetNCells());
3051  Int_t nSM = GetModuleNumber(calo);
3052  aodph.SetSModNumber(nSM);
3053 
3054  //-------------------------------------
3055  // PID selection or bit setting
3056  //-------------------------------------
3057 
3058  //...............................................
3059  // Data, PID check on
3060  if(IsCaloPIDOn())
3061  {
3062  // Get most probable PID, 2 options check bayesian PID weights or redo PID
3063  // By default, redo PID
3064 
3065  aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(calo));
3066 
3067  AliDebug(1,Form("PDG of identified particle %d",aodph.GetIdentifiedParticleType()));
3068 
3069  //If cluster does not pass pid, not photon, skip it.
3070  if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ;
3071  }
3072 
3073  //...............................................
3074  // Data, PID check off
3075  else
3076  {
3077  // Set PID bits for later selection (AliAnaPi0 for example)
3078  // GetIdentifiedParticleType already called in SetPIDBits.
3079 
3080  GetCaloPID()->SetPIDBits(calo,&aodph, GetCaloUtils(),GetReader()->GetInputEvent());
3081 
3082  AliDebug(1,"PID Bits set");
3083  }
3084 
3085  AliDebug(1,Form("Photon selection cuts passed: pT %3.2f, pdg %d",aodph.Pt(),aodph.GetIdentifiedParticleType()));
3086 
3087 
3088  Float_t en = fMomentum.E ();
3089  Float_t pt = fMomentum.Pt();
3090 
3091  fhClusterCutsE [9]->Fill(en, GetEventWeight());
3092  fhClusterCutsPt[9]->Fill(pt, GetEventWeight());
3093 
3094  if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0)
3095  {
3096  fhEPhotonSM ->Fill(en, nSM, GetEventWeight());
3097  fhPtPhotonSM->Fill(pt, nSM, GetEventWeight());
3098  }
3099 
3100  fhNLocMax->Fill(calo->E(),nMaxima);
3101 
3102  // Few more control histograms for selected clusters
3103  fhMaxCellDiffClusterE->Fill(en, maxCellFraction , GetEventWeight());
3104  fhNCellsE ->Fill(en, calo->GetNCells() , GetEventWeight());
3105  fhTimePt ->Fill(pt, calo->GetTOF()*1.e9, GetEventWeight());
3106 
3107  if(cells)
3108  {
3109  for(Int_t icell = 0; icell < calo->GetNCells(); icell++)
3110  fhCellsE->Fill(en, cells->GetCellAmplitude(calo->GetCellsAbsId()[icell]), GetEventWeight());
3111  }
3112 
3113  // Matching after cuts
3115 
3116  // Fill histograms to undertand pile-up before other cuts applied
3117  // Remember to relax time cuts in the reader
3118  if( IsPileUpAnalysisOn() ) FillPileUpHistograms(calo,cells, absIdMax);
3119 
3120  // Add AOD with photon object to aod branch
3121  AddAODParticle(aodph);
3122  }// loop
3123 
3124  AliDebug(1,Form("End fill AODs, with %d entries",GetOutputAODBranch()->GetEntriesFast()));
3125 }
3126 
3127 //______________________________________________
3128 // Fill histograms with selected clusters/output AOD particles.
3129 //______________________________________________
3131 {
3132  // In case of simulated data, fill acceptance histograms
3134 
3135  // Get vertex
3136  Double_t v[3] = {0,0,0}; //vertex ;
3137  GetReader()->GetVertex(v);
3138  //fhVertex->Fill(v[0],v[1],v[2]);
3139  if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event
3140 
3141  //----------------------------------
3142  // Loop on stored AOD photons
3143  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
3144  AliDebug(1,Form("AOD branch entries %d", naod));
3145 
3146  Float_t cen = GetEventCentrality();
3147  // printf("++++++++++ GetEventCentrality() %f\n",cen);
3148 
3149  Float_t ep = GetEventPlaneAngle();
3150 
3151  for(Int_t iaod = 0; iaod < naod ; iaod++)
3152  {
3153  AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
3154  Int_t pdg = ph->GetIdentifiedParticleType();
3155 
3156  AliDebug(2,Form("PDG %d, MC TAG %d, Calorimeter <%d>",ph->GetIdentifiedParticleType(),ph->GetTag(), ph->GetDetectorTag())) ;
3157 
3158  // If PID used, fill histos with photons in Calorimeter GetCalorimeter()
3159  if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue;
3160 
3161  if(((Int_t) ph->GetDetectorTag()) != GetCalorimeter()) continue;
3162 
3163  AliDebug(2,Form("ID Photon: pt %f, phi %f, eta %f", ph->Pt(),ph->Phi(),ph->Eta())) ;
3164 
3165  //................................
3166  //Fill photon histograms
3167  Float_t ptcluster = ph->Pt();
3168  Float_t phicluster = ph->Phi();
3169  Float_t etacluster = ph->Eta();
3170  Float_t ecluster = ph->E();
3171 
3172  fhEPhoton ->Fill(ecluster , GetEventWeight());
3173  fhPtPhoton ->Fill(ptcluster, GetEventWeight());
3174 
3175  fhPhiPhoton ->Fill(ptcluster, phicluster, GetEventWeight());
3176  fhEtaPhoton ->Fill(ptcluster, etacluster, GetEventWeight());
3177 
3178  if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster, GetEventWeight());
3179  else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster, GetEventWeight());
3180 
3182  {
3183  fhPtCentralityPhoton ->Fill(ptcluster,cen, GetEventWeight()) ;
3184  fhPtEventPlanePhoton ->Fill(ptcluster,ep , GetEventWeight()) ;
3185  }
3186 
3187 // Comment this part, not needed but in case to know how to do it in the future
3188 // // Get original cluster, to recover some information
3189 // AliVCaloCells* cells = 0;
3190 // TObjArray * clusters = 0;
3191 // if(GetCalorimeter() == kEMCAL)
3192 // {
3193 // cells = GetEMCALCells();
3194 // clusters = GetEMCALClusters();
3195 // }
3196 // else
3197 // {
3198 // cells = GetPHOSCells();
3199 // clusters = GetPHOSClusters();
3200 // }
3201 //
3202 // Int_t iclus = -1;
3203 // AliVCluster *cluster = FindCluster(clusters,ph->GetCaloLabel(0),iclus);
3204 // if(cluster)
3205 
3206  //.......................................
3207  // Play with the MC data if available
3208  if(IsDataMC())
3209  {
3210  //....................................................................
3211  // Access MC information in stack if requested, check that it exists.
3212  Int_t label = ph->GetLabel();
3213 
3214  if(label < 0)
3215  {
3216  AliDebug(1,Form("*** bad label ***: label %d", label));
3217  continue;
3218  }
3219 
3220  Float_t eprim = 0;
3221  Float_t ptprim = 0;
3222  Bool_t ok = kFALSE;
3223  Int_t pdg = 0, status = 0, momLabel = -1;
3224 
3225  //fPrimaryMom = GetMCAnalysisUtils()->GetMother(label,GetReader(),ok);
3226  fPrimaryMom = GetMCAnalysisUtils()->GetMother(label,GetReader(), pdg, status, ok, momLabel);
3227 
3228  if(ok)
3229  {
3230  eprim = fPrimaryMom.Energy();
3231  ptprim = fPrimaryMom.Pt();
3232  }
3233 
3234  Int_t tag =ph->GetTag();
3235  Int_t mcParticleTag = -1;
3237  {
3238  fhMCE [kmcPhoton] ->Fill(ecluster , GetEventWeight());
3239  fhMCPt [kmcPhoton] ->Fill(ptcluster, GetEventWeight());
3240 
3241  fhMCPhi[kmcPhoton] ->Fill(ecluster,phicluster, GetEventWeight());
3242  fhMCEta[kmcPhoton] ->Fill(ecluster,etacluster, GetEventWeight());
3243 
3244  fhMC2E [kmcPhoton] ->Fill(ecluster , eprim , GetEventWeight());
3245  fhMC2Pt [kmcPhoton] ->Fill(ptcluster, ptprim, GetEventWeight());
3246 
3247  fhMCDeltaE [kmcPhoton] ->Fill(ecluster , eprim-ecluster , GetEventWeight());
3248  fhMCDeltaPt[kmcPhoton] ->Fill(ptcluster, ptprim-ptcluster, GetEventWeight());
3249 
3250  if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) &&
3252  {
3253  fhMCE [kmcConversion] ->Fill(ecluster , GetEventWeight());
3254  fhMCPt [kmcConversion] ->Fill(ptcluster, GetEventWeight());
3255 
3256  fhMCPhi[kmcConversion] ->Fill(ecluster, phicluster, GetEventWeight());
3257  fhMCEta[kmcConversion] ->Fill(ecluster, etacluster, GetEventWeight());
3258 
3259  fhMC2E [kmcConversion] ->Fill(ecluster , eprim , GetEventWeight());
3260  fhMC2Pt [kmcConversion] ->Fill(ptcluster, ptprim, GetEventWeight());
3261 
3262  fhMCDeltaE [kmcConversion] ->Fill(ecluster , eprim-ecluster , GetEventWeight());
3263  fhMCDeltaPt[kmcConversion] ->Fill(ptcluster, ptprim-ptcluster, GetEventWeight());
3264 
3265  Int_t pdgD = 0, statusD = 0, daugLabel = -1;
3266  Bool_t okD = kFALSE;
3267 
3268  //fMomentum =
3269  GetMCAnalysisUtils()->GetDaughter(0,momLabel,GetReader(),pdgD, statusD, okD, daugLabel, fProdVertex);
3270 
3271  if(okD)
3272  {
3273  Float_t prodR = TMath::Sqrt(fProdVertex.X()*fProdVertex.X()+fProdVertex.Y()*fProdVertex.Y());
3274 
3275  //printf("Conversion: mom pdg %d (stat %d), 1st daugher %d (stat %d), mom label %d, org label %d, daugh label %d, prodR %f\n",pdg,status, pdgD, statusD,
3276  // momLabel, label,daugLabel,prodR);
3277 
3278  fhMCConversionVertex->Fill(ptcluster,prodR,GetEventWeight());
3279 
3280  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 && ph->GetSModNumber() >= GetFirstSMCoveredByTRD() )
3281  fhMCConversionVertexTRD->Fill(ptcluster,prodR,GetEventWeight());
3282 
3283  if ( fFillSSHistograms )
3284  {
3285  Float_t m02 = ph->GetM02();
3286  Float_t m20 = 0;//ph->GetM20();
3287 
3288  // Change when possible
3289  Int_t iclus = -1;
3290  AliVCluster *cluster = FindCluster(GetEMCALClusters(),ph->GetCaloLabel(0),iclus);
3291  if(cluster) m20 = cluster->GetM20();
3292 
3293  Int_t convR = -1;
3294  if ( prodR < 75. ) convR = 0;
3295  else if ( prodR < 275. ) convR = 1;
3296  else if ( prodR < 375. ) convR = 2;
3297  else if ( prodR < 400. ) convR = 3;
3298  else if ( prodR < 430. ) convR = 4;
3299  else convR = 5;
3300 
3301  if ( convR >= 0 )
3302  {
3303  fhMCConversionLambda0Rcut[convR]->Fill(ptcluster,m02,GetEventWeight());
3304  fhMCConversionLambda1Rcut[convR]->Fill(ptcluster,m20,GetEventWeight());
3305 
3306  if ( GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 && ph->GetSModNumber() >= GetFirstSMCoveredByTRD() )
3307  {
3308  fhMCConversionLambda0RcutTRD[convR]->Fill(ptcluster,m02,GetEventWeight());
3309  fhMCConversionLambda1RcutTRD[convR]->Fill(ptcluster,m20,GetEventWeight());
3310  }
3311 // //
3312 // // EMCAL SM regions
3313 // //
3314 // if ( GetCalorimeter() == kEMCAL && fFillEMCALRegionSSHistograms )
3315 // {
3316 // // Get original cluster, needed to feed the subregion selection method
3317 //
3318 // Int_t iclus = -1;
3319 // AliVCluster *cluster = FindCluster(GetEMCALClusters(),ph->GetCaloLabel(0),iclus);
3320 //
3321 // Int_t etaRegion = -1, phiRegion = -1;
3322 //
3323 // if ( cluster ) GetCaloUtils()->GetEMCALSubregion(cluster,GetReader()->GetEMCALCells(),etaRegion,phiRegion);
3324 //
3325 // if( etaRegion >= 0 && etaRegion < 4 && phiRegion >=0 && phiRegion < 3 )
3326 // {
3327 // fhLam0EMCALRegionMCConvRcut[etaRegion][phiRegion][convR]->Fill(ptcluster,m02, GetEventWeight());
3328 //
3329 // if ( GetFirstSMCoveredByTRD() >= 0 && ph->GetSModNumber() >= GetFirstSMCoveredByTRD() )
3330 // fhLam0EMCALRegionTRDMCConvRcut[etaRegion][phiRegion][convR]->Fill(ptcluster, m02, GetEventWeight());
3331 //
3332 // } // region found
3333 // } // check region
3334  } // conv region
3335  } // fill Sh Sh histograms
3336  } // okD
3337  } // conversion
3338 
3339  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) )
3340  {
3341  mcParticleTag = kmcPrompt;
3342  }
3343  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) )
3344  {
3345  mcParticleTag = kmcFragmentation;
3346  }
3347  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) )
3348  {
3349  mcParticleTag = kmcISR;
3350  }
3351  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
3352  {
3353  mcParticleTag = kmcPi0;
3354  }
3355  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
3356  {
3357  mcParticleTag = kmcEta;
3358  }
3359  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) )
3360  {
3361  mcParticleTag = kmcPi0Decay;
3362  }
3363  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) )
3364  {
3365  mcParticleTag = kmcEtaDecay;
3366  }
3367  else
3368  {
3369  mcParticleTag = kmcOtherDecay;
3370  }
3371  }
3372  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) )
3373  {
3374  mcParticleTag = kmcAntiNeutron;
3375  }
3376  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) )
3377  {
3378  mcParticleTag = kmcAntiProton;
3379  }
3380  else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) )
3381  {
3382  mcParticleTag = kmcElectron;
3383  }
3384  else if( fhMCE[kmcOther] )
3385  {
3386  mcParticleTag = kmcOther;
3387 
3388  // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ",
3389  // ph->GetLabel(),ph->Pt());
3390  // for(Int_t i = 0; i < 20; i++) {
3391  // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i);
3392  // }
3393  // printf("\n");
3394  }
3395 
3396  if(mcParticleTag >= 0 && fhMCE[mcParticleTag])
3397  {
3398  fhMCE [mcParticleTag]->Fill(ecluster , GetEventWeight());
3399  fhMCPt [mcParticleTag]->Fill(ptcluster, GetEventWeight());
3400 
3401  fhMCPhi [mcParticleTag]->Fill(ecluster, phicluster, GetEventWeight());
3402  fhMCEta [mcParticleTag]->Fill(ecluster, etacluster, GetEventWeight());
3403 
3404  fhMC2E [mcParticleTag]->Fill(ecluster , eprim , GetEventWeight());
3405  fhMC2Pt [mcParticleTag]->Fill(ptcluster, ptprim, GetEventWeight());
3406 
3407  fhMCDeltaE [mcParticleTag]->Fill(ecluster , eprim-ecluster , GetEventWeight());
3408  fhMCDeltaPt[mcParticleTag]->Fill(ptcluster, ptprim-ptcluster, GetEventWeight());
3409  }
3410  }// Histograms with MC
3411  }// aod loop
3412 }
3413 
3414 //__________________________________________________
3416 //__________________________________________________
3417 void AliAnaPhoton::Print(const Option_t * opt) const
3418 {
3419  if(! opt)
3420  return;
3421 
3422  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
3424 
3425  printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
3426  printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
3427  printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
3428  printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
3429  printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch);
3430  printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax);
3431  printf("Number of cells in cluster is > %d \n", fNCellsCut);
3432  printf(" \n") ;
3433 }
Bool_t IsPileUpFromSPD() const
Bool_t fFillOnlySimpleSSHisto
Fill selected cluster histograms, selected SS histograms.
Definition: AliAnaPhoton.h:159
Float_t GetHistoPtMax() const
TH2F * fhLam1ETMTRD
! Cluster lambda1 vs E, SM covered by TRD, cut on Track Matching residual
Definition: AliAnaPhoton.h:211
TH1F * fhClusterCutsE[10]
! control histogram on the different photon selection cuts, E
Definition: AliAnaPhoton.h:172
TH2F * fhPhiLam0LowE
! Cluster phi vs lambda0, E<2
Definition: AliAnaPhoton.h:221
TH2F * fhNCellsLam1HighE
! number of cells in cluster vs lambda1, E>2
Definition: AliAnaPhoton.h:217
TH2F * fhLam1Lam0HighE
! Cluster lambda1 vs lambda0, E>2
Definition: AliAnaPhoton.h:227
Int_t pdg
TH2F * fhTrackMatchedDEtaTRD[2]
! Eta distance between track and cluster vs cluster E, after and before photon cuts, behind TRD
Definition: AliAnaPhoton.h:324
TH1F * fhMCPt[fgkNmcTypes]
! Number of identified photon vs cluster pT coming from MC particle
Definition: AliAnaPhoton.h:252
TH2F * fhTrackMatchedDEtaDPhiNeg[2]
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before photon cuts ...
Definition: AliAnaPhoton.h:322
Int_t fNCellsCut
Accept for the analysis clusters with more than fNCellsCut cells.
Definition: AliAnaPhoton.h:150
TH2F * fhEmbedPi0ELambda0FullBkg
! Lambda0 vs E for embedded photons with less than 10% of the cluster energy
Definition: AliAnaPhoton.h:308
TH2F * fhDispE
! Cluster dispersion vs E
Definition: AliAnaPhoton.h:193
TH2F * fhMCEta[fgkNmcTypes]
! eta of identified photon coming from MC particle
Definition: AliAnaPhoton.h:254
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Int_t fNLMCutMax
Remove clusters/cells with number of local maxima larger than this value.
Definition: AliAnaPhoton.h:153
TH2F * fhMCNCellsE[fgkNssTypes]
! NCells per cluster vs energy
Definition: AliAnaPhoton.h:285
TH2F * fhDTimeLam0BinPerSMWeighted[2][20]
! t_max-t_cell, not maximum cluster cell, in a l0 bin per SM, log weight Cell E / Cluster E ...
Definition: AliAnaPhoton.h:382
Int_t GetHistoNClusterCellMin() const
Float_t GetHistoPtMin() const
TH2F * fhDispEtaDispPhi[7]
! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
Definition: AliAnaPhoton.h:240
TH2F * fhLam1ETRD
! Cluster lambda1 vs E, SM covered by TRD
Definition: AliAnaPhoton.h:201
TH2F * fhEClusterSM
! Cluster E distribution per SM, before any selection, after reader
Definition: AliAnaPhoton.h:355
TH2F * fhMaxCellDiffClusterE
! Fraction of energy carried by cell with maximum energy
Definition: AliAnaPhoton.h:176
TH2F * fhPtClusterSM
! Cluster E distribution per SM, before any selection, after reader
Definition: AliAnaPhoton.h:357
TH2F * fhDispETRD
! Cluster dispersion vs E, SM covered by TRD
Definition: AliAnaPhoton.h:198
Int_t GetHistoShowerShapeBins() const
Float_t GetHistodEdxMax() const
virtual void AddToHistogramsName(TString add)
virtual AliVCaloCells * GetEMCALCells() const
TH2F * fhTrackMatchedDEtaDPhiPos[2]
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before ...
Definition: AliAnaPhoton.h:318
TH2F * fhMCPtLambda0[fgkNssTypes]
! pT vs Lambda0 from MC particle
Definition: AliAnaPhoton.h:271
TH2F * fhNCellsLam1LowE
! number of cells in cluster vs lambda1
Definition: AliAnaPhoton.h:214
Bool_t fFillTMHisto
Fill track matching plots.
Definition: AliAnaPhoton.h:145
TH2F * fhPtPhotonNPileUpSPDVtx
! photon pt vs number of spd pile-up vertices
Definition: AliAnaPhoton.h:348
TH2F * fhTimeLam0BinPerSMShared[2][12]
! Cell time, not maximum cluster cell, in a l0 bin per SM, shared SM
Definition: AliAnaPhoton.h:396
TH2F * fhPtPhotonNPileUpTrkVtx
! photon pt vs number of track pile-up vertices
Definition: AliAnaPhoton.h:349
TH2F * fhNCellsDispLowE
! number of cells in cluster vs dispersion
Definition: AliAnaPhoton.h:215
TH2F * fhTrackMatchedDEtaPos[2]
! Eta distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:316
TH2F * fhSphericityE
! shower sphericity in eta vs phi
Definition: AliAnaPhoton.h:237
TH2F * fhDispEtaE
! shower dispersion in eta direction
Definition: AliAnaPhoton.h:231
TH2F * fhPtPhotonNPileUpTrkVtxTimeCut
! photon pt vs number of track pile-up vertices, time cut +- 25 ns
Definition: AliAnaPhoton.h:351
virtual Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU, Int_t &icolAbs, Int_t &irowAbs) const
TH2F * fhEtaPrimMC[fgkNmcPrimTypes]
! Eta of generated photon
Definition: AliAnaPhoton.h:260
AliEMCALRecoUtils * GetEMCALRecoUtils() const
TH2F * fhPtPhotonSM
! photon-like cluster E distribution per SM
Definition: AliAnaPhoton.h:358
Bool_t ReadAODMCParticles() const
Bool_t fFillEMCALRegionSSHistograms
Fill shower shape histograms in EMCal slices.
Definition: AliAnaPhoton.h:157
virtual void GetVertex(Double_t vertex[3]) const
TH2F * fhTrackMatchedDPhiTRD[2]
! Phi distance between track and cluster vs cluster E, after and before photon cuts, behind TRD
Definition: AliAnaPhoton.h:325
Float_t fMinDist2
Cuts on Minimal distance to study acceptance evaluation.
Definition: AliAnaPhoton.h:140
TH1F * fhPtPhotonPileUp[7]
! pT distribution of selected photons
Definition: AliAnaPhoton.h:341
TH1F * fhPtPhoton
! Number of identified photon vs transerse momentum
Definition: AliAnaPhoton.h:181
Bool_t fRejectTrackMatch
If PID on, reject clusters which have an associated TPC track.
Definition: AliAnaPhoton.h:143
void MakeAnalysisFillAOD()
TH2F * fhColRowLam0BinPtBinSMShared[2][7]
! Cell hits, not maximum cluster cell, in a l0 bin, different Pt bins
Definition: AliAnaPhoton.h:399
TH2F * fhTrackMatchedDPhiMCNoOverlap[2]
! Phi distance between track and cluster vs cluster E, not other particle overlap, after and before photon cuts
Definition: AliAnaPhoton.h:330
TH2F * fhPtEventPlanePhoton
! event plane vs photon pT
Definition: AliAnaPhoton.h:188
virtual AliVEvent * GetInputEvent() const
TH2F * fhLam0PtTRD
! Cluster lambda0 vs pT, SM covered by TRD
Definition: AliAnaPhoton.h:200
TH2F * fhMCConversionVertex
! Conversion distance for photon clusters that have at least a contributor from the conversion...
Definition: AliAnaPhoton.h:360
TH2F * fhEmbedPi0ELambda0FullSignal
! Lambda0 vs E for embedded photons with more than 90% of the cluster energy
Definition: AliAnaPhoton.h:305
Bool_t IsPileUpFromSPDAndNotEMCal() const
Check if event is from pile-up determined by SPD and not by EMCal.
TH2F * fhEmbedPi0ELambda0MostlyBkg
! Lambda0 vs E for embedded photons with 50%<fraction<10%
Definition: AliAnaPhoton.h:307
TH2F * fhMCESphericity[fgkNssTypes]
! shower sphericity, eta vs phi
Definition: AliAnaPhoton.h:292
TH2F * fhEtaPhiLargeTimeInClusterCell[2][7]
! Cluster eta/phi, with at least one significant cell with large time
Definition: AliAnaPhoton.h:400
TH2F * fhMC2Pt[fgkNmcTypes]
! pT distribution, Reco vs MC coming from MC particle
Definition: AliAnaPhoton.h:249
TH2F * fhEtaPhiPhoton
! Pseudorapidity vs Phi of identified photon for E > 0.5
Definition: AliAnaPhoton.h:184
virtual Float_t GetZvertexCut() const
Maximal number of events for mixin.
TH2F * fhPhiPhoton
! Azimuthal angle of identified photon vs transerse momentum
Definition: AliAnaPhoton.h:182
virtual Double_t GetEventPlaneAngle() const
TH2F * fhYPrimMC[fgkNmcPrimTypes]
! Rapidity of generated photon
Definition: AliAnaPhoton.h:259
TH2F * fhTrackMatchedDEtaDPhi[2]
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV, after and before ...
Definition: AliAnaPhoton.h:314
void FillAcceptanceHistograms()
TH2F * fhSumEtaE
! shower dispersion in eta direction
Definition: AliAnaPhoton.h:233
virtual Bool_t IsTrackMatched(AliVCluster *cluster, AliVEvent *event)
TH2F * fhMCEDispEtaPhiDiff[fgkNssTypes]
! shower dispersion in eta -phi direction
Definition: AliAnaPhoton.h:291
TH2F * fhColRowLam0BinPtBin[2][7]
! Cell hits, not maximum cluster cell, in a l0 bin, different Pt bins
Definition: AliAnaPhoton.h:390
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH2F * fhCellClusterELam0BinPerSM[2][20]
! Cell E vs cluster pT, not maximum cluster cell, in a l0 bin per SM
Definition: AliAnaPhoton.h:385
Int_t GetHistoPhiBins() const
TH2F * fhEtaLam0LowE
! Cluster eta vs lambda0, E<2
Definition: AliAnaPhoton.h:220
TH2F * fhCellIndexDiffLargeTimeInClusterCell[2][7]
! Cell in cluster, row or column minus max row or colum, maximum difference vs cell energy...
Definition: AliAnaPhoton.h:401
TH2F * fhPtPhotonNPileUpSPDVtxTimeCut
! photon pt vs number of spd pile-up vertices, time cut +-25 ns
Definition: AliAnaPhoton.h:350
TH2F * fhMCConversionVertexTRD
! Conversion distance for photon clusters that have at least a contributor from the conversion...
Definition: AliAnaPhoton.h:361
Bool_t fFillSSHistograms
Fill shower shape histograms.
Definition: AliAnaPhoton.h:155
TH2F * fhdEdx[2]
! Matched track dEdx vs cluster E, after and before photon cuts
Definition: AliAnaPhoton.h:335
TH2F * fhLam0ETRD
! Cluster lambda0 vs E, SM covered by TRD
Definition: AliAnaPhoton.h:199
TH2F * fhDispETM
! Cluster dispersion vs E, cut on Track Matching residual
Definition: AliAnaPhoton.h:203
TH2F * fhEmbedPhotonELambda0FullSignal
! Lambda0 vs E for embedded photons with more than 90% of the cluster energy
Definition: AliAnaPhoton.h:300
Float_t GetHistoTrackResidualPhiMin() const
TH2F * fhEtaPhoton
! Pseudorapidity of identified photon vs transerse momentum
Definition: AliAnaPhoton.h:183
TH2F * fhDispSumEtaDiffE
! difference of 2 eta dispersions
Definition: AliAnaPhoton.h:238
void SwitchOnBayesian()
Definition: AliCaloPID.h:136
Bool_t IsPileUpFromNotSPDAndNotEMCal() const
Check if event not from pile-up determined neither by SPD nor by EMCal.
TH2F * fhTimePtPhotonSPD
! Time of photon cluster vs Pt, IsSPDPileUp
Definition: AliAnaPhoton.h:344
TH2F * fhMCDispEtaDispPhi[7][fgkNssTypes]
! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
Definition: AliAnaPhoton.h:293
Float_t GetHistoTrackResidualEtaMin() const
Int_t GetHistoNClusterCellBins() const
virtual TClonesArray * GetOutputAODBranch() const
TH2F * fhLam0EMCALRegionPerSM[4][3][20]
! Cluster lambda0 vs Pt, in different EMCal regions
Definition: AliAnaPhoton.h:372
virtual void GetVertex(Double_t v[3]) const
void InitParameters()
Initialize the parameters of the analysis.
Int_t GetHistoPOverEBins() const
TH2F * fhNCellsE
! number of cells in cluster vs E
Definition: AliAnaPhoton.h:174
TH1F * fhPtPrimMC[fgkNmcPrimTypes]
! Number of generated photon vs pT
Definition: AliAnaPhoton.h:257
Bool_t IsMCParticleInCalorimeterAcceptance(Int_t calo, TParticle *particle)
Float_t GetHistoPhiMin() const
TH2F * fhTimePt
! Time of photon cluster vs pt
Definition: AliAnaPhoton.h:177
TH2F * fhEtaPhi
! Pseudorapidity vs Phi of clusters for E > 0.5
Definition: AliAnaPhoton.h:178
TH2F * fhMCLambda0DispPhi[7][fgkNssTypes]
! shower shape correlation l0 vs disp phi
Definition: AliAnaPhoton.h:295
TH2F * fhLam0PerSMLargeTimeInClusterCell[20]
! Cluster lambda0 vs Pt, when any secondary cell has t > 50 ns, in different SM
Definition: AliAnaPhoton.h:405
TH2F * fhEPhotonSM
! photon-like cluster E distribution per SM
Definition: AliAnaPhoton.h:356
TH2F * fhEOverPTRD[2]
! Matched track E cluster over P track vs cluster E, after dEdx cut, after and before photon cuts...
Definition: AliAnaPhoton.h:337
TString GetPIDParametersList()
Put data member values in string to keep in output container.
Definition: AliCaloPID.cxx:891
TH2F * fhMCELambda0[fgkNssTypes]
! E vs Lambda0 from MC particle
Definition: AliAnaPhoton.h:270
TLorentzVector GetMother(Int_t label, const AliCaloTrackReader *reader, Bool_t &ok)
Bool_t IsPileUpFromSPDOrEMCal() const
Check if event is from pile-up determined by SPD or EMCal.
TH2F * fhTrackMatchedDPhiNeg[2]
! Phi distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:321
Bool_t IsPileUpFromEMCalAndNotSPD() const
Check if event is from pile-up determined by EMCal, not by SPD.
void MakeAnalysisFillHistograms()
TH2F * fhMCELambda1[fgkNssTypes]
! E vs Lambda1 from MC particle
Definition: AliAnaPhoton.h:272
TH2F * fhEtaPhiLam0BinPtBinSMShared[2][7]
! Cluster eta/phi in a l0 bin, different Pt bins, SM shared clusters
Definition: AliAnaPhoton.h:398
TH2F * fhLambda0DispPhi[7]
! shower shape correlation l0 vs disp phi
Definition: AliAnaPhoton.h:242
const Double_t etamin
TH2F * fhLambda0DispEta[7]
! shower shape correlation l0 vs disp eta
Definition: AliAnaPhoton.h:241
virtual AliVCaloCells * GetEMCALCells() const
Base class for CaloTrackCorr analysis algorithms.
virtual TString GetCalorimeterString() const
Int_t fNOriginHistograms
Fill only NOriginHistograms of the 14 defined types.
Definition: AliAnaPhoton.h:161
static const Int_t fgkNmcPrimTypes
Total number of MC primary histograms.
Definition: AliAnaPhoton.h:128
virtual Bool_t IsRealCaloAcceptanceOn() const
Float_t GetHistodEdxMin() const
virtual AliFiducialCut * GetFiducialCut()
void FillShowerShapeHistograms(AliVCluster *cluster, Int_t mcTag, Float_t maxCellEFraction)
Fill cluster Shower Shape histograms.
TH2F * fhTimePtPhotonNoCut
! Time of photon cluster vs Pt, no cut
Definition: AliAnaPhoton.h:343
TH2F * fhPtPhotonNPileUpSPDVtxTimeCut2
! photon pt vs number of spd pile-up vertices, time cut +-75 ns
Definition: AliAnaPhoton.h:352
TH2F * fhEOverP[2]
! Matched track E cluster over P track vs cluster E, after dEdx cut, after and before photon cuts ...
Definition: AliAnaPhoton.h:336
TH2F * fhTrackMatchedDEta[2]
! Eta distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:312
TH1F * fhEPrimMC[fgkNmcPrimTypes]
! Number of generated photon vs energy
Definition: AliAnaPhoton.h:256
virtual TClonesArray * GetAODMCParticles() const
virtual AliHistogramRanges * GetHistogramRanges()
TH2F * fhCellsE
! energy of cells in cluster vs E of cluster
Definition: AliAnaPhoton.h:175
Bool_t ReadStack() const
TH2F * fhDispETMTRD
! Cluster dispersion vs E, SM covered by TRD, cut on Track Matching residual
Definition: AliAnaPhoton.h:208
TH2F * fhPhiPrimMC[fgkNmcPrimTypes]
! Phi of generted photon
Definition: AliAnaPhoton.h:258
TH2F * fhLam1ETM
! Cluster lambda1 vs E, cut on Track Matching residual
Definition: AliAnaPhoton.h:206
Float_t GetHistoTrackResidualPhiMax() const
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:32
const Double_t ptmax
TH2F * fhLam1PerSM[20]
! Cluster lambda0 vs Pt, in different SM
Definition: AliAnaPhoton.h:404
TH2F * fhEtaPhi05Photon
! Pseudorapidity vs Phi of identified photon for E < 0.5
Definition: AliAnaPhoton.h:185
virtual AliEMCALGeometry * GetEMCALGeometry() const
TH2F * fhDispSumPhiDiffE
! difference of 2 phi dispersions
Definition: AliAnaPhoton.h:239
TH2F * fhLam0PerSMShared[12]
! Cluster lambda0 vs Pt, for shared clusters, EMCal
Definition: AliAnaPhoton.h:394
TH2F * fhNCellsLam0HighE
! number of cells in cluster vs lambda0, E>2
Definition: AliAnaPhoton.h:216
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
Int_t CheckOrigin(Int_t label, const AliCaloTrackReader *reader, Int_t calorimeter)
virtual AliAODEvent * GetOutputEvent() const
Float_t GetHistoShowerShapeMin() const
TList * GetCreateOutputObjects()
TH2F * fhMCLambda0DispEta[7][fgkNssTypes]
! shower shape correlation l0 vs disp eta
Definition: AliAnaPhoton.h:294
Int_t GetHistodEdxBins() const
TH2F * fhMCNCellsvsClusterMaxCellDiffE6[fgkNssTypes]
! NCells vs fraction of energy of max cell for E > 6
Definition: AliAnaPhoton.h:284
virtual AliCalorimeterUtils * GetCaloUtils() const
Int_t GetHistoNClusterCellMax() const
Int_t GetHistoTrackResidualEtaBins() const
TH2F * fhLam1PerSMLargeTimeInClusterCell[20]
! Cluster lambda1 vs Pt, when any secondary cell has t > 50 ns, in different SM
Definition: AliAnaPhoton.h:406
Float_t fMinDist3
One more cut on distance used for acceptance-efficiency study.
Definition: AliAnaPhoton.h:141
Int_t GetHistoTrackResidualPhiBins() const
TH2F * fhMCPhotonELambda0TwoOverlap
! E vs Lambda0 from MC photons, 2 particles overlap
Definition: AliAnaPhoton.h:276
Int_t GetNumberOfSuperModulesUsed() const
TH2F * fhMCConversionLambda1RcutTRD[6]
! Shower shape M20 of photon conversions, depending on conversion vertex, SM covered by TRD ...
Definition: AliAnaPhoton.h:365
const Double_t ptmin
virtual Bool_t IsHighMultiplicityAnalysisOn() const
TH2F * fhMCPhotonELambda0NOverlap
! E vs Lambda0 from MC photons, N particles overlap
Definition: AliAnaPhoton.h:277
TH1F * fhClusterCutsPt[10]
! control histogram on the different photon selection cuts, pT
Definition: AliAnaPhoton.h:173
Bool_t IsClusterSharedByTwoSuperModules(const AliEMCALGeometry *geom, AliVCluster *cluster)
Float_t fMinDist
Minimal distance to bad channel to accept cluster.
Definition: AliAnaPhoton.h:139
TH2F * fhTrackMatchedMCParticle[2]
! Trace origin of matched particle
Definition: AliAnaPhoton.h:334
TH2F * fhMCMaxCellDiffClusterE[fgkNssTypes]
! Fraction of energy carried by cell with maximum energy
Definition: AliAnaPhoton.h:286
TH2F * fhMC2E[fgkNmcTypes]
! E distribution, Reco vs MC coming from MC particle
Definition: AliAnaPhoton.h:248
TH2F * fhCellClusterEFracLam0BinPerSM[2][20]
! Cell E / Cluster E vs cluster pT, not maximum cluster cell, in a l0 bin per SM
Definition: AliAnaPhoton.h:383
TH2F * fhCellClusterEFracLam0BinPerSMWeighted[2][20]
! Cell E / Cluster E vs cluster pT, not maximum cluster cell, in a l0 bin per SM, log weight ...
Definition: AliAnaPhoton.h:384
TH2F * fhEmbedPhotonELambda0MostlySignal
! Lambda0 vs E for embedded photons with 90%<fraction<50%
Definition: AliAnaPhoton.h:301
virtual Double_t GetEventWeight() const
void SetPIDBits(AliVCluster *cluster, AliAODPWG4Particle *aodph, AliCalorimeterUtils *cu, AliVEvent *event)
Set Bits for PID selection.
Int_t fNPrimaryHistograms
Fill only NPrimaryHistograms of the 7 defined types.
Definition: AliAnaPhoton.h:162
void FillPileUpHistograms(AliVCluster *cluster, AliVCaloCells *cells, Int_t absIdMax)
Fill some histograms to understand effect of pile-up.
Int_t GetNumberOfLocalMaxima(AliVCluster *cluster, AliVCaloCells *cells)
Find the number of local maxima in cluster.
TH2F * fhMCNCellsvsClusterMaxCellDiffE2[fgkNssTypes]
! NCells vs fraction of energy of max cell for 2 < E < 6 GeV
Definition: AliAnaPhoton.h:283
TH2F * fhNCellsDispHighE
! number of cells in cluster vs dispersion, E>2
Definition: AliAnaPhoton.h:218
TH2F * fhEmbeddedSignalFractionEnergy
! Fraction of photon energy of embedded signal vs cluster energy
Definition: AliAnaPhoton.h:298
virtual TObjArray * GetPHOSClusters() const
Float_t GetHistoEtaMin() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH1F * fhEPhoton
! Number of identified photon vs energy
Definition: AliAnaPhoton.h:180
TH2F * fhTrackMatchedDEtaMCConversion[2]
! Eta distance between track and cluster vs cluster E, originated in conversion, after and before pho...
Definition: AliAnaPhoton.h:331
energy
TH2F * fhLam0ETMTRD
! Cluster lambda0 vs E, SM covered by TRD, cut on Track Matching residual
Definition: AliAnaPhoton.h:209
TH2F * fhLam0DispLowE
! Cluster lambda0 vs dispersion, E<2
Definition: AliAnaPhoton.h:224
virtual Int_t GetModuleNumber(AliAODPWG4Particle *part) const
Double_t fTimeCutMax
Remove clusters/cells with time larger than this value, in ns.
Definition: AliAnaPhoton.h:148
TH2F * fhTrackMatchedDPhiMCConversion[2]
! Phi distance between track and cluster vs cluster E, originated in conversion, after and before pho...
Definition: AliAnaPhoton.h:332
TH1F * fhMCE[fgkNmcTypes]
! Number of identified photon vs cluster energy coming from MC particle
Definition: AliAnaPhoton.h:251
TH2F * fhDispLam1LowE
! Cluster disp vs lambda1, E<2
Definition: AliAnaPhoton.h:228
TH2F * fhMCEDispEta[fgkNssTypes]
! shower dispersion in eta direction
Definition: AliAnaPhoton.h:288
TLorentzVector GetDaughter(Int_t daughter, Int_t label, const AliCaloTrackReader *reader, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &daugLabel, TVector3 &prodVertex)
Float_t GetHistoEtaMax() const
TH1F * fhPtPrimMCAcc[fgkNmcPrimTypes]
! Number of generated photon vs pT, in calorimeter acceptance
Definition: AliAnaPhoton.h:263
virtual void AddAODParticle(AliAODPWG4Particle part)
Float_t GetPHOSPtMin() const
TH2F * fhLam0E
! Cluster lambda0 vs E
Definition: AliAnaPhoton.h:194
TH2F * fhLam0PtTMTRD
! Cluster lambda0 vs pT, SM covered by TRD, cut on Track Matching residual
Definition: AliAnaPhoton.h:210
Int_t GetHistoPtBins() const
Double_t fTimeCutMin
Remove clusters/cells with time smaller than this value, in ns.
Definition: AliAnaPhoton.h:147
static const Int_t fgkNssTypes
Total number of MC histograms for shower shape studies.
Definition: AliAnaPhoton.h:135
TH2F * fhTimeLam0BinPerSMWeighted[2][20]
! Cell time, not maximum cluster cell, in a l0 bin per SM, log weight Cell E / Cluster E ...
Definition: AliAnaPhoton.h:380
Float_t GetEMCALPtMin() const
TH2F * fhMCDeltaE[fgkNmcTypes]
! MC-Reco E distribution coming from MC particle
Definition: AliAnaPhoton.h:246
TH2F * fhTrackMatchedDEtaNeg[2]
! Eta distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:320
TH2F * fhLam1EMCALRegionPerSM[4][3][20]
! Cluster lambda1 vs Pt, in different EMCal regions
Definition: AliAnaPhoton.h:373
TH2F * fhSumPhiE
! shower dispersion in phi direction
Definition: AliAnaPhoton.h:234
TH2F * fhEmbedPhotonELambda0FullBkg
! Lambda0 vs E for embedded photons with less than 10% of the cluster energy
Definition: AliAnaPhoton.h:303
TH2F * fhLam0ETM
! Cluster lambda0 vs E, cut on Track Matching residual
Definition: AliAnaPhoton.h:204
TH2F * fhMCEDispersion[fgkNssTypes]
! E vs Dispersion from MC particle
Definition: AliAnaPhoton.h:273
Int_t GetNOverlaps(const Int_t *label, UInt_t nlabels, Int_t mctag, Int_t mesonLabel, AliCaloTrackReader *reader, Int_t *overpdg)
TH2F * fhEtaLam0HighE
! Cluster eta vs lambda0, E>2
Definition: AliAnaPhoton.h:222
AliVTrack * GetMatchedTrack(AliVCluster *cluster, AliVEvent *event, Int_t index=-1) const
TH2F * fhLam1E
! Cluster lambda1 vs E
Definition: AliAnaPhoton.h:196
TH2F * fhPtPhotonNPileUpTrkVtxTimeCut2
! photon pt vs number of track pile-up vertices, time cut +- 75 ns
Definition: AliAnaPhoton.h:353
TH2F * fhDispEtaPhiDiffE
! shower dispersion eta - phi
Definition: AliAnaPhoton.h:236
TH2F * fhMCDeltaPt[fgkNmcTypes]
! MC-Reco pT distribution coming from MC particle
Definition: AliAnaPhoton.h:247
TH2F * fhDispPhiE
! shower dispersion in phi direction
Definition: AliAnaPhoton.h:232
TH2F * fhMCLambda0vsClusterMaxCellDiffE0[fgkNssTypes]
! Lambda0 vs fraction of energy of max cell for E < 2 GeV
Definition: AliAnaPhoton.h:279
Float_t GetHistoPOverEMax() const
TH2F * fhLam1PerSMSPDPileUp[20]
! Cluster lambda0 vs Pt, when event tagged as pile-up by SPD, in different SM
Definition: AliAnaPhoton.h:408
TH2F * fhYPrimMCAcc[fgkNmcPrimTypes]
! Rapidity of generated photon, in calorimeter acceptance
Definition: AliAnaPhoton.h:266
TH2F * fhPhiPrimMCAcc[fgkNmcPrimTypes]
! Phi of generted photon, in calorimeter acceptance
Definition: AliAnaPhoton.h:264
TH2F * fhNCellsLam0LowE
! number of cells in cluster vs lambda0
Definition: AliAnaPhoton.h:213
TH2F * fhMCPhotonELambda0NoOverlap
! E vs Lambda0 from MC photons, no overlap
Definition: AliAnaPhoton.h:275
const Double_t etamax
TH2F * fhColRowLam0BinPtBinWeighted[2][7]
! Cell hits, not maximum cluster cell, in a l0 bin, different Pt bins and log weight Cell E / Cluster...
Definition: AliAnaPhoton.h:391
virtual AliMCAnalysisUtils * GetMCAnalysisUtils()
TH2F * fhSumEtaPhiE
! shower dispersion in eta and phi direction
Definition: AliAnaPhoton.h:235
TH2F * fhLam0PerSM[20]
! Cluster lambda0 vs Pt, in different SM
Definition: AliAnaPhoton.h:403
void Init()
Init. Do some checks, abort if the cluster is not the expected PHOS or EMCal.
TH2F * fhMCPhi[fgkNmcTypes]
! Phi of identified photon coming from MC particle
Definition: AliAnaPhoton.h:253
TH2F * fhClusterTimeDiffPhotonPileUp[7]
! E vs Time difference inside cluster for selected photons
Definition: AliAnaPhoton.h:342
TLorentzVector fPrimaryMom
! Primary MC momentum, temporary container
Definition: AliAnaPhoton.h:165
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
Bool_t ClusterSelected(AliVCluster *cl, Int_t nlm)
TH2F * fhLam0PerSMSPDPileUp[20]
! Cluster lambda0 vs Pt, when event tagged as pile-up by SPD, in different SM
Definition: AliAnaPhoton.h:407
Int_t GetHistoTimeBins() const
Float_t GetHistoPOverEMin() const
TH1F * fhEPrimMCAcc[fgkNmcPrimTypes]
! Number of generated photon vs energy, in calorimeter acceptance
Definition: AliAnaPhoton.h:262
TH2F * fhTrackMatchedDEtaMCOverlap[2]
! Eta distance between track and cluster vs cluster E, several particle overlap, after and before pho...
Definition: AliAnaPhoton.h:327
TH2F * fhTimeNPileUpVertTrack
! Time of cluster vs n pile-up vertices from Tracks
Definition: AliAnaPhoton.h:346
Float_t GetHistoTimeMax() const
virtual Int_t GetDataType() const
TH2F * fhLam1PerSMShared[12]
! Cluster lambda1 vs Pt, for shared clusters, EMCal
Definition: AliAnaPhoton.h:395
Float_t GetHistoTimeMin() const
Float_t GetHistoShowerShapeMax() const
Bool_t IsPileUpFromEMCal() const
Check if event is from pile-up determined by EMCal.
virtual AliVCluster * FindCluster(TObjArray *clusters, Int_t clId, Int_t &iclus, Int_t first=0)
void FillTrackMatchingResidualHistograms(AliVCluster *calo, Int_t cut)
TH2F * fhTrackMatchedDPhi[2]
! Phi distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:313
TH2F * fhCellClusterELam0BinPerSMWeighted[2][20]
! Cell E vs cluster pT, not maximum cluster cell, in a l0 bin per SM, log weight Cell E / Cluster E ...
Definition: AliAnaPhoton.h:386
TH2F * fhDispLam1HighE
! Cluster disp vs lambda1, E>2
Definition: AliAnaPhoton.h:229
TH2F * fhPtCentralityPhoton
! centrality vs photon pT
Definition: AliAnaPhoton.h:187
const Int_t nbins
Float_t GetHistoPhiMax() const
TH2F * fhTrackMatchedDPhiMCOverlap[2]
! Phi distance between track and cluster vs cluster E, several particle overlap, after and before pho...
Definition: AliAnaPhoton.h:328
virtual AliCaloTrackReader * GetReader() const
Int_t GetHistoEtaBins() const
TH2F * fhMCLambda0vsClusterMaxCellDiffE6[fgkNssTypes]
! Lambda0 vs fraction of energy of max cell for E > 6 GeV
Definition: AliAnaPhoton.h:281
TH2F * fhTrackMatchedDPhiPos[2]
! Phi distance between track and cluster vs cluster E, after and before photon cuts ...
Definition: AliAnaPhoton.h:317
Float_t GetHistoTrackResidualEtaMax() const
TLorentzVector fMomentum
! Cluster momentum, temporary container
Definition: AliAnaPhoton.h:164
TH2F * fhLam0DispHighE
! Cluster lambda0 vs dispersion, E>2
Definition: AliAnaPhoton.h:225
TH2F * fhEtaPhiLam0BinPtBin[2][7]
! Cluster eta/phi in a l0 bin, different Pt bins
Definition: AliAnaPhoton.h:389
virtual TObjArray * GetEMCALClusters() const
TH2F * fhMCESumEtaPhi[fgkNssTypes]
! shower dispersion in eta vs phi direction
Definition: AliAnaPhoton.h:290
TH2F * fhTrackMatchedDEtaMCNoOverlap[2]
! Eta distance between track and cluster vs cluster E, not other particle overlap, after and before photon cuts
Definition: AliAnaPhoton.h:329
TH2F * fhLam0PtTM
! Cluster lambda0 vs pT, cut on Track Matching residual
Definition: AliAnaPhoton.h:205
TH2F * fhLam1Lam0BinPerSM[2][20]
! Cluster lambda1, in a l0 bin per SM
Definition: AliAnaPhoton.h:378
TH2F * fhLam0Pt
! Cluster lambda0 vs pT
Definition: AliAnaPhoton.h:195
virtual AliVCaloCells * GetPHOSCells() const
TH2F * fhTimeNPileUpVertSPD
! Time of cluster vs n pile-up vertices from SPD
Definition: AliAnaPhoton.h:345
TH2F * fhMCConversionLambda0RcutTRD[6]
! Shower shape M02 of photon conversions, depending on conversion vertex, SM covered by TRD ...
Definition: AliAnaPhoton.h:363
TH2F * fhEtaPrimMCAcc[fgkNmcPrimTypes]
! Phi of generted photon, in calorimeter acceptance
Definition: AliAnaPhoton.h:265
TH2F * fhNLocMax
! number of maxima in selected clusters
Definition: AliAnaPhoton.h:191
static const Int_t fgkNmcTypes
Total number of cluster MC origin histograms.
Definition: AliAnaPhoton.h:121
TH2F * fhEmbedPi0ELambda0MostlySignal
! Lambda0 vs E for embedded photons with 90%<fraction<50%
Definition: AliAnaPhoton.h:306
Bool_t CheckTagBit(Int_t tag, UInt_t test) const
Int_t GetMaxEnergyCell(AliVCaloCells *cells, AliVCluster *clu, Float_t &fraction) const
For a given CaloCluster, it gets the absId of the cell with maximum energy deposit.
Int_t nptbins
TH2F * fhPhiLam0HighE
! Cluster phi vs lambda0, E>2
Definition: AliAnaPhoton.h:223
TH2F * fhMCEDispPhi[fgkNssTypes]
! shower dispersion in phi direction
Definition: AliAnaPhoton.h:289
virtual AliMixedEvent * GetMixedEvent() const
TH2F * fhEmbedPhotonELambda0MostlyBkg
! Lambda0 vs E for embedded photons with 50%<fraction<10%
Definition: AliAnaPhoton.h:302
TVector3 fProdVertex
! Primary MC production vertex, temporary container
Definition: AliAnaPhoton.h:166
TH2F * fhDTimeLam0BinPerSM[2][20]
! t_max-t_cell, not maximum cluster cell, in a l0 bin per SM
Definition: AliAnaPhoton.h:381
TObjString * GetAnalysisCuts()
Save parameters used for analysis in a string.
TH2F * fhLam1Lam0LowE
! Cluster lambda1 vs lambda0, E<2
Definition: AliAnaPhoton.h:226
const Double_t phimin
TH2F * fhMCNCellsvsClusterMaxCellDiffE0[fgkNssTypes]
! NCells vs fraction of energy of max cell for E < 2
Definition: AliAnaPhoton.h:282
Bool_t IsPileUpFromSPDAndEMCal() const
Check if event is from pile-up determined by SPD and EMCal.
TH2F * fhMCConversionLambda0Rcut[6]
! Shower shape M02 of photon conversions, depending on conversion vertex.
Definition: AliAnaPhoton.h:362
TH2F * fhMCLambda0vsClusterMaxCellDiffE2[fgkNssTypes]
! Lambda0 vs fraction of energy of max cell for 2< E < 6 GeV
Definition: AliAnaPhoton.h:280
TH2F * fhMCConversionLambda1Rcut[6]
! Shower shape M20 of photon conversions, depending on conversion vertex.
Definition: AliAnaPhoton.h:364
Int_t GetFirstSMCoveredByTRD() const
Time cut in ns.
void GetEMCALSubregion(AliVCluster *clus, AliVCaloCells *cells, Int_t &regEta, Int_t &regPhi) const
TH2F * fhTimeLam0BinPerSM[2][20]
! Cell time, not maximum cluster cell, in a l0 bin per SM
Definition: AliAnaPhoton.h:379