19 usePt_ ( iConfig.getParameter<
bool>(
"usePt") ),
20 excludePFMuons_ ( iConfig.getParameter<
bool>(
"excludePFMuons") ),
21 minNJet_ ( iConfig.getParameter<
int>(
"minNJet") ),
22 minPtJet_ ( iConfig.getParameter<double>(
"minPtJet") ),
23 maxEtaJet_ ( iConfig.getParameter<double>(
"maxEtaJet") ),
24 jetsLabel_ ( iConfig.getParameter<
edm::InputTag>(
"jetsLabel") ),
25 pfCandidatesLabel_ ( iConfig.getParameter<
edm::InputTag>(
"pfCandidatesLabel") ) {
31 produces<reco::METCollection>();
41 desc.
add<
bool>(
"usePt",
true);
42 desc.
add<
bool>(
"excludePFMuons",
false);
43 desc.
add<
int>(
"minNJet",0);
44 desc.
add<
double>(
"minPtJet", 0.);
45 desc.
add<
double>(
"maxEtaJet", 999.);
48 descriptions.
add(
"hltMhtProducer", desc);
65 double sumet = 0., mhx = 0., mhy = 0.;
69 double pt =
usePt_ ? j->pt() : j->et();
70 double eta = j->eta();
71 double phi = j->phi();
72 double px =
usePt_ ? j->px() : j->et() *
cos(phi);
73 double py =
usePt_ ? j->py() : j->et() *
sin(phi);
85 for (
auto const & j : *pfCandidates) {
93 if (nj <
minNJet_) { sumet = 0; mhx = 0; mhy = 0; }
98 result->push_back(mht);
int minNJet_
Minimum number of jets passing pt and eta requirements.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::PFCandidateCollection > m_thePFCandidateToken
edm::EDGetTokenT< reco::JetView > m_theJetToken
double maxEtaJet_
Maximum (abs) eta requirement for jets.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::InputTag jetsLabel_
Input jet, PFCandidate collections.
edm::InputTag pfCandidatesLabel_
std::vector< reco::MET > METCollection
collection of MET objects
const_iterator begin() const
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
double minPtJet_
Minimum pt requirement for jets.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool usePt_
Use pt; otherwise, use et.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
HLTMhtProducer(const edm::ParameterSet &iConfig)
math::XYZPoint Point
point in the space
const_iterator end() const
~HLTMhtProducer() override