Skip to content

[MUON] fix computation of delta phi in MFT-MCH matching - #15796

Open
aferrero2707 wants to merge 1 commit into
AliceO2Group:devfrom
aferrero2707:muon-mft-matching-fix-dphi-computation
Open

aferrero2707 wants to merge 1 commit into
AliceO2Group:devfrom
aferrero2707:muon-mft-matching-fix-dphi-computation

Conversation

@aferrero2707

Copy link
Copy Markdown
Collaborator

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.

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.
Comment on lines 892 to +982
@@ -926,6 +937,9 @@ MatchGlobalFwd::MatchGlobalFwd()
// Update Parameters
r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; // Residuals of prediction

// Restrict the phi residual to the [-pi, pi] range
r_k_kminus1[2] = constrainAngle(r_k_kminus1[2]);

auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov);

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

// Restrict the phi residual to the [-pi, pi] range
r_k_kminus1[2] = constrainAngle(r_k_kminus1[2]);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you not just use the o2::math_utils::bringToPMPiGen(...) function?

Suggested change
@@ -926,6 +937,9 @@ MatchGlobalFwd::MatchGlobalFwd()
// Update Parameters
r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters; // Residuals of prediction
// Restrict the phi residual to the [-pi, pi] range
o2::math_utils::bringToPMPiGen(r_k_kminus1[2]);
auto matchChi2Track = ROOT::Math::Similarity(r_k_kminus1, invResCov);
return matchChi2Track;
@@ -963,6 +977,9 @@ MatchGlobalFwd::MatchGlobalFwd()
// Residuals of prediction
r_k_kminus1 = m_k - H_k * GlobalMuonTrackParameters;
// Restrict the phi residual to the [-pi, pi] range
o2::math_utils::bringToPMPiGen(r_k_kminus1[2]);

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 678aac3 at 2026-09-15 16:23:

## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/GlobalTracking/src/MatchGlobalFwd.cxx:898:43: error: statement should be inside braces [readability-braces-around-statements]
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/GlobalTracking/src/MatchGlobalFwd.cxx:899:43: error: statement should be inside braces [readability-braces-around-statements]
++ [[ 0 == 0 ]]
++ exit 1
--

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants