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

removed unused timewalk correction stuff and unused parameters

parent 640e9586
......@@ -16,6 +16,10 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
// m_clkdivendM = m_config.get<int>("clkdivend", 0.) + 1;
m_clkdivend2M = m_config.get<int>("clkdivend2", 0.) + 1;
if(m_config.has("calibration_file")) {
m_calibrationFile = m_config.getPath("calibration_file");
}
// ts1Range = 0x800 * m_clkdivendM;
ts2Range = 0x40 * m_clkdivend2M;
}
......@@ -139,11 +143,6 @@ void EventLoaderATLASpix::initialise() {
calibration.close();
}
LOG(INFO) << "Timewalk correction factors: ";
for(auto& ts : m_timewalkCorrectionFactors) {
LOG(INFO) << ts;
}
LOG(INFO) << "Using clock cycle length of " << m_clockCycle << " ns." << std::endl;
m_oldtoa = 0;
......@@ -532,15 +531,6 @@ Pixels* EventLoaderATLASpix::read_legacy_data(double, double) {
double toa_timestamp =
4096. * 2 * static_cast<double>(toa); // runs with 20MHz, multiply by 2 to scale counter value to 40MHz
// Timewalk correction:
if(m_timewalkCorrectionFactors.size() == 5) {
double corr = m_timewalkCorrectionFactors.at(0) + m_timewalkCorrectionFactors.at(1) * tot +
m_timewalkCorrectionFactors.at(2) * tot * tot +
m_timewalkCorrectionFactors.at(3) * tot * tot * tot +
m_timewalkCorrectionFactors.at(4) * tot * tot * tot * tot;
toa_timestamp -= corr * 163840000000; //(40000000 * 4096)
}
// Convert TOA to nanoseconds:
toa_timestamp /= (4096. * 0.04);
......
......@@ -72,6 +72,8 @@ namespace corryvreckan {
bool m_detectorBusy;
bool m_legacyFormat;
double m_clockCycle;
std::string m_calibrationFile;
std::vector<double> m_calibrationFactors;
// int m_clkdivendM;
int m_clkdivend2M;
......
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