|
[Rivet-svn] r1707 - trunk/srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Jul 20 20:11:23 BST 2009
Author: fsiegert Date: Mon Jul 20 20:11:22 2009 New Revision: 1707 Log: Make containsCharm and containsBottom methods usable for parton level events, i.e. also return true if the jet contains a c/b quark. Modified: trunk/src/Jet.cc Modified: trunk/src/Jet.cc ============================================================================== --- trunk/src/Jet.cc Mon Jul 20 19:59:06 2009 (r1706) +++ trunk/src/Jet.cc Mon Jul 20 20:11:22 2009 (r1707) @@ -1,6 +1,7 @@ #include "Rivet/Jet.hh" #include "Rivet/Tools/Logging.hh" #include "Rivet/Tools/ParticleIDMethods.hh" +#include "Rivet/ParticleName.hh" namespace Rivet { @@ -95,6 +96,7 @@ bool Jet::containsCharm() const { foreach (const Particle& p, particles()) { + if (abs(p.pdgId())==CQUARK) return true; HepMC::GenVertex* gv = p.genParticle().production_vertex(); if (gv) { foreach (const GenParticle* pi, Rivet::particles(gv, HepMC::ancestors)) { @@ -109,6 +111,7 @@ bool Jet::containsBottom() const { foreach (const Particle& p, particles()) { + if (abs(p.pdgId())==BQUARK) return true; HepMC::GenVertex* gv = p.genParticle().production_vertex(); if (gv) { foreach (const GenParticle* pi, Rivet::particles(gv, HepMC::ancestors)) {
More information about the Rivet-svn mailing list |