CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCHaloDataProducer (const edm::ParameterSet &)
 
 ~CSCHaloDataProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

CSCHaloAlgo CSCAlgo
 
edm::InputTag IT_ALCT
 
edm::InputTag IT_CosmicMuon
 
edm::InputTag IT_CSCRecHit
 
edm::InputTag IT_CSCSegment
 
edm::InputTag IT_HLTResult
 
edm::InputTag IT_L1MuGMTReadout
 
edm::InputTag IT_Muon
 
edm::InputTag IT_SA
 
MuonSegmentMatcherTheMatcher
 
MuonServiceProxyTheService
 
std::vector< edm::InputTagvIT_HLTBit
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 132 of file CSCHaloDataProducer.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file CSCHaloDataProducer.cc.

References edm::ParameterSet::getParameter(), and MuonServiceProxy_cff::MuonServiceProxy.

16 {
17  //Digi Level
18  IT_L1MuGMTReadout = iConfig.getParameter<edm::InputTag>("L1MuGMTReadoutLabel");
19 
20  //HLT Level
21  IT_HLTResult = iConfig.getParameter<edm::InputTag>("HLTResultLabel");
22  CSCAlgo.vIT_HLTBit = iConfig.getParameter< std::vector< edm::InputTag> >("HLTBitLabel");
23 
24  //RecHit Level
25  IT_CSCRecHit = iConfig.getParameter<edm::InputTag>("CSCRecHitLabel");
26 
27  //Higher Level Reco
28  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
29  IT_CosmicMuon = iConfig.getParameter<edm::InputTag>("CosmicMuonLabel");
30  IT_Muon = iConfig.getParameter<edm::InputTag>("MuonLabel");
31  IT_SA = iConfig.getParameter<edm::InputTag>("SALabel");
32  IT_ALCT = iConfig.getParameter<edm::InputTag>("ALCTDigiLabel");
33 
34  //Muon to Segment Matching
35  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
36  TheService = new MuonServiceProxy(serviceParameters);
37  edm::ParameterSet matchParameters = iConfig.getParameter<edm::ParameterSet>("MatchParameters");
39  TheMatcher = new MuonSegmentMatcher(matchParameters, TheService,iC);
40 
41  // Cosmic track selection parameters
42  CSCAlgo.SetDetaThreshold( (float) iConfig.getParameter<double>("DetaParam"));
43  CSCAlgo.SetDphiThreshold( (float) iConfig.getParameter<double>("DphiParam"));
44  CSCAlgo.SetMinMaxInnerRadius( (float) iConfig.getParameter<double>("InnerRMinParam") , (float) iConfig.getParameter<double>("InnerRMaxParam") );
45  CSCAlgo.SetMinMaxOuterRadius( (float) iConfig.getParameter<double>("OuterRMinParam"), (float) iConfig.getParameter<double>("OuterRMaxParam"));
46  CSCAlgo.SetNormChi2Threshold( (float) iConfig.getParameter<double>("NormChi2Param") );
47 
48  // MLR
49  CSCAlgo.SetMaxSegmentRDiff( (float) iConfig.getParameter<double>("MaxSegmentRDiff") );
50  CSCAlgo.SetMaxSegmentPhiDiff( (float) iConfig.getParameter<double>("MaxSegmentPhiDiff") );
51  CSCAlgo.SetMaxSegmentTheta( (float) iConfig.getParameter<double>("MaxSegmentTheta") );
52  // End MLR
53 
54  CSCAlgo.SetMaxDtMuonSegment( (float) iConfig.getParameter<double>("MaxDtMuonSegment") );
55  CSCAlgo.SetMaxFreeInverseBeta( (float) iConfig.getParameter<double>("MaxFreeInverseBeta") );
56  CSCAlgo.SetExpectedBX( (short int) iConfig.getParameter<int>("ExpectedBX") );
57  CSCAlgo.SetRecHitTime0( (float) iConfig.getParameter<double>("RecHitTime0") );
58  CSCAlgo.SetRecHitTimeWindow( (float) iConfig.getParameter<double>("RecHitTimeWindow") );
59  CSCAlgo.SetMinMaxOuterMomentumTheta( (float)iConfig.getParameter<double>("MinOuterMomentumTheta"), (float)iConfig.getParameter<double>("MaxOuterMomentumTheta") );
60  CSCAlgo.SetMatchingDPhiThreshold( (float)iConfig.getParameter<double>("MatchingDPhiThreshold") );
61  CSCAlgo.SetMatchingDEtaThreshold( (float)iConfig.getParameter<double>("MatchingDEtaThreshold") );
62  CSCAlgo.SetMatchingDWireThreshold(iConfig.getParameter<int>("MatchingDWireThreshold") );
63 
64  produces<CSCHaloData>();
65 }
void SetMaxSegmentTheta(float x)
Definition: CSCHaloAlgo.h:117
T getParameter(std::string const &) const
MuonSegmentMatcher * TheMatcher
void SetMatchingDEtaThreshold(float x)
Definition: CSCHaloAlgo.h:109
void SetMaxDtMuonSegment(float x)
Definition: CSCHaloAlgo.h:111
void SetRecHitTimeWindow(float x)
Definition: CSCHaloAlgo.h:105
void SetMatchingDWireThreshold(int x)
Definition: CSCHaloAlgo.h:110
void SetMaxSegmentRDiff(float x)
Definition: CSCHaloAlgo.h:115
void SetMinMaxOuterRadius(float min, float max)
Definition: CSCHaloAlgo.h:101
void SetDetaThreshold(float x)
Definition: CSCHaloAlgo.h:99
std::vector< edm::InputTag > vIT_HLTBit
Definition: CSCHaloAlgo.h:97
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void SetExpectedBX(int x)
Definition: CSCHaloAlgo.h:106
void SetMaxSegmentPhiDiff(float x)
Definition: CSCHaloAlgo.h:116
void SetMinMaxInnerRadius(float min, float max)
Definition: CSCHaloAlgo.h:100
void SetRecHitTime0(float x)
Definition: CSCHaloAlgo.h:104
void SetMaxFreeInverseBeta(float x)
Definition: CSCHaloAlgo.h:112
void SetMatchingDPhiThreshold(float x)
Definition: CSCHaloAlgo.h:108
void SetMinMaxOuterMomentumTheta(float min, float max)
Definition: CSCHaloAlgo.h:107
void SetNormChi2Threshold(float x)
Definition: CSCHaloAlgo.h:103
void SetDphiThreshold(float x)
Definition: CSCHaloAlgo.h:102
CSCHaloDataProducer::~CSCHaloDataProducer ( )

Definition at line 116 of file CSCHaloDataProducer.cc.

116 {}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 67 of file CSCHaloDataProducer.cc.

References CSCHaloData_cfi::CSCHaloData, edm::EventSetup::get(), edm::Event::getByLabel(), edm::HandleBase::isValid(), edm::Event::put(), and edm::Event::triggerNames().

68 {
69  //Get CSC Geometry
70  edm::ESHandle<CSCGeometry> TheCSCGeometry;
71  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
72 
73  //Get Muons Collection from Cosmic Reconstruction
75  iEvent.getByLabel(IT_CosmicMuon, TheCosmics);
76 
77  //Get Muon Time Information from Cosmic Reconstruction
79  iEvent.getByLabel(IT_CosmicMuon.label(),"csc",TheCSCTimeMap);
80 
81  //Collision Muon Collection
83  iEvent.getByLabel(IT_Muon, TheMuons);
84 
85  //Get CSC Segments
86  edm::Handle<CSCSegmentCollection> TheCSCSegments;
87  iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
88 
89  //Get CSC RecHits
90  Handle<CSCRecHit2DCollection> TheCSCRecHits;
91  iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits);
92 
93  //Get L1MuGMT
95  iEvent.getByLabel (IT_L1MuGMTReadout, TheL1GMTReadout);
96 
97  //Get Chamber Anode Trigger Information
99  iEvent.getByLabel (IT_ALCT, TheALCTs);
100 
101  //Get HLT Results
102  edm::Handle<edm::TriggerResults> TheHLTResults;
103  iEvent.getByLabel( IT_HLTResult , TheHLTResults);
104 
105  const edm::TriggerNames * triggerNames = 0;
106  if (TheHLTResults.isValid()) {
107  triggerNames = &iEvent.triggerNames(*TheHLTResults);
108  }
109 
110  std::auto_ptr<CSCHaloData> TheCSCData(new CSCHaloData( CSCAlgo.Calculate(*TheCSCGeometry, TheCosmics, TheCSCTimeMap, TheMuons, TheCSCSegments, TheCSCRecHits, TheL1GMTReadout, TheHLTResults, triggerNames, TheALCTs, TheMatcher, iEvent) ) );
111  // Put it in the event
112  iEvent.put(TheCSCData);
113  return;
114 }
MuonSegmentMatcher * TheMatcher
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:204
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< edm::TriggerResults > &TheHLTResults, const edm::TriggerNames *triggerNames, const edm::Handle< CSCALCTDigiCollection > &TheALCTs, MuonSegmentMatcher *TheMatcher, const edm::Event &TheEvent)
Definition: CSCHaloAlgo.cc:37
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
const T & get() const
Definition: EventSetup.h:55
std::string const & label() const
Definition: InputTag.h:42

Member Data Documentation

CSCHaloAlgo reco::CSCHaloDataProducer::CSCAlgo
private

Definition at line 143 of file CSCHaloDataProducer.h.

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

Definition at line 147 of file CSCHaloDataProducer.h.

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

Definition at line 161 of file CSCHaloDataProducer.h.

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

Definition at line 158 of file CSCHaloDataProducer.h.

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

Definition at line 162 of file CSCHaloDataProducer.h.

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

Definition at line 150 of file CSCHaloDataProducer.h.

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

Definition at line 146 of file CSCHaloDataProducer.h.

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

Definition at line 163 of file CSCHaloDataProducer.h.

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

Definition at line 164 of file CSCHaloDataProducer.h.

MuonSegmentMatcher* reco::CSCHaloDataProducer::TheMatcher
private

Definition at line 155 of file CSCHaloDataProducer.h.

MuonServiceProxy* reco::CSCHaloDataProducer::TheService
private

Definition at line 154 of file CSCHaloDataProducer.h.

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

Definition at line 151 of file CSCHaloDataProducer.h.