Project
Loading...
Searching...
No Matches
VDriftHelper.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef TPC_VDRIFT_HELPER_H_
17#define TPC_VDRIFT_HELPER_H_
18
19#include "GPUCommonRtypes.h"
22#include <array>
23#include <vector>
24#include <string_view>
25
26namespace o2::framework
27{
28class ProcessingContext;
30class InputSpec;
31} // namespace o2::framework
32
33namespace o2::tpc
34{
35class LtrCalibData;
36
38{
39 public:
40 enum Source : int { Param,
44 };
45 static constexpr std::array<std::string_view, NSources> SourceNames = {
46 "Param",
47 "Laser",
48 "TPCITSTgl"};
49
51 void accountLaserCalibration(const LtrCalibData* calib, long fallBackTimeStamp = 2);
53 bool isUpdated() const { return mUpdated; }
54 void acknowledgeUpdate() { mUpdated = false; }
55
56 const VDriftCorrFact& getVDriftObject() const { return mVD; }
57 Source getSource() const { return mSource; }
58 static std::string_view getSourceName(Source s) { return SourceNames[s]; }
59 std::string_view getSourceName() const { return SourceNames[mSource]; }
60 const auto& getPTHelper() const { return mPTHelper; }
61
62 bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher& matcher, void* obj);
63 void extractCCDBInputs(o2::framework::ProcessingContext& pc, bool laser = true, bool itstpcTgl = true);
64 static void requestCCDBInputs(std::vector<o2::framework::InputSpec>& inputs, bool laser = true, bool itstpcTgl = true);
65
66 protected:
67 static void addInput(std::vector<o2::framework::InputSpec>& inputs, o2::framework::InputSpec&& isp);
68 bool extractTPForVDrift(VDriftCorrFact& vdrift, int64_t tsStepMS = 100 * 1000);
72 Source mSource{Source::Param}; // update source
73 bool mUpdated = false; // signal update, must be reset once new value is fetched
74 bool mIsTPScalingPossible = false; // if T/P scaling is possible always perform the updating
75 bool mForceParamDrift = false; // enforce vdrift from gasParam
76 bool mForceParamOffset = false; // enforce offset from DetectorParam
77 bool mForceTPScaling = false; // enforce T/P scaling from gasParam (scaling disabled by negative T or P)
78 uint32_t mMayRenormSrc = 0xffffffff; // if starting VDrift correction != 1, we will renorm reference in such a way that initial correction is 1.0, flag per source
79 PressureTemperatureHelper mPTHelper; // helper to extract pressure and temperature from CCDB
80
82};
83} // namespace o2::tpc
84#endif
uint64_t laser
Helper class to extract pressure and temperature.
calibration data from laser track calibration
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
bool extractTPForVDrift(VDriftCorrFact &vdrift, int64_t tsStepMS=100 *1000)
VDriftCorrFact mVDLaser
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
const auto & getPTHelper() const
const VDriftCorrFact & getVDriftObject() const
static void addInput(std::vector< o2::framework::InputSpec > &inputs, o2::framework::InputSpec &&isp)
std::string_view getSourceName() const
ClassDefNV(VDriftHelper, 2)
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static std::string_view getSourceName(Source s)
static constexpr std::array< std::string_view, NSources > SourceNames
Source getSource() const
VDriftCorrFact mVD
void accountDriftCorrectionITSTPCTgl(const VDriftCorrFact *calib)
VDriftCorrFact mVDTPCITSTgl
PressureTemperatureHelper mPTHelper
bool isUpdated() const
void accountLaserCalibration(const LtrCalibData *calib, long fallBackTimeStamp=2)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
Global TPC definitions and constants.
Definition SimTraits.h:167