Skip to content

Commit

Permalink
decrease precision in checking of TOF keywords
Browse files Browse the repository at this point in the history
also use new names for the keywords
  • Loading branch information
KrisThielemans committed Jan 5, 2024
1 parent 19f14d8 commit ea53324
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/IO/InterfileHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1367,23 +1367,23 @@ bool InterfilePDFSHeader::post_processing()
if (guessed_scanner_ptr->is_tof_ready())
{
if (max_num_timing_poss != guessed_scanner_ptr->get_max_num_timing_poss())
{
warning("Interfile warning: 'Number of TOF time bins' (%d) is expected to be %d.",
max_num_timing_poss, guessed_scanner_ptr->get_max_num_timing_poss());
{
warning(boost::format("Interfile warning: 'Maximum number of (unmashed) TOF time bins' (%d) is expected to be %d.") %
max_num_timing_poss % guessed_scanner_ptr->get_max_num_timing_poss());
mismatch_between_header_and_guess = true;
}
if (size_of_timing_pos != guessed_scanner_ptr->get_size_of_timing_pos())
{
warning("Interfile warning: 'Size of timing bin (ps)' (%f) is expected to be %f.",
size_of_timing_pos, guessed_scanner_ptr->get_size_of_timing_pos());
}
if (abs(size_of_timing_pos - guessed_scanner_ptr->get_size_of_timing_pos()) > 0.001F)
{
warning(boost::format("Interfile warning: 'Size of unmashed TOF timing bin (ps)' (%f) is expected to be %f.") %
size_of_timing_pos % guessed_scanner_ptr->get_size_of_timing_pos());
mismatch_between_header_and_guess = true;
}
if (timing_resolution != guessed_scanner_ptr->get_timing_resolution())
{
warning("Interfile warning: 'Timing resolution (ps)' (%f) is expected to be %f.",
timing_resolution, guessed_scanner_ptr->get_timing_resolution());
}
if (abs(timing_resolution - guessed_scanner_ptr->get_timing_resolution()) > 0.01F)
{
warning(boost::format("Interfile warning: 'TOF timing resolution (ps)' (%f) is expected to be %f.") %
timing_resolution % guessed_scanner_ptr->get_timing_resolution());
mismatch_between_header_and_guess = true;
}
}
}

// end of checks. If they failed, we ignore the guess
Expand Down

0 comments on commit ea53324

Please sign in to comment.