4 #include <HepMC/GenEvent.h>
5 #include <HepMC/GenParticle.h>
6 #include <HepMC/SimpleVector.h>
38 cout <<
"PHPy6ForwardElectronTrig Configuration: " << endl;
42 cout <<
" Electron transverse momentum > " <<
pt_required <<
" GeV required" << endl;
47 if (
RequireOR) cout <<
" RequireOR is set" << endl;
48 if (
RequireAND) cout <<
" RequireAND is set" << endl;
49 if (
RequireCOMBO) cout <<
" RequireCOMBINED is set" << endl;
60 static int trig_info_printed = 0;
61 if (trig_info_printed == 0)
64 trig_info_printed = 1;
69 unsigned int n_em_found = 0;
70 unsigned int n_ep_found = 0;
72 for (HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
p != evt->particles_end(); ++
p)
74 if ((
abs((*p)->pdg_id()) == 11) && ((*p)->status() == 1) &&
75 ((*p)->momentum().pseudoRapidity() >
eta_low) && ((*p)->momentum().pseudoRapidity() <
eta_high) &&
76 (sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2)) >
pt_required))
78 if (((*p)->pdg_id()) == 11) n_em_found++;
79 if (((*p)->pdg_id()) == -11) n_ep_found++;