CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DtDigiToStubsConverterOmtf Class Reference

#include <OMTFinputMaker.h>

Inheritance diagram for DtDigiToStubsConverterOmtf:
DtDigiToStubsConverter DigiToStubsConverterBase

Public Member Functions

bool acceptDigi (const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType) override
 
void addDTetaStubs (MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambThDigi &thetaDigi, unsigned int iProcessor, l1t::tftype procTyp) override
 
void addDTphiDigi (MuonStubPtrs2D &muonStubsInLayers, const L1MuDTChambPhDigi &digi, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype procTyp) override
 
 DtDigiToStubsConverterOmtf (const OMTFConfiguration *config, const OmtfAngleConverter *angleConverter, edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh, edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh)
 
 ~DtDigiToStubsConverterOmtf () override
 
- Public Member Functions inherited from DtDigiToStubsConverter
 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 ()
 

Private Attributes

const OmtfAngleConverterangleConverter = nullptr
 
const OMTFConfigurationconfig = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from DtDigiToStubsConverter
edm::Handle< L1MuDTChambPhContainerdtPhDigis
 
edm::Handle< L1MuDTChambThContainerdtThDigis
 
edm::EDGetTokenT< L1MuDTChambPhContainerinputTokenDtPh
 
edm::EDGetTokenT< L1MuDTChambThContainerinputTokenDtTh
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 21 of file OMTFinputMaker.h.

Constructor & Destructor Documentation

◆ DtDigiToStubsConverterOmtf()

DtDigiToStubsConverterOmtf::DtDigiToStubsConverterOmtf ( const OMTFConfiguration config,
const OmtfAngleConverter angleConverter,
edm::EDGetTokenT< L1MuDTChambPhContainer inputTokenDtPh,
edm::EDGetTokenT< L1MuDTChambThContainer inputTokenDtTh 
)
inline

Definition at line 23 of file OMTFinputMaker.h.

Definition: config.py:1
const OMTFConfiguration * config
DtDigiToStubsConverter(edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh, edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh)
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDtPh
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDtTh
const OmtfAngleConverter * angleConverter

◆ ~DtDigiToStubsConverterOmtf()

DtDigiToStubsConverterOmtf::~DtDigiToStubsConverterOmtf ( )
inlineoverride

Definition at line 29 of file OMTFinputMaker.h.

29 {};

Member Function Documentation

◆ acceptDigi()

bool DtDigiToStubsConverterOmtf::acceptDigi ( const DTChamberId dTChamberId,
unsigned int  iProcessor,
l1t::tftype  procType 
)
overridevirtual

Reimplemented from DtDigiToStubsConverter.

Definition at line 78 of file OMTFinputMaker.cc.

References OMTFinputMaker::acceptDtDigi().

80  {
81  return OMTFinputMaker::acceptDtDigi(config, dTChamberId, iProcessor, procType);
82 }
Definition: config.py:1
static bool acceptDtDigi(const OMTFConfiguration *config, const DTChamberId &dTChamberId, unsigned int iProcessor, l1t::tftype procType)

◆ addDTetaStubs()

void DtDigiToStubsConverterOmtf::addDTetaStubs ( MuonStubPtrs2D muonStubsInLayers,
const L1MuDTChambThDigi thetaDigi,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
overridevirtual

Implements DtDigiToStubsConverter.

Definition at line 71 of file OMTFinputMaker.cc.

74  {
75  //in the Phase1 omtf the theta stubs are merged with the phi in the addDTphiDigi
76 }

◆ addDTphiDigi()

void DtDigiToStubsConverterOmtf::addDTphiDigi ( MuonStubPtrs2D muonStubsInLayers,
const L1MuDTChambPhDigi digi,
const L1MuDTChambThContainer dtThDigis,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
overridevirtual

Check Trigger primitive quality Ts2Tag() == 0 - take only first track from DT Trigger Server BxCnt() == 0 - ?? code()>=3 - take only double layer hits, HH, HL and LL

Implements DtDigiToStubsConverter.

Definition at line 21 of file OMTFinputMaker.cc.

References OMTFinputMaker::addStub(), angleConverter, L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhDigi::code(), MuonStub::DT_PHI_ETA, DtDigiToStubsConverter::dtThDigis, OmtfAngleConverter::getGlobalEta(), OMTFinputMaker::getInputNumber(), AngleConverterBase::getProcessorPhi(), OMTFinputMaker::getProcessorPhiZero(), L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambPhDigi::scNum(), L1MuDTChambPhDigi::stNum(), MuonStub::type, and L1MuDTChambPhDigi::whNum().

25  {
26  DTChamberId detid(digi.whNum(), digi.stNum(), digi.scNum() + 1);
27 
28  //LogTrace("l1tOmtfEventPrint")<<__FUNCTION__<<":"<<__LINE__<<" OMTFinputMaker "<<" detid "<<detid<<endl;
33  // FIXME (MK): at least Ts2Tag selection is not correct! Check it
34  // if (digiIt.bxNum()!= 0 || digiIt.BxCnt()!= 0 || digiIt.Ts2Tag()!= 0 || digiIt.code()<4) continue;
35 
36  //7 is empty digi, TODO update if the definition of the quality is changed
37  if (digi.code() == 7 || digi.code() < config->getMinDtPhiQuality())
38  return;
39 
40  unsigned int hwNumber = config->getLayerNumber(detid.rawId());
41  if (config->getHwToLogicLayer().find(hwNumber) == config->getHwToLogicLayer().end())
42  return;
43 
44  auto iter = config->getHwToLogicLayer().find(hwNumber);
45  unsigned int iLayer = iter->second;
46  unsigned int iInput = OMTFinputMaker::getInputNumber(config, detid.rawId(), iProcessor, procTyp);
47  //MuonStub& stub = muonStubsInLayers[iLayer][iInput];
48  MuonStub stub;
49 
51  stub.qualityHw = digi.code();
52  stub.phiHw = angleConverter->getProcessorPhi(
53  OMTFinputMaker::getProcessorPhiZero(config, iProcessor), procTyp, digi.scNum(), digi.phi());
54  stub.etaHw = angleConverter->getGlobalEta(detid, dtThDigis, digi.bxNum());
55 
56  if (stub.qualityHw >= config->getMinDtPhiBQuality())
57  stub.phiBHw = digi.phiB();
58  else
59  stub.phiBHw = config->nPhiBins();
60 
61  stub.bx = digi.bxNum(); //TODO sholdn't it be BxCnt()?
62  //stub.timing = digi.getTiming(); //TODO what about sub-bx timing, is is available?
63 
64  //stub.etaType = ?? TODO
65  stub.logicLayer = iLayer;
66  stub.detId = detid;
67 
68  OMTFinputMaker::addStub(config, muonStubsInLayers, iLayer, iInput, stub);
69 }
virtual int getGlobalEta(const DTChamberId dTChamberId, const L1MuDTChambThContainer *dtThDigis, int bxNum) const
edm::Handle< L1MuDTChambThContainer > dtThDigis
Definition: config.py:1
Type type
Definition: MuonStub.h:38
static int getProcessorPhiZero(const OMTFConfiguration *config, unsigned int iProcessor)
virtual int getProcessorPhi(int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
static void addStub(const OMTFConfiguration *config, MuonStubPtrs2D &muonStubsInLayers, unsigned int iLayer, unsigned int iInput, MuonStub &stub)
const OmtfAngleConverter * angleConverter

Member Data Documentation

◆ angleConverter

const OmtfAngleConverter* DtDigiToStubsConverterOmtf::angleConverter = nullptr
private

Definition at line 47 of file OMTFinputMaker.h.

Referenced by addDTphiDigi().

◆ config

const OMTFConfiguration* DtDigiToStubsConverterOmtf::config = nullptr
private

Definition at line 46 of file OMTFinputMaker.h.