4 #include "HepMC/GenVertex.h"
36 HepMC::GenEvent::particle_const_iterator begin = evt->particles_begin();
37 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
39 bool foundParticle =
false;
40 bool foundParton =
false;
42 HepMC::GenEvent::particle_const_iterator it = begin;
43 while ((!foundParton || !foundParticle) && it !=
end) {
45 bool isThisPhoton =
false;
59 if (!((*it)->production_vertex())) {
62 const HepMC::GenVertex* productionVertex = (*it)->production_vertex();
64 size_t numberOfMothers = productionVertex->particles_in_size();
65 if (numberOfMothers <= 0) {
70 HepMC::GenVertex::particles_in_const_iterator motherIt = productionVertex->particles_in_const_begin();
71 for (; motherIt != productionVertex->particles_in_const_end(); motherIt++) {
72 if (fabs((*motherIt)->pdg_id()) <= 22) {
79 if ((isFrag ==
true) && (isThisPhoton ==
true)) {
88 return (foundParton && foundParticle);