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 //
7 // Author :
8 // H. Sakulin HEPHY Vienna
9 //
10 // Migrated to CMSSW:
11 // I. Mikulec
12 //
13 //--------------------------------------------------
14 
15 //-----------------------
16 // This Class's Header --
17 //-----------------------
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <iostream>
25 #include <vector>
26 #include <math.h>
27 
28 using namespace std;
29 
30 //----------------
31 // Constructors --
32 //----------------
33 
34 L1MuGMTDebugBlock::L1MuGMTDebugBlock(int minbx, int maxbx) :
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 }
51 
52 
53 //--------------
54 // Destructor --
55 //--------------
56 
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 }
77 
78 void L1MuGMTDebugBlock::SetCancelBits (int idx, const std::vector<bool>& mine, const vector<bool>& others) {
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 }
93 
94 //--------------
95 // Operations --
96 //--------------
97 
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 }
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
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
std::vector< std::vector< unsigned > > _isMIPISO
void SetCancelBits(int idx, const std::vector< bool > &mine, const std::vector< bool > &others)
Set cancel bits.
L1MuGMTDebugBlock(int minbx=-10, int maxbx=10)
constructor
std::vector< std::vector< L1MuGMTExtendedCand > > _brlmuons
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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