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
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) override
 
 ~CscDigiToStubsConverter () override
 
- Public Member Functions inherited from DigiToStubsConverterBase
virtual ~DigiToStubsConverterBase ()
 

Protected Attributes

const ProcConfigurationBaseconfig
 
edm::Handle
< CSCCorrelatedLCTDigiCollection
cscDigis
 
edm::EDGetTokenT
< CSCCorrelatedLCTDigiCollection
inputTokenCsc
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 85 of file MuonStubMakerBase.h.

Constructor & Destructor Documentation

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

Definition at line 87 of file MuonStubMakerBase.h.

89  : config(config), inputTokenCsc(inputTokenCsc){};
const ProcConfigurationBase * config
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc
CscDigiToStubsConverter::~CscDigiToStubsConverter ( )
inlineoverride

Definition at line 91 of file MuonStubMakerBase.h.

91 {};

Member Function Documentation

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

Reimplemented in CscDigiToStubsConverterOmtf.

Definition at line 107 of file MuonStubMakerBase.h.

Referenced by makeStubs().

107 { return true; }
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().

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

Implements DigiToStubsConverterBase.

Definition at line 95 of file MuonStubMakerBase.h.

References cscDigis, and inputTokenCsc.

95 { event.getByToken(inputTokenCsc, cscDigis); }
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc
edm::Handle< CSCCorrelatedLCTDigiCollection > cscDigis
void CscDigiToStubsConverter::makeStubs ( MuonStubPtrs2D muonStubsInLayers,
unsigned int  iProcessor,
l1t::tftype  procTyp,
int  bxFrom,
int  bxTo 
)
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 50 of file MuonStubMakerBase.cc.

References acceptDigi(), addCSCstubs(), config, omtf::DataWord64::csc, cscDigis, and ProcConfigurationBase::cscLctCentralBx().

51  {
52  if (!cscDigis)
53  return;
54 
55  auto chamber = cscDigis->begin();
56  auto chend = cscDigis->end();
57  for (; chamber != chend; ++chamber) {
58  unsigned int rawid = (*chamber).first;
60  CSCDetId csc(rawid);
61  if (!acceptDigi(csc, iProcessor, procTyp))
62  continue;
63 
64  auto digi = (*chamber).second.first;
65  auto dend = (*chamber).second.second;
66  for (; digi != dend; ++digi) {
68  int digiBx = digi->getBX() - config->cscLctCentralBx();
69 
70  if (digiBx >= bxFrom && digiBx <= bxTo)
71  addCSCstubs(muonStubsInLayers, rawid, *digi, iProcessor, procTyp);
72  }
73  }
74 }
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
const ProcConfigurationBase * config
virtual int cscLctCentralBx() const
edm::Handle< CSCCorrelatedLCTDigiCollection > cscDigis

Member Data Documentation

const ProcConfigurationBase* CscDigiToStubsConverter::config
protected
edm::Handle<CSCCorrelatedLCTDigiCollection> CscDigiToStubsConverter::cscDigis
protected

Definition at line 115 of file MuonStubMakerBase.h.

Referenced by loadDigis(), and makeStubs().

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

Definition at line 114 of file MuonStubMakerBase.h.

Referenced by loadDigis().

bool CscDigiToStubsConverter::mergePhiAndTheta = true
protected

Definition at line 112 of file MuonStubMakerBase.h.