From 83dd3c52252960d1d84ffde96e65b83a26576d16 Mon Sep 17 00:00:00 2001 From: wiechula Date: Mon, 4 Mar 2024 14:22:51 +0100 Subject: [PATCH] better defaults, getter for vdrift --- .../Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DataFormats/Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h b/DataFormats/Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h index 17378df332775..87b8b3d6c7130 100644 --- a/DataFormats/Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h +++ b/DataFormats/Detectors/TPC/include/DataFormatsTPC/LtrCalibData.h @@ -30,8 +30,8 @@ struct LtrCalibData { uint64_t firstTime{}; ///< first time stamp of processed TFs uint64_t lastTime{}; ///< last time stamp of processed TFs long creationTime{}; ///< time of creation - float dvCorrectionA{}; ///< drift velocity correction factor A-Side (inverse multiplicative) - float dvCorrectionC{}; ///< drift velocity correction factor C-Side (inverse multiplicative) + float dvCorrectionA{1.f}; ///< drift velocity correction factor A-Side (inverse multiplicative) + float dvCorrectionC{1.f}; ///< drift velocity correction factor C-Side (inverse multiplicative) float dvOffsetA{}; ///< drift velocity trigger offset A-Side float dvOffsetC{}; ///< drift velocity trigger offset C-Side float refVDrift{}; ///< reference vdrift for which factor was extracted @@ -70,6 +70,8 @@ struct LtrCalibData { return correction / nCorr; } + float getVDrift() const { return refVDrift / getDriftVCorrection(); } + float getTimeOffset() const { return refTimeOffset + timeOffsetCorr; } // renormalize reference and correction either to provided new reference (if >0) or to correction 1 wrt current reference