L1Trigger
L1TGEM
src
ME0Motherboard.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1TGEM/interface/ME0Motherboard.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
Geometry/Records/interface/MuonGeometryRecord.h
"
4
#include "
Geometry/GEMGeometry/interface/ME0Geometry.h
"
5
6
ME0Motherboard::ME0Motherboard
(
unsigned
endcap
,
unsigned
chamber
,
const
edm::ParameterSet
& conf)
7
: theEndcap(
endcap
), theChamber(
chamber
) {
8
edm::ParameterSet
tmbParams
= conf.
getParameter
<
edm::ParameterSet
>(
"tmbParam"
);
9
infoV
=
tmbParams
.getParameter<
int
>(
"verbosity"
);
10
}
11
12
ME0Motherboard::ME0Motherboard
() : theEndcap(1), theChamber(1) {
infoV
= 2; }
13
14
ME0Motherboard::~ME0Motherboard
() {}
15
16
void
ME0Motherboard::clear
() {
17
for
(
int
bx
= 0;
bx
<
MAX_TRIGGER_BINS
;
bx
++) {
18
for
(
int
i
= 0;
i
<
MAX_TRIGGERS
;
i
++) {
19
Triggers
[
bx
][
i
].
clear
();
20
}
21
}
22
}
23
24
void
ME0Motherboard::run
(
const
ME0PadDigiCollection
*) {
clear
(); }
25
26
// Returns vector of read-out correlated Triggers, if any. Starts with
27
// the vector of all found Triggers and selects the ones in the read-out
28
// time window.
29
std::vector<ME0TriggerDigi>
ME0Motherboard::readoutTriggers
() {
30
std::vector<ME0TriggerDigi> tmpV;
31
32
std::vector<ME0TriggerDigi> all_trigs =
getTriggers
();
33
tmpV.reserve(all_trigs.size());
34
for
(
const
auto
& ptrig : all_trigs) {
35
// in the future, add a selection on the BX
36
tmpV.push_back(ptrig);
37
}
38
return
tmpV;
39
}
40
41
// Returns vector of all found correlated Triggers, if any.
42
std::vector<ME0TriggerDigi>
ME0Motherboard::getTriggers
() {
43
std::vector<ME0TriggerDigi> tmpV;
44
45
for
(
int
bx
= 0;
bx
<
MAX_TRIGGER_BINS
;
bx
++) {
46
for
(
int
i
= 0;
i
<
MAX_TRIGGERS
;
i
++) {
47
tmpV.push_back(
Triggers
[
bx
][
i
]);
48
}
49
}
50
return
tmpV;
51
}
52
53
// compare Triggers by quality
54
bool
ME0Motherboard::sortByQuality
(
const
ME0TriggerDigi
& trig1,
const
ME0TriggerDigi
& trig2) {
55
return
trig1.
getQuality
() > trig2.
getQuality
();
56
}
57
58
// compare Triggers by GEM bending angle
59
bool
ME0Motherboard::sortByME0Dphi
(
const
ME0TriggerDigi
& trig1,
const
ME0TriggerDigi
& trig2) {
60
// todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
61
// That function will derive the bending angle from the pattern.
62
// The ME0TriggerDigi pattterns are at this point not defined yet.
63
return
true
;
64
}
ME0Motherboard::readoutTriggers
std::vector< ME0TriggerDigi > readoutTriggers()
Definition:
ME0Motherboard.cc:29
ME0Motherboard::infoV
int infoV
Definition:
ME0Motherboard.h:47
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
ME0PadDigiCollection
ME0Motherboard::~ME0Motherboard
~ME0Motherboard()
Definition:
ME0Motherboard.cc:14
ME0Motherboard::Triggers
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
Definition:
ME0Motherboard.h:59
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
makeMuonMisalignmentScenario.endcap
endcap
Definition:
makeMuonMisalignmentScenario.py:320
ME0Motherboard::sortByQuality
static bool sortByQuality(const ME0TriggerDigi &, const ME0TriggerDigi &)
Definition:
ME0Motherboard.cc:54
ME0Motherboard::clear
void clear()
Definition:
ME0Motherboard.cc:16
ME0Motherboard::getTriggers
std::vector< ME0TriggerDigi > getTriggers()
Definition:
ME0Motherboard.cc:42
ME0TriggerDigi::getQuality
int getQuality() const
return the Quality
Definition:
ME0TriggerDigi.h:53
tmbParams
Definition:
tmbParams.py:1
ME0Motherboard::run
void run(const ME0PadDigiCollection *)
Definition:
ME0Motherboard.cc:24
edm::ParameterSet
Definition:
ParameterSet.h:47
ME0Motherboard::MAX_TRIGGERS
Definition:
ME0Motherboard.h:56
ME0Motherboard::MAX_TRIGGER_BINS
Definition:
ME0Motherboard.h:56
ME0Motherboard.h
ME0Motherboard::sortByME0Dphi
static bool sortByME0Dphi(const ME0TriggerDigi &, const ME0TriggerDigi &)
Definition:
ME0Motherboard.cc:59
ME0TriggerDigi
Definition:
ME0TriggerDigi.h:28
ME0Geometry.h
ME0Motherboard::ME0Motherboard
ME0Motherboard()
Definition:
ME0Motherboard.cc:12
ME0TriggerDigi::clear
void clear()
clear this Trigger
Definition:
ME0TriggerDigi.cc:24
relativeConstraints.chamber
chamber
Definition:
relativeConstraints.py:53
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
MuonGeometryRecord.h
Generated for CMSSW Reference Manual by
1.8.16