CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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, std::vector< bool > mine, 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 48 of file L1MuGMTDebugBlock.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 36 of file L1MuGMTDebugBlock.cc.

References reset().

36  :
37  _minbx(minbx), _maxbx(maxbx), _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, std::vector<L1MuGMTMatrix<bool> >(NumMatrices, L1MuGMTMatrix<bool> (4,4))),
44  _mqMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<int> >(NumMatrices, L1MuGMTMatrix<int> (4,4))),
45  _cancelbits(maxbx-minbx+1, std::vector<unsigned>(4)),
46  _brlmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4)),
47  _fwdmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4))
48  // will not work w/o copy constructor
49 {
50  if (maxbx < minbx) edm::LogWarning("BxRangeMismatch") << "*** error in L1MuGMTDebugBlock::L1MuGMTDebugBlock(): minbx > maxbx" << endl;
51  reset();
52 }
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.
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices
L1MuGMTDebugBlock::~L1MuGMTDebugBlock ( )
virtual

destructor

Definition at line 59 of file L1MuGMTDebugBlock.cc.

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

59  {
60  for (int bx=0; bx<=(_maxbx-_minbx); bx++) {
61  _prophi[bx].clear();
62  _proeta[bx].clear();
63  _phisel[bx].clear();
64  _etasel[bx].clear();
65  _isMIPISO[bx].clear();
66  _brlmuons[bx].clear();
67  _fwdmuons[bx].clear();
68  }
69  _prophi.clear();
70  _proeta.clear();
71  _phisel.clear();
72  _etasel.clear();
73  _isMIPISO.clear();
74  _pairMatrices.clear();
75  _mqMatrices.clear();
76  _brlmuons.clear();
77  _fwdmuons.clear();
78 }
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

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

Get stored eta position.

Definition at line 106 of file L1MuGMTDebugBlock.h.

References _minbx, and _proeta.

106 { return _proeta[bx - _minbx][idx]; };
std::vector< std::vector< float > > _proeta
float L1MuGMTDebugBlock::Eta ( int  bx,
int  isFWD,
int  isISO,
int  isRPC,
int  nr 
)
inline

Get stored eta position, four indices.

Definition at line 138 of file L1MuGMTDebugBlock.h.

References _minbx, and _proeta.

138  {
139  return _proeta[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
140  };
std::vector< std::vector< float > > _proeta
unsigned L1MuGMTDebugBlock::EtaSel ( int  bx,
int  idx 
)
inline

Get stored eta select bits.

Definition at line 112 of file L1MuGMTDebugBlock.h.

References _etasel, and _minbx.

112 { return _etasel[bx - _minbx][idx]; };
std::vector< std::vector< unsigned > > _etasel
L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetBrlGMTCand ( int  bx,
int  idx 
)
inline

Get brl Cands.

Definition at line 127 of file L1MuGMTDebugBlock.h.

References _brlmuons, and _minbx.

127 { return _brlmuons[bx - _minbx][idx];}
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
unsigned L1MuGMTDebugBlock::GetCancelBits ( int  bx,
int  idx 
)
inline

Get Cancel Bits.

Definition at line 124 of file L1MuGMTDebugBlock.h.

References _cancelbits, and _minbx.

124 { return _cancelbits[bx - _minbx][idx]; };
std::vector< std::vector< unsigned > > _cancelbits
L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetFwdGMTCand ( int  bx,
int  idx 
)
inline

Get fwd Cands.

Definition at line 130 of file L1MuGMTDebugBlock.h.

References _fwdmuons, and _minbx.

130 { return _fwdmuons[bx - _minbx][idx];}
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
L1MuGMTMatrix<int> L1MuGMTDebugBlock::GetMQMatrix ( int  bx,
int  idx 
)
inline

Get match quality matrices.

Definition at line 121 of file L1MuGMTDebugBlock.h.

References _minbx, and _mqMatrices.

121 { return _mqMatrices[bx - _minbx][idx]; };
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
L1MuGMTMatrix<bool> L1MuGMTDebugBlock::GetPairMatrix ( int  bx,
int  idx 
)
inline

Get pair matrices.

Definition at line 118 of file L1MuGMTDebugBlock.h.

References _minbx, and _pairMatrices.

118 { return _pairMatrices[bx - _minbx][idx]; };
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
unsigned L1MuGMTDebugBlock::IsMIPISO ( int  bx,
int  idx 
)
inline

Get stored MIP/ISO select bits.

Definition at line 115 of file L1MuGMTDebugBlock.h.

References _isMIPISO, and _minbx.

Referenced by L1MuGlobalMuonTrigger::produce().

115 { return _isMIPISO[bx - _minbx][idx]; };
std::vector< std::vector< unsigned > > _isMIPISO
float L1MuGMTDebugBlock::Phi ( int  bx,
int  idx 
)
inline

Get stored phi position.

Definition at line 103 of file L1MuGMTDebugBlock.h.

References _minbx, and _prophi.

103 { return _prophi[bx - _minbx][idx]; };
std::vector< std::vector< float > > _prophi
float L1MuGMTDebugBlock::Phi ( int  bx,
int  isFWD,
int  isISO,
int  isRPC,
int  nr 
)
inline

Get stored phi position, four indices.

Definition at line 133 of file L1MuGMTDebugBlock.h.

References _minbx, and _prophi.

133  {
134  return _prophi[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
135  };
std::vector< std::vector< float > > _prophi
unsigned L1MuGMTDebugBlock::PhiSel ( int  bx,
int  idx 
)
inline

Get stored phi select bits.

Definition at line 109 of file L1MuGMTDebugBlock.h.

References _minbx, and _phisel.

109 { return _phisel[bx - _minbx][idx]; };
std::vector< std::vector< unsigned > > _phisel
void L1MuGMTDebugBlock::reset ( void  )

Reset the debug block.

Definition at line 100 of file L1MuGMTDebugBlock.cc.

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

Referenced by L1MuGMTDebugBlock(), and L1MuGlobalMuonTrigger::produce().

100  {
101  _bx = _minbx;
102  for (int bx=0; bx<_maxbx-_minbx+1; bx++) {
103  for (int i=0;i<32;i++) {
104  _prophi[bx][i]=_proeta[bx][i]=99.;
105  _phisel[bx][i]=_etasel[bx][i]=0;
106  _isMIPISO[bx][i]=0;
107  }
108  for (int i=0; i<NumMatrices; i++) {
109  _pairMatrices[bx][i].init(0);
110  _mqMatrices[bx][i].init(0);
111  }
112  for (int i=0; i<4; i++) {
113  _brlmuons[bx][i].reset();
114  _fwdmuons[bx][i].reset();
115  }
116  }
117 }
int i
Definition: DBlmapReader.cc:9
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
void L1MuGMTDebugBlock::SetBrlGMTCands ( int  idx,
L1MuGMTExtendedCand const &  cand 
)
inline

Set brl GMT Cands.

Definition at line 96 of file L1MuGMTDebugBlock.h.

References _brlmuons, _bx, and _minbx.

Referenced by L1MuGMTSorter::run().

96 { _brlmuons[_bx - _minbx][idx]=cand; };
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
void L1MuGMTDebugBlock::SetBX ( int  bx)
inline

Set the current bunch crossing.

Definition at line 63 of file L1MuGMTDebugBlock.h.

References _bx, and _maxbx.

Referenced by L1MuGlobalMuonTrigger::produce().

63  {
64  if (bx < _minbx || bx > _maxbx) edm::LogWarning("RangeViolation")
65  << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
66  else _bx=bx;
67  };
void L1MuGMTDebugBlock::SetCancelBits ( int  idx,
std::vector< bool >  mine,
std::vector< bool >  others 
)

Set cancel bits.

Definition at line 80 of file L1MuGMTDebugBlock.cc.

References _bx, _cancelbits, _minbx, bits, and i.

Referenced by L1MuGMTCancelOutUnit::decide().

80  {
81  unsigned bits = 0;
82  unsigned mask = 1;
83 
84  for (int i=0;i<4;i++) {
85  if (mine[i]) bits |= mask;
86  mask = mask << 1;
87  }
88  for (int i=0;i<4;i++) {
89  if (others[i]) bits |= mask;
90  mask = mask << 1;
91  }
92  _cancelbits[_bx - _minbx][idx] = bits;
93 
94 }
int i
Definition: DBlmapReader.cc:9
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
std::vector< std::vector< unsigned > > _cancelbits
void L1MuGMTDebugBlock::SetEta ( int  idx,
float  eta 
)
inline

Set projected eta positions for current bx.

Definition at line 75 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _proeta, and eta().

75 { _proeta[_bx - _minbx][idx]=eta; };
std::vector< std::vector< float > > _proeta
T eta() const
void L1MuGMTDebugBlock::SetEtaSelBits ( int  idx,
unsigned  etasel 
)
inline

Set eta select bits for current bx.

Definition at line 81 of file L1MuGMTDebugBlock.h.

References _bx, _etasel, and _minbx.

Referenced by L1MuGMTEtaProjectionUnit::run().

81 { _etasel[_bx - _minbx][idx]=etasel; };
std::vector< std::vector< unsigned > > _etasel
void L1MuGMTDebugBlock::SetFwdGMTCands ( int  idx,
L1MuGMTExtendedCand const &  cand 
)
inline

Set fwd GMT Cands.

Definition at line 99 of file L1MuGMTDebugBlock.h.

References _bx, _fwdmuons, and _minbx.

Referenced by L1MuGMTSorter::run().

99 { _fwdmuons[_bx - _minbx][idx]=cand; };
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
void L1MuGMTDebugBlock::SetIsMIPISO ( int  idx,
unsigned  ismipiso 
)
inline

Set MIP/ISO bits for current bx.

Definition at line 84 of file L1MuGMTDebugBlock.h.

References _bx, _isMIPISO, and _minbx.

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

84 { _isMIPISO[_bx - _minbx][idx]=ismipiso; };
std::vector< std::vector< unsigned > > _isMIPISO
void L1MuGMTDebugBlock::SetMQMatrix ( int  idx,
L1MuGMTMatrix< int >  mqm 
)
inline

Set match quality matrices.

Definition at line 90 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, and _mqMatrices.

Referenced by L1MuGMTMatcher::match().

90 { _mqMatrices[_bx - _minbx][idx]=mqm; };
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
void L1MuGMTDebugBlock::SetPairMatrix ( int  idx,
L1MuGMTMatrix< bool >  pm 
)
inline

Set pair matrices.

Definition at line 87 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, and _pairMatrices.

Referenced by L1MuGMTMatcher::match().

87 { _pairMatrices[_bx - _minbx][idx]=pm; };
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
void L1MuGMTDebugBlock::SetPhi ( int  idx,
float  phi 
)
inline

Set projected phi positions for current bx.

Definition at line 72 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _prophi, and phi.

72 { _prophi[_bx - _minbx][idx]=phi; };
std::vector< std::vector< float > > _prophi
Definition: DDAxes.h:10
void L1MuGMTDebugBlock::SetPhiSelBits ( int  idx,
unsigned  phisel 
)
inline

Set phi select bits for current bx.

Definition at line 78 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, and _phisel.

Referenced by L1MuGMTPhiProjectionUnit::run().

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

Member Data Documentation

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

Definition at line 157 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 156 of file L1MuGMTDebugBlock.h.

Referenced by GetCancelBits(), and SetCancelBits().

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

Definition at line 150 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 158 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 151 of file L1MuGMTDebugBlock.h.

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

const int L1MuGMTDebugBlock::_maxbx
private

Definition at line 140 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 154 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 153 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 149 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 148 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 147 of file L1MuGMTDebugBlock.h.

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

const int L1MuGMTDebugBlock::NumMatrices = 6
static

Definition at line 51 of file L1MuGMTDebugBlock.h.

Referenced by reset().