Commit e8a2b064 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

AnalysisEfficiency: removed static_cast where unnecessary

parent 32593e18
...@@ -294,9 +294,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) { ...@@ -294,9 +294,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
m_detector->getRow(localIntercept) - last_track_row); m_detector->getRow(localIntercept) - last_track_row);
if((prev_hit_ts.at(intercept_col)).at(intercept_row) != 0) { if((prev_hit_ts.at(intercept_col)).at(intercept_row) != 0) {
LOG(DEBUG) << "Found a time difference of " LOG(DEBUG) << "Found a time difference of "
<< static_cast<double>( << Units::display(track->timestamp() - prev_hit_ts.at(intercept_col).at(intercept_row), "us");
Units::convert(track->timestamp() - prev_hit_ts.at(intercept_col).at(intercept_row), "us"))
<< " us";
hTrackTimeToPrevHit_notmatched->Fill(static_cast<double>( hTrackTimeToPrevHit_notmatched->Fill(static_cast<double>(
Units::convert(track->timestamp() - prev_hit_ts.at(intercept_col).at(intercept_row), "us"))); Units::convert(track->timestamp() - prev_hit_ts.at(intercept_col).at(intercept_row), "us")));
} }
...@@ -321,8 +319,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) { ...@@ -321,8 +319,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
} }
void AnalysisEfficiency::finalise() { void AnalysisEfficiency::finalise() {
double totalEff = double totalEff = 100 * static_cast<double>(matched_tracks) / (total_tracks > 0 ? total_tracks : 1);
100 * static_cast<double>(matched_tracks) / (total_tracks > 0 ? static_cast<double>(total_tracks) : 1.);
LOG(STATUS) << "Total efficiency of detector " << m_detector->name() << ": " << totalEff << "%, measured with " LOG(STATUS) << "Total efficiency of detector " << m_detector->name() << ": " << totalEff << "%, measured with "
<< matched_tracks << "/" << total_tracks << " matched/total tracks"; << matched_tracks << "/" << total_tracks << " matched/total tracks";
......
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