Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
6e940573
Commit
6e940573
authored
Nov 07, 2018
by
Simon Spannagel
Browse files
More casts
parent
5cf787a3
Pipeline
#576899
passed with stages
in 10 minutes and 58 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/modules/BasicTracking/BasicTracking.cpp
View file @
6e940573
...
...
@@ -210,8 +210,8 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
// Improve the track timestamp by taking the average of all planes
double
avg_track_time
=
0
;
for
(
auto
&
trackCluster
:
trackClusters
)
{
avg_track_time
+=
(
Units
::
convert
(
trackCluster
->
timestamp
(),
"ns"
));
avg_track_time
-=
(
Units
::
convert
(
trackCluster
->
globalZ
(),
"mm"
)
/
(
299.792458
));
avg_track_time
+=
static_cast
<
double
>
(
Units
::
convert
(
trackCluster
->
timestamp
(),
"ns"
));
avg_track_time
-=
static_cast
<
double
>
(
Units
::
convert
(
trackCluster
->
globalZ
(),
"mm"
)
/
(
299.792458
));
}
track
->
setTimestamp
(
avg_track_time
/
static_cast
<
double
>
(
track
->
nClusters
()));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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