#include <HLTJetIDProducer.h>
Public Member Functions | |
virtual void | beginJob () |
HLTJetIDProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~HLTJetIDProducer () | |
Private Attributes | |
edm::InputTag | jetsInput_ |
double | max_EMF_ |
double | min_EMF_ |
int | min_N90_ |
Definition at line 9 of file HLTJetIDProducer.h.
HLTJetIDProducer::HLTJetIDProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 6 of file HLTJetIDProducer.cc.
References edm::ParameterSet::getParameter(), jetsInput_, max_EMF_, min_EMF_, and min_N90_.
{ jetsInput_ = iConfig.getParameter<edm::InputTag>("jetsInput"); min_EMF_ = iConfig.getParameter<double>("min_EMF"); max_EMF_ = iConfig.getParameter<double>("max_EMF"); min_N90_ = iConfig.getParameter<int>("min_N90"); // produces< reco::CaloJetCollection > ( "hltJetIDCollection" ); produces< reco::CaloJetCollection > (); }
HLTJetIDProducer::~HLTJetIDProducer | ( | ) |
Definition at line 23 of file HLTJetIDProducer.cc.
{ }
void HLTJetIDProducer::beginJob | ( | void | ) | [virtual] |
void HLTJetIDProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 28 of file HLTJetIDProducer.cc.
References edm::Event::getByLabel(), jetsInput_, max_EMF_, min_EMF_, min_N90_, edm::Event::put(), and query::result.
{ edm::Handle<reco::CaloJetCollection> calojets; iEvent.getByLabel(jetsInput_, calojets); std::auto_ptr<reco::CaloJetCollection> result (new reco::CaloJetCollection); for (reco::CaloJetCollection::const_iterator calojetc = calojets->begin(); calojetc != calojets->end(); ++calojetc) { if (fabs(calojetc->eta()) >= 2.6) { result->push_back(*calojetc); } else if ((calojetc->emEnergyFraction() >= min_EMF_) && (calojetc->n90() >= min_N90_) && (calojetc->emEnergyFraction() <= max_EMF_)) { result->push_back(*calojetc); } } // calojetc //iEvent.put( result, "hltJetIDCollection"); iEvent.put( result); }
edm::InputTag HLTJetIDProducer::jetsInput_ [private] |
Definition at line 16 of file HLTJetIDProducer.h.
Referenced by HLTJetIDProducer(), and produce().
double HLTJetIDProducer::max_EMF_ [private] |
Definition at line 18 of file HLTJetIDProducer.h.
Referenced by HLTJetIDProducer(), and produce().
double HLTJetIDProducer::min_EMF_ [private] |
Definition at line 17 of file HLTJetIDProducer.h.
Referenced by HLTJetIDProducer(), and produce().
int HLTJetIDProducer::min_N90_ [private] |
Definition at line 19 of file HLTJetIDProducer.h.
Referenced by HLTJetIDProducer(), and produce().