Skip to content

Commit 06496ea

Browse files
authored
[MUON] fix computation of delta phi in MFT-MCH matching (#15796)
The value of delta phi between the MFT and MCH tracks at the matching plane is restricted to the [-pi, pi] range, to fix the cases of large angular differences when the MFT and MCH tracks are at the opposite side of the horizontal plane at negative X values.
1 parent 86cd189 commit 06496ea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Detectors/GlobalTracking/src/MatchGlobalFwd.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
#include "GlobalTracking/MatchGlobalFwd.h"
13+
#include "MathUtils/Utils.h"
1314
#include <queue>
1415

1516
using namespace o2::globaltracking;
@@ -926,6 +927,9 @@ MatchGlobalFwd::MatchGlobalFwd()
926927
// Update Parameters
927928
r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; // Residuals of prediction
928929

930+
// Restrict the phi residual to the [-pi, pi] range
931+
o2::math_utils::bringToPMPiGend(r_k_kminus1[2]);
932+
929933
auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov);
930934

931935
return matchChi2Track;
@@ -963,6 +967,9 @@ MatchGlobalFwd::MatchGlobalFwd()
963967
// Residuals of prediction
964968
r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters;
965969

970+
// Restrict the phi residual to the [-pi, pi] range
971+
o2::math_utils::bringToPMPiGend(r_k_kminus1[2]);
972+
966973
auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov);
967974

968975
return matchChi2Track; };

0 commit comments

Comments
 (0)