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
for
(
const
auto
& ptrig : all_trigs) {
34
// in the future, add a selection on the BX
35
tmpV.push_back(ptrig);
36
}
37
return
tmpV;
38
}
39
40
// Returns vector of all found correlated Triggers, if any.
41
std::vector<ME0TriggerDigi>
ME0Motherboard::getTriggers
() {
42
std::vector<ME0TriggerDigi> tmpV;
43
44
for
(
int
bx
= 0;
bx
<
MAX_TRIGGER_BINS
;
bx
++) {
45
for
(
int
i
= 0;
i
<
MAX_TRIGGERS
;
i
++) {
46
tmpV.push_back(
Triggers
[
bx
][
i
]);
47
}
48
}
49
return
tmpV;
50
}
51
52
// compare Triggers by quality
53
bool
ME0Motherboard::sortByQuality
(
const
ME0TriggerDigi
& trig1,
const
ME0TriggerDigi
& trig2) {
54
return
trig1.
getQuality
() > trig2.
getQuality
();
55
}
56
57
// compare Triggers by GEM bending angle
58
bool
ME0Motherboard::sortByME0Dphi
(
const
ME0TriggerDigi
& trig1,
const
ME0TriggerDigi
& trig2) {
59
// todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
60
// That function will derive the bending angle from the pattern.
61
// The ME0TriggerDigi pattterns are at this point not defined yet.
62
return
true
;
63
}
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:355
ME0Motherboard::MAX_TRIGGERS
Definition:
ME0Motherboard.h:56
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:53
ME0Motherboard::clear
void clear()
Definition:
ME0Motherboard.cc:16
ME0Motherboard::getTriggers
std::vector< ME0TriggerDigi > getTriggers()
Definition:
ME0Motherboard.cc:41
ME0TriggerDigi::getQuality
int getQuality() const
return the Quality
Definition:
ME0TriggerDigi.h:53
ME0Motherboard::run
void run(const ME0PadDigiCollection *)
Definition:
ME0Motherboard.cc:24
ME0Motherboard::MAX_TRIGGER_BINS
Definition:
ME0Motherboard.h:56
edm::ParameterSet
Definition:
ParameterSet.h:36
ME0Motherboard.h
ME0Motherboard::sortByME0Dphi
static bool sortByME0Dphi(const ME0TriggerDigi &, const ME0TriggerDigi &)
Definition:
ME0Motherboard.cc:58
ME0TriggerDigi
Definition:
ME0TriggerDigi.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
MuonGeometryRecord.h
Generated for CMSSW Reference Manual by
1.8.16