Skip to content

Commit

Permalink
Make extra cov.error for TPC linear in CTP Lumi
Browse files Browse the repository at this point in the history
Make sure the CTP lumi input is available if CorrectionMaps helper needs it.
Now the trackTuneParams.tpcCovInnerSlope[0..4] and trackTuneParams.tpcCovOuterSlope[0..4]
configurable can be used to scale the TPC extra cov.matrix errors lineraly with scaling parameters.
All devices (re)fitting TPC tracks will apply the errors (if allowed by other options of trackTuneParams)
tpcParInner * lumi*tpcCovInnerSlope and tpcParOuter * lumi*tpcCovOuterSlope, with lumi being
CorrectionMapsHelper.getInstLumiCTP()
  • Loading branch information
shahor02 committed Feb 3, 2024
1 parent 21a35fa commit 002fc7b
Show file tree
Hide file tree
Showing 27 changed files with 122 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "CommonUtils/ConfigurableParam.h"
#include "CommonUtils/ConfigurableParamHelper.h"
#include <array>

namespace o2
{
Expand All @@ -32,13 +33,34 @@ struct TrackTuneParams : public o2::conf::ConfigurableParamHelper<TrackTuneParam
};
AddCovType tpcCovInnerType = AddCovType::Disable;
AddCovType tpcCovOuterType = AddCovType::Disable;
bool sourceLevelTPC = true; // if TPC corrections are allowed, apply them TPC source output level (tracking/reader), otherwise in the global tracking consumers BEFORE update by external detector
bool sourceLevelTPC = true; // if TPC corrections are allowed, apply them TPC source output level (tracking), otherwise in the global tracking consumers BEFORE update by external detector
bool applyWhenReading = false; // if true, then apply at reading tracks from the file. This better NOT used as there is no way to apply lumi-dependent scaling in the reader
bool useTPCInnerCorr = false; // request to correct TPC inner param
bool useTPCOuterCorr = false; // request to correct TPC outer param
float tpcParInner[5] = {}; // ad hoc correction to be added to TPC param at the inner XRef
float tpcParOuter[5] = {}; // ad hoc correction to be added to TPC param at the outer XRef
float tpcCovInner[5] = {}; // ad hoc errors to be added to TPC cov.matrix at the inner XRef
float tpcCovOuter[5] = {}; // ad hoc errors to be added to TPC outer param at the outer XRef
float tpcCovInnerSlope[5] = {}; // slope with respect to lumi, total correction = tpcParInner * lumi*tpcCovInnerSlope
float tpcCovOuterSlope[5] = {}; // slope with respect to lumi, total correction = tpcParOuter * lumi*tpcCovOuterSlope

auto getCovInnerTotal(float scale) const
{
std::array<float, 5> cov{};
for (int i = 0; i < 5; i++) {
cov[i] = tpcCovInner[i] + scale * tpcCovInnerSlope[i];
}
return cov;
}

auto getCovOuterTotal(float scale) const
{
std::array<float, 5> cov{};
for (int i = 0; i < 5; i++) {
cov[i] = tpcCovOuter[i] + scale * tpcCovOuterSlope[i];
}
return cov;
}

O2ParamDef(TrackTuneParams, "trackTuneParams");
};
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ void BarrelAlignmentSpec::updateTimeDependentParams(ProcessingContext& pc)
mTPCCorrMapsLoader.extractCCDBInputs(pc);
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mController->setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mController->setTPCCorrMaps(&mTPCCorrMapsLoader);
if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Align/Workflow/src/barrel-alignment-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
}
LOG(info) << "adding TOF request";
}
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
src = src | GID::getSourcesMask("CTP");
}
// write the configuration used for the workflow
Expand Down
3 changes: 3 additions & 0 deletions Detectors/GlobalTracking/include/GlobalTracking/MatchTOF.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ class MatchTOF
UInt_t mDBGFlags = 0;
std::string mDebugTreeFileName = "dbg_matchTOF.root"; ///< name for the debug tree file

std::array<float, 5> mCovDiagInner{}; ///< total cov.matrix extra diagonal error from TrackTuneParams
std::array<float, 5> mCovDiagOuter{}; ///< total cov.matrix extra diagonal error from TrackTuneParams

///----------- aux stuff --------------///
static constexpr float MAXSNP = 0.85; // max snp of ITS or TPC track at xRef to be matched

Expand Down
3 changes: 3 additions & 0 deletions Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ class MatchTPCITS
std::array<int16_t, o2::constants::lhc::LHCMaxBunches> mClosestBunchAbove; // closest filled bunch from above
std::array<int16_t, o2::constants::lhc::LHCMaxBunches> mClosestBunchBelow; // closest filled bunch from below

std::array<float, 5> mCovDiagInner{}; ///< total cov.matrix extra diagonal error from TrackTuneParams
std::array<float, 5> mCovDiagOuter{}; ///< total cov.matrix extra diagonal error from TrackTuneParams

const o2::itsmft::ChipMappingITS ITSChMap{};

const o2::globaltracking::RecoContainer* mRecoCont = nullptr;
Expand Down
27 changes: 18 additions & 9 deletions Detectors/GlobalTracking/src/MatchTOF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ using trkType = o2::dataformats::MatchInfoTOFReco::TrackType;
using Cluster = o2::tof::Cluster;
using GTrackID = o2::dataformats::GlobalTrackID;
using timeEst = o2::dataformats::TimeStampWithError<float, float>;
using TrackTunePar = o2::globaltracking::TrackTuneParams;

bool MatchTOF::mHasFillScheme = false;
bool MatchTOF::mFillScheme[o2::constants::lhc::LHCMaxBunches] = {0};
Expand Down Expand Up @@ -504,13 +505,13 @@ void MatchTOF::propagateTPCTracks(int sec)

o2::track::TrackLTIntegral& intLT0 = mLTinfos[sec][trkType::UNCONS][it];

const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance();
const auto& trackTune = TrackTuneParams::Instance();
if (!trackTune.sourceLevelTPC) { // correct only if TPC track was not corrected at the source level
if (trackTune.useTPCOuterCorr) {
trc.updateParams(trackTune.tpcParOuter);
}
if (trackTune.tpcCovOuterType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) { // only TRD-refitted track have cov.matrix already man>
trc.updateCov(trackTune.tpcCovOuter, trackTune.tpcCovOuterType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovOuterType != TrackTuneParams::AddCovType::Disable) { // only TRD-refitted track have cov.matrix already man>
trc.updateCov(mCovDiagOuter, trackTune.tpcCovOuterType == TrackTuneParams::AddCovType::WithCorrelations);
}
}
if (!propagateToRefXWithoutCov(trc, mXRef, 10, mBz)) { // we first propagate to 371 cm without considering the covariance matri
Expand Down Expand Up @@ -669,13 +670,13 @@ void MatchTOF::addTPCSeed(const o2::tpc::TrackTPC& _tr, o2::dataformats::GlobalT
mLTinfos[sector][trkType::UNCONS].emplace_back(intLT0);

/*
const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance();
const auto& trackTune = TrackTuneParams::Instance();
if (!trackTune.sourceLevelTPC) { // correct only if TPC track was not corrected at the source level
if (trackTune.useTPCOuterCorr) {
trc.updateParams(trackTune.tpcParOuter);
}
if (trackTune.tpcCovOuterType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) { // only TRD-refitted track have cov.matrix already manipulated
trc.updateCov(trackTune.tpcCovOuter, trackTune.tpcCovOuterType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovOuterType != TrackTuneParams::AddCovType::Disable) { // only TRD-refitted track have cov.matrix already manipulated
trc.updateCov(mCovDiagOuter, trackTune.tpcCovOuterType == TrackTuneParams::AddCovType::WithCorrelations);
}
}
if (!propagateToRefXWithoutCov(trc, mXRef, 10, mBz)) { // we first propagate to 371 cm without considering the covariance matri
Expand Down Expand Up @@ -1712,6 +1713,14 @@ void MatchTOF::updateTimeDependentParams()

mBz = o2::base::Propagator::Instance()->getNominalBz();
mMaxInvPt = abs(mBz) > 0.1 ? 1. / (abs(mBz) * 0.05) : 999.;

const auto& trackTune = TrackTuneParams::Instance();
float scale = mTPCCorrMapsHelper->getInstLumiCTP();
if (scale < 0.f) {
scale = 0.f;
}
mCovDiagInner = trackTune.getCovInnerTotal(scale);
mCovDiagOuter = trackTune.getCovOuterTotal(scale);
}

//_________________________________________________________
Expand Down Expand Up @@ -1763,12 +1772,12 @@ bool MatchTOF::makeConstrainedTPCTrack(int matchedID, o2::dataformats::TrackTPCT
LOGP(debug, "Inward Refit failed {}", trConstr.asString());
return false;
}
const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance(); // if needed, correct TPC track after inward refit
const auto& trackTune = TrackTuneParams::Instance(); // if needed, correct TPC track after inward refit
if (!trackTune.useTPCInnerCorr) {
trConstr.updateParams(trackTune.tpcParInner);
}
if (trackTune.tpcCovInnerType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) {
trConstr.updateCov(trackTune.tpcCovInner, trackTune.tpcCovInnerType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovInnerType != TrackTuneParams::AddCovType::Disable) {
trConstr.updateCov(mCovDiagInner, trackTune.tpcCovInnerType == TrackTuneParams::AddCovType::WithCorrelations);
}

trConstr.setChi2Refit(chi2);
Expand Down
27 changes: 18 additions & 9 deletions Detectors/GlobalTracking/src/MatchTPCITS.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ using MatrixDSym4 = ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<doub
using MatrixD4 = ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepStd<double, 4>>;
using NAMES = o2::base::NameConf;
using GTrackID = o2::dataformats::GlobalTrackID;
using TrackTunePar = o2::globaltracking::TrackTuneParams;
constexpr float MatchTPCITS::Tan70, MatchTPCITS::Cos70I2, MatchTPCITS::MaxSnp, MatchTPCITS::MaxTgp;

LinksPoolMT* TPCABSeed::gLinksPool = nullptr;
Expand Down Expand Up @@ -265,6 +266,14 @@ void MatchTPCITS::updateTimeDependentParams()
o2::math_utils::Point3D<float> p0(90., 1., 1), p1(90., 100., 100.);
auto matbd = o2::base::Propagator::Instance()->getMatBudget(mParams->matCorr, p0, p1);
mTPCmeanX0Inv = matbd.meanX2X0 / matbd.length;

const auto& trackTune = TrackTuneParams::Instance();
float scale = mTPCCorrMapsHelper->getInstLumiCTP();
if (scale < 0.f) {
scale = 0.f;
}
mCovDiagInner = trackTune.getCovInnerTotal(scale);
mCovDiagOuter = trackTune.getCovOuterTotal(scale);
}

//______________________________________________
Expand Down Expand Up @@ -419,15 +428,15 @@ void MatchTPCITS::addTPCSeed(const o2::track::TrackParCov& _tr, float t0, float
MinusOne,
(extConstrained || tpcOrig.hasBothSidesClusters()) ? TrackLocTPC::Constrained : (tpcOrig.hasASideClustersOnly() ? TrackLocTPC::ASide : TrackLocTPC::CSide)});
// propagate to matching Xref
const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance();
const auto& trackTune = TrackTuneParams::Instance();
// only TPC standalone need to be corrected on the input, provided they were not corrected at the source level,
// other inputs are corrected in respective upstream matching processes
if (srcGID.getSource() == GTrackID::TPC && !trackTune.sourceLevelTPC) {
if (trackTune.useTPCInnerCorr) {
trc.updateParams(trackTune.tpcParInner);
}
if (trackTune.tpcCovInnerType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) {
trc.updateCov(trackTune.tpcCovInner, trackTune.tpcCovInnerType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovInnerType != TrackTuneParams::AddCovType::Disable) {
trc.updateCov(mCovDiagInner, trackTune.tpcCovInnerType == TrackTuneParams::AddCovType::WithCorrelations);
}
}
if (!propagateToRefX(trc)) {
Expand Down Expand Up @@ -1450,12 +1459,12 @@ bool MatchTPCITS::refitTrackTPCITS(int iTPC, int& iITS, pmr::vector<o2::dataform
tofL.addX2X0(lInt * mTPCmeanX0Inv);
propagator->PropagateToXBxByBz(tracOut, o2::constants::geom::XTPCOuterRef, MaxSnp, 10., mUseMatCorrFlag, &tofL);

const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance();
const auto& trackTune = TrackTuneParams::Instance();
if (trackTune.useTPCOuterCorr) {
tracOut.updateParams(trackTune.tpcParOuter);
}
if (trackTune.tpcCovOuterType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) {
tracOut.updateCov(trackTune.tpcCovOuter, trackTune.tpcCovOuterType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovOuterType != TrackTuneParams::AddCovType::Disable) {
tracOut.updateCov(mCovDiagOuter, trackTune.tpcCovOuterType == TrackTuneParams::AddCovType::WithCorrelations);
}
}
trfit.setChi2Match(tpcMatchRec.chi2);
Expand Down Expand Up @@ -1584,12 +1593,12 @@ bool MatchTPCITS::refitABTrack(int iITSAB, const TPCABSeed& seed, pmr::vector<o2
tofL.addStep(lInt, tracOut.getP2Inv());
tofL.addX2X0(lInt * mTPCmeanX0Inv);
propagator->PropagateToXBxByBz(tracOut, o2::constants::geom::XTPCOuterRef, MaxSnp, 10., mUseMatCorrFlag, &tofL);
const auto& trackTune = o2::globaltracking::TrackTuneParams::Instance();
const auto& trackTune = TrackTuneParams::Instance();
if (trackTune.useTPCOuterCorr) {
tracOut.updateParams(trackTune.tpcParOuter);
}
if (trackTune.tpcCovOuterType != o2::globaltracking::TrackTuneParams::AddCovType::Disable) {
tracOut.updateCov(trackTune.tpcCovOuter, trackTune.tpcCovOuterType == o2::globaltracking::TrackTuneParams::AddCovType::WithCorrelations);
if (trackTune.tpcCovOuterType != TrackTuneParams::AddCovType::Disable) {
tracOut.updateCov(mCovDiagOuter, trackTune.tpcCovOuterType == TrackTuneParams::AddCovType::WithCorrelations);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ void CosmicsMatchingSpec::updateTimeDependentParams(ProcessingContext& pc)
}
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mMatching.setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mMatching.setTPCCorrMaps(&mTPCCorrMapsLoader);
if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ void SecondaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc)
if (mSrc[GTrackID::TPC]) {
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mVertexer.setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mVertexer.setTPCCorrMaps(&mTPCCorrMapsLoader);
if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
2 changes: 1 addition & 1 deletion Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ void TOFMatcherSpec::updateTimeDependentParams(ProcessingContext& pc)
// we may have other params which need to be queried regularly
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mMatcher.setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mMatcher.setTPCCorrMaps(&mTPCCorrMapsLoader);
if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
3 changes: 2 additions & 1 deletion Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ void TPCITSMatchingDPL::updateTimeDependentParams(ProcessingContext& pc)
// we may have other params which need to be queried regularly
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mMatching.setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mMatching.setTPCCorrMaps(&mTPCCorrMapsLoader);

if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (GID::includesDet(DetID::TOF, src)) {
src |= GID::getSourceMask(GID::TOF);
}
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
src = src | GID::getSourcesMask("CTP");
}
GID::mask_t srcCl = src;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (src[GID::TPC]) {
srcClus |= GID::getSourceMask(GID::TPC);
}
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
src = src | GID::getSourcesMask("CTP");
}
WorkflowSpec specs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (src[GID::TPC] && refitTPCTOF) { // load clusters
clustermask |= GID::getSourceMask(GID::TPC);
}
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
src = src | GID::getSourcesMask("CTP");
}
if (useMC) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ WorkflowSpec defineDataProcessing(o2::framework::ConfigContext const& configcont
auto useMC = !configcontext.options().get<bool>("disable-mc");
auto calib = configcontext.options().get<bool>("produce-calibration-data");
auto srcL = src | GID::getSourcesMask("ITS,TPC"); // ITS is neadded always, TPC must be loaded even if bare TPC tracks are not used in matching
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
srcL = srcL | GID::getSourcesMask("CTP");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
GID::mask_t srcTrc = allowedSourcesTrc & GID::getSourcesMask(configcontext.options().get<std::string>("track-sources"));
GID::mask_t srcCls = allowedSourcesClus & GID::getSourcesMask(configcontext.options().get<std::string>("cluster-sources"));
if (sclOpt.lumiType == 1) {
if (sclOpt.requestCTPLumi) {
srcTrc = srcTrc | GID::getSourcesMask("CTP");
srcCls = srcCls | GID::getSourcesMask("CTP");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace tpc
{

struct CorrMapParam : public o2::conf::ConfigurableParamHelper<CorrMapParam> {
float lumiInst = 0.; // override instantaneous lumi (if > 0) for TPC corr.map scaling, disable corrections if < 0"
float lumiInst = 0.; // override CTP instantaneous lumi (if != 0)
float lumiMean = 0.; // override TPC corr.map mean lumi (if > 0), disable corrections if < 0
float lumiMeanRef = 0.; // override TPC corr.mapRef mean lumi (if > 0)"
float lumiInstFactor = 1.; // scaling to apply to instantaneous lumi from CTP (but not to IDC scaler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ class TPCCalibPadGainTracksDevice : public o2::framework::Task
mTPCCorrMapsLoader.extractCCDBInputs(pc);
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mPadGainTracks.setTPCCorrMaps(&mTPCCorrMapsLoader);
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mPadGainTracks.setTPCCorrMaps(&mTPCCorrMapsLoader);
if (mTPCVDriftHelper.isUpdated()) {
LOGP(info, "Updating TPC fast transform map with new VDrift factor of {} wrt reference {} and DriftTimeOffset correction {} wrt {} from source {}",
mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift,
Expand Down
4 changes: 3 additions & 1 deletion Detectors/TPC/workflow/readers/src/TrackReaderSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ void TrackReader::run(ProcessingContext& pc)
mTree->GetEntry(ent);
using TrackTunePar = o2::globaltracking::TrackTuneParams;
const auto& trackTune = TrackTunePar::Instance();
if (trackTune.sourceLevelTPC &&
// Normally we should not apply tuning here as with sourceLevelTPC==true it is already applied in the tracking.
// Note that there is no way to apply lumi scaling here!!!
if ((trackTune.sourceLevelTPC && trackTune.applyWhenReading) &&
(trackTune.useTPCInnerCorr || trackTune.useTPCOuterCorr ||
trackTune.tpcCovInnerType != TrackTunePar::AddCovType::Disable || trackTune.tpcCovOuterType != TrackTunePar::AddCovType::Disable)) {
for (auto& trc : mTracksOut) {
Expand Down
Loading

0 comments on commit 002fc7b

Please sign in to comment.