20 muonSrc_(params.getParameter<edm::InputTag>(
"muonSrc")),
21 metSrc_ (params.getParameter<edm::InputTag>(
"metSrc"))
23 double muonPtMin = params.
getParameter<
double>(
"muonPtMin");
25 push_back(
"Muon Pt", muonPtMin );
26 push_back(
"MET" , metMin );
27 set(
"Muon Pt"); set(
"MET");
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->size() > 0 ){
62 if(
wMuon_->
pt() >
cut(
"Muon Pt",
double()) || ignoreCut(
"Muon Pt") )
63 passCut(ret,
"Muon Pt");
67 passCut( ret,
"Muon Pt");
Analysis-level MET class.
T getParameter(std::string const &) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::InputTag muonSrc_
muon input
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
strbitset & set(bool val=true)
set method of all bits
virtual ~WSelector()
destructor
virtual bool operator()(edm::EventBase const &event, pat::strbitset &ret)
here is where the selection occurs
pat::MET const * met_
MET from W boson.
virtual float pt() const GCC11_FINAL
transverse momentum
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.