CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< L1MuDTChambPhContainer
dtPhDigis
 
edm::Handle
< L1MuDTChambThContainer
dtThDigis
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
inputTokenDtPh
 
edm::EDGetTokenT
< L1MuDTChambThContainer
inputTokenDtTh
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 44 of file MuonStubMakerBase.h.

Constructor & Destructor Documentation

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

Definition at line 46 of file MuonStubMakerBase.h.

48  : inputTokenDtPh(inputTokenDtPh), inputTokenDtTh(inputTokenDtTh){};
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh
DtDigiToStubsConverter::~DtDigiToStubsConverter ( )
inlineoverride

Definition at line 50 of file MuonStubMakerBase.h.

50 {};

Member Function Documentation

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  }
virtual void DtDigiToStubsConverter::addDTetaStubs ( MuonStubPtrs2D muonStubsInLayers,
const L1MuDTChambThDigi thetaDigi,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
pure virtual

Implemented in DtDigiToStubsConverterOmtf.

Referenced by makeStubs().

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

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
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, 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 }
edm::Handle< L1MuDTChambThContainer > dtThDigis
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
T const * product() const
Definition: Handle.h:70
virtual bool acceptDigi(const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType)
edm::Handle< L1MuDTChambPhContainer > dtPhDigis

Member Data Documentation

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

Definition at line 81 of file MuonStubMakerBase.h.

Referenced by loadDigis(), and makeStubs().

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

Definition at line 82 of file MuonStubMakerBase.h.

Referenced by loadDigis(), and makeStubs().

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

Definition at line 78 of file MuonStubMakerBase.h.

Referenced by loadDigis().

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

Definition at line 79 of file MuonStubMakerBase.h.

Referenced by loadDigis().

bool DtDigiToStubsConverter::mergePhiAndTheta = true
protected

Definition at line 76 of file MuonStubMakerBase.h.

Referenced by makeStubs().