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, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) 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 130 of file OMTFinputMaker.cc.

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

130  {
131  if (procType == l1t::tftype::omtf_pos && (csc.endcap() == 2 || csc.ring() == 1 || csc.station() == 4))
132  return false;
133  if (procType == l1t::tftype::omtf_neg && (csc.endcap() == 1 || csc.ring() == 1 || csc.station() == 4))
134  return false;
135 
136  if (procType == l1t::tftype::emtf_pos && (csc.endcap() == 2 || (csc.station() == 1 && csc.ring() == 3)))
137  return false;
138  if (procType == l1t::tftype::emtf_neg && (csc.endcap() == 1 || (csc.station() == 1 && csc.ring() == 3)))
139  return false;
140 
141  unsigned int aSector = csc.chamber();
142  unsigned int aMin = config->getEndcap10DegMin()[iProcessor];
143  unsigned int aMax = config->getEndcap10DegMax()[iProcessor];
144 
145  if ((procType == l1t::tftype::emtf_pos || procType == l1t::tftype::emtf_neg) && csc.station() > 1 &&
146  csc.ring() == 1) {
147  aMin = config->getEndcap20DegMin()[iProcessor];
148  aMax = config->getEndcap20DegMax()[iProcessor];
149  }
150 
151  if (aMax > aMin && aSector >= aMin && aSector <= aMax)
152  return true;
153  if (aMax < aMin && (aSector >= aMin || aSector <= aMax))
154  return true;
155 
156  return false;
157 }
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 83 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, MuonStub::r, alignCSCRings::r, and MuonStub::type.

87  {
88  unsigned int hwNumber = config->getLayerNumber(rawid);
89  if (config->getHwToLogicLayer().find(hwNumber) == config->getHwToLogicLayer().end())
90  return;
91 
92  unsigned int iLayer = config->getHwToLogicLayer().at(hwNumber);
93  unsigned int iInput = OMTFinputMaker::getInputNumber(config, rawid, iProcessor, procTyp);
94 
95  float r = 0;
96  MuonStub stub;
99  OMTFinputMaker::getProcessorPhiZero(config, iProcessor), procTyp, CSCDetId(rawid), digi, iInput);
100  stub.etaHw = angleConverter->getGlobalEta(rawid, digi, r);
101  stub.r = round(r);
102  stub.phiBHw = digi.getPattern(); //TODO change to phiB when implemented
103  stub.qualityHw = digi.getQuality();
104 
105  stub.bx = digi.getBX() - config->cscLctCentralBx(); //TODO sholdn't it be getBX0()?
106  //stub.timing = digi.getTiming(); //TODO what about sub-bx timing, is is available?
107 
108  //stub.etaType = ?? TODO
109  stub.logicLayer = iLayer;
110  stub.detId = rawid;
111 
112  //TODO this cut is not yet implemented in the FW,
113  //but it is worth to apply it at least for the pattern generation and NN training
114  if (iLayer == 9) {
115  if (stub.r >= config->minCSCStubRME12())
116  OMTFinputMaker::addStub(config, muonStubsInLayers, iLayer, iInput, stub);
117  } else if (stub.r >= config->minCscStubR()) {
118  OMTFinputMaker::addStub(config, muonStubsInLayers, iLayer, iInput, stub);
119  }
120 
124  //if(abs(iEta)>1.26/2.61*240) continue;
125  //if (abs(iEta) > 115) continue;
126 
127  //LogTrace("l1tOmtfEventPrint")<<" ADDING CSC hit, proc: "<<iProcessor<<" iPhi : " << iPhi <<" iEta: "<< iEta << std::endl;
128 }
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:59
Definition: config.py:1
Type type
Definition: MuonStub.h:38
int qualityHw
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 r
Definition: MuonStub.h:46
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.