4 #include <HepMC/GenEvent.h>
5 #include <HepMC/GenParticle.h>
6 #include <HepMC/GenVertex.h>
7 #include <HepMC/SimpleVector.h>
32 , _doBothEtaCut(
false)
35 _doAbsEtaHighCut(
false)
36 , _doAbsEtaLowCut(
false)
37 , _doBothAbsEtaCut(
false)
59 static int trig_info_printed = 0;
60 if (trig_info_printed == 0)
63 trig_info_printed = 1;
87 for (HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
p != evt->particles_end(); ++
p)
92 double p_pT = sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2));
93 double p_pAbs = sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2) + pow((*p)->momentum().pz(), 2));
119 (*p)->momentum().pz() >
_thePzHigh))
continue;
125 cout <<
"stable " << (*p)->pdg_id()
127 <<
" pz: " << (*p)->momentum().pz()
129 <<
" eta: " << (*p)->momentum().eta() << endl;
133 bool passedParents =
false;
137 for (HepMC::GenVertex::particles_in_const_iterator p_parent = (*p)->production_vertex()->particles_in_const_begin();
138 p_parent != (*p)->production_vertex()->particles_in_const_end();
143 passedParents =
true;
144 if (
Verbosity() > 5) cout <<
"found parent!" << endl;
148 if (passedParents)
break;
152 if (
_theParents.size() == 0 || passedParents)
return true;
395 cout <<
"---------------- PHPy6ParticleTrigger::PrintConfig --------------------" << endl;
396 cout <<
" Particles: ";
400 cout <<
" Parents: ";
414 cout <<
"-----------------------------------------------------------------------" << endl;