CMS 3D CMS Logo

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

#include <GlobalHaloDataProducer.h>

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

Public Member Functions

 GlobalHaloDataProducer (const edm::ParameterSet &)
 
 ~GlobalHaloDataProducer () 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< reco::CaloMETCollectioncalomet_token_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
 
float CaloTowerEtThreshold
 
edm::ESGetToken< CSCGeometry, MuonGeometryRecordcscgeometry_token_
 
edm::EDGetTokenT< CSCHaloDatacschalo_token_
 
edm::EDGetTokenT< CSCRecHit2DCollectioncscrechit_token_
 
edm::EDGetTokenT< CSCSegmentCollectioncscsegment_token_
 
edm::EDGetTokenT< EcalHaloDataecalhalo_token_
 
float EcalMaxMatchingRadius
 
float EcalMinMatchingRadius
 
GlobalHaloAlgo GlobalAlgo
 
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordglobaltrackinggeometry_token_
 
edm::EDGetTokenT< HcalHaloDatahcalhalo_token_
 
float HcalMaxMatchingRadius
 
float HcalMinMatchingRadius
 
bool ishlt
 
edm::InputTag IT_CaloTower
 
edm::InputTag IT_CSCHaloData
 
edm::InputTag IT_CSCRecHit
 
edm::InputTag IT_CSCSegment
 
edm::InputTag IT_EcalHaloData
 
edm::InputTag IT_HcalHaloData
 
edm::InputTag IT_met
 
edm::InputTag IT_Muon
 
edm::EDGetTokenT< reco::MuonCollectionmuon_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 180 of file GlobalHaloDataProducer.h.

Constructor & Destructor Documentation

◆ GlobalHaloDataProducer()

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

Definition at line 15 of file GlobalHaloDataProducer.cc.

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

15  {
16  ishlt = iConfig.getParameter<bool>("IsHLT");
17 
18  //Higher Level Reco
19  IT_met = iConfig.getParameter<edm::InputTag>("metLabel");
20  IT_CaloTower = iConfig.getParameter<edm::InputTag>("calotowerLabel");
21  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
22  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");
23  IT_Muon = iConfig.getParameter<edm::InputTag>("MuonLabel");
24  //Halo Data from Sub-detectors
25  IT_CSCHaloData = iConfig.getParameter<edm::InputTag>("CSCHaloDataLabel");
26  IT_EcalHaloData = iConfig.getParameter<edm::InputTag>("EcalHaloDataLabel");
27  IT_HcalHaloData = iConfig.getParameter<edm::InputTag>("HcalHaloDataLabel");
28 
29  EcalMinMatchingRadius = (float)iConfig.getParameter<double>("EcalMinMatchingRadiusParam");
30  EcalMaxMatchingRadius = (float)iConfig.getParameter<double>("EcalMaxMatchingRadiusParam");
31  HcalMinMatchingRadius = (float)iConfig.getParameter<double>("HcalMinMatchingRadiusParam");
32  HcalMaxMatchingRadius = (float)iConfig.getParameter<double>("HcalMaxMatchingRadiusParam");
33  CaloTowerEtThreshold = (float)iConfig.getParameter<double>("CaloTowerEtThresholdParam");
34 
35  //Parameters for CSC-calo matching
36  //Flat segment theta condition:
37  GlobalAlgo.SetMaxSegmentTheta((float)iConfig.getParameter<double>("MaxSegmentTheta"));
38  //EB
39  GlobalAlgo.setEtThresholdforCSCCaloMatchingEB((float)iConfig.getParameter<double>("rh_et_threshforcscmatching_eb"));
41  (float)iConfig.getParameter<double>("rcalominrsegm_lowthresh_eb"));
43  (float)iConfig.getParameter<double>("rcalominrsegm_highthresh_eb"));
44  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingEB((float)iConfig.getParameter<double>("dtcalosegm_thresh_eb"));
46  (float)iConfig.getParameter<double>("dphicalosegm_thresh_eb"));
47  //EE
48  GlobalAlgo.setEtThresholdforCSCCaloMatchingEE((float)iConfig.getParameter<double>("rh_et_threshforcscmatching_ee"));
50  (float)iConfig.getParameter<double>("rcalominrsegm_lowthresh_ee"));
52  (float)iConfig.getParameter<double>("rcalominrsegm_highthresh_ee"));
53  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingEE((float)iConfig.getParameter<double>("dtcalosegm_thresh_ee"));
55  (float)iConfig.getParameter<double>("dphicalosegm_thresh_ee"));
56  //HB
57  GlobalAlgo.setEtThresholdforCSCCaloMatchingHB((float)iConfig.getParameter<double>("rh_et_threshforcscmatching_hb"));
59  (float)iConfig.getParameter<double>("rcalominrsegm_lowthresh_hb"));
61  (float)iConfig.getParameter<double>("rcalominrsegm_highthresh_hb"));
62  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingHB((float)iConfig.getParameter<double>("dtcalosegm_thresh_hb"));
64  (float)iConfig.getParameter<double>("dphicalosegm_thresh_hb"));
65  //HE
66  GlobalAlgo.setEtThresholdforCSCCaloMatchingHE((float)iConfig.getParameter<double>("rh_et_threshforcscmatching_he"));
68  (float)iConfig.getParameter<double>("rcalominrsegm_lowthresh_he"));
70  (float)iConfig.getParameter<double>("rcalominrsegm_highthresh_he"));
71  GlobalAlgo.setDtcalosegmThresholdforCSCCaloMatchingHE((float)iConfig.getParameter<double>("dtcalosegm_thresh_he"));
73  (float)iConfig.getParameter<double>("dphicalosegm_thresh_he"));
74 
75  calotower_token_ = consumes<edm::View<Candidate> >(IT_CaloTower);
76  calomet_token_ = consumes<reco::CaloMETCollection>(IT_met);
77  cscsegment_token_ = consumes<CSCSegmentCollection>(IT_CSCSegment);
78  cscrechit_token_ = consumes<CSCRecHit2DCollection>(IT_CSCRecHit);
79  muon_token_ = consumes<reco::MuonCollection>(IT_Muon);
80  cschalo_token_ = consumes<CSCHaloData>(IT_CSCHaloData);
81  ecalhalo_token_ = consumes<EcalHaloData>(IT_EcalHaloData);
82  hcalhalo_token_ = consumes<HcalHaloData>(IT_HcalHaloData);
83  cscgeometry_token_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
84  globaltrackinggeometry_token_ = esConsumes<GlobalTrackingGeometry, GlobalTrackingGeometryRecord>();
85  calogeometry_token_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
86 
87  produces<GlobalHaloData>();
88 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingHB(float x)
void setEtThresholdforCSCCaloMatchingHB(float x)
void SetMaxSegmentTheta(float x)
void setDtcalosegmThresholdforCSCCaloMatchingHE(float x)
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingHE(float x)
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingHB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingEB(float x)
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
void setDtcalosegmThresholdforCSCCaloMatchingEE(float x)
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingEB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingEE(float x)
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globaltrackinggeometry_token_
void setEtThresholdforCSCCaloMatchingHE(float x)
void setEtThresholdforCSCCaloMatchingEB(float x)
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingHE(float x)
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscgeometry_token_
void setEtThresholdforCSCCaloMatchingEE(float x)
void setDtcalosegmThresholdforCSCCaloMatchingEB(float x)
edm::EDGetTokenT< reco::CaloMETCollection > calomet_token_
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingEE(float x)
void setRcaloMinRsegmHighThresholdforCSCCaloMatchingEB(float x)
void setDPhicalosegmThresholdforCSCCaloMatchingHB(float x)
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void setDPhicalosegmThresholdforCSCCaloMatchingHE(float x)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calogeometry_token_
edm::EDGetTokenT< EcalHaloData > ecalhalo_token_
void setDtcalosegmThresholdforCSCCaloMatchingHB(float x)
edm::EDGetTokenT< HcalHaloData > hcalhalo_token_
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingEE(float x)
edm::EDGetTokenT< CSCHaloData > cschalo_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_

◆ ~GlobalHaloDataProducer()

GlobalHaloDataProducer::~GlobalHaloDataProducer ( )
override

Definition at line 165 of file GlobalHaloDataProducer.cc.

165 {}

Member Function Documentation

◆ produce()

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

Definition at line 90 of file GlobalHaloDataProducer.cc.

References edm::EventSetup::getHandle(), GlobalHaloData_cfi::GlobalHaloData, iEvent, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), and edm::Handle< T >::product().

90  {
91  //Get CSC Geometry
93 
94  //Get Global Tracking Geometry
96 
97  //Get CaloGeometry
99 
100  //Get CaloTowers
101  edm::Handle<edm::View<Candidate> > TheCaloTowers;
102  // iEvent.getByLabel(IT_CaloTower,TheCaloTowers);
103  iEvent.getByToken(calotower_token_, TheCaloTowers);
104 
105  //Get MET
107  // iEvent.getByLabel(IT_met, TheCaloMET);
108  iEvent.getByToken(calomet_token_, TheCaloMET);
109 
110  //Get CSCSegments
111  edm::Handle<CSCSegmentCollection> TheCSCSegments;
112  // iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
113  iEvent.getByToken(cscsegment_token_, TheCSCSegments);
114 
115  //Get CSCRecHits
117  // iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits );
118  iEvent.getByToken(cscrechit_token_, TheCSCRecHits);
119 
120  //Collision Muon Collection
122  iEvent.getByToken(muon_token_, TheMuons);
123 
124  //Get CSCHaloData
125  edm::Handle<reco::CSCHaloData> TheCSCHaloData;
126  // iEvent.getByLabel(IT_CSCHaloData, TheCSCHaloData );
127  iEvent.getByToken(cschalo_token_, TheCSCHaloData);
128 
129  // Get EcalHaloData
130  edm::Handle<reco::EcalHaloData> TheEcalHaloData;
131  // iEvent.getByLabel(IT_EcalHaloData, TheEcalHaloData );
132  iEvent.getByToken(ecalhalo_token_, TheEcalHaloData);
133 
134  // Get HcalHaloData
135  edm::Handle<reco::HcalHaloData> TheHcalHaloData;
136  // iEvent.getByLabel(IT_HcalHaloData, TheHcalHaloData );
137  iEvent.getByToken(hcalhalo_token_, TheHcalHaloData);
138 
139  // Run the GlobalHaloAlgo to reconstruct the GlobalHaloData object
143  // GlobalHaloData GlobalData;
144 
145  if (TheCaloGeometry.isValid() && TheCaloMET.isValid() && TheCaloTowers.isValid() && TheCSCHaloData.isValid() &&
146  TheEcalHaloData.isValid() && TheHcalHaloData.isValid()) {
147  iEvent.put(std::make_unique<GlobalHaloData>(GlobalHaloData(GlobalAlgo.Calculate(*TheCaloGeometry,
148  *TheCSCGeometry,
149  *(&TheCaloMET.product()->front()),
150  TheCaloTowers,
151  TheCSCSegments,
152  TheCSCRecHits,
153  TheMuons,
154  *TheCSCHaloData.product(),
155  *TheEcalHaloData.product(),
156  *TheHcalHaloData.product(),
157  ishlt))));
158  } else {
159  iEvent.put(std::make_unique<GlobalHaloData>());
160  }
161 
162  return;
163 }
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
void SetHcalMatchingRadius(float min, float max)
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
int iEvent
Definition: GenABIO.cc:224
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globaltrackinggeometry_token_
reco::GlobalHaloData Calculate(const CaloGeometry &TheCaloGeometry, const CSCGeometry &TheCSCGeometry, const reco::CaloMET &TheCaloMET, edm::Handle< edm::View< reco::Candidate > > &TheCaloTowers, edm::Handle< CSCSegmentCollection > &TheCSCSegments, edm::Handle< CSCRecHit2DCollection > &TheCSCRecHits, edm::Handle< reco::MuonCollection > &TheMuons, const reco::CSCHaloData &TheCSCHaloData, const reco::EcalHaloData &TheEcalHaloData, const reco::HcalHaloData &TheHcalHaloData, bool ishlt=false)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscgeometry_token_
void SetEcalMatchingRadius(float min, float max)
bool isValid() const
Definition: ESHandle.h:44
edm::EDGetTokenT< reco::CaloMETCollection > calomet_token_
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void SetCaloTowerEtThreshold(float EtMin)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > calogeometry_token_
edm::EDGetTokenT< EcalHaloData > ecalhalo_token_
edm::EDGetTokenT< HcalHaloData > hcalhalo_token_
edm::EDGetTokenT< CSCHaloData > cschalo_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_

Member Data Documentation

◆ calogeometry_token_

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

Definition at line 210 of file GlobalHaloDataProducer.h.

◆ calomet_token_

edm::EDGetTokenT<reco::CaloMETCollection> reco::GlobalHaloDataProducer::calomet_token_
private

Definition at line 201 of file GlobalHaloDataProducer.h.

◆ calotower_token_

edm::EDGetTokenT<edm::View<reco::Candidate> > reco::GlobalHaloDataProducer::calotower_token_
private

Definition at line 200 of file GlobalHaloDataProducer.h.

◆ CaloTowerEtThreshold

float reco::GlobalHaloDataProducer::CaloTowerEtThreshold
private

Definition at line 216 of file GlobalHaloDataProducer.h.

◆ cscgeometry_token_

edm::ESGetToken<CSCGeometry, MuonGeometryRecord> reco::GlobalHaloDataProducer::cscgeometry_token_
private

Definition at line 208 of file GlobalHaloDataProducer.h.

◆ cschalo_token_

edm::EDGetTokenT<CSCHaloData> reco::GlobalHaloDataProducer::cschalo_token_
private

Definition at line 205 of file GlobalHaloDataProducer.h.

◆ cscrechit_token_

edm::EDGetTokenT<CSCRecHit2DCollection> reco::GlobalHaloDataProducer::cscrechit_token_
private

Definition at line 203 of file GlobalHaloDataProducer.h.

◆ cscsegment_token_

edm::EDGetTokenT<CSCSegmentCollection> reco::GlobalHaloDataProducer::cscsegment_token_
private

Definition at line 202 of file GlobalHaloDataProducer.h.

◆ ecalhalo_token_

edm::EDGetTokenT<EcalHaloData> reco::GlobalHaloDataProducer::ecalhalo_token_
private

Definition at line 206 of file GlobalHaloDataProducer.h.

◆ EcalMaxMatchingRadius

float reco::GlobalHaloDataProducer::EcalMaxMatchingRadius
private

Definition at line 213 of file GlobalHaloDataProducer.h.

◆ EcalMinMatchingRadius

float reco::GlobalHaloDataProducer::EcalMinMatchingRadius
private

Definition at line 212 of file GlobalHaloDataProducer.h.

◆ GlobalAlgo

GlobalHaloAlgo reco::GlobalHaloDataProducer::GlobalAlgo
private

Definition at line 188 of file GlobalHaloDataProducer.h.

◆ globaltrackinggeometry_token_

edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> reco::GlobalHaloDataProducer::globaltrackinggeometry_token_
private

Definition at line 209 of file GlobalHaloDataProducer.h.

◆ hcalhalo_token_

edm::EDGetTokenT<HcalHaloData> reco::GlobalHaloDataProducer::hcalhalo_token_
private

Definition at line 207 of file GlobalHaloDataProducer.h.

◆ HcalMaxMatchingRadius

float reco::GlobalHaloDataProducer::HcalMaxMatchingRadius
private

Definition at line 215 of file GlobalHaloDataProducer.h.

◆ HcalMinMatchingRadius

float reco::GlobalHaloDataProducer::HcalMinMatchingRadius
private

Definition at line 214 of file GlobalHaloDataProducer.h.

◆ ishlt

bool reco::GlobalHaloDataProducer::ishlt
private

Definition at line 218 of file GlobalHaloDataProducer.h.

◆ IT_CaloTower

edm::InputTag reco::GlobalHaloDataProducer::IT_CaloTower
private

Definition at line 190 of file GlobalHaloDataProducer.h.

◆ IT_CSCHaloData

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCHaloData
private

Definition at line 196 of file GlobalHaloDataProducer.h.

◆ IT_CSCRecHit

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCRecHit
private

Definition at line 192 of file GlobalHaloDataProducer.h.

◆ IT_CSCSegment

edm::InputTag reco::GlobalHaloDataProducer::IT_CSCSegment
private

Definition at line 193 of file GlobalHaloDataProducer.h.

◆ IT_EcalHaloData

edm::InputTag reco::GlobalHaloDataProducer::IT_EcalHaloData
private

Definition at line 197 of file GlobalHaloDataProducer.h.

◆ IT_HcalHaloData

edm::InputTag reco::GlobalHaloDataProducer::IT_HcalHaloData
private

Definition at line 198 of file GlobalHaloDataProducer.h.

◆ IT_met

edm::InputTag reco::GlobalHaloDataProducer::IT_met
private

Definition at line 191 of file GlobalHaloDataProducer.h.

◆ IT_Muon

edm::InputTag reco::GlobalHaloDataProducer::IT_Muon
private

Definition at line 194 of file GlobalHaloDataProducer.h.

◆ muon_token_

edm::EDGetTokenT<reco::MuonCollection> reco::GlobalHaloDataProducer::muon_token_
private

Definition at line 204 of file GlobalHaloDataProducer.h.