CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TMuonBarrelKalmanStubProducer Class Reference
Inheritance diagram for L1TMuonBarrelKalmanStubProducer:
edm::stream::EDProducer<>

Public Member Functions

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

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

edm::ESHandle< L1TMuonBarrelParamsbmtfParamsHandle_
 
L1TMuonBarrelKalmanStubProcessorproc_
 
edm::EDGetTokenT< L1MuDTChambPhContainersrcPhi_
 
edm::EDGetTokenT< L1MuDTChambThContainersrcTheta_
 
int verbose_
 

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 31 of file L1TMuonBarrelKalmanStubProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 64 of file L1TMuonBarrelKalmanStubProducer.cc.

64  :
65  srcPhi_(consumes<L1MuDTChambPhContainer>(iConfig.getParameter<edm::InputTag>("srcPhi"))),
66  srcTheta_(consumes<L1MuDTChambThContainer>(iConfig.getParameter<edm::InputTag>("srcTheta"))),
68  verbose_(iConfig.getParameter<int>("verbose"))
69 {
70  produces <L1MuKBMTCombinedStubCollection>();
71 }
T getParameter(std::string const &) const
edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_
edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
L1TMuonBarrelKalmanStubProcessor * proc_
L1TMuonBarrelKalmanStubProducer::~L1TMuonBarrelKalmanStubProducer ( )
override

Definition at line 74 of file L1TMuonBarrelKalmanStubProducer.cc.

References proc_.

75 {
76 
77  // do anything here that needs to be done at destruction time
78  // (e.g. close files, deallocate resources etc.)
79  if (proc_!=nullptr)
80  delete proc_;
81 }
L1TMuonBarrelKalmanStubProcessor * proc_

Member Function Documentation

void L1TMuonBarrelKalmanStubProducer::beginStream ( edm::StreamID  )
overrideprivate

Definition at line 126 of file L1TMuonBarrelKalmanStubProducer.cc.

127 {
128 }
void L1TMuonBarrelKalmanStubProducer::endStream ( )
overrideprivate

Definition at line 132 of file L1TMuonBarrelKalmanStubProducer.cc.

132  {
133 }
void L1TMuonBarrelKalmanStubProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 136 of file L1TMuonBarrelKalmanStubProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setUnknown().

136  {
137  //The following says we do not know what parameters are allowed so do no validation
138  // Please change this to state exactly what you do use, even if it is no parameters
140  desc.setUnknown();
141  descriptions.addDefault(desc);
142 }
void addDefault(ParameterSetDescription const &psetDescription)
void L1TMuonBarrelKalmanStubProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 90 of file L1TMuonBarrelKalmanStubProducer.cc.

References bmtfParamsHandle_, gather_cfg::cout, edm::EventSetup::get(), edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::Event::getByToken(), L1TMuonBarrelKalmanStubProcessor::makeInputPattern(), L1TMuonBarrelKalmanStubProcessor::makeStubs(), proc_, edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), srcPhi_, srcTheta_, parallelization::uint(), and verbose_.

91 {
92  using namespace edm;
94  iEvent.getByToken(srcPhi_,phiIn);
95 
97  iEvent.getByToken(srcTheta_,thetaIn);
98 
99  //Get parameters
100 
101  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = iSetup.get<L1TMuonBarrelParamsRcd>();
102  bmtfParamsRcd.get(bmtfParamsHandle_);
103  const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle_.product();
104 
105 
106 
107 
108 
109  L1MuKBMTCombinedStubCollection stubs = proc_->makeStubs(phiIn.product(),thetaIn.product(),bmtfParams);
110  if (verbose_==1)
111  for (const auto& stub : stubs) {
112  printf("Stub: wheel=%d sector=%d station =%d tag=%d eta1=%d qeta1=%d eta2=%d qeta2=%d\n",stub.whNum(),stub.scNum(),stub.stNum(),stub.tag(),stub.eta1(),stub.qeta1(),stub.eta2(),stub.qeta2());
113  }
114 
115  if (verbose_==2) {
116  std::cout<< "NEW"<<std::endl;
117  for (uint sector=0;sector<12;++sector)
118  proc_->makeInputPattern(phiIn.product(),thetaIn.product(),sector);
119  }
120 
121  iEvent.put(std::make_unique<L1MuKBMTCombinedStubCollection>(stubs));
122 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
L1MuKBMTCombinedStubCollection makeStubs(const L1MuDTChambPhContainer *, const L1MuDTChambThContainer *, const L1TMuonBarrelParams &)
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle_
edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
void makeInputPattern(const L1MuDTChambPhContainer *phiContainer, const L1MuDTChambThContainer *etaContainer, int sector)
L1TMuonBarrelKalmanStubProcessor * proc_
T const * product() const
Definition: Handle.h:74
def uint(string)
HLT enums.
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection

Member Data Documentation

edm::ESHandle< L1TMuonBarrelParams > L1TMuonBarrelKalmanStubProducer::bmtfParamsHandle_
private

Definition at line 47 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

L1TMuonBarrelKalmanStubProcessor* L1TMuonBarrelKalmanStubProducer::proc_
private

Definition at line 45 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce(), and ~L1TMuonBarrelKalmanStubProducer().

edm::EDGetTokenT<L1MuDTChambPhContainer> L1TMuonBarrelKalmanStubProducer::srcPhi_
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

edm::EDGetTokenT<L1MuDTChambThContainer> L1TMuonBarrelKalmanStubProducer::srcTheta_
private

Definition at line 44 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

int L1TMuonBarrelKalmanStubProducer::verbose_
private

Definition at line 46 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().