From 9cfe7601a582bbddb5541bfb77bfe8c480aa08da Mon Sep 17 00:00:00 2001 From: wiechula Date: Tue, 6 Feb 2024 15:09:35 +0100 Subject: [PATCH 1/2] fix lifetime --- Detectors/TPC/workflow/src/CalibdEdxSpec.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/TPC/workflow/src/CalibdEdxSpec.cxx b/Detectors/TPC/workflow/src/CalibdEdxSpec.cxx index 8491fe6c772b6..2447b1f3969f2 100644 --- a/Detectors/TPC/workflow/src/CalibdEdxSpec.cxx +++ b/Detectors/TPC/workflow/src/CalibdEdxSpec.cxx @@ -129,7 +129,7 @@ DataProcessorSpec getCalibdEdxSpec(const o2::base::Propagator::MatCorrType matTy std::vector outputs; outputs.emplace_back(ConcreteDataTypeMatcher{o2::calibration::Utils::gDataOriginCDBPayload, "TPC_CalibdEdx"}, Lifetime::Sporadic); outputs.emplace_back(ConcreteDataTypeMatcher{o2::calibration::Utils::gDataOriginCDBWrapper, "TPC_CalibdEdx"}, Lifetime::Sporadic); - std::vector inputs{{"tracks", "TPC", "MIPS"}}; + std::vector inputs{{"tracks", "TPC", "MIPS", Lifetime::Sporadic}}; auto ccdbRequest = std::make_shared(true, // orbitResetTime false, // GRPECS=true false, // GRPLHCIF From 0df77e0e922f07baa9a6c10812a0e7e9a860e638 Mon Sep 17 00:00:00 2001 From: wiechula Date: Mon, 4 Mar 2024 14:22:51 +0100 Subject: [PATCH 2/2] 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