]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrDep/AliAnaPhoton.cxx
Reintroduction of AliAnaElectron for Shower Shape studies
[u/mrichter/AliRoot.git] / PWG4 / PartCorrDep / AliAnaPhoton.cxx
CommitLineData
a3aebfff 1 /**************************************************************************
1c5acb87 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 *
cadbb0f3 9 * without fee, provided that the above copyright notice appears in all *
1c5acb87 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/* $Id: AliAnaPhoton.cxx 28688 2008-09-11 15:04:07Z gconesab $ */
16
17//_________________________________________________________________________
18//
19// Class for the photon identification.
20// Clusters from calorimeters are identified as photons
21// and kept in the AOD. Few histograms produced.
6175da48 22// Produces input for other analysis classes like AliAnaPi0,
23// AliAnaParticleHadronCorrelation ...
1c5acb87 24//
25// -- Author: Gustavo Conesa (LNF-INFN)
26//////////////////////////////////////////////////////////////////////////////
27
28
29// --- ROOT system ---
30#include <TH2F.h>
2244659d 31#include <TH3D.h>
477d6cee 32#include <TClonesArray.h>
0c1383b5 33#include <TObjString.h>
477d6cee 34//#include <Riostream.h>
123fc3bd 35#include "TParticle.h"
6175da48 36#include "TDatabasePDG.h"
1c5acb87 37
38// --- Analysis system ---
39#include "AliAnaPhoton.h"
40#include "AliCaloTrackReader.h"
123fc3bd 41#include "AliStack.h"
1c5acb87 42#include "AliCaloPID.h"
6639984f 43#include "AliMCAnalysisUtils.h"
ff45398a 44#include "AliFiducialCut.h"
0ae57829 45#include "AliVCluster.h"
591cc579 46#include "AliAODMCParticle.h"
c8fe2783 47#include "AliMixedEvent.h"
48
1c5acb87 49
50ClassImp(AliAnaPhoton)
51
52//____________________________________________________________________________
521636d2 53AliAnaPhoton::AliAnaPhoton() :
54 AliAnaPartCorrBaseClass(), fCalorimeter(""),
55 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
56 fRejectTrackMatch(0), fTimeCutMin(-1), fTimeCutMax(999999),
f66d95af 57 fNCellsCut(0), fFillSSHistograms(kFALSE),
58 fNOriginHistograms(8), fNPrimaryHistograms(4),
521636d2 59 fCheckConversion(kFALSE), fRemoveConvertedPair(kFALSE),
60 fAddConvertedPairsToAOD(kFALSE),
61 fMassCut(0), fConvAsymCut(1.), fConvDEtaCut(2.),
62 fConvDPhiMinCut(-1.), fConvDPhiMaxCut(7.),
63
c4a7d28a 64 // Histograms
f66d95af 65 fhNCellsE(0), fhMaxCellDiffClusterE(0),
66 fhEPhoton(0), fhPtPhoton(0),
521636d2 67 fhPhiPhoton(0), fhEtaPhoton(0),
68 fhEtaPhiPhoton(0), fhEtaPhi05Photon(0),
69
c4a7d28a 70 // Conversion histograms
521636d2 71 fhPtPhotonConv(0), fhEtaPhiPhotonConv(0), fhEtaPhi05PhotonConv(0),
72 fhConvDeltaEta(0), fhConvDeltaPhi(0), fhConvDeltaEtaPhi(0),
73 fhConvAsym(0), fhConvPt(0),
74 fhConvDistEta(0), fhConvDistEn(0), fhConvDistMass(0),
75 fhConvDistEtaCutEta(0), fhConvDistEnCutEta(0), fhConvDistMassCutEta(0),
76 fhConvDistEtaCutMass(0), fhConvDistEnCutMass(0),
77 fhConvDistEtaCutAsy(0), fhConvDistEnCutAsy(0),
78
4c8f7c2e 79 // Shower shape histograms
521636d2 80 fhDispE(0), fhLam0E(0), fhLam1E(0),
521636d2 81 fhDispETRD(0), fhLam0ETRD(0), fhLam1ETRD(0),
521636d2 82
83 fhNCellsLam0LowE(0), fhNCellsLam1LowE(0), fhNCellsDispLowE(0),
84 fhNCellsLam0HighE(0), fhNCellsLam1HighE(0), fhNCellsDispHighE(0),
521636d2 85
86 fhEtaLam0LowE(0), fhPhiLam0LowE(0),
87 fhEtaLam0HighE(0), fhPhiLam0HighE(0),
88 fhLam0DispLowE(0), fhLam0DispHighE(0),
89 fhLam1Lam0LowE(0), fhLam1Lam0HighE(0),
90 fhDispLam1LowE(0), fhDispLam1HighE(0),
521636d2 91
4c8f7c2e 92 // MC histograms
521636d2 93 // Conversion MC histograms
94 fhPtConversionTagged(0), fhPtAntiNeutronTagged(0),
95 fhPtAntiProtonTagged(0), fhPtUnknownTagged(0),
96 fhEtaPhiConversion(0), fhEtaPhi05Conversion(0),
97
98 fhConvDeltaEtaMCConversion(0), fhConvDeltaPhiMCConversion(0), fhConvDeltaEtaPhiMCConversion(0),
99 fhConvAsymMCConversion(0), fhConvPtMCConversion(0),
100 fhConvDispersionMCConversion(0), fhConvM02MCConversion(0),
101
102 fhConvDeltaEtaMCAntiNeutron(0), fhConvDeltaPhiMCAntiNeutron(0), fhConvDeltaEtaPhiMCAntiNeutron(0),
103 fhConvAsymMCAntiNeutron(0), fhConvPtMCAntiNeutron(0),
104 fhConvDispersionMCAntiNeutron(0), fhConvM02MCAntiNeutron(0),
105 fhConvDeltaEtaMCAntiProton(0), fhConvDeltaPhiMCAntiProton(0), fhConvDeltaEtaPhiMCAntiProton(0),
106 fhConvAsymMCAntiProton(0), fhConvPtMCAntiProton(0),
107 fhConvDispersionMCAntiProton(0), fhConvM02MCAntiProton(0),
108 fhConvDeltaEtaMCString(0), fhConvDeltaPhiMCString(0), fhConvDeltaEtaPhiMCString(0),
109 fhConvAsymMCString(0), fhConvPtMCString(0),
110 fhConvDispersionMCString(0), fhConvM02MCString(0),
3d5d5078 111 fhConvDistMCConversion(0), fhConvDistMCConversionCuts(0),
112
113 // Photon SS MC histograms
114 fhMCPhotonELambda0NoOverlap(0), fhMCPhotonELambda0TwoOverlap(0), fhMCPhotonELambda0NOverlap(0),
3d5d5078 115
116 //Embedding
7c65ad18 117 fhEmbeddedSignalFractionEnergy(0),
118 fhEmbedPhotonELambda0FullSignal(0), fhEmbedPhotonELambda0MostlySignal(0),
119 fhEmbedPhotonELambda0MostlyBkg(0), fhEmbedPhotonELambda0FullBkg(0),
120 fhEmbedPi0ELambda0FullSignal(0), fhEmbedPi0ELambda0MostlySignal(0),
121 fhEmbedPi0ELambda0MostlyBkg(0), fhEmbedPi0ELambda0FullBkg(0)
1c5acb87 122{
123 //default ctor
124
f66d95af 125 for(Int_t i = 0; i < 14; i++){
4c8f7c2e 126 fhMCPt [i] = 0;
127 fhMCE [i] = 0;
128 fhMCPhi [i] = 0;
129 fhMCEta [i] = 0;
130 fhMCDeltaE [i] = 0;
131 fhMCDeltaPt[i] = 0;
4c8f7c2e 132 fhMC2E [i] = 0;
133 fhMC2Pt [i] = 0;
134
521636d2 135 }
136
3d5d5078 137 for(Int_t i = 0; i < 7; i++){
138 fhPtPrimMC [i] = 0;
139 fhEPrimMC [i] = 0;
140 fhPhiPrimMC[i] = 0;
141 fhYPrimMC [i] = 0;
142
143 fhPtPrimMCAcc [i] = 0;
144 fhEPrimMCAcc [i] = 0;
145 fhPhiPrimMCAcc[i] = 0;
146 fhYPrimMCAcc [i] = 0;
147 }
148
149 for(Int_t i = 0; i < 6; i++){
f66d95af 150 fhMCELambda0 [i] = 0;
151 fhMCELambda1 [i] = 0;
152 fhMCEDispersion [i] = 0;
f66d95af 153 fhMCNCellsE [i] = 0;
154 fhMCMaxCellDiffClusterE[i] = 0;
155 fhMCLambda0vsClusterMaxCellDiffE0[i] = 0;
156 fhMCLambda0vsClusterMaxCellDiffE2[i] = 0;
157 fhMCLambda0vsClusterMaxCellDiffE6[i] = 0;
158 fhMCNCellsvsClusterMaxCellDiffE0 [i] = 0;
159 fhMCNCellsvsClusterMaxCellDiffE2 [i] = 0;
160 fhMCNCellsvsClusterMaxCellDiffE6 [i] = 0;
521636d2 161 }
162
1c5acb87 163 //Initialize parameters
164 InitParameters();
165
5ae09196 166}//____________________________________________________________________________
1c5acb87 167AliAnaPhoton::~AliAnaPhoton()
168{
169 //dtor
170
171}
172
c4a7d28a 173//__________________________________________________________________
174Bool_t AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom)
175{
176 //Select clusters if they pass different cuts
177 if(GetDebug() > 2)
178 printf("AliAnaPhoton::ClusterSelected() Current Event %d; Before selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
179 GetReader()->GetEventNumber(),
180 mom.E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
181
182 //.......................................
183 //If too small or big energy, skip it
184 if(mom.E() < GetMinEnergy() || mom.E() > GetMaxEnergy() ) return kFALSE ;
185 if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
186
187 //.......................................
188 // TOF cut, BE CAREFUL WITH THIS CUT
189 Double_t tof = calo->GetTOF()*1e9;
190 if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
191 if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID());
192
193 //.......................................
194 if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
195 if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID());
196
197 //.......................................
198 //Check acceptance selection
199 if(IsFiducialCutOn()){
200 Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ;
201 if(! in ) return kFALSE ;
202 }
203 if(GetDebug() > 2) printf("Fiducial cut passed \n");
204
205 //.......................................
206 //Skip matched clusters with tracks
207 if(fRejectTrackMatch){
208 if(IsTrackMatched(calo)) {
209 if(GetDebug() > 2) printf("\t Reject track-matched clusters\n");
210 return kFALSE ;
211 }
212 else
213 if(GetDebug() > 2) printf(" Track-matching cut passed \n");
214 }// reject matched clusters
215
216 //.......................................
217 //Check Distance to Bad channel, set bit.
218 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
219 if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
220 if(distBad < fMinDist) {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
221 return kFALSE ;
222 }
223 else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist);
224 //printf("Cluster %d Pass Bad Dist Cut \n",icalo);
225
226 if(GetDebug() > 0)
227 printf("AliAnaPhoton::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
228 GetReader()->GetEventNumber(),
229 mom.E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
230
231 //All checks passed, cluster selected
232 return kTRUE;
233
234}
235
3d5d5078 236//_____________________________________________________________
237void AliAnaPhoton::FillAcceptanceHistograms(){
238 //Fill acceptance histograms if MC data is available
239
240 if(GetReader()->ReadStack()){
241 AliStack * stack = GetMCStack();
242 if(stack){
243 for(Int_t i=0 ; i<stack->GetNtrack(); i++){
244 TParticle * prim = stack->Particle(i) ;
245 Int_t pdg = prim->GetPdgCode();
246 //printf("i %d, %s %d %s %d \n",i, stack->Particle(i)->GetName(), stack->Particle(i)->GetPdgCode(),
247 // prim->GetName(), prim->GetPdgCode());
248
249 if(pdg == 22){
250
251 // Get tag of this particle photon from fragmentation, decay, prompt ...
252 Int_t tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader(), 0);
253 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)){
254 //A conversion photon from a hadron, skip this kind of photon
255 // printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!: tag %d, conv %d, pi0 %d, hadron %d, electron %d, unk %d, muon %d,pion %d, proton %d, neutron %d, kaon %d, antiproton %d, antineutron %d\n",tag,
256 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion),
257 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0),
258 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOther),
259 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron),
260 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCUnknown),
261 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCMuon),
262 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPion),
263 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCProton),
264 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron),
265 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCKaon),
266 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton),
267 // GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron));
268
269 return;
270 }
271
272 //Get photon kinematics
273 if(prim->Energy() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
274
275 Double_t photonY = 0.5*TMath::Log((prim->Energy()-prim->Pz())/(prim->Energy()+prim->Pz())) ;
276 Double_t photonE = prim->Energy() ;
277 Double_t photonPt = prim->Pt() ;
278 Double_t photonPhi = TMath::RadToDeg()*prim->Phi() ;
279 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
280 Double_t photonEta = prim->Eta() ;
281
282
283 //Check if photons hit the Calorimeter
284 TLorentzVector lv;
285 prim->Momentum(lv);
286 Bool_t inacceptance = kFALSE;
287 if (fCalorimeter == "PHOS"){
288 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()){
289 Int_t mod ;
290 Double_t x,z ;
291 if(GetPHOSGeometry()->ImpactOnEmc(prim,mod,z,x))
292 inacceptance = kTRUE;
293 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
294 }
295 else{
296 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
297 inacceptance = kTRUE ;
298 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
299 }
300 }
301 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
302 if(GetEMCALGeometry()){
303
304 Int_t absID=0;
305
306 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
307
308 if( absID >= 0)
309 inacceptance = kTRUE;
310
311 // if(GetEMCALGeometry()->Impact(phot1) && GetEMCALGeometry()->Impact(phot2))
312 // inacceptance = kTRUE;
313 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
314 }
315 else{
316 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
317 inacceptance = kTRUE ;
318 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
319 }
320 } //In EMCAL
321
322 //Fill histograms
323
f66d95af 324 fhYPrimMC[mcPPhoton]->Fill(photonPt, photonY) ;
3d5d5078 325 if(TMath::Abs(photonY) < 1.0)
326 {
f66d95af 327 fhEPrimMC [mcPPhoton]->Fill(photonE ) ;
328 fhPtPrimMC [mcPPhoton]->Fill(photonPt) ;
329 fhPhiPrimMC[mcPPhoton]->Fill(photonE , photonPhi) ;
330 fhYPrimMC[mcPPhoton] ->Fill(photonE , photonEta) ;
3d5d5078 331 }
332 if(inacceptance){
f66d95af 333 fhEPrimMCAcc[mcPPhoton] ->Fill(photonE ) ;
334 fhPtPrimMCAcc[mcPPhoton] ->Fill(photonPt) ;
335 fhPhiPrimMCAcc[mcPPhoton]->Fill(photonE , photonPhi) ;
336 fhYPrimMCAcc[mcPPhoton] ->Fill(photonE , photonY) ;
3d5d5078 337 }//Accepted
338
339 //Origin of photon
f66d95af 340 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[mcPPrompt])
3d5d5078 341 {
f66d95af 342 fhYPrimMC[mcPPrompt]->Fill(photonPt, photonY) ;
3d5d5078 343 if(TMath::Abs(photonY) < 1.0){
f66d95af 344 fhEPrimMC [mcPPrompt]->Fill(photonE ) ;
345 fhPtPrimMC [mcPPrompt]->Fill(photonPt) ;
346 fhPhiPrimMC[mcPPrompt]->Fill(photonE , photonPhi) ;
347 fhYPrimMC[mcPPrompt] ->Fill(photonE , photonEta) ;
3d5d5078 348 }
349 if(inacceptance){
f66d95af 350 fhEPrimMCAcc[mcPPrompt] ->Fill(photonE ) ;
351 fhPtPrimMCAcc[mcPPrompt] ->Fill(photonPt) ;
352 fhPhiPrimMCAcc[mcPPrompt]->Fill(photonE , photonPhi) ;
353 fhYPrimMCAcc[mcPPrompt] ->Fill(photonE , photonY) ;
3d5d5078 354 }//Accepted
355 }
f66d95af 356 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[mcPFragmentation])
3d5d5078 357 {
f66d95af 358 fhYPrimMC[mcPFragmentation]->Fill(photonPt, photonY) ;
3d5d5078 359 if(TMath::Abs(photonY) < 1.0){
f66d95af 360 fhEPrimMC [mcPFragmentation]->Fill(photonE ) ;
361 fhPtPrimMC [mcPFragmentation]->Fill(photonPt) ;
362 fhPhiPrimMC[mcPFragmentation]->Fill(photonE , photonPhi) ;
363 fhYPrimMC[mcPFragmentation] ->Fill(photonE , photonEta) ;
3d5d5078 364 }
365 if(inacceptance){
f66d95af 366 fhEPrimMCAcc[mcPFragmentation] ->Fill(photonE ) ;
367 fhPtPrimMCAcc[mcPFragmentation] ->Fill(photonPt) ;
368 fhPhiPrimMCAcc[mcPFragmentation]->Fill(photonE , photonPhi) ;
369 fhYPrimMCAcc[mcPFragmentation] ->Fill(photonE , photonY) ;
3d5d5078 370 }//Accepted
371 }
f66d95af 372 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[mcPISR])
3d5d5078 373 {
f66d95af 374 fhYPrimMC[mcPISR]->Fill(photonPt, photonY) ;
3d5d5078 375 if(TMath::Abs(photonY) < 1.0){
f66d95af 376 fhEPrimMC [mcPISR]->Fill(photonE ) ;
377 fhPtPrimMC [mcPISR]->Fill(photonPt) ;
378 fhPhiPrimMC[mcPISR]->Fill(photonE , photonPhi) ;
379 fhYPrimMC[mcPISR]->Fill(photonE , photonEta) ;
3d5d5078 380 }
381 if(inacceptance){
f66d95af 382 fhEPrimMCAcc[mcPISR] ->Fill(photonE ) ;
383 fhPtPrimMCAcc[mcPISR] ->Fill(photonPt) ;
384 fhPhiPrimMCAcc[mcPISR]->Fill(photonE , photonPhi) ;
385 fhYPrimMCAcc[mcPISR] ->Fill(photonE , photonY) ;
3d5d5078 386 }//Accepted
387 }
f66d95af 388 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[mcPPi0Decay])
3d5d5078 389 {
f66d95af 390 fhYPrimMC[mcPPi0Decay]->Fill(photonPt, photonY) ;
3d5d5078 391 if(TMath::Abs(photonY) < 1.0){
f66d95af 392 fhEPrimMC [mcPPi0Decay]->Fill(photonE ) ;
393 fhPtPrimMC [mcPPi0Decay]->Fill(photonPt) ;
394 fhPhiPrimMC[mcPPi0Decay]->Fill(photonE , photonPhi) ;
395 fhYPrimMC[mcPPi0Decay] ->Fill(photonE , photonEta) ;
3d5d5078 396 }
397 if(inacceptance){
f66d95af 398 fhEPrimMCAcc[mcPPi0Decay] ->Fill(photonE ) ;
399 fhPtPrimMCAcc[mcPPi0Decay] ->Fill(photonPt) ;
400 fhPhiPrimMCAcc[mcPPi0Decay]->Fill(photonE , photonPhi) ;
401 fhYPrimMCAcc[mcPPi0Decay] ->Fill(photonE , photonY) ;
3d5d5078 402 }//Accepted
403 }
f586f4aa 404 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
405 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay)) && fhEPrimMC[mcPOtherDecay])
3d5d5078 406 {
f66d95af 407 fhYPrimMC[mcPOtherDecay]->Fill(photonPt, photonY) ;
3d5d5078 408 if(TMath::Abs(photonY) < 1.0){
f66d95af 409 fhEPrimMC [mcPOtherDecay]->Fill(photonE ) ;
410 fhPtPrimMC [mcPOtherDecay]->Fill(photonPt) ;
411 fhPhiPrimMC[mcPOtherDecay]->Fill(photonE , photonPhi) ;
412 fhYPrimMC[mcPOtherDecay] ->Fill(photonE , photonEta) ;
3d5d5078 413 }
414 if(inacceptance){
f66d95af 415 fhEPrimMCAcc[mcPOtherDecay] ->Fill(photonE ) ;
416 fhPtPrimMCAcc[mcPOtherDecay] ->Fill(photonPt) ;
417 fhPhiPrimMCAcc[mcPOtherDecay]->Fill(photonE , photonPhi) ;
418 fhYPrimMCAcc[mcPOtherDecay] ->Fill(photonE , photonY) ;
3d5d5078 419 }//Accepted
420 }
f66d95af 421 else if(fhEPrimMC[mcPOther])
3d5d5078 422 {
f66d95af 423 fhYPrimMC[mcPOther]->Fill(photonPt, photonY) ;
3d5d5078 424 if(TMath::Abs(photonY) < 1.0){
f66d95af 425 fhEPrimMC [mcPOther]->Fill(photonE ) ;
426 fhPtPrimMC [mcPOther]->Fill(photonPt) ;
427 fhPhiPrimMC[mcPOther]->Fill(photonE , photonPhi) ;
428 fhYPrimMC[mcPOther] ->Fill(photonE , photonEta) ;
3d5d5078 429 }
430 if(inacceptance){
f66d95af 431 fhEPrimMCAcc[mcPOther] ->Fill(photonE ) ;
432 fhPtPrimMCAcc[mcPOther] ->Fill(photonPt) ;
433 fhPhiPrimMCAcc[mcPOther]->Fill(photonE , photonPhi) ;
434 fhYPrimMCAcc[mcPOther] ->Fill(photonE , photonY) ;
3d5d5078 435 }//Accepted
436 }//Other origin
437 }// Primary photon
438 }//loop on primaries
439 }//stack exists and data is MC
440 }//read stack
441 else if(GetReader()->ReadAODMCParticles()){
442 TClonesArray * mcparticles = GetReader()->GetAODMCParticles(0);
443 if(mcparticles){
444 Int_t nprim = mcparticles->GetEntriesFast();
445
446 for(Int_t i=0; i < nprim; i++)
447 {
448 AliAODMCParticle * prim = (AliAODMCParticle *) mcparticles->At(i);
449
450 Int_t pdg = prim->GetPdgCode();
451
452 if(pdg == 22){
453
454 // Get tag of this particle photon from fragmentation, decay, prompt ...
455 Int_t tag = GetMCAnalysisUtils()->CheckOrigin(i,GetReader(), 0);
456 if(!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton)){
457 //A conversion photon from a hadron, skip this kind of photon
458// printf("AliAnaPhoton::FillAcceptanceHistograms() - not a photon, weird!: tag %d, conv %d, pi0 %d, hadron %d, electron %d, unk %d, muon %d,pion %d, proton %d, neutron %d, kaon %d, antiproton %d, antineutron %d\n",tag,
459// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion),
460// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0),
461// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOther),
462// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron),
463// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCUnknown),
464// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCMuon),
465// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPion),
466// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCProton),
467// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron),
468// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCKaon),
469// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton),
470// GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron));
471
472 return;
473 }
474
475 //Get photon kinematics
476 if(prim->E() == TMath::Abs(prim->Pz())) continue ; //Protection against floating point exception
477
478 Double_t photonY = 0.5*TMath::Log((prim->E()-prim->Pz())/(prim->E()+prim->Pz())) ;
479 Double_t photonE = prim->E() ;
480 Double_t photonPt = prim->Pt() ;
481 Double_t photonPhi = TMath::RadToDeg()*prim->Phi() ;
482 if(photonPhi < 0) photonPhi+=TMath::TwoPi();
483 Double_t photonEta = prim->Eta() ;
484
485 //Check if photons hit the Calorimeter
486 TLorentzVector lv;
487 lv.SetPxPyPzE(prim->Px(),prim->Py(),prim->Pz(),prim->E());
488 Bool_t inacceptance = kFALSE;
489 if (fCalorimeter == "PHOS"){
490 if(GetPHOSGeometry() && GetCaloUtils()->IsPHOSGeoMatrixSet()){
491 Int_t mod ;
492 Double_t x,z ;
493 Double_t vtx[]={prim->Xv(),prim->Yv(),prim->Zv()};
494 if(GetPHOSGeometry()->ImpactOnEmc(vtx, prim->Theta(),prim->Phi(),mod,z,x))
495 inacceptance = kTRUE;
496 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
497 }
498 else{
499 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
500 inacceptance = kTRUE ;
501 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
502 }
503 }
504 else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
505 if(GetEMCALGeometry()){
506
507 Int_t absID=0;
508
509 GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(prim->Eta(),prim->Phi(),absID);
510
511 if( absID >= 0)
512 inacceptance = kTRUE;
513
514 if(GetDebug() > 2) printf("In %s Real acceptance? %d\n",fCalorimeter.Data(),inacceptance);
515 }
516 else{
517 if(GetFiducialCut()->IsInFiducialCut(lv,fCalorimeter))
518 inacceptance = kTRUE ;
519 if(GetDebug() > 2) printf("In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),inacceptance);
520 }
521 } //In EMCAL
522
523 //Fill histograms
524
f66d95af 525 fhYPrimMC[mcPPhoton]->Fill(photonPt, photonY) ;
3d5d5078 526 if(TMath::Abs(photonY) < 1.0)
527 {
f66d95af 528 fhEPrimMC [mcPPhoton]->Fill(photonE ) ;
529 fhPtPrimMC [mcPPhoton]->Fill(photonPt) ;
530 fhPhiPrimMC[mcPPhoton]->Fill(photonE , photonPhi) ;
531 fhYPrimMC[mcPPhoton]->Fill(photonE , photonEta) ;
3d5d5078 532 }
533 if(inacceptance){
f66d95af 534 fhEPrimMCAcc[mcPPhoton] ->Fill(photonE ) ;
535 fhPtPrimMCAcc[mcPPhoton] ->Fill(photonPt) ;
536 fhPhiPrimMCAcc[mcPPhoton]->Fill(photonE , photonPhi) ;
537 fhYPrimMCAcc[mcPPhoton] ->Fill(photonE , photonY) ;
3d5d5078 538 }//Accepted
539
540
541 //Origin of photon
f66d95af 542 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhEPrimMC[mcPPrompt])
3d5d5078 543 {
f66d95af 544 fhYPrimMC[mcPPrompt]->Fill(photonPt, photonY) ;
3d5d5078 545 if(TMath::Abs(photonY) < 1.0){
f66d95af 546 fhEPrimMC [mcPPrompt]->Fill(photonE ) ;
547 fhPtPrimMC [mcPPrompt]->Fill(photonPt) ;
548 fhPhiPrimMC[mcPPrompt]->Fill(photonE , photonPhi) ;
549 fhYPrimMC[mcPPrompt]->Fill(photonE , photonEta) ;
3d5d5078 550 }
551 if(inacceptance){
f66d95af 552 fhEPrimMCAcc[mcPPrompt] ->Fill(photonE ) ;
553 fhPtPrimMCAcc[mcPPrompt] ->Fill(photonPt) ;
554 fhPhiPrimMCAcc[mcPPrompt]->Fill(photonE , photonPhi) ;
555 fhYPrimMCAcc[mcPPrompt] ->Fill(photonE , photonY) ;
3d5d5078 556 }//Accepted
557 }
f66d95af 558 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation) && fhEPrimMC[mcPFragmentation] )
3d5d5078 559 {
f66d95af 560 fhYPrimMC[mcPFragmentation]->Fill(photonPt, photonY) ;
3d5d5078 561 if(TMath::Abs(photonY) < 1.0){
f66d95af 562 fhEPrimMC [mcPFragmentation]->Fill(photonE ) ;
563 fhPtPrimMC [mcPFragmentation]->Fill(photonPt) ;
564 fhPhiPrimMC[mcPFragmentation]->Fill(photonE , photonPhi) ;
565 fhYPrimMC[mcPFragmentation]->Fill(photonE , photonEta) ;
3d5d5078 566 }
567 if(inacceptance){
f66d95af 568 fhEPrimMCAcc[mcPFragmentation] ->Fill(photonE ) ;
569 fhPtPrimMCAcc[mcPFragmentation] ->Fill(photonPt) ;
570 fhPhiPrimMCAcc[mcPFragmentation]->Fill(photonE , photonPhi) ;
571 fhYPrimMCAcc[mcPFragmentation] ->Fill(photonE , photonY) ;
3d5d5078 572 }//Accepted
573 }
f66d95af 574 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR) && fhEPrimMC[mcPISR])
3d5d5078 575 {
f66d95af 576 fhYPrimMC[mcPISR]->Fill(photonPt, photonY) ;
3d5d5078 577 if(TMath::Abs(photonY) < 1.0){
f66d95af 578 fhEPrimMC [mcPISR]->Fill(photonE ) ;
579 fhPtPrimMC [mcPISR]->Fill(photonPt) ;
580 fhPhiPrimMC[mcPISR]->Fill(photonE , photonPhi) ;
581 fhYPrimMC[mcPISR]->Fill(photonE , photonEta) ;
3d5d5078 582 }
583 if(inacceptance){
f66d95af 584 fhEPrimMCAcc[mcPISR] ->Fill(photonE ) ;
585 fhPtPrimMCAcc[mcPISR] ->Fill(photonPt) ;
586 fhPhiPrimMCAcc[mcPISR]->Fill(photonE , photonPhi) ;
587 fhYPrimMCAcc[mcPISR] ->Fill(photonE , photonY) ;
3d5d5078 588 }//Accepted
589 }
f66d95af 590 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay)&& fhEPrimMC[mcPPi0Decay])
3d5d5078 591 {
f66d95af 592 fhYPrimMC[mcPPi0Decay]->Fill(photonPt, photonY) ;
3d5d5078 593 if(TMath::Abs(photonY) < 1.0){
f66d95af 594 fhEPrimMC [mcPPi0Decay]->Fill(photonE ) ;
595 fhPtPrimMC [mcPPi0Decay]->Fill(photonPt) ;
596 fhPhiPrimMC[mcPPi0Decay]->Fill(photonE , photonPhi) ;
597 fhYPrimMC[mcPPi0Decay]->Fill(photonE , photonEta) ;
3d5d5078 598 }
599 if(inacceptance){
f66d95af 600 fhEPrimMCAcc[mcPPi0Decay] ->Fill(photonE ) ;
601 fhPtPrimMCAcc[mcPPi0Decay] ->Fill(photonPt) ;
602 fhPhiPrimMCAcc[mcPPi0Decay]->Fill(photonE , photonPhi) ;
603 fhYPrimMCAcc[mcPPi0Decay] ->Fill(photonE , photonY) ;
3d5d5078 604 }//Accepted
605 }
f586f4aa 606 else if((GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
607 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) ) && fhEPrimMC[mcPOtherDecay])
3d5d5078 608 {
f66d95af 609 fhYPrimMC[mcPOtherDecay]->Fill(photonPt, photonY) ;
3d5d5078 610 if(TMath::Abs(photonY) < 1.0){
f66d95af 611 fhEPrimMC [mcPOtherDecay]->Fill(photonE ) ;
612 fhPtPrimMC [mcPOtherDecay]->Fill(photonPt) ;
613 fhPhiPrimMC[mcPOtherDecay]->Fill(photonE , photonPhi) ;
614 fhYPrimMC[mcPOtherDecay]->Fill(photonE , photonEta) ;
3d5d5078 615 }
616 if(inacceptance){
f66d95af 617 fhEPrimMCAcc[mcPOtherDecay] ->Fill(photonE ) ;
618 fhPtPrimMCAcc[mcPOtherDecay] ->Fill(photonPt) ;
619 fhPhiPrimMCAcc[mcPOtherDecay]->Fill(photonE , photonPhi) ;
620 fhYPrimMCAcc[mcPOtherDecay] ->Fill(photonE , photonY) ;
3d5d5078 621 }//Accepted
622 }
f66d95af 623 else if(fhEPrimMC[mcPOther])
3d5d5078 624 {
f66d95af 625 fhYPrimMC[mcPOther]->Fill(photonPt, photonY) ;
3d5d5078 626 if(TMath::Abs(photonY) < 1.0){
f66d95af 627 fhEPrimMC [mcPOther]->Fill(photonE ) ;
628 fhPtPrimMC [mcPOther]->Fill(photonPt) ;
629 fhPhiPrimMC[mcPOther]->Fill(photonE , photonPhi) ;
630 fhYPrimMC[mcPOther]->Fill(photonE , photonEta) ;
3d5d5078 631 }
632 if(inacceptance){
f66d95af 633 fhEPrimMCAcc[mcPOther] ->Fill(photonE ) ;
634 fhPtPrimMCAcc[mcPOther] ->Fill(photonPt) ;
635 fhPhiPrimMCAcc[mcPOther]->Fill(photonE , photonPhi) ;
636 fhYPrimMCAcc[mcPOther] ->Fill(photonE , photonY) ;
3d5d5078 637 }//Accepted
638 }//Other origin
639 }// Primary photon
640 }//loop on primaries
641
642 }//mc array exists and data is MC
643 } // read AOD MC
644}
521636d2 645
646//__________________________________________________________________
647void AliAnaPhoton::FillShowerShapeHistograms(AliVCluster* cluster, const Int_t mcTag){
648
649 //Fill cluster Shower Shape histograms
650
651 if(!fFillSSHistograms || GetMixedEvent()) return;
652
653 Float_t energy = cluster->E();
654 Int_t ncells = cluster->GetNCells();
521636d2 655 Float_t lambda0 = cluster->GetM02();
656 Float_t lambda1 = cluster->GetM20();
657 Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
658
659 TLorentzVector mom;
660 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC){
661 cluster->GetMomentum(mom,GetVertex(0)) ;}//Assume that come from vertex in straight line
662 else{
663 Double_t vertex[]={0,0,0};
664 cluster->GetMomentum(mom,vertex) ;
665 }
666
667 Float_t eta = mom.Eta();
668 Float_t phi = mom.Phi();
669 if(phi < 0) phi+=TMath::TwoPi();
670
671 fhLam0E ->Fill(energy,lambda0);
672 fhLam1E ->Fill(energy,lambda1);
673 fhDispE ->Fill(energy,disp);
521636d2 674
675 if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5){
676 fhLam0ETRD->Fill(energy,lambda0);
677 fhLam1ETRD->Fill(energy,lambda1);
678 fhDispETRD->Fill(energy,disp);
521636d2 679 }
680
681 if(energy < 2){
682 fhNCellsLam0LowE ->Fill(ncells,lambda0);
683 fhNCellsLam1LowE ->Fill(ncells,lambda1);
684 fhNCellsDispLowE ->Fill(ncells,disp);
521636d2 685
686 fhLam1Lam0LowE ->Fill(lambda1,lambda0);
687 fhLam0DispLowE ->Fill(lambda0,disp);
688 fhDispLam1LowE ->Fill(disp,lambda1);
689 fhEtaLam0LowE ->Fill(eta,lambda0);
690 fhPhiLam0LowE ->Fill(phi,lambda0);
691
521636d2 692 }
693 else {
694 fhNCellsLam0HighE ->Fill(ncells,lambda0);
695 fhNCellsLam1HighE ->Fill(ncells,lambda1);
696 fhNCellsDispHighE ->Fill(ncells,disp);
7c65ad18 697
521636d2 698 fhLam1Lam0HighE ->Fill(lambda1,lambda0);
699 fhLam0DispHighE ->Fill(lambda0,disp);
700 fhDispLam1HighE ->Fill(disp,lambda1);
701 fhEtaLam0HighE ->Fill(eta, lambda0);
702 fhPhiLam0HighE ->Fill(phi, lambda0);
521636d2 703 }
704
705 if(IsDataMC()){
3d5d5078 706
f66d95af 707 AliVCaloCells* cells = 0;
708 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
709 else cells = GetPHOSCells();
3d5d5078 710
711 //Fill histograms to check shape of embedded clusters
712 Float_t fraction = 0;
f66d95af 713 if(GetReader()->IsEmbeddedClusterSelectionOn()){//Only working for EMCAL
714
3d5d5078 715 Float_t clusterE = 0; // recalculate in case corrections applied.
716 Float_t cellE = 0;
717 for(Int_t icell = 0; icell < cluster->GetNCells(); icell++){
718 cellE = cells->GetCellAmplitude(cluster->GetCellAbsId(icell));
719 clusterE+=cellE;
720 fraction+=cellE*cluster->GetCellAmplitudeFraction(icell);
721 }
722
723 //Fraction of total energy due to the embedded signal
724 fraction/=clusterE;
725
726 if(GetDebug() > 1 ) printf("AliAnaPhoton::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE);
727
728 fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction);
729
730 } // embedded fraction
731
f66d95af 732 // Get the fraction of the cluster energy that carries the cell with highest energy
733 Int_t absID =-1 ;
734 Float_t maxCellFraction = 0.;
735
736 absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction);
737
738 // Check the origin and fill histograms
521636d2 739 if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
3d5d5078 740 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
741 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
742 !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta)){
743 fhMCELambda0[mcssPhoton] ->Fill(energy, lambda0);
3d5d5078 744 fhMCELambda1[mcssPhoton] ->Fill(energy, lambda1);
3d5d5078 745 fhMCEDispersion[mcssPhoton] ->Fill(energy, disp);
f66d95af 746 fhMCNCellsE[mcssPhoton] ->Fill(energy, ncells);
747 fhMCMaxCellDiffClusterE[mcssPhoton]->Fill(energy,maxCellFraction);
3d5d5078 748
f66d95af 749 if (energy < 2.){
750 fhMCLambda0vsClusterMaxCellDiffE0[mcssPhoton]->Fill(lambda0, maxCellFraction);
751 fhMCNCellsvsClusterMaxCellDiffE0[mcssPhoton] ->Fill(ncells, maxCellFraction);
752 }
753 else if(energy < 6.){
754 fhMCLambda0vsClusterMaxCellDiffE2[mcssPhoton]->Fill(lambda0, maxCellFraction);
755 fhMCNCellsvsClusterMaxCellDiffE2[mcssPhoton] ->Fill(ncells, maxCellFraction);
756 }
757 else{
758 fhMCLambda0vsClusterMaxCellDiffE6[mcssPhoton]->Fill(lambda0, maxCellFraction);
759 fhMCNCellsvsClusterMaxCellDiffE6[mcssPhoton] ->Fill(ncells, maxCellFraction);
760 }
3d5d5078 761
762 if(!GetReader()->IsEmbeddedClusterSelectionOn()){
763 //Check particle overlaps in cluster
764
765 //Compare the primary depositing more energy with the rest, if no photon/electron as comon ancestor (conversions), count as other particle
766 Int_t ancPDG = 0, ancStatus = -1;
767 TLorentzVector momentum; TVector3 prodVertex;
768 Int_t ancLabel = 0;
769 Int_t noverlaps = 1;
770 for (UInt_t ilab = 0; ilab < cluster->GetNLabels(); ilab++ ) {
771 ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster->GetLabels()[0],cluster->GetLabels()[ilab], GetReader(),ancPDG,ancStatus,momentum,prodVertex);
772 if(ancPDG!=22 && TMath::Abs(ancPDG)!=11) noverlaps++;
773 }
774
775 if(noverlaps == 1){
776 fhMCPhotonELambda0NoOverlap ->Fill(energy, lambda0);
3d5d5078 777 }
778 else if(noverlaps == 2){
779 fhMCPhotonELambda0TwoOverlap ->Fill(energy, lambda0);
3d5d5078 780 }
781 else if(noverlaps > 2){
782 fhMCPhotonELambda0NOverlap ->Fill(energy, lambda0);
3d5d5078 783 }
784 else {
785 printf("AliAnaPhoton::FillShowerShapeHistogram() - n overlaps = %d!!", noverlaps);
786 }
787 }//No embedding
788
789 //Fill histograms to check shape of embedded clusters
790 if(GetReader()->IsEmbeddedClusterSelectionOn()){
791
792 if (fraction > 0.9)
793 {
794 fhEmbedPhotonELambda0FullSignal ->Fill(energy, lambda0);
3d5d5078 795 }
796 else if(fraction > 0.5)
797 {
798 fhEmbedPhotonELambda0MostlySignal ->Fill(energy, lambda0);
3d5d5078 799 }
800 else if(fraction > 0.1)
801 {
802 fhEmbedPhotonELambda0MostlyBkg ->Fill(energy, lambda0);
3d5d5078 803 }
804 else
805 {
806 fhEmbedPhotonELambda0FullBkg ->Fill(energy, lambda0);
3d5d5078 807 }
808 } // embedded
809
521636d2 810 }//photon no conversion
811 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron)){
3d5d5078 812 fhMCELambda0[mcssElectron] ->Fill(energy, lambda0);
3d5d5078 813 fhMCELambda1[mcssElectron] ->Fill(energy, lambda1);
3d5d5078 814 fhMCEDispersion[mcssElectron] ->Fill(energy, disp);
f66d95af 815 fhMCNCellsE[mcssElectron] ->Fill(energy, ncells);
816 fhMCMaxCellDiffClusterE[mcssElectron]->Fill(energy,maxCellFraction);
817
818 if (energy < 2.){
819 fhMCLambda0vsClusterMaxCellDiffE0[mcssElectron]->Fill(lambda0, maxCellFraction);
820 fhMCNCellsvsClusterMaxCellDiffE0[mcssElectron] ->Fill(ncells, maxCellFraction);
821 }
822 else if(energy < 6.){
823 fhMCLambda0vsClusterMaxCellDiffE2[mcssElectron]->Fill(lambda0, maxCellFraction);
824 fhMCNCellsvsClusterMaxCellDiffE2[mcssElectron] ->Fill(ncells, maxCellFraction);
825 }
826 else{
827 fhMCLambda0vsClusterMaxCellDiffE6[mcssElectron]->Fill(lambda0, maxCellFraction);
828 fhMCNCellsvsClusterMaxCellDiffE6[mcssElectron] ->Fill(ncells, maxCellFraction);
829 }
521636d2 830 }//electron
3d5d5078 831 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
521636d2 832 GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) ){
3d5d5078 833 fhMCELambda0[mcssConversion] ->Fill(energy, lambda0);
3d5d5078 834 fhMCELambda1[mcssConversion] ->Fill(energy, lambda1);
3d5d5078 835 fhMCEDispersion[mcssConversion] ->Fill(energy, disp);
f66d95af 836 fhMCNCellsE[mcssConversion] ->Fill(energy, ncells);
837 fhMCMaxCellDiffClusterE[mcssConversion]->Fill(energy,maxCellFraction);
838
839 if (energy < 2.){
840 fhMCLambda0vsClusterMaxCellDiffE0[mcssConversion]->Fill(lambda0, maxCellFraction);
841 fhMCNCellsvsClusterMaxCellDiffE0[mcssConversion] ->Fill(ncells, maxCellFraction);
842 }
843 else if(energy < 6.){
844 fhMCLambda0vsClusterMaxCellDiffE2[mcssConversion]->Fill(lambda0, maxCellFraction);
845 fhMCNCellsvsClusterMaxCellDiffE2[mcssConversion] ->Fill(ncells, maxCellFraction);
846 }
847 else{
848 fhMCLambda0vsClusterMaxCellDiffE6[mcssConversion]->Fill(lambda0, maxCellFraction);
849 fhMCNCellsvsClusterMaxCellDiffE6[mcssConversion] ->Fill(ncells, maxCellFraction);
850 }
3d5d5078 851
521636d2 852 }//conversion photon
853 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ){
3d5d5078 854 fhMCELambda0[mcssPi0] ->Fill(energy, lambda0);
3d5d5078 855 fhMCELambda1[mcssPi0] ->Fill(energy, lambda1);
3d5d5078 856 fhMCEDispersion[mcssPi0] ->Fill(energy, disp);
f66d95af 857 fhMCNCellsE[mcssPi0] ->Fill(energy, ncells);
858 fhMCMaxCellDiffClusterE[mcssPi0]->Fill(energy,maxCellFraction);
859
860 if (energy < 2.){
861 fhMCLambda0vsClusterMaxCellDiffE0[mcssPi0]->Fill(lambda0, maxCellFraction);
862 fhMCNCellsvsClusterMaxCellDiffE0[mcssPi0] ->Fill(ncells, maxCellFraction);
863 }
864 else if(energy < 6.){
865 fhMCLambda0vsClusterMaxCellDiffE2[mcssPi0]->Fill(lambda0, maxCellFraction);
866 fhMCNCellsvsClusterMaxCellDiffE2[mcssPi0] ->Fill(ncells, maxCellFraction);
867 }
868 else{
869 fhMCLambda0vsClusterMaxCellDiffE6[mcssPi0]->Fill(lambda0, maxCellFraction);
870 fhMCNCellsvsClusterMaxCellDiffE6[mcssPi0] ->Fill(ncells, maxCellFraction);
871 }
3d5d5078 872
873 //Fill histograms to check shape of embedded clusters
874 if(GetReader()->IsEmbeddedClusterSelectionOn()){
875
876 if (fraction > 0.9)
877 {
878 fhEmbedPi0ELambda0FullSignal ->Fill(energy, lambda0);
3d5d5078 879 }
880 else if(fraction > 0.5)
881 {
882 fhEmbedPi0ELambda0MostlySignal ->Fill(energy, lambda0);
3d5d5078 883 }
884 else if(fraction > 0.1)
885 {
886 fhEmbedPi0ELambda0MostlyBkg ->Fill(energy, lambda0);
3d5d5078 887 }
888 else
889 {
890 fhEmbedPi0ELambda0FullBkg ->Fill(energy, lambda0);
3d5d5078 891 }
892 } // embedded
893
521636d2 894 }//pi0
3d5d5078 895 else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ){
896 fhMCELambda0[mcssEta] ->Fill(energy, lambda0);
3d5d5078 897 fhMCELambda1[mcssEta] ->Fill(energy, lambda1);
3d5d5078 898 fhMCEDispersion[mcssEta] ->Fill(energy, disp);
f66d95af 899 fhMCNCellsE[mcssEta] ->Fill(energy, ncells);
900 fhMCMaxCellDiffClusterE[mcssEta]->Fill(energy,maxCellFraction);
901
902 if (energy < 2.){
903 fhMCLambda0vsClusterMaxCellDiffE0[mcssEta]->Fill(lambda0, maxCellFraction);
904 fhMCNCellsvsClusterMaxCellDiffE0[mcssEta] ->Fill(ncells, maxCellFraction);
905 }
906 else if(energy < 6.){
907 fhMCLambda0vsClusterMaxCellDiffE2[mcssEta]->Fill(lambda0, maxCellFraction);
908 fhMCNCellsvsClusterMaxCellDiffE2[mcssEta] ->Fill(ncells, maxCellFraction);
909 }
910 else{
911 fhMCLambda0vsClusterMaxCellDiffE6[mcssEta]->Fill(lambda0, maxCellFraction);
912 fhMCNCellsvsClusterMaxCellDiffE6[mcssEta] ->Fill(ncells, maxCellFraction);
913 }
914
3d5d5078 915 }//eta
521636d2 916 else {
3d5d5078 917 fhMCELambda0[mcssOther] ->Fill(energy, lambda0);
3d5d5078 918 fhMCELambda1[mcssOther] ->Fill(energy, lambda1);
3d5d5078 919 fhMCEDispersion[mcssOther] ->Fill(energy, disp);
f66d95af 920 fhMCNCellsE[mcssOther] ->Fill(energy, ncells);
921 fhMCMaxCellDiffClusterE[mcssOther]->Fill(energy,maxCellFraction);
922
923 if (energy < 2.){
924 fhMCLambda0vsClusterMaxCellDiffE0[mcssOther]->Fill(lambda0, maxCellFraction);
925 fhMCNCellsvsClusterMaxCellDiffE0[mcssOther] ->Fill(ncells, maxCellFraction);
926 }
927 else if(energy < 6.){
928 fhMCLambda0vsClusterMaxCellDiffE2[mcssOther]->Fill(lambda0, maxCellFraction);
929 fhMCNCellsvsClusterMaxCellDiffE2[mcssOther] ->Fill(ncells, maxCellFraction);
930 }
931 else{
932 fhMCLambda0vsClusterMaxCellDiffE6[mcssOther]->Fill(lambda0, maxCellFraction);
933 fhMCNCellsvsClusterMaxCellDiffE6[mcssOther] ->Fill(ncells, maxCellFraction);
934 }
935
521636d2 936 }//other particles
937
938 }//MC data
939
940}
941
0c1383b5 942//________________________________________________________________________
943TObjString * AliAnaPhoton::GetAnalysisCuts()
944{
945 //Save parameters used for analysis
946 TString parList ; //this will be list of parameters used for this analysis.
5ae09196 947 const Int_t buffersize = 255;
948 char onePar[buffersize] ;
0c1383b5 949
5ae09196 950 snprintf(onePar,buffersize,"--- AliAnaPhoton ---\n") ;
0c1383b5 951 parList+=onePar ;
5ae09196 952 snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ;
0c1383b5 953 parList+=onePar ;
5ae09196 954 snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ;
0c1383b5 955 parList+=onePar ;
5ae09196 956 snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ;
0c1383b5 957 parList+=onePar ;
5ae09196 958 snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ;
0c1383b5 959 parList+=onePar ;
5ae09196 960 snprintf(onePar,buffersize,"fRejectTrackMatch: %d\n",fRejectTrackMatch) ;
0c1383b5 961 parList+=onePar ;
41121cfe 962 snprintf(onePar,buffersize,"Conversion Selection: fConvAsymCut %1.2f, fConvDEtaCut %1.2f fConvDPhiCut (%1.2f,%1.2f)\n",
963 fConvAsymCut, fConvDEtaCut, fConvDPhiMinCut, fConvDPhiMaxCut) ;
6175da48 964 parList+=onePar ;
0c1383b5 965
966 //Get parameters set in base class.
967 parList += GetBaseParametersList() ;
968
969 //Get parameters set in PID class.
970 parList += GetCaloPID()->GetPIDParametersList() ;
971
972 //Get parameters set in FiducialCut class (not available yet)
973 //parlist += GetFidCut()->GetFidCutParametersList()
974
975 return new TObjString(parList) ;
976}
977
1c5acb87 978//________________________________________________________________________
979TList * AliAnaPhoton::GetCreateOutputObjects()
980{
477d6cee 981 // Create histograms to be saved in output file and
982 // store them in outputContainer
983 TList * outputContainer = new TList() ;
984 outputContainer->SetName("PhotonHistos") ;
4a745797 985
521636d2 986 Int_t nptbins = GetHistoPtBins(); Float_t ptmax = GetHistoPtMax(); Float_t ptmin = GetHistoPtMin();
987 Int_t nphibins = GetHistoPhiBins(); Float_t phimax = GetHistoPhiMax(); Float_t phimin = GetHistoPhiMin();
988 Int_t netabins = GetHistoEtaBins(); Float_t etamax = GetHistoEtaMax(); Float_t etamin = GetHistoEtaMin();
989 Int_t ssbins = GetHistoShowerShapeBins(); Float_t ssmax = GetHistoShowerShapeMax(); Float_t ssmin = GetHistoShowerShapeMin();
e1e62b89 990 Int_t nbins = GetHistoNClusterCellBins(); Int_t nmax = GetHistoNClusterCellMax(); Int_t nmin = GetHistoNClusterCellMin();
521636d2 991
e1e62b89 992 fhNCellsE = new TH2F ("hNCellsE","# of cells in cluster vs E of clusters", nptbins,ptmin,ptmax, nbins,nmin,nmax);
c4a7d28a 993 fhNCellsE->SetXTitle("E (GeV)");
994 fhNCellsE->SetYTitle("# of cells in cluster");
995 outputContainer->Add(fhNCellsE);
6175da48 996
f66d95af 997 fhMaxCellDiffClusterE = new TH2F ("hMaxCellDiffClusterE","energy vs difference of cluster energy - max cell energy / cluster energy, good clusters",
998 nptbins,ptmin,ptmax, 500,0,1.);
999 fhMaxCellDiffClusterE->SetXTitle("E_{cluster} (GeV) ");
1000 fhMaxCellDiffClusterE->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1001 outputContainer->Add(fhMaxCellDiffClusterE);
1002
20218aea 1003 fhEPhoton = new TH1F("hEPhoton","Number of #gamma over calorimeter vs energy",nptbins,ptmin,ptmax);
1004 fhEPhoton->SetYTitle("N");
1005 fhEPhoton->SetXTitle("E_{#gamma}(GeV)");
1006 outputContainer->Add(fhEPhoton) ;
1007
1008 fhPtPhoton = new TH1F("hPtPhoton","Number of #gamma over calorimeter vs p_{T}",nptbins,ptmin,ptmax);
477d6cee 1009 fhPtPhoton->SetYTitle("N");
1010 fhPtPhoton->SetXTitle("p_{T #gamma}(GeV/c)");
1011 outputContainer->Add(fhPtPhoton) ;
1012
1013 fhPhiPhoton = new TH2F
20218aea 1014 ("hPhiPhoton","#phi_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
6175da48 1015 fhPhiPhoton->SetYTitle("#phi (rad)");
477d6cee 1016 fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/c)");
1017 outputContainer->Add(fhPhiPhoton) ;
1018
1019 fhEtaPhoton = new TH2F
20218aea 1020 ("hEtaPhoton","#eta_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,netabins,etamin,etamax);
477d6cee 1021 fhEtaPhoton->SetYTitle("#eta");
1022 fhEtaPhoton->SetXTitle("p_{T #gamma} (GeV/c)");
1023 outputContainer->Add(fhEtaPhoton) ;
1024
6175da48 1025 fhEtaPhiPhoton = new TH2F
1026 ("hEtaPhiPhoton","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1027 fhEtaPhiPhoton->SetYTitle("#phi (rad)");
1028 fhEtaPhiPhoton->SetXTitle("#eta");
1029 outputContainer->Add(fhEtaPhiPhoton) ;
20218aea 1030 if(GetMinPt() < 0.5){
1031 fhEtaPhi05Photon = new TH2F
1032 ("hEtaPhi05Photon","#eta vs #phi, E > 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
1033 fhEtaPhi05Photon->SetYTitle("#phi (rad)");
1034 fhEtaPhi05Photon->SetXTitle("#eta");
1035 outputContainer->Add(fhEtaPhi05Photon) ;
1036 }
6175da48 1037
1038 //Conversion
20218aea 1039 if(fCheckConversion){
521636d2 1040
1041 fhEtaPhiConversion = new TH2F
1042 ("hEtaPhiConversion","#eta vs #phi for converted clusters",netabins,etamin,etamax,nphibins,phimin,phimax);
1043 fhEtaPhiConversion->SetYTitle("#phi (rad)");
1044 fhEtaPhiConversion->SetXTitle("#eta");
1045 outputContainer->Add(fhEtaPhiConversion) ;
1046 if(GetMinPt() < 0.5){
1047 fhEtaPhi05Conversion = new TH2F
1048 ("hEtaPhi05Conversion","#eta vs #phi, E > 0.5, for converted clusters",netabins,etamin,etamax,nphibins,phimin,phimax);
1049 fhEtaPhi05Conversion->SetYTitle("#phi (rad)");
1050 fhEtaPhi05Conversion->SetXTitle("#eta");
1051 outputContainer->Add(fhEtaPhi05Conversion) ;
1052 }
1053
20218aea 1054 fhPtPhotonConv = new TH1F("hPtPhotonConv","Number of #gamma over calorimeter, conversion",nptbins,ptmin,ptmax);
1055 fhPtPhotonConv->SetYTitle("N");
1056 fhPtPhotonConv->SetXTitle("p_{T #gamma}(GeV/c)");
1057 outputContainer->Add(fhPtPhotonConv) ;
1058
1059 fhEtaPhiPhotonConv = new TH2F
1060 ("hEtaPhiPhotonConv","#eta vs #phi",netabins,etamin,etamax,nphibins,phimin,phimax);
1061 fhEtaPhiPhotonConv->SetYTitle("#phi (rad)");
1062 fhEtaPhiPhotonConv->SetXTitle("#eta");
1063 outputContainer->Add(fhEtaPhiPhotonConv) ;
1064 if(GetMinPt() < 0.5){
1065 fhEtaPhi05PhotonConv = new TH2F
1066 ("hEtaPhi05PhotonConv","#eta vs #phi, E > 0.5",netabins,etamin,etamax,nphibins,phimin,phimax);
1067 fhEtaPhi05PhotonConv->SetYTitle("#phi (rad)");
1068 fhEtaPhi05PhotonConv->SetXTitle("#eta");
1069 outputContainer->Add(fhEtaPhi05PhotonConv) ;
1070 }
1071
1072 fhConvDeltaEta = new TH2F
1073 ("hConvDeltaEta","#Delta #eta of selected conversion pairs",100,0,fMassCut,netabins*2,-0.5,0.5);
1074 fhConvDeltaEta->SetYTitle("#Delta #eta");
1075 fhConvDeltaEta->SetXTitle("Pair Mass (GeV/c^2)");
1076 outputContainer->Add(fhConvDeltaEta) ;
1077
1078 fhConvDeltaPhi = new TH2F
1079 ("hConvDeltaPhi","#Delta #phi of selected conversion pairs",100,0,fMassCut,nphibins*2,-0.5,0.5);
1080 fhConvDeltaPhi->SetYTitle("#Delta #phi");
1081 fhConvDeltaPhi->SetXTitle("Pair Mass (GeV/c^2)");
1082 outputContainer->Add(fhConvDeltaPhi) ;
1083
1084 fhConvDeltaEtaPhi = new TH2F
1085 ("hConvDeltaEtaPhi","#Delta #eta vs #Delta #phi of selected conversion pairs",netabins,-0.5,0.5,nphibins,-0.5,0.5);
1086 fhConvDeltaEtaPhi->SetYTitle("#Delta #phi");
1087 fhConvDeltaEtaPhi->SetXTitle("#Delta #eta");
1088 outputContainer->Add(fhConvDeltaEtaPhi) ;
1089
1090 fhConvAsym = new TH2F
1091 ("hConvAsym","Asymmetry of selected conversion pairs",100,0,fMassCut,100,0,1);
1092 fhConvAsym->SetYTitle("Asymmetry");
1093 fhConvAsym->SetXTitle("Pair Mass (GeV/c^2)");
1094 outputContainer->Add(fhConvAsym) ;
1095
1096 fhConvPt = new TH2F
1097 ("hConvPt","p_{T} of selected conversion pairs",100,0,fMassCut,100,0.,10.);
1098 fhConvPt->SetYTitle("Pair p_{T} (GeV/c)");
1099 fhConvPt->SetXTitle("Pair Mass (GeV/c^2)");
1100 outputContainer->Add(fhConvPt) ;
c4a7d28a 1101
1102 fhConvDistEta = new TH2F
1103 ("hConvDistEta","distance to conversion vertex",100,-0.7,0.7,100,0.,5.);
1104 fhConvDistEta->SetXTitle("#eta");
1105 fhConvDistEta->SetYTitle(" distance (m)");
1106 outputContainer->Add(fhConvDistEta) ;
1107
1108 fhConvDistEn = new TH2F
1109 ("hConvDistEn","distance to conversion vertex",nptbins,ptmin,ptmax,100,0.,5.);
1110 fhConvDistEn->SetXTitle("E (GeV)");
1111 fhConvDistEn->SetYTitle(" distance (m)");
1112 outputContainer->Add(fhConvDistEn) ;
1113
1114 fhConvDistMass = new TH2F
1115 ("hConvDistMass","distance to conversion vertex",100,0,fMassCut,100,0.,5.);
1116 fhConvDistMass->SetXTitle("m (GeV/c^2)");
1117 fhConvDistMass->SetYTitle(" distance (m)");
1118 outputContainer->Add(fhConvDistMass) ;
1119
1120 fhConvDistEtaCutEta = new TH2F
1121 ("hConvDistEtaCutEta","distance to conversion vertex, dEta < 0.05",100,-0.7,0.7,100,0.,5.);
1122 fhConvDistEtaCutEta->SetXTitle("#eta");
1123 fhConvDistEtaCutEta->SetYTitle(" distance (m)");
1124 outputContainer->Add(fhConvDistEtaCutEta) ;
1125
1126 fhConvDistEnCutEta = new TH2F
1127 ("hConvDistEnCutEta","distance to conversion vertex, dEta < 0.05",nptbins,ptmin,ptmax,100,0.,5.);
1128 fhConvDistEnCutEta->SetXTitle("E (GeV)");
1129 fhConvDistEnCutEta->SetYTitle(" distance (m)");
1130 outputContainer->Add(fhConvDistEnCutEta) ;
1131
1132 fhConvDistMassCutEta = new TH2F
1133 ("hConvDistMassCutEta","distance to conversion vertex, dEta < 0.05",100,0,fMassCut,100,0.,5.);
1134 fhConvDistMassCutEta->SetXTitle("m (GeV/c^2)");
1135 fhConvDistMassCutEta->SetYTitle(" distance (m)");
1136 outputContainer->Add(fhConvDistMassCutEta) ;
1137
1138 fhConvDistEtaCutMass = new TH2F
1139 ("hConvDistEtaCutMass","distance to conversion vertex, dEta < 0.05, m < 10 MeV",100,-0.7,0.7,100,0.,5.);
1140 fhConvDistEtaCutMass->SetXTitle("#eta");
1141 fhConvDistEtaCutMass->SetYTitle(" distance (m)");
1142 outputContainer->Add(fhConvDistEtaCutMass) ;
1143
1144 fhConvDistEnCutMass = new TH2F
1145 ("hConvDistEnCutMass","distance to conversion vertex, dEta < 0.05, m < 10 MeV",nptbins,ptmin,ptmax,100,0.,5.);
1146 fhConvDistEnCutMass->SetXTitle("E (GeV)");
1147 fhConvDistEnCutMass->SetYTitle(" distance (m)");
1148 outputContainer->Add(fhConvDistEnCutMass) ;
1149
1150 fhConvDistEtaCutAsy = new TH2F
1151 ("hConvDistEtaCutAsy","distance to conversion vertex, dEta < 0.05, m < 10 MeV, A < 0.1",100,-0.7,0.7,100,0.,5.);
1152 fhConvDistEtaCutAsy->SetXTitle("#eta");
1153 fhConvDistEtaCutAsy->SetYTitle(" distance (m)");
1154 outputContainer->Add(fhConvDistEtaCutAsy) ;
1155
1156 fhConvDistEnCutAsy = new TH2F
1157 ("hConvDistEnCutAsy","distance to conversion vertex, dEta < 0.05, m < 10 MeV, A < 0.1",nptbins,ptmin,ptmax,100,0.,5.);
1158 fhConvDistEnCutAsy->SetXTitle("E (GeV)");
1159 fhConvDistEnCutAsy->SetYTitle(" distance (m)");
1160 outputContainer->Add(fhConvDistEnCutAsy) ;
1161
521636d2 1162 } // check conversion
1163
1164
1165 //Shower shape
1166 if(fFillSSHistograms){
1167
1168 fhLam0E = new TH2F ("hLam0E","#lambda_{0}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1169 fhLam0E->SetYTitle("#lambda_{0}^{2}");
1170 fhLam0E->SetXTitle("E (GeV)");
1171 outputContainer->Add(fhLam0E);
1172
1173 fhLam1E = new TH2F ("hLam1E","#lambda_{1}^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1174 fhLam1E->SetYTitle("#lambda_{1}^{2}");
1175 fhLam1E->SetXTitle("E (GeV)");
1176 outputContainer->Add(fhLam1E);
1177
1178 fhDispE = new TH2F ("hDispE"," dispersion^{2} vs E", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1179 fhDispE->SetYTitle("D^{2}");
1180 fhDispE->SetXTitle("E (GeV) ");
1181 outputContainer->Add(fhDispE);
1182
521636d2 1183 if(fCalorimeter == "EMCAL"){
1184 fhLam0ETRD = new TH2F ("hLam0ETRD","#lambda_{0}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1185 fhLam0ETRD->SetYTitle("#lambda_{0}^{2}");
1186 fhLam0ETRD->SetXTitle("E (GeV)");
1187 outputContainer->Add(fhLam0ETRD);
1188
1189 fhLam1ETRD = new TH2F ("hLam1ETRD","#lambda_{1}^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1190 fhLam1ETRD->SetYTitle("#lambda_{1}^{2}");
1191 fhLam1ETRD->SetXTitle("E (GeV)");
1192 outputContainer->Add(fhLam1ETRD);
1193
1194 fhDispETRD = new TH2F ("hDispETRD"," dispersion^{2} vs E, EMCAL SM covered by TRD", nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1195 fhDispETRD->SetYTitle("Dispersion^{2}");
1196 fhDispETRD->SetXTitle("E (GeV) ");
1197 outputContainer->Add(fhDispETRD);
521636d2 1198 }
1199
d9105d92 1200 fhNCellsLam0LowE = new TH2F ("hNCellsLam0LowE","N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1201 fhNCellsLam0LowE->SetXTitle("N_{cells}");
1202 fhNCellsLam0LowE->SetYTitle("#lambda_{0}^{2}");
1203 outputContainer->Add(fhNCellsLam0LowE);
1204
d9105d92 1205 fhNCellsLam0HighE = new TH2F ("hNCellsLam0HighE","N_{cells} in cluster vs #lambda_{0}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1206 fhNCellsLam0HighE->SetXTitle("N_{cells}");
1207 fhNCellsLam0HighE->SetYTitle("#lambda_{0}^{2}");
1208 outputContainer->Add(fhNCellsLam0HighE);
1209
d9105d92 1210 fhNCellsLam1LowE = new TH2F ("hNCellsLam1LowE","N_{cells} in cluster vs #lambda_{1}^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1211 fhNCellsLam1LowE->SetXTitle("N_{cells}");
1212 fhNCellsLam1LowE->SetYTitle("#lambda_{0}^{2}");
1213 outputContainer->Add(fhNCellsLam1LowE);
1214
d9105d92 1215 fhNCellsLam1HighE = new TH2F ("hNCellsLam1HighE","N_{cells} in cluster vs #lambda_{1}^{2}, E > 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1216 fhNCellsLam1HighE->SetXTitle("N_{cells}");
1217 fhNCellsLam1HighE->SetYTitle("#lambda_{0}^{2}");
1218 outputContainer->Add(fhNCellsLam1HighE);
1219
d9105d92 1220 fhNCellsDispLowE = new TH2F ("hNCellsDispLowE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1221 fhNCellsDispLowE->SetXTitle("N_{cells}");
1222 fhNCellsDispLowE->SetYTitle("D^{2}");
1223 outputContainer->Add(fhNCellsDispLowE);
1224
d9105d92 1225 fhNCellsDispHighE = new TH2F ("hNCellsDispHighE","N_{cells} in cluster vs dispersion^{2}, E < 2 GeV", nbins,nmin, nmax, ssbins,ssmin,ssmax);
521636d2 1226 fhNCellsDispHighE->SetXTitle("N_{cells}");
1227 fhNCellsDispHighE->SetYTitle("D^{2}");
1228 outputContainer->Add(fhNCellsDispHighE);
1229
521636d2 1230 fhEtaLam0LowE = new TH2F ("hEtaLam0LowE","#eta vs #lambda_{0}^{2}, E < 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1231 fhEtaLam0LowE->SetYTitle("#lambda_{0}^{2}");
1232 fhEtaLam0LowE->SetXTitle("#eta");
1233 outputContainer->Add(fhEtaLam0LowE);
1234
1235 fhPhiLam0LowE = new TH2F ("hPhiLam0LowE","#phi vs #lambda_{0}^{2}, E < 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1236 fhPhiLam0LowE->SetYTitle("#lambda_{0}^{2}");
1237 fhPhiLam0LowE->SetXTitle("#phi");
1238 outputContainer->Add(fhPhiLam0LowE);
1239
1240 fhEtaLam0HighE = new TH2F ("hEtaLam0HighE","#eta vs #lambda_{0}^{2}, E > 2 GeV", netabins,etamin,etamax, ssbins,ssmin,ssmax);
1241 fhEtaLam0HighE->SetYTitle("#lambda_{0}^{2}");
1242 fhEtaLam0HighE->SetXTitle("#eta");
1243 outputContainer->Add(fhEtaLam0HighE);
1244
1245 fhPhiLam0HighE = new TH2F ("hPhiLam0HighE","#phi vs #lambda_{0}^{2}, E > 2 GeV", nphibins,phimin,phimax, ssbins,ssmin,ssmax);
1246 fhPhiLam0HighE->SetYTitle("#lambda_{0}^{2}");
1247 fhPhiLam0HighE->SetXTitle("#phi");
1248 outputContainer->Add(fhPhiLam0HighE);
1249
1250 fhLam1Lam0LowE = new TH2F ("hLam1Lam0LowE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1251 fhLam1Lam0LowE->SetYTitle("#lambda_{0}^{2}");
1252 fhLam1Lam0LowE->SetXTitle("#lambda_{1}^{2}");
1253 outputContainer->Add(fhLam1Lam0LowE);
1254
1255 fhLam1Lam0HighE = new TH2F ("hLam1Lam0HighE","#lambda_{0}^{2} vs #lambda_{1}^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1256 fhLam1Lam0HighE->SetYTitle("#lambda_{0}^{2}");
1257 fhLam1Lam0HighE->SetXTitle("#lambda_{1}^{2}");
1258 outputContainer->Add(fhLam1Lam0HighE);
1259
1260 fhLam0DispLowE = new TH2F ("hLam0DispLowE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1261 fhLam0DispLowE->SetXTitle("#lambda_{0}^{2}");
1262 fhLam0DispLowE->SetYTitle("D^{2}");
1263 outputContainer->Add(fhLam0DispLowE);
1264
1265 fhLam0DispHighE = new TH2F ("hLam0DispHighE","#lambda_{0}^{2} vs dispersion^{2} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1266 fhLam0DispHighE->SetXTitle("#lambda_{0}^{2}");
1267 fhLam0DispHighE->SetYTitle("D^{2}");
1268 outputContainer->Add(fhLam0DispHighE);
1269
1270 fhDispLam1LowE = new TH2F ("hDispLam1LowE","Dispersion^{2} vs #lambda_{1}^{2} in cluster of E < 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1271 fhDispLam1LowE->SetXTitle("D^{2}");
1272 fhDispLam1LowE->SetYTitle("#lambda_{1}^{2}");
1273 outputContainer->Add(fhDispLam1LowE);
1274
1275 fhDispLam1HighE = new TH2F ("hDispLam1HighE","Dispersion^{2} vs #lambda_{1^{2}} in cluster of E > 2 GeV", ssbins,ssmin,ssmax, ssbins,ssmin,ssmax);
1276 fhDispLam1HighE->SetXTitle("D^{2}");
1277 fhDispLam1HighE->SetYTitle("#lambda_{1}^{2}");
1278 outputContainer->Add(fhDispLam1HighE);
1279
521636d2 1280 } // Shower shape
1281
6175da48 1282
477d6cee 1283 if(IsDataMC()){
123fc3bd 1284
f66d95af 1285 TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
1286 "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P",
1287 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}","String" } ;
3d5d5078 1288
f66d95af 1289 TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
1290 "Conversion", "Hadron", "AntiNeutron","AntiProton",
1291 "PhotonPrompt","PhotonFragmentation","PhotonISR","String" } ;
521636d2 1292
f66d95af 1293 for(Int_t i = 0; i < fNOriginHistograms; i++){
521636d2 1294
3d5d5078 1295 fhMCE[i] = new TH1F(Form("hE_MC%s",pname[i].Data()),
521636d2 1296 Form("cluster from %s : E ",ptype[i].Data()),
1297 nptbins,ptmin,ptmax);
3d5d5078 1298 fhMCE[i]->SetXTitle("E (GeV)");
1299 outputContainer->Add(fhMCE[i]) ;
521636d2 1300
4c8f7c2e 1301 fhMCPt[i] = new TH1F(Form("hPt_MC%s",pname[i].Data()),
521636d2 1302 Form("cluster from %s : p_{T} ",ptype[i].Data()),
1303 nptbins,ptmin,ptmax);
4c8f7c2e 1304 fhMCPt[i]->SetXTitle("p_{T} (GeV/c)");
1305 outputContainer->Add(fhMCPt[i]) ;
521636d2 1306
4c8f7c2e 1307 fhMCEta[i] = new TH2F(Form("hEta_MC%s",pname[i].Data()),
521636d2 1308 Form("cluster from %s : #eta ",ptype[i].Data()),
1309 nptbins,ptmin,ptmax,netabins,etamin,etamax);
4c8f7c2e 1310 fhMCEta[i]->SetYTitle("#eta");
1311 fhMCEta[i]->SetXTitle("E (GeV)");
1312 outputContainer->Add(fhMCEta[i]) ;
521636d2 1313
4c8f7c2e 1314 fhMCPhi[i] = new TH2F(Form("hPhi_MC%s",pname[i].Data()),
521636d2 1315 Form("cluster from %s : #phi ",ptype[i].Data()),
1316 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
4c8f7c2e 1317 fhMCPhi[i]->SetYTitle("#phi (rad)");
1318 fhMCPhi[i]->SetXTitle("E (GeV)");
1319 outputContainer->Add(fhMCPhi[i]) ;
1320
1321
d9105d92 1322 fhMCDeltaE[i] = new TH2F (Form("hDeltaE_MC%s",pname[i].Data()),
1323 Form("MC - Reco E from %s",pname[i].Data()),
1324 nptbins,ptmin,ptmax, 200,-50,50);
4c8f7c2e 1325 fhMCDeltaE[i]->SetXTitle("#Delta E (GeV)");
1326 outputContainer->Add(fhMCDeltaE[i]);
1327
d9105d92 1328 fhMCDeltaPt[i] = new TH2F (Form("hDeltaPt_MC%s",pname[i].Data()),
1329 Form("MC - Reco p_{T} from %s",pname[i].Data()),
1330 nptbins,ptmin,ptmax, 200,-50,50);
4c8f7c2e 1331 fhMCDeltaPt[i]->SetXTitle("#Delta p_{T} (GeV/c)");
1332 outputContainer->Add(fhMCDeltaPt[i]);
d9105d92 1333
4c8f7c2e 1334 fhMC2E[i] = new TH2F (Form("h2E_MC%s",pname[i].Data()),
1335 Form("E distribution, reconstructed vs generated from %s",pname[i].Data()),
1336 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1337 fhMC2E[i]->SetXTitle("E_{rec} (GeV)");
1338 fhMC2E[i]->SetYTitle("E_{gen} (GeV)");
1339 outputContainer->Add(fhMC2E[i]);
1340
1341 fhMC2Pt[i] = new TH2F (Form("h2Pt_MC%s",pname[i].Data()),
1342 Form("p_T distribution, reconstructed vs generated from %s",pname[i].Data()),
1343 nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
1344 fhMC2Pt[i]->SetXTitle("p_{T,rec} (GeV/c)");
1345 fhMC2Pt[i]->SetYTitle("p_{T,gen} (GeV/c)");
1346 outputContainer->Add(fhMC2Pt[i]);
1347
521636d2 1348
1349 }
3d5d5078 1350
f66d95af 1351 TString pptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}","hadron?",
1352 "#gamma_{prompt}","#gamma_{fragmentation}","#gamma_{ISR}"} ;
1353
1354 TString ppname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Hadron",
1355 "PhotonPrompt","PhotonFragmentation","PhotonISR"} ;
1356
1357 for(Int_t i = 0; i < fNPrimaryHistograms; i++){
1358 fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()),
1359 Form("primary photon %s : E ",pptype[i].Data()),
3d5d5078 1360 nptbins,ptmin,ptmax);
1361 fhEPrimMC[i]->SetXTitle("E (GeV)");
1362 outputContainer->Add(fhEPrimMC[i]) ;
1363
f66d95af 1364 fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()),
1365 Form("primary photon %s : p_{T} ",pptype[i].Data()),
3d5d5078 1366 nptbins,ptmin,ptmax);
1367 fhPtPrimMC[i]->SetXTitle("p_{T} (GeV/c)");
1368 outputContainer->Add(fhPtPrimMC[i]) ;
1369
f66d95af 1370 fhYPrimMC[i] = new TH2F(Form("hYPrim_MC%s",ppname[i].Data()),
1371 Form("primary photon %s : Rapidity ",pptype[i].Data()),
3d5d5078 1372 nptbins,ptmin,ptmax,800,-8,8);
1373 fhYPrimMC[i]->SetYTitle("Rapidity");
1374 fhYPrimMC[i]->SetXTitle("E (GeV)");
1375 outputContainer->Add(fhYPrimMC[i]) ;
1376
f66d95af 1377 fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()),
1378 Form("primary photon %s : #phi ",pptype[i].Data()),
3d5d5078 1379 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1380 fhPhiPrimMC[i]->SetYTitle("#phi (rad)");
1381 fhPhiPrimMC[i]->SetXTitle("E (GeV)");
1382 outputContainer->Add(fhPhiPrimMC[i]) ;
1383
1384
f66d95af 1385 fhEPrimMCAcc[i] = new TH1F(Form("hEPrimAcc_MC%s",ppname[i].Data()),
1386 Form("primary photon %s in acceptance: E ",pptype[i].Data()),
3d5d5078 1387 nptbins,ptmin,ptmax);
1388 fhEPrimMCAcc[i]->SetXTitle("E (GeV)");
1389 outputContainer->Add(fhEPrimMCAcc[i]) ;
1390
f66d95af 1391 fhPtPrimMCAcc[i] = new TH1F(Form("hPtPrimAcc_MC%s",ppname[i].Data()),
1392 Form("primary photon %s in acceptance: p_{T} ",pptype[i].Data()),
3d5d5078 1393 nptbins,ptmin,ptmax);
1394 fhPtPrimMCAcc[i]->SetXTitle("p_{T} (GeV/c)");
1395 outputContainer->Add(fhPtPrimMCAcc[i]) ;
1396
f66d95af 1397 fhYPrimMCAcc[i] = new TH2F(Form("hYPrimAcc_MC%s",ppname[i].Data()),
1398 Form("primary photon %s in acceptance: Rapidity ",pptype[i].Data()),
3d5d5078 1399 nptbins,ptmin,ptmax,100,-1,1);
1400 fhYPrimMCAcc[i]->SetYTitle("Rapidity");
1401 fhYPrimMCAcc[i]->SetXTitle("E (GeV)");
1402 outputContainer->Add(fhYPrimMCAcc[i]) ;
1403
f66d95af 1404 fhPhiPrimMCAcc[i] = new TH2F(Form("hPhiPrimAcc_MC%s",ppname[i].Data()),
1405 Form("primary photon %s in acceptance: #phi ",pptype[i].Data()),
3d5d5078 1406 nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1407 fhPhiPrimMCAcc[i]->SetYTitle("#phi (rad)");
1408 fhPhiPrimMCAcc[i]->SetXTitle("E (GeV)");
1409 outputContainer->Add(fhPhiPrimMCAcc[i]) ;
1410
1411 }
1412
20218aea 1413 if(fCheckConversion){
1414 fhPtConversionTagged = new TH1F("hPtMCConversionTagged","Number of converted #gamma over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
1415 fhPtConversionTagged->SetYTitle("N");
1416 fhPtConversionTagged->SetXTitle("p_{T #gamma}(GeV/c)");
1417 outputContainer->Add(fhPtConversionTagged) ;
1418
1419
1420 fhPtAntiNeutronTagged = new TH1F("hPtMCAntiNeutronTagged","Number of AntiNeutron id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
1421 fhPtAntiNeutronTagged->SetYTitle("N");
1422 fhPtAntiNeutronTagged->SetXTitle("p_{T #gamma}(GeV/c)");
1423 outputContainer->Add(fhPtAntiNeutronTagged) ;
1424
1425 fhPtAntiProtonTagged = new TH1F("hPtMCAntiProtonTagged","Number of AntiProton id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
1426 fhPtAntiProtonTagged->SetYTitle("N");
1427 fhPtAntiProtonTagged->SetXTitle("p_{T #gamma}(GeV/c)");
1428 outputContainer->Add(fhPtAntiProtonTagged) ;
1429
1430 fhPtUnknownTagged = new TH1F("hPtMCUnknownTagged","Number of Unknown id as Photon over calorimeter, tagged as converted",nptbins,ptmin,ptmax);
1431 fhPtUnknownTagged->SetYTitle("N");
1432 fhPtUnknownTagged->SetXTitle("p_{T #gamma}(GeV/c)");
1433 outputContainer->Add(fhPtUnknownTagged) ;
1434
1435 fhConvDeltaEtaMCConversion = new TH2F
1436 ("hConvDeltaEtaMCConversion","#Delta #eta of selected conversion pairs from real conversions",100,0,fMassCut,netabins,-0.5,0.5);
1437 fhConvDeltaEtaMCConversion->SetYTitle("#Delta #eta");
1438 fhConvDeltaEtaMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
1439 outputContainer->Add(fhConvDeltaEtaMCConversion) ;
1440
1441 fhConvDeltaPhiMCConversion = new TH2F
1442 ("hConvDeltaPhiMCConversion","#Delta #phi of selected conversion pairs from real conversions",100,0,fMassCut,nphibins,-0.5,0.5);
1443 fhConvDeltaPhiMCConversion->SetYTitle("#Delta #phi");
1444 fhConvDeltaPhiMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
1445 outputContainer->Add(fhConvDeltaPhiMCConversion) ;
1446
1447 fhConvDeltaEtaPhiMCConversion = new TH2F
1448 ("hConvDeltaEtaPhiMCConversion","#Delta #eta vs #Delta #phi of selected conversion pairs, from real conversions",netabins,-0.5,0.5,nphibins,-0.5,0.5);
1449 fhConvDeltaEtaPhiMCConversion->SetYTitle("#Delta #phi");
1450 fhConvDeltaEtaPhiMCConversion->SetXTitle("#Delta #eta");
1451 outputContainer->Add(fhConvDeltaEtaPhiMCConversion) ;
1452
1453 fhConvAsymMCConversion = new TH2F
1454 ("hConvAsymMCConversion","Asymmetry of selected conversion pairs from real conversions",100,0,fMassCut,100,0,1);
1455 fhConvAsymMCConversion->SetYTitle("Asymmetry");
1456 fhConvAsymMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
1457 outputContainer->Add(fhConvAsymMCConversion) ;
1458
1459 fhConvPtMCConversion = new TH2F
1460 ("hConvPtMCConversion","p_{T} of selected conversion pairs from real conversions",100,0,fMassCut,100,0.,10.);
1461 fhConvPtMCConversion->SetYTitle("Pair p_{T} (GeV/c)");
1462 fhConvPtMCConversion->SetXTitle("Pair Mass (GeV/c^2)");
1463 outputContainer->Add(fhConvPtMCConversion) ;
1464
1465 fhConvDispersionMCConversion = new TH2F
1466 ("hConvDispersionMCConversion","p_{T} of selected conversion pairs from real conversions",100,0.,1.,100,0.,1.);
1467 fhConvDispersionMCConversion->SetYTitle("Dispersion cluster 1");
1468 fhConvDispersionMCConversion->SetXTitle("Dispersion cluster 2");
1469 outputContainer->Add(fhConvDispersionMCConversion) ;
1470
1471 fhConvM02MCConversion = new TH2F
1472 ("hConvM02MCConversion","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
1473 fhConvM02MCConversion->SetYTitle("M02 cluster 1");
1474 fhConvM02MCConversion->SetXTitle("M02 cluster 2");
1475 outputContainer->Add(fhConvM02MCConversion) ;
1476
1477 fhConvDeltaEtaMCAntiNeutron = new TH2F
1478 ("hConvDeltaEtaMCAntiNeutron","#Delta #eta of selected conversion pairs from anti-neutrons",100,0,fMassCut,netabins,-0.5,0.5);
1479 fhConvDeltaEtaMCAntiNeutron->SetYTitle("#Delta #eta");
1480 fhConvDeltaEtaMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
1481 outputContainer->Add(fhConvDeltaEtaMCAntiNeutron) ;
1482
1483 fhConvDeltaPhiMCAntiNeutron = new TH2F
1484 ("hConvDeltaPhiMCAntiNeutron","#Delta #phi of selected conversion pairs from anti-neutrons",100,0,fMassCut,nphibins,-0.5,0.5);
1485 fhConvDeltaPhiMCAntiNeutron->SetYTitle("#Delta #phi");
1486 fhConvDeltaPhiMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
1487 outputContainer->Add(fhConvDeltaPhiMCAntiNeutron) ;
1488
1489 fhConvDeltaEtaPhiMCAntiNeutron = new TH2F
1490 ("hConvDeltaEtaPhiMCAntiNeutron","#Delta #eta vs #Delta #phi of selected conversion pairs from anti-neutrons",netabins,-0.5,0.5,nphibins,-0.5,0.5);
1491 fhConvDeltaEtaPhiMCAntiNeutron->SetYTitle("#Delta #phi");
1492 fhConvDeltaEtaPhiMCAntiNeutron->SetXTitle("#Delta #eta");
1493 outputContainer->Add(fhConvDeltaEtaPhiMCAntiNeutron) ;
1494
1495 fhConvAsymMCAntiNeutron = new TH2F
1496 ("hConvAsymMCAntiNeutron","Asymmetry of selected conversion pairs from anti-neutrons",100,0,fMassCut,100,0,1);
1497 fhConvAsymMCAntiNeutron->SetYTitle("Asymmetry");
1498 fhConvAsymMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
1499 outputContainer->Add(fhConvAsymMCAntiNeutron) ;
1500
1501 fhConvPtMCAntiNeutron = new TH2F
1502 ("hConvPtMCAntiNeutron","p_{T} of selected conversion pairs from anti-neutrons",100,0,fMassCut,100,0.,10.);
1503 fhConvPtMCAntiNeutron->SetYTitle("Pair p_{T} (GeV/c)");
1504 fhConvPtMCAntiNeutron->SetXTitle("Pair Mass (GeV/c^2)");
1505 outputContainer->Add(fhConvPtMCAntiNeutron) ;
1506
1507 fhConvDispersionMCAntiNeutron = new TH2F
1508 ("hConvDispersionMCAntiNeutron","p_{T} of selected conversion pairs from anti-neutrons",100,0.,1.,100,0.,1.);
1509 fhConvDispersionMCAntiNeutron->SetYTitle("Dispersion cluster 1");
1510 fhConvDispersionMCAntiNeutron->SetXTitle("Dispersion cluster 2");
1511 outputContainer->Add(fhConvDispersionMCAntiNeutron) ;
1512
1513 fhConvM02MCAntiNeutron = new TH2F
1514 ("hConvM02MCAntiNeutron","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
1515 fhConvM02MCAntiNeutron->SetYTitle("M02 cluster 1");
1516 fhConvM02MCAntiNeutron->SetXTitle("M02 cluster 2");
1517 outputContainer->Add(fhConvM02MCAntiNeutron) ;
1518
1519 fhConvDeltaEtaMCAntiProton = new TH2F
1520 ("hConvDeltaEtaMCAntiProton","#Delta #eta of selected conversion pairs from anti-protons",100,0,fMassCut,netabins,-0.5,0.5);
1521 fhConvDeltaEtaMCAntiProton->SetYTitle("#Delta #eta");
1522 fhConvDeltaEtaMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
1523 outputContainer->Add(fhConvDeltaEtaMCAntiProton) ;
1524
1525 fhConvDeltaPhiMCAntiProton = new TH2F
1526 ("hConvDeltaPhiMCAntiProton","#Delta #phi of selected conversion pairs from anti-protons",100,0,fMassCut,nphibins,-0.5,0.5);
1527 fhConvDeltaPhiMCAntiProton->SetYTitle("#Delta #phi");
1528 fhConvDeltaPhiMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
1529 outputContainer->Add(fhConvDeltaPhiMCAntiProton) ;
1530
1531 fhConvDeltaEtaPhiMCAntiProton = new TH2F
1532 ("hConvDeltaEtaPhiMCAntiProton","#Delta #eta vs #Delta #phi of selected conversion pairs from anti-protons",netabins,-0.5,0.5,nphibins,-0.5,0.5);
1533 fhConvDeltaEtaPhiMCAntiProton->SetYTitle("#Delta #phi");
1534 fhConvDeltaEtaPhiMCAntiProton->SetXTitle("#Delta #eta");
1535 outputContainer->Add(fhConvDeltaEtaPhiMCAntiProton) ;
1536
1537 fhConvAsymMCAntiProton = new TH2F
1538 ("hConvAsymMCAntiProton","Asymmetry of selected conversion pairs from anti-protons",100,0,fMassCut,100,0,1);
1539 fhConvAsymMCAntiProton->SetYTitle("Asymmetry");
1540 fhConvAsymMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
1541 outputContainer->Add(fhConvAsymMCAntiProton) ;
1542
1543 fhConvPtMCAntiProton = new TH2F
1544 ("hConvPtMCAntiProton","p_{T} of selected conversion pairs from anti-protons",100,0,fMassCut,100,0.,10.);
1545 fhConvPtMCAntiProton->SetYTitle("Pair p_{T} (GeV/c)");
1546 fhConvPtMCAntiProton->SetXTitle("Pair Mass (GeV/c^2)");
1547 outputContainer->Add(fhConvPtMCAntiProton) ;
1548
1549 fhConvDispersionMCAntiProton = new TH2F
1550 ("hConvDispersionMCAntiProton","p_{T} of selected conversion pairs from anti-protons",100,0.,1.,100,0.,1.);
1551 fhConvDispersionMCAntiProton->SetYTitle("Dispersion cluster 1");
1552 fhConvDispersionMCAntiProton->SetXTitle("Dispersion cluster 2");
1553 outputContainer->Add(fhConvDispersionMCAntiProton) ;
1554
1555 fhConvM02MCAntiProton = new TH2F
1556 ("hConvM02MCAntiProton","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
1557 fhConvM02MCAntiProton->SetYTitle("M02 cluster 1");
1558 fhConvM02MCAntiProton->SetXTitle("M02 cluster 2");
1559 outputContainer->Add(fhConvM02MCAntiProton) ;
1560
1561 fhConvDeltaEtaMCString = new TH2F
1562 ("hConvDeltaEtaMCString","#Delta #eta of selected conversion pairs from string",100,0,fMassCut,netabins,-0.5,0.5);
1563 fhConvDeltaEtaMCString->SetYTitle("#Delta #eta");
1564 fhConvDeltaEtaMCString->SetXTitle("Pair Mass (GeV/c^2)");
1565 outputContainer->Add(fhConvDeltaEtaMCString) ;
1566
1567 fhConvDeltaPhiMCString = new TH2F
1568 ("hConvDeltaPhiMCString","#Delta #phi of selected conversion pairs from string",100,0,fMassCut,nphibins,-0.5,0.5);
1569 fhConvDeltaPhiMCString->SetYTitle("#Delta #phi");
1570 fhConvDeltaPhiMCString->SetXTitle("Pair Mass (GeV/c^2)");
1571 outputContainer->Add(fhConvDeltaPhiMCString) ;
1572
1573 fhConvDeltaEtaPhiMCString = new TH2F
1574 ("hConvDeltaEtaPhiMCString","#Delta #eta vs #Delta #phi of selected conversion pairs from string",netabins,-0.5,0.5,nphibins,-0.5,0.5);
1575 fhConvDeltaEtaPhiMCString->SetYTitle("#Delta #phi");
1576 fhConvDeltaEtaPhiMCString->SetXTitle("#Delta #eta");
1577 outputContainer->Add(fhConvDeltaEtaPhiMCString) ;
1578
1579 fhConvAsymMCString = new TH2F
1580 ("hConvAsymMCString","Asymmetry of selected conversion pairs from string",100,0,fMassCut,100,0,1);
1581 fhConvAsymMCString->SetYTitle("Asymmetry");
1582 fhConvAsymMCString->SetXTitle("Pair Mass (GeV/c^2)");
1583 outputContainer->Add(fhConvAsymMCString) ;
1584
1585 fhConvPtMCString = new TH2F
1586 ("hConvPtMCString","p_{T} of selected conversion pairs from string",100,0,fMassCut,100,0.,10.);
1587 fhConvPtMCString->SetYTitle("Pair p_{T} (GeV/c)");
1588 fhConvPtMCString->SetXTitle("Pair Mass (GeV/c^2)");
1589 outputContainer->Add(fhConvPtMCString) ;
1590
1591 fhConvDispersionMCString = new TH2F
1592 ("hConvDispersionMCString","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
1593 fhConvDispersionMCString->SetYTitle("Dispersion cluster 1");
1594 fhConvDispersionMCString->SetXTitle("Dispersion cluster 2");
1595 outputContainer->Add(fhConvDispersionMCString) ;
1596
1597 fhConvM02MCString = new TH2F
1598 ("hConvM02MCString","p_{T} of selected conversion pairs from string",100,0.,1.,100,0.,1.);
1599 fhConvM02MCString->SetYTitle("M02 cluster 1");
1600 fhConvM02MCString->SetXTitle("M02 cluster 2");
c4a7d28a 1601 outputContainer->Add(fhConvM02MCString) ;
1602
1603 fhConvDistMCConversion = new TH2F
1604 ("hConvDistMCConversion","calculated conversion distance vs real vertes for MC conversion",100,0.,5.,100,0.,5.);
1605 fhConvDistMCConversion->SetYTitle("distance");
1606 fhConvDistMCConversion->SetXTitle("vertex R");
1607 outputContainer->Add(fhConvDistMCConversion) ;
1608
1609 fhConvDistMCConversionCuts = new TH2F
1610 ("hConvDistMCConversionCuts","calculated conversion distance vs real vertes for MC conversion, deta < 0.05, m < 10 MeV, asym < 0.1",100,0.,5.,100,0.,5.);
1611 fhConvDistMCConversionCuts->SetYTitle("distance");
1612 fhConvDistMCConversionCuts->SetXTitle("vertex R");
1613 outputContainer->Add(fhConvDistMCConversionCuts) ;
20218aea 1614 }
6175da48 1615
521636d2 1616 if(fFillSSHistograms){
1617
3d5d5078 1618 TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
1619
1620 TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ;
1621
1622 for(Int_t i = 0; i < 6; i++){
521636d2 1623
3d5d5078 1624 fhMCELambda0[i] = new TH2F(Form("hELambda0_MC%s",pnamess[i].Data()),
1625 Form("cluster from %s : E vs #lambda_{0}^{2}",ptypess[i].Data()),
521636d2 1626 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3d5d5078 1627 fhMCELambda0[i]->SetYTitle("#lambda_{0}^{2}");
1628 fhMCELambda0[i]->SetXTitle("E (GeV)");
1629 outputContainer->Add(fhMCELambda0[i]) ;
521636d2 1630
3d5d5078 1631 fhMCELambda1[i] = new TH2F(Form("hELambda1_MC%s",pnamess[i].Data()),
1632 Form("cluster from %s : E vs #lambda_{1}^{2}",ptypess[i].Data()),
521636d2 1633 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3d5d5078 1634 fhMCELambda1[i]->SetYTitle("#lambda_{1}^{2}");
1635 fhMCELambda1[i]->SetXTitle("E (GeV)");
1636 outputContainer->Add(fhMCELambda1[i]) ;
7c65ad18 1637
3d5d5078 1638 fhMCEDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pnamess[i].Data()),
1639 Form("cluster from %s : E vs dispersion^{2}",ptypess[i].Data()),
521636d2 1640 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3d5d5078 1641 fhMCEDispersion[i]->SetYTitle("D^{2}");
1642 fhMCEDispersion[i]->SetXTitle("E (GeV)");
1643 outputContainer->Add(fhMCEDispersion[i]) ;
7c65ad18 1644
f66d95af 1645 fhMCNCellsE[i] = new TH2F (Form("hNCellsE_MC%s",pnamess[i].Data()),
1646 Form("# of cells in cluster from %s vs E of clusters",ptypess[i].Data()),
1647 nptbins,ptmin,ptmax, nbins,nmin,nmax);
1648 fhMCNCellsE[i]->SetXTitle("E (GeV)");
1649 fhMCNCellsE[i]->SetYTitle("# of cells in cluster");
1650 outputContainer->Add(fhMCNCellsE[i]);
1651
1652 fhMCMaxCellDiffClusterE[i] = new TH2F (Form("hMaxCellDiffClusterE_MC%s",pnamess[i].Data()),
1653 Form("energy vs difference of cluster energy from %s - max cell energy / cluster energy, good clusters",ptypess[i].Data()),
1654 nptbins,ptmin,ptmax, 500,0,1.);
1655 fhMCMaxCellDiffClusterE[i]->SetXTitle("E_{cluster} (GeV) ");
1656 fhMCMaxCellDiffClusterE[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1657 outputContainer->Add(fhMCMaxCellDiffClusterE[i]);
1658
1659 fhMCLambda0vsClusterMaxCellDiffE0[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
1660 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
1661 ssbins,ssmin,ssmax,500,0,1.);
1662 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetXTitle("#lambda_{0}^{2}");
1663 fhMCLambda0vsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1664 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE0[i]) ;
1665
1666 fhMCLambda0vsClusterMaxCellDiffE2[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
1667 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
1668 ssbins,ssmin,ssmax,500,0,1.);
1669 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetXTitle("#lambda_{0}^{2}");
1670 fhMCLambda0vsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1671 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE2[i]) ;
1672
1673 fhMCLambda0vsClusterMaxCellDiffE6[i] = new TH2F(Form("hLambda0vsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
1674 Form("cluster from %s : #lambda^{2}_{0} vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()),
1675 ssbins,ssmin,ssmax,500,0,1.);
1676 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetXTitle("#lambda_{0}^{2}");
1677 fhMCLambda0vsClusterMaxCellDiffE6[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1678 outputContainer->Add(fhMCLambda0vsClusterMaxCellDiffE6[i]) ;
1679
1680 fhMCNCellsvsClusterMaxCellDiffE0[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE0_MC%s",pnamess[i].Data()),
1681 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E < 2 GeV",ptypess[i].Data()),
1682 nbins/5,nmin,nmax/5,500,0,1.);
1683 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetXTitle("N cells in cluster");
1684 fhMCNCellsvsClusterMaxCellDiffE0[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1685 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE0[i]) ;
1686
1687 fhMCNCellsvsClusterMaxCellDiffE2[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE2_MC%s",pnamess[i].Data()),
1688 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, 2< E < 6 GeV",ptypess[i].Data()),
1689 nbins/5,nmin,nmax/5,500,0,1.);
1690 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetXTitle("N cells in cluster");
1691 fhMCNCellsvsClusterMaxCellDiffE2[i]->SetYTitle("(E_{cluster} - E_{cell max})/ E_{cluster}");
1692 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE2[i]) ;
1693
1694 fhMCNCellsvsClusterMaxCellDiffE6[i] = new TH2F(Form("hNCellsvsClusterMaxCellDiffE6_MC%s",pnamess[i].Data()),
1695 Form("cluster from %s : N cells in cluster vs fraction of energy carried by max cell, E > 6 GeV",ptypess[i].Data()),
1696 nbins/5,nmin,nmax/5,500,0,1.);
1697 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetXTitle("N cells in cluster");
1698 fhMCNCellsvsClusterMaxCellDiffE6[i]->SetYTitle("E (GeV)");
1699 outputContainer->Add(fhMCNCellsvsClusterMaxCellDiffE6[i]) ;
1700
3d5d5078 1701 }// loop
1702
1703 if(!GetReader()->IsEmbeddedClusterSelectionOn())
1704 {
1705 fhMCPhotonELambda0NoOverlap = new TH2F("hELambda0_MCPhoton_NoOverlap",
1706 "cluster from Photon : E vs #lambda_{0}^{2}",
1707 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1708 fhMCPhotonELambda0NoOverlap->SetYTitle("#lambda_{0}^{2}");
1709 fhMCPhotonELambda0NoOverlap->SetXTitle("E (GeV)");
1710 outputContainer->Add(fhMCPhotonELambda0NoOverlap) ;
1711
3d5d5078 1712 fhMCPhotonELambda0TwoOverlap = new TH2F("hELambda0_MCPhoton_TwoOverlap",
1713 "cluster from Photon : E vs #lambda_{0}^{2}",
1714 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1715 fhMCPhotonELambda0TwoOverlap->SetYTitle("#lambda_{0}^{2}");
1716 fhMCPhotonELambda0TwoOverlap->SetXTitle("E (GeV)");
1717 outputContainer->Add(fhMCPhotonELambda0TwoOverlap) ;
1718
3d5d5078 1719 fhMCPhotonELambda0NOverlap = new TH2F("hELambda0_MCPhoton_NOverlap",
1720 "cluster from Photon : E vs #lambda_{0}^{2}",
1721 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1722 fhMCPhotonELambda0NOverlap->SetYTitle("#lambda_{0}^{2}");
1723 fhMCPhotonELambda0NOverlap->SetXTitle("E (GeV)");
1724 outputContainer->Add(fhMCPhotonELambda0NOverlap) ;
521636d2 1725
3d5d5078 1726 } //No embedding
1727
1728 //Fill histograms to check shape of embedded clusters
1729 if(GetReader()->IsEmbeddedClusterSelectionOn())
1730 {
1731
1732 fhEmbeddedSignalFractionEnergy = new TH2F("hEmbeddedSignal_FractionEnergy",
1733 "Energy Fraction of embedded signal versus cluster energy",
1734 nptbins,ptmin,ptmax,100,0.,1.);
1735 fhEmbeddedSignalFractionEnergy->SetYTitle("Fraction");
1736 fhEmbeddedSignalFractionEnergy->SetXTitle("E (GeV)");
1737 outputContainer->Add(fhEmbeddedSignalFractionEnergy) ;
1738
1739 fhEmbedPhotonELambda0FullSignal = new TH2F("hELambda0_EmbedPhoton_FullSignal",
1740 "cluster from Photon embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
1741 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1742 fhEmbedPhotonELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
1743 fhEmbedPhotonELambda0FullSignal->SetXTitle("E (GeV)");
1744 outputContainer->Add(fhEmbedPhotonELambda0FullSignal) ;
7c65ad18 1745
3d5d5078 1746 fhEmbedPhotonELambda0MostlySignal = new TH2F("hELambda0_EmbedPhoton_MostlySignal",
1747 "cluster from Photon embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
1748 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1749 fhEmbedPhotonELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
1750 fhEmbedPhotonELambda0MostlySignal->SetXTitle("E (GeV)");
1751 outputContainer->Add(fhEmbedPhotonELambda0MostlySignal) ;
1752
3d5d5078 1753 fhEmbedPhotonELambda0MostlyBkg = new TH2F("hELambda0_EmbedPhoton_MostlyBkg",
1754 "cluster from Photon embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
1755 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1756 fhEmbedPhotonELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
1757 fhEmbedPhotonELambda0MostlyBkg->SetXTitle("E (GeV)");
1758 outputContainer->Add(fhEmbedPhotonELambda0MostlyBkg) ;
7c65ad18 1759
3d5d5078 1760 fhEmbedPhotonELambda0FullBkg = new TH2F("hELambda0_EmbedPhoton_FullBkg",
1761 "cluster from Photonm embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
1762 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1763 fhEmbedPhotonELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
1764 fhEmbedPhotonELambda0FullBkg->SetXTitle("E (GeV)");
1765 outputContainer->Add(fhEmbedPhotonELambda0FullBkg) ;
1766
3d5d5078 1767 fhEmbedPi0ELambda0FullSignal = new TH2F("hELambda0_EmbedPi0_FullSignal",
1768 "cluster from Pi0 embedded with more than 90% energy in cluster : E vs #lambda_{0}^{2}",
1769 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1770 fhEmbedPi0ELambda0FullSignal->SetYTitle("#lambda_{0}^{2}");
1771 fhEmbedPi0ELambda0FullSignal->SetXTitle("E (GeV)");
1772 outputContainer->Add(fhEmbedPi0ELambda0FullSignal) ;
7c65ad18 1773
3d5d5078 1774 fhEmbedPi0ELambda0MostlySignal = new TH2F("hELambda0_EmbedPi0_MostlySignal",
1775 "cluster from Pi0 embedded with 50% to 90% energy in cluster : E vs #lambda_{0}^{2}",
1776 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1777 fhEmbedPi0ELambda0MostlySignal->SetYTitle("#lambda_{0}^{2}");
1778 fhEmbedPi0ELambda0MostlySignal->SetXTitle("E (GeV)");
1779 outputContainer->Add(fhEmbedPi0ELambda0MostlySignal) ;
1780
3d5d5078 1781 fhEmbedPi0ELambda0MostlyBkg = new TH2F("hELambda0_EmbedPi0_MostlyBkg",
1782 "cluster from Pi0 embedded with 10% to 50% energy in cluster : E vs #lambda_{0}^{2}",
1783 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1784 fhEmbedPi0ELambda0MostlyBkg->SetYTitle("#lambda_{0}^{2}");
1785 fhEmbedPi0ELambda0MostlyBkg->SetXTitle("E (GeV)");
1786 outputContainer->Add(fhEmbedPi0ELambda0MostlyBkg) ;
1787
3d5d5078 1788 fhEmbedPi0ELambda0FullBkg = new TH2F("hELambda0_EmbedPi0_FullBkg",
1789 "cluster from Pi0 embedded with 0% to 10% energy in cluster : E vs #lambda_{0}^{2}",
1790 nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1791 fhEmbedPi0ELambda0FullBkg->SetYTitle("#lambda_{0}^{2}");
1792 fhEmbedPi0ELambda0FullBkg->SetXTitle("E (GeV)");
1793 outputContainer->Add(fhEmbedPi0ELambda0FullBkg) ;
7c65ad18 1794
3d5d5078 1795 }// embedded histograms
1796
521636d2 1797
1798 }// Fill SS MC histograms
1799
477d6cee 1800 }//Histos with MC
0c1383b5 1801
d39cba7e 1802 //Store calo PID histograms
d9105d92 1803 if(fRejectTrackMatch && IsCaloPIDOn()){
d39cba7e 1804 TList * caloPIDHistos = GetCaloPID()->GetCreateOutputObjects() ;
1805 for(Int_t i = 0; i < caloPIDHistos->GetEntries(); i++) {
1806 outputContainer->Add(caloPIDHistos->At(i)) ;
1807 }
1808 delete caloPIDHistos;
1809 }
1810
477d6cee 1811 return outputContainer ;
1812
1c5acb87 1813}
1814
6639984f 1815//____________________________________________________________________________
1816void AliAnaPhoton::Init()
1817{
1818
1819 //Init
1820 //Do some checks
1e86c71e 1821 if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD()){
591cc579 1822 printf("AliAnaPhoton::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
6639984f 1823 abort();
1824 }
1e86c71e 1825 else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD()){
591cc579 1826 printf("AliAnaPhoton::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
6639984f 1827 abort();
1828 }
1829
1830}
1831
1c5acb87 1832//____________________________________________________________________________
1833void AliAnaPhoton::InitParameters()
1834{
1835
1836 //Initialize the parameters of the analysis.
a3aebfff 1837 AddToHistogramsName("AnaPhoton_");
521636d2 1838
6175da48 1839 fCalorimeter = "EMCAL" ;
1840 fMinDist = 2.;
1841 fMinDist2 = 4.;
1842 fMinDist3 = 5.;
1843 fMassCut = 0.03; //30 MeV
1e86c71e 1844
4cf55759 1845 fTimeCutMin = -1;
1846 fTimeCutMax = 9999999;
6175da48 1847 fNCellsCut = 0;
2ac125bf 1848
1e86c71e 1849 fRejectTrackMatch = kTRUE ;
1850 fCheckConversion = kFALSE;
20218aea 1851 fRemoveConvertedPair = kFALSE;
1e86c71e 1852 fAddConvertedPairsToAOD = kFALSE;
1853
1c5acb87 1854}
1855
1856//__________________________________________________________________
1857void AliAnaPhoton::MakeAnalysisFillAOD()
1858{
f8006433 1859 //Do photon analysis and fill aods
f37fa8d2 1860
6175da48 1861 //Get the vertex
5025c139 1862 Double_t v[3] = {0,0,0}; //vertex ;
1863 GetReader()->GetVertex(v);
f8006433 1864
f37fa8d2 1865 //Select the Calorimeter of the photon
c8fe2783 1866 TObjArray * pl = 0x0;
477d6cee 1867 if(fCalorimeter == "PHOS")
be518ab0 1868 pl = GetPHOSClusters();
477d6cee 1869 else if (fCalorimeter == "EMCAL")
be518ab0 1870 pl = GetEMCALClusters();
5ae09196 1871
1872 if(!pl) {
1873 Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data());
1874 return;
1875 }
521636d2 1876
6175da48 1877 //Init arrays, variables, get number of clusters
1e86c71e 1878 TLorentzVector mom, mom2 ;
1879 Int_t nCaloClusters = pl->GetEntriesFast();
6175da48 1880 //List to be used in conversion analysis, to tag the cluster as candidate for conversion
20218aea 1881 Bool_t * indexConverted = 0x0;
1882 if(fCheckConversion){
1883 indexConverted = new Bool_t[nCaloClusters];
1884 for (Int_t i = 0; i < nCaloClusters; i++)
1885 indexConverted[i] = kFALSE;
1886 }
1887
6175da48 1888 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillAOD() - input %s cluster entries %d\n", fCalorimeter.Data(), nCaloClusters);
521636d2 1889
6175da48 1890 //----------------------------------------------------
1891 // Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects
1892 //----------------------------------------------------
1893 // Loop on clusters
1e86c71e 1894 for(Int_t icalo = 0; icalo < nCaloClusters; icalo++){
1895
0ae57829 1896 AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
1897 //printf("calo %d, %f\n",icalo,calo->E());
521636d2 1898
f8006433 1899 //Get the index where the cluster comes, to retrieve the corresponding vertex
c8fe2783 1900 Int_t evtIndex = 0 ;
1901 if (GetMixedEvent()) {
1902 evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
5025c139 1903 //Get the vertex and check it is not too large in z
96539743 1904 if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue;
c8fe2783 1905 }
521636d2 1906
1907 //Cluster selection, not charged, with photon id and in fiducial cut
f8006433 1908 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC){
1909 calo->GetMomentum(mom,GetVertex(evtIndex)) ;}//Assume that come from vertex in straight line
1910 else{
1911 Double_t vertex[]={0,0,0};
1912 calo->GetMomentum(mom,vertex) ;
1913 }
c8fe2783 1914
6175da48 1915 //--------------------------------------
1916 // Cluster selection
1917 //--------------------------------------
c4a7d28a 1918 if(!ClusterSelected(calo,mom)) continue;
6175da48 1919
1920 //----------------------------
1921 //Create AOD for analysis
1922 //----------------------------
1923 AliAODPWG4Particle aodph = AliAODPWG4Particle(mom);
1924
1925 //...............................................
1926 //Set the indeces of the original caloclusters (MC, ID), and calorimeter
1927 Int_t label = calo->GetLabel();
1928 aodph.SetLabel(label);
6175da48 1929 aodph.SetCaloLabel(calo->GetID(),-1);
1930 aodph.SetDetector(fCalorimeter);
c4a7d28a 1931 //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
521636d2 1932
6175da48 1933 //...............................................
1934 //Set bad channel distance bit
c4a7d28a 1935 Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
f37fa8d2 1936 if (distBad > fMinDist3) aodph.SetDistToBad(2) ;
477d6cee 1937 else if(distBad > fMinDist2) aodph.SetDistToBad(1) ;
f37fa8d2 1938 else aodph.SetDistToBad(0) ;
af7b3903 1939 //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad());
c8fe2783 1940
521636d2 1941 //--------------------------------------------------------------------------------------
1942 //Play with the MC stack if available
1943 //--------------------------------------------------------------------------------------
1944
1945 //Check origin of the candidates
1946 if(IsDataMC()){
1947 aodph.SetTag(GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(), aodph.GetInputFileIndex()));
3d5d5078 1948
521636d2 1949 if(GetDebug() > 0)
1950 printf("AliAnaPhoton::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag());
1951 }//Work with stack also
1952
1953 //--------------------------------------------------------------------------------------
1954 //Fill some shower shape histograms before PID is applied
1955 //--------------------------------------------------------------------------------------
1956
1957 FillShowerShapeHistograms(calo,aodph.GetTag());
6175da48 1958
1959 //-------------------------------------
f37fa8d2 1960 //PID selection or bit setting
6175da48 1961 //-------------------------------------
1962 // MC
477d6cee 1963 if(GetReader()->GetDataType() == AliCaloTrackReader::kMC){
f37fa8d2 1964 //Get most probable PID, check PID weights (in MC this option is mandatory)
21a4b1c0 1965 aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(fCalorimeter,calo->GetPID(),mom.E()));//PID with weights
1966 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType());
f37fa8d2 1967 //If primary is not photon, skip it.
21a4b1c0 1968 if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ;
6175da48 1969 }
1970 //...............................................
1971 // Data, PID check on
477d6cee 1972 else if(IsCaloPIDOn()){
f37fa8d2 1973 //Get most probable PID, 2 options check PID weights
3d5d5078 1974 //or redo PID, recommended option for MCEal.
477d6cee 1975 if(!IsCaloPIDRecalculationOn())
21a4b1c0 1976 aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(fCalorimeter,calo->GetPID(),mom.E()));//PID with weights
477d6cee 1977 else
21a4b1c0 1978 aodph.SetIdentifiedParticleType(GetCaloPID()->GetIdentifiedParticleType(fCalorimeter,mom,calo));//PID recalculated
477d6cee 1979
21a4b1c0 1980 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType());
477d6cee 1981
f37fa8d2 1982 //If cluster does not pass pid, not photon, skip it.
21a4b1c0 1983 if(aodph.GetIdentifiedParticleType() != AliCaloPID::kPhoton) continue ;
477d6cee 1984
1985 }
6175da48 1986 //...............................................
1987 // Data, PID check off
477d6cee 1988 else{
f37fa8d2 1989 //Set PID bits for later selection (AliAnaPi0 for example)
1990 //GetPDG already called in SetPIDBits.
f2ccb5b8 1991 GetCaloPID()->SetPIDBits(fCalorimeter,calo,&aodph, GetCaloUtils());
a3aebfff 1992 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PID Bits set \n");
477d6cee 1993 }
1994
21a4b1c0 1995 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n",aodph.Pt(), aodph.GetIdentifiedParticleType());
477d6cee 1996
477d6cee 1997
6175da48 1998 //--------------------------------------------------------------------------------------
1999 // Conversions pairs analysis
f37fa8d2 2000 // Check if cluster comes from a conversion in the material in front of the calorimeter
2001 // Do invariant mass of all pairs, if mass is close to 0, then it is conversion.
6175da48 2002 //--------------------------------------------------------------------------------------
521636d2 2003
6175da48 2004 // Do analysis only if there are more than one cluster
20218aea 2005 if( nCaloClusters > 1 && fCheckConversion){
c8fe2783 2006 Bool_t bConverted = kFALSE;
2007 Int_t id2 = -1;
1e86c71e 2008
f37fa8d2 2009 //Check if set previously as converted couple, if so skip its use.
20218aea 2010 if (indexConverted[icalo]) continue;
1e86c71e 2011
6175da48 2012 // Second cluster loop
c8fe2783 2013 for(Int_t jcalo = icalo + 1 ; jcalo < nCaloClusters ; jcalo++) {
f37fa8d2 2014 //Check if set previously as converted couple, if so skip its use.
c8fe2783 2015 if (indexConverted[jcalo]) continue;
f37fa8d2 2016 //printf("Check Conversion indeces %d and %d\n",icalo,jcalo);
521636d2 2017 AliVCluster * calo2 = (AliVCluster*) (pl->At(jcalo)); //Get cluster kinematics
6175da48 2018
c4a7d28a 2019
6175da48 2020 //Mixed event, get index of event
c8fe2783 2021 Int_t evtIndex2 = 0 ;
2022 if (GetMixedEvent()) {
2023 evtIndex2=GetMixedEvent()->EventIndexForCaloCluster(calo2->GetID()) ;
f8006433 2024
6175da48 2025 }
2026
2027 //Get kinematics of second cluster
f8006433 2028 if(GetReader()->GetDataType() != AliCaloTrackReader::kMC){
8cdc266d 2029 calo2->GetMomentum(mom2,GetVertex(evtIndex2)) ;}//Assume that come from vertex in straight line
f8006433 2030 else{
2031 Double_t vertex[]={0,0,0};
8cdc266d 2032 calo2->GetMomentum(mom2,vertex) ;
f8006433 2033 }
2034
c4a7d28a 2035 //--------------------------------------
2036 // Cluster selection
2037 //--------------------------------------
2038
2039 if(!ClusterSelected(calo2,mom2)) continue;
2040
2041 //................................................
2042 // Get TOF of each cluster in pair, calculate difference if small,
2043 // take this pair. Way to reject clusters from hadrons (or pileup?)
2044 Double_t t12diff = calo2->GetTOF()-calo->GetTOF()*1e9;
2045 if(TMath::Abs(t12diff) > GetPairTimeCut()) continue;
c8fe2783 2046
6175da48 2047 //................................................
f37fa8d2 2048 //Get mass of pair, if small, take this pair.
41121cfe 2049 Float_t pairM = (mom+mom2).M();
2050 //printf("\t both in calo, mass %f, cut %f\n",pairM,fMassCut);
2051 if(pairM < fMassCut){
2052 aodph.SetTagged(kFALSE);
c8fe2783 2053 id2 = calo2->GetID();
6175da48 2054 indexConverted[icalo]=kTRUE;
c4a7d28a 2055 indexConverted[jcalo]=kTRUE;
41121cfe 2056 Float_t asymmetry = TMath::Abs(mom.E()-mom2.E())/(mom.E()+mom2.E());
2057 Float_t dPhi = mom.Phi()-mom2.Phi();
d39cba7e 2058 Float_t dEta = mom.Eta()-mom2.Eta();
41121cfe 2059
c4a7d28a 2060 //...............................................
2061 //Fill few histograms with kinematics of the pair
2062 //FIXME, move all this to MakeAnalysisFillHistograms ...
2063
2064 fhConvDeltaEta ->Fill( pairM, dPhi );
2065 fhConvDeltaPhi ->Fill( pairM, dEta );
2066 fhConvAsym ->Fill( pairM, asymmetry );
2067 fhConvDeltaEtaPhi->Fill( dEta , dPhi );
2068 fhConvPt ->Fill( pairM, (mom+mom2).Pt());
2069
d39cba7e 2070 //Estimate conversion distance, T. Awes, M. Ivanov
2071 //Under the assumption that the pair has zero mass, and that each electron
2072 //of the pair has the same momentum, they will each have the same bend radius
2073 //given by R=p/(qB) = p / (300 B) with p in [MeV/c], B in [Tesla] and R in [m].
2074 //With nominal ALICE magnet current of 30kA B=0.5T, and so with E_cluster=p,
2075 //R = E/1.5 [cm]. Under these assumptions, the distance from the conversion
3d5d5078 2076 //point to the MCEal can be related to the separation distance, L=2y, on the MCEal
d39cba7e 2077 //as d = sqrt(R^2 -(R-y)^2) = sqrt(2Ry - y^2). And since R>>y we can write as
2078 //d = sqrt(E*L/1.5) where E is the cluster energy and L is the distance in cm between
2079 //the clusters.
c4a7d28a 2080 Float_t pos1[3];
2081 calo->GetPosition(pos1);
2082 Float_t pos2[3];
2083 calo2->GetPosition(pos2);
2084 Float_t clustDist = TMath::Sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+
521636d2 2085 (pos1[1]-pos2[1])*(pos1[1]-pos2[1])+
2086 (pos1[2]-pos2[2])*(pos1[2]-pos2[2]));
c4a7d28a 2087
2088 Float_t convDist = TMath::Sqrt(mom.E() *clustDist*0.01/0.15);
2089 Float_t convDist2 = TMath::Sqrt(mom2.E()*clustDist*0.01/0.15);
2090 //printf("l = %f, e1 = %f, d1=%f, e2 = %f, d2=%f\n",clustDist,mom.E(),convDist,mom2.E(),convDist2);
8cdc266d 2091 if(GetDebug() > 2)
41121cfe 2092 printf("AliAnaPhoton::MakeAnalysisFillAOD(): Pair with mass %2.3f < %2.3f, %1.2f < dPhi %2.2f < %2.2f, dEta %f < %2.2f, asymmetry %2.2f< %2.2f; \n cluster1 id %d, e %2.3f SM %d, eta %2.3f, phi %2.3f ; \n cluster2 id %d, e %2.3f, SM %d,eta %2.3f, phi %2.3f\n",
2093 pairM,fMassCut,fConvDPhiMinCut, dPhi, fConvDPhiMaxCut, dEta, fConvDEtaCut, asymmetry, fConvAsymCut,
8cdc266d 2094 calo->GetID(),calo->E(),GetCaloUtils()->GetModuleNumber(calo), mom.Eta(), mom.Phi(),
2095 id2, calo2->E(), GetCaloUtils()->GetModuleNumber(calo2),mom2.Eta(), mom2.Phi());
6175da48 2096
c4a7d28a 2097 fhConvDistEta ->Fill(mom .Eta(), convDist );
2098 fhConvDistEta ->Fill(mom2.Eta(), convDist2);
521636d2 2099 fhConvDistEn ->Fill(mom .E(), convDist );
2100 fhConvDistEn ->Fill(mom2.E(), convDist2);
c4a7d28a 2101 fhConvDistMass->Fill((mom+mom2).M(), convDist );
2102 //dEta cut
2103 if(dEta<0.05){
2104 fhConvDistEtaCutEta ->Fill(mom .Eta(), convDist );
2105 fhConvDistEtaCutEta ->Fill(mom2.Eta(), convDist2);
2106 fhConvDistEnCutEta ->Fill(mom .E(), convDist );
2107 fhConvDistEnCutEta ->Fill(mom2.E(), convDist2);
2108 fhConvDistMassCutEta->Fill((mom+mom2).M(), convDist );
2109 //mass cut
2110 if(pairM<0.01){//10 MeV
2111 fhConvDistEtaCutMass ->Fill(mom .Eta(), convDist );
2112 fhConvDistEtaCutMass ->Fill(mom2.Eta(), convDist2);
2113 fhConvDistEnCutMass ->Fill(mom .E(), convDist );
2114 fhConvDistEnCutMass ->Fill(mom2.E(), convDist2);
2115 // asymmetry cut
2116 if(asymmetry<0.1){
2117 fhConvDistEtaCutAsy ->Fill(mom .Eta(), convDist );
2118 fhConvDistEtaCutAsy ->Fill(mom2.Eta(), convDist2);
2119 fhConvDistEnCutAsy ->Fill(mom .E(), convDist );
2120 fhConvDistEnCutAsy ->Fill(mom2.E(), convDist2);
2121 }//asymmetry cut
2122 }//mass cut
2123 }//dEta cut
6175da48 2124
2125 //...............................................
2126 //Select pairs in a eta-phi window
41121cfe 2127 if(TMath::Abs(dEta) < fConvDEtaCut &&
2128 TMath::Abs(dPhi) < fConvDPhiMaxCut &&
2129 TMath::Abs(dPhi) > fConvDPhiMinCut &&
2130 asymmetry < fConvAsymCut ){
521636d2 2131 bConverted = kTRUE;
41121cfe 2132 }
2133 //printf("Accepted? %d\n",bConverted);
6175da48 2134 //...........................................
2135 //Fill more histograms, simulated data
2136 //FIXME, move all this to MakeAnalysisFillHistograms ...
2137 if(IsDataMC()){
2138
2139 //Check the origin of the pair, look for conversion, antinucleons or jet correlations (strings)
2140 Int_t ancPDG = 0;
2141 Int_t ancStatus = 0;
2142 TLorentzVector momentum;
c4a7d28a 2143 TVector3 prodVertex;
6175da48 2144 Int_t ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(calo->GetLabel(), calo2->GetLabel(),
c4a7d28a 2145 GetReader(), ancPDG, ancStatus, momentum, prodVertex);
6175da48 2146
2147 // printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Common ancestor label %d, pdg %d, name %s, status %d; \n",
2148 // ancLabel,ancPDG,TDatabasePDG::Instance()->GetParticle(ancPDG)->GetName(),ancStatus);
2149
2150 Int_t tag2 = GetMCAnalysisUtils()->CheckOrigin(calo2->GetLabels(),calo2->GetNLabels(),GetReader(), 0);
2151 if(GetMCAnalysisUtils()->CheckTagBit(aodph.GetTag(),AliMCAnalysisUtils::kMCConversion)){
2152 if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCConversion) && (ancPDG==22 || TMath::Abs(ancPDG)==11) && ancLabel > -1){
41121cfe 2153 fhConvDeltaEtaMCConversion ->Fill( pairM, dEta );
2154 fhConvDeltaPhiMCConversion ->Fill( pairM, dPhi );
2155 fhConvAsymMCConversion ->Fill( pairM, asymmetry );
2156 fhConvDeltaEtaPhiMCConversion->Fill( dEta , dPhi );
2157 fhConvPtMCConversion ->Fill( pairM, (mom+mom2).Pt());
6175da48 2158 fhConvDispersionMCConversion ->Fill( calo->GetDispersion(), calo2->GetDispersion());
2159 fhConvM02MCConversion ->Fill( calo->GetM02(), calo2->GetM02());
c4a7d28a 2160 fhConvDistMCConversion ->Fill( convDist , prodVertex.Mag() );
2161 fhConvDistMCConversion ->Fill( convDist2, prodVertex.Mag() );
2162
2163 if(dEta<0.05 && pairM<0.01 && asymmetry<0.1){
2164 fhConvDistMCConversionCuts->Fill( convDist , prodVertex.Mag() );
2165 fhConvDistMCConversionCuts->Fill( convDist2, prodVertex.Mag() );
2166 }
521636d2 2167
6175da48 2168 }
2169 }
2170 else if(GetMCAnalysisUtils()->CheckTagBit(aodph.GetTag(),AliMCAnalysisUtils::kMCAntiNeutron)){
2171 if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCAntiNeutron) && ancPDG==-2112 && ancLabel > -1){
41121cfe 2172 fhConvDeltaEtaMCAntiNeutron ->Fill( pairM, dEta );
2173 fhConvDeltaPhiMCAntiNeutron ->Fill( pairM, dPhi );
2174 fhConvAsymMCAntiNeutron ->Fill( pairM, asymmetry );
2175 fhConvDeltaEtaPhiMCAntiNeutron ->Fill( dEta , dPhi );
2176 fhConvPtMCAntiNeutron ->Fill( pairM, (mom+mom2).Pt());
6175da48 2177 fhConvDispersionMCAntiNeutron ->Fill( calo->GetDispersion(), calo2->GetDispersion());
2178 fhConvM02MCAntiNeutron ->Fill( calo->GetM02(), calo2->GetM02());
2179 }
2180 }
2181 else if(GetMCAnalysisUtils()->CheckTagBit(aodph.GetTag(),AliMCAnalysisUtils::kMCAntiProton)){
2182 if(GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCAntiProton) && ancPDG==-2212 && ancLabel > -1){
41121cfe 2183 fhConvDeltaEtaMCAntiProton ->Fill( pairM, dEta );
2184 fhConvDeltaPhiMCAntiProton ->Fill( pairM, dPhi );
2185 fhConvAsymMCAntiProton ->Fill( pairM, asymmetry );
2186 fhConvDeltaEtaPhiMCAntiProton ->Fill( dEta , dPhi );
2187 fhConvPtMCAntiProton ->Fill( pairM, (mom+mom2).Pt());
6175da48 2188 fhConvDispersionMCAntiProton ->Fill( calo->GetDispersion(), calo2->GetDispersion());
2189 fhConvM02MCAntiProton ->Fill( calo->GetM02(), calo2->GetM02());
2190 }
2191 }
2192
2193 //Pairs coming from fragmenting pairs.
2194 if(ancPDG < 22 && ancLabel > 7 && (ancStatus == 11 || ancStatus == 12) ){
41121cfe 2195 fhConvDeltaEtaMCString ->Fill( pairM, dPhi);
2196 fhConvDeltaPhiMCString ->Fill( pairM, dPhi);
2197 fhConvAsymMCString ->Fill( pairM, TMath::Abs(mom.E()-mom2.E())/(mom.E()+mom2.E()) );
2198 fhConvDeltaEtaPhiMCString ->Fill( dPhi, dPhi );
2199 fhConvPtMCString ->Fill( pairM, (mom+mom2).Pt());
6175da48 2200 fhConvDispersionMCString ->Fill( calo->GetDispersion(), calo2->GetDispersion());
2201 fhConvM02MCString ->Fill( calo->GetM02(), calo2->GetM02());
2202 }
2203
2204 }// Data MC
521636d2 2205
c8fe2783 2206 break;
2207 }
1e86c71e 2208
c8fe2783 2209 }//Mass loop
1e86c71e 2210
6175da48 2211 //..........................................................................................................
2212 //Pair selected as converted, remove both clusters or recombine them into a photon and put them in the AOD
c8fe2783 2213 if(bConverted){
6175da48 2214 //Add to AOD
c8fe2783 2215 if(fAddConvertedPairsToAOD){
f37fa8d2 2216 //Create AOD of pair analysis
c8fe2783 2217 TLorentzVector mpair = mom+mom2;
2218 AliAODPWG4Particle aodpair = AliAODPWG4Particle(mpair);
2219 aodpair.SetLabel(aodph.GetLabel());
f8006433 2220 //aodpair.SetInputFileIndex(input);
c8fe2783 2221
f37fa8d2 2222 //printf("Index %d, Id %d\n",icalo, calo->GetID());
2223 //Set the indeces of the original caloclusters
c8fe2783 2224 aodpair.SetCaloLabel(calo->GetID(),id2);
2225 aodpair.SetDetector(fCalorimeter);
21a4b1c0 2226 aodpair.SetIdentifiedParticleType(aodph.GetIdentifiedParticleType());
c8fe2783 2227 aodpair.SetTag(aodph.GetTag());
6175da48 2228 aodpair.SetTagged(kTRUE);
f37fa8d2 2229 //Add AOD with pair object to aod branch
c8fe2783 2230 AddAODParticle(aodpair);
f37fa8d2 2231 //printf("\t \t both added pair\n");
c8fe2783 2232 }
2233
f37fa8d2 2234 //Do not add the current calocluster
20218aea 2235 if(fRemoveConvertedPair) continue;
6175da48 2236 else {
2237 //printf("TAGGED\n");
2238 //Tag this cluster as likely conversion
2239 aodph.SetTagged(kTRUE);
2240 }
c8fe2783 2241 }//converted pair
2242 }//check conversion
f37fa8d2 2243 //printf("\t \t added single cluster %d\n",icalo);
1e86c71e 2244
6175da48 2245 //FIXME, this to MakeAnalysisFillHistograms ...
f66d95af 2246 Int_t absID = 0;
2247 Float_t maxCellFraction = 0;
2248 AliVCaloCells* cells = 0;
6175da48 2249
f66d95af 2250 if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
2251 else cells = GetPHOSCells();
2252
2253 absID = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction);
2254
2255 fhMaxCellDiffClusterE->Fill(aodph.E(),maxCellFraction);
2256 fhNCellsE ->Fill(aodph.E(),calo->GetNCells());
2257
f37fa8d2 2258 //Add AOD with photon object to aod branch
477d6cee 2259 AddAODParticle(aodph);
2260
2261 }//loop
2262
4a745797 2263 delete [] indexConverted;
2264
f37fa8d2 2265 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast());
477d6cee 2266
1c5acb87 2267}
2268
2269//__________________________________________________________________
2270void AliAnaPhoton::MakeAnalysisFillHistograms()
2271{
6175da48 2272 //Fill histograms
f8006433 2273
6175da48 2274 //-------------------------------------------------------------------
577d9801 2275 // Access MC information in stack if requested, check that it exists.
521636d2 2276 AliStack * stack = 0x0;
2277 TParticle * primary = 0x0;
2278 TClonesArray * mcparticles = 0x0;
2279 AliAODMCParticle * aodprimary = 0x0;
2280
577d9801 2281 if(IsDataMC()){
521636d2 2282
577d9801 2283 if(GetReader()->ReadStack()){
2284 stack = GetMCStack() ;
2285 if(!stack) {
3d5d5078 2286 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called? STOP\n");
2287 abort();
577d9801 2288 }
f8006433 2289
577d9801 2290 }
2291 else if(GetReader()->ReadAODMCParticles()){
f8006433 2292
577d9801 2293 //Get the list of MC particles
521636d2 2294 mcparticles = GetReader()->GetAODMCParticles(0);
2295 if(!mcparticles && GetDebug() > 0) {
3d5d5078 2296 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n");
577d9801 2297 }
577d9801 2298 }
2299 }// is data and MC
521636d2 2300
6175da48 2301
2302 // Get vertex
2244659d 2303 Double_t v[3] = {0,0,0}; //vertex ;
2304 GetReader()->GetVertex(v);
6175da48 2305 //fhVertex->Fill(v[0],v[1],v[2]);
2306 if(TMath::Abs(v[2]) > GetZvertexCut()) return ; // done elsewhere for Single Event analysis, but there for mixed event
2307
2308 //----------------------------------
577d9801 2309 //Loop on stored AOD photons
2310 Int_t naod = GetOutputAODBranch()->GetEntriesFast();
577d9801 2311 if(GetDebug() > 0) printf("AliAnaPhoton::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod);
521636d2 2312
577d9801 2313 for(Int_t iaod = 0; iaod < naod ; iaod++){
2314 AliAODPWG4Particle* ph = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
2315 Int_t pdg = ph->GetIdentifiedParticleType();
521636d2 2316
577d9801 2317 if(GetDebug() > 3)
2318 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - PDG %d, MC TAG %d, Calorimeter %s\n", ph->GetIdentifiedParticleType(),ph->GetTag(), (ph->GetDetector()).Data()) ;
521636d2 2319
577d9801 2320 //If PID used, fill histos with photons in Calorimeter fCalorimeter
2321 if(IsCaloPIDOn() && pdg != AliCaloPID::kPhoton) continue;
2322 if(ph->GetDetector() != fCalorimeter) continue;
521636d2 2323
577d9801 2324 if(GetDebug() > 2)
2325 printf("AliAnaPhoton::MakeAnalysisFillHistograms() - ID Photon: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ;
521636d2 2326
6175da48 2327 //................................
577d9801 2328 //Fill photon histograms
2329 Float_t ptcluster = ph->Pt();
2330 Float_t phicluster = ph->Phi();
2331 Float_t etacluster = ph->Eta();
2332 Float_t ecluster = ph->E();
521636d2 2333
20218aea 2334 fhEPhoton ->Fill(ecluster);
577d9801 2335 fhPtPhoton ->Fill(ptcluster);
2336 fhPhiPhoton ->Fill(ptcluster,phicluster);
2337 fhEtaPhoton ->Fill(ptcluster,etacluster);
521636d2 2338 if (ecluster > 0.5) fhEtaPhiPhoton ->Fill(etacluster, phicluster);
20218aea 2339 else if(GetMinPt() < 0.5) fhEtaPhi05Photon->Fill(etacluster, phicluster);
2340
2341 if(fCheckConversion &&ph->IsTagged()){
2342 fhPtPhotonConv->Fill(ptcluster);
2343 if(ecluster > 0.5) fhEtaPhiPhotonConv ->Fill(etacluster, phicluster);
2344 else if(GetMinPt() < 0.5) fhEtaPhi05PhotonConv->Fill(etacluster, phicluster);
6175da48 2345 }
20218aea 2346
6175da48 2347 //.......................................
577d9801 2348 //Play with the MC data if available
2349 if(IsDataMC()){
521636d2 2350
3d5d5078 2351 FillAcceptanceHistograms();
2352
4c8f7c2e 2353
2354 //....................................................................
2355 // Access MC information in stack if requested, check that it exists.
2356 Int_t label =ph->GetLabel();
2357 if(label < 0) {
2358 if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label);
2359 continue;
2360 }
2361
2362 Float_t eprim = 0;
2363 Float_t ptprim = 0;
2364 if(GetReader()->ReadStack()){
2365
2366 if(label >= stack->GetNtrack()) {
2367 if(GetDebug() > 2) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
2368 continue ;
2369 }
2370
2371 primary = stack->Particle(label);
2372 if(!primary){
2373 printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** no primary ***: label %d \n", label);
2374 continue;
2375 }
2376 eprim = primary->Energy();
2377 ptprim = primary->Pt();
2378
2379 }
2380 else if(GetReader()->ReadAODMCParticles()){
2381 //Check which is the input
2382 if(ph->GetInputFileIndex() == 0){
2383 if(!mcparticles) continue;
2384 if(label >= mcparticles->GetEntriesFast()) {
2385 if(GetDebug() > 2) printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** large label ***: label %d, n tracks %d \n",
2386 label, mcparticles->GetEntriesFast());
2387 continue ;
2388 }
2389 //Get the particle
2390 aodprimary = (AliAODMCParticle*) mcparticles->At(label);
2391
2392 }
2393
2394 if(!aodprimary){
2395 printf("AliAnaPhoton::MakeAnalysisFillHistograms() *** no primary ***: label %d \n", label);
2396 continue;
2397 }
2398
2399 eprim = aodprimary->E();
2400 ptprim = aodprimary->Pt();
2401
2402 }
2403
577d9801 2404 Int_t tag =ph->GetTag();
521636d2 2405
f66d95af 2406 if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[mcPhoton])
3d5d5078 2407 {
2408 fhMCE [mcPhoton] ->Fill(ecluster);
4c8f7c2e 2409 fhMCPt [mcPhoton] ->Fill(ptcluster);
2410 fhMCPhi[mcPhoton] ->Fill(ecluster,phicluster);
2411 fhMCEta[mcPhoton] ->Fill(ecluster,etacluster);
2412
2413 fhMC2E[mcPhoton] ->Fill(ecluster, eprim);
2414 fhMC2Pt[mcPhoton] ->Fill(ptcluster, ptprim);
d9105d92 2415 fhMCDeltaE[mcPhoton] ->Fill(ecluster,eprim-ecluster);
2416 fhMCDeltaPt[mcPhoton]->Fill(ptcluster,ptprim-ptcluster);
3d5d5078 2417
f66d95af 2418 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) && fhMCE[mcConversion])
3d5d5078 2419 {
2420 fhMCE [mcConversion] ->Fill(ecluster);
4c8f7c2e 2421 fhMCPt [mcConversion] ->Fill(ptcluster);
2422 fhMCPhi[mcConversion] ->Fill(ecluster,phicluster);
2423 fhMCEta[mcConversion] ->Fill(ecluster,etacluster);
2424
2425 fhMC2E[mcConversion] ->Fill(ecluster, eprim);
2426 fhMC2Pt[mcConversion] ->Fill(ptcluster, ptprim);
d9105d92 2427 fhMCDeltaE[mcConversion] ->Fill(ecluster,eprim-ecluster);
2428 fhMCDeltaPt[mcConversion]->Fill(ptcluster,ptprim-ptcluster);
3d5d5078 2429
2430 if(fCheckConversion){
2431 if(ph->IsTagged()) fhPtConversionTagged ->Fill(ptcluster);
2432 if(ptcluster > 0.5)fhEtaPhiConversion ->Fill(etacluster,phicluster);
2433 else fhEtaPhi05Conversion ->Fill(etacluster,phicluster);
2434 }
2435 }
2436
f66d95af 2437 if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) && fhMCE[mcPrompt]){
3d5d5078 2438 fhMCE [mcPrompt] ->Fill(ecluster);
4c8f7c2e 2439 fhMCPt [mcPrompt] ->Fill(ptcluster);
2440 fhMCPhi[mcPrompt] ->Fill(ecluster,phicluster);
2441 fhMCEta[mcPrompt] ->Fill(ecluster,etacluster);
2442
2443 fhMC2E[mcPrompt] ->Fill(ecluster, eprim);
2444 fhMC2Pt[mcPrompt] ->Fill(ptcluster, ptprim);
d9105d92 2445 fhMCDeltaE[mcPrompt] ->Fill(ecluster,eprim-ecluster);
2446 fhMCDeltaPt[mcPrompt]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2447
3d5d5078 2448 }
f66d95af 2449 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCFragmentation)&& fhMCE[mcFragmentation])
3d5d5078 2450 {
2451 fhMCE [mcFragmentation] ->Fill(ecluster);
4c8f7c2e 2452 fhMCPt [mcFragmentation] ->Fill(ptcluster);
2453 fhMCPhi[mcFragmentation] ->Fill(ecluster,phicluster);
2454 fhMCEta[mcFragmentation] ->Fill(ecluster,etacluster);
2455
2456 fhMC2E[mcFragmentation] ->Fill(ecluster, eprim);
2457 fhMC2Pt[mcFragmentation] ->Fill(ptcluster, ptprim);
d9105d92 2458 fhMCDeltaE[mcFragmentation] ->Fill(ecluster,eprim-ecluster);
2459 fhMCDeltaPt[mcFragmentation]->Fill(ptcluster,ptprim-ptcluster);
3d5d5078 2460
2461 }
f66d95af 2462 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR)&& fhMCE[mcISR])
3d5d5078 2463 {
2464 fhMCE [mcISR] ->Fill(ecluster);
4c8f7c2e 2465 fhMCPt [mcISR] ->Fill(ptcluster);
2466 fhMCPhi[mcISR] ->Fill(ecluster,phicluster);
2467 fhMCEta[mcISR] ->Fill(ecluster,etacluster);
2468
2469 fhMC2E[mcISR] ->Fill(ecluster, eprim);
2470 fhMC2Pt[mcISR] ->Fill(ptcluster, ptprim);
d9105d92 2471 fhMCDeltaE[mcISR] ->Fill(ecluster,eprim-ecluster);
2472 fhMCDeltaPt[mcISR]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2473
3d5d5078 2474 }
2475 else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) &&
f66d95af 2476 !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[mcPi0Decay])
3d5d5078 2477 {
2478 fhMCE [mcPi0Decay] ->Fill(ecluster);
4c8f7c2e 2479 fhMCPt [mcPi0Decay] ->Fill(ptcluster);
2480 fhMCPhi[mcPi0Decay] ->Fill(ecluster,phicluster);
2481 fhMCEta[mcPi0Decay] ->Fill(ecluster,etacluster);
2482
2483 fhMC2E[mcPi0Decay] ->Fill(ecluster, eprim);
2484 fhMC2Pt[mcPi0Decay] ->Fill(ptcluster, ptprim);
d9105d92 2485 fhMCDeltaE[mcPi0Decay] ->Fill(ecluster,eprim-ecluster);
2486 fhMCDeltaPt[mcPi0Decay]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2487
3d5d5078 2488 }
f586f4aa 2489 else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
2490 GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) ) && fhMCE[mcOtherDecay])
3d5d5078 2491 {
2492 fhMCE [mcOtherDecay] ->Fill(ecluster);
4c8f7c2e 2493 fhMCPt [mcOtherDecay] ->Fill(ptcluster);
2494 fhMCPhi[mcOtherDecay] ->Fill(ecluster,phicluster);
2495 fhMCEta[mcOtherDecay] ->Fill(ecluster,etacluster);
2496
2497 fhMC2E[mcOtherDecay] ->Fill(ecluster, eprim);
2498 fhMC2Pt[mcOtherDecay] ->Fill(ptcluster, ptprim);
d9105d92 2499 fhMCDeltaE[mcOtherDecay] ->Fill(ecluster,eprim-ecluster);
2500 fhMCDeltaPt[mcOtherDecay]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2501
3d5d5078 2502 }
f66d95af 2503 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE [mcPi0])
3d5d5078 2504 {
2505 fhMCE [mcPi0] ->Fill(ecluster);
4c8f7c2e 2506 fhMCPt [mcPi0] ->Fill(ptcluster);
2507 fhMCPhi[mcPi0] ->Fill(ecluster,phicluster);
2508 fhMCEta[mcPi0] ->Fill(ecluster,etacluster);
2509
2510 fhMC2E[mcPi0] ->Fill(ecluster, eprim);
2511 fhMC2Pt[mcPi0] ->Fill(ptcluster, ptprim);
d9105d92 2512 fhMCDeltaE[mcPi0] ->Fill(ecluster,eprim-ecluster);
2513 fhMCDeltaPt[mcPi0]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2514
f66d95af 2515 }
2516 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) && fhMCE[mcEta])
2517 {
2518 fhMCE [mcEta] ->Fill(ecluster);
4c8f7c2e 2519 fhMCPt [mcEta] ->Fill(ptcluster);
2520 fhMCPhi[mcEta] ->Fill(ecluster,phicluster);
2521 fhMCEta[mcEta] ->Fill(ecluster,etacluster);
2522
2523 fhMC2E[mcEta] ->Fill(ecluster, eprim);
2524 fhMC2Pt[mcEta] ->Fill(ptcluster, ptprim);
d9105d92 2525 fhMCDeltaE[mcEta] ->Fill(ecluster,eprim-ecluster);
2526 fhMCDeltaPt[mcEta]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2527
f66d95af 2528 }
3d5d5078 2529 }
f66d95af 2530 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) && fhMCE[mcAntiNeutron])
3d5d5078 2531 {
2532 fhMCE [mcAntiNeutron] ->Fill(ecluster);
4c8f7c2e 2533 fhMCPt [mcAntiNeutron] ->Fill(ptcluster);
2534 fhMCPhi[mcAntiNeutron] ->Fill(ecluster,phicluster);
2535 fhMCEta[mcAntiNeutron] ->Fill(ecluster,etacluster);
3d5d5078 2536 if(ph->IsTagged() && fCheckConversion) fhPtAntiNeutronTagged ->Fill(ptcluster);
2537
4c8f7c2e 2538 fhMC2E[mcAntiNeutron] ->Fill(ecluster, eprim);
2539 fhMC2Pt[mcAntiNeutron] ->Fill(ptcluster, ptprim);
d9105d92 2540 fhMCDeltaE[mcAntiNeutron] ->Fill(ecluster,eprim-ecluster);
2541 fhMCDeltaPt[mcAntiNeutron]->Fill(ptcluster,ptprim-ptcluster);
4c8f7c2e 2542
3d5d5078 2543 }
f66d95af 2544 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) && fhMCE[mcAntiProton])
3d5d5078 2545 {
2546 fhMCE [mcAntiProton] ->Fill(ecluster);
4c8f7c2e 2547 fhMCPt [mcAntiProton] ->Fill(ptcluster);
2548 fhMCPhi[mcAntiProton] ->Fill(ecluster,phicluster);
2549 fhMCEta[mcAntiProton] ->Fill(ecluster,etacluster);
3d5d5078 2550 if(ph->IsTagged() && fCheckConversion) fhPtAntiProtonTagged ->Fill(ptcluster);
4c8f7c2e 2551
2552 fhMC2E[mcAntiProton] ->Fill(ecluster, eprim);
2553 fhMC2Pt[mcAntiProton] ->Fill(ptcluster, ptprim);
d9105d92 2554 fhMCDeltaE[mcAntiProton] ->Fill(ecluster,eprim-ecluster);
2555 fhMCDeltaPt[mcAntiProton]->Fill(ecluster,ptprim-ptcluster);
4c8f7c2e 2556
3d5d5078 2557 }
f66d95af 2558 else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) && fhMCE[mcElectron])
3d5d5078 2559 {
2560 fhMCE [mcElectron] ->Fill(ecluster);
4c8f7c2e 2561 fhMCPt [mcElectron] ->Fill(ptcluster);
2562 fhMCPhi[mcElectron] ->Fill(ecluster,phicluster);
2563 fhMCEta[mcElectron] ->Fill(ecluster,etacluster);
2564
2565 fhMC2E[mcElectron] ->Fill(ecluster, eprim);
2566 fhMC2Pt[mcElectron] ->Fill(ptcluster, ptprim);
d9105d92 2567 fhMCDeltaE[mcElectron] ->Fill(ecluster,eprim-ecluster);
2568 fhMCDeltaPt[mcElectron]->Fill(ecluster,ptprim-ptcluster);
3d5d5078 2569 }
f66d95af 2570 else if( fhMCE[mcOther]){
3d5d5078 2571 fhMCE [mcOther] ->Fill(ecluster);
4c8f7c2e 2572 fhMCPt [mcOther] ->Fill(ptcluster);
2573 fhMCPhi[mcOther] ->Fill(ecluster,phicluster);
2574 fhMCEta[mcOther] ->Fill(ecluster,etacluster);
20218aea 2575 if(ph->IsTagged() && fCheckConversion) fhPtUnknownTagged ->Fill(ptcluster);
521636d2 2576
4c8f7c2e 2577 fhMC2E[mcOther] ->Fill(ecluster, eprim);
2578 fhMC2Pt[mcOther] ->Fill(ptcluster, ptprim);
d9105d92 2579 fhMCDeltaE[mcOther] ->Fill(ecluster,eprim-ecluster);
2580 fhMCDeltaPt[mcOther]->Fill(ecluster,ptprim-ptcluster);
4c8f7c2e 2581
3d5d5078 2582
f8006433 2583 // printf(" AliAnaPhoton::MakeAnalysisFillHistograms() - Label %d, pT %2.3f Unknown, bits set: ",
2584 // ph->GetLabel(),ph->Pt());
2585 // for(Int_t i = 0; i < 20; i++) {
2586 // if(GetMCAnalysisUtils()->CheckTagBit(tag,i)) printf(" %d, ",i);
2587 // }
2588 // printf("\n");
2589
577d9801 2590 }
521636d2 2591
577d9801 2592 }//Histograms with MC
521636d2 2593
577d9801 2594 }// aod loop
521636d2 2595
1c5acb87 2596}
2597
2598
2599//__________________________________________________________________
2600void AliAnaPhoton::Print(const Option_t * opt) const
2601{
477d6cee 2602 //Print some relevant parameters set for the analysis
2603
2604 if(! opt)
2605 return;
2606
2607 printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
2608 AliAnaPartCorrBaseClass::Print(" ");
a3aebfff 2609
477d6cee 2610 printf("Calorimeter = %s\n", fCalorimeter.Data()) ;
2611 printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
2612 printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
2613 printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
a3aebfff 2614 printf("Reject clusters with a track matched = %d\n",fRejectTrackMatch);
1e86c71e 2615 printf("Check Pair Conversion = %d\n",fCheckConversion);
2616 printf("Add conversion pair to AOD = %d\n",fAddConvertedPairsToAOD);
2617 printf("Conversion pair mass cut = %f\n",fMassCut);
41121cfe 2618 printf("Conversion selection cut : A < %1.2f; %1.3f < Dphi < %1.3f; Deta < %1.3f\n",
2619 fConvAsymCut,fConvDPhiMinCut, fConvDPhiMaxCut, fConvDEtaCut);
4cf55759 2620 printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax);
2ac125bf 2621 printf("Number of cells in cluster is > %d \n", fNCellsCut);
477d6cee 2622 printf(" \n") ;
1c5acb87 2623
2624}