#include <HLTPFJetIDProducer.h>
Public Member Functions | |
virtual void | beginJob () |
HLTPFJetIDProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~HLTPFJetIDProducer () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Attributes | |
edm::InputTag | jetsInput_ |
double | max_CEMF_ |
double | max_CHEF_ |
double | max_NEMF_ |
double | max_NHEF_ |
double | min_CEMF_ |
double | min_CHEF_ |
double | min_NEMF_ |
double | min_NHEF_ |
double | min_pt_ |
Definition at line 10 of file HLTPFJetIDProducer.h.
HLTPFJetIDProducer::HLTPFJetIDProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 8 of file HLTPFJetIDProducer.cc.
: jetsInput_ (iConfig.getParameter<edm::InputTag>("jetsInput")), min_NHEF_ (iConfig.getParameter<double>("min_NHEF")), max_NHEF_ (iConfig.getParameter<double>("max_NHEF")), min_NEMF_ (iConfig.getParameter<double>("min_NEMF")), max_NEMF_ (iConfig.getParameter<double>("max_NEMF")), min_CEMF_ (iConfig.getParameter<double>("min_CEMF")), max_CEMF_ (iConfig.getParameter<double>("max_CEMF")), min_CHEF_ (iConfig.getParameter<double>("min_CHEF")), max_CHEF_ (iConfig.getParameter<double>("max_CHEF")), min_pt_ (iConfig.getParameter<double>("min_pt")) { produces< reco::PFJetCollection > (); }
HLTPFJetIDProducer::~HLTPFJetIDProducer | ( | ) |
Definition at line 43 of file HLTPFJetIDProducer.cc.
{ }
void HLTPFJetIDProducer::beginJob | ( | void | ) | [virtual] |
void HLTPFJetIDProducer::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 23 of file HLTPFJetIDProducer.cc.
References edm::ParameterSetDescription::add(), and edm::ConfigurationDescriptions::add().
{ edm::ParameterSetDescription desc; desc.add<edm::InputTag>("jetsInput",edm::InputTag("hltAntiKT5PFJets")); desc.add<double>("min_NHEF",-999.0); desc.add<double>("max_NHEF",999.0); desc.add<double>("min_NEMF",-999.0); desc.add<double>("max_NEMF",999.0); desc.add<double>("min_CEMF",-999.0); desc.add<double>("max_CEMF",999.0); desc.add<double>("min_CHEF",-999.0); desc.add<double>("max_CHEF",999.0); desc.add<double>("min_pt",30.0); descriptions.add("hltPFJetIDProducer", desc); }
void HLTPFJetIDProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 48 of file HLTPFJetIDProducer.cc.
References abs, edm::Event::getByLabel(), jetsInput_, max_CEMF_, max_CHEF_, max_NEMF_, max_NHEF_, min_CEMF_, min_CHEF_, min_NEMF_, min_NHEF_, min_pt_, edm::Event::put(), and query::result.
{ edm::Handle<reco::PFJetCollection> pfjets; iEvent.getByLabel(jetsInput_, pfjets); std::auto_ptr<reco::PFJetCollection> result (new reco::PFJetCollection); for (reco::PFJetCollection::const_iterator pfjetc = pfjets->begin(); pfjetc != pfjets->end(); ++pfjetc) { if (std::abs(pfjetc->eta()) >= 2.4) { result->push_back(*pfjetc); } else { if (pfjetc->pt()<min_pt_) result->push_back(*pfjetc); else if ((pfjetc->neutralHadronEnergyFraction() >= min_NHEF_) && (pfjetc->neutralHadronEnergyFraction() <= max_NHEF_) && (pfjetc->neutralEmEnergyFraction() >= min_NEMF_) && (pfjetc->neutralEmEnergyFraction() <= max_NEMF_) && (pfjetc->chargedEmEnergyFraction() >= min_CEMF_) && (pfjetc->chargedEmEnergyFraction() <= max_CEMF_) && (pfjetc->chargedHadronEnergyFraction() >= min_CHEF_) && (pfjetc->chargedHadronEnergyFraction() <= max_CHEF_)) { result->push_back(*pfjetc); } } } // pfjetc iEvent.put( result); }
edm::InputTag HLTPFJetIDProducer::jetsInput_ [private] |
Definition at line 18 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::max_CEMF_ [private] |
Definition at line 24 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::max_CHEF_ [private] |
Definition at line 26 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::max_NEMF_ [private] |
Definition at line 22 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::max_NHEF_ [private] |
Definition at line 20 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::min_CEMF_ [private] |
Definition at line 23 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::min_CHEF_ [private] |
Definition at line 25 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::min_NEMF_ [private] |
Definition at line 21 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::min_NHEF_ [private] |
Definition at line 19 of file HLTPFJetIDProducer.h.
Referenced by produce().
double HLTPFJetIDProducer::min_pt_ [private] |
Definition at line 27 of file HLTPFJetIDProducer.h.
Referenced by produce().