L1Trigger
GlobalMuonTrigger
src
L1MuGMTInputEvent.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// class L1MuGMTInputEvent
4
//
5
// Description:
6
//
7
//
8
// Author :
9
// Tobias Noebauer HEPHY Vienna
10
//
11
// Migrated to CMSSW:
12
// I. Mikulec
13
//
14
//--------------------------------------------------
15
16
//-----------------------
17
// This Class's Header --
18
//-----------------------
19
#include "
L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.h
"
20
21
//---------------
22
// C++ Headers --
23
//---------------
24
#include <stdexcept>
25
26
//-------------------------------
27
// Collaborating Class Headers --
28
//-------------------------------
29
#include "
L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h
"
30
//#include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h"
31
#include "
DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h
"
32
33
//----------------
34
// Constructors --
35
//----------------
36
L1MuGMTInputEvent::L1MuGMTInputEvent
()
37
: m_runnr(0
L
),
38
m_evtnr(0
L
),
39
m_mip_bits(14, 18,
false
),
40
m_iso_bits(14, 18,
true
)
//this is more useful when reading a standalone input file
41
//since "not-quiet" bits are stored there
42
{
43
std::vector<L1MuRegionalCand> empty_vec;
44
m_inputmuons
[
"INC"
] = empty_vec;
45
m_inputmuons
[
"IND"
] = empty_vec;
46
m_inputmuons
[
"INB"
] = empty_vec;
47
m_inputmuons
[
"INF"
] = empty_vec;
48
49
// m_inputmuons["INC"].reserve(L1MuGMTConfig::MAXCSC);
50
// m_inputmuons["IND"].reserve(L1MuGMTConfig::MAXDTBX);
51
// m_inputmuons["INB"].reserve(L1MuGMTConfig::MAXRPC);
52
// m_inputmuons["INF"].reserve(L1MuGMTConfig::MAXRPC);
53
m_inputmuons
[
"INC"
].reserve(4);
54
m_inputmuons
[
"IND"
].reserve(4);
55
m_inputmuons
[
"INB"
].reserve(4);
56
m_inputmuons
[
"INF"
].reserve(4);
57
}
58
59
//--------------
60
// Destructor --
61
//--------------
62
L1MuGMTInputEvent::~L1MuGMTInputEvent
() {}
63
64
//--------------
65
// Operations --
66
//--------------
67
void
L1MuGMTInputEvent::addInputMuon
(
const
std::string
chipid,
const
L1MuRegionalCand
& inMu) {
68
if
(
m_inputmuons
.count(chipid) == 0)
69
throw
std::runtime_error(
"L1MuGMTInputEvent::addInputMuon: invalid chipid:"
+ chipid);
70
m_inputmuons
[chipid].push_back(inMu);
71
}
72
73
void
L1MuGMTInputEvent::reset
() {
74
m_runnr
= 0
L
;
75
m_evtnr
= 0
L
;
76
77
std::map<std::string, std::vector<L1MuRegionalCand> >::iterator it =
m_inputmuons
.begin();
78
for
(; it !=
m_inputmuons
.end(); it++) {
79
it->second.clear();
80
}
81
82
m_mip_bits
.
reset
(
false
);
83
m_iso_bits
.
reset
(
true
);
//see CTOR for info on this
84
}
85
86
const
L1MuRegionalCand
*
L1MuGMTInputEvent::getInputMuon
(
std::string
chipid,
unsigned
index
)
const
{
87
if
(
m_inputmuons
.count(chipid) == 0)
88
throw
std::runtime_error(
"L1GMTInputEvent::getInputMuon: invalid chipid:"
+ chipid);
89
90
if
(
index
>=
m_inputmuons
.find(chipid)->second.size())
91
return
nullptr
;
92
return
&(
m_inputmuons
.find(chipid)->second.at(
index
));
93
}
dttmaxenums::L
Definition:
DTTMax.h:29
L1MuGMTInputEvent::m_evtnr
unsigned long m_evtnr
Definition:
L1MuGMTInputEvent.h:91
funct::false
false
Definition:
Factorize.h:29
L1MuGMTInputEvent::m_mip_bits
L1MuGMTMatrix< bool > m_mip_bits
Definition:
L1MuGMTInputEvent.h:95
L1MuGMTInputEvent::getInputMuon
const L1MuRegionalCand * getInputMuon(std::string chipid, unsigned index) const
Definition:
L1MuGMTInputEvent.cc:86
L1MuRegionalCand.h
L1MuGMTMatrix.h
L1MuGMTInputEvent::~L1MuGMTInputEvent
virtual ~L1MuGMTInputEvent()
Definition:
L1MuGMTInputEvent.cc:62
L1MuGMTInputEvent::addInputMuon
void addInputMuon(std::string chipid, const L1MuRegionalCand &inMu)
Definition:
L1MuGMTInputEvent.cc:67
L1MuGMTInputEvent::m_iso_bits
L1MuGMTMatrix< bool > m_iso_bits
Definition:
L1MuGMTInputEvent.h:96
L1MuRegionalCand
Definition:
L1MuRegionalCand.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
funct::true
true
Definition:
Factorize.h:173
L1MuGMTInputEvent::m_inputmuons
std::map< std::string, std::vector< L1MuRegionalCand > > m_inputmuons
Definition:
L1MuGMTInputEvent.h:93
L1MuGMTInputEvent::m_runnr
unsigned long m_runnr
Definition:
L1MuGMTInputEvent.h:87
L1MuGMTInputEvent.h
L1MuGMTInputEvent::L1MuGMTInputEvent
L1MuGMTInputEvent()
Definition:
L1MuGMTInputEvent.cc:36
L1MuGMTInputEvent::reset
void reset()
Definition:
L1MuGMTInputEvent.cc:73
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
L1MuGMTMatrix::reset
void reset(T v)
reset all elements
Definition:
L1MuGMTMatrix.h:148
Generated for CMSSW Reference Manual by
1.8.16