Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
96088eb
TPC Splines: fix initialization of the track residuals in the test macro
sgorbuno Mar 15, 2024
b520ee8
TPC Splines: fix propagation of the track residual data to the TPC ro…
sgorbuno Mar 15, 2024
b2a455a
TPC Splines: non-uniform grid that corresponds to the track residual …
sgorbuno Apr 15, 2024
b41918c
TPC Splines: multithreaded reading of the residual tree
sgorbuno Apr 18, 2024
6dd42df
TPC Splines: add limits for SP correction values per TPC row
sgorbuno Jun 20, 2024
fbac8ec
TPC Splines: disable smoothing
sgorbuno Jul 4, 2024
8cc8a03
TPC Splines: smooth to linear edges, crop at grid borders, use mean p…
Jul 18, 2024
69e79b2
TPC Splines: fix the inverse correction
sgorbuno Jan 16, 2025
8b1158b
TPC Splines: fix reading track residuals
sgorbuno Jan 27, 2025
a30444d
TPC Splines: fix scaling splines outside of the measured area
sgorbuno Jan 27, 2025
b0fbfce
TPC Splines: rename Slice -> Roc in geometry
sgorbuno Jan 27, 2025
c65799a
TPC Splines: minimise the amount of transformations
sgorbuno Feb 5, 2025
59e1c92
TPC Splines: init inverse from the inverse voxel map; rebase
sgorbuno Mar 6, 2025
27e745c
TPC Splines: cleanup
sgorbuno Apr 6, 2025
6995b78
TPC Splines: fast merge of SC corrections
sgorbuno Apr 11, 2025
22838ee
TPC Splines: get rid of internal UV coordinates
sgorbuno Apr 12, 2025
0f83965
TPC Splines: completely switch to local TPC coordinates in the grid
sgorbuno Apr 14, 2025
9bee306
TPC Splines: correct biased voxels; features for debugging
cbmsw Aug 20, 2025
acd65ba
TPC Splines: replace std::tuple by std::array
cbmsw Aug 27, 2025
5c5cef0
TPC Splines: better smoothing between the voxels
cbmsw Aug 27, 2025
096393d
TPCFastTransform: fix compilation on GPU with the new splines
davidrohr Sep 1, 2025
022b5a9
TPC Splines: bugfixes in spline merging
cbmsw Sep 17, 2025
678e2bb
TPC Splines: add backward compatibility
cbmsw Oct 6, 2025
a048ede
Fix compiler-warnings, codechecker violations and compilation
cbmsw Oct 15, 2025
84a86b8
TPC Splines: keep old cropping scheme
cbmsw Feb 5, 2026
804cdb5
GPU TPC FastTransformation: Do not use std::array
davidrohr Mar 29, 2026
dd7c7ca
GPU TPCFastTransformation: Do not use double
davidrohr Mar 31, 2026
cfd2edd
GPU TPCFastTransfomration: Add missing inline keywords
davidrohr Apr 1, 2026
4b834f4
Add POD version of TPCFastTransform
shahor02 Feb 22, 2026
2591183
fixup
davidrohr Apr 2, 2026
f5c1a8f
GPU FlatObject: Make some more functions accessible on GPU
davidrohr Apr 3, 2026
1450d88
TPC: centralize correction map building in TPCScalerSpec
matthias-kleiner Oct 27, 2025
b873c97
TPC: remove CorrectionMaps helper/loader classes
matthias-kleiner Apr 2, 2026
9cb59f1
GPU TPCTransform: new POD transform does not need support for applyin…
davidrohr Apr 3, 2026
b50dc56
GPU: Add GPUCommonAlignedAlloc.h for aligned buffers, and use it for …
davidrohr Apr 3, 2026
ae25f0e
GPU Standalone: Add dumping and reading of dynamic structs with large…
davidrohr Apr 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace align

/// create a processor spec
framework::DataProcessorSpec getBarrelAlignmentSpec(o2::dataformats::GlobalTrackID::mask_t srcMP, o2::dataformats::GlobalTrackID::mask_t src,
o2::detectors::DetID::mask_t dets, o2::detectors::DetID::mask_t skipDetClusters, bool enableCosmic, int postproc, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);
o2::detectors::DetID::mask_t dets, o2::detectors::DetID::mask_t skipDetClusters, bool enableCosmic, int postproc, bool useMC);

} // namespace align
} // namespace o2
Expand Down
42 changes: 13 additions & 29 deletions Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "TRDBase/TrackletTransformer.h"
#include "CommonUtils/TreeStreamRedirector.h"
#include "TPCCalibration/VDriftHelper.h"
#include "TPCCalibration/CorrectionMapsLoader.h"
#include "TPCFastTransformPOD.h"
#include "GPUO2ExternalUser.h"
#include "GPUO2InterfaceUtils.h"
#include "GPUParam.h"
Expand Down Expand Up @@ -86,14 +86,9 @@ class BarrelAlignmentSpec : public Task
CheckConstaints = 0x1 << 1,
GenPedeFiles = 0x1 << 2,
LabelPedeResults = 0x1 << 3 };
BarrelAlignmentSpec(GTrackID::mask_t srcMP, std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> ggrec, const o2::tpc::CorrectionMapsLoaderGloOpts& tpcOpt,
BarrelAlignmentSpec(GTrackID::mask_t srcMP, std::shared_ptr<DataRequest> dr, std::shared_ptr<o2::base::GRPGeomRequest> ggrec,
DetID::mask_t detmask, bool cosmic, int postprocess, bool useMC, bool loadTPCCalib)
: mDataRequest(dr), mGRPGeomRequest(ggrec), mMPsrc{srcMP}, mDetMask{detmask}, mCosmic(cosmic), mPostProcessing(postprocess), mUseMC(useMC), mLoadTPCCalib(loadTPCCalib)
{
mTPCCorrMapsLoader.setLumiScaleType(tpcOpt.lumiType);
mTPCCorrMapsLoader.setLumiScaleMode(tpcOpt.lumiMode);
mTPCCorrMapsLoader.setCheckCTPIDCConsistency(tpcOpt.checkCTPIDCconsistency);
}
: mDataRequest(dr), mGRPGeomRequest(ggrec), mMPsrc{srcMP}, mDetMask{detmask}, mCosmic(cosmic), mPostProcessing(postprocess), mUseMC(useMC), mLoadTPCCalib(loadTPCCalib) {}
~BarrelAlignmentSpec() override = default;
void init(InitContext& ic) final;
void run(ProcessingContext& pc) final;
Expand Down Expand Up @@ -122,7 +117,9 @@ class BarrelAlignmentSpec : public Task
std::unique_ptr<o2::gpu::GPUParam> mTPCParam;

o2::tpc::VDriftHelper mTPCVDriftHelper{};
o2::tpc::CorrectionMapsLoader mTPCCorrMapsLoader{};

o2::gpu::aligned_unique_buffer_ptr<o2::gpu::TPCFastTransformPOD> mCorrMapBuffer; // buffer to hold the raw map data from CCDB, needed to keep the pointer valid in the CorrectionMapsHelper
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{};

//
TStopwatch mTimer;
Expand Down Expand Up @@ -184,9 +181,6 @@ void BarrelAlignmentSpec::init(InitContext& ic)
}
mIgnoreCCDBAlignment = ic.options().get<bool>("ignore-ccdb-alignment");
if (!mPostProcessing) {
if (mLoadTPCCalib) {
mTPCCorrMapsLoader.init(ic);
}
if (GTrackID::includesDet(DetID::TRD, mMPsrc)) {
mTRDTransformer.reset(new o2::trd::TrackletTransformer);
if (ic.options().get<bool>("apply-xor")) {
Expand Down Expand Up @@ -272,24 +266,17 @@ void BarrelAlignmentSpec::updateTimeDependentParams(ProcessingContext& pc)
}

mTPCVDriftHelper.extractCCDBInputs(pc);
mTPCCorrMapsLoader.extractCCDBInputs(pc);
bool updateMaps = false;
if (mTPCCorrMapsLoader.isUpdated()) {
mTPCCorrMapsLoader.acknowledgeUpdate();
updateMaps = true;
}
mController->setTPCCorrMaps(&mTPCCorrMapsLoader);

auto const& raw = pc.inputs().get<const char*>("corrMap");
mTPCCorrMaps = &o2::gpu::TPCFastTransformPOD::get(raw);
mController->setTPCCorrMaps(mTPCCorrMaps);
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,
mTPCVDriftHelper.getVDriftObject().timeOffsetCorr, mTPCVDriftHelper.getVDriftObject().refTimeOffset,
mTPCVDriftHelper.getSourceName());
mController->setTPCVDrift(mTPCVDriftHelper.getVDriftObject());
mTPCVDriftHelper.acknowledgeUpdate();
updateMaps = true;
}
if (updateMaps) {
mTPCCorrMapsLoader.updateVDrift(mTPCVDriftHelper.getVDriftObject().corrFact, mTPCVDriftHelper.getVDriftObject().refVDrift, mTPCVDriftHelper.getVDriftObject().getTimeOffset());
}
}
}
Expand All @@ -314,9 +301,6 @@ void BarrelAlignmentSpec::finaliseCCDB(o2::framework::ConcreteDataMatcher& match

return;
}
if (mTPCCorrMapsLoader.accountCCDBInputs(matcher, obj)) {
return;
}
}

void BarrelAlignmentSpec::run(ProcessingContext& pc)
Expand Down Expand Up @@ -374,7 +358,7 @@ void BarrelAlignmentSpec::endOfStream(EndOfStreamContext& ec)
mDBGOut.reset();
}

DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_t src, DetID::mask_t dets, DetID::mask_t skipDetClusters, bool enableCosmic, int postprocess, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_t src, DetID::mask_t dets, DetID::mask_t skipDetClusters, bool enableCosmic, int postprocess, bool useMC)
{
std::vector<OutputSpec> outputs;
auto dataRequest = std::make_shared<DataRequest>();
Expand All @@ -399,7 +383,7 @@ DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_
}
if (src[DetID::TPC] && !skipDetClusters[DetID::TPC]) {
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);
dataRequest->inputs.emplace_back("corrMap", o2::header::gDataOriginTPC, "TPCCORRMAP", 0, Lifetime::Timeframe);
loadTPCCalib = true;
}
}
Expand All @@ -417,7 +401,7 @@ DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_
"barrel-alignment",
dataRequest->inputs,
outputs,
AlgorithmSpec{adaptFromTask<BarrelAlignmentSpec>(srcMP, dataRequest, ccdbRequest, sclOpts, dets, enableCosmic, postprocess, useMC, loadTPCCalib)},
AlgorithmSpec{adaptFromTask<BarrelAlignmentSpec>(srcMP, dataRequest, ccdbRequest, dets, enableCosmic, postprocess, useMC, loadTPCCalib)},
opts};
}

Expand Down
12 changes: 6 additions & 6 deletions Detectors/Align/Workflow/src/barrel-alignment-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include "TPCReaderWorkflow/ClusterReaderSpec.h"
#include "TPCWorkflow/ClusterSharingMapSpec.h"
#include "TPCWorkflow/TPCScalerSpec.h"
#include "TPCCalibration/CorrectionMapsLoader.h"
#include "TOFWorkflowIO/ClusterReaderSpec.h"
#include "TOFWorkflowIO/TOFMatchedReaderSpec.h"
#include "TOFWorkflowIO/ClusterReaderSpec.h"
#include "ReconstructionDataFormats/GlobalTrackID.h"
#include "DetectorsCommonDataFormats/DetID.h"
#include "GlobalTrackingWorkflowReaders/TrackTPCITSReaderSpec.h"
#include "TPCCalibration/CorrectionMapsOptions.h"

#include "Algorithm/RangeTokenizer.h"
#include "DetectorsRaw/HBFUtilsInitializer.h"
Expand Down Expand Up @@ -59,7 +59,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{"enable-cosmic", VariantType::Bool, false, {"enable cosmic tracks)"}},
{"postprocessing", VariantType::Int, 0, {"postprocessing bits: 1 - extract alignment objects, 2 - check constraints, 4 - print mpParams/Constraints, 8 - relabel pede results"}},
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
o2::tpc::CorrectionMapsOptions::addGlobalOptions(options);
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (dets[DetID::TPC]) {
loadTPCClusters = loadTPCTracks = true;
}
auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
auto sclOpt = o2::tpc::CorrectionMapsOptions::parseGlobalOptions(configcontext.options());
if (!postprocess) { // this part is needed only if the data should be read
if (GID::includesDet(DetID::ITS, src)) {
src |= GID::getSourceMask(GID::ITS);
Expand Down Expand Up @@ -148,11 +148,11 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
o2::conf::ConfigurableParam::writeINI("o2_barrel_alignment_configuration.ini");
}

if (sclOpt.needTPCScalersWorkflow() && !configcontext.options().get<bool>("disable-root-input")) {
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == 2, sclOpt.enableMShapeCorrection));
if (!configcontext.options().get<bool>("disable-root-input")) {
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
}

specs.emplace_back(o2::align::getBarrelAlignmentSpec(srcMP, src, dets, skipDetClusters, enableCosmic, postprocess, useMC, sclOpt));
specs.emplace_back(o2::align::getBarrelAlignmentSpec(srcMP, src, dets, skipDetClusters, enableCosmic, postprocess, useMC));
// RS FIXME: check which clusters are really needed
if (!postprocess) {
GID::mask_t dummy;
Expand Down
8 changes: 4 additions & 4 deletions Detectors/Align/include/Align/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "ReconstructionDataFormats/PrimaryVertex.h"
#include "ReconstructionDataFormats/TrackCosmics.h"
#include "DataFormatsTPC/VDriftCorrFact.h"
#include "CorrectionMapsHelper.h"
#include "TPCFastTransformPOD.h"

#include "Align/Millepede2Record.h"
#include "Align/ResidualsController.h"
Expand Down Expand Up @@ -272,8 +272,8 @@ class Controller final : public TObject
bool getAllowAfterburnerTracks() const { return mAllowAfterburnerTracks; }

void setTPCVDrift(const o2::tpc::VDriftCorrFact& v);
void setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph);
o2::gpu::CorrectionMapsHelper* getTPCCorrMaps() { return mTPCCorrMapsHelper; }
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph);
const o2::gpu::TPCFastTransformPOD* getTPCCorrMaps() { return mTPCCorrMaps; }
const o2::tpc::VDriftCorrFact& getTPCVDrift() const { return mTPCDrift; }

int getInstanceID() const { return mInstanceID; }
Expand Down Expand Up @@ -359,7 +359,7 @@ class Controller final : public TObject
bool mUseRecoOCDB = true; // flag to preload reco-time calib objects

o2::tpc::VDriftCorrFact mTPCDrift{};
o2::gpu::CorrectionMapsHelper* mTPCCorrMapsHelper = nullptr;
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps = nullptr;

//
static const int sSkipLayers[kNLrSkip]; // detector layers for which we don't need module matrices
Expand Down
4 changes: 2 additions & 2 deletions Detectors/Align/src/Controller.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1882,9 +1882,9 @@ void Controller::setTPCVDrift(const o2::tpc::VDriftCorrFact& v)
}

//______________________________________________
void Controller::setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph)
void Controller::setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph)
{
mTPCCorrMapsHelper = maph;
mTPCCorrMaps = maph;
}

} // namespace align
Expand Down
16 changes: 8 additions & 8 deletions Detectors/GlobalTracking/include/GlobalTracking/MatchCosmics.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class VDriftCorrFact;
}
namespace gpu
{
class CorrectionMapsHelper;
class TPCFastTransformPOD;
}
namespace globaltracking
{
Expand Down Expand Up @@ -85,7 +85,7 @@ class MatchCosmics
GTrackID origID; ///< track origin id
int matchID = MinusOne; ///< entry (none if MinusOne) of its match in the vector of matches
};
void setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph);
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph);
void setTPCVDrift(const o2::tpc::VDriftCorrFact& v);
void setITSROFrameLengthMUS(float fums) { mITSROFrameLengthMUS = fums; }
void setITSDict(const o2::itsmft::TopologyDictionary* dict) { mITSDict = dict; }
Expand Down Expand Up @@ -138,14 +138,14 @@ class MatchCosmics
std::vector<MatchRecord> mRecords;
std::vector<int> mWinners;
const o2::itsmft::TopologyDictionary* mITSDict = nullptr; // cluster patterns dictionary
o2::gpu::CorrectionMapsHelper* mTPCCorrMapsHelper = nullptr;
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps = nullptr;
int mTFCount = 0;
float mTPCVDriftRef = -1.; ///< TPC nominal drift speed in cm/microseconds
float mTPCVDriftCorrFact = 1.; ///< TPC nominal correction factort (wrt ref)
float mTPCVDrift = -1.; ///< TPC drift speed in cm/microseconds
float mTPCVDriftRef = -1.; ///< TPC nominal drift speed in cm/microseconds
float mTPCVDriftCorrFact = 1.; ///< TPC nominal correction factort (wrt ref)
float mTPCVDrift = -1.; ///< TPC drift speed in cm/microseconds
float mTPCDriftTimeOffset = 0.; ///< drift time offset in mus
float mTPCTBinMUS = 0.; ///< TPC time bin duration in microseconds
float mBz = 0; ///< nominal Bz
float mTPCTBinMUS = 0.; ///< TPC time bin duration in microseconds
float mBz = 0; ///< nominal Bz
bool mFieldON = true;
bool mUseMC = true;
float mITSROFrameLengthMUS = 0.;
Expand Down
6 changes: 3 additions & 3 deletions Detectors/GlobalTracking/include/GlobalTracking/MatchTOF.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "ReconstructionDataFormats/PID.h"
#include "TPCFastTransform.h"
#include "CommonDataFormat/InteractionRecord.h"
#include "CorrectionMapsHelper.h"
#include "GlobalTracking/MatchTOFParams.h"

// from FIT
Expand Down Expand Up @@ -152,7 +151,7 @@ class MatchTOF
std::vector<o2::MCCompLabel>& getMatchedTOFLabelsVector(trkType index) { return mOutTOFLabels[index]; } ///< get vector of TOF labels of matched tracks

void setTPCVDrift(const o2::tpc::VDriftCorrFact& v);
void setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph);
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph, float lumi);

void setFIT(bool value = true) { mIsFIT = value; }
static int findFITIndex(int bc, const gsl::span<const o2::ft0::RecPoints>& FITRecPoints, unsigned long firstOrbit);
Expand Down Expand Up @@ -292,7 +291,8 @@ class MatchTOF
gsl::span<const unsigned int> mTPCRefitterOccMap; ///< externally set TPC clusters occupancy map
const o2::tpc::ClusterNativeAccess* mTPCClusterIdxStruct = nullptr; ///< struct holding the TPC cluster indices

o2::gpu::CorrectionMapsHelper* mTPCCorrMapsHelper = nullptr; ///< TPC cluster transformation
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps = nullptr; ///< TPC cluster transformation
float mCTPLumi = {-1};
std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction

const o2::dataformats::MCTruthContainer<o2::MCCompLabel>* mTOFClusLabels; ///< input TOF clusters MC labels (pointer to read from tree)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "DataFormatsITSMFT/TopologyDictionary.h"
#include "DataFormatsITSMFT/TrkClusRef.h"
#include "ITSMFTReconstruction/ChipMappingITS.h"
#include "CorrectionMapsHelper.h"
#include "TPCFastTransformPOD.h"
#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__ROOTCLING__) && !defined(__CLING__)
#include "MemoryResources/MemoryResources.h"
#endif
Expand Down Expand Up @@ -434,7 +434,7 @@ class MatchTPCITS
mVDriftCalibOn = v;
}
void setTPCVDrift(const o2::tpc::VDriftCorrFact& v);
void setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph);
void setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph, float lumi);

///< print settings
void print() const;
Expand Down Expand Up @@ -641,7 +641,8 @@ class MatchTPCITS
float mMinITSTrackPtInv = 999.; ///< cutoff on ITS track inverse pT
bool mVDriftCalibOn = false; ///< flag to produce VDrift calibration data
o2::tpc::VDriftCorrFact mTPCDrift{};
o2::gpu::CorrectionMapsHelper* mTPCCorrMapsHelper = nullptr;
const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps = nullptr;
float mLumiCTP{-1};

std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction

Expand Down
8 changes: 4 additions & 4 deletions Detectors/GlobalTracking/src/MatchCosmics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "CommonConstants/GeomConstants.h"
#include "DataFormatsTPC/WorkflowHelper.h"
#include "DataFormatsTPC/VDriftCorrFact.h"
#include "CorrectionMapsHelper.h"
#include "TPCFastTransformPOD.h"
#include <algorithm>
#include <numeric>

Expand Down Expand Up @@ -93,7 +93,7 @@ void MatchCosmics::refitWinners(const o2::globaltracking::RecoContainer& data)
std::unique_ptr<o2::gpu::GPUO2InterfaceRefit> tpcRefitter;
if (data.inputsTPCclusters) {
tpcRefitter = std::make_unique<o2::gpu::GPUO2InterfaceRefit>(&data.inputsTPCclusters->clusterIndex,
mTPCCorrMapsHelper, mBz,
mTPCCorrMaps, mBz,
tpcClusRefs.data(), 0, tpcClusShMap.data(),
tpcClusOccMap.data(), tpcClusOccMap.size(), nullptr, o2::base::Propagator::Instance());
}
Expand Down Expand Up @@ -597,9 +597,9 @@ void MatchCosmics::setTPCVDrift(const o2::tpc::VDriftCorrFact& v)
}

//______________________________________________
void MatchCosmics::setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph)
void MatchCosmics::setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph)
{
mTPCCorrMapsHelper = maph;
mTPCCorrMaps = maph;
}

#endif
10 changes: 6 additions & 4 deletions Detectors/GlobalTracking/src/MatchTOF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ void MatchTOF::setTPCVDrift(const o2::tpc::VDriftCorrFact& v)
}

//______________________________________________
void MatchTOF::setTPCCorrMaps(o2::gpu::CorrectionMapsHelper* maph)
void MatchTOF::setTPCCorrMaps(const o2::gpu::TPCFastTransformPOD* maph, float lumi)
{
mTPCCorrMapsHelper = maph;
mTPCCorrMaps = maph;
mCTPLumi = lumi;
}

//______________________________________________
Expand Down Expand Up @@ -2085,8 +2086,9 @@ void MatchTOF::updateTimeDependentParams()
mMaxInvPt = std::abs(mBz) > 0.1 ? 1. / (std::abs(mBz) * 0.05) : 999.;

const auto& trackTune = TrackTuneParams::Instance();
float scale = mTPCCorrMapsHelper->getInstLumiCTP();
float scale = mCTPLumi;
if (scale < 0.f) {
LOGP(warning, "Negative scale factor for TPC covariance correction, setting it to zero");
scale = 0.f;
}
mCovDiagInner = trackTune.getCovInnerTotal(scale);
Expand Down Expand Up @@ -2166,7 +2168,7 @@ bool MatchTOF::makeConstrainedTPCTrack(int matchedID, o2::dataformats::TrackTPCT
void MatchTOF::checkRefitter()
{
if (mTPCClusterIdxStruct) {
mTPCRefitter = std::make_unique<o2::gpu::GPUO2InterfaceRefit>(mTPCClusterIdxStruct, mTPCCorrMapsHelper, mBz,
mTPCRefitter = std::make_unique<o2::gpu::GPUO2InterfaceRefit>(mTPCClusterIdxStruct, mTPCCorrMaps, mBz,
mTPCTrackClusIdx.data(), 0, mTPCRefitterShMap.data(),
mTPCRefitterOccMap.data(), mTPCRefitterOccMap.size(), nullptr, o2::base::Propagator::Instance());
}
Expand Down
Loading