22#include <boost/property_tree/ptree.hpp>
35 mReferenceDriftV = o2::conf::ConfigurableParam::getValueAs<float>(
"TPCGasParam.DriftV");
36 LOGP(info,
"Setting reference drift velocity to {}", mReferenceDriftV);
41 applyLaserVDrift(pc.inputs());
45 float mReferenceDriftV{};
47 std::unique_ptr<const LtrCalibData> mLtrCalibData;
53void ApplyCCDBCalibDevice::applyLaserVDrift(
InputRecord& inputs)
55 auto ltrCalibPtr = inputs.
get<LtrCalibData*>(
"calibLaserTracks");
57 mLtrCalibData.reset(ltrCalibPtr.release());
58 LOGP(info,
"Laser track calibration initialized: {} - {}: A - {} C - {}", mLtrCalibData->firstTime, mLtrCalibData->lastTime, mLtrCalibData->dvCorrectionA, mLtrCalibData->dvCorrectionC);
61 if (ltrCalibPtr->firstTime != mLtrCalibData->firstTime) {
62 mLtrCalibData.reset(ltrCalibPtr.release());
63 LOGP(info,
"Laser track calibration updated: {} - {}: A - {} C - {}, was {} - {}: A - {} C - {}", mLtrCalibData->firstTime, mLtrCalibData->lastTime, mLtrCalibData->dvCorrectionA, mLtrCalibData->dvCorrectionC, ltrCalibPtr->firstTime, ltrCalibPtr->lastTime, ltrCalibPtr->dvCorrectionA, ltrCalibPtr->dvCorrectionC);
69void ApplyCCDBCalibDevice::updateVDrift()
71 const float oldDriftV = mDriftV;
72 mDriftV = mReferenceDriftV * mLtrCalibData->getDriftVCorrection();
73 LOGP(info,
"updating drift velocity correction to {}, was {}, reference is {} (cm / us)", mDriftV, oldDriftV, mReferenceDriftV);
74 o2::conf::ConfigurableParam::setValue<float>(
"TPCGasParam",
"DriftV", mDriftV);
82 std::vector<InputSpec> inputs{
83 InputSpec{
"calibLaserTracks",
"TPC",
"CalibLaserTracks", 0, Lifetime::Condition,
ccdbParamSpec(
"TPC/Calib/LaserTracks")},
88 "tpc-apply-ccdb-calib",
Device to apply calibrations loaded from CCDB.
calibration data from laser track calibration
Definition of the parameter class for the detector gas.
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< ConfigParamSpec > Options
ConfigParamSpec startTimeParamSpec(int64_t t)
std::vector< OutputSpec > Outputs
Global TPC definitions and constants.
o2::framework::DataProcessorSpec getApplyCCDBCalibSpec()