18 : usePt_(iConfig.getParameter<bool>(
"usePt")),
19 useTracks_(iConfig.getParameter<bool>(
"useTracks")),
20 usePFRecTracks_(iConfig.getParameter<bool>(
"usePFRecTracks")),
21 usePFCandidatesCharged_(iConfig.getParameter<bool>(
"usePFCandidatesCharged")),
22 usePFCandidates_(iConfig.getParameter<bool>(
"usePFCandidates")),
23 excludePFMuons_(iConfig.getParameter<bool>(
"excludePFMuons")),
24 minNJet_(iConfig.getParameter<int>(
"minNJet")),
25 minPtJet_(iConfig.getParameter<double>(
"minPtJet")),
26 maxEtaJet_(iConfig.getParameter<double>(
"maxEtaJet")),
27 jetsLabel_(iConfig.getParameter<edm::
InputTag>(
"jetsLabel")),
28 tracksLabel_(iConfig.getParameter<edm::
InputTag>(
"tracksLabel")),
29 pfRecTracksLabel_(iConfig.getParameter<edm::
InputTag>(
"pfRecTracksLabel")),
30 pfCandidatesLabel_(iConfig.getParameter<edm::
InputTag>(
"pfCandidatesLabel")) {
37 produces<reco::METCollection>();
47 desc.
add<
bool>(
"usePt",
true);
48 desc.
add<
bool>(
"useTracks",
false);
49 desc.
add<
bool>(
"usePFRecTracks",
false);
50 desc.
add<
bool>(
"usePFCandidatesCharged",
true);
51 desc.
add<
bool>(
"usePFCandidates",
false);
52 desc.
add<
bool>(
"excludePFMuons",
false);
53 desc.
add<
int>(
"minNJet", 0);
54 desc.
add<
double>(
"minPtJet", 0.);
55 desc.
add<
double>(
"maxEtaJet", 999.);
60 descriptions.
add(
"hltTrackMETProducer", desc);
93 double sumet = 0., mhx = 0., mhy = 0.;
95 if (useJets && !jets->empty()) {
98 double eta =
j->eta();
99 double phi =
j->phi();
112 for (
auto const&
j : *tracks) {
116 double eta =
j.eta();
127 for (
auto const&
j : *pfRecTracks) {
128 double pt =
j.trackRef()->pt();
129 double px =
j.trackRef()->px();
130 double py =
j.trackRef()->py();
131 double eta =
j.trackRef()->eta();
142 for (
auto const&
j : *pfCandidates) {
148 double eta =
j.eta();
160 for (
auto const&
j : *pfCandidates) {
177 result->push_back(mht);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::TrackCollection > m_theTrackToken
bool usePFCandidates_
Use PF candidates as input instead of jets.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag pfRecTracksLabel_
Sin< T >::type sin(const T &t)
edm::InputTag pfCandidatesLabel_
auto const & tracks
cannot be loose
std::vector< reco::MET > METCollection
collection of MET objects
edm::InputTag tracksLabel_
bool usePFCandidatesCharged_
edm::EDGetTokenT< reco::PFCandidateCollection > m_thePFCandidateToken
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
edm::InputTag jetsLabel_
Input jet, track, PFRecTrack, PFCandidate collections.
double minPtJet_
Minimum pt requirement for jets (or objects used as input)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::PFRecTrackCollection > m_theRecTrackToken
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
~HLTTrackMETProducer() override
HLTTrackMETProducer(const edm::ParameterSet &iConfig)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< reco::JetView > m_theJetToken
math::XYZPoint Point
point in the space
double maxEtaJet_
Maximum (abs) eta requirement for jets (or objects used as input)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)