Project
Loading...
Searching...
No Matches
CorrectionMapsLoader.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_CORRECTION_MAPS_LOADER_H_
17#define TPC_CORRECTION_MAPS_LOADER_H_
18
19#ifndef GPUCA_GPUCODE_DEVICE
20#include <memory>
21#include <vector>
22#endif
24
25namespace o2
26{
27namespace framework
28{
29class ProcessingContext;
31class InputSpec;
32class ConfigParamSpec;
33class ConfigParamRegistry;
34class InitContext;
35} // namespace framework
36
37namespace tpc
38{
39
41 int lumiType = 0;
42 int lumiMode = 0;
44 bool requestCTPLumi = true; //< request CTP Lumi regardless of what is used for corrections scaling
45
47 {
48 return lumiType == 2 || enableMShapeCorrection;
49 }
50};
51
53{
54 public:
58
59#ifndef GPUCA_GPUCODE_DEVICE
60 bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher& matcher, void* obj);
62 void updateVDrift(float vdriftCorr, float vdrifRef, float driftTimeOffset = 0);
65 void updateInverse();
66
67 static void requestCCDBInputs(std::vector<o2::framework::InputSpec>& inputs, std::vector<o2::framework::ConfigParamSpec>& options, const CorrectionMapsLoaderGloOpts& gloOpts);
68 static void addGlobalOptions(std::vector<o2::framework::ConfigParamSpec>& options);
69 static void addOptions(std::vector<o2::framework::ConfigParamSpec>& options);
71
72 protected:
73 static void addOption(std::vector<o2::framework::ConfigParamSpec>& options, o2::framework::ConfigParamSpec&& osp);
74 static void addInput(std::vector<o2::framework::InputSpec>& inputs, o2::framework::InputSpec&& isp);
75
76 float mInstLumiCTPFactor = 1.0; // multiplicative factor for inst. lumi
77 int mLumiCTPSource = 0; // 0: main, 1: alternative CTP lumi source
78 std::unique_ptr<o2::gpu::TPCFastTransform> mCorrMapMShape{nullptr};
79#endif
80};
81
82} // namespace tpc
83
84} // namespace o2
85
86#endif
Helper class to access correction maps.
void extractCCDBInputs(o2::framework::ProcessingContext &pc)
void updateVDrift(float vdriftCorr, float vdrifRef, float driftTimeOffset=0)
static void addGlobalOptions(std::vector< o2::framework::ConfigParamSpec > &options)
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
static void addOptions(std::vector< o2::framework::ConfigParamSpec > &options)
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs, std::vector< o2::framework::ConfigParamSpec > &options, const CorrectionMapsLoaderGloOpts &gloOpts)
recalculate inverse correction
CorrectionMapsLoader(const CorrectionMapsLoader &)=delete
void init(o2::framework::InitContext &ic)
static void addOption(std::vector< o2::framework::ConfigParamSpec > &options, o2::framework::ConfigParamSpec &&osp)
std::unique_ptr< o2::gpu::TPCFastTransform > mCorrMapMShape
void copySettings(const CorrectionMapsLoader &src)
static CorrectionMapsLoaderGloOpts parseGlobalOptions(const o2::framework::ConfigParamRegistry &opts)
static void addInput(std::vector< o2::framework::InputSpec > &inputs, o2::framework::InputSpec &&isp)
GLenum src
Definition glcorearb.h:1767
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
int lumiType
what estimator to used for corrections scaling: 0: no scaling, 1: CTP, 2: IDC
int lumiMode
what corrections method to use: 0: classical scaling, 1: Using of the derivative map,...