CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::EcalHaloDataProducer Class Reference

#include <EcalHaloDataProducer.h>

Inheritance diagram for reco::EcalHaloDataProducer:
edm::stream::EDProducer<>

Public Member Functions

 EcalHaloDataProducer (const edm::ParameterSet &)
 
 ~EcalHaloDataProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

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

Private Attributes

double AngleCut
 
edm::EDGetTokenT< EBRecHitCollectionebrechit_token_
 
float EBRecHitEnergyThreshold
 
edm::EDGetTokenT< EERecHitCollectioneerechit_token_
 
float EERecHitEnergyThreshold
 
edm::EDGetTokenT< ESRecHitCollectionesrechit_token_
 
float ESRecHitEnergyThreshold
 
edm::EDGetTokenT< HBHERecHitCollectionhbherechit_token_
 
edm::InputTag IT_EBRecHit
 
edm::InputTag IT_EERecHit
 
edm::InputTag IT_ESRecHit
 
edm::InputTag IT_HBHERecHit
 
edm::InputTag IT_Photon
 
edm::InputTag IT_SuperCluster
 
int NHitsEcalThreshold
 
edm::EDGetTokenT< reco::PhotonCollectionphoton_token_
 
double RoundnessCut
 
float SumEcalEnergyThreshold
 
edm::EDGetTokenT< reco::SuperClusterCollectionsupercluster_token_
 

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 93 of file EcalHaloDataProducer.h.

Constructor & Destructor Documentation

◆ EcalHaloDataProducer()

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

Definition at line 15 of file EcalHaloDataProducer.cc.

15  {
16  //RecHit Level
17  IT_EBRecHit = iConfig.getParameter<edm::InputTag>("EBRecHitLabel");
18  IT_EERecHit = iConfig.getParameter<edm::InputTag>("EERecHitLabel");
19  IT_ESRecHit = iConfig.getParameter<edm::InputTag>("ESRecHitLabel");
20  IT_HBHERecHit = iConfig.getParameter<edm::InputTag>("HBHERecHitLabel");
21 
22  //Higher Level Reco
23  IT_SuperCluster = iConfig.getParameter<edm::InputTag>("SuperClusterLabel");
24  IT_Photon = iConfig.getParameter<edm::InputTag>("PhotonLabel");
25 
26  // Shower Shape cuts for EcalAlgo
27 
28  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
29  AngleCut = iConfig.getParameter<double>("AngleCutParam");
30 
31  EBRecHitEnergyThreshold = (float)iConfig.getParameter<double>("EBRecHitEnergyThresholdParam");
32  EERecHitEnergyThreshold = (float)iConfig.getParameter<double>("EERecHitEnergyThresholdParam");
33  ESRecHitEnergyThreshold = (float)iConfig.getParameter<double>("ESRecHitEnergyThresholdParam");
34  SumEcalEnergyThreshold = (float)iConfig.getParameter<double>("SumEcalEnergyThresholdParam");
35  NHitsEcalThreshold = iConfig.getParameter<int>("NHitsEcalThresholdParam");
36 
37  RoundnessCut = iConfig.getParameter<double>("RoundnessCutParam");
38  AngleCut = iConfig.getParameter<double>("AngleCutParam");
39 
40  ebrechit_token_ = consumes<EBRecHitCollection>(IT_EBRecHit);
41  eerechit_token_ = consumes<EERecHitCollection>(IT_EERecHit);
42  esrechit_token_ = consumes<ESRecHitCollection>(IT_ESRecHit);
43  hbherechit_token_ = consumes<HBHERecHitCollection>(IT_HBHERecHit);
44  supercluster_token_ = consumes<reco::SuperClusterCollection>(IT_SuperCluster);
45  photon_token_ = consumes<reco::PhotonCollection>(IT_Photon);
46 
47  produces<EcalHaloData>();
48 }

References dqmMemoryStats::float, and edm::ParameterSet::getParameter().

◆ ~EcalHaloDataProducer()

EcalHaloDataProducer::~EcalHaloDataProducer ( )
override

Definition at line 97 of file EcalHaloDataProducer.cc.

97 {}

Member Function Documentation

◆ produce()

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

Definition at line 50 of file EcalHaloDataProducer.cc.

50  {
51  //Get CaloGeometry
52  edm::ESHandle<CaloGeometry> TheCaloGeometry;
53  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
54 
55  //Get EB RecHits
57  // iEvent.getByLabel(IT_EBRecHit, TheEBRecHits);
58  iEvent.getByToken(ebrechit_token_, TheEBRecHits);
59 
60  //Get EE RecHits
62  // iEvent.getByLabel(IT_EERecHit, TheEERecHits);
63  iEvent.getByToken(eerechit_token_, TheEERecHits);
64 
65  //Get ES RecHits
67  // iEvent.getByLabel(IT_ESRecHit, TheESRecHits);
68  iEvent.getByToken(esrechit_token_, TheESRecHits);
69 
70  //Get HBHE RecHits
71  edm::Handle<HBHERecHitCollection> TheHBHERecHits;
72  iEvent.getByToken(hbherechit_token_, TheHBHERecHits);
73 
74  //Get ECAL Barrel SuperClusters
76  // iEvent.getByLabel(IT_SuperCluster, TheSuperClusters);
77  iEvent.getByToken(supercluster_token_, TheSuperClusters);
78 
79  //Get Photons
81  // iEvent.getByLabel(IT_Photon, ThePhotons);
82  iEvent.getByToken(photon_token_, ThePhotons);
83 
84  //Run the EcalHaloAlgo to reconstruct the EcalHaloData object
85  EcalHaloAlgo EcalAlgo;
86  EcalAlgo.SetRoundnessCut(RoundnessCut);
87  EcalAlgo.SetAngleCut(AngleCut);
90 
91  iEvent.put(std::make_unique<EcalHaloData>(EcalAlgo.Calculate(
92  *TheCaloGeometry, ThePhotons, TheSuperClusters, TheEBRecHits, TheEERecHits, TheESRecHits, TheHBHERecHits, iSetup)));
93 
94  return;
95 }

References EcalHaloAlgo::Calculate(), edm::EventSetup::get(), edm::get(), iEvent, EcalHaloAlgo::SetAngleCut(), EcalHaloAlgo::SetPhiWedgeThresholds(), EcalHaloAlgo::SetRecHitEnergyThresholds(), and EcalHaloAlgo::SetRoundnessCut().

Member Data Documentation

◆ AngleCut

double reco::EcalHaloDataProducer::AngleCut
private

Definition at line 125 of file EcalHaloDataProducer.h.

◆ ebrechit_token_

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

Definition at line 111 of file EcalHaloDataProducer.h.

◆ EBRecHitEnergyThreshold

float reco::EcalHaloDataProducer::EBRecHitEnergyThreshold
private

Definition at line 118 of file EcalHaloDataProducer.h.

◆ eerechit_token_

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

Definition at line 112 of file EcalHaloDataProducer.h.

◆ EERecHitEnergyThreshold

float reco::EcalHaloDataProducer::EERecHitEnergyThreshold
private

Definition at line 119 of file EcalHaloDataProducer.h.

◆ esrechit_token_

edm::EDGetTokenT<ESRecHitCollection> reco::EcalHaloDataProducer::esrechit_token_
private

Definition at line 113 of file EcalHaloDataProducer.h.

◆ ESRecHitEnergyThreshold

float reco::EcalHaloDataProducer::ESRecHitEnergyThreshold
private

Definition at line 120 of file EcalHaloDataProducer.h.

◆ hbherechit_token_

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

Definition at line 114 of file EcalHaloDataProducer.h.

◆ IT_EBRecHit

edm::InputTag reco::EcalHaloDataProducer::IT_EBRecHit
private

Definition at line 102 of file EcalHaloDataProducer.h.

◆ IT_EERecHit

edm::InputTag reco::EcalHaloDataProducer::IT_EERecHit
private

Definition at line 103 of file EcalHaloDataProducer.h.

◆ IT_ESRecHit

edm::InputTag reco::EcalHaloDataProducer::IT_ESRecHit
private

Definition at line 104 of file EcalHaloDataProducer.h.

◆ IT_HBHERecHit

edm::InputTag reco::EcalHaloDataProducer::IT_HBHERecHit
private

Definition at line 105 of file EcalHaloDataProducer.h.

◆ IT_Photon

edm::InputTag reco::EcalHaloDataProducer::IT_Photon
private

Definition at line 109 of file EcalHaloDataProducer.h.

◆ IT_SuperCluster

edm::InputTag reco::EcalHaloDataProducer::IT_SuperCluster
private

Definition at line 108 of file EcalHaloDataProducer.h.

◆ NHitsEcalThreshold

int reco::EcalHaloDataProducer::NHitsEcalThreshold
private

Definition at line 122 of file EcalHaloDataProducer.h.

◆ photon_token_

edm::EDGetTokenT<reco::PhotonCollection> reco::EcalHaloDataProducer::photon_token_
private

Definition at line 116 of file EcalHaloDataProducer.h.

◆ RoundnessCut

double reco::EcalHaloDataProducer::RoundnessCut
private

Definition at line 124 of file EcalHaloDataProducer.h.

◆ SumEcalEnergyThreshold

float reco::EcalHaloDataProducer::SumEcalEnergyThreshold
private

Definition at line 121 of file EcalHaloDataProducer.h.

◆ supercluster_token_

edm::EDGetTokenT<reco::SuperClusterCollection> reco::EcalHaloDataProducer::supercluster_token_
private

Definition at line 115 of file EcalHaloDataProducer.h.

dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
EcalHaloAlgo::SetRecHitEnergyThresholds
void SetRecHitEnergyThresholds(float EB, float EE, float ES)
Definition: EcalHaloAlgo.h:66
reco::EcalHaloDataProducer::AngleCut
double AngleCut
Definition: EcalHaloDataProducer.h:125
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
reco::EcalHaloDataProducer::ESRecHitEnergyThreshold
float ESRecHitEnergyThreshold
Definition: EcalHaloDataProducer.h:120
reco::EcalHaloDataProducer::hbherechit_token_
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
Definition: EcalHaloDataProducer.h:114
reco::EcalHaloDataProducer::IT_Photon
edm::InputTag IT_Photon
Definition: EcalHaloDataProducer.h:109
edm::Handle
Definition: AssociativeIterator.h:50
reco::EcalHaloDataProducer::SumEcalEnergyThreshold
float SumEcalEnergyThreshold
Definition: EcalHaloDataProducer.h:121
reco::EcalHaloDataProducer::IT_HBHERecHit
edm::InputTag IT_HBHERecHit
Definition: EcalHaloDataProducer.h:105
reco::EcalHaloDataProducer::NHitsEcalThreshold
int NHitsEcalThreshold
Definition: EcalHaloDataProducer.h:122
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
reco::EcalHaloDataProducer::EERecHitEnergyThreshold
float EERecHitEnergyThreshold
Definition: EcalHaloDataProducer.h:119
edm::ESHandle< CaloGeometry >
EcalHaloAlgo::SetAngleCut
void SetAngleCut(float a=4.)
Definition: EcalHaloAlgo.h:63
reco::EcalHaloDataProducer::ebrechit_token_
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
Definition: EcalHaloDataProducer.h:111
EcalHaloAlgo
Definition: EcalHaloAlgo.h:44
reco::EcalHaloDataProducer::eerechit_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
Definition: EcalHaloDataProducer.h:112
reco::EcalHaloDataProducer::RoundnessCut
double RoundnessCut
Definition: EcalHaloDataProducer.h:124
EcalHaloAlgo::Calculate
reco::EcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< reco::PhotonCollection > &ThePhotons, edm::Handle< reco::SuperClusterCollection > &TheSuperClusters, edm::Handle< EBRecHitCollection > &TheEBRecHits, edm::Handle< EERecHitCollection > &TheEERecHits, edm::Handle< ESRecHitCollection > &TheESRecHits, edm::Handle< HBHERecHitCollection > &TheHBHERecHits, const edm::EventSetup &TheSetup)
Definition: EcalHaloAlgo.cc:31
iEvent
int iEvent
Definition: GenABIO.cc:224
reco::EcalHaloDataProducer::IT_EBRecHit
edm::InputTag IT_EBRecHit
Definition: EcalHaloDataProducer.h:102
reco::EcalHaloDataProducer::EBRecHitEnergyThreshold
float EBRecHitEnergyThreshold
Definition: EcalHaloDataProducer.h:118
reco::EcalHaloDataProducer::photon_token_
edm::EDGetTokenT< reco::PhotonCollection > photon_token_
Definition: EcalHaloDataProducer.h:116
reco::get
T get(const Candidate &c)
Definition: component.h:60
reco::EcalHaloDataProducer::IT_ESRecHit
edm::InputTag IT_ESRecHit
Definition: EcalHaloDataProducer.h:104
reco::EcalHaloDataProducer::supercluster_token_
edm::EDGetTokenT< reco::SuperClusterCollection > supercluster_token_
Definition: EcalHaloDataProducer.h:115
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalHaloAlgo::SetRoundnessCut
void SetRoundnessCut(float r=100.)
Definition: EcalHaloAlgo.h:61
reco::EcalHaloDataProducer::IT_EERecHit
edm::InputTag IT_EERecHit
Definition: EcalHaloDataProducer.h:103
EcalHaloAlgo::SetPhiWedgeThresholds
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: EcalHaloAlgo.h:74
reco::EcalHaloDataProducer::IT_SuperCluster
edm::InputTag IT_SuperCluster
Definition: EcalHaloDataProducer.h:108
edm::InputTag
Definition: InputTag.h:15
reco::EcalHaloDataProducer::esrechit_token_
edm::EDGetTokenT< ESRecHitCollection > esrechit_token_
Definition: EcalHaloDataProducer.h:113