CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTDebugBlock.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTDebugBlock
4 //
5 //
6 // $Date: 2007/03/23 18:51:35 $
7 // $Revision: 1.5 $
8 //
9 // Author :
10 // H. Sakulin HEPHY Vienna
11 //
12 // Migrated to CMSSW:
13 // I. Mikulec
14 //
15 //--------------------------------------------------
16 
17 //-----------------------
18 // This Class's Header --
19 //-----------------------
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 #include <vector>
28 #include <math.h>
29 
30 using namespace std;
31 
32 //----------------
33 // Constructors --
34 //----------------
35 
36 L1MuGMTDebugBlock::L1MuGMTDebugBlock(int minbx, int maxbx) :
37  _minbx(minbx), _maxbx(maxbx), _bx(_minbx),
38  _prophi(maxbx-minbx+1, std::vector<float>(32,0)),
39  _proeta(maxbx-minbx+1, std::vector<float>(32,0)),
40  _phisel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
41  _etasel(maxbx-minbx+1, std::vector<unsigned>(32,0)),
42  _isMIPISO(maxbx-minbx+1, std::vector<unsigned>(32,0)),
43  _pairMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<bool> >(NumMatrices, L1MuGMTMatrix<bool> (4,4))),
44  _mqMatrices(maxbx-minbx+1, std::vector<L1MuGMTMatrix<int> >(NumMatrices, L1MuGMTMatrix<int> (4,4))),
45  _cancelbits(maxbx-minbx+1, std::vector<unsigned>(4)),
46  _brlmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4)),
47  _fwdmuons(maxbx-minbx+1, std::vector<L1MuGMTExtendedCand>(4))
48  // will not work w/o copy constructor
49 {
50  if (maxbx < minbx) edm::LogWarning("BxRangeMismatch") << "*** error in L1MuGMTDebugBlock::L1MuGMTDebugBlock(): minbx > maxbx" << endl;
51  reset();
52 }
53 
54 
55 //--------------
56 // Destructor --
57 //--------------
58 
60  for (int bx=0; bx<=(_maxbx-_minbx); bx++) {
61  _prophi[bx].clear();
62  _proeta[bx].clear();
63  _phisel[bx].clear();
64  _etasel[bx].clear();
65  _isMIPISO[bx].clear();
66  _brlmuons[bx].clear();
67  _fwdmuons[bx].clear();
68  }
69  _prophi.clear();
70  _proeta.clear();
71  _phisel.clear();
72  _etasel.clear();
73  _isMIPISO.clear();
74  _pairMatrices.clear();
75  _mqMatrices.clear();
76  _brlmuons.clear();
77  _fwdmuons.clear();
78 }
79 
80 void L1MuGMTDebugBlock::SetCancelBits (int idx, std::vector<bool> mine, vector<bool> others) {
81  unsigned bits = 0;
82  unsigned mask = 1;
83 
84  for (int i=0;i<4;i++) {
85  if (mine[i]) bits |= mask;
86  mask = mask << 1;
87  }
88  for (int i=0;i<4;i++) {
89  if (others[i]) bits |= mask;
90  mask = mask << 1;
91  }
92  _cancelbits[_bx - _minbx][idx] = bits;
93 
94 }
95 
96 //--------------
97 // Operations --
98 //--------------
99 
101  _bx = _minbx;
102  for (int bx=0; bx<_maxbx-_minbx+1; bx++) {
103  for (int i=0;i<32;i++) {
104  _prophi[bx][i]=_proeta[bx][i]=99.;
105  _phisel[bx][i]=_etasel[bx][i]=0;
106  _isMIPISO[bx][i]=0;
107  }
108  for (int i=0; i<NumMatrices; i++) {
109  _pairMatrices[bx][i].init(0);
110  _mqMatrices[bx][i].init(0);
111  }
112  for (int i=0; i<4; i++) {
113  _brlmuons[bx][i].reset();
114  _fwdmuons[bx][i].reset();
115  }
116  }
117 }
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
int i
Definition: DBlmapReader.cc:9
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
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
std::vector< std::vector< float > > _prophi
void SetCancelBits(int idx, std::vector< bool > mine, std::vector< bool > others)
Set cancel bits.
std::vector< std::vector< unsigned > > _isMIPISO
L1MuGMTDebugBlock(int minbx=-10, int maxbx=10)
constructor
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
virtual ~L1MuGMTDebugBlock()
destructor
std::vector< std::vector< L1MuGMTMatrix< int > > > _mqMatrices
void reset()
Reset the debug block.
std::vector< std::vector< unsigned > > _etasel
static const int NumMatrices