Public Member Functions | |
MassKinFitterCandProducer (const edm::ParameterSet &) | |
Private Member Functions | |
void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
CandMassKinFitter | fitter_ |
edm::InputTag | src_ |
Definition at line 11 of file MassKinFitterCandProducer.cc.
MassKinFitterCandProducer::MassKinFitterCandProducer | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 28 of file MassKinFitterCandProducer.cc.
: src_( cfg.getParameter<edm::InputTag>( "src" ) ), fitter_( 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 34 of file MassKinFitterCandProducer.cc.
References trackerHits::c, clone(), fitter_, edm::Event::getByLabel(), edm::Event::put(), dt_offlineAnalysis_common_cff::reco, CandMassKinFitter::set(), 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 ); }
Definition at line 17 of file MassKinFitterCandProducer.cc.
Referenced by produce().
edm::InputTag MassKinFitterCandProducer::src_ [private] |
Definition at line 16 of file MassKinFitterCandProducer.cc.
Referenced by produce().