42 LOGP(info,
"TPC VDrift was set from command line to {}, will neglect update from CCDB",
mVD.
refVDrift);
47 LOGP(info,
"TPC drift time offset was set from command line to {} mus ({} TB), will neglect update from CCDB",
54 LOGP(info,
"VDriftHelper: Temperature and pressure were set from command line to {} C and {} mbar, will neglect updates from CCDB", gaspar.Temperature, gaspar.Pressure);
55 if (gaspar.Temperature <= 0 || gaspar.Pressure <= 0) {
56 LOGP(info,
"VDriftHelper: Disabling VDrift scaling with T / P");
81 static bool firstCall =
true;
96 }
else if (
ref != prevRef) {
161 tp = (gaspar.Temperature > 0 && gaspar.Pressure > 0) ? ((gaspar.Temperature + 273.15) / gaspar.Pressure) : -1;
169 if (vd.creationTime == saveVD.creationTime) {
170 LOGP(info,
"VDriftHelper: Scaling VDrift from {} to {} with T/P from {} to {}", saveVD.getVDrift(), vd.getVDrift(), saveVD.refTP, vd.refTP);
172 LOGP(info,
"VDriftHelper: Init new VDrift of {} with T/P {}", vd.getVDrift(), vd.refTP);
190 auto loseCTime = loserVD.creationTime;
193 std::string rep = fmt::format(
"Prefer TPC Drift from {} with time {} to {} with time {}",
201 rep += fmt::format(
" but {} imposed from command line", impos);
203 LOGP(info,
"{}", rep);
224 if (std::find(inputs.begin(), inputs.end(), isp) == inputs.end()) {
225 inputs.emplace_back(isp);
245 const int64_t tsStart = vdrift.
firstTime;
246 const int64_t tsEnd = vdrift.
lastTime;
254 if ((minTimeAccepted > tsEnd) || (tsStart > maxTimeAccepted)) {
256 LOGP(warn,
"VDriftHelper: Time range of VDrift object {} - {} is not valid for time range of T/P object {} - {}! Do not extract ref. T/P for VDrift!", tsStart, tsEnd, minValidTime, maxValidTime);
263 for (int64_t ts = tsStart; ts < tsEnd; ts += tsStepMS) {
269 LOGP(error,
"VDriftHelper: Could not get T/P for time range {} -> {}", tsStart, tsEnd);
275 LOGP(info,
"VDriftHelper: Setting mean T/P for VDrift to {} for time range {} -> {}", meanTP, tsStart, tsEnd);
276 vdrift.
refTP = meanTP;
Simple interface to the CDB manager.
calibration data from laser track calibration
Definition of the parameter class for the detector.
Definition of the parameter class for the detector electronics.
Definition of the parameter class for the detector gas.
Helper class to extract VDrift from different sources.
static constexpr long MINUTE
static const ParameterGas & Instance()
static EParamProvenance getProvenance(const std::string &key)
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs)
float getTP(int64_t ts) const
void extractCCDBInputs(o2::framework::ProcessingContext &pc) const
trigger checking for CCDB objects
std::pair< ULong64_t, ULong64_t > getMinMaxTime() const
get minimum and maximum time stamps of the pressure and temperature data
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
check for new CCDB objects
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
bool extractTPForVDrift(VDriftCorrFact &vdrift, int64_t tsStepMS=100 *1000)
bool mIsTPScalingPossible
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
static void addInput(std::vector< o2::framework::InputSpec > &inputs, o2::framework::InputSpec &&isp)
std::string_view getSourceName() const
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static constexpr std::array< std::string_view, NSources > SourceNames
void accountDriftCorrectionITSTPCTgl(const VDriftCorrFact *calib)
VDriftCorrFact mVDTPCITSTgl
PressureTemperatureHelper mPTHelper
void accountLaserCalibration(const LtrCalibData *calib, long fallBackTimeStamp=2)
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
Global TPC definitions and constants.
const std::unordered_map< CDBType, const std::string > CDBTypeMap
Storage name in CCDB for each calibration and parameter type.
@ CalVDriftTgl
ITS-TPC difTgl vdrift calibration.
@ CalLaserTracks
Laser track calibration data.
float getDriftVCorrection() const
float dvCorrectionA
drift velocity correction factor A-Side (inverse multiplicative)
float tp
temperature over pressure ratio
float dvCorrectionC
drift velocity correction factor C-Side (inverse multiplicative)
uint16_t nTracksC
number of tracks used for C-Side fit
long creationTime
time of creation
uint16_t nTracksA
number of tracks used for A-Side fit
float refTimeOffset
additive time offset reference (\mus)
float refVDrift
reference vdrift for which factor was extracted
float DriftV
Drift velocity [cm/us].
long creationTime
time of creation
void normalizeOffset(float newRefTimeOffset=-999.)
float corrFactErr
stat error of correction factor
float refTimeOffset
additive time offset reference (\mus)
void normalize(float newVRef=0.f, float tp=0.f)
long lastTime
last time stamp of processed TFs
float refVDrift
reference vdrift for which factor was extracted
float getTimeOffset() const
float timeOffsetCorr
additive time offset correction (\mus)
float corrFact
drift velocity correction factor (multiplicative)
float refTP
reference temperature / pressure for which refVDrift was extracted
long firstTime
first time stamp of processed TFs
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"