CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | Friends
OMTFConfiguration Class Reference

#include <OMTFConfiguration.h>

Inheritance diagram for OMTFConfiguration:
ProcConfigurationBase

Classes

struct  PatternPt
 pattern pt range in Gev More...
 

Public Types

typedef std::vector< int > vector1D
 
typedef std::vector< int > vector1D
 
typedef std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
 
typedef std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
 
typedef std::vector< vector1Dvector2D
 
typedef std::vector< vector1Dvector2D
 
typedef std::vector< vector1D_pairvector2D_pair
 
typedef std::vector< vector1D_pairvector2D_pair
 
typedef std::vector< vector2Dvector3D
 
typedef std::vector< vector2Dvector3D
 
typedef std::vector< vector2D_pairvector3D_pair
 
typedef std::vector< vector2D_pairvector3D_pair
 
typedef std::vector< vector3Dvector4D
 
typedef std::vector< vector3Dvector4D
 
- Public Types inherited from ProcConfigurationBase
enum  StubEtaEncoding { StubEtaEncoding::bits = 0, StubEtaEncoding::valueP1Scale = 1 }
 

Public Member Functions

int calcGlobalPhi (int locPhi, int proc) const
 
bool cleanStubs () const
 
void configure (const L1TMuonOverlapParams *omtfParams)
 
virtual void configure (const L1TMuonOverlapParams *omtfParams)
 
void configureFromEdmParameterSet (const edm::ParameterSet &edmParameterSet) override
 
int etaToHwEta (double eta) const override
 
unsigned int fwVersion () const
 
unsigned int fwVersion () const
 
const std::vector< unsigned int > & getBarrelMax () const
 
const std::vector< unsigned int > & getBarrelMax () const
 
const std::vector< unsigned int > & getBarrelMin () const
 
const std::vector< unsigned int > & getBarrelMin () const
 
const std::set< int > & getBendingLayers () const
 
const std::set< int > & getBendingLayers () const
 
const vector3D_pairgetConnections () const
 
const vector3D_pairgetConnections () const
 
int getDtRefHitMinQuality () const
 
bool getDumpResultToXML () const
 
const std::vector< unsigned int > & getEndcap10DegMax () const
 
const std::vector< unsigned int > & getEndcap10DegMax () const
 
const std::vector< unsigned int > & getEndcap10DegMin () const
 
const std::vector< unsigned int > & getEndcap10DegMin () const
 
const std::vector< unsigned int > & getEndcap20DegMax () const
 
const std::vector< unsigned int > & getEndcap20DegMax () const
 
const std::vector< unsigned int > & getEndcap20DegMin () const
 
const std::vector< unsigned int > & getEndcap20DegMin () const
 
const std::string & getGhostBusterType () const
 
int getGoldenPatternResultFinalizeFunction () const
 
const std::map< int, int > & getHwToLogicLayer () const
 
const std::map< int, int > & getHwToLogicLayer () const
 
uint32_t getLayerNumber (uint32_t rawId) const
 
uint32_t getLayerNumber (uint32_t rawId) const
 
const std::map< int, int > & getLogicToHwLayer () const
 
const std::map< int, int > & getLogicToHwLayer () const
 
const std::map< int, int > & getLogicToLogic () const
 
const std::map< int, int > & getLogicToLogic () const
 
vector4DgetMeasurements4D ()
 
const vector4DgetMeasurements4D () const
 
vector4DgetMeasurements4D ()
 
const vector4DgetMeasurements4D () const
 
vector4DgetMeasurements4Dref ()
 
const vector4DgetMeasurements4Dref () const
 
vector4DgetMeasurements4Dref ()
 
const vector4DgetMeasurements4Dref () const
 
template<class GoldenPatternType >
vector2D getPatternGroups (const std::vector< std::unique_ptr< GoldenPatternType > > &goldenPats) const
 
unsigned int getPatternNum (double pt, int charge) const
 charge: -1 - negative, +1 - positive More...
 
PatternPt getPatternPtRange (unsigned int patNum) const
 
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer () const
 
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer () const
 
unsigned int getProcIndx (unsigned int iProcessor, l1t::tftype mtfType) const
 input phi should be in the hardware scale (nPhiBins units for 2pi), can be in range -nPhiBins ... nPhiBins, More...
 
int getProcScalePhi (unsigned int iProcessor, double phiRad) const
 
int getProcScalePhi (double phiRad, double procPhiZeroRad=0) const override
 
const L1TMuonOverlapParamsgetRawParams () const
 
const L1TMuonOverlapParamsgetRawParams () const
 
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs () const
 
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs () const
 
const std::vector< int > & getRefToLogicNumber () const
 
const std::vector< int > & getRefToLogicNumber () const
 
unsigned int getRegionNumberFromMap (unsigned int iInput, unsigned int iRefLayer, int iPhi) const
 
unsigned int getRegionNumberFromMap (unsigned int iInput, unsigned int iRefLayer, int iPhi) const
 
const std::vector< std::vector< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput () const
 
const std::vector< std::vector< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput () const
 
int getSorterType () const
 
int globalPhiStart (unsigned int iProcessor) const
 
int globalPhiStart (unsigned int iProcessor) const
 
virtual double hwEtaToEta (int hwEta) const
 center of eta bin More...
 
virtual double hwPhiToGlobalPhi (int phi) const
 
double hwPtToGev (int hwPt) const override
 uGMT pt scale conversion More...
 
double hwUPtToGev (int hwPt) const override
 
void initCounterMatrices ()
 
void initCounterMatrices ()
 
bool isBendingLayer (unsigned int iLayer) const override
 
bool isInRegionRange (int iPhiStart, unsigned int coneSize, int iPhi) const
 
bool isInRegionRange (int iPhiStart, unsigned int coneSize, int iPhi) const
 
bool isNoHitValueInPdf () const
 
int minCscStubR () const
 
int minCSCStubRME12 () const
 
float minPdfVal () const
 
float minPdfVal () const
 
unsigned int nGoldenPatterns () const
 
unsigned int nGoldenPatterns () const
 
unsigned int nHitsPerLayer () const
 
unsigned int nHitsPerLayer () const
 
unsigned int nInputs () const
 
unsigned int nInputs () const
 
unsigned int nLayers () const
 
unsigned int nLayers () const override
 
unsigned int nLogicRegions () const
 
unsigned int nLogicRegions () const
 
unsigned int nPdfAddrBits () const
 
unsigned int nPdfAddrBits () const
 
unsigned int nPdfBins () const
 
unsigned int nPdfValBits () const
 
unsigned int nPdfValBits () const
 
unsigned int nPhiBins () const
 
unsigned int nPhiBins () const override
 
unsigned int nPhiBits () const
 
unsigned int nPhiBits () const
 
unsigned int nProcessors () const
 
unsigned int nProcessors () const override
 
unsigned int nRefHits () const
 
unsigned int nRefHits () const
 
unsigned int nRefLayers () const
 
unsigned int nRefLayers () const
 
unsigned int nTestRefHits () const
 
unsigned int nTestRefHits () const
 
 OMTFConfiguration ()
 
 OMTFConfiguration ()
 
double omtfPhiUnit () const
 
unsigned int patternsVersion () const
 
unsigned int patternsVersion () const
 
int pdfMaxValue () const
 
virtual int phiToGlobalHwPhi (double phi) const
 
void printConfig () const
 
unsigned int processorCnt () const
 
double procHwPhiToGlobalPhi (int procHwPhi, int procHwPhi0) const
 
int procPhiToGmtPhi (int procPhi) const
 
int ptGevToHw (double ptGev) const override
 uGMT pt scale conversion: [0GeV, 0.5GeV) = 1 [0.5GeV, 1 Gev) = 2 More...
 
void setDtRefHitMinQuality (int dtRefHitMinQuality=2)
 
void setGhostBusterType (const std::string &ghostBusterType="")
 
void setGoldenPatternResultFinalizeFunction (int goldenPatternResultFinalizeFunction=0)
 
void setNoHitValueInPdf (bool noHitValueInPdf=false)
 
void setPatternPtRange (const std::vector< PatternPt > &patternPts)
 
void setSorterType (int sorterType=0)
 
bool useEndcapStubsRInExtr () const
 
bool usePhiBExtrapolationMB1 () const
 
bool usePhiBExtrapolationMB2 () const
 
bool useStubQualInExtr () const
 
- Public Member Functions inherited from ProcConfigurationBase
virtual int cscLctCentralBx () const
 
double dtPhiBUnitsRad () const
 
virtual unsigned int etaHwToEtaBin (int etaHw) const
 
virtual int foldPhi (int phi) const
 
virtual unsigned int getBxToProcess () const
 
virtual bool getFixCscGeometryOffset () const
 
virtual int getMinDtPhiBQuality () const
 
virtual int getMinDtPhiQuality () const
 
virtual bool getRpcDropAllClustersIfMoreThanMax () const
 
virtual unsigned int getRpcMaxClusterCnt () const
 
virtual unsigned int getRpcMaxClusterSize () const
 
StubEtaEncoding getStubEtaEncoding () const
 
 ProcConfigurationBase ()
 
virtual unsigned int ptGeVToPtBin (float ptGeV) const
 
virtual unsigned int ptHwToPtBin (int ptHw) const
 
virtual void setCscLctCentralBx (int lctCentralBx)
 
virtual bool setFixCscGeometryOffset (bool fixCscGeometryOffset)
 
virtual void setMinDtPhiBQuality (int minDtPhiBQuality=2)
 
virtual void setMinDtPhiQuality (int minDtPhiQuality=2)
 
virtual void setRpcDropAllClustersIfMoreThanMax (bool rpcDropAllClustersIfMoreThanMax=true)
 
virtual void setRpcMaxClusterCnt (unsigned int rpcMaxClusterCnt=2)
 
virtual void setRpcMaxClusterSize (unsigned int rpcMaxClusterSize=4)
 
void setStubEtaEncoding (StubEtaEncoding stubEtaEncoding)
 
virtual ~ProcConfigurationBase ()
 

Static Public Member Functions

static unsigned int eta2Bits (unsigned int eta)
 
static int etaBit2Code (unsigned int bit)
 
static unsigned int etaBits2HwEta (unsigned int eta)
 

Public Attributes

double etaUnit = 0.010875
 
double phiGmtUnit = 2. * M_PI / 576
 
double ptUnit = 0.5
 
double uptUnit = 1
 

Static Public Attributes

static const unsigned int patternsInGroup = 4
 

Private Attributes

std::vector< unsigned int > barrelMax
 
std::vector< unsigned int > barrelMin
 
std::set< int > bendingLayers
 
bool cleanStubs_ = false
 
vector3D_pair connections
 Map of connections. More...
 
int dtRefHitMinQuality = 2
 
bool dumpResultToXML = false
 
std::vector< unsigned int > endcap10DegMax
 
std::vector< unsigned int > endcap10DegMin
 
std::vector< unsigned int > endcap20DegMax
 
std::vector< unsigned int > endcap20DegMin
 
std::string ghostBusterType = ""
 
int goldenPatternResultFinalizeFunction = 0
 
std::map< int, int > hwToLogicLayer
 
std::map< int, int > logicToHwLayer
 
std::map< int, int > logicToLogic
 
vector4D measurements4D
 4D matrices used during creation of the connections tables. More...
 
vector4D measurements4Dref
 
int minCSCStubR_ = 0
 
int minCSCStubRME12_ = 0
 
bool noHitValueInPdf = false
 
std::vector< PatternPtpatternPts
 
unsigned int pdfBins = 0
 
int pdfMaxVal = 0
 
std::vector< std::vector< int > > processorPhiVsRefLayer
 
L1TMuonOverlapParams rawParams
 
std::vector< std::vector< RefHitDef > > refHitsDefs
 
std::vector< int > refToLogicNumber
 
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
 
int sorterType = 0
 
bool useEndcapStubsRInExtr_ = false
 
bool usePhiBExtrapolationFromMB1_ = false
 
bool usePhiBExtrapolationFromMB2_ = false
 
bool useStubQualInExtr_ = false
 

Friends

std::ostream & operator<< (std::ostream &out, const OMTFConfiguration &aConfig)
 
std::ostream & operator<< (std::ostream &out, const OMTFConfiguration &aConfig)
 

Detailed Description

Definition at line 44 of file OMTFConfiguration.h.

Member Typedef Documentation

◆ vector1D [1/2]

typedef std::vector<int> OMTFConfiguration::vector1D

Definition at line 50 of file OMTFConfiguration.h.

◆ vector1D [2/2]

typedef std::vector<int> OMTFConfiguration::vector1D

Definition at line 55 of file OMTFConfiguration.h.

◆ vector1D_pair [1/2]

typedef std::vector<std::pair<unsigned int, unsigned int> > OMTFConfiguration::vector1D_pair

Definition at line 46 of file OMTFConfiguration.h.

◆ vector1D_pair [2/2]

typedef std::vector<std::pair<unsigned int, unsigned int> > OMTFConfiguration::vector1D_pair

Definition at line 51 of file OMTFConfiguration.h.

◆ vector2D [1/2]

typedef std::vector<vector1D> OMTFConfiguration::vector2D

Definition at line 51 of file OMTFConfiguration.h.

◆ vector2D [2/2]

typedef std::vector<vector1D> OMTFConfiguration::vector2D

Definition at line 56 of file OMTFConfiguration.h.

◆ vector2D_pair [1/2]

Definition at line 47 of file OMTFConfiguration.h.

◆ vector2D_pair [2/2]

Definition at line 52 of file OMTFConfiguration.h.

◆ vector3D [1/2]

typedef std::vector<vector2D> OMTFConfiguration::vector3D

Definition at line 52 of file OMTFConfiguration.h.

◆ vector3D [2/2]

typedef std::vector<vector2D> OMTFConfiguration::vector3D

Definition at line 57 of file OMTFConfiguration.h.

◆ vector3D_pair [1/2]

Definition at line 48 of file OMTFConfiguration.h.

◆ vector3D_pair [2/2]

Definition at line 53 of file OMTFConfiguration.h.

◆ vector4D [1/2]

typedef std::vector<vector3D> OMTFConfiguration::vector4D

Definition at line 53 of file OMTFConfiguration.h.

◆ vector4D [2/2]

typedef std::vector<vector3D> OMTFConfiguration::vector4D

Definition at line 58 of file OMTFConfiguration.h.

Constructor & Destructor Documentation

◆ OMTFConfiguration() [1/2]

OMTFConfiguration::OMTFConfiguration ( )
inline

Definition at line 55 of file OMTFConfiguration.h.

55 { ; };

◆ OMTFConfiguration() [2/2]

OMTFConfiguration::OMTFConfiguration ( )
inline

Definition at line 60 of file OMTFConfiguration.h.

60 { ; };

Member Function Documentation

◆ calcGlobalPhi()

int OMTFConfiguration::calcGlobalPhi ( int  locPhi,
int  proc 
) const

Definition at line 402 of file OMTFConfiguration.cc.

References nProcessors(), and ValidateTausOnZEEFastSim_cff::proc.

Referenced by CandidateSimMuonMatcher::ghostBust(), CandidateSimMuonMatcher::match(), and CandidateSimMuonMatcher::matchSimple().

402  {
403  int globPhi = 0;
404  //60 degree sectors = 96 in int-scale
405  globPhi = (proc) * 96 * 6 / nProcessors() + locPhi;
406  // first processor starts at CMS phi = 15 degrees (24 in int)... Handle wrap-around with %. Add 576 to make sure the number is positive
407  globPhi = (globPhi + 600) % 576;
408  return globPhi;
409 }
unsigned int nProcessors() const

◆ cleanStubs()

bool OMTFConfiguration::cleanStubs ( ) const
inline

Definition at line 286 of file OMTFConfiguration.h.

References cleanStubs_.

286 { return cleanStubs_; }

◆ configure() [1/2]

void OMTFConfiguration::configure ( const L1TMuonOverlapParams omtfParams)

Set chamber sectors connections to logic processros.

Set connections tables

connections tables for each processor each logic cone Vector of all layers






Vector of all logic cones

Vector of all processors

Starting phis of each region Vector of all regions in one processor



Vector of all reflayers

Vector of all inputs

Vector of all processros

Symetrize connections. Use th same connections for all processors

Definition at line 49 of file OMTFConfiguration.cc.

References barrelMax, barrelMin, L1TMuonOverlapParams::LayerMapNode::bendingLayer, bendingLayers, L1TMuonOverlapParams::LayerMapNode::connectedToLayer, connections, filterCSVwithJSON::copy, endcap10DegMax, endcap10DegMin, endcap20DegMax, endcap20DegMin, L1TMuonOverlapParams::LayerMapNode::hwNumber, hwToLogicLayer, initCounterMatrices(), L1TMuonOverlapParams::LayerMapNode::logicNumber, L1TMuonOverlapParams::RefLayerMapNode::logicNumber, logicToHwLayer, logicToLogic, nInputs(), nLayers(), nLogicRegions(), nPhiBins(), nProcessors(), nRefHits(), nRefLayers(), fakeOmtfParams_cff::omtfParams, processorPhiVsRefLayer, rawParams, refHitsDefs, L1TMuonOverlapParams::RefLayerMapNode::refLayer, refToLogicNumber, and regionPhisVsRefLayerVsInput.

Referenced by OMTFPatternMaker::beginRun(), OMTFReconstruction::beginRun(), and OMTFPatternMaker::endJob().

49  {
51 
53  barrelMin.resize(nProcessors());
54  endcap10DegMin.resize(nProcessors());
55  endcap20DegMin.resize(nProcessors());
56 
57  barrelMax.resize(nProcessors());
58  endcap10DegMax.resize(nProcessors());
59  endcap20DegMax.resize(nProcessors());
60 
61  const std::vector<int> *connectedSectorsStartVec = omtfParams->connectedSectorsStart();
62  const std::vector<int> *connectedSectorsEndVec = omtfParams->connectedSectorsEnd();
63 
64  std::copy(connectedSectorsStartVec->begin(), connectedSectorsStartVec->begin() + 6, barrelMin.begin());
65  std::copy(connectedSectorsStartVec->begin() + 6, connectedSectorsStartVec->begin() + 12, endcap10DegMin.begin());
66  std::copy(connectedSectorsStartVec->begin() + 12, connectedSectorsStartVec->end(), endcap20DegMin.begin());
67 
68  std::copy(connectedSectorsEndVec->begin(), connectedSectorsEndVec->begin() + 6, barrelMax.begin());
69  std::copy(connectedSectorsEndVec->begin() + 6, connectedSectorsEndVec->begin() + 12, endcap10DegMax.begin());
70  std::copy(connectedSectorsEndVec->begin() + 12, connectedSectorsEndVec->end(), endcap20DegMax.begin());
71 
73  const std::vector<L1TMuonOverlapParams::LayerMapNode> *layerMap = omtfParams->layerMap();
74 
75  for (unsigned int iLayer = 0; iLayer < nLayers(); ++iLayer) {
76  L1TMuonOverlapParams::LayerMapNode aNode = layerMap->at(iLayer);
77  hwToLogicLayer[aNode.hwNumber] = aNode.logicNumber;
78  logicToHwLayer[aNode.logicNumber] = aNode.hwNumber;
80  if (aNode.bendingLayer)
81  bendingLayers.insert(aNode.logicNumber);
82  }
84  refToLogicNumber.resize(nRefLayers());
85 
86  const std::vector<L1TMuonOverlapParams::RefLayerMapNode> *refLayerMap = omtfParams->refLayerMap();
87  for (unsigned int iRefLayer = 0; iRefLayer < nRefLayers(); ++iRefLayer) {
88  L1TMuonOverlapParams::RefLayerMapNode aNode = refLayerMap->at(iRefLayer);
89  refToLogicNumber[aNode.refLayer] = aNode.logicNumber;
90  }
92  std::vector<int> vector1D(nRefLayers(), nPhiBins());
94 
97  vector1D_pair aLayer1D(nLayers());
99  vector2D_pair aLayer2D;
100  aLayer2D.assign(nLogicRegions(), aLayer1D);
102  connections.assign(nProcessors(), aLayer2D);
103 
106  std::vector<std::pair<int, int> > aRefHit1D(nLogicRegions(), std::pair<int, int>(9999, 9999));
108  std::vector<std::vector<std::pair<int, int> > > aRefHit2D;
109  aRefHit2D.assign(nRefLayers(), aRefHit1D);
111  regionPhisVsRefLayerVsInput.assign(nInputs(), aRefHit2D);
112 
113  //Vector of ref hit definitions
114  std::vector<RefHitDef> aRefHitsDefs(nRefHits());
116  refHitsDefs.assign(nProcessors(), aRefHitsDefs);
117 
118  const std::vector<int> *phiStartMap = omtfParams->globalPhiStartMap();
119  const std::vector<L1TMuonOverlapParams::RefHitNode> *refHitMap = omtfParams->refHitMap();
120  const std::vector<L1TMuonOverlapParams::LayerInputNode> *layerInputMap = omtfParams->layerInputMap();
121  unsigned int tmpIndex = 0;
122  for (unsigned int iProcessor = 0; iProcessor < nProcessors(); ++iProcessor) {
123  for (unsigned int iRefLayer = 0; iRefLayer < nRefLayers(); ++iRefLayer) {
124  int iPhiStart = phiStartMap->at(iRefLayer + iProcessor * nRefLayers());
125  processorPhiVsRefLayer[iProcessor][iRefLayer] = iPhiStart;
126  }
127  for (unsigned int iRefHit = 0; iRefHit < nRefHits(); ++iRefHit) {
128  int iPhiMin = refHitMap->at(iRefHit + iProcessor * nRefHits()).iPhiMin;
129  int iPhiMax = refHitMap->at(iRefHit + iProcessor * nRefHits()).iPhiMax;
130  unsigned int iInput = refHitMap->at(iRefHit + iProcessor * nRefHits()).iInput;
131  unsigned int iRegion = refHitMap->at(iRefHit + iProcessor * nRefHits()).iRegion;
132  unsigned int iRefLayer = refHitMap->at(iRefHit + iProcessor * nRefHits()).iRefLayer;
133  regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion] = std::pair<int, int>(iPhiMin, iPhiMax);
134  refHitsDefs[iProcessor][iRefHit] = RefHitDef(iInput, iPhiMin, iPhiMax, iRegion, iRefLayer);
135  }
136  for (unsigned int iLogicRegion = 0; iLogicRegion < nLogicRegions(); ++iLogicRegion) {
137  for (unsigned int iLayer = 0; iLayer < nLayers(); ++iLayer) {
138  tmpIndex = iLayer + iLogicRegion * nLayers() + iProcessor * nLogicRegions() * nLayers();
139  unsigned int iFirstInput = layerInputMap->at(tmpIndex).iFirstInput;
140  unsigned int nInputsInRegion = layerInputMap->at(tmpIndex).nInputs;
141  connections[iProcessor][iLogicRegion][iLayer] =
142  std::pair<unsigned int, unsigned int>(iFirstInput, nInputsInRegion);
144  if (iProcessor != 0)
145  connections[iProcessor][iLogicRegion][iLayer] = connections[0][iLogicRegion][iLayer];
146  }
147  }
148  }
149 
151 }
std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
unsigned int hwNumber
short layer number used within OMTF emulator
std::vector< unsigned int > endcap20DegMax
unsigned int logicNumber
logic numer of the layer
std::vector< unsigned int > endcap10DegMin
std::vector< unsigned int > barrelMax
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
std::map< int, int > logicToLogic
unsigned int nRefHits() const
unsigned int nPhiBins() const
omtfParams
OMTF ESProducer.
std::vector< unsigned int > barrelMin
std::vector< std::vector< int > > processorPhiVsRefLayer
vector3D_pair connections
Map of connections.
std::vector< int > vector1D
unsigned int nLayers() const
bool bendingLayer
Is this a bending layers?
std::vector< int > refToLogicNumber
unsigned int nRefLayers() const
std::map< int, int > hwToLogicLayer
unsigned int refLayer
Reference layer number.
std::map< int, int > logicToHwLayer
unsigned int nInputs() const
std::set< int > bendingLayers
L1TMuonOverlapParams rawParams
unsigned int logicNumber
Corresponding logical layer number.
unsigned int nProcessors() const
std::vector< unsigned int > endcap10DegMax
std::vector< unsigned int > endcap20DegMin
unsigned int nLogicRegions() const
std::vector< vector1D_pair > vector2D_pair
std::vector< std::vector< RefHitDef > > refHitsDefs

◆ configure() [2/2]

virtual void OMTFConfiguration::configure ( const L1TMuonOverlapParams omtfParams)
virtual

◆ configureFromEdmParameterSet()

void OMTFConfiguration::configureFromEdmParameterSet ( const edm::ParameterSet edmParameterSet)
overridevirtual

configuration from the edm::ParameterSet the parameters are set (i.e. overwritten) only if their exist in the edmParameterSet

Reimplemented from ProcConfigurationBase.

Definition at line 219 of file OMTFConfiguration.cc.

References cleanStubs_, ProcConfigurationBase::configureFromEdmParameterSet(), dtRefHitMinQuality, dumpResultToXML, edm::ParameterSet::exists(), getGhostBusterType(), edm::ParameterSet::getParameter(), minCSCStubR_, minCSCStubRME12_, ProcConfigurationBase::setFixCscGeometryOffset(), setGhostBusterType(), setGoldenPatternResultFinalizeFunction(), setNoHitValueInPdf(), sorterType, AlCaHLTBitMon_QueryRunRegistry::string, useEndcapStubsRInExtr_, usePhiBExtrapolationFromMB1_, usePhiBExtrapolationFromMB2_, and useStubQualInExtr_.

219  {
220  edm::LogVerbatim("OMTFReconstruction") << "OMTFConfiguration::configureFromEdmParameterSet: setting the params from "
221  "python config (overwrites the EventSetup (DB) params): "
222  << std::endl;
223 
225 
226  if (edmParameterSet.exists("goldenPatternResultFinalizeFunction")) {
227  int finalizeFunction = edmParameterSet.getParameter<int>("goldenPatternResultFinalizeFunction");
228  setGoldenPatternResultFinalizeFunction(finalizeFunction);
229  edm::LogVerbatim("OMTFReconstruction")
230  << "GoldenPatternResult::setFinalizeFunction: " << finalizeFunction << std::endl;
231  }
232 
233  if (edmParameterSet.exists("noHitValueInPdf")) {
234  setNoHitValueInPdf(edmParameterSet.getParameter<bool>("noHitValueInPdf"));
235  edm::LogVerbatim("OMTFReconstruction")
236  << "noHitValueInPdf: " << edmParameterSet.getParameter<bool>("noHitValueInPdf") << std::endl;
237  }
238 
239  if (edmParameterSet.exists("sorterType")) {
240  string sorterTypeStr = edmParameterSet.getParameter<std::string>("sorterType");
241  if (sorterTypeStr == "byNhitsByLLH")
242  sorterType = 0;
243  if (sorterTypeStr == "byLLH")
244  sorterType = 1;
245 
246  edm::LogVerbatim("OMTFReconstruction") << "sorterType: " << sorterType << " = "
247  << edmParameterSet.getParameter<std::string>("sorterType") << std::endl;
248  }
249 
250  if (edmParameterSet.exists("ghostBusterType")) {
251  setGhostBusterType(edmParameterSet.getParameter<std::string>("ghostBusterType"));
252 
253  edm::LogVerbatim("OMTFReconstruction") << "ghostBusterType: " << getGhostBusterType() << std::endl;
254  }
255 
256  setFixCscGeometryOffset(true); //for the OMTF by default is true, read from python if needed
257 
258  if (edmParameterSet.exists("usePhiBExtrapolationFromMB1")) {
259  usePhiBExtrapolationFromMB1_ = edmParameterSet.getParameter<bool>("usePhiBExtrapolationFromMB1");
260  edm::LogVerbatim("OMTFReconstruction")
261  << "usePhiBExtrapolationFromMB1: " << usePhiBExtrapolationFromMB1_ << std::endl;
262  }
263 
264  if (edmParameterSet.exists("usePhiBExtrapolationFromMB2")) {
265  usePhiBExtrapolationFromMB2_ = edmParameterSet.getParameter<bool>("usePhiBExtrapolationFromMB2");
266  edm::LogVerbatim("OMTFReconstruction")
267  << "usePhiBExtrapolationFromMB2: " << usePhiBExtrapolationFromMB2_ << std::endl;
268  }
269 
270  if (edmParameterSet.exists("useStubQualInExtr")) {
271  useStubQualInExtr_ = edmParameterSet.getParameter<bool>("useStubQualInExtr");
272  edm::LogVerbatim("OMTFReconstruction") << "useStubQualInExtr: " << useStubQualInExtr_ << std::endl;
273  }
274 
275  if (edmParameterSet.exists("useEndcapStubsRInExtr")) {
276  useEndcapStubsRInExtr_ = edmParameterSet.getParameter<bool>("useEndcapStubsRInExtr");
277  edm::LogVerbatim("OMTFReconstruction") << "useEndcapStubsRInExtr: " << useEndcapStubsRInExtr_ << std::endl;
278  }
279 
280  if (edmParameterSet.exists("dtRefHitMinQuality")) {
281  dtRefHitMinQuality = edmParameterSet.getParameter<int>("dtRefHitMinQuality");
282  edm::LogVerbatim("OMTFReconstruction") << "dtRefHitMinQuality: " << dtRefHitMinQuality << std::endl;
283  }
284 
285  if (edmParameterSet.exists("dumpResultToXML")) {
286  dumpResultToXML = edmParameterSet.getParameter<bool>("dumpResultToXML");
287  }
288 
289  if (edmParameterSet.exists("minCSCStubRME12")) {
290  minCSCStubRME12_ = edmParameterSet.getParameter<int>("minCSCStubRME12");
291  edm::LogVerbatim("OMTFReconstruction") << "minCSCStubRME12: " << minCSCStubRME12_ << std::endl;
292  }
293 
294  if (edmParameterSet.exists("minCSCStubR")) {
295  minCSCStubR_ = edmParameterSet.getParameter<int>("minCSCStubR");
296  edm::LogVerbatim("OMTFReconstruction") << "minCSCStubR: " << minCSCStubR_ << std::endl;
297  }
298 
299  if (edmParameterSet.exists("cleanStubs")) {
300  cleanStubs_ = edmParameterSet.getParameter<bool>("cleanStubs");
301  }
302 }
Log< level::Info, true > LogVerbatim
virtual bool setFixCscGeometryOffset(bool fixCscGeometryOffset)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void setNoHitValueInPdf(bool noHitValueInPdf=false)
virtual void configureFromEdmParameterSet(const edm::ParameterSet &edmParameterSet)
bool exists(std::string const &parameterName) const
checks if a parameter exists
void setGoldenPatternResultFinalizeFunction(int goldenPatternResultFinalizeFunction=0)
void setGhostBusterType(const std::string &ghostBusterType="")
const std::string & getGhostBusterType() const

◆ eta2Bits()

unsigned int OMTFConfiguration::eta2Bits ( unsigned int  eta)
static

Definition at line 411 of file OMTFConfiguration.cc.

References PVValHelper::eta.

Referenced by OmtfAngleConverter::getGlobalEta(), and OmtfAngleConverter::getGlobalEtaRpc().

411  {
412  if (eta == 73)
413  return 0b100000000;
414  else if (eta == 78)
415  return 0b010000000;
416  else if (eta == 85)
417  return 0b001000000;
418  else if (eta == 90)
419  return 0b000100000;
420  else if (eta == 94)
421  return 0b000010000;
422  else if (eta == 99)
423  return 0b000001000;
424  else if (eta == 103)
425  return 0b000000100;
426  else if (eta == 110)
427  return 0b000000010;
428  else if (eta == 75)
429  return 0b110000000;
430  else if (eta == 79)
431  return 0b011000000;
432  else if (eta == 92)
433  return 0b000110000;
434  else if (eta == 115)
435  return 0b000000001;
436  else if (eta == 121)
437  return 0b000000000;
438  else
439  return 0b111111111;
440  ;
441 }

◆ etaBit2Code()

int OMTFConfiguration::etaBit2Code ( unsigned int  bit)
static

Definition at line 477 of file OMTFConfiguration.cc.

References triggerObjects_cff::bit.

477  {
478  int code = 73;
479  switch (bit) {
480  case 0: {
481  code = 115;
482  break;
483  }
484  case 1: {
485  code = 110;
486  break;
487  }
488  case 2: {
489  code = 103;
490  break;
491  }
492  case 3: {
493  code = 99;
494  break;
495  }
496  case 4: {
497  code = 94;
498  break;
499  }
500  case 5: {
501  code = 90;
502  break;
503  }
504  case 6: {
505  code = 85;
506  break;
507  }
508  case 7: {
509  code = 78;
510  break;
511  }
512  case 8: {
513  code = 73;
514  break;
515  }
516  default: {
517  code = 95;
518  break;
519  }
520  }
521  return code;
522 }

◆ etaBits2HwEta()

unsigned int OMTFConfiguration::etaBits2HwEta ( unsigned int  eta)
static

Definition at line 443 of file OMTFConfiguration.cc.

Referenced by GhostBuster::select(), and GhostBusterPreferRefDt::select().

443  {
444  if (bits == 0b100000000)
445  return 73;
446  else if (bits == 0b010000000)
447  return 78;
448  else if (bits == 0b001000000)
449  return 85;
450  else if (bits == 0b000100000)
451  return 90;
452  else if (bits == 0b000010000)
453  return 94;
454  else if (bits == 0b000001000)
455  return 99;
456  else if (bits == 0b000000100)
457  return 103;
458  else if (bits == 0b000000010)
459  return 110;
460  else if (bits == 0b110000000)
461  return 75;
462  else if (bits == 0b011000000)
463  return 79;
464  else if (bits == 0b000110000)
465  return 92;
466  else if (bits == 0b000000001)
467  return 115;
468  else if (bits == 0b000000000)
469  return 121;
470  else if (bits == 0b111111111)
471  return 95;
472  else
473  return 0b111111111;
474  ;
475 }

◆ etaToHwEta()

int OMTFConfiguration::etaToHwEta ( double  eta) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 155 of file OMTFConfiguration.h.

References PVValHelper::eta, and etaUnit.

◆ fwVersion() [1/2]

unsigned int OMTFConfiguration::fwVersion ( ) const
inline

◆ fwVersion() [2/2]

unsigned int OMTFConfiguration::fwVersion ( ) const
inline

Definition at line 86 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::fwVersion(), and rawParams.

86 { return (rawParams.fwVersion() >> 16) & 0xFFFF; };
unsigned fwVersion() const
L1TMuonOverlapParams rawParams

◆ getBarrelMax() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getBarrelMax ( ) const
inline

Definition at line 108 of file OMTFConfiguration.h.

References barrelMax.

Referenced by OMTFinputMaker::acceptDigi().

108 { return barrelMax; }
std::vector< unsigned int > barrelMax

◆ getBarrelMax() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getBarrelMax ( ) const
inline

Definition at line 119 of file OMTFConfiguration.h.

References barrelMax.

119 { return barrelMax; }
std::vector< unsigned int > barrelMax

◆ getBarrelMin() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getBarrelMin ( ) const
inline

Definition at line 107 of file OMTFConfiguration.h.

References barrelMin.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

107 { return barrelMin; }
std::vector< unsigned int > barrelMin

◆ getBarrelMin() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getBarrelMin ( ) const
inline

Definition at line 118 of file OMTFConfiguration.h.

References barrelMin.

118 { return barrelMin; }
std::vector< unsigned int > barrelMin

◆ getBendingLayers() [1/2]

const std::set<int>& OMTFConfiguration::getBendingLayers ( ) const
inline

◆ getBendingLayers() [2/2]

const std::set<int>& OMTFConfiguration::getBendingLayers ( ) const
inline

Definition at line 115 of file OMTFConfiguration.h.

References bendingLayers.

115 { return bendingLayers; }
std::set< int > bendingLayers

◆ getConnections() [1/2]

const vector3D_pair& OMTFConfiguration::getConnections ( ) const
inline

Definition at line 120 of file OMTFConfiguration.h.

References connections.

Referenced by OMTFProcessor< GoldenPatternType >::restrictInput().

120 { return connections; };
vector3D_pair connections
Map of connections.

◆ getConnections() [2/2]

const vector3D_pair& OMTFConfiguration::getConnections ( ) const
inline

Definition at line 131 of file OMTFConfiguration.h.

References connections.

131 { return connections; };
vector3D_pair connections
Map of connections.

◆ getDtRefHitMinQuality()

int OMTFConfiguration::getDtRefHitMinQuality ( ) const
inline

Definition at line 269 of file OMTFConfiguration.h.

References dtRefHitMinQuality.

269 { return dtRefHitMinQuality; }

◆ getDumpResultToXML()

bool OMTFConfiguration::getDumpResultToXML ( ) const
inline

Definition at line 273 of file OMTFConfiguration.h.

References dumpResultToXML.

273 { return dumpResultToXML; }

◆ getEndcap10DegMax() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMax ( ) const
inline

Definition at line 110 of file OMTFConfiguration.h.

References endcap10DegMax.

Referenced by OMTFinputMaker::acceptDigi().

110 { return endcap10DegMax; }
std::vector< unsigned int > endcap10DegMax

◆ getEndcap10DegMax() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMax ( ) const
inline

Definition at line 121 of file OMTFConfiguration.h.

References endcap10DegMax.

121 { return endcap10DegMax; }
std::vector< unsigned int > endcap10DegMax

◆ getEndcap10DegMin() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMin ( ) const
inline

Definition at line 109 of file OMTFConfiguration.h.

References endcap10DegMin.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

109 { return endcap10DegMin; }
std::vector< unsigned int > endcap10DegMin

◆ getEndcap10DegMin() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMin ( ) const
inline

Definition at line 120 of file OMTFConfiguration.h.

References endcap10DegMin.

120 { return endcap10DegMin; }
std::vector< unsigned int > endcap10DegMin

◆ getEndcap20DegMax() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMax ( ) const
inline

Definition at line 112 of file OMTFConfiguration.h.

References endcap20DegMax.

Referenced by OMTFinputMaker::acceptDigi().

112 { return endcap20DegMax; }
std::vector< unsigned int > endcap20DegMax

◆ getEndcap20DegMax() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMax ( ) const
inline

Definition at line 123 of file OMTFConfiguration.h.

References endcap20DegMax.

123 { return endcap20DegMax; }
std::vector< unsigned int > endcap20DegMax

◆ getEndcap20DegMin() [1/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMin ( ) const
inline

Definition at line 111 of file OMTFConfiguration.h.

References endcap20DegMin.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

111 { return endcap20DegMin; }
std::vector< unsigned int > endcap20DegMin

◆ getEndcap20DegMin() [2/2]

const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMin ( ) const
inline

Definition at line 122 of file OMTFConfiguration.h.

References endcap20DegMin.

122 { return endcap20DegMin; }
std::vector< unsigned int > endcap20DegMin

◆ getGhostBusterType()

const std::string& OMTFConfiguration::getGhostBusterType ( ) const
inline

Definition at line 261 of file OMTFConfiguration.h.

References ghostBusterType.

Referenced by configureFromEdmParameterSet(), and GhostBusterPreferRefDt::select().

261 { return ghostBusterType; }
std::string ghostBusterType

◆ getGoldenPatternResultFinalizeFunction()

int OMTFConfiguration::getGoldenPatternResultFinalizeFunction ( ) const
inline

◆ getHwToLogicLayer() [1/2]

const std::map<int, int>& OMTFConfiguration::getHwToLogicLayer ( ) const
inline

Definition at line 101 of file OMTFConfiguration.h.

References hwToLogicLayer.

Referenced by OMTFinputMaker::processCSC(), OMTFinputMaker::processDT(), and OMTFinputMaker::processRPC().

101 { return hwToLogicLayer; }
std::map< int, int > hwToLogicLayer

◆ getHwToLogicLayer() [2/2]

const std::map<int, int>& OMTFConfiguration::getHwToLogicLayer ( ) const
inline

Definition at line 112 of file OMTFConfiguration.h.

References hwToLogicLayer.

112 { return hwToLogicLayer; }
std::map< int, int > hwToLogicLayer

◆ getLayerNumber() [1/2]

uint32_t OMTFConfiguration::getLayerNumber ( uint32_t  rawId) const

Return layer number encoding subsystem, and station number in a simple formula: aLayer+100*detId.subdetId() where aLayer is a layer number counting from vertex

Definition at line 204 of file OMTFConfiguration.cc.

References gather_cfg::cout, MuonSubdetId::CSC, omtf::DataWord64::csc, hcalRecHitTable_cff::detId, MuonSubdetId::DT, dt, PixelPluginsPhase0_cfi::isBarrel, RPCDetId::layer(), DetId::Muon, nano_mu_digi_cff::rawId, RPCDetId::region(), MuonSubdetId::RPC, and RPCDetId::station().

Referenced by OMTFinputMaker::processCSC(), OMTFinputMaker::processDT(), and OMTFinputMaker::processRPC().

204  {
205  uint32_t aLayer = 0;
206 
207  DetId detId(rawId);
208  if (detId.det() != DetId::Muon) {
209  std::cout << "PROBLEM: hit in unknown Det, detID: " << detId.det() << std::endl;
210  return rawId;
211  }
212 
213  switch (detId.subdetId()) {
214  case MuonSubdetId::RPC: {
215  RPCDetId aId(rawId);
216  bool isBarrel = (aId.region() == 0);
217  if (isBarrel)
218  aLayer = aId.station() <= 2 ? 2 * (aId.station() - 1) + aId.layer() : aId.station() + 2;
219  else
220  aLayer = aId.station();
221  aLayer += 10 * (!isBarrel);
222  break;
223  }
224  case MuonSubdetId::DT: {
226  aLayer = dt.station();
227  break;
228  }
229  case MuonSubdetId::CSC: {
230  CSCDetId csc(rawId);
231  aLayer = csc.station();
232  if (csc.ring() == 2 && csc.station() == 1)
233  aLayer = 1811; //1811 = 2011 - 200, as we want to get 2011 for this chamber.
234  if (csc.station() == 4)
235  aLayer = 4;
236  break;
237  }
238  }
239 
240  int hwNumber = aLayer + 100 * detId.subdetId();
241 
242  return hwNumber;
243 }
float dt
Definition: AMPTWrapper.h:136
Definition: L1Track.h:19
Definition: DetId.h:17
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ getLayerNumber() [2/2]

uint32_t OMTFConfiguration::getLayerNumber ( uint32_t  rawId) const

Return layer number encoding subsystem, and station number in a simple formula: aLayer+100*detId.subdetId() where aLayer is a layer number counting from vertex

◆ getLogicToHwLayer() [1/2]

const std::map<int, int>& OMTFConfiguration::getLogicToHwLayer ( ) const
inline

Definition at line 102 of file OMTFConfiguration.h.

References logicToHwLayer.

102 { return logicToHwLayer; }
std::map< int, int > logicToHwLayer

◆ getLogicToHwLayer() [2/2]

const std::map<int, int>& OMTFConfiguration::getLogicToHwLayer ( ) const
inline

Definition at line 113 of file OMTFConfiguration.h.

References logicToHwLayer.

113 { return logicToHwLayer; }
std::map< int, int > logicToHwLayer

◆ getLogicToLogic() [1/2]

const std::map<int, int>& OMTFConfiguration::getLogicToLogic ( ) const
inline

◆ getLogicToLogic() [2/2]

const std::map<int, int>& OMTFConfiguration::getLogicToLogic ( ) const
inline

Definition at line 114 of file OMTFConfiguration.h.

References logicToLogic.

114 { return logicToLogic; }
std::map< int, int > logicToLogic

◆ getMeasurements4D() [1/4]

vector4D& OMTFConfiguration::getMeasurements4D ( )
inline

Definition at line 122 of file OMTFConfiguration.h.

References measurements4D.

Referenced by OMTFPatternMaker::endJob(), OMTFConfigMaker::fillInputRange(), and XMLConfigWriter::writeConnectionsData().

122 { return measurements4D; }
vector4D measurements4D
4D matrices used during creation of the connections tables.

◆ getMeasurements4D() [2/4]

const vector4D& OMTFConfiguration::getMeasurements4D ( ) const
inline

Definition at line 125 of file OMTFConfiguration.h.

References measurements4D.

125 { return measurements4D; }
vector4D measurements4D
4D matrices used during creation of the connections tables.

◆ getMeasurements4D() [3/4]

vector4D& OMTFConfiguration::getMeasurements4D ( )
inline

Definition at line 133 of file OMTFConfiguration.h.

References measurements4D.

133 { return measurements4D; }
vector4D measurements4D
4D matrices used during creation of the connections tables.

◆ getMeasurements4D() [4/4]

const vector4D& OMTFConfiguration::getMeasurements4D ( ) const
inline

Definition at line 136 of file OMTFConfiguration.h.

References measurements4D.

136 { return measurements4D; }
vector4D measurements4D
4D matrices used during creation of the connections tables.

◆ getMeasurements4Dref() [1/4]

vector4D& OMTFConfiguration::getMeasurements4Dref ( )
inline

◆ getMeasurements4Dref() [2/4]

const vector4D& OMTFConfiguration::getMeasurements4Dref ( ) const
inline

Definition at line 126 of file OMTFConfiguration.h.

References measurements4Dref.

126 { return measurements4Dref; }

◆ getMeasurements4Dref() [3/4]

vector4D& OMTFConfiguration::getMeasurements4Dref ( )
inline

Definition at line 134 of file OMTFConfiguration.h.

References measurements4Dref.

134 { return measurements4Dref; }

◆ getMeasurements4Dref() [4/4]

const vector4D& OMTFConfiguration::getMeasurements4Dref ( ) const
inline

Definition at line 137 of file OMTFConfiguration.h.

References measurements4Dref.

137 { return measurements4Dref; }

◆ getPatternGroups()

template<class GoldenPatternType >
vector2D OMTFConfiguration::getPatternGroups ( const std::vector< std::unique_ptr< GoldenPatternType > > &  goldenPats) const
inline

Definition at line 218 of file OMTFConfiguration.h.

References watchdog::group, and findQualityFiles::size.

Referenced by PatternGenerator::groupPatterns(), PatternGenerator::upadatePdfs(), and XMLConfigWriter::writeGPs().

218  {
219  //unsigned int mergedCnt = 4;
220  vector2D mergedPatterns;
221  for (unsigned int iPat = 0; iPat < goldenPats.size(); iPat++) {
222  unsigned int group = goldenPats.at(iPat)->key().theGroup;
223 
224  if (mergedPatterns.size() == group) {
225  mergedPatterns.push_back(vector1D());
226  }
227 
228  if (group < mergedPatterns.size()) {
229  //theIndexInGroup starts from 1, as in xml
230  if (mergedPatterns[group].size() == (goldenPats.at(iPat)->key().theIndexInGroup - 1))
231  mergedPatterns[group].push_back(iPat);
232  else
233  return mergedPatterns; //TODO should throw error
234  } else
235  return mergedPatterns; //TODO should throw error
236  }
237  return mergedPatterns;
238  }
size
Write out results.
std::vector< vector1D > vector2D
std::vector< int > vector1D

◆ getPatternNum()

unsigned int OMTFConfiguration::getPatternNum ( double  pt,
int  charge 
) const

charge: -1 - negative, +1 - positive

Definition at line 571 of file OMTFConfiguration.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, OMTFConfiguration::PatternPt::charge, getPatternPtRange(), patternPts, DiDispStaMuonMonitor_cfi::pt, OMTFConfiguration::PatternPt::ptFrom, and OMTFConfiguration::PatternPt::ptTo.

Referenced by PatternOptimizerBase::observeEventEnd(), PatternGenerator::updateStat(), and PatternGenerator::updateStatUsingMatcher2().

571  {
572  //in LUT the charge is in convention 0 is -, 1 is + (so it is not the uGMT convention!!!)
573  //so we change the charge here
574  //if(charge == -1)
575  //charge = 0; //TODO but in the xml (and in GPs) the charge is +1 and -1, so it is important from where the patternPts is loaded FIXME!!!
576  for (unsigned int iPat = 0; iPat < patternPts.size(); iPat++) {
577  //std::cout<<"iPAt "<<iPat<<" ptFrom "<<getPatternPtRange(iPat).ptFrom<<" "<<getPatternPtRange(iPat).ptTo<<" "<<rawParams.chargeLUT()->data(iPat)<<std::endl;
578  PatternPt patternPt = getPatternPtRange(iPat);
579  if (pt >= patternPt.ptFrom && pt < patternPt.ptTo && charge == patternPt.charge)
580  return iPat;
581  }
582  return 0; //FIXME in this way if pt < 4GeV, the pattern = 0 is return , regardless of sign!
583 }
std::vector< PatternPt > patternPts
PatternPt getPatternPtRange(unsigned int patNum) const

◆ getPatternPtRange()

OMTFConfiguration::PatternPt OMTFConfiguration::getPatternPtRange ( unsigned int  patNum) const

Definition at line 561 of file OMTFConfiguration.cc.

References Exception, and patternPts.

Referenced by getPatternNum(), PatternGenerator::modifyClassProb(), PatternOptimizerBase::printPatterns(), and PatternOptimizerBase::savePatternsInRoot().

561  {
562  if (patternPts.empty())
563  throw cms::Exception("OMTFConfiguration::getPatternPtRange: patternPts vector not initialized");
564 
565  if (patNum > patternPts.size()) {
566  throw cms::Exception("OMTFConfiguration::getPatternPtRange: patNum > patternPts.size()");
567  }
568  return patternPts[patNum];
569 }
std::vector< PatternPt > patternPts

◆ getProcessorPhiVsRefLayer() [1/2]

const std::vector<std::vector<int> >& OMTFConfiguration::getProcessorPhiVsRefLayer ( ) const
inline

Definition at line 114 of file OMTFConfiguration.h.

References processorPhiVsRefLayer.

Referenced by XMLConfigWriter::writeConnectionsData().

114 { return processorPhiVsRefLayer; }
std::vector< std::vector< int > > processorPhiVsRefLayer

◆ getProcessorPhiVsRefLayer() [2/2]

const std::vector<std::vector<int> >& OMTFConfiguration::getProcessorPhiVsRefLayer ( ) const
inline

Definition at line 125 of file OMTFConfiguration.h.

References processorPhiVsRefLayer.

125 { return processorPhiVsRefLayer; }
std::vector< std::vector< int > > processorPhiVsRefLayer

◆ getProcIndx()

unsigned int OMTFConfiguration::getProcIndx ( unsigned int  iProcessor,
l1t::tftype  mtfType 
) const
inline

input phi should be in the hardware scale (nPhiBins units for 2pi), can be in range -nPhiBins ... nPhiBins,

Continuous processor number [0...12], to be used in as array index,

Definition at line 192 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nProcessors(), l1t::omtf_neg, and rawParams.

Referenced by EmulationObserverBase::observeProcesorEmulation(), EventCapture::observeProcesorEmulation(), CandidateSimMuonMatcher::observeProcesorEmulation(), and PatternGenerator::updateStatUsingMatcher2().

192  {
193  return ((mtfType - l1t::tftype::omtf_neg) * rawParams.nProcessors() + iProcessor);
194  };
L1TMuonOverlapParams rawParams

◆ getProcScalePhi() [1/2]

int OMTFConfiguration::getProcScalePhi ( unsigned int  iProcessor,
double  phiRad 
) const

iProcessor - 0...5 phiRad [-pi,pi] return phi inside the processor

Definition at line 526 of file OMTFConfiguration.cc.

References M_PI, and nPhiBins().

526  {
527  double phi15deg =
528  M_PI / 3. * (iProcessor) + M_PI / 12.; // "0" is 15degree moved cyclically to each processor, note [0,2pi]
529 
530  const double phiUnit = 2 * M_PI / nPhiBins(); //rad/unit
531 
532  // adjust [0,2pi] and [-pi,pi] to get deltaPhi difference properly
533  switch (iProcessor + 1) {
534  case 1:
535  break;
536  case 6: {
537  phi15deg -= 2 * M_PI;
538  break;
539  }
540  default: {
541  if (phiRad < 0)
542  phiRad += 2 * M_PI;
543  break;
544  }
545  }
546 
547  // local angle in CSC halfStrip usnits
548  return lround((phiRad - phi15deg) / phiUnit); //FIXME lround or floor ???
549 }
unsigned int nPhiBins() const
#define M_PI

◆ getProcScalePhi() [2/2]

int OMTFConfiguration::getProcScalePhi ( double  phiRad,
double  procPhiZeroRad = 0 
) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 175 of file OMTFConfiguration.h.

175  {
176  return 0; // TODO replace getProcScalePhi(unsigned int iProcessor, double phiRad) with this function
177  }

◆ getRawParams() [1/2]

const L1TMuonOverlapParams* OMTFConfiguration::getRawParams ( ) const
inline

Definition at line 84 of file OMTFConfiguration.h.

References rawParams.

Referenced by OMTFPatternMaker::endJob().

84 { return &rawParams; };
L1TMuonOverlapParams rawParams

◆ getRawParams() [2/2]

const L1TMuonOverlapParams* OMTFConfiguration::getRawParams ( ) const
inline

Definition at line 89 of file OMTFConfiguration.h.

References rawParams.

89 { return &rawParams; };
L1TMuonOverlapParams rawParams

◆ getRefHitsDefs() [1/2]

const std::vector<std::vector<RefHitDef> >& OMTFConfiguration::getRefHitsDefs ( ) const
inline

Definition at line 118 of file OMTFConfiguration.h.

References refHitsDefs.

Referenced by OMTFProcessor< GoldenPatternType >::fillCounts(), OMTFinput::getRefHits(), and OMTFProcessor< GoldenPatternType >::processInput().

118 { return refHitsDefs; }
std::vector< std::vector< RefHitDef > > refHitsDefs

◆ getRefHitsDefs() [2/2]

const std::vector<std::vector<RefHitDef> >& OMTFConfiguration::getRefHitsDefs ( ) const
inline

Definition at line 129 of file OMTFConfiguration.h.

References refHitsDefs.

129 { return refHitsDefs; }
std::vector< std::vector< RefHitDef > > refHitsDefs

◆ getRefToLogicNumber() [1/2]

const std::vector<int>& OMTFConfiguration::getRefToLogicNumber ( ) const
inline

◆ getRefToLogicNumber() [2/2]

const std::vector<int>& OMTFConfiguration::getRefToLogicNumber ( ) const
inline

Definition at line 116 of file OMTFConfiguration.h.

References refToLogicNumber.

116 { return refToLogicNumber; }
std::vector< int > refToLogicNumber

◆ getRegionNumberFromMap() [1/2]

unsigned int OMTFConfiguration::getRegionNumberFromMap ( unsigned int  iInput,
unsigned int  iRefLayer,
int  iPhi 
) const

Find logic region number using first input number and then local phi value. The input and phi ranges are taken from DB.

Definition at line 188 of file OMTFConfiguration.cc.

References dqmdumpme::first, nLogicRegions(), regionPhisVsRefLayerVsInput, and edm::second().

Referenced by OMTFConfigMaker::fillPhiMaps(), and OMTFConfigMaker::makeConnetionsMap().

188  {
189  for (unsigned int iRegion = 0; iRegion < nLogicRegions(); ++iRegion) {
190  if (iPhi >= regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion].first &&
191  iPhi <= regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion].second)
192  return iRegion;
193  }
194 
195  return 99;
196 }
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
U second(std::pair< T, U > const &p)
unsigned int nLogicRegions() const

◆ getRegionNumberFromMap() [2/2]

unsigned int OMTFConfiguration::getRegionNumberFromMap ( unsigned int  iInput,
unsigned int  iRefLayer,
int  iPhi 
) const

Find logic region number using first input number and then local phi value. The input and phi ranges are taken from DB.

◆ getRegionPhisVsRefLayerVsInput() [1/2]

const std::vector<std::vector<std::vector<std::pair<int, int> > > >& OMTFConfiguration::getRegionPhisVsRefLayerVsInput ( ) const
inline

Definition at line 115 of file OMTFConfiguration.h.

References regionPhisVsRefLayerVsInput.

115  {
117  }
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput

◆ getRegionPhisVsRefLayerVsInput() [2/2]

const std::vector<std::vector<std::vector<std::pair<int, int> > > >& OMTFConfiguration::getRegionPhisVsRefLayerVsInput ( ) const
inline

Definition at line 126 of file OMTFConfiguration.h.

References regionPhisVsRefLayerVsInput.

126  {
128  }
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput

◆ getSorterType()

int OMTFConfiguration::getSorterType ( ) const
inline

Definition at line 257 of file OMTFConfiguration.h.

References sorterType.

257 { return sorterType; }

◆ globalPhiStart() [1/2]

int OMTFConfiguration::globalPhiStart ( unsigned int  iProcessor) const

Return global phi for beggining of given processor Uses minim phi over all reference layers.

Definition at line 199 of file OMTFConfiguration.cc.

References mps_fire::end, and processorPhiVsRefLayer.

Referenced by XMLConfigWriter::writeConnectionsData().

199  {
200  return *std::min_element(processorPhiVsRefLayer[iProcessor].begin(), processorPhiVsRefLayer[iProcessor].end());
201 }
std::vector< std::vector< int > > processorPhiVsRefLayer

◆ globalPhiStart() [2/2]

int OMTFConfiguration::globalPhiStart ( unsigned int  iProcessor) const

Return global phi for beggining of given processor Uses minim phi over all reference layers.

◆ hwEtaToEta()

virtual double OMTFConfiguration::hwEtaToEta ( int  hwEta) const
inlinevirtual

center of eta bin

Definition at line 153 of file OMTFConfiguration.h.

References etaUnit, and l1trig_cff::hwEta.

Referenced by DataROOTDumper2::observeEventEnd(), and PatternGenerator::updateStat().

153 { return (hwEta * etaUnit); }

◆ hwPhiToGlobalPhi()

virtual double OMTFConfiguration::hwPhiToGlobalPhi ( int  phi) const
inlinevirtual

Definition at line 168 of file OMTFConfiguration.h.

References phi, and phiGmtUnit.

168 { return phi * phiGmtUnit; }

◆ hwPtToGev()

double OMTFConfiguration::hwPtToGev ( int  hwPt) const
inlineoverridevirtual

uGMT pt scale conversion

Implements ProcConfigurationBase.

Definition at line 141 of file OMTFConfiguration.h.

References l1trig_cff::hwPt, and ptUnit.

Referenced by EventCapture::observeEventEnd(), and DataROOTDumper2::observeEventEnd().

141 { return (hwPt - 1.) * ptUnit; }

◆ hwUPtToGev()

double OMTFConfiguration::hwUPtToGev ( int  hwPt) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 144 of file OMTFConfiguration.h.

References l1trig_cff::hwPt, and uptUnit.

Referenced by DataROOTDumper2::observeEventEnd().

144 { return (hwPt - 1.) * uptUnit; }

◆ initCounterMatrices() [1/2]

void OMTFConfiguration::initCounterMatrices ( )

Vector of all inputs

Vector of all layers

Vector of all logic cones

Vector of all processors

Definition at line 31 of file OMTFConfiguration.cc.

References measurements4D, measurements4Dref, nInputs(), nLayers(), nLogicRegions(), and nProcessors().

Referenced by configure().

31  {
33  std::vector<int> aLayer1D(nInputs(), 0);
34 
36  vector2D aLayer2D;
37  aLayer2D.assign(nLayers(), aLayer1D);
38 
40  vector3D aLayer3D;
41  aLayer3D.assign(nLogicRegions(), aLayer2D);
42 
44  measurements4D.assign(nProcessors(), aLayer3D);
45  measurements4Dref.assign(nProcessors(), aLayer3D);
46 }
vector4D measurements4D
4D matrices used during creation of the connections tables.
std::vector< vector1D > vector2D
unsigned int nLayers() const
std::vector< vector2D > vector3D
unsigned int nInputs() const
unsigned int nProcessors() const
unsigned int nLogicRegions() const

◆ initCounterMatrices() [2/2]

void OMTFConfiguration::initCounterMatrices ( )

◆ isBendingLayer()

bool OMTFConfiguration::isBendingLayer ( unsigned int  iLayer) const
inlineoverridevirtual

◆ isInRegionRange() [1/2]

bool OMTFConfiguration::isInRegionRange ( int  iPhiStart,
unsigned int  coneSize,
int  iPhi 
) const

Check if given referecne hit is in phi range for some logic cone. Care is needed arounf +Pi and +2Pi points

Definition at line 171 of file OMTFConfiguration.cc.

References HLT_2024v12_cff::coneSize, createfilelist::int, and nPhiBins().

171  {
172  if (iPhi < 0)
173  iPhi += nPhiBins();
174  if (iPhiStart < 0)
175  iPhiStart += nPhiBins();
176 
177  if (iPhiStart + (int)coneSize < (int)nPhiBins()) {
178  return iPhiStart <= iPhi && iPhiStart + (int)coneSize > iPhi;
179  } else if (iPhi > (int)nPhiBins() / 2) {
180  return iPhiStart <= iPhi;
181  } else if (iPhi < (int)nPhiBins() / 2) {
182  return iPhi < iPhiStart + (int)coneSize - (int)nPhiBins();
183  }
184  return false;
185 }
unsigned int nPhiBins() const

◆ isInRegionRange() [2/2]

bool OMTFConfiguration::isInRegionRange ( int  iPhiStart,
unsigned int  coneSize,
int  iPhi 
) const

Check if given referecne hit is in phi range for some logic cone. Care is needed arounf +Pi and +2Pi points

◆ isNoHitValueInPdf()

bool OMTFConfiguration::isNoHitValueInPdf ( ) const
inline

Definition at line 253 of file OMTFConfiguration.h.

References noHitValueInPdf.

Referenced by GoldenPatternBase::process1Layer1RefLayer().

253 { return noHitValueInPdf; }

◆ minCscStubR()

int OMTFConfiguration::minCscStubR ( ) const
inline

Definition at line 284 of file OMTFConfiguration.h.

References minCSCStubR_.

284 { return minCSCStubR_; }

◆ minCSCStubRME12()

int OMTFConfiguration::minCSCStubRME12 ( ) const
inline

Definition at line 282 of file OMTFConfiguration.h.

References minCSCStubRME12_.

282 { return minCSCStubRME12_; }

◆ minPdfVal() [1/2]

float OMTFConfiguration::minPdfVal ( ) const
inline

Definition at line 86 of file OMTFConfiguration.h.

Referenced by PatternGenerator::modifyClassProb(), GoldenPattern::normalise(), and PatternGenerator::upadatePdfs().

86 { return 0.001; };

◆ minPdfVal() [2/2]

float OMTFConfiguration::minPdfVal ( ) const
inline

Definition at line 91 of file OMTFConfiguration.h.

91 { return 0.001; };

◆ nGoldenPatterns() [1/2]

unsigned int OMTFConfiguration::nGoldenPatterns ( ) const
inline

◆ nGoldenPatterns() [2/2]

unsigned int OMTFConfiguration::nGoldenPatterns ( ) const
inline

Definition at line 110 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nGoldenPatterns(), and rawParams.

110 { return rawParams.nGoldenPatterns(); };
L1TMuonOverlapParams rawParams

◆ nHitsPerLayer() [1/2]

unsigned int OMTFConfiguration::nHitsPerLayer ( ) const
inline

Definition at line 88 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nHitsPerLayer(), and rawParams.

Referenced by operator<<().

88 { return rawParams.nHitsPerLayer(); };
L1TMuonOverlapParams rawParams

◆ nHitsPerLayer() [2/2]

unsigned int OMTFConfiguration::nHitsPerLayer ( ) const
inline

Definition at line 93 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nHitsPerLayer(), and rawParams.

93 { return rawParams.nHitsPerLayer(); };
L1TMuonOverlapParams rawParams

◆ nInputs() [1/2]

unsigned int OMTFConfiguration::nInputs ( ) const
inline

◆ nInputs() [2/2]

unsigned int OMTFConfiguration::nInputs ( ) const
inline

Definition at line 109 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nInputs(), and rawParams.

109 { return rawParams.nInputs(); };
L1TMuonOverlapParams rawParams

◆ nLayers() [1/2]

unsigned int OMTFConfiguration::nLayers ( ) const
inlinevirtual

◆ nLayers() [2/2]

unsigned int OMTFConfiguration::nLayers ( ) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 92 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nLayers(), and rawParams.

92 { return rawParams.nLayers(); };
L1TMuonOverlapParams rawParams

◆ nLogicRegions() [1/2]

unsigned int OMTFConfiguration::nLogicRegions ( ) const
inline

◆ nLogicRegions() [2/2]

unsigned int OMTFConfiguration::nLogicRegions ( ) const
inline

Definition at line 108 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nLogicRegions(), and rawParams.

108 { return rawParams.nLogicRegions(); };
L1TMuonOverlapParams rawParams

◆ nPdfAddrBits() [1/2]

unsigned int OMTFConfiguration::nPdfAddrBits ( ) const
inline

◆ nPdfAddrBits() [2/2]

unsigned int OMTFConfiguration::nPdfAddrBits ( ) const
inline

Definition at line 96 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPdfAddrBits(), and rawParams.

96 { return rawParams.nPdfAddrBits(); };
int nPdfAddrBits() const
Access to specific general settings.
L1TMuonOverlapParams rawParams

◆ nPdfBins()

unsigned int OMTFConfiguration::nPdfBins ( ) const
inline

Definition at line 97 of file OMTFConfiguration.h.

References pdfBins.

Referenced by PatternGenerator::modifyClassProb(), and PatternOptimizerBase::savePatternsInRoot().

97 { return pdfBins; };

◆ nPdfValBits() [1/2]

unsigned int OMTFConfiguration::nPdfValBits ( ) const
inline

Definition at line 92 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPdfValBits(), and rawParams.

Referenced by GoldenPattern::normalise(), and operator<<().

92 { return rawParams.nPdfValBits(); };
L1TMuonOverlapParams rawParams

◆ nPdfValBits() [2/2]

unsigned int OMTFConfiguration::nPdfValBits ( ) const
inline

Definition at line 98 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPdfValBits(), and rawParams.

98 { return rawParams.nPdfValBits(); };
L1TMuonOverlapParams rawParams

◆ nPhiBins() [1/2]

unsigned int OMTFConfiguration::nPhiBins ( ) const
inlinevirtual

◆ nPhiBins() [2/2]

unsigned int OMTFConfiguration::nPhiBins ( ) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 100 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPhiBins(), and rawParams.

100 { return rawParams.nPhiBins(); };
L1TMuonOverlapParams rawParams

◆ nPhiBits() [1/2]

unsigned int OMTFConfiguration::nPhiBits ( ) const
inline

Definition at line 90 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPhiBits(), and rawParams.

Referenced by OMTFinput::shiftMyPhi(), and XMLConfigWriter::writeConnectionsData().

90 { return rawParams.nPhiBits(); };
L1TMuonOverlapParams rawParams

◆ nPhiBits() [2/2]

unsigned int OMTFConfiguration::nPhiBits ( ) const
inline

Definition at line 95 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nPhiBits(), and rawParams.

95 { return rawParams.nPhiBits(); };
L1TMuonOverlapParams rawParams

◆ nProcessors() [1/2]

unsigned int OMTFConfiguration::nProcessors ( ) const
inlinevirtual

◆ nProcessors() [2/2]

unsigned int OMTFConfiguration::nProcessors ( ) const
inlineoverridevirtual

Implements ProcConfigurationBase.

Definition at line 105 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nProcessors(), and rawParams.

105 { return rawParams.nProcessors(); };
L1TMuonOverlapParams rawParams

◆ nRefHits() [1/2]

unsigned int OMTFConfiguration::nRefHits ( ) const
inline

◆ nRefHits() [2/2]

unsigned int OMTFConfiguration::nRefHits ( ) const
inline

Definition at line 102 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nRefHits(), and rawParams.

102 { return rawParams.nRefHits(); };
L1TMuonOverlapParams rawParams

◆ nRefLayers() [1/2]

unsigned int OMTFConfiguration::nRefLayers ( ) const
inline

◆ nRefLayers() [2/2]

unsigned int OMTFConfiguration::nRefLayers ( ) const
inline

Definition at line 94 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nRefLayers(), and rawParams.

94 { return rawParams.nRefLayers(); };
L1TMuonOverlapParams rawParams

◆ nTestRefHits() [1/2]

unsigned int OMTFConfiguration::nTestRefHits ( ) const
inline

◆ nTestRefHits() [2/2]

unsigned int OMTFConfiguration::nTestRefHits ( ) const
inline

Definition at line 103 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nTestRefHits(), and rawParams.

103 { return rawParams.nTestRefHits(); };
L1TMuonOverlapParams rawParams

◆ omtfPhiUnit()

double OMTFConfiguration::omtfPhiUnit ( ) const
inline

Definition at line 101 of file OMTFConfiguration.h.

References M_PI, and nPhiBins().

Referenced by OMTFProcessor< GoldenPatternType >::extrapolateDtPhiBFloatPoint().

101 { return 2 * M_PI / nPhiBins(); }
unsigned int nPhiBins() const
#define M_PI

◆ patternsVersion() [1/2]

unsigned int OMTFConfiguration::patternsVersion ( ) const
inline

Definition at line 82 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::fwVersion(), and rawParams.

Referenced by XMLConfigWriter::initialiseXMLDocument(), and XMLEventWriter::XMLEventWriter().

82 { return rawParams.fwVersion() & 0xFFFF; };
unsigned fwVersion() const
L1TMuonOverlapParams rawParams

◆ patternsVersion() [2/2]

unsigned int OMTFConfiguration::patternsVersion ( ) const
inline

Definition at line 87 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::fwVersion(), and rawParams.

87 { return rawParams.fwVersion() & 0xFFFF; };
unsigned fwVersion() const
L1TMuonOverlapParams rawParams

◆ pdfMaxValue()

int OMTFConfiguration::pdfMaxValue ( ) const
inline

◆ phiToGlobalHwPhi()

virtual int OMTFConfiguration::phiToGlobalHwPhi ( double  phi) const
inlinevirtual

Definition at line 165 of file OMTFConfiguration.h.

References phi, and phiGmtUnit.

165 { return std::floor(phi / phiGmtUnit); }

◆ printConfig()

void OMTFConfiguration::printConfig ( ) const

Definition at line 585 of file OMTFConfiguration.cc.

References cleanStubs_, ProcConfigurationBase::cscLctCentralBx(), dtRefHitMinQuality, ProcConfigurationBase::getMinDtPhiBQuality(), ProcConfigurationBase::getMinDtPhiQuality(), ProcConfigurationBase::getRpcDropAllClustersIfMoreThanMax(), ProcConfigurationBase::getRpcMaxClusterCnt(), ProcConfigurationBase::getRpcMaxClusterSize(), ghostBusterType, goldenPatternResultFinalizeFunction, noHitValueInPdf, sorterType, useEndcapStubsRInExtr_, usePhiBExtrapolationFromMB1_, usePhiBExtrapolationFromMB2_, and useStubQualInExtr_.

585  {
586  edm::LogVerbatim("OMTFReconstruction") << "OMTFConfiguration: " << std::endl;
587 
588  edm::LogVerbatim("OMTFReconstruction") << "rpcMaxClusterSize " << getRpcMaxClusterSize() << std::endl;
589  edm::LogVerbatim("OMTFReconstruction") << "rpcMaxClusterCnt " << getRpcMaxClusterCnt() << std::endl;
590  edm::LogVerbatim("OMTFReconstruction") << "rpcDropAllClustersIfMoreThanMax " << getRpcDropAllClustersIfMoreThanMax()
591  << std::endl;
592  edm::LogVerbatim("OMTFReconstruction") << "minDtPhiQuality " << getMinDtPhiQuality() << std::endl;
593  edm::LogVerbatim("OMTFReconstruction") << "minDtPhiBQuality " << getMinDtPhiBQuality() << std::endl;
594 
595  edm::LogVerbatim("OMTFReconstruction") << "cscLctCentralBx_ " << cscLctCentralBx() << std::endl;
596 
597  edm::LogVerbatim("OMTFReconstruction") << "goldenPatternResultFinalizeFunction "
598  << goldenPatternResultFinalizeFunction << std::endl;
599  edm::LogVerbatim("OMTFReconstruction") << "noHitValueInPdf " << noHitValueInPdf << std::endl;
600  edm::LogVerbatim("OMTFReconstruction") << "sorterType " << sorterType << std::endl;
601  edm::LogVerbatim("OMTFReconstruction") << "ghostBusterType " << ghostBusterType << std::endl;
602 
603  edm::LogVerbatim("OMTFReconstruction") << "usePhiBExtrapolationFromMB1 " << usePhiBExtrapolationFromMB1_ << std::endl;
604  edm::LogVerbatim("OMTFReconstruction") << "usePhiBExtrapolationFromMB2 " << usePhiBExtrapolationFromMB2_ << std::endl;
605  edm::LogVerbatim("OMTFReconstruction") << "useStubQualInExtr " << useStubQualInExtr_ << std::endl;
606  edm::LogVerbatim("OMTFReconstruction") << "useEndcapStubsRInExtr " << useEndcapStubsRInExtr_ << std::endl;
607  edm::LogVerbatim("OMTFReconstruction") << "dtRefHitMinQuality " << dtRefHitMinQuality << std::endl;
608 
609  edm::LogVerbatim("OMTFReconstruction") << "cleanStubs " << cleanStubs_ << std::endl;
610 }
Log< level::Info, true > LogVerbatim
virtual int getMinDtPhiBQuality() const
virtual unsigned int getRpcMaxClusterSize() const
virtual unsigned int getRpcMaxClusterCnt() const
std::string ghostBusterType
virtual int cscLctCentralBx() const
virtual int getMinDtPhiQuality() const
virtual bool getRpcDropAllClustersIfMoreThanMax() const

◆ processorCnt()

unsigned int OMTFConfiguration::processorCnt ( ) const
inline

Definition at line 107 of file OMTFConfiguration.h.

References L1TMuonOverlapParams::nProcessors(), and rawParams.

Referenced by GoldenPatternBase::setConfig().

107 { return 2 * rawParams.nProcessors(); };
L1TMuonOverlapParams rawParams

◆ procHwPhiToGlobalPhi()

double OMTFConfiguration::procHwPhiToGlobalPhi ( int  procHwPhi,
int  procHwPhi0 
) const

Definition at line 553 of file OMTFConfiguration.cc.

References ProcConfigurationBase::foldPhi(), M_PI, and nPhiBins().

Referenced by StubsSimHitsMatcher::match(), and EventCapture::observeEventEnd().

553  {
554  int globalHwPhi = foldPhi(procHwPhi + procHwPhi0);
555  const double phiUnit = 2 * M_PI / nPhiBins(); //rad/unit
556  return globalHwPhi * phiUnit;
557 }
unsigned int nPhiBins() const
#define M_PI
virtual int foldPhi(int phi) const

◆ procPhiToGmtPhi()

int OMTFConfiguration::procPhiToGmtPhi ( int  procPhi) const
inline

conversion factor from OMTF to uGMT scale is 5400/576 i.e. phiValue/=9.375;

Definition at line 181 of file OMTFConfiguration.h.

Referenced by GhostBuster::select(), and GhostBusterPreferRefDt::select().

181  {
183  return floor(procPhi * 437. / (1 << 12)); // ie. use as in hw: 9.3729977
184  //cannot be (procPhi * 437) >> 12, because this floor is needed
185  }

◆ ptGevToHw()

int OMTFConfiguration::ptGevToHw ( double  ptGev) const
inlineoverridevirtual

uGMT pt scale conversion: [0GeV, 0.5GeV) = 1 [0.5GeV, 1 Gev) = 2

Implements ProcConfigurationBase.

Definition at line 147 of file OMTFConfiguration.h.

References ptUnit.

Referenced by PatternGenerator::reCalibratePt().

147 { return (ptGev / ptUnit + 1); }

◆ setDtRefHitMinQuality()

void OMTFConfiguration::setDtRefHitMinQuality ( int  dtRefHitMinQuality = 2)
inline

Definition at line 271 of file OMTFConfiguration.h.

References dtRefHitMinQuality.

◆ setGhostBusterType()

void OMTFConfiguration::setGhostBusterType ( const std::string &  ghostBusterType = "")
inline

Definition at line 263 of file OMTFConfiguration.h.

References ghostBusterType.

Referenced by configureFromEdmParameterSet().

263 { this->ghostBusterType = ghostBusterType; }
std::string ghostBusterType

◆ setGoldenPatternResultFinalizeFunction()

void OMTFConfiguration::setGoldenPatternResultFinalizeFunction ( int  goldenPatternResultFinalizeFunction = 0)
inline

◆ setNoHitValueInPdf()

void OMTFConfiguration::setNoHitValueInPdf ( bool  noHitValueInPdf = false)
inline

Definition at line 255 of file OMTFConfiguration.h.

References noHitValueInPdf.

Referenced by configureFromEdmParameterSet().

◆ setPatternPtRange()

void OMTFConfiguration::setPatternPtRange ( const std::vector< PatternPt > &  patternPts)
inline

◆ setSorterType()

void OMTFConfiguration::setSorterType ( int  sorterType = 0)
inline

Definition at line 259 of file OMTFConfiguration.h.

References sorterType.

◆ useEndcapStubsRInExtr()

bool OMTFConfiguration::useEndcapStubsRInExtr ( ) const
inline

Definition at line 277 of file OMTFConfiguration.h.

References useEndcapStubsRInExtr_.

277 { return useEndcapStubsRInExtr_; }

◆ usePhiBExtrapolationMB1()

bool OMTFConfiguration::usePhiBExtrapolationMB1 ( ) const
inline

◆ usePhiBExtrapolationMB2()

bool OMTFConfiguration::usePhiBExtrapolationMB2 ( ) const
inline

◆ useStubQualInExtr()

bool OMTFConfiguration::useStubQualInExtr ( ) const
inline

Definition at line 279 of file OMTFConfiguration.h.

References useStubQualInExtr_.

279 { return useStubQualInExtr_; }

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  out,
const OMTFConfiguration aConfig 
)
friend

Definition at line 154 of file OMTFConfiguration.cc.

154  {
155  out << "nLayers(): " << aConfig.nLayers() << " nHitsPerLayer(): " << aConfig.nHitsPerLayer()
156  << " nRefLayers(): " << aConfig.nRefLayers() << " nPdfAddrBits: " << aConfig.nPdfAddrBits()
157  << " nPdfValBits: " << aConfig.nPdfValBits() << std::endl;
158 
159  for (unsigned int iProcessor = 0; iProcessor < aConfig.nProcessors(); ++iProcessor) {
160  out << "Processor: " << iProcessor;
161  for (unsigned int iRefLayer = 0; iRefLayer < aConfig.nRefLayers(); ++iRefLayer) {
162  out << " " << aConfig.processorPhiVsRefLayer[iProcessor][iRefLayer];
163  }
164  out << std::endl;
165  }
166 
167  return out;
168 }
unsigned int nPdfValBits() const
unsigned int nHitsPerLayer() const
unsigned int nPdfAddrBits() const
std::vector< std::vector< int > > processorPhiVsRefLayer
unsigned int nLayers() const
unsigned int nRefLayers() const
unsigned int nProcessors() const

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  out,
const OMTFConfiguration aConfig 
)
friend

Definition at line 154 of file OMTFConfiguration.cc.

154  {
155  out << "nLayers(): " << aConfig.nLayers() << " nHitsPerLayer(): " << aConfig.nHitsPerLayer()
156  << " nRefLayers(): " << aConfig.nRefLayers() << " nPdfAddrBits: " << aConfig.nPdfAddrBits()
157  << " nPdfValBits: " << aConfig.nPdfValBits() << std::endl;
158 
159  for (unsigned int iProcessor = 0; iProcessor < aConfig.nProcessors(); ++iProcessor) {
160  out << "Processor: " << iProcessor;
161  for (unsigned int iRefLayer = 0; iRefLayer < aConfig.nRefLayers(); ++iRefLayer) {
162  out << " " << aConfig.processorPhiVsRefLayer[iProcessor][iRefLayer];
163  }
164  out << std::endl;
165  }
166 
167  return out;
168 }
unsigned int nPdfValBits() const
unsigned int nHitsPerLayer() const
unsigned int nPdfAddrBits() const
std::vector< std::vector< int > > processorPhiVsRefLayer
unsigned int nLayers() const
unsigned int nRefLayers() const
unsigned int nProcessors() const

Member Data Documentation

◆ barrelMax

std::vector< unsigned int > OMTFConfiguration::barrelMax
private

Definition at line 143 of file OMTFConfiguration.h.

Referenced by configure(), and getBarrelMax().

◆ barrelMin

std::vector< unsigned int > OMTFConfiguration::barrelMin
private

Starting and final sectors connected to processors. Index: processor number

Definition at line 142 of file OMTFConfiguration.h.

Referenced by configure(), and getBarrelMin().

◆ bendingLayers

std::set< int > OMTFConfiguration::bendingLayers
private

Definition at line 136 of file OMTFConfiguration.h.

Referenced by configure(), and getBendingLayers().

◆ cleanStubs_

bool OMTFConfiguration::cleanStubs_ = false
private

Definition at line 368 of file OMTFConfiguration.h.

Referenced by cleanStubs(), configureFromEdmParameterSet(), and printConfig().

◆ connections

vector3D_pair OMTFConfiguration::connections
private

Map of connections.

Definition at line 171 of file OMTFConfiguration.h.

Referenced by configure(), and getConnections().

◆ dtRefHitMinQuality

int OMTFConfiguration::dtRefHitMinQuality = 2
private

◆ dumpResultToXML

bool OMTFConfiguration::dumpResultToXML = false
private

Definition at line 366 of file OMTFConfiguration.h.

Referenced by configureFromEdmParameterSet(), and getDumpResultToXML().

◆ endcap10DegMax

std::vector< unsigned int > OMTFConfiguration::endcap10DegMax
private

Definition at line 145 of file OMTFConfiguration.h.

Referenced by configure(), and getEndcap10DegMax().

◆ endcap10DegMin

std::vector< unsigned int > OMTFConfiguration::endcap10DegMin
private

Definition at line 144 of file OMTFConfiguration.h.

Referenced by configure(), and getEndcap10DegMin().

◆ endcap20DegMax

std::vector< unsigned int > OMTFConfiguration::endcap20DegMax
private

Definition at line 147 of file OMTFConfiguration.h.

Referenced by configure(), and getEndcap20DegMax().

◆ endcap20DegMin

std::vector< unsigned int > OMTFConfiguration::endcap20DegMin
private

Definition at line 146 of file OMTFConfiguration.h.

Referenced by configure(), and getEndcap20DegMin().

◆ etaUnit

double OMTFConfiguration::etaUnit = 0.010875

Definition at line 151 of file OMTFConfiguration.h.

Referenced by etaToHwEta(), and hwEtaToEta().

◆ ghostBusterType

std::string OMTFConfiguration::ghostBusterType = ""
private

Definition at line 347 of file OMTFConfiguration.h.

Referenced by getGhostBusterType(), printConfig(), and setGhostBusterType().

◆ goldenPatternResultFinalizeFunction

int OMTFConfiguration::goldenPatternResultFinalizeFunction = 0
private

◆ hwToLogicLayer

std::map< int, int > OMTFConfiguration::hwToLogicLayer
private

Definition at line 133 of file OMTFConfiguration.h.

Referenced by configure(), and getHwToLogicLayer().

◆ logicToHwLayer

std::map< int, int > OMTFConfiguration::logicToHwLayer
private

Definition at line 134 of file OMTFConfiguration.h.

Referenced by configure(), and getLogicToHwLayer().

◆ logicToLogic

std::map< int, int > OMTFConfiguration::logicToLogic
private

Definition at line 135 of file OMTFConfiguration.h.

Referenced by configure(), and getLogicToLogic().

◆ measurements4D

vector4D OMTFConfiguration::measurements4D
private

4D matrices used during creation of the connections tables.

Definition at line 174 of file OMTFConfiguration.h.

Referenced by getMeasurements4D(), and initCounterMatrices().

◆ measurements4Dref

vector4D OMTFConfiguration::measurements4Dref
private

Definition at line 175 of file OMTFConfiguration.h.

Referenced by getMeasurements4Dref(), and initCounterMatrices().

◆ minCSCStubR_

int OMTFConfiguration::minCSCStubR_ = 0
private

Definition at line 364 of file OMTFConfiguration.h.

Referenced by configureFromEdmParameterSet(), and minCscStubR().

◆ minCSCStubRME12_

int OMTFConfiguration::minCSCStubRME12_ = 0
private

Definition at line 363 of file OMTFConfiguration.h.

Referenced by configureFromEdmParameterSet(), and minCSCStubRME12().

◆ noHitValueInPdf

bool OMTFConfiguration::noHitValueInPdf = false
private

Definition at line 343 of file OMTFConfiguration.h.

Referenced by isNoHitValueInPdf(), printConfig(), and setNoHitValueInPdf().

◆ patternPts

std::vector<PatternPt> OMTFConfiguration::patternPts
private

Definition at line 335 of file OMTFConfiguration.h.

Referenced by getPatternNum(), getPatternPtRange(), and setPatternPtRange().

◆ patternsInGroup

const unsigned int OMTFConfiguration::patternsInGroup = 4
static

Definition at line 214 of file OMTFConfiguration.h.

◆ pdfBins

unsigned int OMTFConfiguration::pdfBins = 0
private

Definition at line 338 of file OMTFConfiguration.h.

Referenced by nPdfBins().

◆ pdfMaxVal

int OMTFConfiguration::pdfMaxVal = 0
private

Definition at line 337 of file OMTFConfiguration.h.

Referenced by pdfMaxValue().

◆ phiGmtUnit

double OMTFConfiguration::phiGmtUnit = 2. * M_PI / 576

Definition at line 163 of file OMTFConfiguration.h.

Referenced by hwPhiToGlobalPhi(), and phiToGlobalHwPhi().

◆ processorPhiVsRefLayer

std::vector< std::vector< int > > OMTFConfiguration::processorPhiVsRefLayer
private

Starting iPhi for each processor and each referecne layer Global phi scale is used First index: processor number Second index: referecne layer number

Definition at line 153 of file OMTFConfiguration.h.

Referenced by configure(), getProcessorPhiVsRefLayer(), globalPhiStart(), and operator<<().

◆ ptUnit

double OMTFConfiguration::ptUnit = 0.5

Definition at line 139 of file OMTFConfiguration.h.

Referenced by hwPtToGev(), and ptGevToHw().

◆ rawParams

L1TMuonOverlapParams OMTFConfiguration::rawParams
private

◆ refHitsDefs

std::vector< std::vector< RefHitDef > > OMTFConfiguration::refHitsDefs
private

Vector with definitions of reference hits Vector has fixed size of nRefHits Order of elements defines priority order First index: processor number (0-5) Second index: ref hit number (0-127)

Definition at line 168 of file OMTFConfiguration.h.

Referenced by configure(), and getRefHitsDefs().

◆ refToLogicNumber

std::vector< int > OMTFConfiguration::refToLogicNumber
private

Definition at line 137 of file OMTFConfiguration.h.

Referenced by configure(), and getRefToLogicNumber().

◆ regionPhisVsRefLayerVsInput

std::vector< std::vector< std::vector< std::pair< int, int > > > > OMTFConfiguration::regionPhisVsRefLayerVsInput
private

Begin and end local phi for each logis region First index: input number Second index: reference layer number Third index: region pair.first: starting phi of region (inclusive) pair.second: ending phi of region (inclusive)

Definition at line 161 of file OMTFConfiguration.h.

Referenced by configure(), getRegionNumberFromMap(), and getRegionPhisVsRefLayerVsInput().

◆ sorterType

int OMTFConfiguration::sorterType = 0
private

◆ uptUnit

double OMTFConfiguration::uptUnit = 1

Definition at line 143 of file OMTFConfiguration.h.

Referenced by hwUPtToGev().

◆ useEndcapStubsRInExtr_

bool OMTFConfiguration::useEndcapStubsRInExtr_ = false
private

◆ usePhiBExtrapolationFromMB1_

bool OMTFConfiguration::usePhiBExtrapolationFromMB1_ = false
private

◆ usePhiBExtrapolationFromMB2_

bool OMTFConfiguration::usePhiBExtrapolationFromMB2_ = false
private

◆ useStubQualInExtr_

bool OMTFConfiguration::useStubQualInExtr_ = false
private