File indexing completed on 2024-04-06 12:19:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
0021 #define L1TriggerGlobalMuonTrigger_L1MuGMTDebugBlock_h
0022
0023
0024
0025
0026
0027 #include <vector>
0028
0029
0030
0031
0032
0033
0034
0035
0036 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h"
0037 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h"
0038
0039 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0040
0041
0042
0043
0044
0045 class L1MuGMTDebugBlock {
0046 public:
0047 static const int NumMatrices = 6;
0048
0049
0050 L1MuGMTDebugBlock(int minbx = -10, int maxbx = 10);
0051
0052
0053 virtual ~L1MuGMTDebugBlock();
0054
0055
0056 void reset();
0057
0058
0059 void SetBX(int bx) {
0060 if (bx < _minbx || bx > _maxbx)
0061 edm::LogWarning("RangeViolation") << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
0062 else
0063 _bx = bx;
0064 };
0065
0066
0067
0068
0069 void SetPhi(int idx, float phi) { _prophi[_bx - _minbx][idx] = phi; };
0070
0071
0072 void SetEta(int idx, float eta) { _proeta[_bx - _minbx][idx] = eta; };
0073
0074
0075 void SetPhiSelBits(int idx, unsigned phisel) { _phisel[_bx - _minbx][idx] = phisel; };
0076
0077
0078 void SetEtaSelBits(int idx, unsigned etasel) { _etasel[_bx - _minbx][idx] = etasel; };
0079
0080
0081 void SetIsMIPISO(int idx, unsigned ismipiso) { _isMIPISO[_bx - _minbx][idx] = ismipiso; };
0082
0083
0084 void SetPairMatrix(int idx, L1MuGMTMatrix<bool> pm) { _pairMatrices[_bx - _minbx][idx] = pm; };
0085
0086
0087 void SetMQMatrix(int idx, L1MuGMTMatrix<int> mqm) { _mqMatrices[_bx - _minbx][idx] = mqm; };
0088
0089
0090 void SetCancelBits(int idx, const std::vector<bool>& mine, const std::vector<bool>& others);
0091
0092
0093 void SetBrlGMTCands(int idx, L1MuGMTExtendedCand const& cand) { _brlmuons[_bx - _minbx][idx] = cand; };
0094
0095
0096 void SetFwdGMTCands(int idx, L1MuGMTExtendedCand const& cand) { _fwdmuons[_bx - _minbx][idx] = cand; };
0097
0098
0099 float Phi(int bx, int idx) { return _prophi[bx - _minbx][idx]; };
0100
0101
0102 float Eta(int bx, int idx) { return _proeta[bx - _minbx][idx]; };
0103
0104
0105 unsigned PhiSel(int bx, int idx) { return _phisel[bx - _minbx][idx]; };
0106
0107
0108 unsigned EtaSel(int bx, int idx) { return _etasel[bx - _minbx][idx]; };
0109
0110
0111 unsigned IsMIPISO(int bx, int idx) { return _isMIPISO[bx - _minbx][idx]; };
0112
0113
0114 L1MuGMTMatrix<bool> GetPairMatrix(int bx, int idx) { return _pairMatrices[bx - _minbx][idx]; };
0115
0116
0117 L1MuGMTMatrix<int> GetMQMatrix(int bx, int idx) { return _mqMatrices[bx - _minbx][idx]; };
0118
0119
0120 unsigned GetCancelBits(int bx, int idx) { return _cancelbits[bx - _minbx][idx]; };
0121
0122
0123 L1MuGMTExtendedCand const& GetBrlGMTCand(int bx, int idx) { return _brlmuons[bx - _minbx][idx]; }
0124
0125
0126 L1MuGMTExtendedCand const& GetFwdGMTCand(int bx, int idx) { return _fwdmuons[bx - _minbx][idx]; }
0127
0128
0129 float Phi(int bx, int isFWD, int isISO, int isRPC, int nr) {
0130 return _prophi[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
0131 };
0132
0133
0134 float Eta(int bx, int isFWD, int isISO, int isRPC, int nr) {
0135 return _proeta[bx - _minbx][16 * isFWD + 8 * isISO + 4 * isRPC + nr];
0136 };
0137
0138 private:
0139 const int _minbx, _maxbx;
0140 int _bx;
0141 std::vector<std::vector<float> > _prophi;
0142 std::vector<std::vector<float> > _proeta;
0143 std::vector<std::vector<unsigned> > _phisel;
0144 std::vector<std::vector<unsigned> > _etasel;
0145 std::vector<std::vector<unsigned> > _isMIPISO;
0146
0147 std::vector<std::vector<L1MuGMTMatrix<bool> > > _pairMatrices;
0148 std::vector<std::vector<L1MuGMTMatrix<int> > > _mqMatrices;
0149
0150 std::vector<std::vector<unsigned> > _cancelbits;
0151 std::vector<std::vector<L1MuGMTExtendedCand> > _brlmuons;
0152 std::vector<std::vector<L1MuGMTExtendedCand> > _fwdmuons;
0153 };
0154
0155 #endif