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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

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

Private Attributes

edm::ESGetToken< CaloGeometry, CaloGeometryRecordcalogeometry_token_
 
edm::EDGetTokenT< CaloTowerCollectioncalotower_token_
 
edm::EDGetTokenT< EBRecHitCollectionebrechit_token_
 
edm::EDGetTokenT< EERecHitCollectioneerechit_token_
 
edm::EDGetTokenT< HBHERecHitCollectionhbherechit_token_
 
float HBRecHitEnergyThreshold
 
HcalHaloAlgo HcalAlgo
 
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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 86 of file HcalHaloDataProducer.h.

Constructor & Destructor Documentation

◆ HcalHaloDataProducer()

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

Definition at line 15 of file HcalHaloDataProducer.cc.

References calogeometry_token_, calotower_token_, ebrechit_token_, eerechit_token_, nano_mu_digi_cff::float, edm::ParameterSet::getParameter(), hbherechit_token_, HBRecHitEnergyThreshold, HERecHitEnergyThreshold, hfrechit_token_, IT_CaloTowers, IT_EBRecHit, IT_EERecHit, IT_HBHERecHit, IT_HFRecHit, IT_HORecHit, NHitsHcalThreshold, and SumHcalEnergyThreshold.

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

◆ ~HcalHaloDataProducer()

HcalHaloDataProducer::~HcalHaloDataProducer ( )
override

Definition at line 74 of file HcalHaloDataProducer.cc.

74 {}

Member Function Documentation

◆ produce()

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

Definition at line 39 of file HcalHaloDataProducer.cc.

References HcalHaloAlgo::Calculate(), calogeometry_token_, calotower_token_, ebrechit_token_, eerechit_token_, edm::EventSetup::getHandle(), hbherechit_token_, HBRecHitEnergyThreshold, HcalAlgo, HERecHitEnergyThreshold, hfrechit_token_, iEvent, NHitsHcalThreshold, HcalHaloAlgo::SetPhiWedgeThresholds(), HcalHaloAlgo::SetRecHitEnergyThresholds(), and SumHcalEnergyThreshold.

39  {
40  //Get CaloGeometry
42 
43  //Get CaloTowers
45  iEvent.getByToken(calotower_token_, TheCaloTowers);
46 
47  //Get EB RecHits
49  iEvent.getByToken(ebrechit_token_, TheEBRecHits);
50 
51  //Get EE RecHits
53  iEvent.getByToken(eerechit_token_, TheEERecHits);
54 
55  //Get HB/HE RecHits
56  edm::Handle<HBHERecHitCollection> TheHBHERecHits;
57  // iEvent.getByLabel(IT_HBHERecHit, TheHBHERecHits);
58  iEvent.getByToken(hbherechit_token_, TheHBHERecHits);
59 
60  //Get HF RecHits
62  // iEvent.getByLabel(IT_HFRecHit, TheHFRecHits);
63  iEvent.getByToken(hfrechit_token_, TheHFRecHits);
64 
65  // Run the HcalHaloAlgo to reconstruct the HcalHaloData object
68 
69  iEvent.put(std::make_unique<HcalHaloData>(
70  HcalAlgo.Calculate(*TheCaloGeometry, TheHBHERecHits, TheCaloTowers, TheEBRecHits, TheEERecHits, iSetup)));
71  return;
72 }
void SetRecHitEnergyThresholds(float HB, float HE)
Definition: HcalHaloAlgo.h:61
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
int iEvent
Definition: GenABIO.cc:224
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calogeometry_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< CaloTowerCollection > calotower_token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: HcalHaloAlgo.h:69
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:40
edm::EDGetTokenT< HFRecHitCollection > hfrechit_token_

Member Data Documentation

◆ calogeometry_token_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> reco::HcalHaloDataProducer::calogeometry_token_
private

Definition at line 107 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ calotower_token_

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

Definition at line 106 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ ebrechit_token_

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

Definition at line 102 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ eerechit_token_

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

Definition at line 103 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ hbherechit_token_

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

Definition at line 104 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ HBRecHitEnergyThreshold

float reco::HcalHaloDataProducer::HBRecHitEnergyThreshold
private

Definition at line 110 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ HcalAlgo

HcalHaloAlgo reco::HcalHaloDataProducer::HcalAlgo
private

Definition at line 108 of file HcalHaloDataProducer.h.

Referenced by produce().

◆ HERecHitEnergyThreshold

float reco::HcalHaloDataProducer::HERecHitEnergyThreshold
private

Definition at line 111 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ hfrechit_token_

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

Definition at line 105 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ IT_CaloTowers

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

Definition at line 98 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ IT_EBRecHit

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

Definition at line 99 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ IT_EERecHit

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

Definition at line 100 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ IT_HBHERecHit

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

Definition at line 95 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ IT_HFRecHit

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

Definition at line 97 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ IT_HORecHit

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

Definition at line 96 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer().

◆ NHitsHcalThreshold

int reco::HcalHaloDataProducer::NHitsHcalThreshold
private

Definition at line 113 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().

◆ SumHcalEnergyThreshold

float reco::HcalHaloDataProducer::SumHcalEnergyThreshold
private

Definition at line 112 of file HcalHaloDataProducer.h.

Referenced by HcalHaloDataProducer(), and produce().