[Rivet-svn] r1646 - trunk/src

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Jun 26 19:08:30 BST 2009


Author: buckley
Date: Fri Jun 26 19:08:30 2009
New Revision: 1646

Log:
Restricting Jet::containsBottom etc. to only count ancestor particles which are hadrons, since the Sherpa event record can sometimes have one central vertex which allows everything to have a b quark as a 'parent'.

Modified:
   trunk/src/Jet.cc

Modified: trunk/src/Jet.cc
==============================================================================
--- trunk/src/Jet.cc	Thu Jun 25 18:10:30 2009	(r1645)
+++ trunk/src/Jet.cc	Fri Jun 26 19:08:30 2009	(r1646)
@@ -69,7 +69,8 @@
       HepMC::GenVertex* gv = p.genParticle().production_vertex();
       if (gv) {
         foreach (const GenParticle* pi, Rivet::particles(gv, HepMC::ancestors)) {
-          if (PID::hasCharm(pi->pdg_id())) return true;
+          const PdgId pid = pi->pdg_id();
+          if (PID::isHadron(pid) && PID::hasCharm(pid)) return true;
         }
       }
     }
@@ -83,8 +84,7 @@
       if (gv) {
         foreach (const GenParticle* pi, Rivet::particles(gv, HepMC::ancestors)) {
           const PdgId pid = pi->pdg_id();
-          //Log::getLog("Rivet") << Log::INFO << "PID = " << pid << endl;
-          if (PID::hasBottom(pid)) return true;
+          if (PID::isHadron(pid) && PID::hasBottom(pid)) return true;
         }
       }
     }


More information about the Rivet-svn mailing list