Skip to content

Comments

Add POD version of TPCFastTransform#137

Open
shahor02 wants to merge 1 commit intodavidrohr:dev_pull_request6from
shahor02:pr_TransPOD_DRSG
Open

Add POD version of TPCFastTransform#137
shahor02 wants to merge 1 commit intodavidrohr:dev_pull_request6from
shahor02:pr_TransPOD_DRSG

Conversation

@shahor02
Copy link

@shahor02 shahor02 commented Feb 23, 2026

The TPCFastTransformPOD is a pointerless version of the TPCFastTransform. It can be created from the original TPCFastTransform as e.g.

auto lold = o2::gpu::TPCFastTransform::loadFromFile("o2-gpu-TPCFastTransform.root","ccdb_object"); // load original transform 
std::vector<char> v; // one has to provide a vector (could be a std or pmr), which later can be messaged via DPL 
auto* pod = o2::gpu::TPCFastTransformPOD::create(v, *lold); // pointer pod is just v.data() cast to TPCFastTransformPOD*

// run test:
pod->test(*lold);
[INFO]  (ns per call)              original        this     Nmissmatch
[INFO] getCorrection               1.330e+02    1.400e+02   0
[INFO] getCorrectionInvCorrectedX  8.856e+01    8.434e+01   0
[INFO] getCorrectionInvUV          6.266e+01    6.142e+01   0

It can also be created directly from the TPCFastSpaceChargeCorrection as TPCFastSpaceChargeCorrection& oldCorr = lold->getCorrection(); auto* pod = o2::gpu::TPCFastTransformPOD::create(v, oldCorr); but in this case, one should afterwards set the vdrift and t0 using provided getters.

TPCFastTransformPOD replicates all the methods of the TPCFastTransform (and of the TPCFastSpaceChargeCorrection), including those which allow to query rescaled corrections (by providing reference maps and scaling coefficients). Since the idea of this class is to create a final correction map as a weighted sum of different contributions and to distribute it to consumer processes via shared memory, also the query methods w/o rescaling are added, they have the suffix _new added. Eventually, the scalable legacy methods can be suppressed, and the suffix new can be dropped.

The TPCFastTransformPOD is a pointerless version of the TPCFastTransform. It can be created from the
original TPCFastTransform as e.g.
auto lold = o2::gpu::TPCFastTransform::loadFromFile("o2-gpu-TPCFastTransform.root","ccdb_object"); // load original transform
std::vector<char> v; // one has to provide a vector (could be a std or pmr), which later can be messaged via DPL
auto* pod = o2::gpu::TPCFastTransformPOD::create(v, *lold); // pointer pod is just v.data() cast to TPCFastTransformPOD*

// run test:
pod->test(*lold);
[INFO]  (ns per call)              original        this     Nmissmatch
[INFO] getCorrection               1.330e+02    1.400e+02   0
[INFO] getCorrectionInvCorrectedX  8.856e+01    8.434e+01   0
[INFO] getCorrectionInvUV          6.266e+01    6.142e+01   0

It can be also created directly from the TPCFastSpaceChargeCorrection as
TPCFastSpaceChargeCorrection& oldCorr = lold->getCorrection();
auto* pod = o2::gpu::TPCFastTransformPOD::create(v, oldCorr);
but in this case one should afterwards set the vdrift and t0 using provided getters.

TPCFastTransformPOD replicates all the methods of the TPCFastTransform (and of the TPCFastSpaceChargeCorrection), including
those which allow to query rescaled corrections (by providing refernce maps and scaling coefficients).
Since the idea of this class is to create a final correction map as a weighted sum of different contribution and to distribute
it to consumer processes via shared memory, also the query methods w/o rescaling are added, they have the suffix _new added.
Eventually, the scalable legacy methods can be suppressed and the suffix new can be dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant