Public Member Functions | |
L3MuonCleaner (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~L3MuonCleaner () |
Private Attributes | |
edm::InputTag | m_input |
double | m_maxNormalizedChi2 |
int | m_minMuonHits |
int | m_minTrkHits |
Definition at line 14 of file L3MuonCleaner.cc.
L3MuonCleaner::L3MuonCleaner | ( | const edm::ParameterSet & | parameterSet | ) |
Definition at line 26 of file L3MuonCleaner.cc.
References edm::ParameterSet::getParameter(), m_input, m_maxNormalizedChi2, m_minMuonHits, and m_minTrkHits.
{ m_input = parameterSet.getParameter<edm::InputTag>("input"); m_minTrkHits = parameterSet.getParameter<int>("minTrkHits"); m_minMuonHits = parameterSet.getParameter<int>("minMuonHits"); m_maxNormalizedChi2 = parameterSet.getParameter<double>("maxNormalizedChi2"); produces<reco::TrackCollection>(); }
virtual L3MuonCleaner::~L3MuonCleaner | ( | ) | [inline, virtual] |
Definition at line 17 of file L3MuonCleaner.cc.
{}
void L3MuonCleaner::produce | ( | edm::Event & | event, |
const edm::EventSetup & | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 34 of file L3MuonCleaner.cc.
References m_input, m_maxNormalizedChi2, m_minMuonHits, m_minTrkHits, and testEve_cfg::tracks.
{ edm::Handle<reco::TrackCollection> tracks; event.getByLabel(m_input,tracks); std::auto_ptr<reco::TrackCollection> outTracks( new reco::TrackCollection() ); for ( reco::TrackCollection::const_iterator trk=tracks->begin(); trk!=tracks->end(); ++trk ){ if (trk->normalizedChi2()>m_maxNormalizedChi2) continue; if (trk->hitPattern().numberOfValidTrackerHits()<m_minTrkHits) continue; if (trk->hitPattern().numberOfValidMuonHits()<m_minMuonHits) continue; outTracks->push_back(*trk); } event.put(outTracks); }
edm::InputTag L3MuonCleaner::m_input [private] |
Definition at line 20 of file L3MuonCleaner.cc.
Referenced by L3MuonCleaner(), and produce().
double L3MuonCleaner::m_maxNormalizedChi2 [private] |
Definition at line 23 of file L3MuonCleaner.cc.
Referenced by L3MuonCleaner(), and produce().
int L3MuonCleaner::m_minMuonHits [private] |
Definition at line 22 of file L3MuonCleaner.cc.
Referenced by L3MuonCleaner(), and produce().
int L3MuonCleaner::m_minTrkHits [private] |
Definition at line 21 of file L3MuonCleaner.cc.
Referenced by L3MuonCleaner(), and produce().