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) 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 44 of file MuonStubMakerBase.h.

Constructor & Destructor Documentation

◆ DtDigiToStubsConverter()

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

Definition at line 46 of file MuonStubMakerBase.h.

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

◆ ~DtDigiToStubsConverter()

DtDigiToStubsConverter::~DtDigiToStubsConverter ( )
inlineoverride

Definition at line 50 of file MuonStubMakerBase.h.

50 {};

Member Function Documentation

◆ acceptDigi()

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

Reimplemented in DtDigiToStubsConverterOmtf.

Definition at line 71 of file MuonStubMakerBase.h.

Referenced by makeStubs().

71  {
72  return true;
73  }

◆ 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 
)
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().

23  {
24  if (!dtPhDigis)
25  return;
26 
27  for (const auto& digiIt : *dtPhDigis->getContainer()) {
28  DTChamberId detid(digiIt.whNum(), digiIt.stNum(), digiIt.scNum() + 1);
29 
31  if (!acceptDigi(detid, iProcessor, procTyp))
32  continue;
33 
34  if (digiIt.bxNum() >= bxFrom && digiIt.bxNum() <= bxTo)
35  addDTphiDigi(muonStubsInLayers, digiIt, dtThDigis.product(), iProcessor, procTyp);
36  }
37 
38  if (!mergePhiAndTheta) {
39  for (auto& thetaDigi : (*(dtThDigis->getContainer()))) {
40  if (thetaDigi.bxNum() >= bxFrom && thetaDigi.bxNum() <= bxTo) {
41  addDTetaStubs(muonStubsInLayers, thetaDigi, iProcessor, procTyp);
42  }
43  }
44  }
45  //LogTrace("l1tOmtfEventPrint")<<__FUNCTION__<<":"<<__LINE__<<" iProcessor "<<iProcessor<<std::endl;
46 }
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 81 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 78 of file MuonStubMakerBase.h.

Referenced by loadDigis().

◆ inputTokenDtTh

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

Definition at line 79 of file MuonStubMakerBase.h.

Referenced by loadDigis().

◆ mergePhiAndTheta

bool DtDigiToStubsConverter::mergePhiAndTheta = true
protected

Definition at line 76 of file MuonStubMakerBase.h.

Referenced by makeStubs().