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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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

const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcdbmtfParamsToken_
 
std::unique_ptr< L1TMuonBarrelKalmanStubProcessorproc_
 
const edm::EDPutTokenT< L1MuKBMTCombinedStubCollectionputToken_
 
const edm::EDGetTokenT< L1MuDTChambPhContainersrcPhi_
 
const edm::EDGetTokenT< L1MuDTChambThContainersrcTheta_
 
const int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 60 of file L1TMuonBarrelKalmanStubProducer.cc.

61  : srcPhi_(consumes<L1MuDTChambPhContainer>(iConfig.getParameter<edm::InputTag>("srcPhi"))),
62  srcTheta_(consumes<L1MuDTChambThContainer>(iConfig.getParameter<edm::InputTag>("srcTheta"))),
63  proc_(std::make_unique<L1TMuonBarrelKalmanStubProcessor>(iConfig)),
64  verbose_(iConfig.getParameter<int>("verbose")),
66  putToken_(produces<L1MuKBMTCombinedStubCollection>()) {}
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::EDPutTokenT< L1MuKBMTCombinedStubCollection > putToken_
std::unique_ptr< L1TMuonBarrelKalmanStubProcessor > proc_
const edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > bmtfParamsToken_
const edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_

◆ ~L1TMuonBarrelKalmanStubProducer()

L1TMuonBarrelKalmanStubProducer::~L1TMuonBarrelKalmanStubProducer ( )
override

Definition at line 68 of file L1TMuonBarrelKalmanStubProducer.cc.

68 {}

Member Function Documentation

◆ beginStream()

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

Definition at line 111 of file L1TMuonBarrelKalmanStubProducer.cc.

111 {}

◆ endStream()

void L1TMuonBarrelKalmanStubProducer::endStream ( )
overrideprivate

Definition at line 114 of file L1TMuonBarrelKalmanStubProducer.cc.

114 {}

◆ fillDescriptions()

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

Definition at line 116 of file L1TMuonBarrelKalmanStubProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

116  {
117  //The following says we do not know what parameters are allowed so do no validation
118  // Please change this to state exactly what you do use, even if it is no parameters
120  desc.setUnknown();
121  descriptions.addDefault(desc);
122 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 75 of file L1TMuonBarrelKalmanStubProducer.cc.

References bmtfParamsToken_, gather_cfg::cout, edm::EventSetup::getData(), iEvent, eostools::move(), proc_, edm::Handle< T >::product(), putToken_, srcPhi_, srcTheta_, parallelization::uint, and verbose_.

75  {
76  using namespace edm;
78  iEvent.getByToken(srcPhi_, phiIn);
79 
81  iEvent.getByToken(srcTheta_, thetaIn);
82 
83  //Get parameters
84 
85  const L1TMuonBarrelParams& bmtfParams = iSetup.getData(bmtfParamsToken_);
86 
87  L1MuKBMTCombinedStubCollection stubs = proc_->makeStubs(phiIn.product(), thetaIn.product(), bmtfParams);
88  if (verbose_ == 1)
89  for (const auto& stub : stubs) {
90  printf("Stub: wheel=%d sector=%d station =%d tag=%d eta1=%d qeta1=%d eta2=%d qeta2=%d\n",
91  stub.whNum(),
92  stub.scNum(),
93  stub.stNum(),
94  stub.tag(),
95  stub.eta1(),
96  stub.qeta1(),
97  stub.eta2(),
98  stub.qeta2());
99  }
100 
101  if (verbose_ == 2) {
102  std::cout << "NEW" << std::endl;
103  for (uint sector = 0; sector < 12; ++sector)
104  proc_->makeInputPattern(phiIn.product(), thetaIn.product(), sector);
105  }
106 
107  iEvent.emplace(putToken_, std::move(stubs));
108 }
T const * product() const
Definition: Handle.h:70
const edm::EDPutTokenT< L1MuKBMTCombinedStubCollection > putToken_
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< L1TMuonBarrelKalmanStubProcessor > proc_
const edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
HLT enums.
const edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > bmtfParamsToken_
def move(src, dest)
Definition: eostools.py:511
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection
const edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_

Member Data Documentation

◆ bmtfParamsToken_

const edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> L1TMuonBarrelKalmanStubProducer::bmtfParamsToken_
private

Definition at line 45 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ proc_

std::unique_ptr<L1TMuonBarrelKalmanStubProcessor> L1TMuonBarrelKalmanStubProducer::proc_
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ putToken_

const edm::EDPutTokenT<L1MuKBMTCombinedStubCollection> L1TMuonBarrelKalmanStubProducer::putToken_
private

Definition at line 46 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ srcPhi_

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

Definition at line 41 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ srcTheta_

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

Definition at line 42 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().

◆ verbose_

const int L1TMuonBarrelKalmanStubProducer::verbose_
private

Definition at line 44 of file L1TMuonBarrelKalmanStubProducer.cc.

Referenced by produce().