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 46 of file L1MuGMTDebugBlock.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 34 of file L1MuGMTDebugBlock.cc.

References reset().

34  :
35  _minbx(minbx), _maxbx(maxbx), _bx(_minbx),
36  _prophi(maxbx-minbx+1, std::vector<float>(32,0)),
37  _proeta(maxbx-minbx+1, std::vector<float>(32,0)),
38  _phisel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
39  _etasel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
40  _isMIPISO(maxbx-minbx+1, std::vector<unsigned>(32,0)),
41  _pairMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<bool> >(NumMatrices, L1MuGMTMatrix<bool> (4,4))),
42  _mqMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<int> >(NumMatrices, L1MuGMTMatrix<int> (4,4))),
43  _cancelbits(maxbx-minbx+1, std::vector<unsigned>(4)),
44  _brlmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4)),
45  _fwdmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4))
46  // will not work w/o copy constructor
47 {
48  if (maxbx < minbx) edm::LogWarning("BxRangeMismatch") << "*** error in L1MuGMTDebugBlock::L1MuGMTDebugBlock(): minbx > maxbx" << endl;
49  reset();
50 }
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 57 of file L1MuGMTDebugBlock.cc.

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

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

References _minbx, _proeta, and training_settings::idx.

104 { 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 136 of file L1MuGMTDebugBlock.h.

References _minbx, and _proeta.

136  {
137  return _proeta[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
138  };
std::vector< std::vector< float > > _proeta
bool isRPC(const GeomDetEnumerators::SubDetector m)
unsigned L1MuGMTDebugBlock::EtaSel ( int  bx,
int  idx 
)
inline

Get stored eta select bits.

Definition at line 110 of file L1MuGMTDebugBlock.h.

References _etasel, _minbx, and training_settings::idx.

110 { 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 125 of file L1MuGMTDebugBlock.h.

References _brlmuons, _minbx, and training_settings::idx.

125 { 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 122 of file L1MuGMTDebugBlock.h.

References _cancelbits, _minbx, and training_settings::idx.

122 { 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 128 of file L1MuGMTDebugBlock.h.

References _fwdmuons, _minbx, and training_settings::idx.

128 { 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 119 of file L1MuGMTDebugBlock.h.

References _minbx, _mqMatrices, and training_settings::idx.

119 { 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 116 of file L1MuGMTDebugBlock.h.

References _minbx, _pairMatrices, and training_settings::idx.

116 { 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 113 of file L1MuGMTDebugBlock.h.

References _isMIPISO, _minbx, and training_settings::idx.

Referenced by L1MuGlobalMuonTrigger::produce().

113 { 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 101 of file L1MuGMTDebugBlock.h.

References _minbx, _prophi, and training_settings::idx.

101 { 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 131 of file L1MuGMTDebugBlock.h.

References _minbx, and _prophi.

131  {
132  return _prophi[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
133  };
bool isRPC(const GeomDetEnumerators::SubDetector m)
std::vector< std::vector< float > > _prophi
unsigned L1MuGMTDebugBlock::PhiSel ( int  bx,
int  idx 
)
inline

Get stored phi select bits.

Definition at line 107 of file L1MuGMTDebugBlock.h.

References _minbx, _phisel, and training_settings::idx.

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

Reset the debug block.

Definition at line 98 of file L1MuGMTDebugBlock.cc.

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

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

98  {
99  _bx = _minbx;
100  for (int bx=0; bx<_maxbx-_minbx+1; bx++) {
101  for (int i=0;i<32;i++) {
102  _prophi[bx][i]=_proeta[bx][i]=99.;
103  _phisel[bx][i]=_etasel[bx][i]=0;
104  _isMIPISO[bx][i]=0;
105  }
106  for (int i=0; i<NumMatrices; i++) {
107  _pairMatrices[bx][i].init(0);
108  _mqMatrices[bx][i].init(0);
109  }
110  for (int i=0; i<4; i++) {
111  _brlmuons[bx][i].reset();
112  _fwdmuons[bx][i].reset();
113  }
114  }
115 }
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 94 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTSorter::run().

94 { _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 61 of file L1MuGMTDebugBlock.h.

References _bx, and _maxbx.

Referenced by L1MuGlobalMuonTrigger::produce().

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

Set cancel bits.

Definition at line 78 of file L1MuGMTDebugBlock.cc.

References _bx, _cancelbits, _minbx, bits, mps_fire::i, training_settings::idx, and RecoTauDiscriminantConfiguration::mask.

Referenced by L1MuGMTCancelOutUnit::decide(), and SetMQMatrix().

78  {
79  unsigned bits = 0;
80  unsigned mask = 1;
81 
82  for (int i=0;i<4;i++) {
83  if (mine[i]) bits |= mask;
84  mask = mask << 1;
85  }
86  for (int i=0;i<4;i++) {
87  if (others[i]) bits |= mask;
88  mask = mask << 1;
89  }
91 
92 }
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 73 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _proeta, stringResolutionProvider_cfi::eta, and training_settings::idx.

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

Set eta select bits for current bx.

Definition at line 79 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTEtaProjectionUnit::run().

79 { _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 97 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTSorter::run().

97 { _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 82 of file L1MuGMTDebugBlock.h.

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

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

82 { _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 88 of file L1MuGMTDebugBlock.h.

References _bx, _minbx, _mqMatrices, training_settings::idx, and SetCancelBits().

Referenced by L1MuGMTMatcher::match().

88 { _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 85 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTMatcher::match().

85 { _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 70 of file L1MuGMTDebugBlock.h.

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

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

Set phi select bits for current bx.

Definition at line 76 of file L1MuGMTDebugBlock.h.

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

Referenced by L1MuGMTPhiProjectionUnit::run().

76 { _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 155 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 154 of file L1MuGMTDebugBlock.h.

Referenced by GetCancelBits(), and SetCancelBits().

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

Definition at line 148 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 156 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 149 of file L1MuGMTDebugBlock.h.

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

const int L1MuGMTDebugBlock::_maxbx
private

Definition at line 138 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 152 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 151 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 147 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 146 of file L1MuGMTDebugBlock.h.

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

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

Definition at line 145 of file L1MuGMTDebugBlock.h.

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

const int L1MuGMTDebugBlock::NumMatrices = 6
static

Definition at line 49 of file L1MuGMTDebugBlock.h.

Referenced by reset().