File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ class GPUCommonMath
7474 GPUhdni () constexpr static float Sqrt (float x);
7575 GPUd () static float InvSqrt (float x);
7676 template <class T >
77+ GPUdi () constexpr static T Square (T x)
78+ {
79+ return x * x;
80+ }
81+ template <class T >
7782 GPUhd () constexpr static T Abs (T x);
7883 GPUd () constexpr static float ASin (float x);
7984 GPUd () constexpr static float ACos (float x);
Original file line number Diff line number Diff line change @@ -653,11 +653,18 @@ GPUd() int32_t GPUTPCGMPropagator::InterpolateReject(const GPUParam& GPUrestrict
653653 if (rejectChi2 == rejectInterFill) {
654654 inter->posY = mP [0 ];
655655 inter->posZ = mP [1 ];
656- inter->errorY = mC [0 ];
657- inter->errorZ = mC [2 ];
656+ if (mT ->NDF () <= 0 ) {
657+ inter->errorY = inter->errorZ = 100 .f ;
658+ } else {
659+ inter->errorY = mC [0 ];
660+ inter->errorZ = mC [2 ];
661+ }
658662 } else if (rejectChi2 == rejectInterReject) {
659663 float chi2Y, chi2Z;
660- if (mFitInProjections || mT ->NDF () <= 0 ) {
664+ if (mT ->NDF () <= 0 ) {
665+ chi2Y = CAMath::Square ((float )inter->posY - posY) / ((float )inter->errorY + err2Y);
666+ chi2Z = CAMath::Square ((float )inter->posZ - posZ) / ((float )inter->errorZ + err2Z);
667+ } else if (mFitInProjections ) {
661668 const float Iz0 = inter->posY - mP [0 ];
662669 const float Iz1 = inter->posZ - mP [1 ];
663670 const float Iw0 = 1 .f / (mC [0 ] + (float )inter->errorY );
You can’t perform that action at this time.
0 commit comments