CMS 3D CMS Logo

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

#include <L1MuGMTDebugBlock.h>

Public Member Functions

float Eta (int bx, int idx)
 Get stored eta position. More...
 
float Eta (int bx, int isFWD, int isISO, int isRPC, int nr)
 Get stored eta position, four indices. More...
 
unsigned EtaSel (int bx, int idx)
 Get stored eta select bits. More...
 
L1MuGMTExtendedCand const & GetBrlGMTCand (int bx, int idx)
 Get brl Cands. More...
 
unsigned GetCancelBits (int bx, int idx)
 Get Cancel Bits. More...
 
L1MuGMTExtendedCand const & GetFwdGMTCand (int bx, int idx)
 Get fwd Cands. More...
 
L1MuGMTMatrix< int > GetMQMatrix (int bx, int idx)
 Get match quality matrices. More...
 
L1MuGMTMatrix< bool > GetPairMatrix (int bx, int idx)
 Get pair matrices. More...
 
unsigned IsMIPISO (int bx, int idx)
 Get stored MIP/ISO select bits. More...
 
 L1MuGMTDebugBlock (int minbx=-10, int maxbx=10)
 constructor More...
 
float Phi (int bx, int idx)
 Get stored phi position. More...
 
float Phi (int bx, int isFWD, int isISO, int isRPC, int nr)
 Get stored phi position, four indices. More...
 
unsigned PhiSel (int bx, int idx)
 Get stored phi select bits. More...
 
void reset ()
 Reset the debug block. More...
 
void SetBrlGMTCands (int idx, L1MuGMTExtendedCand const &cand)
 Set brl GMT Cands. More...
 
void SetBX (int bx)
 Set the current bunch crossing. More...
 
void SetCancelBits (int idx, const std::vector< bool > &mine, const std::vector< bool > &others)
 Set cancel bits. More...
 
void SetEta (int idx, float eta)
 Set projected eta positions for current bx. More...
 
void SetEtaSelBits (int idx, unsigned etasel)
 Set eta select bits for current bx. More...
 
void SetFwdGMTCands (int idx, L1MuGMTExtendedCand const &cand)
 Set fwd GMT Cands. More...
 
void SetIsMIPISO (int idx, unsigned ismipiso)
 Set MIP/ISO bits for current bx. More...
 
void SetMQMatrix (int idx, L1MuGMTMatrix< int > mqm)
 Set match quality matrices. More...
 
void SetPairMatrix (int idx, L1MuGMTMatrix< bool > pm)
 Set pair matrices. More...
 
void SetPhi (int idx, float phi)
 Set projected phi positions for current bx. More...
 
void SetPhiSelBits (int idx, unsigned phisel)
 Set phi select bits for current bx. More...
 
virtual ~L1MuGMTDebugBlock ()
 destructor More...
 

Static Public Attributes

static const int NumMatrices = 6
 

Private Attributes

std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
 
int _bx
 
std::vector< std::vector< unsigned > > _cancelbits
 
std::vector< std::vector< unsigned > > _etasel
 
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
 
std::vector< std::vector< unsigned > > _isMIPISO
 
const int _maxbx
 
const int _minbx
 
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
 
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
 
std::vector< std::vector< unsigned > > _phisel
 
std::vector< std::vector< float > > _proeta
 
std::vector< std::vector< float > > _prophi
 

Detailed Description

Description: debug block for GMT it is filled during GMT processing and allows to retrieve intermediate results, later (e.g. for comparison with the hardware model)

Definition at line 45 of file L1MuGMTDebugBlock.h.

Constructor & Destructor Documentation

◆ L1MuGMTDebugBlock()

L1MuGMTDebugBlock::L1MuGMTDebugBlock ( int  minbx = -10,
int  maxbx = 10 
)

constructor

Definition at line 34 of file L1MuGMTDebugBlock.cc.

References reset().

35  : _minbx(minbx),
36  _maxbx(maxbx),
37  _bx(_minbx),
38  _prophi(maxbx - minbx + 1, std::vector<float>(32, 0)),
39  _proeta(maxbx - minbx + 1, std::vector<float>(32, 0)),
40  _phisel(maxbx - minbx + 1, std::vector<unsigned>(32, 0)),
41  _etasel(maxbx - minbx + 1, std::vector<unsigned>(32, 0)),
42  _isMIPISO(maxbx - minbx + 1, std::vector<unsigned>(32, 0)),
43  _pairMatrices(maxbx - minbx + 1,
46  _cancelbits(maxbx - minbx + 1, std::vector<unsigned>(4)),
47  _brlmuons(maxbx - minbx + 1, std::vector<L1MuGMTExtendedCand>(4)),
48  _fwdmuons(maxbx - minbx + 1, std::vector<L1MuGMTExtendedCand>(4))
49 // will not work w/o copy constructor
50 {
51  if (maxbx < minbx)
52  edm::LogWarning("BxRangeMismatch") << "*** error in L1MuGMTDebugBlock::L1MuGMTDebugBlock(): minbx > maxbx" << endl;
53  reset();
54 }
std::vector< std::vector< float > > _proeta
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
std::vector< std::vector< unsigned > > _phisel
std::vector< std::vector< unsigned > > _cancelbits
std::vector< std::vector< float > > _prophi
std::vector< std::vector< unsigned > > _isMIPISO
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
void reset()
Reset the debug block.
Log< level::Warning, false > LogWarning
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices

◆ ~L1MuGMTDebugBlock()

L1MuGMTDebugBlock::~L1MuGMTDebugBlock ( )
virtual

destructor

Definition at line 60 of file L1MuGMTDebugBlock.cc.

References _brlmuons, _etasel, _fwdmuons, _isMIPISO, _maxbx, _minbx, _mqMatrices, _pairMatrices, _phisel, _proeta, _prophi, and l1GtPatternGenerator_cfi::bx.

60  {
61  for (int bx = 0; bx <= (_maxbx - _minbx); bx++) {
62  _prophi[bx].clear();
63  _proeta[bx].clear();
64  _phisel[bx].clear();
65  _etasel[bx].clear();
66  _isMIPISO[bx].clear();
67  _brlmuons[bx].clear();
68  _fwdmuons[bx].clear();
69  }
70  _prophi.clear();
71  _proeta.clear();
72  _phisel.clear();
73  _etasel.clear();
74  _isMIPISO.clear();
75  _pairMatrices.clear();
76  _mqMatrices.clear();
77  _brlmuons.clear();
78  _fwdmuons.clear();
79 }
std::vector< std::vector< float > > _proeta
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
std::vector< std::vector< unsigned > > _phisel
std::vector< std::vector< float > > _prophi
std::vector< std::vector< unsigned > > _isMIPISO
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
std::vector< std::vector< unsigned > > _etasel

Member Function Documentation

◆ Eta() [1/2]

float L1MuGMTDebugBlock::Eta ( int  bx,
int  idx 
)
inline

◆ Eta() [2/2]

float L1MuGMTDebugBlock::Eta ( int  bx,
int  isFWD,
int  isISO,
int  isRPC,
int  nr 
)
inline

Get stored eta position, four indices.

Definition at line 134 of file L1MuGMTDebugBlock.h.

References _minbx, _proeta, l1GtPatternGenerator_cfi::bx, GeomDetEnumerators::isRPC(), and EgHLTOffHistBins_cfi::nr.

134  {
135  return _proeta[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
136  };
std::vector< std::vector< float > > _proeta
bool isRPC(GeomDetEnumerators::SubDetector m)

◆ EtaSel()

unsigned L1MuGMTDebugBlock::EtaSel ( int  bx,
int  idx 
)
inline

Get stored eta select bits.

Definition at line 108 of file L1MuGMTDebugBlock.h.

References _etasel, _minbx, l1GtPatternGenerator_cfi::bx, and heavyIonCSV_trainingSettings::idx.

◆ GetBrlGMTCand()

L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetBrlGMTCand ( int  bx,
int  idx 
)
inline

◆ GetCancelBits()

unsigned L1MuGMTDebugBlock::GetCancelBits ( int  bx,
int  idx 
)
inline

◆ GetFwdGMTCand()

L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetFwdGMTCand ( int  bx,
int  idx 
)
inline

◆ GetMQMatrix()

L1MuGMTMatrix<int> L1MuGMTDebugBlock::GetMQMatrix ( int  bx,
int  idx 
)
inline

Get match quality matrices.

Definition at line 117 of file L1MuGMTDebugBlock.h.

References _minbx, _mqMatrices, l1GtPatternGenerator_cfi::bx, and heavyIonCSV_trainingSettings::idx.

◆ GetPairMatrix()

L1MuGMTMatrix<bool> L1MuGMTDebugBlock::GetPairMatrix ( int  bx,
int  idx 
)
inline

Get pair matrices.

Definition at line 114 of file L1MuGMTDebugBlock.h.

References _minbx, _pairMatrices, l1GtPatternGenerator_cfi::bx, and heavyIonCSV_trainingSettings::idx.

◆ IsMIPISO()

unsigned L1MuGMTDebugBlock::IsMIPISO ( int  bx,
int  idx 
)
inline

Get stored MIP/ISO select bits.

Definition at line 111 of file L1MuGMTDebugBlock.h.

References _isMIPISO, _minbx, l1GtPatternGenerator_cfi::bx, and heavyIonCSV_trainingSettings::idx.

◆ Phi() [1/2]

float L1MuGMTDebugBlock::Phi ( int  bx,
int  idx 
)
inline

◆ Phi() [2/2]

float L1MuGMTDebugBlock::Phi ( int  bx,
int  isFWD,
int  isISO,
int  isRPC,
int  nr 
)
inline

Get stored phi position, four indices.

Definition at line 129 of file L1MuGMTDebugBlock.h.

References _minbx, _prophi, l1GtPatternGenerator_cfi::bx, GeomDetEnumerators::isRPC(), and EgHLTOffHistBins_cfi::nr.

129  {
130  return _prophi[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
131  };
std::vector< std::vector< float > > _prophi
bool isRPC(GeomDetEnumerators::SubDetector m)

◆ PhiSel()

unsigned L1MuGMTDebugBlock::PhiSel ( int  bx,
int  idx 
)
inline

Get stored phi select bits.

Definition at line 105 of file L1MuGMTDebugBlock.h.

References _minbx, _phisel, l1GtPatternGenerator_cfi::bx, and heavyIonCSV_trainingSettings::idx.

◆ reset()

void L1MuGMTDebugBlock::reset ( void  )

Reset the debug block.

Definition at line 102 of file L1MuGMTDebugBlock.cc.

References _brlmuons, _bx, _etasel, _fwdmuons, _isMIPISO, _maxbx, _minbx, _mqMatrices, _pairMatrices, _phisel, _proeta, _prophi, l1GtPatternGenerator_cfi::bx, mps_fire::i, and NumMatrices.

Referenced by L1MuGMTDebugBlock().

102  {
103  _bx = _minbx;
104  for (int bx = 0; bx < _maxbx - _minbx + 1; bx++) {
105  for (int i = 0; i < 32; i++) {
106  _prophi[bx][i] = _proeta[bx][i] = 99.;
107  _phisel[bx][i] = _etasel[bx][i] = 0;
108  _isMIPISO[bx][i] = 0;
109  }
110  for (int i = 0; i < NumMatrices; i++) {
111  _pairMatrices[bx][i].reset(false);
112  _mqMatrices[bx][i].reset(0);
113  }
114  for (int i = 0; i < 4; i++) {
115  _brlmuons[bx][i].reset();
116  _fwdmuons[bx][i].reset();
117  }
118  }
119 }
std::vector< std::vector< float > > _proeta
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
std::vector< std::vector< unsigned > > _phisel
std::vector< std::vector< float > > _prophi
std::vector< std::vector< unsigned > > _isMIPISO
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices

◆ SetBrlGMTCands()

void L1MuGMTDebugBlock::SetBrlGMTCands ( int  idx,
L1MuGMTExtendedCand const &  cand 
)
inline

Set brl GMT Cands.

Definition at line 93 of file L1MuGMTDebugBlock.h.

References _brlmuons, _bx, _minbx, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTSorter::run().

93 { _brlmuons[_bx - _minbx][idx] = cand; };
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons

◆ SetBX()

void L1MuGMTDebugBlock::SetBX ( int  bx)
inline

Set the current bunch crossing.

Definition at line 59 of file L1MuGMTDebugBlock.h.

References _bx, _maxbx, and l1GtPatternGenerator_cfi::bx.

59  {
60  if (bx < _minbx || bx > _maxbx)
61  edm::LogWarning("RangeViolation") << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
62  else
63  _bx = bx;
64  };
Log< level::Warning, false > LogWarning

◆ SetCancelBits()

void L1MuGMTDebugBlock::SetCancelBits ( int  idx,
const std::vector< bool > &  mine,
const std::vector< bool > &  others 
)

Set cancel bits.

Definition at line 81 of file L1MuGMTDebugBlock.cc.

References _bx, _cancelbits, _minbx, gpuClustering::pixelStatus::bits, mps_fire::i, heavyIonCSV_trainingSettings::idx, and gpuClustering::pixelStatus::mask.

Referenced by L1MuGMTCancelOutUnit::decide().

81  {
82  unsigned bits = 0;
83  unsigned mask = 1;
84 
85  for (int i = 0; i < 4; i++) {
86  if (mine[i])
87  bits |= mask;
88  mask = mask << 1;
89  }
90  for (int i = 0; i < 4; i++) {
91  if (others[i])
92  bits |= mask;
93  mask = mask << 1;
94  }
96 }
constexpr uint32_t bits
Definition: gpuClustering.h:25
std::vector< std::vector< unsigned > > _cancelbits
constexpr uint32_t mask
Definition: gpuClustering.h:26

◆ SetEta()

void L1MuGMTDebugBlock::SetEta ( int  idx,
float  eta 
)
inline

Set projected eta positions for current bx.

Definition at line 72 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _proeta, PVValHelper::eta, and heavyIonCSV_trainingSettings::idx.

◆ SetEtaSelBits()

void L1MuGMTDebugBlock::SetEtaSelBits ( int  idx,
unsigned  etasel 
)
inline

Set eta select bits for current bx.

Definition at line 78 of file L1MuGMTDebugBlock.h.

References _bx, _etasel, _minbx, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTEtaProjectionUnit::run().

78 { _etasel[_bx - _minbx][idx] = etasel; };
std::vector< std::vector< unsigned > > _etasel

◆ SetFwdGMTCands()

void L1MuGMTDebugBlock::SetFwdGMTCands ( int  idx,
L1MuGMTExtendedCand const &  cand 
)
inline

Set fwd GMT Cands.

Definition at line 96 of file L1MuGMTDebugBlock.h.

References _bx, _fwdmuons, _minbx, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTSorter::run().

96 { _fwdmuons[_bx - _minbx][idx] = cand; };
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons

◆ SetIsMIPISO()

void L1MuGMTDebugBlock::SetIsMIPISO ( int  idx,
unsigned  ismipiso 
)
inline

Set MIP/ISO bits for current bx.

Definition at line 81 of file L1MuGMTDebugBlock.h.

References _bx, _isMIPISO, _minbx, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTMipIsoAU::assignISO(), and L1MuGMTMipIsoAU::assignMIP().

81 { _isMIPISO[_bx - _minbx][idx] = ismipiso; };
std::vector< std::vector< unsigned > > _isMIPISO

◆ SetMQMatrix()

void L1MuGMTDebugBlock::SetMQMatrix ( int  idx,
L1MuGMTMatrix< int >  mqm 
)
inline

Set match quality matrices.

Definition at line 87 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _mqMatrices, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTMatcher::match().

87 { _mqMatrices[_bx - _minbx][idx] = mqm; };
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices

◆ SetPairMatrix()

void L1MuGMTDebugBlock::SetPairMatrix ( int  idx,
L1MuGMTMatrix< bool >  pm 
)
inline

Set pair matrices.

Definition at line 84 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _pairMatrices, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTMatcher::match().

84 { _pairMatrices[_bx - _minbx][idx] = pm; };
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices

◆ SetPhi()

void L1MuGMTDebugBlock::SetPhi ( int  idx,
float  phi 
)
inline

Set projected phi positions for current bx.

Definition at line 69 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _prophi, heavyIonCSV_trainingSettings::idx, and phi.

◆ SetPhiSelBits()

void L1MuGMTDebugBlock::SetPhiSelBits ( int  idx,
unsigned  phisel 
)
inline

Set phi select bits for current bx.

Definition at line 75 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _phisel, and heavyIonCSV_trainingSettings::idx.

Referenced by L1MuGMTPhiProjectionUnit::run().

75 { _phisel[_bx - _minbx][idx] = phisel; };
std::vector< std::vector< unsigned > > _phisel

Member Data Documentation

◆ _brlmuons

std::vector<std::vector<L1MuGMTExtendedCand> > L1MuGMTDebugBlock::_brlmuons
private

Definition at line 151 of file L1MuGMTDebugBlock.h.

Referenced by GetBrlGMTCand(), reset(), SetBrlGMTCands(), and ~L1MuGMTDebugBlock().

◆ _bx

int L1MuGMTDebugBlock::_bx
private

◆ _cancelbits

std::vector<std::vector<unsigned> > L1MuGMTDebugBlock::_cancelbits
private

Definition at line 150 of file L1MuGMTDebugBlock.h.

Referenced by GetCancelBits(), and SetCancelBits().

◆ _etasel

std::vector<std::vector<unsigned> > L1MuGMTDebugBlock::_etasel
private

Definition at line 144 of file L1MuGMTDebugBlock.h.

Referenced by EtaSel(), reset(), SetEtaSelBits(), and ~L1MuGMTDebugBlock().

◆ _fwdmuons

std::vector<std::vector<L1MuGMTExtendedCand> > L1MuGMTDebugBlock::_fwdmuons
private

Definition at line 152 of file L1MuGMTDebugBlock.h.

Referenced by GetFwdGMTCand(), reset(), SetFwdGMTCands(), and ~L1MuGMTDebugBlock().

◆ _isMIPISO

std::vector<std::vector<unsigned> > L1MuGMTDebugBlock::_isMIPISO
private

Definition at line 145 of file L1MuGMTDebugBlock.h.

Referenced by IsMIPISO(), reset(), SetIsMIPISO(), and ~L1MuGMTDebugBlock().

◆ _maxbx

const int L1MuGMTDebugBlock::_maxbx
private

Definition at line 136 of file L1MuGMTDebugBlock.h.

Referenced by reset(), SetBX(), and ~L1MuGMTDebugBlock().

◆ _minbx

const int L1MuGMTDebugBlock::_minbx
private

◆ _mqMatrices

std::vector<std::vector<L1MuGMTMatrix<int> > > L1MuGMTDebugBlock::_mqMatrices
private

Definition at line 148 of file L1MuGMTDebugBlock.h.

Referenced by GetMQMatrix(), reset(), SetMQMatrix(), and ~L1MuGMTDebugBlock().

◆ _pairMatrices

std::vector<std::vector<L1MuGMTMatrix<bool> > > L1MuGMTDebugBlock::_pairMatrices
private

Definition at line 147 of file L1MuGMTDebugBlock.h.

Referenced by GetPairMatrix(), reset(), SetPairMatrix(), and ~L1MuGMTDebugBlock().

◆ _phisel

std::vector<std::vector<unsigned> > L1MuGMTDebugBlock::_phisel
private

Definition at line 143 of file L1MuGMTDebugBlock.h.

Referenced by PhiSel(), reset(), SetPhiSelBits(), and ~L1MuGMTDebugBlock().

◆ _proeta

std::vector<std::vector<float> > L1MuGMTDebugBlock::_proeta
private

Definition at line 142 of file L1MuGMTDebugBlock.h.

Referenced by Eta(), reset(), SetEta(), and ~L1MuGMTDebugBlock().

◆ _prophi

std::vector<std::vector<float> > L1MuGMTDebugBlock::_prophi
private

Definition at line 141 of file L1MuGMTDebugBlock.h.

Referenced by Phi(), reset(), SetPhi(), and ~L1MuGMTDebugBlock().

◆ NumMatrices

const int L1MuGMTDebugBlock::NumMatrices = 6
static

Definition at line 47 of file L1MuGMTDebugBlock.h.

Referenced by reset().