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 ()
 
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 ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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
 
typedef WorkerT< EDProducerWorkerType
 
- 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- 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");
38  TheMatcher = new MuonSegmentMatcher(matchParameters, TheService);
39 
40  // Cosmic track selection parameters
41  CSCAlgo.SetDetaThreshold( (float) iConfig.getParameter<double>("DetaParam"));
42  CSCAlgo.SetDphiThreshold( (float) iConfig.getParameter<double>("DphiParam"));
43  CSCAlgo.SetMinMaxInnerRadius( (float) iConfig.getParameter<double>("InnerRMinParam") , (float) iConfig.getParameter<double>("InnerRMaxParam") );
44  CSCAlgo.SetMinMaxOuterRadius( (float) iConfig.getParameter<double>("OuterRMinParam"), (float) iConfig.getParameter<double>("OuterRMaxParam"));
45  CSCAlgo.SetNormChi2Threshold( (float) iConfig.getParameter<double>("NormChi2Param") );
46 
47  // MLR
48  CSCAlgo.SetMaxSegmentRDiff( (float) iConfig.getParameter<double>("MaxSegmentRDiff") );
49  CSCAlgo.SetMaxSegmentPhiDiff( (float) iConfig.getParameter<double>("MaxSegmentPhiDiff") );
50  CSCAlgo.SetMaxSegmentTheta( (float) iConfig.getParameter<double>("MaxSegmentTheta") );
51  // End MLR
52 
53  CSCAlgo.SetMaxDtMuonSegment( (float) iConfig.getParameter<double>("MaxDtMuonSegment") );
54  CSCAlgo.SetMaxFreeInverseBeta( (float) iConfig.getParameter<double>("MaxFreeInverseBeta") );
55  CSCAlgo.SetExpectedBX( (short int) iConfig.getParameter<int>("ExpectedBX") );
56  CSCAlgo.SetRecHitTime0( (float) iConfig.getParameter<double>("RecHitTime0") );
57  CSCAlgo.SetRecHitTimeWindow( (float) iConfig.getParameter<double>("RecHitTimeWindow") );
58  CSCAlgo.SetMinMaxOuterMomentumTheta( (float)iConfig.getParameter<double>("MinOuterMomentumTheta"), (float)iConfig.getParameter<double>("MaxOuterMomentumTheta") );
59  CSCAlgo.SetMatchingDPhiThreshold( (float)iConfig.getParameter<double>("MatchingDPhiThreshold") );
60  CSCAlgo.SetMatchingDEtaThreshold( (float)iConfig.getParameter<double>("MatchingDEtaThreshold") );
61  CSCAlgo.SetMatchingDWireThreshold(iConfig.getParameter<int>("MatchingDWireThreshold") );
62 
63  produces<CSCHaloData>();
64 }
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
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 115 of file CSCHaloDataProducer.cc.

115 {}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 66 of file CSCHaloDataProducer.cc.

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

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