CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HLTCaloJetIDProducer Class Reference

#include <HLTCaloJetIDProducer.h>

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

Public Member Functions

virtual void beginJob ()
 
 HLTCaloJetIDProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~HLTCaloJetIDProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

6  :
7  jetsInput_ (iConfig.getParameter<edm::InputTag>("jetsInput")),
8  min_EMF_ (iConfig.getParameter<double>("min_EMF")),
9  max_EMF_ (iConfig.getParameter<double>("max_EMF")),
10  min_N90_ (iConfig.getParameter<int>("min_N90")),
11  min_N90hits_ (iConfig.getParameter<int>("min_N90hits")),
12  jetID_ (iConfig.getParameter<edm::ParameterSet>("JetIDParams"))
13 {
14  // produces< reco::CaloJetCollection > ( "hltCaloJetIDCollection" );
15  produces< reco::CaloJetCollection > ();
16 }
T getParameter(std::string const &) const
reco::helper::JetIDHelper jetID_
HLTCaloJetIDProducer::~HLTCaloJetIDProducer ( )

Definition at line 23 of file HLTCaloJetIDProducer.cc.

24 {
25 
26 }

Member Function Documentation

void HLTCaloJetIDProducer::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 18 of file HLTCaloJetIDProducer.cc.

19 {
20 
21 }
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.

29 {
30 
32  iEvent.getByLabel(jetsInput_, calojets);
33 
34  std::auto_ptr<reco::CaloJetCollection> result (new reco::CaloJetCollection);
35 
36  for (reco::CaloJetCollection::const_iterator calojetc = calojets->begin();
37  calojetc != calojets->end(); ++calojetc) {
38 
39  if (std::abs(calojetc->eta()) >= 2.6) {
40  result->push_back(*calojetc);
41  } else {
42  if (min_N90hits_>0) jetID_.calculate( iEvent, *calojetc );
43  if ((calojetc->emEnergyFraction() >= min_EMF_) && ((min_N90hits_<=0) || (jetID_.n90Hits() >= min_N90hits_)) && (calojetc->n90() >= min_N90_) && (calojetc->emEnergyFraction() <= max_EMF_)) {
44  result->push_back(*calojetc);
45  }
46  }
47  } // calojetc
48 
49  //iEvent.put( result, "hltCaloJetIDCollection");
50  iEvent.put( result);
51 
52 }
#define abs(x)
Definition: mlp_lapack.h:159
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
reco::helper::JetIDHelper jetID_
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects

Member Data Documentation

reco::helper::JetIDHelper HLTCaloJetIDProducer::jetID_
private

Definition at line 23 of file HLTCaloJetIDProducer.h.

Referenced by produce().

edm::InputTag HLTCaloJetIDProducer::jetsInput_
private

Definition at line 17 of file HLTCaloJetIDProducer.h.

Referenced by produce().

double HLTCaloJetIDProducer::max_EMF_
private

Definition at line 19 of file HLTCaloJetIDProducer.h.

Referenced by produce().

double HLTCaloJetIDProducer::min_EMF_
private

Definition at line 18 of file HLTCaloJetIDProducer.h.

Referenced by produce().

int HLTCaloJetIDProducer::min_N90_
private

Definition at line 20 of file HLTCaloJetIDProducer.h.

Referenced by produce().

int HLTCaloJetIDProducer::min_N90hits_
private

Definition at line 21 of file HLTCaloJetIDProducer.h.

Referenced by produce().