From b1c57304f7c6781a370b8bc416b34c9495b69adb Mon Sep 17 00:00:00 2001
From: Rene Brun <Rene.Brun@cern.ch>
Date: Wed, 20 Oct 2010 13:32:28 +0000
Subject: [PATCH] Fix to take into account the change from IsFinal() to
 status(). Now final particles have a status >0

git-svn-id: http://root.cern.ch/svn/root/trunk@36383 27541ba8-7e3a-0410-8455-c3a389f83636
---
 tutorials/pythia/pythia8.C | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tutorials/pythia/pythia8.C b/tutorials/pythia/pythia8.C
index 50dca309420..c8079d05b79 100644
--- a/tutorials/pythia/pythia8.C
+++ b/tutorials/pythia/pythia8.C
@@ -50,8 +50,9 @@ void pythia8(Int_t nev  = 100, Int_t ndeb = 1) {
       for (Int_t ip = 0; ip < np; ip++) {
          TParticle* part = (TParticle*) particles->At(ip);
          Int_t ist = part->GetStatusCode();
+         // Positive codes are final particles.
+         if (ist <= 0) continue;
          Int_t pdg = part->GetPdgCode();
-         if (ist != 1) continue;
          Float_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
          if (charge == 0.) continue;
          Float_t eta = part->Eta();
-- 
GitLab