Commit 00f7486d authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'improve_track_timestamp' into 'master'

Added improvement of track timestamp to BasicTracking module

See merge request !57
parents 3a12c69b 3ebf9405
Pipeline #575558 failed with stages
in 2 minutes and 3 seconds
......@@ -206,6 +206,14 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
if(trackCluster->rowWidth() == 3)
residualsYwidth3[detectorID]->Fill(intercept.Y() - trackCluster->globalY());
}
// 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));
}
track->setTimestamp(avg_track_time / track->nClusters());
}
// Save the tracks on the clipboard
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment