14 : minPt_(iConfig.getParameter<double>(
"minPt")),
15 maxEta_(iConfig.getParameter<double>(
"maxEta")),
16 metLabel_(iConfig.getParameter<
edm::
InputTag>(
"metLabel")),
17 jetsLabel_(iConfig.getParameter<
edm::
InputTag>(
"jetsLabel")),
18 goodJetsLabel_(iConfig.getParameter<
edm::
InputTag>(
"goodJetsLabel")) {
24 produces<reco::CaloMETCollection>();
33 desc.add<
double>(
"minPt", 20.);
34 desc.add<
double>(
"maxEta", 5.);
38 descriptions.
add(
"hltMETCleanerUsingJetID",
desc);
56 double sumet_jets = 0.;
58 for (
auto const&
j : *
jets) {
72 double mex_goodJets = 0.;
73 double mey_goodJets = 0.;
74 double sumet_goodJets = 0.;
91 double mex_diff = mex_goodJets - mex_jets;
92 double mey_diff = mey_goodJets - mey_jets;
95 mey_diff +
met->front().py(),
97 sqrt((
met->front().px() + mex_diff) * (
met->front().px() + mex_diff) +
98 (
met->front().py() + mey_diff) * (
met->front().py() + mey_diff)));
101 cleanmet.setP4(p4_clean);
102 result->push_back(cleanmet);
~HLTMETCleanerUsingJetID() override
edm::InputTag jetsLabel_
Input tag for the 'all jets' collection.
edm::InputTag goodJetsLabel_
Input tag for the 'good jets' collection.
HLTMETCleanerUsingJetID(const edm::ParameterSet &iConfig)
double maxEta_
Maximum (abs) eta requirement for jets.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::CaloMETCollection > m_theMETToken
edm::InputTag metLabel_
Input tag for the MET collection.
edm::EDGetTokenT< reco::CaloJetCollection > m_theGoodJetToken
double minPt_
Minimum pt requirement for jets.
Abs< T >::type abs(const T &t)
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
edm::EDGetTokenT< reco::CaloJetCollection > m_theJetToken