CMS 3D CMS Logo

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

Public Member Functions

 L1TTwinMuxProducer (const edm::ParameterSet &pset)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~L1TTwinMuxProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

edm::EDGetToken m_dtdigi
 
edm::EDGetToken m_dtthetadigi
 
edm::EDGetToken m_rpcsource
 
edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcdm_tmParamsToken
 
edm::ESHandle< L1TTwinMuxParamstmParamsHandle
 Event Setup Handler. More...
 

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 L1TTwinMuxProducer.cc.

Constructor & Destructor Documentation

◆ L1TTwinMuxProducer()

L1TTwinMuxProducer::L1TTwinMuxProducer ( const edm::ParameterSet pset)

Definition at line 46 of file L1TTwinMuxProducer.cc.

46  {
47  //m_l1tma = new L1TTwinMuxAlgorithm();
48  // std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
49 
50  m_dtdigi = consumes<L1MuDTChambPhContainer>(pset.getParameter<edm::InputTag>("DTDigi_Source"));
51  m_dtthetadigi = consumes<L1MuDTChambThContainer>(pset.getParameter<edm::InputTag>("DTThetaDigi_Source"));
52  m_rpcsource = consumes<RPCDigiCollection>(pset.getParameter<edm::InputTag>("RPC_Source"));
53  m_tmParamsToken = esConsumes<L1TTwinMuxParams, L1TTwinMuxParamsRcd>();
54 
55  produces<L1MuDTChambPhContainer>();
56  produces<L1MuDTChambThContainer>();
57 }

References muonDTDigis_cfi::pset.

◆ ~L1TTwinMuxProducer()

L1TTwinMuxProducer::~L1TTwinMuxProducer ( )
inlineoverride

Definition at line 34 of file L1TTwinMuxProducer.cc.

34 {}

Member Function Documentation

◆ produce()

void L1TTwinMuxProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Check consistency of the paramters

Only RPC: the emulator's output consist from rpc->dy primitives only

Only DT: the emulator's output consist from dt primitives only

—Check consistency of the paramters

Definition at line 59 of file L1TTwinMuxProducer.cc.

59  {
60  std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
62  tmParamsHandle = c.getHandle(m_tmParamsToken);
63  const L1TTwinMuxParams& tmParams = *tmParamsHandle.product();
64 
66  bool onlyRPC = tmParams.get_UseOnlyRPC();
68  bool onlyDT = tmParams.get_UseOnlyDT();
69 
70  if (onlyDT && onlyRPC) {
71  edm::LogWarning("Inconsistent configuration") << "onlyRPC and onlyDT options";
72  return;
73  }
75 
78  e.getByToken(m_dtdigi, phiDigis);
79  e.getByToken(m_dtthetadigi, thetaDigis);
80 
82  e.getByToken(m_rpcsource, rpcDigis);
83 
84  if (!phiDigis.isValid()) {
85  edm::LogWarning("Inconsistent digis") << "input DT phi digis not valid";
86  }
87 
88  //std::unique_ptr<L1MuDTChambPhContainer> l1ttmp(new L1MuDTChambPhContainer);
89  auto l1ttmp = std::make_unique<L1MuDTChambPhContainer>();
90  m_l1tma->run(phiDigis, thetaDigis, rpcDigis, c);
91  *l1ttmp = m_l1tma->get_ph_tm_output();
92  //null transfer of theta digis
93  auto l1ttmth = std::make_unique<L1MuDTChambThContainer>();
94  const std::vector<L1MuDTChambThDigi>* theta = thetaDigis->getContainer();
95  l1ttmth->setContainer(*theta);
96 
97  e.put(std::move(l1ttmp));
98  e.put(std::move(l1ttmth));
99 }

References c, MillePedeFileConverter_cfg::e, L1TTwinMuxParams::get_UseOnlyDT(), L1TTwinMuxParams::get_UseOnlyRPC(), L1MuDTChambThContainer::getContainer(), edm::HandleBase::isValid(), eostools::move(), and theta().

Member Data Documentation

◆ m_dtdigi

edm::EDGetToken L1TTwinMuxProducer::m_dtdigi
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

◆ m_dtthetadigi

edm::EDGetToken L1TTwinMuxProducer::m_dtthetadigi
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

◆ m_rpcsource

edm::EDGetToken L1TTwinMuxProducer::m_rpcsource
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

◆ m_tmParamsToken

edm::ESGetToken<L1TTwinMuxParams, L1TTwinMuxParamsRcd> L1TTwinMuxProducer::m_tmParamsToken
private

Definition at line 43 of file L1TTwinMuxProducer.cc.

◆ tmParamsHandle

edm::ESHandle<L1TTwinMuxParams> L1TTwinMuxProducer::tmParamsHandle
private

Event Setup Handler.

Definition at line 42 of file L1TTwinMuxProducer.cc.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TTwinMuxProducer::m_rpcsource
edm::EDGetToken m_rpcsource
Definition: L1TTwinMuxProducer.cc:40
L1TTwinMuxParams::get_UseOnlyRPC
int get_UseOnlyRPC() const
Definition: L1TTwinMuxParams.h:60
L1TTwinMuxProducer::m_dtdigi
edm::EDGetToken m_dtdigi
Definition: L1TTwinMuxProducer.cc:40
edm::Handle< L1MuDTChambPhContainer >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
L1TTwinMuxProducer::m_dtthetadigi
edm::EDGetToken m_dtthetadigi
Definition: L1TTwinMuxProducer.cc:40
L1MuDTChambThContainer::getContainer
The_Container const * getContainer() const
Definition: L1MuDTChambThContainer.cc:41
L1TTwinMuxAlgorithm
Definition: L1TTwinMuxAlgorithm.h:33
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1TTwinMuxProducer::m_tmParamsToken
edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcd > m_tmParamsToken
Definition: L1TTwinMuxProducer.cc:43
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1TTwinMuxParams::get_UseOnlyDT
int get_UseOnlyDT() const
Definition: L1TTwinMuxParams.h:63
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
L1TTwinMuxProducer::tmParamsHandle
edm::ESHandle< L1TTwinMuxParams > tmParamsHandle
Event Setup Handler.
Definition: L1TTwinMuxProducer.cc:42
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
L1TTwinMuxParams
Definition: L1TTwinMuxParams.h:19