19 usePt_ ( iConfig.getParameter<bool>(
"usePt") ),
20 useTracks_ ( iConfig.getParameter<bool>(
"useTracks") ),
21 usePFRecTracks_ ( iConfig.getParameter<bool>(
"usePFRecTracks") ),
22 usePFCandidatesCharged_ ( iConfig.getParameter<bool>(
"usePFCandidatesCharged") ),
23 usePFCandidates_ ( iConfig.getParameter<bool>(
"usePFCandidates") ),
24 excludePFMuons_ ( iConfig.getParameter<bool>(
"excludePFMuons") ),
25 minNJet_ ( iConfig.getParameter<int>(
"minNJet") ),
26 minPtJet_ ( iConfig.getParameter<double>(
"minPtJet") ),
27 maxEtaJet_ ( iConfig.getParameter<double>(
"maxEtaJet") ),
28 jetsLabel_ ( iConfig.getParameter<edm::
InputTag>(
"jetsLabel") ),
29 tracksLabel_ ( iConfig.getParameter<edm::
InputTag>(
"tracksLabel") ),
30 pfRecTracksLabel_ ( iConfig.getParameter<edm::
InputTag>(
"pfRecTracksLabel") ),
31 pfCandidatesLabel_ ( iConfig.getParameter<edm::
InputTag>(
"pfCandidatesLabel") ) {
38 produces<reco::METCollection>();
48 desc.
add<
bool>(
"usePt",
true);
49 desc.
add<
bool>(
"useTracks",
false);
50 desc.
add<
bool>(
"usePFRecTracks",
false);
51 desc.
add<
bool>(
"usePFCandidatesCharged",
true);
52 desc.
add<
bool>(
"usePFCandidates",
false);
53 desc.
add<
bool>(
"excludePFMuons",
false);
54 desc.
add<
int>(
"minNJet",0);
55 desc.
add<
double>(
"minPtJet", 0.);
56 desc.
add<
double>(
"maxEtaJet", 999.);
61 descriptions.
add(
"hltTrackMETProducer", desc);
92 double sumet = 0., mhx = 0., mhy = 0.;
94 if (useJets && jets->size() > 0) {
97 double eta =
j->eta();
98 double phi =
j->phi();
110 }
else if (
useTracks_ && tracks->size() > 0) {
111 for (reco::TrackCollection::const_iterator
j = tracks->begin();
j != tracks->end(); ++
j) {
115 double eta =
j->eta();
126 for (reco::PFRecTrackCollection::const_iterator
j = pfRecTracks->begin();
j != pfRecTracks->end(); ++
j) {
127 double pt =
j->trackRef()->pt();
128 double px =
j->trackRef()->px();
129 double py =
j->trackRef()->py();
130 double eta =
j->trackRef()->eta();
141 for (reco::PFCandidateCollection::const_iterator
j = pfCandidates->begin();
j != pfCandidates->end(); ++
j) {
146 double eta =
j->eta();
158 for (reco::PFCandidateCollection::const_iterator
j = pfCandidates->begin();
j != pfCandidates->end(); ++
j) {
166 if (nj <
minNJet_) { sumet = 0; mhx = 0; mhy = 0; }
171 result->push_back(mht);
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_
std::vector< reco::MET > METCollection
collection of MET objects
edm::InputTag tracksLabel_
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
bool usePFCandidatesCharged_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
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
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
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)