CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonPtFilter.cc
Go to the documentation of this file.
1 
8 /* This Class Header */
10 
11 /* Collaborating Class Header */
16 
19 
20 /* C++ Headers */
21 using namespace std;
22 using namespace edm;
23 
24 /* ====================================================================== */
25 
28 {
29  // the name of the STA rec hits collection
30  theSTAMuonLabel = pset.getParameter<std::string>("SALabel");
31 
32  theMinPt = pset.getParameter<double>("minPt"); // pt min (GeV)
33 
34  LogDebug("MuonPt") << " SALabel : " << theSTAMuonLabel
35  << " Min Pt : " << theMinPt;
36 }
37 
40 }
41 
42 /* Operations */
44  // Get the RecTrack collection from the event
46  event.getByLabel(theSTAMuonLabel, staTracks);
47 
48  reco::TrackCollection::const_iterator staTrack;
49 
50  for (staTrack = staTracks->begin(); staTrack != staTracks->end(); ++staTrack){
51  if (staTrack->pt() > theMinPt)
52  return true;
53  }
54 
55  return false;
56 }
57 
58 // define this as a plug-in
#define LogDebug(id)
T getParameter(std::string const &) const
virtual bool filter(edm::Event &, const edm::EventSetup &) override
Definition: MuonPtFilter.cc:43
~MuonPtFilter()
Destructorquer.
Definition: MuonPtFilter.cc:39
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MuonPtFilter(const edm::ParameterSet &)
Constructor.
Definition: MuonPtFilter.cc:27
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