4 #pragma GCC diagnostic push
5 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
6 #include <HepMC/GenEvent.h>
7 #pragma GCC diagnostic pop
9 #include <HepMC/GenParticle.h>
10 #include <HepMC/SimpleVector.h>
22 ntriggered_forward_electron = 0;
23 nconsidered_forward_electron = 0;
32 RequireElectron =
false;
33 RequirePositron =
false;
42 cout <<
"PHPy6ForwardElectronTrig Configuration: " << endl;
46 cout <<
" Electron transverse momentum > " <<
pt_required <<
" GeV required" << endl;
51 if (
RequireOR) cout <<
" RequireOR is set" << endl;
52 if (
RequireAND) cout <<
" RequireAND is set" << endl;
53 if (
RequireCOMBO) cout <<
" RequireCOMBINED is set" << endl;
64 static int trig_info_printed = 0;
65 if (trig_info_printed == 0)
68 trig_info_printed = 1;
73 unsigned int n_em_found = 0;
74 unsigned int n_ep_found = 0;
76 for (HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
p != evt->particles_end(); ++
p)
78 if ((abs((*p)->pdg_id()) == 11) && ((*p)->status() == 1) &&
79 ((*p)->momentum().pseudoRapidity() >
eta_low) && ((*p)->momentum().pseudoRapidity() <
eta_high) &&
80 (sqrt(pow((*p)->momentum().px(), 2) + pow((*p)->momentum().py(), 2)) >
pt_required))
82 if (((*p)->pdg_id()) == 11) n_em_found++;
83 if (((*p)->pdg_id()) == -11) n_ep_found++;