test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 //------------------------------------
35 // Collaborating Class Declarations --
36 //------------------------------------
39 
41 
42 // ---------------------
43 // -- Class Interface --
44 // ---------------------
45 
47 
48  public:
49  static const int NumMatrices = 6;
50 
52  L1MuGMTDebugBlock(int minbx=-10, int maxbx=10);
53 
55  virtual ~L1MuGMTDebugBlock();
56 
58  void reset ();
59 
61  void SetBX(int bx) {
62  if (bx < _minbx || bx > _maxbx) edm::LogWarning("RangeViolation")
63  << "L1MuGMTDebugBlock::SetBX(): bx out of range ";
64  else _bx=bx;
65  };
66 
67  // index: (0..31: 16*isFWD + 8*isISO + 4* isRPC + nr )
68 
70  void SetPhi(int idx, float phi) { _prophi[_bx - _minbx][idx]=phi; };
71 
73  void SetEta(int idx, float eta) { _proeta[_bx - _minbx][idx]=eta; };
74 
76  void SetPhiSelBits(int idx, unsigned phisel) { _phisel[_bx - _minbx][idx]=phisel; };
77 
79  void SetEtaSelBits(int idx, unsigned etasel) { _etasel[_bx - _minbx][idx]=etasel; };
80 
82  void SetIsMIPISO(int idx, unsigned ismipiso) { _isMIPISO[_bx - _minbx][idx]=ismipiso; };
83 
86 
89 
91  void SetCancelBits (int idx, const std::vector<bool>& mine, const std::vector<bool>& others);
92 
94  void SetBrlGMTCands (int idx, L1MuGMTExtendedCand const& cand) { _brlmuons[_bx - _minbx][idx]=cand; };
95 
97  void SetFwdGMTCands (int idx, L1MuGMTExtendedCand const& cand) { _fwdmuons[_bx - _minbx][idx]=cand; };
98 
99 
101  float Phi(int bx, int idx) { return _prophi[bx - _minbx][idx]; };
102 
104  float Eta(int bx, int idx) { return _proeta[bx - _minbx][idx]; };
105 
107  unsigned PhiSel(int bx, int idx) { return _phisel[bx - _minbx][idx]; };
108 
110  unsigned EtaSel(int bx, int idx) { return _etasel[bx - _minbx][idx]; };
111 
113  unsigned IsMIPISO(int bx, int idx) { return _isMIPISO[bx - _minbx][idx]; };
114 
116  L1MuGMTMatrix<bool> GetPairMatrix(int bx, int idx) { return _pairMatrices[bx - _minbx][idx]; };
117 
119  L1MuGMTMatrix<int> GetMQMatrix(int bx, int idx) { return _mqMatrices[bx - _minbx][idx]; };
120 
122  unsigned GetCancelBits(int bx, int idx) { return _cancelbits[bx - _minbx][idx]; };
123 
125  L1MuGMTExtendedCand const& GetBrlGMTCand(int bx, int idx) { return _brlmuons[bx - _minbx][idx];}
126 
128  L1MuGMTExtendedCand const& GetFwdGMTCand(int bx, int idx) { return _fwdmuons[bx - _minbx][idx];}
129 
131  float Phi(int bx, int isFWD, int isISO, int isRPC, int nr) {
132  return _prophi[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
133  };
134 
136  float Eta(int bx, int isFWD, int isISO, int isRPC, int nr) {
137  return _proeta[bx - _minbx][16*isFWD + 8*isISO + 4*isRPC + nr];
138  };
139 
140 
141 
142  private:
143  const int _minbx, _maxbx;
144  int _bx;
145  std::vector<std::vector<float> > _prophi;
146  std::vector<std::vector<float> > _proeta;
147  std::vector<std::vector<unsigned> > _phisel;
148  std::vector<std::vector<unsigned> > _etasel;
149  std::vector<std::vector<unsigned> > _isMIPISO;
150 
151  std::vector<std::vector<L1MuGMTMatrix<bool> > > _pairMatrices;
152  std::vector<std::vector<L1MuGMTMatrix<int> > > _mqMatrices;
153 
154  std::vector<std::vector<unsigned> > _cancelbits;
155  std::vector<std::vector<L1MuGMTExtendedCand> > _brlmuons;
156  std::vector<std::vector<L1MuGMTExtendedCand> > _fwdmuons;
157 };
158 
159 #endif
160 
161 
162 
163 
164 
165 
166 
167 
168 
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.
bool isRPC(const GeomDetEnumerators::SubDetector m)
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
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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.
float Eta(int bx, int idx)
Get stored eta position.
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices