Skip to content

Commit

Permalink
Merge pull request #46906 from leonardogiannini/propToPlane_fix
Browse files Browse the repository at this point in the history
[mkFit] small fix in propToPlane
  • Loading branch information
cmsbuild authored Dec 11, 2024
2 parents 0b35058 + a158f81 commit 524aa65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ namespace mkfit {
if (propToHit) {
MPlexLS propErr;
MPlexLV propPar;
propagateHelixToPlaneMPlex(psErr, psPar, Chg, msPar, plNrm, propErr, propPar, outFailFlag, N_proc, propFlags);
propagateHelixToPlaneMPlex(psErr, psPar, Chg, plPnt, plNrm, propErr, propPar, outFailFlag, N_proc, propFlags);

kalmanOperationPlaneLocal(KFO_Update_Params | KFO_Local_Cov,
propErr,
Expand Down Expand Up @@ -1337,7 +1337,7 @@ namespace mkfit {
propPar = psPar;
if (propToHit) {
MPlexLS propErr;
propagateHelixToPlaneMPlex(psErr, psPar, inChg, msPar, plNrm, propErr, propPar, outFailFlag, N_proc, propFlags);
propagateHelixToPlaneMPlex(psErr, psPar, inChg, plPnt, plNrm, propErr, propPar, outFailFlag, N_proc, propFlags);

kalmanOperationPlaneLocal(KFO_Calculate_Chi2,
propErr,
Expand Down
9 changes: 5 additions & 4 deletions RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "RecoTracker/MkFitCore/interface/PropagationConfig.h"
#include "RecoTracker/MkFitCore/interface/Config.h"
#include "RecoTracker/MkFitCore/interface/TrackerInfo.h"
#include "RecoTracker/MkFitCore/interface/cms_common_macros.h"

#include "PropagationMPlex.h"

Expand Down Expand Up @@ -431,7 +432,7 @@ namespace {
//float s[nmax - nmin];
//first iteration outside the loop
#pragma omp simd
for (int n = 0; n < NN; ++n) {
for (int n = 0; n < N_proc; ++n) {
s[n] = (std::abs(plNrm(n, 2, 0)) < 1.f ? getS(delta0[n],
delta1[n],
delta2[n],
Expand Down Expand Up @@ -462,7 +463,7 @@ namespace {
// Note, sinT/cosT not updated

#pragma omp simd
for (int n = 0; n < NN; ++n) {
for (int n = 0; n < N_proc; ++n) {
s[n] += (std::abs(plNrm(n, 2, 0)) < 1.f
? getS(delta0[n],
delta1[n],
Expand All @@ -482,14 +483,14 @@ namespace {
} //end Niter-1

// use linear approximation if s did not converge (for very high pT tracks)
for (int n = 0; n < NN; ++n) {
for (int n = 0; n < N_proc; ++n) {
#ifdef DEBUG
if (debug)
std::cout << "s[n]=" << s[n] << " sl[n]=" << sl[n] << " std::isnan(s[n])=" << std::isnan(s[n])
<< " std::isfinite(s[n])=" << std::isfinite(s[n]) << " std::isnormal(s[n])=" << std::isnormal(s[n])
<< std::endl;
#endif
if ((std::abs(sl[n]) > std::abs(s[n])) || std::isnormal(s[n]) == false)
if (mkfit::isFinite(s[n]) == false && mkfit::isFinite(sl[n])) // replace with sl even if not fully correct
s[n] = sl[n];
}

Expand Down

0 comments on commit 524aa65

Please sign in to comment.