#include <MassKinFitterCandProducer.h>
Public Member Functions | |
MassKinFitterCandProducer (const edm::ParameterSet &, CandMassKinFitter *=0) | |
Private Member Functions | |
void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
std::auto_ptr< CandMassKinFitter > | fitter_ |
edm::InputTag | src_ |
Definition at line 12 of file MassKinFitterCandProducer.h.
MassKinFitterCandProducer::MassKinFitterCandProducer | ( | const edm::ParameterSet & | cfg, |
CandMassKinFitter * | f = 0 |
||
) | [explicit] |
Definition at line 8 of file MassKinFitterCandProducer.cc.
References fitter_, and edm::ParameterSet::getParameter().
: src_(cfg.getParameter<edm::InputTag>("src")), fitter_(f) { if(f == 0) fitter_.reset(new CandMassKinFitter(cfg.getParameter<double>("mass"))); produces<reco::CandidateCollection>(); }
void MassKinFitterCandProducer::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 15 of file MassKinFitterCandProducer.cc.
References trackerHits::c, clone(), fitter_, edm::Event::getByLabel(), edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and src_.
{ using namespace edm; using namespace reco; Handle<CandidateCollection> cands; evt.getByLabel(src_, cands); std::auto_ptr<CandidateCollection> refitted( new CandidateCollection ); for( CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++ c ) { Candidate * clone = c->clone(); fitter_->set( * clone ); refitted->push_back( clone ); } evt.put( refitted ); }
std::auto_ptr<CandMassKinFitter> MassKinFitterCandProducer::fitter_ [private] |
Definition at line 17 of file MassKinFitterCandProducer.h.
Referenced by MassKinFitterCandProducer(), and produce().
edm::InputTag MassKinFitterCandProducer::src_ [private] |
Definition at line 16 of file MassKinFitterCandProducer.h.
Referenced by produce().