L1Trigger
CSCTriggerPrimitives
src
LCTContainer.cc
Go to the documentation of this file.
1
#include "
L1Trigger/CSCTriggerPrimitives/interface/LCTContainer.h
"
2
3
LCTContainer::LCTContainer
(
unsigned
int
trig_window_size) : match_trig_window_size_(trig_window_size) {}
4
5
CSCCorrelatedLCTDigi
&
LCTContainer::operator()
(
int
bx
,
int
match_bx,
int
lct) {
return
data
[
bx
][match_bx][lct]; }
6
7
void
LCTContainer::getTimeMatched
(
const
int
bx
, std::vector<CSCCorrelatedLCTDigi>& lcts)
const
{
8
for
(
unsigned
int
mbx = 0; mbx <
match_trig_window_size_
; mbx++) {
9
for
(
int
i
= 0;
i
<
CSCConstants::MAX_LCTS_PER_CSC
;
i
++) {
10
// consider only valid LCTs
11
if
(not
data
[
bx
][mbx][
i
].
isValid
())
12
continue
;
13
14
// remove duplicated LCTs
15
if
(
std::find
(lcts.begin(), lcts.end(),
data
[
bx
][mbx][
i
]) != lcts.end())
16
continue
;
17
18
lcts.push_back(
data
[
bx
][mbx][
i
]);
19
}
20
}
21
}
22
23
void
LCTContainer::getMatched
(std::vector<CSCCorrelatedLCTDigi>& lcts)
const
{
24
for
(
int
bx
= 0;
bx
<
CSCConstants::MAX_LCT_TBINS
;
bx
++) {
25
std::vector<CSCCorrelatedLCTDigi> temp_lcts;
26
LCTContainer::getTimeMatched
(
bx
, temp_lcts);
27
lcts.insert(
std::end
(lcts), std::begin(temp_lcts),
std::end
(temp_lcts));
28
}
29
}
30
31
void
LCTContainer::clear
() {
32
// Loop over all time windows
33
for
(
int
bx
= 0;
bx
<
CSCConstants::MAX_LCT_TBINS
;
bx
++) {
34
// Loop over all matched trigger windows
35
for
(
unsigned
int
mbx = 0; mbx <
match_trig_window_size_
; mbx++) {
36
// Loop over all stubs
37
for
(
int
i
= 0;
i
<
CSCConstants::MAX_LCTS_PER_CSC
;
i
++) {
38
data
[
bx
][mbx][
i
].
clear
();
39
}
40
}
41
}
42
}
mps_fire.i
i
Definition:
mps_fire.py:428
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
LCTContainer::operator()
CSCCorrelatedLCTDigi & operator()(int bx, int match_bx, int lct)
Definition:
LCTContainer.cc:5
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
LCTContainer::getMatched
void getMatched(std::vector< CSCCorrelatedLCTDigi > &) const
Definition:
LCTContainer.cc:23
CSCConstants::MAX_LCTS_PER_CSC
Definition:
CSCConstants.h:75
mps_fire.end
end
Definition:
mps_fire.py:242
CSCConstants::MAX_LCT_TBINS
Definition:
CSCConstants.h:65
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition:
SiStripSpyUtilities.cc:124
LCTContainer::clear
void clear()
Definition:
LCTContainer.cc:31
LCTContainer::match_trig_window_size_
const unsigned int match_trig_window_size_
Definition:
LCTContainer.h:46
LCTContainer.h
LCTContainer::getTimeMatched
void getTimeMatched(const int bx, std::vector< CSCCorrelatedLCTDigi > &) const
Definition:
LCTContainer.cc:7
CSCCorrelatedLCTDigi::clear
void clear()
clear this LCT
Definition:
CSCCorrelatedLCTDigi.cc:49
LCTContainer::LCTContainer
LCTContainer(unsigned int trig_window_size)
Definition:
LCTContainer.cc:3
LCTContainer::data
CSCCorrelatedLCTDigi data[CSCConstants::MAX_LCT_TBINS][CSCConstants::MAX_MATCH_WINDOW_SIZE][CSCConstants::MAX_LCTS_PER_CSC]
Definition:
LCTContainer.h:43
CSCCorrelatedLCTDigi
Definition:
CSCCorrelatedLCTDigi.h:19
Generated for CMSSW Reference Manual by
1.8.16