From: hristov Date: Wed, 31 Jan 2007 17:02:56 +0000 (+0000) Subject: Fix to take into account the fact that Pythia6 from ROOT X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=562cbbcf710dcf598f565a35c6d563d4e40a5d08;ds=sidebyside Fix to take into account the fact that Pythia6 from ROOT stores the original PYTHIA mother/indices which is done the FORTRAN way (1, 2, 3 ...). In AliStack we use the C++ counting (0, 1, 2, ..) Andreas --- diff --git a/PYTHIA6/AliGenPythia.cxx b/PYTHIA6/AliGenPythia.cxx index 9ad2f82d53f..daaa22261a4 100644 --- a/PYTHIA6/AliGenPythia.cxx +++ b/PYTHIA6/AliGenPythia.cxx @@ -840,7 +840,7 @@ 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(); + Int_t imother = iparticle->GetFirstMother() - 1; TParticle* pmother = (TParticle *) fParticles->At(imother); if(pdg == 111 || (pdg == 22 && pmother->GetStatusCode() != 11))//No photon from hadron decay