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 hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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 30 of file L1TMuonBarrelKalmanStubProducer.cc.

Constructor & Destructor Documentation

◆ L1TMuonBarrelKalmanStubProducer()

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

Definition at line 59 of file L1TMuonBarrelKalmanStubProducer.cc.

60  : srcPhi_(consumes<L1MuDTChambPhContainer>(iConfig.getParameter<edm::InputTag>("srcPhi"))),
61  srcTheta_(consumes<L1MuDTChambThContainer>(iConfig.getParameter<edm::InputTag>("srcTheta"))),
63  verbose_(iConfig.getParameter<int>("verbose")) {
64  produces<L1MuKBMTCombinedStubCollection>();
65 }

◆ ~L1TMuonBarrelKalmanStubProducer()

L1TMuonBarrelKalmanStubProducer::~L1TMuonBarrelKalmanStubProducer ( )
override

Definition at line 67 of file L1TMuonBarrelKalmanStubProducer.cc.

67  {
68  // do anything here that needs to be done at destruction time
69  // (e.g. close files, deallocate resources etc.)
70  if (proc_ != nullptr)
71  delete proc_;
72 }

References proc_.

Member Function Documentation

◆ beginStream()

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

Definition at line 117 of file L1TMuonBarrelKalmanStubProducer.cc.

117 {}

◆ endStream()

void L1TMuonBarrelKalmanStubProducer::endStream ( )
overrideprivate

Definition at line 120 of file L1TMuonBarrelKalmanStubProducer.cc.

120 {}

◆ fillDescriptions()

void L1TMuonBarrelKalmanStubProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 122 of file L1TMuonBarrelKalmanStubProducer.cc.

122  {
123  //The following says we do not know what parameters are allowed so do no validation
124  // Please change this to state exactly what you do use, even if it is no parameters
126  desc.setUnknown();
127  descriptions.addDefault(desc);
128 }

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

◆ produce()

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

Definition at line 79 of file L1TMuonBarrelKalmanStubProducer.cc.

79  {
80  using namespace edm;
82  iEvent.getByToken(srcPhi_, phiIn);
83 
85  iEvent.getByToken(srcTheta_, thetaIn);
86 
87  //Get parameters
88 
89  const L1TMuonBarrelParamsRcd& bmtfParamsRcd = iSetup.get<L1TMuonBarrelParamsRcd>();
90  bmtfParamsRcd.get(bmtfParamsHandle_);
91  const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle_.product();
92 
93  L1MuKBMTCombinedStubCollection stubs = proc_->makeStubs(phiIn.product(), thetaIn.product(), bmtfParams);
94  if (verbose_ == 1)
95  for (const auto& stub : stubs) {
96  printf("Stub: wheel=%d sector=%d station =%d tag=%d eta1=%d qeta1=%d eta2=%d qeta2=%d\n",
97  stub.whNum(),
98  stub.scNum(),
99  stub.stNum(),
100  stub.tag(),
101  stub.eta1(),
102  stub.qeta1(),
103  stub.eta2(),
104  stub.qeta2());
105  }
106 
107  if (verbose_ == 2) {
108  std::cout << "NEW" << std::endl;
109  for (uint sector = 0; sector < 12; ++sector)
110  proc_->makeInputPattern(phiIn.product(), thetaIn.product(), sector);
111  }
112 
113  iEvent.put(std::make_unique<L1MuKBMTCombinedStubCollection>(stubs));
114 }

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

Member Data Documentation

◆ bmtfParamsHandle_

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

Definition at line 45 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ proc_

L1TMuonBarrelKalmanStubProcessor* L1TMuonBarrelKalmanStubProducer::proc_
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProducer.cc.

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

◆ srcPhi_

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

Definition at line 41 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ srcTheta_

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

Definition at line 42 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ verbose_

int L1TMuonBarrelKalmanStubProducer::verbose_
private

Definition at line 44 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TMuonBarrelKalmanStubProcessor::makeInputPattern
void makeInputPattern(const L1MuDTChambPhContainer *phiContainer, const L1MuDTChambThContainer *etaContainer, int sector)
Definition: L1TMuonBarrelKalmanStubProcessor.cc:212
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuKBMTCombinedStubCollection
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection
Definition: L1MuKBMTCombinedStub.h:39
L1TMuonBarrelKalmanStubProducer::bmtfParamsHandle_
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle_
Definition: L1TMuonBarrelKalmanStubProducer.cc:45
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
L1TMuonBarrelKalmanStubProducer::srcTheta_
edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
Definition: L1TMuonBarrelKalmanStubProducer.cc:42
edm::Handle< L1MuDTChambPhContainer >
parallelization.uint
uint
Definition: parallelization.py:124
L1TMuonBarrelKalmanStubProcessor
Definition: L1TMuonBarrelKalmanStubProcessor.h:15
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
L1TMuonBarrelKalmanStubProducer::verbose_
int verbose_
Definition: L1TMuonBarrelKalmanStubProducer.cc:44
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
L1TMuonBarrelKalmanStubProcessor::makeStubs
L1MuKBMTCombinedStubCollection makeStubs(const L1MuDTChambPhContainer *, const L1MuDTChambThContainer *, const L1TMuonBarrelParams &)
Definition: L1TMuonBarrelKalmanStubProcessor.cc:94
L1TMuonBarrelKalmanStubProducer::proc_
L1TMuonBarrelKalmanStubProcessor * proc_
Definition: L1TMuonBarrelKalmanStubProducer.cc:43
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1TMuonBarrelKalmanStubProducer::srcPhi_
edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_
Definition: L1TMuonBarrelKalmanStubProducer.cc:41
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
L1TMuonBarrelParams
Definition: L1TMuonBarrelParams.h:23
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
edm::InputTag
Definition: InputTag.h:15
L1TMuonBarrelParamsRcd
Definition: L1TMuonBarrelParamsRcd.h:13