Project
Loading...
Searching...
No Matches
CorrectionMapsHelper.cxx
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
13#include "GPUCommonLogger.h"
14
15using namespace o2::gpu;
16using namespace o2::tpc;
17
18//________________________________________________________
20{
21 mLumiCTPAvailable = false;
22 mCorrMap = nullptr;
23 mCorrMapRef = nullptr;
24 mCorrMapMShape.reset();
25 mUpdatedFlags = 0;
26 mInstLumiCTP = 0.f;
27 mInstLumi = 0.f;
28 mMeanLumi = 0.f;
29 mMeanLumiRef = 0.f;
30}
31
32void CorrectionMapsHelper::setCorrMapMShape(std::unique_ptr<TPCFastTransform>&& m)
33{
35 mCorrMapMShape = std::move(m);
36}
37
39{
40 if (!canUseCorrections()) {
41 mLumiScale = -1.f;
42 } else if ((mLumiScaleMode == LumiScaleMode::DerivativeMap) || (mLumiScaleMode == LumiScaleMode::DerivativeMapMC)) {
44 LOGP(debug, "mInstLumi: {} mMeanLumi: {} mMeanLumiRef: {}", mInstLumi, mMeanLumi, mMeanLumiRef);
45 } else {
47 }
49 if (report) {
51 }
52}
53
54//________________________________________________________
56{
57 LOGP(info, "Map scaling update: LumiScaleType={} instLumi(CTP)={} instLumi(scaling)={} meanLumiRef={}, meanLumi={} -> LumiScale={} lumiScaleMode={}, M-Shape map valid: {}, M-Shape default: {}",
58 mLumiScaleType == LumiScaleType::NoScaling ? "NoScaling" : (mLumiScaleType == LumiScaleType::CTPLumi ? "LumiCTP" : "TPCScaler"), getInstLumiCTP(), getInstLumi(), getMeanLumiRef(), getMeanLumi(), getLumiScale(),
59 mLumiScaleMode == LumiScaleMode::Linear ? "Linear" : "Derivative", (mCorrMapMShape != nullptr), isCorrMapMShapeDummy());
60}
Helper class to access correction maps.
std::ostringstream debug
o2::gpu::TPCFastTransform * mCorrMap
std::unique_ptr< o2::gpu::TPCFastTransform > mCorrMapMShape
void updateLumiScale(bool report=false)
void setCorrMapMShape(std::unique_ptr< o2::gpu::TPCFastTransform > &&m)
o2::gpu::TPCFastTransform * mCorrMapRef
bool isCorrMapMShapeDummy() const
return returns if the correction map for the M-shape correction is a dummy spline object
const GLfloat * m
Definition glcorearb.h:4066
void report(gsl::span< o2::InteractionTimeRecord > irs, int threshold, bool verbose)
Global TPC definitions and constants.
Definition SimTraits.h:168