From: hristov Date: Wed, 31 Jan 2007 14:42:32 +0000 (+0000) Subject: Correction in the photon generation (Gustavo) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=21f3a383c8c3cabba9fc4dd3e3df09ee7d88bf9a;ds=sidebyside Correction in the photon generation (Gustavo) --- diff --git a/PYTHIA6/AliGenPythia.cxx b/PYTHIA6/AliGenPythia.cxx index 1844a3d3a8a..9ad2f82d53f 100644 --- a/PYTHIA6/AliGenPythia.cxx +++ b/PYTHIA6/AliGenPythia.cxx @@ -840,8 +840,10 @@ Int_t AliGenPythia::GenerateMB() TParticle* iparticle = (TParticle *) fParticles->At(i); if(iparticle->GetStatusCode()==1 && iparticle->GetPdgCode()==pdg && iparticle->Pt() > fFragPhotonOrPi0MinPt){ + Int_t imother = iparticle->GetFirstMother(); + TParticle* pmother = (TParticle *) fParticles->At(imother); if(pdg == 111 || - (pdg == 22 && iparticle->GetFirstMother() != 11))//No photon from hadron decay + (pdg == 22 && pmother->GetStatusCode() != 11))//No photon from hadron decay { Float_t phi = iparticle->Phi()*180./TMath::Pi(); //Convert to degrees Float_t eta =TMath::Abs(iparticle->Eta());//in calos etamin=-etamax