17 usePt_ ( iConfig.getParameter<bool>(
"usePt") ),
18 useTracks_ ( iConfig.getParameter<bool>(
"useTracks") ),
19 excludePFMuons_ ( iConfig.getParameter<bool>(
"excludePFMuons") ),
20 minNJetHt_ ( iConfig.getParameter<int>(
"minNJetHt") ),
21 minNJetMht_ ( iConfig.getParameter<int>(
"minNJetMht") ),
22 minPtJetHt_ ( iConfig.getParameter<double>(
"minPtJetHt") ),
23 minPtJetMht_ ( iConfig.getParameter<double>(
"minPtJetMht") ),
24 maxEtaJetHt_ ( iConfig.getParameter<double>(
"maxEtaJetHt") ),
25 maxEtaJetMht_ ( iConfig.getParameter<double>(
"maxEtaJetMht") ),
26 jetsLabel_ ( iConfig.getParameter<edm::InputTag>(
"jetsLabel") ),
27 tracksLabel_ ( iConfig.getParameter<edm::InputTag>(
"tracksLabel") ),
28 pfCandidatesLabel_ ( iConfig.getParameter<edm::InputTag>(
"pfCandidatesLabel") )
33 produces<reco::METCollection>();
44 desc.
add<
bool>(
"usePt",
true);
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", 999);
51 desc.
add<
bool>(
"useTracks",
false);
53 desc.
add<
bool>(
"excludePFMuons",
false);
55 descriptions.
add(
"hltHtMhtProducer", desc);
71 int nj_ht = 0, nj_mht = 0;
73 double mhtx=0., mhty=0.;
83 mhtx -= mom*
cos(
jet->phi());
84 mhty -= mom*
sin(
jet->phi());
89 for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); track++) {
100 reco::PFCandidateCollection::const_iterator
i (pfCandidates->begin());
101 for (;
i != pfCandidates->end(); ++
i) {
102 if(
abs(
i->pdgId())==13){
103 mhtx += (
i->pt())*
cos(
i->phi());
104 mhty += (
i->pt())*
sin(
i->phi());
112 metobject->push_back(
120 iEvent.
put(metobject);
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::InputTag pfCandidatesLabel_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
std::vector< reco::MET > METCollection
collection of MET objects
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
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)
edm::EDGetTokenT< reco::TrackCollection > m_theTrackToken
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::View< reco::Jet > > m_theJetToken
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
math::XYZPoint Point
point in the space
edm::InputTag tracksLabel_
HLTHtMhtProducer(const edm::ParameterSet &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)