4 #pragma GCC diagnostic push
5 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
6 #include <HepMC/GenEvent.h>
7 #include <HepMC/GenVertex.h>
8 #pragma GCC diagnostic pop
10 #include <HepMC/GenParticle.h>
11 #include <HepMC/SimpleVector.h>
36 , _doBothEtaCut(
false)
39 _doAbsEtaHighCut(
false)
40 , _doAbsEtaLowCut(
false)
41 , _doBothAbsEtaCut(
false)
63 static int trig_info_printed = 0;
64 if (trig_info_printed == 0)
67 trig_info_printed = 1;
91 for (HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
p != evt->particles_end(); ++
p)
96 double p_pT = sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2));
97 double p_pAbs = sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2) + pow((*p)->momentum().pz(), 2));
108 abs((*p)->momentum().eta()) >
_theEtaHigh))
continue;
123 (*p)->momentum().pz() >
_thePzHigh))
continue;
129 cout <<
"stable " << (*p)->pdg_id()
131 <<
" pz: " << (*p)->momentum().pz()
133 <<
" eta: " << (*p)->momentum().eta() << endl;
137 bool passedParents =
false;
141 for (HepMC::GenVertex::particles_in_const_iterator p_parent = (*p)->production_vertex()->particles_in_const_begin();
142 p_parent != (*p)->production_vertex()->particles_in_const_end();
147 passedParents =
true;
148 if (
Verbosity() > 5) cout <<
"found parent!" << endl;
152 if (passedParents)
break;
156 if (
_theParents.size() == 0 || passedParents)
return true;
399 cout <<
"---------------- PHPy6ParticleTrigger::PrintConfig --------------------" << endl;
400 cout <<
" Particles: ";
404 cout <<
" Parents: ";
418 cout <<
"-----------------------------------------------------------------------" << endl;