CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ProcConfigurationBase Class Referenceabstract

#include <ProcConfigurationBase.h>

Inheritance diagram for ProcConfigurationBase:
OMTFConfiguration

Public Types

enum  StubEtaEncoding { StubEtaEncoding::bits = 0, StubEtaEncoding::valueP1Scale = 1 }
 

Public Member Functions

virtual void configureFromEdmParameterSet (const edm::ParameterSet &edmParameterSet)
 
virtual int cscLctCentralBx () const
 
double dtPhiBUnitsRad () const
 
virtual unsigned int etaHwToEtaBin (int etaHw) const
 
virtual int etaToHwEta (double eta) const =0
 
virtual int foldPhi (int phi) const
 
virtual unsigned int getBxToProcess () const
 
virtual bool getFixCscGeometryOffset () const
 
virtual int getMinDtPhiBQuality () const
 
virtual int getMinDtPhiQuality () const
 
virtual int getProcScalePhi (double phiRad, double procPhiZeroRad=0) const =0
 
virtual bool getRpcDropAllClustersIfMoreThanMax () const
 
virtual unsigned int getRpcMaxClusterCnt () const
 
virtual unsigned int getRpcMaxClusterSize () const
 
StubEtaEncoding getStubEtaEncoding () const
 
virtual double hwPtToGev (int hwPt) const =0
 
virtual double hwUPtToGev (int hwPt) const =0
 
virtual bool isBendingLayer (unsigned int iLayer) const =0
 
virtual unsigned int nLayers () const =0
 
virtual unsigned int nPhiBins () const =0
 
virtual unsigned int nProcessors () const =0
 
 ProcConfigurationBase ()
 
virtual int ptGevToHw (double ptGev) const =0
 uGMT pt scale conversion: [0GeV, 0.5GeV) = 1 [0.5GeV, 1 Gev) = 2 More...
 
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 ()
 

Private Attributes

int cscLctCentralBx_ = 8
 
double dtPhiBUnitsRad_ = 512
 
bool fixCscGeometryOffset = false
 
int minDtPhiBQuality = 2
 
int minDtPhiQuality = 2
 
bool rpcDropAllClustersIfMoreThanMax = false
 
unsigned int rpcMaxClusterCnt = 2
 
unsigned int rpcMaxClusterSize = 3
 
StubEtaEncoding stubEtaEncoding = StubEtaEncoding::bits
 

Detailed Description

Definition at line 12 of file ProcConfigurationBase.h.

Member Enumeration Documentation

◆ StubEtaEncoding

Enumerator
bits 
valueP1Scale 

Definition at line 86 of file ProcConfigurationBase.h.

86  {
87  //in the firmware the eta is encoded as fired bits in the 9bit word, this is DT phase-1 encoding.
88  //In the emulator in most of the places eta value is used, but with the DT-like binning, i.e. only certain values are valid, see OMTFConfiguration::eta2Bits()
89  //this is the OMTF run2 option
90  bits = 0,
91  //the phase1 eta scale is used, but all hw values are valid, i.e. the DT-phase one binnig is NOT used
92  valueP1Scale = 1,
93  };

Constructor & Destructor Documentation

◆ ProcConfigurationBase()

ProcConfigurationBase::ProcConfigurationBase ( )

◆ ~ProcConfigurationBase()

ProcConfigurationBase::~ProcConfigurationBase ( )
virtual

Definition at line 15 of file ProcConfigurationBase.cc.

15 {}

Member Function Documentation

◆ configureFromEdmParameterSet()

void ProcConfigurationBase::configureFromEdmParameterSet ( const edm::ParameterSet edmParameterSet)
virtual

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

Reimplemented in OMTFConfiguration.

Definition at line 27 of file ProcConfigurationBase.cc.

References bits, cscLctCentralBx_, dtPhiBUnitsRad_, Exception, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), minDtPhiBQuality, minDtPhiQuality, setRpcDropAllClustersIfMoreThanMax(), setRpcMaxClusterCnt(), setRpcMaxClusterSize(), AlCaHLTBitMon_QueryRunRegistry::string, stubEtaEncoding, and valueP1Scale.

Referenced by OMTFConfiguration::configureFromEdmParameterSet().

27  {
28  if (edmParameterSet.exists("rpcMaxClusterSize")) {
29  setRpcMaxClusterSize(edmParameterSet.getParameter<int>("rpcMaxClusterSize"));
30  edm::LogVerbatim("OMTFReconstruction")
31  << "rpcMaxClusterSize: " << edmParameterSet.getParameter<int>("rpcMaxClusterSize") << std::endl;
32  }
33 
34  if (edmParameterSet.exists("rpcMaxClusterCnt")) {
35  setRpcMaxClusterCnt(edmParameterSet.getParameter<int>("rpcMaxClusterCnt"));
36  edm::LogVerbatim("OMTFReconstruction")
37  << "rpcMaxClusterCnt: " << edmParameterSet.getParameter<int>("rpcMaxClusterCnt") << std::endl;
38  }
39 
40  if (edmParameterSet.exists("rpcDropAllClustersIfMoreThanMax")) {
41  setRpcDropAllClustersIfMoreThanMax(edmParameterSet.getParameter<bool>("rpcDropAllClustersIfMoreThanMax"));
42  edm::LogVerbatim("OMTFReconstruction")
43  << "rpcDropAllClustersIfMoreThanMax: " << edmParameterSet.getParameter<bool>("rpcDropAllClustersIfMoreThanMax")
44  << std::endl;
45  }
46 
47  if (edmParameterSet.exists("lctCentralBx")) {
48  cscLctCentralBx_ = edmParameterSet.getParameter<int>("lctCentralBx");
49  edm::LogVerbatim("OMTFReconstruction")
50  << "lctCentralBx: " << edmParameterSet.getParameter<int>("lctCentralBx") << std::endl;
51  }
52 
53  if (edmParameterSet.exists("minDtPhiQuality")) {
54  minDtPhiQuality = edmParameterSet.getParameter<int>("minDtPhiQuality");
55  edm::LogVerbatim("OMTFReconstruction")
56  << "minDtPhiQuality: " << edmParameterSet.getParameter<int>("minDtPhiQuality") << std::endl;
57  }
58 
59  if (edmParameterSet.exists("minDtPhiBQuality")) {
60  minDtPhiBQuality = edmParameterSet.getParameter<int>("minDtPhiBQuality");
61  edm::LogVerbatim("OMTFReconstruction")
62  << "minDtPhiBQuality: " << edmParameterSet.getParameter<int>("minDtPhiBQuality") << std::endl;
63  }
64 
65  if (edmParameterSet.exists("stubEtaEncoding")) {
66  auto stubEtaEncodingStr = edmParameterSet.getParameter<std::string>("stubEtaEncoding");
67  if (stubEtaEncodingStr == "bits")
69  else if (stubEtaEncodingStr == "valueP1Scale")
71  else
72  throw cms::Exception(std::string("ProcConfigurationBase::configureFromEdmParameterSet: stubEtaEncoding ") +
73  stubEtaEncodingStr + "is not correct");
74 
75  edm::LogVerbatim("OMTFReconstruction")
76  << "stubEtaEncoding: " << static_cast<int>(stubEtaEncoding) << " = " << stubEtaEncodingStr << std::endl;
77  }
78 
79  if (edmParameterSet.exists("dtPhiBUnitsRad")) {
80  dtPhiBUnitsRad_ = edmParameterSet.getParameter<int>("dtPhiBUnitsRad");
81  edm::LogVerbatim("OMTFReconstruction") << "dtPhiBUnitsRad: " << dtPhiBUnitsRad_ << std::endl;
82  }
83 }
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setRpcMaxClusterSize(unsigned int rpcMaxClusterSize=4)
bool exists(std::string const &parameterName) const
checks if a parameter exists
virtual void setRpcMaxClusterCnt(unsigned int rpcMaxClusterCnt=2)
virtual void setRpcDropAllClustersIfMoreThanMax(bool rpcDropAllClustersIfMoreThanMax=true)

◆ cscLctCentralBx()

virtual int ProcConfigurationBase::cscLctCentralBx ( ) const
inlinevirtual

Definition at line 54 of file ProcConfigurationBase.h.

References cscLctCentralBx_.

Referenced by OMTFConfiguration::printConfig().

◆ dtPhiBUnitsRad()

double ProcConfigurationBase::dtPhiBUnitsRad ( ) const
inline

◆ etaHwToEtaBin()

virtual unsigned int ProcConfigurationBase::etaHwToEtaBin ( int  etaHw) const
inlinevirtual

Definition at line 44 of file ProcConfigurationBase.h.

44 { return 0; }

◆ etaToHwEta()

virtual int ProcConfigurationBase::etaToHwEta ( double  eta) const
pure virtual

Implemented in OMTFConfiguration.

◆ foldPhi()

int ProcConfigurationBase::foldPhi ( int  phi) const
virtual

Definition at line 17 of file ProcConfigurationBase.cc.

References nPhiBins(), phi, and l1tTrackJets_cfi::phiBins.

Referenced by GoldenPatternBase::process1Layer1RefLayer(), and OMTFConfiguration::procHwPhiToGlobalPhi().

17  {
18  int phiBins = nPhiBins();
19  if (phi > phiBins / 2)
20  return (phi - phiBins);
21  else if (phi < -phiBins / 2)
22  return (phi + phiBins);
23 
24  return phi;
25 }
virtual unsigned int nPhiBins() const =0

◆ getBxToProcess()

virtual unsigned int ProcConfigurationBase::getBxToProcess ( ) const
inlinevirtual

Definition at line 52 of file ProcConfigurationBase.h.

52 { return 1; }

◆ getFixCscGeometryOffset()

virtual bool ProcConfigurationBase::getFixCscGeometryOffset ( ) const
inlinevirtual

Definition at line 80 of file ProcConfigurationBase.h.

References fixCscGeometryOffset.

◆ getMinDtPhiBQuality()

virtual int ProcConfigurationBase::getMinDtPhiBQuality ( ) const
inlinevirtual

Definition at line 76 of file ProcConfigurationBase.h.

References minDtPhiBQuality.

Referenced by OMTFConfiguration::printConfig().

◆ getMinDtPhiQuality()

virtual int ProcConfigurationBase::getMinDtPhiQuality ( ) const
inlinevirtual

Definition at line 72 of file ProcConfigurationBase.h.

References minDtPhiQuality.

Referenced by OMTFConfiguration::printConfig().

◆ getProcScalePhi()

virtual int ProcConfigurationBase::getProcScalePhi ( double  phiRad,
double  procPhiZeroRad = 0 
) const
pure virtual

Implemented in OMTFConfiguration.

◆ getRpcDropAllClustersIfMoreThanMax()

virtual bool ProcConfigurationBase::getRpcDropAllClustersIfMoreThanMax ( ) const
inlinevirtual

◆ getRpcMaxClusterCnt()

virtual unsigned int ProcConfigurationBase::getRpcMaxClusterCnt ( ) const
inlinevirtual

Definition at line 64 of file ProcConfigurationBase.h.

References rpcMaxClusterCnt.

Referenced by OMTFConfiguration::printConfig().

64 { return rpcMaxClusterCnt; }

◆ getRpcMaxClusterSize()

virtual unsigned int ProcConfigurationBase::getRpcMaxClusterSize ( ) const
inlinevirtual

Definition at line 68 of file ProcConfigurationBase.h.

References rpcMaxClusterSize.

Referenced by OMTFConfiguration::printConfig().

68 { return rpcMaxClusterSize; }

◆ getStubEtaEncoding()

StubEtaEncoding ProcConfigurationBase::getStubEtaEncoding ( ) const
inline

Definition at line 95 of file ProcConfigurationBase.h.

References stubEtaEncoding.

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

95 { return stubEtaEncoding; }

◆ hwPtToGev()

virtual double ProcConfigurationBase::hwPtToGev ( int  hwPt) const
pure virtual

Implemented in OMTFConfiguration.

◆ hwUPtToGev()

virtual double ProcConfigurationBase::hwUPtToGev ( int  hwPt) const
pure virtual

Implemented in OMTFConfiguration.

◆ isBendingLayer()

virtual bool ProcConfigurationBase::isBendingLayer ( unsigned int  iLayer) const
pure virtual

Implemented in OMTFConfiguration.

◆ nLayers()

virtual unsigned int ProcConfigurationBase::nLayers ( ) const
pure virtual

Implemented in OMTFConfiguration, and OMTFConfiguration.

◆ nPhiBins()

virtual unsigned int ProcConfigurationBase::nPhiBins ( ) const
pure virtual

Implemented in OMTFConfiguration, and OMTFConfiguration.

Referenced by foldPhi().

◆ nProcessors()

virtual unsigned int ProcConfigurationBase::nProcessors ( ) const
pure virtual

Implemented in OMTFConfiguration, and OMTFConfiguration.

◆ ptGevToHw()

virtual int ProcConfigurationBase::ptGevToHw ( double  ptGev) const
pure virtual

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

Implemented in OMTFConfiguration.

◆ ptGeVToPtBin()

virtual unsigned int ProcConfigurationBase::ptGeVToPtBin ( float  ptGeV) const
inlinevirtual

Definition at line 41 of file ProcConfigurationBase.h.

41 { return 0; }

◆ ptHwToPtBin()

virtual unsigned int ProcConfigurationBase::ptHwToPtBin ( int  ptHw) const
inlinevirtual

Definition at line 39 of file ProcConfigurationBase.h.

39 { return 0; }

◆ setCscLctCentralBx()

virtual void ProcConfigurationBase::setCscLctCentralBx ( int  lctCentralBx)
inlinevirtual

Definition at line 56 of file ProcConfigurationBase.h.

References cscLctCentralBx_.

56 { this->cscLctCentralBx_ = lctCentralBx; }

◆ setFixCscGeometryOffset()

virtual bool ProcConfigurationBase::setFixCscGeometryOffset ( bool  fixCscGeometryOffset)
inlinevirtual

◆ setMinDtPhiBQuality()

virtual void ProcConfigurationBase::setMinDtPhiBQuality ( int  minDtPhiBQuality = 2)
inlinevirtual

Definition at line 78 of file ProcConfigurationBase.h.

References minDtPhiBQuality.

◆ setMinDtPhiQuality()

virtual void ProcConfigurationBase::setMinDtPhiQuality ( int  minDtPhiQuality = 2)
inlinevirtual

Definition at line 74 of file ProcConfigurationBase.h.

References minDtPhiQuality.

◆ setRpcDropAllClustersIfMoreThanMax()

virtual void ProcConfigurationBase::setRpcDropAllClustersIfMoreThanMax ( bool  rpcDropAllClustersIfMoreThanMax = true)
inlinevirtual

◆ setRpcMaxClusterCnt()

virtual void ProcConfigurationBase::setRpcMaxClusterCnt ( unsigned int  rpcMaxClusterCnt = 2)
inlinevirtual

Definition at line 66 of file ProcConfigurationBase.h.

References rpcMaxClusterCnt.

Referenced by configureFromEdmParameterSet().

◆ setRpcMaxClusterSize()

virtual void ProcConfigurationBase::setRpcMaxClusterSize ( unsigned int  rpcMaxClusterSize = 4)
inlinevirtual

Definition at line 70 of file ProcConfigurationBase.h.

References rpcMaxClusterSize.

Referenced by configureFromEdmParameterSet().

◆ setStubEtaEncoding()

void ProcConfigurationBase::setStubEtaEncoding ( StubEtaEncoding  stubEtaEncoding)
inline

Definition at line 97 of file ProcConfigurationBase.h.

References stubEtaEncoding.

Member Data Documentation

◆ cscLctCentralBx_

int ProcConfigurationBase::cscLctCentralBx_ = 8
private

◆ dtPhiBUnitsRad_

double ProcConfigurationBase::dtPhiBUnitsRad_ = 512
private

Definition at line 117 of file ProcConfigurationBase.h.

Referenced by configureFromEdmParameterSet(), and dtPhiBUnitsRad().

◆ fixCscGeometryOffset

bool ProcConfigurationBase::fixCscGeometryOffset = false
private

Definition at line 119 of file ProcConfigurationBase.h.

Referenced by getFixCscGeometryOffset(), and setFixCscGeometryOffset().

◆ minDtPhiBQuality

int ProcConfigurationBase::minDtPhiBQuality = 2
private

◆ minDtPhiQuality

int ProcConfigurationBase::minDtPhiQuality = 2
private

◆ rpcDropAllClustersIfMoreThanMax

bool ProcConfigurationBase::rpcDropAllClustersIfMoreThanMax = false
private

◆ rpcMaxClusterCnt

unsigned int ProcConfigurationBase::rpcMaxClusterCnt = 2
private

Definition at line 108 of file ProcConfigurationBase.h.

Referenced by getRpcMaxClusterCnt(), and setRpcMaxClusterCnt().

◆ rpcMaxClusterSize

unsigned int ProcConfigurationBase::rpcMaxClusterSize = 3
private

Definition at line 107 of file ProcConfigurationBase.h.

Referenced by getRpcMaxClusterSize(), and setRpcMaxClusterSize().

◆ stubEtaEncoding

StubEtaEncoding ProcConfigurationBase::stubEtaEncoding = StubEtaEncoding::bits
private