1 #ifndef PhysicsTools_FWLite_WSelector_h 2 #define PhysicsTools_FWLite_WSelector_h 23 push_back(
"Muon Pt", muonPtMin);
24 push_back(
"MET", metMin);
29 if (params.
exists(
"cutsToIgnore")) {
30 setIgnoredCuts(params.
getParameter<std::vector<std::string> >(
"cutsToIgnore"));
32 retInternal_ = getBitTemplate();
49 bool gotMuons =
event.getByLabel(
muonSrc_, muons);
50 bool gotMET =
event.getByLabel(
metSrc_, met);
54 if (
met_->
pt() >
cut(
"MET",
double()) || ignoreCut(
"MET"))
59 if (!ignoreCut(
"Muon Pt")) {
60 if (!muons->empty()) {
62 if (
wMuon_->
pt() >
cut(
"Muon Pt",
double()) || ignoreCut(
"Muon Pt"))
63 passCut(ret,
"Muon Pt");
66 passCut(ret,
"Muon Pt");
83 #endif // PhysicsTools_FWLite_WSelector_h Analysis-level MET class.
T getParameter(std::string const &) const
ret
prodAgent to be discontinued
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::InputTag muonSrc_
muon input
double pt() const final
transverse momentum
edm::InputTag metSrc_
met input
pat::Muon const & wMuon() const
return muon candidate of W boson
WSelector(edm::ParameterSet const ¶ms)
constructor
pat::MET const & met() const
return MET of W boson
~WSelector() override
destructor
strbitset & set(bool val=true)
set method of all bits
bool operator()(edm::EventBase const &event, pat::strbitset &ret) override
here is where the selection occurs
pat::MET const * met_
MET from W boson.
pat::Muon const * wMuon_
muon candidate from W boson
Example class of an EventSelector to apply a simple W Boson selection.
Analysis-level muon class.