#include <CorrectedMETProducerT.h>
Public Member Functions | |
CorrectedMETProducerT (const edm::ParameterSet &cfg) | |
~CorrectedMETProducerT () | |
Private Types | |
typedef std::vector< T > | METCollection |
Private Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &es) |
Private Attributes | |
METCorrectionAlgorithm * | algorithm_ |
std::string | moduleLabel_ |
edm::InputTag | src_ |
Produce MET collections with Type 1 / Type 1 + 2 corrections applied
NOTE: This file defines the generic template. Concrete instances for CaloMET and PFMET are defined in JetMETCorrections/Type1MET/plugins/CorrectedCaloMETProducer.cc JetMETCorrections/Type1MET/plugins/CorrectedPFMETProducer.cc
Definition at line 65 of file CorrectedMETProducerT.h.
typedef std::vector<T> CorrectedMETProducerT< T >::METCollection [private] |
Definition at line 67 of file CorrectedMETProducerT.h.
CorrectedMETProducerT< T >::CorrectedMETProducerT | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
Definition at line 71 of file CorrectedMETProducerT.h.
References CorrectedMETProducerT< T >::algorithm_, edm::ParameterSet::getParameter(), and CorrectedMETProducerT< T >::src_.
: moduleLabel_(cfg.getParameter<std::string>("@module_label")), algorithm_(0) { src_ = cfg.getParameter<edm::InputTag>("src"); algorithm_ = new METCorrectionAlgorithm(cfg); produces<METCollection>(""); }
CorrectedMETProducerT< T >::~CorrectedMETProducerT | ( | ) | [inline] |
Definition at line 81 of file CorrectedMETProducerT.h.
References CorrectedMETProducerT< T >::algorithm_.
{ delete algorithm_; }
void CorrectedMETProducerT< T >::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [inline, private, virtual] |
Implements edm::EDProducer.
Definition at line 88 of file CorrectedMETProducerT.h.
References CorrectedMETProducerT< T >::algorithm_, METCorrectionAlgorithm::compMETCorrection(), edm::Event::getByLabel(), edm::Event::put(), and CorrectedMETProducerT< T >::src_.
{ std::auto_ptr<METCollection> correctedMEtCollection(new METCollection); edm::Handle<METCollection> rawMEtCollection; evt.getByLabel(src_, rawMEtCollection); for ( typename METCollection::const_iterator rawMEt = rawMEtCollection->begin(); rawMEt != rawMEtCollection->end(); ++rawMEt ) { CorrMETData correction = algorithm_->compMETCorrection(evt, es); static CorrectedMETProducer_namespace::CorrectedMETFactoryT<T> correctedMET_factory; T correctedMEt = correctedMET_factory(*rawMEt, correction); correctedMEtCollection->push_back(correctedMEt); } //--- add collection of MET objects with Type 1 / Type 1 + 2 corrections applied to the event evt.put(correctedMEtCollection); }
METCorrectionAlgorithm* CorrectedMETProducerT< T >::algorithm_ [private] |
Definition at line 113 of file CorrectedMETProducerT.h.
Referenced by CorrectedMETProducerT< T >::CorrectedMETProducerT(), CorrectedMETProducerT< T >::produce(), and CorrectedMETProducerT< T >::~CorrectedMETProducerT().
std::string CorrectedMETProducerT< T >::moduleLabel_ [private] |
Definition at line 109 of file CorrectedMETProducerT.h.
edm::InputTag CorrectedMETProducerT< T >::src_ [private] |
Definition at line 111 of file CorrectedMETProducerT.h.
Referenced by CorrectedMETProducerT< T >::CorrectedMETProducerT(), and CorrectedMETProducerT< T >::produce().