Commit c50b8200 authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

EventLoaderCLICpix2: fix calculation to set timestamp half way between the shutter open and close

(cherry picked from commit a46efdfa3f94373bb0be878491992df03ca0927e)
parent c9836703
......@@ -256,7 +256,7 @@ StatusCode EventLoaderCLICpix2::run(std::shared_ptr<Clipboard> clipboard) {
}
// Time defaults ot rising shutter edge:
double timestamp = (shutterStartTime - shutterStopTime) / 2;
double timestamp = shutterStartTime + (shutterStopTime - shutterStartTime) / 2;
// Decide whether information is counter of ToA
if(matrix_config[std::make_pair(row, col)].GetCountingMode()) {
......@@ -288,6 +288,8 @@ StatusCode EventLoaderCLICpix2::run(std::shared_ptr<Clipboard> clipboard) {
pixels->push_back(pixel);
npixels++;
hHitMap->Fill(col, row);
LOG(TRACE) << "Adding pixel (col, row, tot, timestamp): " << col << ", " << row << ", " << tot << ", "
<< Units::display(timestamp, {"ns", "us", "s"});
}
}
} catch(caribou::DataException& e) {
......
Supports Markdown
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