15 : minPt_ (iConfig.getParameter<double>(
"minPt")),
16 maxEta_ (iConfig.getParameter<double>(
"maxEta")),
17 metLabel_ (iConfig.getParameter<
edm::InputTag>(
"metLabel")),
18 jetsLabel_ (iConfig.getParameter<
edm::InputTag>(
"jetsLabel")),
19 goodJetsLabel_ (iConfig.getParameter<
edm::InputTag>(
"goodJetsLabel")) {
25 produces<reco::CaloMETCollection>();
34 desc.
add<
double>(
"minPt", 20.);
35 desc.
add<
double>(
"maxEta", 5.);
39 descriptions.
add(
"hltMETCleanerUsingJetID",desc);
58 double sumet_jets = 0.;
59 if (jets->size() > 0 ) {
60 for(
auto const & j : *jets) {
74 double mex_goodJets = 0.;
75 double mey_goodJets = 0.;
76 double sumet_goodJets = 0.;
77 if (goodJets->size() > 0) {
78 for(
auto const & j : *goodJets) {
92 if (met->size() > 0) {
93 double mex_diff = mex_goodJets - mex_jets;
94 double mey_diff = mey_goodJets - mey_jets;
96 reco::Candidate::LorentzVector p4_clean(met->front().px()+mex_diff, mey_diff+met->front().py(), 0,
sqrt((met->front().px()+mex_diff)*(met->front().px() +mex_diff)+(met->front().py()+mey_diff)*(met->front().py() +mey_diff)));
99 cleanmet.setP4(p4_clean);
100 result->push_back(cleanmet);
edm::InputTag jetsLabel_
Input tag for the 'all jets' collection.
edm::InputTag goodJetsLabel_
Input tag for the 'good jets' collection.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
HLTMETCleanerUsingJetID(const edm::ParameterSet &iConfig)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double maxEta_
Maximum (abs) eta requirement for jets.
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)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
~HLTMETCleanerUsingJetID()