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 | 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
< CSCCorrelatedLCTDigiCollection
cscDigis
 
edm::EDGetTokenT
< CSCCorrelatedLCTDigiCollection
inputTokenCsc
 
bool mergePhiAndTheta = true
 

Detailed Description

Definition at line 50 of file OMTFinputMaker.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file OMTFinputMaker.h.

55  : CscDigiToStubsConverter(config, inputTokenCsc), config(config), angleConverter(angleConverter){};
const OMTFConfiguration * config
CscDigiToStubsConverter(const ProcConfigurationBase *config, edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCsc)
const OmtfAngleConverter * angleConverter
CscDigiToStubsConverterOmtf::~CscDigiToStubsConverterOmtf ( )
inlineoverride

Definition at line 57 of file OMTFinputMaker.h.

57 {};

Member Function Documentation

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 CSCDetId::chamber(), config, l1t::emtf_neg, l1t::emtf_pos, CSCDetId::endcap(), OMTFConfiguration::getEndcap10DegMax(), OMTFConfiguration::getEndcap10DegMin(), OMTFConfiguration::getEndcap20DegMax(), OMTFConfiguration::getEndcap20DegMin(), l1t::omtf_neg, l1t::omtf_pos, CSCDetId::ring(), and CSCDetId::station().

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 }
const OMTFConfiguration * config
const std::vector< unsigned int > & getEndcap10DegMin() const
const std::vector< unsigned int > & getEndcap20DegMax() const
const std::vector< unsigned int > & getEndcap10DegMax() const
const std::vector< unsigned int > & getEndcap20DegMin() const
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, config, MuonStub::CSC_PHI_ETA, CSCDetId, ProcConfigurationBase::cscLctCentralBx(), MuonStub::detId, MuonStub::etaHw, CSCCorrelatedLCTDigi::getBX(), OmtfAngleConverter::getGlobalEta(), OMTFConfiguration::getHwToLogicLayer(), OMTFinputMaker::getInputNumber(), OMTFConfiguration::getLayerNumber(), 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 getBX() const
return BX
const OMTFConfiguration * config
uint16_t getPattern() const
return the Run-2 pattern ID
int detId
Definition: MuonStub.h:56
Type type
Definition: MuonStub.h:37
int qualityHw
error of the eta measurement
Definition: MuonStub.h:46
int phiBHw
Definition: MuonStub.h:40
static int getProcessorPhiZero(const OMTFConfiguration *config, unsigned int iProcessor)
const std::map< int, int > & getHwToLogicLayer() const
const OmtfAngleConverter * angleConverter
int etaHw
Definition: MuonStub.h:44
virtual int getProcessorPhi(int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
uint16_t getQuality() const
return the Quality
int bx
Definition: MuonStub.h:48
virtual int cscLctCentralBx() const
unsigned int logicLayer
Definition: MuonStub.h:52
static void addStub(const OMTFConfiguration *config, MuonStubPtrs2D &muonStubsInLayers, unsigned int iLayer, unsigned int iInput, MuonStub &stub)
int phiHw
Definition: MuonStub.h:39
virtual int getGlobalEta(const DTChamberId dTChamberId, const L1MuDTChambThContainer *dtThDigis, int bxNum) const

Member Data Documentation

const OmtfAngleConverter* CscDigiToStubsConverterOmtf::angleConverter = nullptr
private

Definition at line 70 of file OMTFinputMaker.h.

Referenced by addCSCstubs().

const OMTFConfiguration* CscDigiToStubsConverterOmtf::config = nullptr
private