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
 
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

edm::EDGetTokenT< reco::CaloMETCollectioncalomet_token_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_token_
 
float CaloTowerEtThreshold
 
edm::EDGetTokenT< CSCHaloDatacschalo_token_
 
edm::EDGetTokenT< CSCRecHit2DCollectioncscrechit_token_
 
edm::EDGetTokenT< CSCSegmentCollectioncscsegment_token_
 
edm::EDGetTokenT< EcalHaloDataecalhalo_token_
 
float EcalMaxMatchingRadius
 
float EcalMinMatchingRadius
 
GlobalHaloAlgo GlobalAlgo
 
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<>
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 179 of file GlobalHaloDataProducer.h.

Constructor & Destructor Documentation

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 
84  produces<GlobalHaloData>();
85 }
T getParameter(std::string const &) const
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)
void setEtThresholdforCSCCaloMatchingHE(float x)
void setEtThresholdforCSCCaloMatchingEB(float x)
void setRcaloMinRsegmLowThresholdforCSCCaloMatchingHE(float x)
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::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 ( )
override

Definition at line 165 of file GlobalHaloDataProducer.cc.

165 {}

Member Function Documentation

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

Definition at line 87 of file GlobalHaloDataProducer.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), GlobalHaloData_cfi::GlobalHaloData, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), edm::Handle< T >::product(), and edm::Event::put().

87  {
88  //Get CSC Geometry
89  edm::ESHandle<CSCGeometry> TheCSCGeometry;
90  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
91 
92  //Get Global Tracking Geometry
93  edm::ESHandle<GlobalTrackingGeometry> TheGlobalTrackingGeometry;
94  iSetup.get<GlobalTrackingGeometryRecord>().get(TheGlobalTrackingGeometry);
95 
96  //Get CaloGeometry
97  edm::ESHandle<CaloGeometry> TheCaloGeometry;
98  iSetup.get<CaloGeometryRecord>().get(TheCaloGeometry);
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 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
void SetHcalMatchingRadius(float min, float max)
edm::EDGetTokenT< edm::View< reco::Candidate > > calotower_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)
bool isValid() const
Definition: HandleBase.h:70
void SetEcalMatchingRadius(float min, float max)
T const * product() const
Definition: Handle.h:69
edm::EDGetTokenT< reco::CaloMETCollection > calomet_token_
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void SetCaloTowerEtThreshold(float EtMin)
edm::EDGetTokenT< EcalHaloData > ecalhalo_token_
T get() const
Definition: EventSetup.h:73
edm::EDGetTokenT< HcalHaloData > hcalhalo_token_
bool isValid() const
Definition: ESHandle.h:44
edm::EDGetTokenT< CSCHaloData > cschalo_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_

Member Data Documentation

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

Definition at line 200 of file GlobalHaloDataProducer.h.

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

Definition at line 199 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::CaloTowerEtThreshold
private

Definition at line 212 of file GlobalHaloDataProducer.h.

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

Definition at line 204 of file GlobalHaloDataProducer.h.

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

Definition at line 202 of file GlobalHaloDataProducer.h.

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

Definition at line 201 of file GlobalHaloDataProducer.h.

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

Definition at line 205 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMaxMatchingRadius
private

Definition at line 209 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::EcalMinMatchingRadius
private

Definition at line 208 of file GlobalHaloDataProducer.h.

GlobalHaloAlgo reco::GlobalHaloDataProducer::GlobalAlgo
private

Definition at line 187 of file GlobalHaloDataProducer.h.

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

Definition at line 206 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMaxMatchingRadius
private

Definition at line 211 of file GlobalHaloDataProducer.h.

float reco::GlobalHaloDataProducer::HcalMinMatchingRadius
private

Definition at line 210 of file GlobalHaloDataProducer.h.

bool reco::GlobalHaloDataProducer::ishlt
private

Definition at line 214 of file GlobalHaloDataProducer.h.

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

Definition at line 189 of file GlobalHaloDataProducer.h.

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

Definition at line 195 of file GlobalHaloDataProducer.h.

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

Definition at line 191 of file GlobalHaloDataProducer.h.

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

Definition at line 192 of file GlobalHaloDataProducer.h.

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

Definition at line 196 of file GlobalHaloDataProducer.h.

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

Definition at line 197 of file GlobalHaloDataProducer.h.

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

Definition at line 190 of file GlobalHaloDataProducer.h.

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

Definition at line 193 of file GlobalHaloDataProducer.h.

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

Definition at line 203 of file GlobalHaloDataProducer.h.