1 #ifndef JetMETCorrections_Type1MET_CorrectedMETProducer_h 2 #define JetMETCorrections_Type1MET_CorrectedMETProducer_h 43 double correctedMEtPx = rawMEt.px() + correction.
mex;
44 double correctedMEtPy = rawMEt.py() + correction.
mey;
45 double correctedMEtPt =
sqrt(correctedMEtPx*correctedMEtPx + correctedMEtPy*correctedMEtPy);
52 return rawMEt.sumEt() + correction.
sumet;
75 : moduleLabel_(cfg.getParameter<
std::
string>(
"@module_label")),
82 produces<METCollection>(
"");
99 std::unique_ptr<METCollection> correctedMEtCollection(
new METCollection);
104 for (
typename METCollection::const_iterator rawMEt = rawMEtCollection->begin();
105 rawMEt != rawMEtCollection->end(); ++rawMEt ) {
106 CorrMETData correction = algorithm_->compMETCorrection(evt, es);
109 T correctedMEt = correctedMET_factory(*rawMEt, correction);
111 correctedMEtCollection->push_back(correctedMEt);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string defaultModuleLabel()
edm::EDGetTokenT< METCollection > token_
CorrectedMETProducerT(const edm::ParameterSet &cfg)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
reco::Candidate::LorentzVector correctedP4(const T &rawMEt, const CorrMETData &correction)
T operator()(const T &, const CorrMETData &) const
void produce(edm::Event &evt, const edm::EventSetup &es)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< T > METCollection
double correctedSumEt(const T &rawMEt, const CorrMETData &correction)
METCorrectionAlgorithm * algorithm_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)