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 Attributes
PFMET Class Reference

Computes the MET from a collection of PFCandidates. HF missing! More...

#include <PFMET.h>

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

Public Member Functions

virtual void beginJob ()
 
 PFMET (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~PFMET ()
 
- 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 Attributes

edm::InputTag inputTagPFCandidates_
 Input PFCandidates. More...
 
pf2pat::PFMETAlgo pfMETAlgo_
 

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

Computes the MET from a collection of PFCandidates. HF missing!

Author
Colin Bernet
Date
february 2008

Definition at line 30 of file PFMET.h.

Constructor & Destructor Documentation

PFMET::PFMET ( const edm::ParameterSet )
explicit
PFMET::~PFMET ( )

Member Function Documentation

void PFMET::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 41 of file PFMET.cc.

41 { }
void PFMET::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 44 of file PFMET.cc.

References edm::EventID::event(), edm::Event::getByLabel(), edm::EventBase::id(), LogDebug, reco::tau::pfCandidates(), edm::Event::put(), and edm::EventID::run().

45  {
46 
47  LogDebug("PFMET")<<"START event: "<<iEvent.id().event()
48  <<" in run "<<iEvent.id().run()<<endl;
49 
50 
51 
52  // get PFCandidates
53 
55  iEvent.getByLabel( inputTagPFCandidates_, pfCandidates);
56 
57  auto_ptr< METCollection >
58  pOutput( new METCollection() );
59 
60 
61 
62  pOutput->push_back( pfMETAlgo_.produce( *pfCandidates ) );
63  iEvent.put( pOutput );
64 
65  LogDebug("PFMET")<<"STOP event: "<<iEvent.id().event()
66  <<" in run "<<iEvent.id().run()<<endl;
67 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
reco::MET produce(const reco::PFCandidateCollection &pfCandidates)
Definition: PFMETAlgo.cc:33
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:23
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
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:359
edm::EventID id() const
Definition: EventBase.h:56
pf2pat::PFMETAlgo pfMETAlgo_
Definition: PFMET.h:46
edm::InputTag inputTagPFCandidates_
Input PFCandidates.
Definition: PFMET.h:44

Member Data Documentation

edm::InputTag PFMET::inputTagPFCandidates_
private

Input PFCandidates.

Definition at line 44 of file PFMET.h.

pf2pat::PFMETAlgo PFMET::pfMETAlgo_
private

Definition at line 46 of file PFMET.h.