CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuGMTDebugBlock.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // \class L1MuGMTDebugBlock
11 //
12 //
13 // Author :
14 // H. Sakulin HEPHY Vienna
15 //
16 // Migrated to CMSSW:
17 // I. Mikulec
18 //
19 //--------------------------------------------------
20 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
21 #define L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 #include <vector>
28 
29 //----------------------
30 // Base Class Headers --
31 //----------------------
32 
33 //------------------------------------
34 // Collaborating Class Declarations --
35 //------------------------------------
38 
40 
41 // ---------------------
42 // -- Class Interface --
43 // ---------------------
44 
46 public:
47  static const int NumMatrices = 6;
48 
50  L1MuGMTDebugBlock(int minbx = -10, int maxbx = 10);
51 
53  virtual ~L1MuGMTDebugBlock();
54 
56  void reset();
57 
59  void SetBX(int bx) {
60  if (bx < _minbx || bx > _maxbx)
61  edm::LogWarning("RangeViolation") << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
62  else
63  _bx = bx;
64  };
65 
66  // index: (0..31: 16*isFWD + 8*isISO + 4* isRPC + nr )
67 
69  void SetPhi(int idx, float phi) { _prophi[_bx - _minbx][idx] = phi; };
70 
72  void SetEta(int idx, float eta) { _proeta[_bx - _minbx][idx] = eta; };
73 
75  void SetPhiSelBits(int idx, unsigned phisel) { _phisel[_bx - _minbx][idx] = phisel; };
76 
78  void SetEtaSelBits(int idx, unsigned etasel) { _etasel[_bx - _minbx][idx] = etasel; };
79 
81  void SetIsMIPISO(int idx, unsigned ismipiso) { _isMIPISO[_bx - _minbx][idx] = ismipiso; };
82 
84  void SetPairMatrix(int idx, L1MuGMTMatrix<bool> pm) { _pairMatrices[_bx - _minbx][idx] = pm; };
85 
87  void SetMQMatrix(int idx, L1MuGMTMatrix<int> mqm) { _mqMatrices[_bx - _minbx][idx] = mqm; };
88 
90  void SetCancelBits(int idx, const std::vector<bool>& mine, const std::vector<bool>& others);
91 
93  void SetBrlGMTCands(int idx, L1MuGMTExtendedCand const& cand) { _brlmuons[_bx - _minbx][idx] = cand; };
94 
96  void SetFwdGMTCands(int idx, L1MuGMTExtendedCand const& cand) { _fwdmuons[_bx - _minbx][idx] = cand; };
97 
99  float Phi(int bx, int idx) { return _prophi[bx - _minbx][idx]; };
100 
102  float Eta(int bx, int idx) { return _proeta[bx - _minbx][idx]; };
103 
105  unsigned PhiSel(int bx, int idx) { return _phisel[bx - _minbx][idx]; };
106 
108  unsigned EtaSel(int bx, int idx) { return _etasel[bx - _minbx][idx]; };
109 
111  unsigned IsMIPISO(int bx, int idx) { return _isMIPISO[bx - _minbx][idx]; };
112 
114  L1MuGMTMatrix<bool> GetPairMatrix(int bx, int idx) { return _pairMatrices[bx - _minbx][idx]; };
115 
117  L1MuGMTMatrix<int> GetMQMatrix(int bx, int idx) { return _mqMatrices[bx - _minbx][idx]; };
118 
120  unsigned GetCancelBits(int bx, int idx) { return _cancelbits[bx - _minbx][idx]; };
121 
123  L1MuGMTExtendedCand const& GetBrlGMTCand(int bx, int idx) { return _brlmuons[bx - _minbx][idx]; }
124 
126  L1MuGMTExtendedCand const& GetFwdGMTCand(int bx, int idx) { return _fwdmuons[bx - _minbx][idx]; }
127 
129  float Phi(int bx, int isFWD, int isISO, int isRPC, int nr) {
130  return _prophi[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
131  };
132 
134  float Eta(int bx, int isFWD, int isISO, int isRPC, int nr) {
135  return _proeta[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
136  };
137 
138 private:
139  const int _minbx, _maxbx;
140  int _bx;
141  std::vector<std::vector<float> > _prophi;
142  std::vector<std::vector<float> > _proeta;
143  std::vector<std::vector<unsigned> > _phisel;
144  std::vector<std::vector<unsigned> > _etasel;
145  std::vector<std::vector<unsigned> > _isMIPISO;
146 
147  std::vector<std::vector<L1MuGMTMatrix<bool> > > _pairMatrices;
148  std::vector<std::vector<L1MuGMTMatrix<int> > > _mqMatrices;
149 
150  std::vector<std::vector<unsigned> > _cancelbits;
151  std::vector<std::vector<L1MuGMTExtendedCand> > _brlmuons;
152  std::vector<std::vector<L1MuGMTExtendedCand> > _fwdmuons;
153 };
154 
155 #endif
std::vector< std::vector< float > > _proeta
std::vector< std::vector< L1MuGMTMatrix< bool > > > _pairMatrices
void SetBX(int bx)
Set the current bunch crossing.
std::vector< std::vector< L1MuGMTExtendedCand > > _fwdmuons
std::vector< std::vector< unsigned > > _phisel
L1MuGMTExtendedCand const & GetFwdGMTCand(int bx, int idx)
Get fwd Cands.
unsigned EtaSel(int bx, int idx)
Get stored eta select bits.
unsigned GetCancelBits(int bx, int idx)
Get Cancel Bits.
std::vector< std::vector< unsigned > > _cancelbits
void SetBrlGMTCands(int idx, L1MuGMTExtendedCand const &cand)
Set brl GMT Cands.
std::vector< std::vector< float > > _prophi
void SetPairMatrix(int idx, L1MuGMTMatrix< bool > pm)
Set pair matrices.
std::vector< std::vector< unsigned > > _isMIPISO
void SetEta(int idx, float eta)
Set projected eta positions for current bx.
L1MuGMTMatrix< int > GetMQMatrix(int bx, int idx)
Get match quality matrices.
void SetCancelBits(int idx, const std::vector< bool > &mine, const std::vector< bool > &others)
Set cancel bits.
void SetEtaSelBits(int idx, unsigned etasel)
Set eta select bits for current bx.
float Phi(int bx, int idx)
Get stored phi position.
unsigned IsMIPISO(int bx, int idx)
Get stored MIP/ISO select bits.
void SetMQMatrix(int idx, L1MuGMTMatrix< int > mqm)
Set match quality matrices.
void SetPhi(int idx, float phi)
Set projected phi positions for current bx.
float Eta(int bx, int isFWD, int isISO, int isRPC, int nr)
Get stored eta position, four indices.
L1MuGMTDebugBlock(int minbx=-10, int maxbx=10)
constructor
void SetPhiSelBits(int idx, unsigned phisel)
Set phi select bits for current bx.
unsigned PhiSel(int bx, int idx)
Get stored phi select bits.
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
bool isRPC(GeomDetEnumerators::SubDetector m)
virtual ~L1MuGMTDebugBlock()
destructor
void SetFwdGMTCands(int idx, L1MuGMTExtendedCand const &cand)
Set fwd GMT Cands.
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
L1MuGMTExtendedCand const & GetBrlGMTCand(int bx, int idx)
Get brl Cands.
float Phi(int bx, int isFWD, int isISO, int isRPC, int nr)
Get stored phi position, four indices.
void reset()
Reset the debug block.
void SetIsMIPISO(int idx, unsigned ismipiso)
Set MIP/ISO bits for current bx.
L1MuGMTMatrix< bool > GetPairMatrix(int bx, int idx)
Get pair matrices.
Log< level::Warning, false > LogWarning
float Eta(int bx, int idx)
Get stored eta position.
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices