CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
DtDigiToStubsConverter Class Referenceabstract

#include <MuonStubMakerBase.h>

Inheritance diagram for DtDigiToStubsConverter:
DigiToStubsConverterBase DtDigiToStubsConverterOmtf

Public Member Functions

virtual bool acceptDigi (const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType)
 
virtual void addDTetaStubs (MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambThDigi &thetaDigi, unsigned int iProcessor, l1t::tftype procTyp)=0
 
virtual void addDTphiDigi (MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambPhDigi &digi, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype procTyp)=0
 
 DtDigiToStubsConverter (edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh, edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh)
 
void loadDigis (const edm::Event &event) override
 
void makeStubs (MuonStubPtrs2D &muonStubsInLayers, unsigned int iProcessor, l1t::tftype procTyp, int bxFrom, int bxTo, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override
 
 ~DtDigiToStubsConverter () override
 
- Public Member Functions inherited from DigiToStubsConverterBase
virtual ~DigiToStubsConverterBase ()
 

Protected Attributes

edm::Handle< L1MuDTChambPhContainerdtPhDigis
 
edm::Handle< L1MuDTChambThContainerdtThDigis
 
edm::EDGetTokenT< L1MuDTChambPhContainerinputTokenDtPh
 
edm::EDGetTokenT< L1MuDTChambThContainerinputTokenDtTh
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 49 of file MuonStubMakerBase.h.

Constructor & Destructor Documentation

◆ DtDigiToStubsConverter()

DtDigiToStubsConverter::DtDigiToStubsConverter ( edm::EDGetTokenT< L1MuDTChambPhContainer inputTokenDtPh,
edm::EDGetTokenT< L1MuDTChambThContainer inputTokenDtTh 
)
inline

Definition at line 51 of file MuonStubMakerBase.h.

edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh

◆ ~DtDigiToStubsConverter()

DtDigiToStubsConverter::~DtDigiToStubsConverter ( )
inlineoverride

Definition at line 55 of file MuonStubMakerBase.h.

55 {};

Member Function Documentation

◆ acceptDigi()

virtual bool DtDigiToStubsConverter::acceptDigi ( const DTChamberId dTChamberId,
unsigned int  iProcessor,
l1t::tftype  procType 
)
inlinevirtual

Reimplemented in DtDigiToStubsConverterOmtf.

Definition at line 80 of file MuonStubMakerBase.h.

Referenced by makeStubs().

80  {
81  return true;
82  }

◆ addDTetaStubs()

virtual void DtDigiToStubsConverter::addDTetaStubs ( MuonStubPtrs2D muonStubsInLayers,
const L1MuDTChambThDigi thetaDigi,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
pure virtual

Implemented in DtDigiToStubsConverterOmtf.

Referenced by makeStubs().

◆ addDTphiDigi()

virtual void DtDigiToStubsConverter::addDTphiDigi ( MuonStubPtrs2D muonStubsInLayers,
const L1MuDTChambPhDigi digi,
const L1MuDTChambThContainer dtThDigis,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
pure virtual

Implemented in DtDigiToStubsConverterOmtf.

Referenced by makeStubs().

◆ loadDigis()

void DtDigiToStubsConverter::loadDigis ( const edm::Event event)
overridevirtual

Implements DigiToStubsConverterBase.

Definition at line 17 of file MuonStubMakerBase.cc.

References dtPhDigis, dtThDigis, inputTokenDtPh, and inputTokenDtTh.

17  {
18  event.getByToken(inputTokenDtPh, dtPhDigis);
19  event.getByToken(inputTokenDtTh, dtThDigis);
20 }
edm::Handle< L1MuDTChambThContainer > dtThDigis
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh
edm::Handle< L1MuDTChambPhContainer > dtPhDigis

◆ makeStubs()

void DtDigiToStubsConverter::makeStubs ( MuonStubPtrs2D muonStubsInLayers,
unsigned int  iProcessor,
l1t::tftype  procTyp,
int  bxFrom,
int  bxTo,
std::vector< std::unique_ptr< IOMTFEmulationObserver > > &  observers 
)
overridevirtual

Check it the data fits into given processor input range

Implements DigiToStubsConverterBase.

Definition at line 22 of file MuonStubMakerBase.cc.

References acceptDigi(), addDTetaStubs(), addDTphiDigi(), dtPhDigis, dtThDigis, L1MuDTChambThContainer::getContainer(), L1MuDTChambPhContainer::getContainer(), mergePhiAndTheta, and edm::Handle< T >::product().

27  {
28  if (!dtPhDigis)
29  return;
30 
31  for (const auto& digiIt : *dtPhDigis->getContainer()) {
32  DTChamberId detid(digiIt.whNum(), digiIt.stNum(), digiIt.scNum() + 1);
33 
35  if (!acceptDigi(detid, iProcessor, procTyp))
36  continue;
37 
38  if (digiIt.bxNum() >= bxFrom && digiIt.bxNum() <= bxTo)
39  addDTphiDigi(muonStubsInLayers, digiIt, dtThDigis.product(), iProcessor, procTyp);
40  }
41 
42  if (!mergePhiAndTheta) {
43  for (auto& thetaDigi : (*(dtThDigis->getContainer()))) {
44  if (thetaDigi.bxNum() >= bxFrom && thetaDigi.bxNum() <= bxTo) {
45  addDTetaStubs(muonStubsInLayers, thetaDigi, iProcessor, procTyp);
46  }
47  }
48  }
49  //LogTrace("l1tOmtfEventPrint")<<__FUNCTION__<<":"<<__LINE__<<" iProcessor "<<iProcessor<<std::endl;
50 }
T const * product() const
Definition: Handle.h:70
edm::Handle< L1MuDTChambThContainer > dtThDigis
The_Container const * getContainer() const
virtual void addDTphiDigi(MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambPhDigi &digi, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype procTyp)=0
virtual void addDTetaStubs(MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambThDigi &thetaDigi, unsigned int iProcessor, l1t::tftype procTyp)=0
Phi_Container const * getContainer() const
virtual bool acceptDigi(const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType)
edm::Handle< L1MuDTChambPhContainer > dtPhDigis

Member Data Documentation

◆ dtPhDigis

edm::Handle<L1MuDTChambPhContainer> DtDigiToStubsConverter::dtPhDigis
protected

Definition at line 90 of file MuonStubMakerBase.h.

Referenced by loadDigis(), and makeStubs().

◆ dtThDigis

edm::Handle<L1MuDTChambThContainer> DtDigiToStubsConverter::dtThDigis
protected

◆ inputTokenDtPh

edm::EDGetTokenT<L1MuDTChambPhContainer> DtDigiToStubsConverter::inputTokenDtPh
protected

Definition at line 87 of file MuonStubMakerBase.h.

Referenced by loadDigis().

◆ inputTokenDtTh

edm::EDGetTokenT<L1MuDTChambThContainer> DtDigiToStubsConverter::inputTokenDtTh
protected

Definition at line 88 of file MuonStubMakerBase.h.

Referenced by loadDigis().

◆ mergePhiAndTheta

bool DtDigiToStubsConverter::mergePhiAndTheta = true
protected

Definition at line 85 of file MuonStubMakerBase.h.

Referenced by makeStubs().