#include <MyAna/SelectZmumuevents/src/SelectZmumuevents.cc>
Public Member Functions | |
SelectZmumuevents (const edm::ParameterSet &) | |
~SelectZmumuevents () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
double | _etaMax |
edm::InputTag | _pfColl |
double | _ptMin |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 39 of file SelectZmumuevents.cc.
SelectZmumuevents::SelectZmumuevents | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 66 of file SelectZmumuevents.cc.
: _etaMax(iConfig.getUntrackedParameter<double>("etaMax")), _ptMin(iConfig.getUntrackedParameter<double>("ptMin")), _pfColl(iConfig.getUntrackedParameter<edm::InputTag>("pfCol")) { }
SelectZmumuevents::~SelectZmumuevents | ( | ) |
Definition at line 75 of file SelectZmumuevents.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void SelectZmumuevents::beginJob | ( | void | ) | [private, virtual] |
void SelectZmumuevents::endJob | ( | void | ) | [private, virtual] |
bool SelectZmumuevents::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 89 of file SelectZmumuevents.cc.
References _etaMax, _pfColl, _ptMin, abs, and edm::Event::getByLabel().
{ using namespace edm; Handle< View<reco::Candidate> > genParts; iEvent.getByLabel(_pfColl, genParts); int cnt = 0; for( edm::View<reco::Candidate>::const_iterator it = genParts->begin(); it != genParts->end(); it++ ) { if (std::abs(it->pdgId()) == 13 && std::abs(it->eta()) < _etaMax && it->pt() > _ptMin ) { ++cnt; } } return cnt>1; }
double SelectZmumuevents::_etaMax [private] |
Definition at line 50 of file SelectZmumuevents.cc.
Referenced by filter().
edm::InputTag SelectZmumuevents::_pfColl [private] |
Definition at line 52 of file SelectZmumuevents.cc.
Referenced by filter().
double SelectZmumuevents::_ptMin [private] |
Definition at line 51 of file SelectZmumuevents.cc.
Referenced by filter().