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::EDConsumerBase edm::ProductRegistryHelper MassKinFitterCandCustomProducer

Public Member Functions

 MassKinFitterCandProducer (const edm::ParameterSet &, CandMassKinFitter *=0)
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

std::auto_ptr< CandMassKinFitterfitter_
 
edm::EDGetTokenT
< reco::CandidateCollection
srcToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 14 of file MassKinFitterCandProducer.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file MassKinFitterCandProducer.cc.

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

7  :
8  srcToken_(consumes<reco::CandidateCollection>(cfg.getParameter<edm::InputTag>("src"))),
9  fitter_(f) {
10  if(f == 0) fitter_.reset(new CandMassKinFitter(cfg.getParameter<double>("mass")));
11  produces<reco::CandidateCollection>();
12 }
edm::EDGetTokenT< reco::CandidateCollection > srcToken_
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 14 of file MassKinFitterCandProducer.cc.

References EnergyCorrector::c, clone(), fitter_, edm::Event::getByToken(), edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and srcToken_.

14  {
15  using namespace edm;
16  using namespace reco;
18  evt.getByToken(srcToken_, cands);
19  std::auto_ptr<CandidateCollection> refitted( new CandidateCollection );
20  for( CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++ c ) {
21  Candidate * clone = c->clone();
22  fitter_->set( * clone );
23  refitted->push_back( clone );
24  }
25  evt.put( refitted );
26 }
edm::EDGetTokenT< reco::CandidateCollection > srcToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
std::auto_ptr< CandMassKinFitter > fitter_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135

Member Data Documentation

std::auto_ptr<CandMassKinFitter> MassKinFitterCandProducer::fitter_
private

Definition at line 19 of file MassKinFitterCandProducer.h.

Referenced by MassKinFitterCandProducer(), and produce().

edm::EDGetTokenT<reco::CandidateCollection> MassKinFitterCandProducer::srcToken_
private

Definition at line 18 of file MassKinFitterCandProducer.h.

Referenced by produce().