Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
6a0df09b
Commit
6a0df09b
authored
May 14, 2019
by
Jens Kroeger
Browse files
AnalysisEfficiency: improved how matrix is initialized with zeros
parent
7d7b867e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/modules/AnalysisEfficiency/AnalysisEfficiency.cpp
View file @
6a0df09b
...
...
@@ -156,13 +156,10 @@ void AnalysisEfficiency::initialise() {
hPosDiffPrevTrack_noAssocCluster
->
GetYaxis
()
->
SetTitle
(
"row difference (non-matched track - prev track) [px]"
);
// initialize matrix with hit timestamps to all 0:
std
::
vector
<
double
>
v_row
;
for
(
int
irow
=
0
;
irow
<
m_detector
->
nPixels
().
Y
();
irow
++
)
{
// create vector will zeros of length <nRows>
v_row
.
push_back
(
0
);
}
for
(
int
icol
=
0
;
icol
<
m_detector
->
nPixels
().
X
();
icol
++
)
{
// push back to prev_hits_ts <nCols> times
prev_hit_ts
.
push_back
(
v_row
);
}
auto
nRows
=
static_cast
<
size_t
>
(
m_detector
->
nPixels
().
Y
());
auto
nCols
=
static_cast
<
size_t
>
(
m_detector
->
nPixels
().
X
());
std
::
vector
<
double
>
v_row
(
nRows
,
0.
);
// create vector will zeros of length <nRows>
prev_hit_ts
.
assign
(
nCols
,
v_row
);
// use vector v_row to construct matrix
}
StatusCode
AnalysisEfficiency
::
run
(
std
::
shared_ptr
<
Clipboard
>
clipboard
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment