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::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCHaloDataProducer (const edm::ParameterSet &)
 
 ~CSCHaloDataProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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

edm::EDGetTokenT
< reco::MuonCollection
cosmicmuon_token_
 
edm::EDGetTokenT
< CSCALCTDigiCollection
cscalct_token_
 
CSCHaloAlgo CSCAlgo
 
edm::EDGetTokenT
< CSCRecHit2DCollection
cscrechit_token_
 
edm::EDGetTokenT
< CSCSegmentCollection
cscsegment_token_
 
edm::EDGetTokenT
< reco::MuonTimeExtraMap
csctimemap_token_
 
edm::EDGetTokenT
< edm::TriggerResults
hltresult_token_
 
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
 
edm::EDGetTokenT
< L1MuGMTReadoutCollection
l1mugmtro_token_
 
edm::EDGetTokenT
< reco::MuonCollection
muon_token_
 
MuonSegmentMatcherTheMatcher
 
MuonServiceProxyTheService
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
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 133 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(), HLT_25ns14e33_v1_cff::InputTag, edm::InputTag::label(), and MuonServiceProxy_cff::MuonServiceProxy.

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  //Higher Level Reco
29  IT_CSCSegment = iConfig.getParameter<edm::InputTag>("CSCSegmentLabel");
30  IT_CosmicMuon = iConfig.getParameter<edm::InputTag>("CosmicMuonLabel");
31  IT_Muon = iConfig.getParameter<edm::InputTag>("MuonLabel");
32  IT_SA = iConfig.getParameter<edm::InputTag>("SALabel");
33  IT_ALCT = iConfig.getParameter<edm::InputTag>("ALCTDigiLabel");
34 
35  //Muon to Segment Matching
36  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
37  TheService = new MuonServiceProxy(serviceParameters);
38  edm::ParameterSet matchParameters = iConfig.getParameter<edm::ParameterSet>("MatchParameters");
40  TheMatcher = new MuonSegmentMatcher(matchParameters, TheService,iC);
41 
42  // Cosmic track selection parameters
43  CSCAlgo.SetDetaThreshold( (float) iConfig.getParameter<double>("DetaParam"));
44  CSCAlgo.SetDphiThreshold( (float) iConfig.getParameter<double>("DphiParam"));
45  CSCAlgo.SetMinMaxInnerRadius( (float) iConfig.getParameter<double>("InnerRMinParam") , (float) iConfig.getParameter<double>("InnerRMaxParam") );
46  CSCAlgo.SetMinMaxOuterRadius( (float) iConfig.getParameter<double>("OuterRMinParam"), (float) iConfig.getParameter<double>("OuterRMaxParam"));
47  CSCAlgo.SetNormChi2Threshold( (float) iConfig.getParameter<double>("NormChi2Param") );
48 
49  // MLR
50  CSCAlgo.SetMaxSegmentRDiff( (float) iConfig.getParameter<double>("MaxSegmentRDiff") );
51  CSCAlgo.SetMaxSegmentPhiDiff( (float) iConfig.getParameter<double>("MaxSegmentPhiDiff") );
52  CSCAlgo.SetMaxSegmentTheta( (float) iConfig.getParameter<double>("MaxSegmentTheta") );
53  // End MLR
54 
55  CSCAlgo.SetMaxDtMuonSegment( (float) iConfig.getParameter<double>("MaxDtMuonSegment") );
56  CSCAlgo.SetMaxFreeInverseBeta( (float) iConfig.getParameter<double>("MaxFreeInverseBeta") );
57  CSCAlgo.SetExpectedBX( (short int) iConfig.getParameter<int>("ExpectedBX") );
58  CSCAlgo.SetRecHitTime0( (float) iConfig.getParameter<double>("RecHitTime0") );
59  CSCAlgo.SetRecHitTimeWindow( (float) iConfig.getParameter<double>("RecHitTimeWindow") );
60  CSCAlgo.SetMinMaxOuterMomentumTheta( (float)iConfig.getParameter<double>("MinOuterMomentumTheta"), (float)iConfig.getParameter<double>("MaxOuterMomentumTheta") );
61  CSCAlgo.SetMatchingDPhiThreshold( (float)iConfig.getParameter<double>("MatchingDPhiThreshold") );
62  CSCAlgo.SetMatchingDEtaThreshold( (float)iConfig.getParameter<double>("MatchingDEtaThreshold") );
63  CSCAlgo.SetMatchingDWireThreshold(iConfig.getParameter<int>("MatchingDWireThreshold") );
64 
65  cosmicmuon_token_ = consumes<reco::MuonCollection>(IT_CosmicMuon);
66  csctimemap_token_ = consumes<reco::MuonTimeExtraMap>(edm::InputTag(IT_CosmicMuon.label(), "csc"));
67  muon_token_ = consumes<reco::MuonCollection>(IT_Muon);
68  cscsegment_token_ = consumes<CSCSegmentCollection>(IT_CSCSegment);
69  cscrechit_token_ = consumes<CSCRecHit2DCollection>(IT_CSCRecHit);
70  cscalct_token_ = consumes<CSCALCTDigiCollection>(IT_ALCT);
71  l1mugmtro_token_ = consumes<L1MuGMTReadoutCollection>(IT_L1MuGMTReadout);
72  hltresult_token_ = consumes<edm::TriggerResults>(IT_HLTResult);
73 
74  produces<CSCHaloData>();
75 }
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
edm::EDGetTokenT< reco::MuonTimeExtraMap > csctimemap_token_
void SetDetaThreshold(float x)
Definition: CSCHaloAlgo.h:99
edm::EDGetTokenT< CSCALCTDigiCollection > cscalct_token_
std::vector< edm::InputTag > vIT_HLTBit
Definition: CSCHaloAlgo.h:97
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
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
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1mugmtro_token_
void SetMinMaxInnerRadius(float min, float max)
Definition: CSCHaloAlgo.h:100
void SetRecHitTime0(float x)
Definition: CSCHaloAlgo.h:104
edm::EDGetTokenT< reco::MuonCollection > cosmicmuon_token_
edm::EDGetTokenT< edm::TriggerResults > hltresult_token_
std::string const & label() const
Definition: InputTag.h:42
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
edm::EDGetTokenT< reco::MuonCollection > muon_token_
void SetNormChi2Threshold(float x)
Definition: CSCHaloAlgo.h:103
void SetDphiThreshold(float x)
Definition: CSCHaloAlgo.h:102
CSCHaloDataProducer::~CSCHaloDataProducer ( )

Definition at line 134 of file CSCHaloDataProducer.cc.

134 {}

Member Function Documentation

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

Implements edm::stream::EDProducerBase.

Definition at line 77 of file CSCHaloDataProducer.cc.

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

78 {
79  //Get CSC Geometry
80  edm::ESHandle<CSCGeometry> TheCSCGeometry;
81  iSetup.get<MuonGeometryRecord>().get(TheCSCGeometry);
82 
83  //Get Muons Collection from Cosmic Reconstruction
85  // iEvent.getByLabel(IT_CosmicMuon, TheCosmics);
86  iEvent.getByToken(cosmicmuon_token_, TheCosmics);
87 
88  //Get Muon Time Information from Cosmic Reconstruction
90  // iEvent.getByLabel(IT_CosmicMuon.label(),"csc",TheCSCTimeMap);
91  iEvent.getByToken(csctimemap_token_, TheCSCTimeMap);
92 
93  //Collision Muon Collection
95  // iEvent.getByLabel(IT_Muon, TheMuons);
96  iEvent.getByToken(muon_token_, TheMuons);
97 
98  //Get CSC Segments
99  edm::Handle<CSCSegmentCollection> TheCSCSegments;
100  // iEvent.getByLabel(IT_CSCSegment, TheCSCSegments);
101  iEvent.getByToken(cscsegment_token_, TheCSCSegments);
102 
103  //Get CSC RecHits
104  Handle<CSCRecHit2DCollection> TheCSCRecHits;
105  // iEvent.getByLabel(IT_CSCRecHit, TheCSCRecHits);
106  iEvent.getByToken(cscrechit_token_, TheCSCRecHits);
107 
108  //Get L1MuGMT
110  // iEvent.getByLabel (IT_L1MuGMTReadout, TheL1GMTReadout);
111  iEvent.getByToken(l1mugmtro_token_, TheL1GMTReadout);
112 
113  //Get Chamber Anode Trigger Information
115  // iEvent.getByLabel (IT_ALCT, TheALCTs);
116  iEvent.getByToken(cscalct_token_, TheALCTs);
117 
118  //Get HLT Results
119  edm::Handle<edm::TriggerResults> TheHLTResults;
120  // iEvent.getByLabel( IT_HLTResult , TheHLTResults);
121  iEvent.getByToken(hltresult_token_, TheHLTResults);
122 
123  const edm::TriggerNames * triggerNames = 0;
124  if (TheHLTResults.isValid()) {
125  triggerNames = &iEvent.triggerNames(*TheHLTResults);
126  }
127 
128  std::auto_ptr<CSCHaloData> TheCSCData(new CSCHaloData( CSCAlgo.Calculate(*TheCSCGeometry, TheCosmics, TheCSCTimeMap, TheMuons, TheCSCSegments, TheCSCRecHits, TheL1GMTReadout, TheHLTResults, triggerNames, TheALCTs, TheMatcher, iEvent) ) );
129  // Put it in the event
130  iEvent.put(TheCSCData);
131  return;
132 }
MuonSegmentMatcher * TheMatcher
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
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
edm::EDGetTokenT< reco::MuonTimeExtraMap > csctimemap_token_
edm::EDGetTokenT< CSCALCTDigiCollection > cscalct_token_
edm::EDGetTokenT< CSCRecHit2DCollection > cscrechit_token_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
edm::EDGetTokenT< CSCSegmentCollection > cscsegment_token_
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1mugmtro_token_
const T & get() const
Definition: EventSetup.h:55
edm::EDGetTokenT< reco::MuonCollection > cosmicmuon_token_
edm::EDGetTokenT< edm::TriggerResults > hltresult_token_
edm::EDGetTokenT< reco::MuonCollection > muon_token_

Member Data Documentation

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

Definition at line 168 of file CSCHaloDataProducer.h.

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

Definition at line 173 of file CSCHaloDataProducer.h.

CSCHaloAlgo reco::CSCHaloDataProducer::CSCAlgo
private

Definition at line 144 of file CSCHaloDataProducer.h.

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

Definition at line 172 of file CSCHaloDataProducer.h.

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

Definition at line 171 of file CSCHaloDataProducer.h.

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

Definition at line 169 of file CSCHaloDataProducer.h.

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

Definition at line 175 of file CSCHaloDataProducer.h.

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

Definition at line 148 of file CSCHaloDataProducer.h.

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

Definition at line 162 of file CSCHaloDataProducer.h.

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

Definition at line 159 of file CSCHaloDataProducer.h.

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

Definition at line 163 of file CSCHaloDataProducer.h.

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

Definition at line 151 of file CSCHaloDataProducer.h.

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

Definition at line 147 of file CSCHaloDataProducer.h.

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

Definition at line 164 of file CSCHaloDataProducer.h.

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

Definition at line 165 of file CSCHaloDataProducer.h.

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

Definition at line 174 of file CSCHaloDataProducer.h.

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

Definition at line 170 of file CSCHaloDataProducer.h.

MuonSegmentMatcher* reco::CSCHaloDataProducer::TheMatcher
private

Definition at line 156 of file CSCHaloDataProducer.h.

MuonServiceProxy* reco::CSCHaloDataProducer::TheService
private

Definition at line 155 of file CSCHaloDataProducer.h.

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

Definition at line 152 of file CSCHaloDataProducer.h.