Skip to content

Commit 1e95e93

Browse files
committed
Add braces around two single-statement ifs in GPUTRDTracker
This fixes the two readability-braces-around-statements findings of o2checkcode.
1 parent 18689e8 commit 1e95e93

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎GPU/GPUTracking/TRDTracking/GPUTRDTracker.cxx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,17 @@ GPUd() bool GPUTRDTracker_t<TRDTRK, PROP>::FollowProlongation(PROP* prop, TRDTRK
697697
if (Param().rec.trd.addDeflectionInChi2 == 2 || Param().rec.trd.addDeflectionInChi2 == 3) {
698698
// In this case we take into account the full likelihood, so we replace (deltaDy/sigmaDy)^2 by -2*ln(likelihood), which is the same in the default Gaussian case
699699
double likelihood = mRecoParam->getDyLikelihood(trkWork->getSnp(), spacePoints[trkltIdx].getDy() + dyTiltCorr, nTrackletsChamber);
700-
if (likelihood < 1e-6f)
700+
if (likelihood < 1e-6f) {
701701
continue; // likelihood of 1e-6 is equivalent to 5 sigma deviation, so we can safely cut it to avoid numerical instability in log calculation
702+
}
702703
deltaDy = CAMath::Sqrt(-2.f * CAMath::Log(likelihood) * sigmaDy2) * (deltaDy > 0.f ? 1.f : -1.f);
703704
}
704705
if (Param().rec.trd.addDeflectionInChi2 == 3) {
705706
// We do the same for deltaZ
706707
double likelihood = mRecoParam->getZLikelihood(deltaZ, pad->GetRowSize(tracklets[trkltIdx].GetZbin()), CAMath::Sqrt(trkWork->getSigmaZ2()));
707-
if (likelihood < 1e-6f)
708+
if (likelihood < 1e-6f) {
708709
continue;
710+
}
709711
deltaZ = CAMath::Sqrt(-2.f * CAMath::Log(likelihood) * sigmaZ2) * (deltaZ > 0.f ? 1.f : -1.f);
710712
}
711713
chi2 = deltaY * trkltCovTmpWithDy[0] * deltaY + 2 * deltaY * trkltCovTmpWithDy[1] * deltaZ + 2 * deltaY * trkltCovTmpWithDy[3] * deltaDy + deltaZ * trkltCovTmpWithDy[2] * deltaZ + 2 * deltaZ * trkltCovTmpWithDy[4] * deltaDy + deltaDy * trkltCovTmpWithDy[5] * deltaDy;

0 commit comments

Comments
 (0)