CMS 3D CMS Logo

Public Member Functions | Private Attributes

L3MuonCleaner Class Reference

Inheritance diagram for L3MuonCleaner:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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

Detailed Description

Definition at line 14 of file L3MuonCleaner.cc.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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);
}

Member Data Documentation

Definition at line 20 of file L3MuonCleaner.cc.

Referenced by L3MuonCleaner(), and produce().

Definition at line 23 of file L3MuonCleaner.cc.

Referenced by L3MuonCleaner(), and produce().

Definition at line 22 of file L3MuonCleaner.cc.

Referenced by L3MuonCleaner(), and produce().

Definition at line 21 of file L3MuonCleaner.cc.

Referenced by L3MuonCleaner(), and produce().