Skip to content

Commit e8746bf

Browse files
committed
GPU TPC: Fix using correct cluster errors with all modifiers during refit with TrackParCov model
1 parent 0f7bfc3 commit e8746bf

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

GPU/GPUTracking/Merger/GPUTPCGMPropagator.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,20 +598,25 @@ GPUd() int GPUTPCGMPropagator::GetPropagatedYZ(float x, float& GPUrestrict() pro
598598
}
599599

600600
GPUd() void GPUTPCGMPropagator::GetErr2(float& GPUrestrict() err2Y, float& GPUrestrict() err2Z, const GPUParam& GPUrestrict() param, float posZ, int iRow, short clusterState, bool sideC) const
601+
{
602+
GetErr2(err2Y, err2Z, param, mT0.GetSinPhi(), mT0.DzDs(), posZ, mT->GetX(), iRow, clusterState, sideC);
603+
mStatErrors.GetOfflineStatisticalErrors(err2Y, err2Z, mT0.GetSinPhi(), mT0.DzDs(), clusterState);
604+
}
605+
606+
GPUd() void GPUTPCGMPropagator::GetErr2(float& GPUrestrict() err2Y, float& GPUrestrict() err2Z, const GPUParam& GPUrestrict() param, float snp, float tgl, float posZ, float x, int iRow, short clusterState, bool sideC)
601607
{
602608
#ifndef GPUCA_TPC_GEOMETRY_O2
603609
if (mSeedingErrors) {
604-
param.GetClusterErrorsSeeding2(iRow, posZ, mT0.GetSinPhi(), mT0.DzDs(), err2Y, err2Z);
610+
param.GetClusterErrorsSeeding2(iRow, posZ, snp, tgl, err2Y, err2Z);
605611
} else
606612
#endif
607613
{
608-
param.GetClusterErrors2(iRow, posZ, mT0.GetSinPhi(), mT0.DzDs(), err2Y, err2Z);
614+
param.GetClusterErrors2(iRow, posZ, snp, tgl, err2Y, err2Z);
609615
}
610616
param.UpdateClusterError2ByState(clusterState, err2Y, err2Z);
611-
float statErr2 = param.GetSystematicClusterErrorIFC2(mT->GetX(), posZ, sideC);
617+
float statErr2 = param.GetSystematicClusterErrorIFC2(x, posZ, sideC);
612618
err2Y += statErr2;
613619
err2Z += statErr2;
614-
mStatErrors.GetOfflineStatisticalErrors(err2Y, err2Z, mT0.SinPhi(), mT0.DzDs(), clusterState);
615620
}
616621

617622
GPUd() float GPUTPCGMPropagator::PredictChi2(float posY, float posZ, int iRow, const GPUParam& GPUrestrict() param, short clusterState, bool sideC) const

GPU/GPUTracking/Merger/GPUTPCGMPropagator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class GPUTPCGMPropagator
129129
GPUd() void GetBxByBz(float Alpha, float X, float Y, float Z, float B[3]) const;
130130

131131
GPUd() void GetErr2(float& err2Y, float& err2Z, const GPUParam& param, float posZ, int iRow, short clusterState, bool sideC) const;
132+
GPUd() static void GetErr2(float& err2Y, float& err2Z, const GPUParam& param, float snp, float tgl, float posZ, float x, int iRow, short clusterState, bool sideC);
132133

133134
GPUd() float GetAlpha() const { return mAlpha; }
134135
GPUd() void SetAlpha(float v) { mAlpha = v; }

GPU/GPUTracking/Refit/GPUTrackingRefit.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ GPUd() int GPUTrackingRefit::RefitTrack(T& trkX, bool outward, bool resetCov)
374374
CADEBUG(printf("\t%21sPropaga Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Res %8.3f %8.3f --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f - YPt %8.3f\n", "", trk.getAlpha(), x, trk.getParams()[0], trk.getParams()[1], trk.getParams()[4], trk.getParams()[4], trk.getParams()[2], trk.getParams()[2], trk.getParams()[0] - y, trk.getParams()[1] - z, sqrtf(trk.getCov()[0]), sqrtf(trk.getCov()[2]), sqrtf(trk.getCov()[5]), sqrtf(trk.getCov()[14]), trk.getCov()[10]));
375375
gpu::gpustd::array<float, 2> p = {y, z};
376376
gpu::gpustd::array<float, 3> c = {0, 0, 0};
377-
mPparam->GetClusterErrors2(currentRow, z, getPar(trk)[2], getPar(trk)[3], c[0], c[2]);
378-
mPparam->UpdateClusterError2ByState(clusterState, c[0], c[2]);
377+
GPUTPCGMPropagator::GetErr2(c[0], c[2], *mPparam, getPar(trk)[2], getPar(trk)[3], z, x, currentRow, clusterState, sector >= 18);
379378
TrackParCovChi2 += trk.getPredictedChi2(p, c);
380379
if (!trk.update(p, c)) {
381380
IgnoreErrors(trk.getSnp());

0 commit comments

Comments
 (0)