Fix to take into account the fact that Pythia6 from ROOT
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Jan 2007 17:02:56 +0000 (17:02 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Jan 2007 17:02:56 +0000 (17:02 +0000)
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

PYTHIA6/AliGenPythia.cxx

index 9ad2f82..daaa222 100644 (file)
@@ -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