8 #include <HepMC/GenEvent.h>
21 _doTheParticleType(
false),
41 for ( HepMC::GenEvent::particle_const_iterator
p
42 = evt->particles_begin();
p != evt->particles_end(); ++
p ){
51 for ( HepMC::GenVertex::particle_iterator decay
52 = (*p)->end_vertex()->
53 particles_begin(HepMC::children);
54 decay != (*p)->end_vertex()->
55 particles_end(HepMC::children);
59 if(!(*decay)->end_vertex()){
60 if(abs((*decay)->pdg_id()) == 211) pi_num++;
64 else if((*decay)->end_vertex()){
67 for ( HepMC::GenVertex::particle_iterator second_decay
68 = (*decay)->end_vertex()->
69 particles_begin(HepMC::children);
70 second_decay != (*decay)->end_vertex()->
71 particles_end(HepMC::children);
74 if (abs((*second_decay)->pdg_id()) == 211) pi_num++;
76 if ((*second_decay)->status() != 1){
77 for ( HepMC::GenVertex::particle_iterator third_decay
78 = (*second_decay)->end_vertex()->
79 particles_begin(HepMC::children);
80 third_decay != (*second_decay)->end_vertex()->
81 particles_end(HepMC::children);
84 if(abs((*third_decay)->pdg_id()) == 211) pi_num++;
91 if (pi_num == 3)
return true;