21 : usePt_(iConfig.getParameter<bool>(
"usePt")),
22 excludePFMuons_(iConfig.getParameter<bool>(
"excludePFMuons")),
23 minNJet_(iConfig.getParameter<int>(
"minNJet")),
24 minPtJet_(iConfig.getParameter<double>(
"minPtJet")),
25 maxEtaJet_(iConfig.getParameter<double>(
"maxEtaJet")),
26 jetsLabel_(iConfig.getParameter<edm::
InputTag>(
"jetsLabel")),
27 pfCandidatesLabel_(iConfig.getParameter<edm::
InputTag>(
"pfCandidatesLabel")) {
35 produces<reco::METCollection>();
45 desc.
add<
bool>(
"usePt",
true);
46 desc.
add<
bool>(
"excludePFMuons",
false);
47 desc.
add<
int>(
"minNJet", 0);
48 desc.
add<
double>(
"minPtJet", 0.);
49 desc.
add<
double>(
"maxEtaJet", 999.);
52 descriptions.
add(
"hltMhtProducer", desc);
68 double sumet = 0., mhx = 0., mhy = 0.;
70 for (
auto const& aJet : *jets) {
71 double const pt =
usePt_ ? aJet.pt() : aJet.et();
72 double const eta = aJet.eta();
73 double const phi = aJet.phi();
74 double const px =
usePt_ ? aJet.px() : aJet.et() *
cos(phi);
75 double const py =
usePt_ ? aJet.py() : aJet.et() *
sin(phi);
86 for (
auto const& aCand : *pfCandidates) {
103 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
double maxEtaJet_
Maximum (abs) eta requirement for jets.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::CandidateView > m_theJetToken
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
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.
HLTMhtProducer(const edm::ParameterSet &iConfig)
math::XYZPoint Point
point in the space
~HLTMhtProducer() override