CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLTJetIDProducer Class Reference

#include <HLTJetIDProducer.h>

Inheritance diagram for HLTJetIDProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_

Detailed Description

Definition at line 9 of file HLTJetIDProducer.h.


Constructor & Destructor Documentation

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.

{

}

Member Function Documentation

void HLTJetIDProducer::beginJob ( void  ) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 18 of file HLTJetIDProducer.cc.

{

}
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);

}

Member Data Documentation

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().

Definition at line 19 of file HLTJetIDProducer.h.

Referenced by HLTJetIDProducer(), and produce().