CMS 3D CMS Logo

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::stream::EDProducer<>

Public Member Functions

 HcalHaloDataProducer (const edm::ParameterSet &)
 
 ~HcalHaloDataProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< CaloTowerCollectioncalotower_token_
 
edm::EDGetTokenT< EBRecHitCollectionebrechit_token_
 
edm::EDGetTokenT< EERecHitCollectioneerechit_token_
 
edm::EDGetTokenT< HBHERecHitCollectionhbherechit_token_
 
float HBRecHitEnergyThreshold
 
float HERecHitEnergyThreshold
 
edm::EDGetTokenT< HFRecHitCollectionhfrechit_token_
 
edm::InputTag IT_CaloTowers
 
edm::InputTag IT_EBRecHit
 
edm::InputTag IT_EERecHit
 
edm::InputTag IT_HBHERecHit
 
edm::InputTag IT_HFRecHit
 
edm::InputTag IT_HORecHit
 
int NHitsHcalThreshold
 
float SumHcalEnergyThreshold
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 87 of file HcalHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file HcalHaloDataProducer.cc.

References objects.autophobj::float, and edm::ParameterSet::getParameter().

16 {
17  //RecHit Level
18  IT_EBRecHit = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
19  IT_EERecHit = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
20  IT_HBHERecHit = iConfig.getParameter<edm::InputTag>("HBHERecHitLabel");
21  IT_HFRecHit = iConfig.getParameter<edm::InputTag>("HFRecHitLabel");
22  IT_HORecHit = iConfig.getParameter<edm::InputTag>("HORecHitLabel");
23  IT_CaloTowers = iConfig.getParameter<edm::InputTag>("caloTowerCollName");
24 
25  HBRecHitEnergyThreshold = (float)iConfig.getParameter<double>("HBRecHitEnergyThresholdParam");
26  HERecHitEnergyThreshold = (float)iConfig.getParameter<double>("HERecHitEnergyThresholdParam");
27  SumHcalEnergyThreshold = (float) iConfig.getParameter<double>("SumHcalEnergyThresholdParam");
28  NHitsHcalThreshold = iConfig.getParameter<int>("NHitsHcalThresholdParam");
29 
30  ebrechit_token_ = consumes<EBRecHitCollection>(IT_EBRecHit);
31  eerechit_token_ = consumes<EERecHitCollection>(IT_EERecHit);
32  hbherechit_token_ = consumes<HBHERecHitCollection>(IT_HBHERecHit);
33  hfrechit_token_ = consumes<HFRecHitCollection>(IT_HFRecHit);
34  calotower_token_ = consumes<CaloTowerCollection>(IT_CaloTowers);
35 
36  produces<HcalHaloData>();
37 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< CaloTowerCollection > calotower_token_
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
edm::EDGetTokenT< HFRecHitCollection > hfrechit_token_
HcalHaloDataProducer::~HcalHaloDataProducer ( )
override

Definition at line 78 of file HcalHaloDataProducer.cc.

78 {}

Member Function Documentation

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

Definition at line 39 of file HcalHaloDataProducer.cc.

References HcalHaloAlgo::Calculate(), edm::EventSetup::get(), edm::Event::getByToken(), edm::Event::put(), HcalHaloAlgo::SetPhiWedgeThresholds(), and HcalHaloAlgo::SetRecHitEnergyThresholds().

40 {
41  //Get CaloGeometry
42  edm::ESHandle<CaloGeometry> TheCaloGeometry;
43  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
44 
45  //Get CaloTowers
47  iEvent.getByToken(calotower_token_, TheCaloTowers);
48 
49  //Get EB RecHits
51  iEvent.getByToken(ebrechit_token_, TheEBRecHits);
52 
53  //Get EE RecHits
55  iEvent.getByToken(eerechit_token_, TheEERecHits);
56 
57  //Get HB/HE RecHits
58  edm::Handle<HBHERecHitCollection> TheHBHERecHits;
59  // iEvent.getByLabel(IT_HBHERecHit, TheHBHERecHits);
60  iEvent.getByToken(hbherechit_token_, TheHBHERecHits);
61 
62  //Get HF RecHits
64  // iEvent.getByLabel(IT_HFRecHit, TheHFRecHits);
65  iEvent.getByToken(hfrechit_token_, TheHFRecHits);
66 
67  // Run the HcalHaloAlgo to reconstruct the HcalHaloData object
68  HcalHaloAlgo HcalAlgo;
71 
72 
73 
74  iEvent.put(std::make_unique<HcalHaloData>(HcalAlgo.Calculate(*TheCaloGeometry, TheHBHERecHits, TheCaloTowers, TheEBRecHits, TheEERecHits,iSetup)));
75  return;
76 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
void SetRecHitEnergyThresholds(float HB, float HE)
Definition: HcalHaloAlgo.h:54
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< CaloTowerCollection > calotower_token_
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: HcalHaloAlgo.h:59
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
reco::HcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< HBHERecHitCollection > &TheHBHERecHits, edm::Handle< CaloTowerCollection > &TheCaloTowers, edm::Handle< EBRecHitCollection > &TheEBRecHits, edm::Handle< EERecHitCollection > &TheEERecHits, const edm::EventSetup &TheSetup)
Definition: HcalHaloAlgo.cc:35
T get() const
Definition: EventSetup.h:68
edm::EDGetTokenT< HFRecHitCollection > hfrechit_token_

Member Data Documentation

edm::EDGetTokenT<CaloTowerCollection> reco::HcalHaloDataProducer::calotower_token_
private

Definition at line 109 of file HcalHaloDataProducer.h.

edm::EDGetTokenT<EBRecHitCollection> reco::HcalHaloDataProducer::ebrechit_token_
private

Definition at line 105 of file HcalHaloDataProducer.h.

edm::EDGetTokenT<EERecHitCollection> reco::HcalHaloDataProducer::eerechit_token_
private

Definition at line 106 of file HcalHaloDataProducer.h.

edm::EDGetTokenT<HBHERecHitCollection> reco::HcalHaloDataProducer::hbherechit_token_
private

Definition at line 107 of file HcalHaloDataProducer.h.

float reco::HcalHaloDataProducer::HBRecHitEnergyThreshold
private

Definition at line 111 of file HcalHaloDataProducer.h.

float reco::HcalHaloDataProducer::HERecHitEnergyThreshold
private

Definition at line 112 of file HcalHaloDataProducer.h.

edm::EDGetTokenT<HFRecHitCollection> reco::HcalHaloDataProducer::hfrechit_token_
private

Definition at line 108 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_CaloTowers
private

Definition at line 101 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_EBRecHit
private

Definition at line 102 of file HcalHaloDataProducer.h.

edm::InputTag reco::HcalHaloDataProducer::IT_EERecHit
private

Definition at line 103 of file HcalHaloDataProducer.h.

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

Definition at line 98 of file HcalHaloDataProducer.h.

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

Definition at line 100 of file HcalHaloDataProducer.h.

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

Definition at line 99 of file HcalHaloDataProducer.h.

int reco::HcalHaloDataProducer::NHitsHcalThreshold
private

Definition at line 114 of file HcalHaloDataProducer.h.

float reco::HcalHaloDataProducer::SumHcalEnergyThreshold
private

Definition at line 113 of file HcalHaloDataProducer.h.