CMS 3D CMS Logo

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

#include <MuonStubMakerBase.h>

Inheritance diagram for CscDigiToStubsConverter:
DigiToStubsConverterBase CscDigiToStubsConverterOmtf

Public Member Functions

virtual bool acceptDigi (const CSCDetId &cscDetId, unsigned int iProcessor, l1t::tftype procType)
 
virtual void addCSCstubs (MuonStubPtrs2D &muonStubsInLayers, unsigned int rawid, const CSCCorrelatedLCTDigi &digi, unsigned int iProcessor, l1t::tftype procTyp)=0
 
 CscDigiToStubsConverter (const ProcConfigurationBase *config, edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc)
 
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
 
 ~CscDigiToStubsConverter () override
 
- Public Member Functions inherited from DigiToStubsConverterBase
virtual ~DigiToStubsConverterBase ()
 

Protected Attributes

const ProcConfigurationBaseconfig
 
edm::Handle< CSCCorrelatedLCTDigiCollectioncscDigis
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectioninputTokenCsc
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 94 of file MuonStubMakerBase.h.

Constructor & Destructor Documentation

◆ CscDigiToStubsConverter()

CscDigiToStubsConverter::CscDigiToStubsConverter ( const ProcConfigurationBase config,
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection inputTokenCsc 
)
inline

Definition at line 96 of file MuonStubMakerBase.h.

Definition: config.py:1
const ProcConfigurationBase * config
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc

◆ ~CscDigiToStubsConverter()

CscDigiToStubsConverter::~CscDigiToStubsConverter ( )
inlineoverride

Definition at line 100 of file MuonStubMakerBase.h.

100 {}

Member Function Documentation

◆ acceptDigi()

virtual bool CscDigiToStubsConverter::acceptDigi ( const CSCDetId cscDetId,
unsigned int  iProcessor,
l1t::tftype  procType 
)
inlinevirtual

Reimplemented in CscDigiToStubsConverterOmtf.

Definition at line 120 of file MuonStubMakerBase.h.

Referenced by makeStubs().

120 { return true; }

◆ addCSCstubs()

virtual void CscDigiToStubsConverter::addCSCstubs ( MuonStubPtrs2D muonStubsInLayers,
unsigned int  rawid,
const CSCCorrelatedLCTDigi digi,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
pure virtual

Implemented in CscDigiToStubsConverterOmtf.

Referenced by makeStubs().

◆ loadDigis()

void CscDigiToStubsConverter::loadDigis ( const edm::Event event)
inlineoverridevirtual

Implements DigiToStubsConverterBase.

Definition at line 104 of file MuonStubMakerBase.h.

References cscDigis, and inputTokenCsc.

104 { event.getByToken(inputTokenCsc, cscDigis); }
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc
edm::Handle< CSCCorrelatedLCTDigiCollection > cscDigis

◆ makeStubs()

void CscDigiToStubsConverter::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

Check if LCT trigger primitive has the right BX.

Implements DigiToStubsConverterBase.

Definition at line 51 of file MuonStubMakerBase.cc.

References acceptDigi(), addCSCstubs(), relativeConstraints::chamber, omtf::DataWord64::csc, and cscDigis.

56  {
57  auto chamber = cscDigis->begin();
58  auto chend = cscDigis->end();
59  for (; chamber != chend; ++chamber) {
60  unsigned int rawid = (*chamber).first;
62  CSCDetId csc(rawid);
63  if (!acceptDigi(csc, iProcessor, procTyp))
64  continue;
65 
66  auto digi = (*chamber).second.first;
67  auto dend = (*chamber).second.second;
68  for (; digi != dend; ++digi) {
70  int digiBx = digi->getBX() - config->cscLctCentralBx();
71 
72  if (digiBx >= bxFrom && digiBx <= bxTo)
73  addCSCstubs(muonStubsInLayers, rawid, *digi, iProcessor, procTyp);
74  }
75  }
76 }
virtual bool acceptDigi(const CSCDetId &cscDetId, unsigned int iProcessor, l1t::tftype procType)
virtual void addCSCstubs(MuonStubPtrs2D &muonStubsInLayers, unsigned int rawid, const CSCCorrelatedLCTDigi &digi, unsigned int iProcessor, l1t::tftype procTyp)=0
Definition: config.py:1
Definition: L1Track.h:19
edm::Handle< CSCCorrelatedLCTDigiCollection > cscDigis

Member Data Documentation

◆ config

const ProcConfigurationBase* CscDigiToStubsConverter::config
protected

Definition at line 123 of file MuonStubMakerBase.h.

◆ cscDigis

edm::Handle<CSCCorrelatedLCTDigiCollection> CscDigiToStubsConverter::cscDigis
protected

Definition at line 128 of file MuonStubMakerBase.h.

Referenced by loadDigis(), and makeStubs().

◆ inputTokenCsc

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CscDigiToStubsConverter::inputTokenCsc
protected

Definition at line 127 of file MuonStubMakerBase.h.

Referenced by loadDigis().

◆ mergePhiAndTheta

bool CscDigiToStubsConverter::mergePhiAndTheta = true
protected

Definition at line 125 of file MuonStubMakerBase.h.