#include <DTCalibMuonSelection.h>
Public Member Functions | |
DTCalibMuonSelection (const edm::ParameterSet &) | |
~DTCalibMuonSelection () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
double | etaMax |
double | etaMin |
edm::InputTag | muonList |
double | ptMin |
Definition at line 15 of file DTCalibMuonSelection.h.
DTCalibMuonSelection::DTCalibMuonSelection | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 22 of file DTCalibMuonSelection.cc.
References jptDQMConfig_cff::etaMax, jptDQMConfig_cff::etaMin, edm::ParameterSet::getParameter(), and PtMinSelector_cfg::ptMin.
{ muonList = iConfig.getParameter<edm::InputTag>("src"); etaMin = iConfig.getParameter<double>("etaMin"); etaMax = iConfig.getParameter<double>("etaMax"); ptMin = iConfig.getParameter<double>("ptMin"); }
DTCalibMuonSelection::~DTCalibMuonSelection | ( | ) |
Definition at line 31 of file DTCalibMuonSelection.cc.
{ }
void DTCalibMuonSelection::beginJob | ( | void | ) | [private, virtual] |
void DTCalibMuonSelection::endJob | ( | void | ) | [private, virtual] |
bool DTCalibMuonSelection::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 34 of file DTCalibMuonSelection.cc.
References jptDQMConfig_cff::etaMax, jptDQMConfig_cff::etaMin, edm::Event::getByLabel(), PtMinSelector_cfg::ptMin, and query::result.
{ bool result = false; //Retrieve the muons list Handle<MuonCollection> MuHandle; iEvent.getByLabel(muonList,MuHandle); for (MuonCollection::const_iterator nmuon = MuHandle->begin(); nmuon != MuHandle->end(); ++nmuon) { double ptMuon(0.); double etaMuon(-999.); if(nmuon->isGlobalMuon()){ ptMuon = nmuon->globalTrack()->pt(); etaMuon = nmuon->globalTrack()->eta(); } else continue; if(ptMuon > ptMin &&etaMuon > etaMin && etaMuon < etaMax){ result = true; break; } } return result; }
double DTCalibMuonSelection::etaMax [private] |
Definition at line 32 of file DTCalibMuonSelection.h.
double DTCalibMuonSelection::etaMin [private] |
Definition at line 31 of file DTCalibMuonSelection.h.
edm::InputTag DTCalibMuonSelection::muonList [private] |
Definition at line 29 of file DTCalibMuonSelection.h.
double DTCalibMuonSelection::ptMin [private] |
Definition at line 33 of file DTCalibMuonSelection.h.