CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 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

double AngleCut
 
edm::ESGetToken< CaloGeometry,
CaloGeometryRecord
calogeometry_token_
 
edm::EDGetTokenT
< EBRecHitCollection
ebrechit_token_
 
float EBRecHitEnergyThreshold
 
EcalHaloAlgo EcalAlgo
 
edm::EDGetTokenT
< EERecHitCollection
eerechit_token_
 
float EERecHitEnergyThreshold
 
edm::EDGetTokenT
< ESRecHitCollection
esrechit_token_
 
float ESRecHitEnergyThreshold
 
edm::EDGetTokenT
< HBHERecHitCollection
hbherechit_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::PhotonCollection
photon_token_
 
double RoundnessCut
 
float SumEcalEnergyThreshold
 
edm::EDGetTokenT
< reco::SuperClusterCollection
supercluster_token_
 

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

Constructor & Destructor Documentation

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

Definition at line 15 of file EcalHaloDataProducer.cc.

References AngleCut, calogeometry_token_, ebrechit_token_, EBRecHitEnergyThreshold, eerechit_token_, EERecHitEnergyThreshold, esrechit_token_, ESRecHitEnergyThreshold, edm::ParameterSet::getParameter(), hbherechit_token_, IT_EBRecHit, IT_EERecHit, IT_ESRecHit, IT_HBHERecHit, IT_Photon, IT_SuperCluster, NHitsEcalThreshold, photon_token_, RoundnessCut, SumEcalEnergyThreshold, and supercluster_token_.

15  : EcalAlgo(consumesCollector()) {
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  calogeometry_token_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
47 
48  produces<EcalHaloData>();
49 }
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< reco::SuperClusterCollection > supercluster_token_
edm::EDGetTokenT< reco::PhotonCollection > photon_token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calogeometry_token_
edm::EDGetTokenT< ESRecHitCollection > esrechit_token_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
EcalHaloDataProducer::~EcalHaloDataProducer ( )
override

Definition at line 96 of file EcalHaloDataProducer.cc.

96 {}

Member Function Documentation

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

Definition at line 51 of file EcalHaloDataProducer.cc.

References AngleCut, EcalHaloAlgo::Calculate(), calogeometry_token_, ebrechit_token_, EBRecHitEnergyThreshold, EcalAlgo, eerechit_token_, EERecHitEnergyThreshold, esrechit_token_, ESRecHitEnergyThreshold, edm::Event::getByToken(), edm::EventSetup::getHandle(), hbherechit_token_, NHitsEcalThreshold, photon_token_, edm::Event::put(), RoundnessCut, EcalHaloAlgo::SetAngleCut(), EcalHaloAlgo::SetPhiWedgeThresholds(), EcalHaloAlgo::SetRecHitEnergyThresholds(), EcalHaloAlgo::SetRoundnessCut(), SumEcalEnergyThreshold, and supercluster_token_.

51  {
52  //Get CaloGeometry
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
89 
90  iEvent.put(std::make_unique<EcalHaloData>(EcalAlgo.Calculate(
91  *TheCaloGeometry, ThePhotons, TheSuperClusters, TheEBRecHits, TheEERecHits, TheESRecHits, TheHBHERecHits, iSetup)));
92 
93  return;
94 }
edm::EDGetTokenT< EBRecHitCollection > ebrechit_token_
void SetAngleCut(float a=4.)
Definition: EcalHaloAlgo.h:63
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EDGetTokenT< EERecHitCollection > eerechit_token_
edm::EDGetTokenT< reco::SuperClusterCollection > supercluster_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< reco::PhotonCollection > photon_token_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calogeometry_token_
void SetRecHitEnergyThresholds(float EB, float EE, float ES)
Definition: EcalHaloAlgo.h:66
edm::EDGetTokenT< ESRecHitCollection > esrechit_token_
void SetPhiWedgeThresholds(float SumE, int nhits)
Definition: EcalHaloAlgo.h:74
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:32
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void SetRoundnessCut(float r=100.)
Definition: EcalHaloAlgo.h:61

Member Data Documentation

double reco::EcalHaloDataProducer::AngleCut
private

Definition at line 128 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 118 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 112 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

float reco::EcalHaloDataProducer::EBRecHitEnergyThreshold
private

Definition at line 121 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

EcalHaloAlgo reco::EcalHaloDataProducer::EcalAlgo
private

Definition at line 119 of file EcalHaloDataProducer.h.

Referenced by produce().

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

Definition at line 113 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

float reco::EcalHaloDataProducer::EERecHitEnergyThreshold
private

Definition at line 122 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 114 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

float reco::EcalHaloDataProducer::ESRecHitEnergyThreshold
private

Definition at line 123 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 115 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 103 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

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

Definition at line 104 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

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

Definition at line 105 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

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

Definition at line 106 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

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

Definition at line 110 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

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

Definition at line 109 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer().

int reco::EcalHaloDataProducer::NHitsEcalThreshold
private

Definition at line 125 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 117 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

double reco::EcalHaloDataProducer::RoundnessCut
private

Definition at line 127 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

float reco::EcalHaloDataProducer::SumEcalEnergyThreshold
private

Definition at line 124 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().

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

Definition at line 116 of file EcalHaloDataProducer.h.

Referenced by EcalHaloDataProducer(), and produce().