From 1c3fc7b738570b97797b7f804219cfc4b9453f51 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Fri, 19 Aug 2022 19:46:16 +0200 Subject: [PATCH 1/2] correct multiple scattering in CCS frame --- RecoTracker/MkFitCore/src/PropagationMPlex.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/RecoTracker/MkFitCore/src/PropagationMPlex.cc b/RecoTracker/MkFitCore/src/PropagationMPlex.cc index b5c73f04e5416..ddf54f54c3f90 100644 --- a/RecoTracker/MkFitCore/src/PropagationMPlex.cc +++ b/RecoTracker/MkFitCore/src/PropagationMPlex.cc @@ -992,8 +992,11 @@ namespace mkfit { if (radL < 1e-13f) continue; //ugly, please fixme const float theta = outPar.constAt(n, 5, 0); - const float pt = 1.f / outPar.constAt(n, 3, 0); //fixme, make sure it is positive? + const float ipt = outPar.constAt(n, 3, 0); + const float pt = 1.f / ipt; + const float ipt2 = ipt * ipt; const float p = pt / std::sin(theta); + const float pz = p * std::cos(theta); const float p2 = p * p; constexpr float mpi = 0.140; // m=140 MeV, pion constexpr float mpi2 = mpi * mpi; // m=140 MeV, pion @@ -1011,8 +1014,9 @@ namespace mkfit { // const float thetaMSC2 = thetaMSC*thetaMSC; const float thetaMSC = 0.0136f * (1.f + 0.038f * std::log(radL)) / (beta * p); // eq 32.15 const float thetaMSC2 = thetaMSC * thetaMSC * radL; - outErr.At(n, 4, 4) += thetaMSC2; - // outErr.At(n, 4, 5) += thetaMSC2; + outErr.At(n, 3, 3) += thetaMSC2 * pz * pz * ipt2 * ipt2; + outErr.At(n, 3, 5) -= thetaMSC2 * pz * ipt2; + outErr.At(n, 4, 4) += thetaMSC2 * p2 * ipt2; outErr.At(n, 5, 5) += thetaMSC2; //std::cout << "beta=" << beta << " p=" << p << std::endl; //std::cout << "multiple scattering thetaMSC=" << thetaMSC << " thetaMSC2=" << thetaMSC2 << " radL=" << radL << std::endl; From c9ea56f26fb73f8839fe35322918b8031ce1799a Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Tue, 13 Sep 2022 00:29:46 +0200 Subject: [PATCH 2/2] clamp the parametric chi2 cut to twice the default --- RecoTracker/MkFitCore/src/MkFinder.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RecoTracker/MkFitCore/src/MkFinder.cc b/RecoTracker/MkFitCore/src/MkFinder.cc index 1ecf8cd441b46..349a65887ddd2 100644 --- a/RecoTracker/MkFitCore/src/MkFinder.cc +++ b/RecoTracker/MkFitCore/src/MkFinder.cc @@ -242,13 +242,14 @@ namespace mkfit { const float theta = std::abs(m_Par[ipar].At(itrk, 5, 0) - Const::PIOver2); float max_invpt = invpt; - if (invpt > 10.0) - max_invpt = 10.0; + if (invpt > 10.0f) + max_invpt = 10.0f; float this_c2 = ILC.c_c2_0 * max_invpt + ILC.c_c2_1 * theta + ILC.c_c2_2; // In case layer is missing (e.g., seeding layers, or too low stats for training), leave original limits if ((ILC.c_c2_sf) * this_c2 > minChi2Cut) - return ILC.c_c2_sf * this_c2; + //clamp the parametric cut to twice the default + return std::min(ILC.c_c2_sf * this_c2, 2.f * minChi2Cut); else return minChi2Cut; }