68{
69
70
71
72
73 if (!part->production_vertex()) return false;
74#ifdef HEPMC3
75 for (const auto& iter: part->production_vertex()->particles_in()){
76 int parent_pdgid = iter->pdg_id();
77 if ( std::abs( parent_pdgid ) == 15 ) return true;
79 if ( parent_pdgid == part->pdg_id() )
return fromTau( iter );
80 }
81#else
82 for (HepMC::GenVertex::particles_in_const_iterator iter=part->production_vertex()->particles_in_const_begin();
83 iter!=part->production_vertex()->particles_in_const_end();++iter){
84 int parent_pdgid = (*iter)->pdg_id();
85 if ( std::abs( parent_pdgid ) == 15 ) return true;
87 if ( parent_pdgid == part->pdg_id() )
return fromTau( *iter );
88 }
89#endif
90 return false;
91}
static bool fromTau(const HepMC::ConstGenParticlePtr &part)
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to do ...
bool isHadron(const T &p)