Particle.cc
Go to the documentation of this file.00001 #include "Rivet/Particle.hh"
00002 #include "Rivet/RivetBoost.hh"
00003
00004 namespace Rivet {
00005
00006
00007 bool Particle::hasAncestor(PdgId pdg_id) const {
00008 GenVertex* prodVtx = genParticle().production_vertex();
00009 if (prodVtx == 0) return false;
00010 foreach (const GenParticle* ancestor, particles(prodVtx, HepMC::ancestors)) {
00011 if (ancestor->pdg_id() == pdg_id) return true;
00012 }
00013 return false;
00014 }
00015
00016
00017 }