CMS 3D CMS Logo

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

#include <OMTFinputMaker.h>

Inheritance diagram for CscDigiToStubsConverterOmtf:
CscDigiToStubsConverter DigiToStubsConverterBase

Public Member Functions

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

Private Attributes

const OmtfAngleConverterangleConverter = nullptr
 
const OMTFConfigurationconfig = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from CscDigiToStubsConverter
const ProcConfigurationBaseconfig
 
edm::Handle< CSCCorrelatedLCTDigiCollectioncscDigis
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectioninputTokenCsc
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 50 of file OMTFinputMaker.h.

Constructor & Destructor Documentation

◆ CscDigiToStubsConverterOmtf()

CscDigiToStubsConverterOmtf::CscDigiToStubsConverterOmtf ( const OMTFConfiguration config,
const OmtfAngleConverter angleConverter,
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection inputTokenCsc 
)
inline

Definition at line 52 of file OMTFinputMaker.h.

const OMTFConfiguration * config
CscDigiToStubsConverter(const ProcConfigurationBase *config, edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc)
Definition: config.py:1
const OmtfAngleConverter * angleConverter
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc

◆ ~CscDigiToStubsConverterOmtf()

CscDigiToStubsConverterOmtf::~CscDigiToStubsConverterOmtf ( )
inlineoverride

Definition at line 57 of file OMTFinputMaker.h.

57 {};

Member Function Documentation

◆ acceptDigi()

bool CscDigiToStubsConverterOmtf::acceptDigi ( const CSCDetId cscDetId,
unsigned int  iProcessor,
l1t::tftype  procType 
)
overridevirtual

Reimplemented from CscDigiToStubsConverter.

Definition at line 121 of file OMTFinputMaker.cc.

References l1t::emtf_neg, l1t::emtf_pos, l1t::omtf_neg, and l1t::omtf_pos.

121  {
122  if (procType == l1t::tftype::omtf_pos && (csc.endcap() == 2 || csc.ring() == 1 || csc.station() == 4))
123  return false;
124  if (procType == l1t::tftype::omtf_neg && (csc.endcap() == 1 || csc.ring() == 1 || csc.station() == 4))
125  return false;
126 
127  if (procType == l1t::tftype::emtf_pos && (csc.endcap() == 2 || (csc.station() == 1 && csc.ring() == 3)))
128  return false;
129  if (procType == l1t::tftype::emtf_neg && (csc.endcap() == 1 || (csc.station() == 1 && csc.ring() == 3)))
130  return false;
131 
132  unsigned int aSector = csc.chamber();
133  unsigned int aMin = config->getEndcap10DegMin()[iProcessor];
134  unsigned int aMax = config->getEndcap10DegMax()[iProcessor];
135 
136  if ((procType == l1t::tftype::emtf_pos || procType == l1t::tftype::emtf_neg) && csc.station() > 1 &&
137  csc.ring() == 1) {
138  aMin = config->getEndcap20DegMin()[iProcessor];
139  aMax = config->getEndcap20DegMax()[iProcessor];
140  }
141 
142  if (aMax > aMin && aSector >= aMin && aSector <= aMax)
143  return true;
144  if (aMax < aMin && (aSector >= aMin || aSector <= aMax))
145  return true;
146 
147  return false;
148 }
Definition: config.py:1
Definition: L1Track.h:19

◆ addCSCstubs()

void CscDigiToStubsConverterOmtf::addCSCstubs ( MuonStubPtrs2D muonStubsInLayers,
unsigned int  rawid,
const CSCCorrelatedLCTDigi digi,
unsigned int  iProcessor,
l1t::tftype  procTyp 
)
overridevirtual

Accept CSC digis only up to eta=1.26. The nominal OMTF range is up to 1.24, but cutting at 1.24 kill efficiency at the edge. 1.26 is one eta bin above nominal.

Implements CscDigiToStubsConverter.

Definition at line 84 of file OMTFinputMaker.cc.

References OMTFinputMaker::addStub(), angleConverter, MuonStub::bx, MuonStub::CSC_PHI_ETA, MuonStub::detId, MuonStub::etaHw, CSCCorrelatedLCTDigi::getBX(), OmtfAngleConverter::getGlobalEta(), OMTFinputMaker::getInputNumber(), CSCCorrelatedLCTDigi::getPattern(), AngleConverterBase::getProcessorPhi(), OMTFinputMaker::getProcessorPhiZero(), CSCCorrelatedLCTDigi::getQuality(), MuonStub::logicLayer, MuonStub::phiBHw, MuonStub::phiHw, MuonStub::qualityHw, and MuonStub::type.

88  {
89  unsigned int hwNumber = config->getLayerNumber(rawid);
90  if (config->getHwToLogicLayer().find(hwNumber) == config->getHwToLogicLayer().end())
91  return;
92 
93  unsigned int iLayer = config->getHwToLogicLayer().at(hwNumber);
94  unsigned int iInput = OMTFinputMaker::getInputNumber(config, rawid, iProcessor, procTyp);
95 
96  MuonStub stub;
99  OMTFinputMaker::getProcessorPhiZero(config, iProcessor), procTyp, CSCDetId(rawid), digi);
100  stub.etaHw = angleConverter->getGlobalEta(rawid, digi);
101  stub.phiBHw = digi.getPattern(); //TODO change to phiB when implemented
102  stub.qualityHw = digi.getQuality();
103 
104  stub.bx = digi.getBX() - config->cscLctCentralBx(); //TODO sholdn't it be getBX0()?
105  //stub.timing = digi.getTiming(); //TODO what about sub-bx timing, is is available?
106 
107  //stub.etaType = ?? TODO
108  stub.logicLayer = iLayer;
109  stub.detId = rawid;
110 
111  OMTFinputMaker::addStub(config, muonStubsInLayers, iLayer, iInput, stub);
115  //if(abs(iEta)>1.26/2.61*240) continue;
116  //if (abs(iEta) > 115) continue;
117 
118  //LogTrace("l1tOmtfEventPrint")<<" ADDING CSC hit, proc: "<<iProcessor<<" iPhi : " << iPhi <<" iEta: "<< iEta << std::endl;
119 }
uint16_t getPattern() const
return the Run-2 pattern ID
virtual int getGlobalEta(const DTChamberId dTChamberId, const L1MuDTChambThContainer *dtThDigis, int bxNum) const
int detId
Definition: MuonStub.h:57
Definition: config.py:1
Type type
Definition: MuonStub.h:38
int qualityHw
error of the eta measurement
Definition: MuonStub.h:47
int phiBHw
Definition: MuonStub.h:41
static int getProcessorPhiZero(const OMTFConfiguration *config, unsigned int iProcessor)
uint16_t getBX() const
return BX
const OmtfAngleConverter * angleConverter
int etaHw
Definition: MuonStub.h:45
virtual int getProcessorPhi(int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const
uint16_t getQuality() const
return the Quality
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
int bx
Definition: MuonStub.h:49
unsigned int logicLayer
Definition: MuonStub.h:53
static void addStub(const OMTFConfiguration *config, MuonStubPtrs2D &muonStubsInLayers, unsigned int iLayer, unsigned int iInput, MuonStub &stub)
int phiHw
Definition: MuonStub.h:40

Member Data Documentation

◆ angleConverter

const OmtfAngleConverter* CscDigiToStubsConverterOmtf::angleConverter = nullptr
private

Definition at line 70 of file OMTFinputMaker.h.

Referenced by addCSCstubs().

◆ config

const OMTFConfiguration* CscDigiToStubsConverterOmtf::config = nullptr
private

Definition at line 69 of file OMTFinputMaker.h.