1 #ifndef JetMETCorrections_Type1MET_CorrectedMETProducer_h
2 #define JetMETCorrections_Type1MET_CorrectedMETProducer_h
35 namespace CorrectedMETProducer_namespace
40 double correctedMEtPx = rawMEt.px() + correction.
mex;
41 double correctedMEtPy = rawMEt.py() + correction.
mey;
42 double correctedMEtPt =
sqrt(correctedMEtPx*correctedMEtPx + correctedMEtPy*correctedMEtPy);
49 return rawMEt.sumEt() + correction.
sumet;
72 :
moduleLabel_(cfg.getParameter<std::string>(
"@module_label")),
79 produces<METCollection>(
"");
90 std::auto_ptr<METCollection> correctedMEtCollection(
new METCollection);
95 for (
typename METCollection::const_iterator rawMEt = rawMEtCollection->begin();
96 rawMEt != rawMEtCollection->end(); ++rawMEt ) {
100 T correctedMEt = correctedMET_factory(*rawMEt, correction);
102 correctedMEtCollection->push_back(correctedMEt);
106 evt.
put(correctedMEtCollection);
T getParameter(std::string const &) const
CorrMETData compMETCorrection(edm::Event &, const edm::EventSetup &)
CorrectedMETProducerT(const edm::ParameterSet &cfg)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::Candidate::LorentzVector correctedP4(const T &rawMEt, const CorrMETData &correction)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T operator()(const T &, const CorrMETData &) const
void produce(edm::Event &evt, const edm::EventSetup &es)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< T > METCollection
double correctedSumEt(const T &rawMEt, const CorrMETData &correction)
METCorrectionAlgorithm * algorithm_