From: morsch Date: Wed, 26 Apr 2000 10:14:24 +0000 (+0000) Subject: Particles array has one entry more than pythia particle list. Upper bound of X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=2a0e6f5b0e846a3058d385cfc56bb53241b39510 Particles array has one entry more than pythia particle list. Upper bound of particle loop changed to np-1 (R. Guernane, AM) --- diff --git a/EVGEN/AliGenPythia.cxx b/EVGEN/AliGenPythia.cxx index abdaa2783f1..341f7d8d5ee 100644 --- a/EVGEN/AliGenPythia.cxx +++ b/EVGEN/AliGenPythia.cxx @@ -15,6 +15,10 @@ /* $Log$ +Revision 1.14 2000/04/05 08:36:13 morsch +Check status code of particles in Pythia event +to avoid double counting as partonic state and final state particle. + Revision 1.13 1999/11/09 07:38:48 fca Changes for compatibility with version 2.23 of ROOT @@ -178,6 +182,7 @@ void AliGenPythia::Generate() while(1) { fPythia->Pyevnt(); + fPythia->Lulist(1); fTrials++; fPythia->ImportParticles(particles,"All"); Int_t np = particles->GetEntriesFast(); @@ -185,11 +190,12 @@ void AliGenPythia::Generate() Int_t nc=0; if (np == 0 ) continue; if (fProcess != mb) { - for (Int_t i = 0; iAt(i); Int_t ks = iparticle->GetStatusCode(); - if (ks==21) continue; kf = CheckPDGCode(iparticle->GetPdgCode()); + if (ks==21) continue; + fChildWeight=(fPythia->GetBraPart(kf))*fParentWeight; // // Parent @@ -260,10 +266,11 @@ void AliGenPythia::Generate() } // select particle } // particle loop } else { - for (Int_t i = 0; iAt(i); kf = CheckPDGCode(iparticle->GetPdgCode()); Int_t ks = iparticle->GetStatusCode(); + if (ks==1 && kf!=0 && KinematicSelection(iparticle)) { nc++; //