12 token_(consumes<edm::
HepMCProduct>(edm::
InputTag(iConfig.getUntrackedParameter(
"moduleLabel",std::
string(
"generator")),
"unsmeared")))
18 vector<double> defptmin ;
19 defptmin.push_back(0.);
22 vector<double> defetamin ;
23 defetamin.push_back(-10.);
25 vector<double> defetamax ;
26 defetamax.push_back(10.);
38 cout <<
"WARNING: MCPROCESSFILTER : size of MinPthat and/or MaxPthat not matching with ProcessID size!!" << endl;
43 vector<double> defptmin2 ;
44 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defptmin2.push_back(0.);}
49 vector<double> defetamin2 ;
50 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defetamin2.push_back(-10.);}
55 vector<double> defetamax2 ;
56 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defetamax2.push_back(10.);}
61 vector<int> defstat2 ;
62 for (
unsigned int i = 0;
i <
particleID.size();
i++){ defstat2.push_back(0);}
84 bool accepted =
false;
88 const HepMC::GenEvent * myGenEvent = evt->GetEvent();
91 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
92 p != myGenEvent->particles_end(); ++
p ) {
98 if ( (*p)->momentum().perp() >
ptMin[
i] && (*p)->momentum().eta() >
etaMin[
i]
109 if (accepted){
return true; }
else {
return false;}
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > ptMin
edm::EDGetTokenT< edm::HepMCProduct > token_
~MCSingleParticleFilter()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< int > status
std::vector< double > etaMin
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< double > etaMax
std::vector< int > particleID
MCSingleParticleFilter(const edm::ParameterSet &)