CMS 3D CMS Logo

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
bool filter(edm::Event &, const edm::EventSetup &) override
Definition: MuonPtFilter.cc:43
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MuonPtFilter(const edm::ParameterSet &)
Constructor.
Definition: MuonPtFilter.cc:27
HLT enums.
~MuonPtFilter() override
Destructorquer.
Definition: MuonPtFilter.cc:39
Definition: event.py:1