CMS 3D CMS Logo

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

#include <RecoMuon/MuPFIsoEmbedder/src/MuPFIsoEmbedder.cc>

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

Public Member Functions

 MuPFIsoEmbedder (const edm::ParameterSet &)
 
 ~MuPFIsoEmbedder ()
 
- 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 ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run &, edm::EventSetup const &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void endRun (edm::Run &, edm::EventSetup const &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

MuPFIsoHelperhelper_
 
edm::InputTag muons_
 

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 40 of file MuPFIsoEmbedder.cc.

Constructor & Destructor Documentation

MuPFIsoEmbedder::MuPFIsoEmbedder ( const edm::ParameterSet iConfig)
explicit

Definition at line 69 of file MuPFIsoEmbedder.cc.

References helper_.

69  :
70  muons_(iConfig.getParameter<edm::InputTag>("src"))
71 {
72 
73  helper_ = new MuPFIsoHelper(iConfig);
74  produces<reco::MuonCollection>();
75 }
T getParameter(std::string const &) const
MuPFIsoHelper * helper_
edm::InputTag muons_
MuPFIsoEmbedder::~MuPFIsoEmbedder ( )

Definition at line 78 of file MuPFIsoEmbedder.cc.

79 {
80 
81  // do anything here that needs to be done at desctruction time
82  // (e.g. close files, deallocate resources etc.)
83 
84 }

Member Function Documentation

void MuPFIsoEmbedder::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 119 of file MuPFIsoEmbedder.cc.

120 {
121 }
void MuPFIsoEmbedder::beginLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 142 of file MuPFIsoEmbedder.cc.

143 {
144 }
void MuPFIsoEmbedder::beginRun ( edm::Run ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 130 of file MuPFIsoEmbedder.cc.

131 {
132 }
void MuPFIsoEmbedder::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 125 of file MuPFIsoEmbedder.cc.

125  {
126 }
void MuPFIsoEmbedder::endLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 148 of file MuPFIsoEmbedder.cc.

149 {
150 }
void MuPFIsoEmbedder::endRun ( edm::Run ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 136 of file MuPFIsoEmbedder.cc.

137 {
138 }
void MuPFIsoEmbedder::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 154 of file MuPFIsoEmbedder.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

154  {
155  //The following says we do not know what parameters are allowed so do no validation
156  // Please change this to state exactly what you do use, even if it is no parameters
158  desc.setUnknown();
159  descriptions.addDefault(desc);
160 }
void addDefault(ParameterSetDescription const &psetDescription)
void MuPFIsoEmbedder::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 93 of file MuPFIsoEmbedder.cc.

References MuPFIsoHelper::beginEvent(), MuPFIsoHelper::embedPFIsolation(), edm::Event::getByLabel(), helper_, i, metsig::muon, patZpeak::muons, muons_, dbtoconf::out, edm::Event::put(), and dt_dqm_sourceclient_common_cff::reco.

94 {
95  using namespace edm;
96  using namespace reco;
97 
98 
99  helper_->beginEvent(iEvent);
100 
102  iEvent.getByLabel(muons_,muons);
103 
104 
105  std::auto_ptr<MuonCollection> out(new MuonCollection);
106 
107  for(unsigned int i=0;i<muons->size();++i) {
108  MuonRef muonRef(muons,i);
109  Muon muon = muons->at(i);
110  helper_->embedPFIsolation(muon,muonRef);
111  out->push_back(muon);
112  }
113 
114  iEvent.put(out);
115 }
int i
Definition: DBlmapReader.cc:9
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple out
Definition: dbtoconf.py:99
MuPFIsoHelper * helper_
int embedPFIsolation(reco::Muon &, reco::MuonRef &)
void beginEvent(const edm::Event &iEvent)
tuple muons
Definition: patZpeak.py:38
edm::InputTag muons_

Member Data Documentation

MuPFIsoHelper* MuPFIsoEmbedder::helper_
private

Definition at line 61 of file MuPFIsoEmbedder.cc.

Referenced by MuPFIsoEmbedder(), and produce().

edm::InputTag MuPFIsoEmbedder::muons_
private

Definition at line 59 of file MuPFIsoEmbedder.cc.

Referenced by produce().