Skip to content
Snippets Groups Projects
Commit c99cc0a2 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

AnalysisTimingATLASpix: add time_offset as new parameter

(cherry picked from commit daea797d)
parent f224c4da
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D ...@@ -26,6 +26,8 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
m_highToTCut = m_config.get<int>("high_tot_cut", 40); m_highToTCut = m_config.get<int>("high_tot_cut", 40);
m_buffer_depth = m_config.get<int>("buffer_depth", 1000); m_buffer_depth = m_config.get<int>("buffer_depth", 1000);
m_time_offset = m_config.get<double>("time_offset", 0.);
// ts1Range = 0x800 * m_clkdivendM; // ts1Range = 0x800 * m_clkdivendM;
ts2Range = 0x40 * m_clkdivend2M; ts2Range = 0x40 * m_clkdivend2M;
} }
...@@ -394,6 +396,9 @@ bool EventLoaderATLASpix::read_caribou_data() { // return false when reaching eo ...@@ -394,6 +396,9 @@ bool EventLoaderATLASpix::read_caribou_data() { // return false when reaching eo
return true; return true;
} }
timestamp += m_time_offset;
LOG(DEBUG) << "Adding time_offset of " << m_time_offset << " to pixel timestamp. New pixel timestamp: " << timestamp;
// since calibration is not implemented yet, set charge = tot // since calibration is not implemented yet, set charge = tot
Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, tot, timestamp); Pixel* pixel = new Pixel(m_detector->name(), col, row, tot, tot, timestamp);
......
...@@ -120,6 +120,7 @@ namespace corryvreckan { ...@@ -120,6 +120,7 @@ namespace corryvreckan {
// int m_clkdivendM; // int m_clkdivendM;
int m_clkdivend2M; int m_clkdivend2M;
int m_buffer_depth; int m_buffer_depth;
double m_time_offset;
}; };
} // namespace corryvreckan } // namespace corryvreckan
#endif // EventLoaderATLASpix_H #endif // EventLoaderATLASpix_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment