5 src_(iConfig.getParameter<edm::
InputTag>(
"src")),
6 numRequired_(iConfig.getParameter<int>(
"NumRequired")),
7 acceptMore_(iConfig.getParameter<bool>(
"AcceptMore")),
8 particleID_(iConfig.getParameter< std::vector<int> >(
"ParticleID")),
9 ptMin_(iConfig.getParameter< std::vector<double> >(
"PtMin")),
10 etaMax_(iConfig.getParameter< std::vector<double> >(
"EtaMax")),
11 status_(iConfig.getParameter< std::vector<int> >(
"Status")),
12 totalEvents_(0), passedEvents_(0)
17 std::vector<double> defptmin(1, 0);
18 std::vector<double> defetamax(1, 999.0);
19 std::vector<int> defstat(1, 0);
25 edm::LogWarning(
"MCMultiParticleFilter") <<
"WARNING: MCMultiParticleFilter: size of PtMin, EtaMax, and/or Status does not match ParticleID size!" << std::endl;
30 ptMin_.push_back(defptmin[0]);
32 etaMax_.push_back(defetamax[0]);
55 const HepMC::GenEvent * myGenEvent = evt->GetEvent();
57 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
58 p != myGenEvent->particles_end(); ++
p ) {
62 (*p)->momentum().perp() >
ptMin_[
i] &&
63 fabs((*p)->momentum().eta()) <
etaMax_[i] &&
84 edm::LogInfo(
"MCMultiParticleFilter") <<
"=== Results of MCMultiParticleFilter: passed "
#define DEFINE_FWK_MODULE(type)
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< int > status_
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< int > particleID_
MCMultiParticleFilter(const edm::ParameterSet &)
std::vector< double > ptMin_
std::vector< double > etaMax_