CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes

L1MuGMTDebugBlock Class Reference

#include <L1MuGMTDebugBlock.h>

List of all members.

Public Member Functions

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

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().

                                                         :
  _minbx(minbx), _maxbx(maxbx), _bx(_minbx),
  _prophi(maxbx-minbx+1, std::vector<float>(32,0)),
  _proeta(maxbx-minbx+1, std::vector<float>(32,0)),
  _phisel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
  _etasel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
  _isMIPISO(maxbx-minbx+1, std::vector<unsigned>(32,0)),
  _pairMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<bool> >(NumMatrices, L1MuGMTMatrix<bool> (4,4))),
  _mqMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<int> >(NumMatrices, L1MuGMTMatrix<int> (4,4))),
  _cancelbits(maxbx-minbx+1, std::vector<unsigned>(4)),
  _brlmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4)),
  _fwdmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4))
  // will not work w/o copy constructor  
{
  if (maxbx < minbx) edm::LogWarning("BxRangeMismatch") << "*** error in L1MuGMTDebugBlock::L1MuGMTDebugBlock(): minbx > maxbx" << endl; 
  reset(); 
}
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.

                                      {
  for (int bx=0; bx<=(_maxbx-_minbx); bx++) {
    _prophi[bx].clear();
    _proeta[bx].clear();
    _phisel[bx].clear();
    _etasel[bx].clear();
    _isMIPISO[bx].clear();
    _brlmuons[bx].clear();
    _fwdmuons[bx].clear();
  }
  _prophi.clear();
  _proeta.clear();
  _phisel.clear();
  _etasel.clear();
  _isMIPISO.clear();
  _pairMatrices.clear();
  _mqMatrices.clear();
  _brlmuons.clear();
  _fwdmuons.clear();
}

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, _proeta, and UserOptions_cff::idx.

{ return _proeta[bx - _minbx][idx]; };
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.

                                                               { 
      return _proeta[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
    };
unsigned L1MuGMTDebugBlock::EtaSel ( int  bx,
int  idx 
) [inline]

Get stored eta select bits.

Definition at line 112 of file L1MuGMTDebugBlock.h.

References _etasel, _minbx, and UserOptions_cff::idx.

{ return _etasel[bx - _minbx][idx]; };
L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetBrlGMTCand ( int  bx,
int  idx 
) [inline]

Get brl Cands.

Definition at line 127 of file L1MuGMTDebugBlock.h.

References _brlmuons, _minbx, and UserOptions_cff::idx.

{ return _brlmuons[bx - _minbx][idx];}
unsigned L1MuGMTDebugBlock::GetCancelBits ( int  bx,
int  idx 
) [inline]

Get Cancel Bits.

Definition at line 124 of file L1MuGMTDebugBlock.h.

References _cancelbits, _minbx, and UserOptions_cff::idx.

{ return _cancelbits[bx - _minbx][idx]; };
L1MuGMTExtendedCand const& L1MuGMTDebugBlock::GetFwdGMTCand ( int  bx,
int  idx 
) [inline]

Get fwd Cands.

Definition at line 130 of file L1MuGMTDebugBlock.h.

References _fwdmuons, _minbx, and UserOptions_cff::idx.

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

Get match quality matrices.

Definition at line 121 of file L1MuGMTDebugBlock.h.

References _minbx, _mqMatrices, and UserOptions_cff::idx.

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

Get pair matrices.

Definition at line 118 of file L1MuGMTDebugBlock.h.

References _minbx, _pairMatrices, and UserOptions_cff::idx.

{ return _pairMatrices[bx - _minbx][idx]; };
unsigned L1MuGMTDebugBlock::IsMIPISO ( int  bx,
int  idx 
) [inline]

Get stored MIP/ISO select bits.

Definition at line 115 of file L1MuGMTDebugBlock.h.

References _isMIPISO, _minbx, and UserOptions_cff::idx.

Referenced by L1MuGlobalMuonTrigger::produce().

{ return _isMIPISO[bx - _minbx][idx]; };
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.

                                                               { 
      return _prophi[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr]; 
    };
float L1MuGMTDebugBlock::Phi ( int  bx,
int  idx 
) [inline]

Get stored phi position.

Definition at line 103 of file L1MuGMTDebugBlock.h.

References _minbx, _prophi, and UserOptions_cff::idx.

{ return _prophi[bx - _minbx][idx]; };
unsigned L1MuGMTDebugBlock::PhiSel ( int  bx,
int  idx 
) [inline]

Get stored phi select bits.

Definition at line 109 of file L1MuGMTDebugBlock.h.

References _minbx, _phisel, and UserOptions_cff::idx.

{ return _phisel[bx - _minbx][idx]; };
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().

                               {       
  _bx = _minbx;
  for (int bx=0; bx<_maxbx-_minbx+1; bx++) {
    for (int i=0;i<32;i++) {
      _prophi[bx][i]=_proeta[bx][i]=99.;
      _phisel[bx][i]=_etasel[bx][i]=0;
      _isMIPISO[bx][i]=0;
    }
    for (int i=0; i<NumMatrices; i++) {
      _pairMatrices[bx][i].init(0);
      _mqMatrices[bx][i].init(0);
    }
    for (int i=0; i<4; i++) {
      _brlmuons[bx][i].reset();
      _fwdmuons[bx][i].reset();
    }
  }
}
void L1MuGMTDebugBlock::SetBrlGMTCands ( int  idx,
L1MuGMTExtendedCand const &  cand 
) [inline]

Set brl GMT Cands.

Definition at line 96 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTSorter::run().

{ _brlmuons[_bx - _minbx][idx]=cand; };
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().

                       { 
      if (bx < _minbx || bx > _maxbx) edm::LogWarning("RangeViolation") 
                                    << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
      else _bx=bx;
    };
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, i, and UserOptions_cff::idx.

Referenced by L1MuGMTCancelOutUnit::decide().

                                                                                         {
  unsigned bits = 0;
  unsigned mask = 1;
  
  for (int i=0;i<4;i++) {
    if (mine[i]) bits |= mask;
    mask = mask << 1;
  }
  for (int i=0;i<4;i++) {
    if (others[i]) bits |= mask;
    mask = mask << 1;
  }
  _cancelbits[_bx - _minbx][idx] = bits;
  
}
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, eta, and UserOptions_cff::idx.

{ _proeta[_bx - _minbx][idx]=eta; };
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, _minbx, and UserOptions_cff::idx.

Referenced by L1MuGMTEtaProjectionUnit::run().

{ _etasel[_bx - _minbx][idx]=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, _minbx, and UserOptions_cff::idx.

Referenced by L1MuGMTSorter::run().

{ _fwdmuons[_bx - _minbx][idx]=cand; };
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, _minbx, and UserOptions_cff::idx.

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

{ _isMIPISO[_bx - _minbx][idx]=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, _mqMatrices, and UserOptions_cff::idx.

Referenced by L1MuGMTMatcher::match().

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

Set pair matrices.

Definition at line 87 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTMatcher::match().

{ _pairMatrices[_bx - _minbx][idx]=pm; };
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, UserOptions_cff::idx, and phi.

{ _prophi[_bx - _minbx][idx]=phi; };
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, _phisel, and UserOptions_cff::idx.

Referenced by L1MuGMTPhiProjectionUnit::run().

{ _phisel[_bx - _minbx][idx]=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().