CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLTCaloJetIDProducer Class Reference

#include <HLTCaloJetIDProducer.h>

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

List of all members.

Public Member Functions

virtual void beginJob ()
 HLTCaloJetIDProducer (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~HLTCaloJetIDProducer ()

Private Attributes

reco::helper::JetIDHelper jetID_
edm::InputTag jetsInput_
double max_EMF_
double min_EMF_
int min_N90_
int min_N90hits_

Detailed Description

Definition at line 10 of file HLTCaloJetIDProducer.h.


Constructor & Destructor Documentation

HLTCaloJetIDProducer::HLTCaloJetIDProducer ( const edm::ParameterSet iConfig) [explicit]

Definition at line 6 of file HLTCaloJetIDProducer.cc.

                                                                         :
  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")),
  min_N90hits_ (iConfig.getParameter<int>("min_N90hits")),
  jetID_       (iConfig.getParameter<edm::ParameterSet>("JetIDParams"))
{
  //  produces< reco::CaloJetCollection > ( "hltCaloJetIDCollection" );
  produces< reco::CaloJetCollection > ();
}
HLTCaloJetIDProducer::~HLTCaloJetIDProducer ( )

Definition at line 23 of file HLTCaloJetIDProducer.cc.

{

}

Member Function Documentation

void HLTCaloJetIDProducer::beginJob ( void  ) [virtual]

Reimplemented from edm::EDProducer.

Definition at line 18 of file HLTCaloJetIDProducer.cc.

{

}
void HLTCaloJetIDProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 28 of file HLTCaloJetIDProducer.cc.

References abs, reco::helper::JetIDHelper::calculate(), edm::Event::getByLabel(), jetID_, jetsInput_, max_EMF_, min_EMF_, min_N90_, min_N90hits_, reco::helper::JetIDHelper::n90Hits(), 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 (std::abs(calojetc->eta()) >= 2.6) {
      result->push_back(*calojetc);
    } else {
      if (min_N90hits_>0) jetID_.calculate( iEvent, *calojetc );
      if ((calojetc->emEnergyFraction() >= min_EMF_) && ((min_N90hits_<=0) || (jetID_.n90Hits() >= min_N90hits_))  && (calojetc->n90() >= min_N90_) && (calojetc->emEnergyFraction() <= max_EMF_)) {
        result->push_back(*calojetc);
      }
    }
  } // calojetc

  //iEvent.put( result, "hltCaloJetIDCollection");
  iEvent.put( result);

}

Member Data Documentation

Definition at line 23 of file HLTCaloJetIDProducer.h.

Referenced by produce().

Definition at line 17 of file HLTCaloJetIDProducer.h.

Referenced by produce().

Definition at line 19 of file HLTCaloJetIDProducer.h.

Referenced by produce().

Definition at line 18 of file HLTCaloJetIDProducer.h.

Referenced by produce().

Definition at line 20 of file HLTCaloJetIDProducer.h.

Referenced by produce().

Definition at line 21 of file HLTCaloJetIDProducer.h.

Referenced by produce().