@@ -691,7 +691,7 @@ GPUd() int32_t GPUTPCGMPropagator::Update(float posY, float posZ, int32_t iRow,
691691 return 0 ;
692692 }
693693
694- return Update (posY, posZ, clusterState, rejectChi2 == rejectDirect, err2Y, err2Z, ¶m);
694+ return Update (posY, posZ, clusterState, rejectChi2 == rejectDirect || rejectChi2 == rejectInterReject , err2Y, err2Z, ¶m);
695695}
696696
697697GPUd () int32_t GPUTPCGMPropagator::InterpolateReject(const GPUParam& GPUrestrict () param, float posY, float posZ, int16_t clusterState, int8_t rejectChi2, gputpcgmmergertypes::InterpolationErrorHit* inter, float err2Y, float err2Z)
@@ -704,7 +704,7 @@ GPUd() int32_t GPUTPCGMPropagator::InterpolateReject(const GPUParam& GPUrestrict
704704 inter->errorY = mC [0 ];
705705 inter->errorZ = mC [2 ];
706706 } else if (rejectChi2 == rejectInterReject) {
707- float chiY, chiZ ;
707+ float chi2Y, chi2Z ;
708708 if (mFitInProjections || mT ->NDF () <= 0 ) {
709709 const float Iz0 = inter->posY - mP [0 ];
710710 const float Iz1 = inter->posZ - mP [1 ];
@@ -721,8 +721,8 @@ GPUd() int32_t GPUTPCGMPropagator::InterpolateReject(const GPUParam& GPUrestrict
721721 const float Jz1 = posZ - ImP1;
722722 const float Jw0 = 1 .f / (ImC0 + err2Y);
723723 const float Jw2 = 1 .f / (ImC2 + err2Z);
724- chiY = Jw0 * Jz0 * Jz0;
725- chiZ = Jw2 * Jz1 * Jz1;
724+ chi2Y = Jw0 * Jz0 * Jz0;
725+ chi2Z = Jw2 * Jz1 * Jz1;
726726 } else {
727727 const float Iz0 = inter->posY - mP [0 ];
728728 const float Iz1 = inter->posZ - mP [1 ];
@@ -751,11 +751,11 @@ GPUd() int32_t GPUTPCGMPropagator::InterpolateReject(const GPUParam& GPUrestrict
751751 Jw0 *= Jdet;
752752 const float Jw1 = ImC1 * Jdet;
753753 Jw2 *= Jdet;
754- chiY = CAMath::Abs ((Jw0 * Jz0 + Jw1 * Jz1) * Jz0);
755- chiZ = CAMath::Abs ((Jw1 * Jz0 + Jw2 * Jz1) * Jz1);
754+ chi2Y = CAMath::Abs ((Jw0 * Jz0 + Jw1 * Jz1) * Jz0);
755+ chi2Z = CAMath::Abs ((Jw1 * Jz0 + Jw2 * Jz1) * Jz1);
756756 }
757- if (RejectCluster (chiY * param.rec .tpc .clusterRejectChi2TolleranceY , chiZ * param.rec .tpc .clusterRejectChi2TolleranceZ , clusterState)) { // TODO: Relative Pt resolution decreases slightly, why?
758- return updateErrorClusterRejected ;
757+ if (RejectCluster (chi2Y * param.rec .tpc .clusterRejectChi2TolleranceY , chi2Z * param.rec .tpc .clusterRejectChi2TolleranceZ , clusterState)) { // TODO: Relative Pt resolution decreases slightly, why?
758+ return updateErrorClusterRejectedInInterpolation ;
759759 }
760760 }
761761 return 0 ;
@@ -771,13 +771,13 @@ GPUd() int32_t GPUTPCGMPropagator::Update(float posY, float posZ, int16_t cluste
771771
772772 const float z0 = posY - mP [0 ];
773773 const float z1 = posZ - mP [1 ];
774- float w0, w1, w2, chiY, chiZ ;
774+ float w0, w1, w2, chi2Y, chi2Z ;
775775 if (mFitInProjections || mT ->NDF () <= 0 ) {
776776 w0 = 1 .f / (err2Y + d00);
777777 w1 = 0 ;
778778 w2 = 1 .f / (err2Z + d11);
779- chiY = w0 * z0 * z0;
780- chiZ = w2 * z1 * z1;
779+ chi2Y = w0 * z0 * z0;
780+ chi2Z = w2 * z1 * z1;
781781 } else {
782782 w0 = d11 + err2Z, w1 = d10, w2 = d00 + err2Y;
783783 { // Invert symmetric matrix
@@ -790,13 +790,13 @@ GPUd() int32_t GPUTPCGMPropagator::Update(float posY, float posZ, int16_t cluste
790790 w1 = -w1 * det;
791791 w2 = w2 * det;
792792 }
793- chiY = CAMath::Abs ((w0 * z0 + w1 * z1) * z0);
794- chiZ = CAMath::Abs ((w1 * z0 + w2 * z1) * z1);
793+ chi2Y = CAMath::Abs ((w0 * z0 + w1 * z1) * z0);
794+ chi2Z = CAMath::Abs ((w1 * z0 + w2 * z1) * z1);
795795 }
796- float dChi2 = chiY + chiZ ;
797- // GPUInfo("hits %d chi2 %f, new %f %f (dy %f dz %f)", N, mChi2, chiY, chiZ , z0, z1);
798- if (rejectChi2 == 1 && RejectCluster (chiY * param->rec .tpc .clusterRejectChi2TolleranceY , chiZ * param->rec .tpc .clusterRejectChi2TolleranceZ , clusterState)) {
799- return updateErrorClusterRejected ;
796+ float dChi2 = chi2Y + chi2Z ;
797+ // GPUInfo("hits %d chi2 %f, new %f %f (dy %f dz %f)", N, mChi2, chi2Y, chi2Z , z0, z1);
798+ if (rejectChi2 && RejectCluster (chi2Y * param->rec .tpc .clusterRejectChi2TolleranceY , chi2Z * param->rec .tpc .clusterRejectChi2TolleranceZ , clusterState)) {
799+ return updateErrorClusterRejectedInUpdate ;
800800 }
801801 mT ->Chi2 () += dChi2;
802802 mT ->NDF () += 2 ;
0 commit comments