19 usePt_ ( iConfig.getParameter<
bool>(
"usePt") ),
20 excludePFMuons_ ( iConfig.getParameter<
bool>(
"excludePFMuons") ),
21 minNJetHt_ ( iConfig.getParameter<
int>(
"minNJetHt") ),
22 minNJetMht_ ( iConfig.getParameter<
int>(
"minNJetMht") ),
23 minPtJetHt_ ( iConfig.getParameter<double>(
"minPtJetHt") ),
24 minPtJetMht_ ( iConfig.getParameter<double>(
"minPtJetMht") ),
25 maxEtaJetHt_ ( iConfig.getParameter<double>(
"maxEtaJetHt") ),
26 maxEtaJetMht_ ( iConfig.getParameter<double>(
"maxEtaJetMht") ),
27 jetsLabel_ ( iConfig.getParameter<
edm::InputTag>(
"jetsLabel") ),
28 pfCandidatesLabel_ ( iConfig.getParameter<
edm::InputTag>(
"pfCandidatesLabel") ) {
33 produces<reco::METCollection>();
43 desc.
add<
bool>(
"usePt",
false);
44 desc.
add<
bool>(
"excludePFMuons",
false);
45 desc.
add<
int>(
"minNJetHt", 0);
46 desc.
add<
int>(
"minNJetMht", 0);
47 desc.
add<
double>(
"minPtJetHt", 40.);
48 desc.
add<
double>(
"minPtJetMht", 30.);
49 desc.
add<
double>(
"maxEtaJetHt", 3.);
50 desc.
add<
double>(
"maxEtaJetMht", 5.);
53 descriptions.
add(
"hltHtMhtProducer", desc);
72 int nj_ht = 0, nj_mht = 0;
73 double ht = 0., mhx = 0., mhy = 0.;
77 double pt =
usePt_ ? j->pt() : j->et();
78 double eta = j->eta();
79 double phi = j->phi();
80 double px =
usePt_ ? j->px() : j->et() *
cos(phi);
81 double py =
usePt_ ? j->py() : j->et() *
sin(phi);
97 for (
auto const & j : *pfCandidates) {
111 result->push_back(htmht);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::InputTag pfCandidatesLabel_
edm::EDGetTokenT< reco::PFCandidateCollection > m_thePFCandidateToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
int minNJetHt_
Minimum number of jets passing pt and eta requirements.
Sin< T >::type sin(const T &t)
double minPtJetHt_
Minimum pt requirement for jets.
std::vector< reco::MET > METCollection
collection of MET objects
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const_iterator begin() const
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double maxEtaJetHt_
Maximum (abs) eta requirement for jets.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
bool usePt_
Use pt; otherwise, use et.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
~HLTHtMhtProducer() override
math::XYZPoint Point
point in the space
const_iterator end() const
HLTHtMhtProducer(const edm::ParameterSet &iConfig)
edm::InputTag jetsLabel_
Input jet, PFCandidate collections.
edm::EDGetTokenT< reco::JetView > m_theJetToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)