15 : usePt_ (iConfig.getParameter<bool>(
"usePt")),
16 minPt_ (iConfig.getParameter<double>(
"minPt")),
17 maxEta_ (iConfig.getParameter<double>(
"maxEta")),
18 metLabel_ (iConfig.getParameter<edm::InputTag>(
"metLabel")),
19 jetsLabel_ (iConfig.getParameter<edm::InputTag>(
"jetsLabel")),
20 goodJetsLabel_ (iConfig.getParameter<edm::InputTag>(
"goodJetsLabel")) {
26 produces<reco::CaloMETCollection>();
35 desc.
add<
bool>(
"usePt",
false);
36 desc.
add<
double>(
"minPt", 20.);
37 desc.
add<
double>(
"maxEta", 5.);
41 descriptions.
add(
"hltMETCleanerUsingJetID",desc);
60 double sumet_jets = 0.;
61 if (jets->size() > 0 ) {
62 for(reco::CaloJetCollection::const_iterator
j = jets->begin();
j != jets->end(); ++
j) {
64 double eta =
j->eta();
65 double phi =
j->phi();
77 double mex_goodJets = 0.;
78 double mey_goodJets = 0.;
79 double sumet_goodJets = 0.;
80 if (goodJets->size() > 0) {
81 for(reco::CaloJetCollection::const_iterator
j = goodJets->begin();
j != goodJets->end(); ++
j) {
83 double eta =
j->eta();
84 double phi =
j->phi();
96 if (met->size() > 0) {
97 double mex_diff = mex_goodJets - mex_jets;
98 double mey_diff = mey_goodJets - mey_jets;
103 cleanmet.
setP4(cleanmet.
p4() + p4_diff);
104 result->push_back(cleanmet);
107 iEvent.
put( result );
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)
tuple met
____________________________________________________________________________||
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
double maxEta_
Maximum (abs) eta requirement for jets.
virtual void setP4(const LorentzVector &p4)
set 4-momentum
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.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Cos< T >::type cos(const T &t)
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()
bool usePt_
Use pt; otherwise, use et.
virtual const LorentzVector & p4() const
four-momentum Lorentz vector