9 token_(consumes<
edm::
HepMCProduct>(
edm::InputTag(iConfig.getUntrackedParameter(
"moduleLabel",
std::
string(
"generator")),
"unsmeared"))),
10 selProc(iConfig.getUntrackedParameter<
int>(
"SelectProcess")),
11 ptElMin(iConfig.getUntrackedParameter<double>(
"MinElPt", 5.0)),
12 ptMuMin(iConfig.getUntrackedParameter<double>(
"MinMuPt", 3.0)),
13 ptPhotonMin(iConfig.getUntrackedParameter<double>(
"MinPhotPt", 5.0)),
14 etaElMax(iConfig.getUntrackedParameter<double>(
"MaxElecEta", 2.7)),
15 etaMuMax(iConfig.getUntrackedParameter<double>(
"MaxMuonEta", 2.4)),
16 etaPhotonMax(iConfig.getUntrackedParameter<double>(
"MaxPhotEta", 2.7))
35 std::vector<const HepMC::GenParticle *> el;
36 std::vector<const HepMC::GenParticle *>
mu;
37 std::vector<const HepMC::GenParticle *> gam;
39 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
40 p != myGenEvent->particles_end(); ++
p ) {
43 if (
std::abs((*p)->pdg_id())==11 && (*p)->status()==1 )
45 if(el.size()>1)
break;
47 if (
std::abs((*p)->pdg_id())==13 && (*p)->status()==1 )
49 if(mu.size()>1)
break;
54 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
55 p != myGenEvent->particles_end(); ++
p ) {
57 if (
std::abs((*p)->pdg_id())==22 && (*p)->status()==1 )
59 if(gam.size()==1)
break;
65 double ptEl1 = el[0]->momentum().perp();
66 double ptEl2 = el[1]->momentum().perp();
67 double etaEl1 = el[0]->momentum().eta();
68 double etaEl2 = el[1]->momentum().eta();
73 double ptGam = gam[0]->momentum().perp();
74 double etaGam = gam[0]->momentum().eta();
83 double ptMu1 = mu[0]->momentum().perp();
84 double ptMu2 = mu[1]->momentum().perp();
85 double etaMu1 = mu[0]->momentum().eta();
86 double etaMu2 = mu[1]->momentum().eta();
91 double ptGam = gam[0]->momentum().perp();
92 double etaGam = gam[0]->momentum().eta();
edm::EDGetTokenT< edm::HepMCProduct > token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Abs< T >::type abs(const T &t)
bool filter(edm::Event &, const edm::EventSetup &) override
const HepMC::GenEvent * GetEvent() const
bool accepted(std::vector< std::string_view > const &, std::string_view)
PythiaFilterZgamma(const edm::ParameterSet &)
~PythiaFilterZgamma() override