21 usePt_ ( iConfig.getParameter<bool>(
"usePt") ),
22 useTracks_ ( iConfig.getParameter<bool>(
"useTracks") ),
23 excludePFMuons_ ( iConfig.getParameter<bool>(
"excludePFMuons") ),
24 minNJetHt_ ( iConfig.getParameter<int>(
"minNJetHt") ),
25 minNJetMht_ ( iConfig.getParameter<int>(
"minNJetMht") ),
26 minPtJetHt_ ( iConfig.getParameter<double>(
"minPtJetHt") ),
27 minPtJetMht_ ( iConfig.getParameter<double>(
"minPtJetMht") ),
28 maxEtaJetHt_ ( iConfig.getParameter<double>(
"maxEtaJetHt") ),
29 maxEtaJetMht_ ( iConfig.getParameter<double>(
"maxEtaJetMht") ),
30 jetsLabel_ ( iConfig.getParameter<edm::InputTag>(
"jetsLabel") ),
31 tracksLabel_ ( iConfig.getParameter<edm::InputTag>(
"tracksLabel") ),
32 pfCandidatesLabel_ ( iConfig.getParameter<edm::InputTag>(
"pfCandidatesLabel") )
34 produces<reco::METCollection>();
45 desc.
add<
bool>(
"usePt",
true);
46 desc.
add<
int>(
"minNJetHt", 0);
47 desc.
add<
int>(
"minNJetMht", 0);
48 desc.
add<
double>(
"minPtJetHt", 40);
49 desc.
add<
double>(
"minPtJetMht", 30);
50 desc.
add<
double>(
"maxEtaJetHt", 3);
51 desc.
add<
double>(
"maxEtaJetMht", 999);
52 desc.
add<
bool>(
"useTracks",
false);
54 desc.
add<
bool>(
"excludePFMuons",
false);
56 descriptions.
add(
"hltHtMhtProducer", desc);
72 int nj_ht = 0, nj_mht = 0;
74 double mhtx=0., mhty=0.;
84 mhtx -= mom*
cos(
jet->phi());
85 mhty -= mom*
sin(
jet->phi());
90 for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); track++) {
101 reco::PFCandidateCollection::const_iterator
i (pfCandidates->begin());
102 for (;
i != pfCandidates->end(); ++
i) {
103 if(
abs(
i->pdgId())==13){
104 mhtx += (
i->pt())*
cos(
i->phi());
105 mhty += (
i->pt())*
sin(
i->phi());
113 metobject->push_back(
121 iEvent.
put(metobject);
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::InputTag pfCandidatesLabel_
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.
Cos< T >::type cos(const T &t)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)