CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MassKinFitterCandProducer Class Reference

#include <MassKinFitterCandProducer.h>

Inheritance diagram for MassKinFitterCandProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper MassKinFitterCandCustomProducer

Public Member Functions

 MassKinFitterCandProducer (const edm::ParameterSet &, CandMassKinFitter *=0)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

std::auto_ptr< CandMassKinFitterfitter_
 
edm::InputTag src_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 12 of file MassKinFitterCandProducer.h.

Constructor & Destructor Documentation

MassKinFitterCandProducer::MassKinFitterCandProducer ( const edm::ParameterSet cfg,
CandMassKinFitter f = 0 
)
explicit

Definition at line 8 of file MassKinFitterCandProducer.cc.

References fitter_, and edm::ParameterSet::getParameter().

8  :
9  src_(cfg.getParameter<edm::InputTag>("src")),
10  fitter_(f) {
11  if(f == 0) fitter_.reset(new CandMassKinFitter(cfg.getParameter<double>("mass")));
12  produces<reco::CandidateCollection>();
13 }
T getParameter(std::string const &) const
std::auto_ptr< CandMassKinFitter > fitter_

Member Function Documentation

void MassKinFitterCandProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
privatevirtual

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_.

15  {
16  using namespace edm;
17  using namespace reco;
19  evt.getByLabel(src_, cands);
20  std::auto_ptr<CandidateCollection> refitted( new CandidateCollection );
21  for( CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++ c ) {
22  Candidate * clone = c->clone();
23  fitter_->set( * clone );
24  refitted->push_back( clone );
25  }
26  evt.put( refitted );
27 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
T * clone(const T *tp)
Definition: Ptr.h:42
std::auto_ptr< CandMassKinFitter > fitter_

Member Data Documentation

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().