CMS 3D CMS Logo

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

#include <CSCHaloDataProducer.h>

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

Public Member Functions

 CSCHaloDataProducer (const edm::ParameterSet &)
 
 ~CSCHaloDataProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Member Functions

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

Private Attributes

edm::EDGetTokenT< reco::MuonCollectioncosmicmuon_token_
 
edm::EDGetTokenT< CSCALCTDigiCollectioncscalct_token_
 
CSCHaloAlgo CSCAlgo
 
edm::EDGetTokenT< CSCRecHit2DCollectioncscrechit_token_
 
edm::EDGetTokenT< CSCSegmentCollectioncscsegment_token_
 
edm::EDGetTokenT< reco::MuonTimeExtraMapcsctimemap_token_
 
edm::EDGetTokenT< EcalRecHitCollectionEcalRecHitsEB_token_
 
edm::EDGetTokenT< EcalRecHitCollectionEcalRecHitsEE_token_
 
edm::EDGetTokenT< HBHERecHitCollectionhbhereco_token_
 
edm::EDGetTokenT< edm::TriggerResultshltresult_token_
 
edm::InputTag IT_ALCT
 
edm::InputTag IT_CosmicMuon
 
edm::InputTag IT_CSCRecHit
 
edm::InputTag IT_CSCSegment
 
edm::InputTag IT_ECALBrh
 
edm::InputTag IT_ECALErh
 
edm::InputTag IT_HBHErh
 
edm::InputTag IT_HLTResult
 
edm::InputTag IT_L1MuGMTReadout
 
edm::InputTag IT_Muon
 
edm::InputTag IT_SA
 
edm::EDGetTokenT< L1MuGMTReadoutCollectionl1mugmtro_token_
 
edm::EDGetTokenT< reco::MuonCollectionmuon_token_
 
MuonSegmentMatcherTheMatcher
 
std::vector< edm::InputTagvIT_HLTBit
 

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 131 of file CSCHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file CSCHaloDataProducer.cc.

References edm::ParameterSet::getParameter(), edm::InputTag::label(), and MuonSegmentMatcher_cff::MuonSegmentMatcher.

17 {
18  //Digi Level
19  IT_L1MuGMTReadout = iConfig.getParameter<edm::InputTag>("L1MuGMTReadoutLabel");
20 
21  //HLT Level
22  IT_HLTResult = iConfig.getParameter<edm::InputTag>("HLTResultLabel");
23  CSCAlgo.vIT_HLTBit = iConfig.getParameter< std::vector< edm::InputTag> >("HLTBitLabel");
24 
25  //RecHit Level
26  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");
27 
28  //Calo RecHit
29  IT_HBHErh = iConfig.getParameter<edm::InputTag>("HBHErhLabel");
30  IT_ECALBrh= iConfig.getParameter<edm::InputTag>("ECALBrhLabel");
31  IT_ECALErh= iConfig.getParameter<edm::InputTag>("ECALErhLabel");
32  //Higher Level Reco
33  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
34  IT_CosmicMuon = iConfig.getParameter<edm::InputTag>("CosmicMuonLabel");
35  IT_Muon = iConfig.getParameter<edm::InputTag>("MuonLabel");
36  IT_SA = iConfig.getParameter<edm::InputTag>("SALabel");
37  IT_ALCT = iConfig.getParameter<edm::InputTag>("ALCTDigiLabel");
38 
39  //Muon to Segment Matching
40  edm::ParameterSet matchParameters = iConfig.getParameter<edm::ParameterSet>("MatchParameters");
41  edm::ConsumesCollector iC = consumesCollector();
42  TheMatcher = new MuonSegmentMatcher(matchParameters, iC);
43 
44  // Cosmic track selection parameters
45  CSCAlgo.SetDetaThreshold( (float) iConfig.getParameter<double>("DetaParam"));
46  CSCAlgo.SetDphiThreshold( (float) iConfig.getParameter<double>("DphiParam"));
47  CSCAlgo.SetMinMaxInnerRadius( (float) iConfig.getParameter<double>("InnerRMinParam") , (float) iConfig.getParameter<double>("InnerRMaxParam") );
48  CSCAlgo.SetMinMaxOuterRadius( (float) iConfig.getParameter<double>("OuterRMinParam"), (float) iConfig.getParameter<double>("OuterRMaxParam"));
49  CSCAlgo.SetNormChi2Threshold( (float) iConfig.getParameter<double>("NormChi2Param") );
50 
51  // MLR
52  CSCAlgo.SetMaxSegmentRDiff( (float) iConfig.getParameter<double>("MaxSegmentRDiff") );
53  CSCAlgo.SetMaxSegmentPhiDiff( (float) iConfig.getParameter<double>("MaxSegmentPhiDiff") );
54  CSCAlgo.SetMaxSegmentTheta( (float) iConfig.getParameter<double>("MaxSegmentTheta") );
55  // End MLR
56 
57  CSCAlgo.SetMaxDtMuonSegment( (float) iConfig.getParameter<double>("MaxDtMuonSegment") );
58  CSCAlgo.SetMaxFreeInverseBeta( (float) iConfig.getParameter<double>("MaxFreeInverseBeta") );
59  CSCAlgo.SetExpectedBX( (short int) iConfig.getParameter<int>("ExpectedBX") );
60  CSCAlgo.SetRecHitTime0( (float) iConfig.getParameter<double>("RecHitTime0") );
61  CSCAlgo.SetRecHitTimeWindow( (float) iConfig.getParameter<double>("RecHitTimeWindow") );
62  CSCAlgo.SetMinMaxOuterMomentumTheta( (float)iConfig.getParameter<double>("MinOuterMomentumTheta"), (float)iConfig.getParameter<double>("MaxOuterMomentumTheta") );
63  CSCAlgo.SetMatchingDPhiThreshold( (float)iConfig.getParameter<double>("MatchingDPhiThreshold") );
64  CSCAlgo.SetMatchingDEtaThreshold( (float)iConfig.getParameter<double>("MatchingDEtaThreshold") );
65  CSCAlgo.SetMatchingDWireThreshold(iConfig.getParameter<int>("MatchingDWireThreshold") );
66 
67  cosmicmuon_token_ = consumes<reco::MuonCollection>(IT_CosmicMuon);
68  csctimemap_token_ = consumes<reco::MuonTimeExtraMap>(edm::InputTag(IT_CosmicMuon.label(), "csc"));
69  muon_token_ = consumes<reco::MuonCollection>(IT_Muon);
70  cscsegment_token_ = consumes<CSCSegmentCollection>(IT_CSCSegment);
71  cscrechit_token_ = consumes<CSCRecHit2DCollection>(IT_CSCRecHit);
72  cscalct_token_ = consumes<CSCALCTDigiCollection>(IT_ALCT);
73  l1mugmtro_token_ = consumes<L1MuGMTReadoutCollection>(IT_L1MuGMTReadout);
74  hbhereco_token_ = consumes<HBHERecHitCollection>(IT_HBHErh);
75  EcalRecHitsEB_token_ = consumes<EcalRecHitCollection>(IT_ECALBrh);
76  EcalRecHitsEE_token_ = consumes<EcalRecHitCollection>(IT_ECALErh);
77  hltresult_token_ = consumes<edm::TriggerResults>(IT_HLTResult);
78 
79  produces<CSCHaloData>();
80 }
void SetMaxSegmentTheta(float x)
Definition: CSCHaloAlgo.h:126
T getParameter(std::string const &) const
MuonSegmentMatcher * TheMatcher
void SetMatchingDEtaThreshold(float x)
Definition: CSCHaloAlgo.h:118
void SetMaxDtMuonSegment(float x)
Definition: CSCHaloAlgo.h:120
void SetRecHitTimeWindow(float x)
Definition: CSCHaloAlgo.h:114
void SetMatchingDWireThreshold(int x)
Definition: CSCHaloAlgo.h:119
void SetMaxSegmentRDiff(float x)
Definition: CSCHaloAlgo.h:124
void SetMinMaxOuterRadius(float min, float max)
Definition: CSCHaloAlgo.h:110
edm::EDGetTokenT< reco::MuonTimeExtraMap > csctimemap_token_
void SetDetaThreshold(float x)
Definition: CSCHaloAlgo.h:108
edm::EDGetTokenT< CSCALCTDigiCollection > cscalct_token_
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitsEE_token_
std::vector< edm::InputTag > vIT_HLTBit
Definition: CSCHaloAlgo.h:106
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_token_
void SetExpectedBX(int x)
Definition: CSCHaloAlgo.h:115
void SetMaxSegmentPhiDiff(float x)
Definition: CSCHaloAlgo.h:125
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1mugmtro_token_
void SetMinMaxInnerRadius(float min, float max)
Definition: CSCHaloAlgo.h:109
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitsEB_token_
void SetRecHitTime0(float x)
Definition: CSCHaloAlgo.h:113
edm::EDGetTokenT< reco::MuonCollection > cosmicmuon_token_
edm::EDGetTokenT< edm::TriggerResults > hltresult_token_
std::string const & label() const
Definition: InputTag.h:36
void SetMaxFreeInverseBeta(float x)
Definition: CSCHaloAlgo.h:121
void SetMatchingDPhiThreshold(float x)
Definition: CSCHaloAlgo.h:117
void SetMinMaxOuterMomentumTheta(float min, float max)
Definition: CSCHaloAlgo.h:116
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void SetNormChi2Threshold(float x)
Definition: CSCHaloAlgo.h:112
void SetDphiThreshold(float x)
Definition: CSCHaloAlgo.h:111
CSCHaloDataProducer::~CSCHaloDataProducer ( )
override

Definition at line 147 of file CSCHaloDataProducer.cc.

147 {}

Member Function Documentation

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

Definition at line 82 of file CSCHaloDataProducer.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), edm::HandleBase::isValid(), edm::Event::put(), and edm::Event::triggerNames().

83 {
84  //Get CSC Geometry
85  edm::ESHandle<CSCGeometry> TheCSCGeometry;
86  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
87 
88  //Get Muons Collection from Cosmic Reconstruction
90  // iEvent.getByLabel(IT_CosmicMuon, TheCosmics);
91  iEvent.getByToken(cosmicmuon_token_, TheCosmics);
92 
93  //Get Muon Time Information from Cosmic Reconstruction
95  // iEvent.getByLabel(IT_CosmicMuon.label(),"csc",TheCSCTimeMap);
96  iEvent.getByToken(csctimemap_token_, TheCSCTimeMap);
97 
98  //Collision Muon Collection
100  // iEvent.getByLabel(IT_Muon, TheMuons);
101  iEvent.getByToken(muon_token_, TheMuons);
102 
103  //Get CSC Segments
104  edm::Handle<CSCSegmentCollection> TheCSCSegments;
105  // iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
106  iEvent.getByToken(cscsegment_token_, TheCSCSegments);
107 
108  //Get CSC RecHits
109  Handle<CSCRecHit2DCollection> TheCSCRecHits;
110  // iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits);
111  iEvent.getByToken(cscrechit_token_, TheCSCRecHits);
112 
113  //Get L1MuGMT
115  // iEvent.getByLabel (IT_L1MuGMTReadout, TheL1GMTReadout);
116  iEvent.getByToken(l1mugmtro_token_, TheL1GMTReadout);
117 
118  //Get Chamber Anode Trigger Information
120  // iEvent.getByLabel (IT_ALCT, TheALCTs);
121  iEvent.getByToken(cscalct_token_, TheALCTs);
122 
123  //Calo rec hits
125  iEvent.getByToken(hbhereco_token_,hbhehits);
126  Handle<EcalRecHitCollection> ecalebhits;
127  iEvent.getByToken(EcalRecHitsEB_token_, ecalebhits);
128  Handle<EcalRecHitCollection> ecaleehits;
129  iEvent.getByToken(EcalRecHitsEE_token_,ecaleehits);
130 
131  //Get HLT Results
132  edm::Handle<edm::TriggerResults> TheHLTResults;
133  // iEvent.getByLabel( IT_HLTResult , TheHLTResults);
134  iEvent.getByToken(hltresult_token_, TheHLTResults);
135 
136  const edm::TriggerNames * triggerNames = nullptr;
137  if (TheHLTResults.isValid()) {
138  triggerNames = &iEvent.triggerNames(*TheHLTResults);
139  }
140 
141 
142  // Put it in the event
143  iEvent.put(std::make_unique<CSCHaloData>(CSCAlgo.Calculate(*TheCSCGeometry, TheCosmics, TheCSCTimeMap, TheMuons, TheCSCSegments, TheCSCRecHits, TheL1GMTReadout, hbhehits,ecalebhits,ecaleehits,TheHLTResults, triggerNames, TheALCTs, TheMatcher, iEvent, iSetup)));
144  return;
145 }
MuonSegmentMatcher * TheMatcher
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
reco::CSCHaloData Calculate(const CSCGeometry &TheCSCGeometry, edm::Handle< reco::MuonCollection > &TheCosmicMuons, const edm::Handle< reco::MuonTimeExtraMap > TheCSCTimeMap, edm::Handle< reco::MuonCollection > &TheMuons, edm::Handle< CSCSegmentCollection > &TheCSCSegments, edm::Handle< CSCRecHit2DCollection > &TheCSCRecHits, edm::Handle< L1MuGMTReadoutCollection > &TheL1GMTReadout, edm::Handle< HBHERecHitCollection > &hbhehits, edm::Handle< EcalRecHitCollection > &ecalebhits, edm::Handle< EcalRecHitCollection > &ecaleehits, edm::Handle< edm::TriggerResults > &TheHLTResults, const edm::TriggerNames *triggerNames, const edm::Handle< CSCALCTDigiCollection > &TheALCTs, MuonSegmentMatcher *TheMatcher, const edm::Event &TheEvent, const edm::EventSetup &TheEventSetup)
Definition: CSCHaloAlgo.cc:68
edm::EDGetTokenT< reco::MuonTimeExtraMap > csctimemap_token_
edm::EDGetTokenT< CSCALCTDigiCollection > cscalct_token_
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitsEE_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
edm::EDGetTokenT< HBHERecHitCollection > hbhereco_token_
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1mugmtro_token_
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitsEB_token_
const T & get() const
Definition: EventSetup.h:59
edm::EDGetTokenT< reco::MuonCollection > cosmicmuon_token_
edm::EDGetTokenT< edm::TriggerResults > hltresult_token_
edm::EDGetTokenT< reco::MuonCollection > muon_token_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:301

Member Data Documentation

edm::EDGetTokenT<reco::MuonCollection> reco::CSCHaloDataProducer::cosmicmuon_token_
private

Definition at line 170 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<CSCALCTDigiCollection> reco::CSCHaloDataProducer::cscalct_token_
private

Definition at line 178 of file CSCHaloDataProducer.h.

CSCHaloAlgo reco::CSCHaloDataProducer::CSCAlgo
private

Definition at line 142 of file CSCHaloDataProducer.h.

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

Definition at line 174 of file CSCHaloDataProducer.h.

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

Definition at line 173 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<reco::MuonTimeExtraMap> reco::CSCHaloDataProducer::csctimemap_token_
private

Definition at line 171 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<EcalRecHitCollection> reco::CSCHaloDataProducer::EcalRecHitsEB_token_
private

Definition at line 176 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<EcalRecHitCollection> reco::CSCHaloDataProducer::EcalRecHitsEE_token_
private

Definition at line 177 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<HBHERecHitCollection> reco::CSCHaloDataProducer::hbhereco_token_
private

Definition at line 175 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<edm::TriggerResults> reco::CSCHaloDataProducer::hltresult_token_
private

Definition at line 180 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_ALCT
private

Definition at line 146 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_CosmicMuon
private

Definition at line 164 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_CSCRecHit
private

Definition at line 156 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_CSCSegment
private

Definition at line 165 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_ECALBrh
private

Definition at line 160 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_ECALErh
private

Definition at line 161 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_HBHErh
private

Definition at line 159 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_HLTResult
private

Definition at line 149 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_L1MuGMTReadout
private

Definition at line 145 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_Muon
private

Definition at line 166 of file CSCHaloDataProducer.h.

edm::InputTag reco::CSCHaloDataProducer::IT_SA
private

Definition at line 167 of file CSCHaloDataProducer.h.

edm::EDGetTokenT<L1MuGMTReadoutCollection> reco::CSCHaloDataProducer::l1mugmtro_token_
private

Definition at line 179 of file CSCHaloDataProducer.h.

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

Definition at line 172 of file CSCHaloDataProducer.h.

MuonSegmentMatcher* reco::CSCHaloDataProducer::TheMatcher
private

Definition at line 153 of file CSCHaloDataProducer.h.

std::vector< edm::InputTag > reco::CSCHaloDataProducer::vIT_HLTBit
private

Definition at line 150 of file CSCHaloDataProducer.h.