00001 #include <vector> 00002 00003 #include "TruthHelper/IsGenStable.h" 00004 #include "HepMC/GenParticle.h" 00005 using std::vector; 00006 using std::abs; 00007 00008 //**************************************************************** 00009 //* IsGenStable * 00010 //**************************************************************** 00011 IsGenStable::IsGenStable() {} 00012 00013 bool IsGenStable::operator()( const Particle* const p ) const { 00014 return ( ((p->status()%1000 == 1) || (p->status()%1000 == 2 && p->status() > 1000)) && 00015 (p->barcode()<100000) ) ? true:false; 00016 } 00017 bool IsGenStable::operator() ( const Particle& p ) const { 00018 return this->operator()(&p); 00019 } 00020 GenIMCselector* IsGenStable::create() const {return new IsGenStable(*this);}