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 Member Functions | Private Attributes
reco::HcalHaloDataProducer Class Reference

#include <HcalHaloDataProducer.h>

Inheritance diagram for reco::HcalHaloDataProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HcalHaloDataProducer (const edm::ParameterSet &)
 
 ~HcalHaloDataProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

float HBRecHitEnergyThreshold
 
float HERecHitEnergyThreshold
 
edm::InputTag IT_HBHERecHit
 
edm::InputTag IT_HFRecHit
 
edm::InputTag IT_HORecHit
 
int NHitsHcalThreshold
 
float SumHcalEnergyThreshold
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 85 of file HcalHaloDataProducer.h.

Constructor & Destructor Documentation

HcalHaloDataProducer::HcalHaloDataProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 14 of file HcalHaloDataProducer.cc.

References edm::ParameterSet::getParameter().

15 {
16  //RecHit Level
17  IT_HBHERecHit = iConfig.getParameter<edm::InputTag>("HBHERecHitLabel");
18  IT_HFRecHit = iConfig.getParameter<edm::InputTag>("HFRecHitLabel");
19  IT_HORecHit = iConfig.getParameter<edm::InputTag>("HORecHitLabel");
20 
21  HBRecHitEnergyThreshold = (float)iConfig.getParameter<double>("HBRecHitEnergyThresholdParam");
22  HERecHitEnergyThreshold = (float)iConfig.getParameter<double>("HERecHitEnergyThresholdParam");
23  SumHcalEnergyThreshold = (float) iConfig.getParameter<double>("SumHcalEnergyThresholdParam");
24  NHitsHcalThreshold = iConfig.getParameter<int>("NHitsHcalThresholdParam");
25 
26  produces<HcalHaloData>();
27 }
T getParameter(std::string const &) const
HcalHaloDataProducer::~HcalHaloDataProducer ( )

Definition at line 62 of file HcalHaloDataProducer.cc.

62 {}

Member Function Documentation

void HcalHaloDataProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 29 of file HcalHaloDataProducer.cc.

References HcalHaloAlgo::Calculate(), edm::EventSetup::get(), edm::Event::getByLabel(), HcalHaloData_cfi::HcalHaloData, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), edm::Event::put(), HcalHaloAlgo::SetPhiWedgeThresholds(), and HcalHaloAlgo::SetRecHitEnergyThresholds().

30 {
31  //Get CaloGeometry
32  edm::ESHandle<CaloGeometry> TheCaloGeometry;
33  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
34 
35  //Get HB/HE RecHits
36  edm::Handle<HBHERecHitCollection> TheHBHERecHits;
37  iEvent.getByLabel(IT_HBHERecHit, TheHBHERecHits);
38 
39  //Get HF RecHits
41  iEvent.getByLabel(IT_HFRecHit, TheHFRecHits);
42 
43  // Run the HcalHaloAlgo to reconstruct the HcalHaloData object
44  HcalHaloAlgo HcalAlgo;
47 
48  HcalHaloData HcalData;
49  if( TheCaloGeometry.isValid() && TheHBHERecHits.isValid() )
50  {
51  std::auto_ptr<HcalHaloData> HcalData( new HcalHaloData( HcalAlgo.Calculate(*TheCaloGeometry, TheHBHERecHits) ) ) ;
52  iEvent.put ( HcalData ) ;
53  }
54  else
55  {
56  std::auto_ptr<HcalHaloData> HcalData( new HcalHaloData() ) ;
57  iEvent.put( HcalData ) ;
58  }
59  return;
60 }
void SetRecHitEnergyThresholds(float HB, float HE)
Definition: HcalHaloAlgo.h:38
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
reco::HcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< HBHERecHitCollection > &TheHBHERecHits)
Definition: HcalHaloAlgo.cc:25
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: HcalHaloAlgo.h:43
const T & get() const
Definition: EventSetup.h:55
bool isValid() const
Definition: ESHandle.h:37

Member Data Documentation

float reco::HcalHaloDataProducer::HBRecHitEnergyThreshold
private

Definition at line 100 of file HcalHaloDataProducer.h.

float reco::HcalHaloDataProducer::HERecHitEnergyThreshold
private

Definition at line 101 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_HBHERecHit
private

Definition at line 96 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_HFRecHit
private

Definition at line 98 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_HORecHit
private

Definition at line 97 of file HcalHaloDataProducer.h.

int reco::HcalHaloDataProducer::NHitsHcalThreshold
private

Definition at line 103 of file HcalHaloDataProducer.h.

float reco::HcalHaloDataProducer::SumHcalEnergyThreshold
private

Definition at line 102 of file HcalHaloDataProducer.h.