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"
21#include <array>
22#include <vector>
23#include <string_view>
24
25namespace o2::framework
26{
27class ProcessingContext;
29class InputSpec;
30} // namespace o2::framework
31
32namespace o2::tpc
33{
34class LtrCalibData;
35
37{
38 public:
39 enum Source : int { Param,
43 };
44 static constexpr std::array<std::string_view, NSources> SourceNames = {
45 "Param",
46 "Laser",
47 "TPCITSTgl"};
48
50 void accountLaserCalibration(const LtrCalibData* calib, long fallBackTimeStamp = 2);
52 bool isUpdated() const { return mUpdated; }
53 void acknowledgeUpdate() { mUpdated = false; }
54
55 const VDriftCorrFact& getVDriftObject() const { return mVD; }
56 Source getSource() const { return mSource; }
57 static std::string_view getSourceName(Source s) { return SourceNames[s]; }
58 std::string_view getSourceName() const { return SourceNames[mSource]; }
59
60 bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher& matcher, void* obj);
61 void extractCCDBInputs(o2::framework::ProcessingContext& pc, bool laser = true, bool itstpcTgl = true);
62 static void requestCCDBInputs(std::vector<o2::framework::InputSpec>& inputs, bool laser = true, bool itstpcTgl = true);
63
64 protected:
65 static void addInput(std::vector<o2::framework::InputSpec>& inputs, o2::framework::InputSpec&& isp);
69 Source mSource{Source::Param}; // update source
70 bool mUpdated = false; // signal update, must be reset once new value is fetched
71 bool mForceParamDrift = false; // enforce vdrift from gasParam
72 bool mForceParamOffset = false; // enforce offset from DetectorParam
73 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
74
76};
77} // namespace o2::tpc
78#endif
uint64_t laser
calibration data from laser track calibration
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, bool laser=true, bool itstpcTgl=true)
VDriftCorrFact mVDLaser
void extractCCDBInputs(o2::framework::ProcessingContext &pc, bool laser=true, bool itstpcTgl=true)
const VDriftCorrFact & getVDriftObject() const
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 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
ClassDefNV(VDriftHelper, 1)
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