45 if (!
part->production_vertex())
return false;
47 for (
const auto& iter:
part->production_vertex()->particles_in()){
48 int parent_pdgid = iter->pdg_id();
51 if ( std::abs( parent_pdgid ) < 9 )
return true;
52 if ( parent_pdgid ==
part->pdg_id() )
return fromWZ( iter );
55 for (HepMC::GenVertex::particles_in_const_iterator iter=
part->production_vertex()->particles_in_const_begin();
56 iter!=
part->production_vertex()->particles_in_const_end();++iter){
57 int parent_pdgid = (*iter)->pdg_id();
60 if ( std::abs( parent_pdgid ) < 9 )
return true;
61 if ( parent_pdgid ==
part->pdg_id() )
return fromWZ( *iter );
73 if (!
part->production_vertex())
return false;
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 );
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 );
96 void classify(ToolHandle<IMCTruthClassifier>& classif,
98 unsigned int& particleOutCome,
102 unsigned int& particleOrigin )
105 std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin> classification = classif->particleTruthClassifier(theParticle, &
info);
106 particleOutCome =
info.particleOutCome;
109 hadron_pdg = std::get<1>(tpl)?std::get<1>(tpl)->pdg_id():0;
111 particleOrigin = classification.second;