Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid compilation errors in L1Trigger/Phase2L1GMT/src/KMTFCore.cc #45629

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions L1Trigger/Phase2L1GMT/src/KMTFCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,21 +583,17 @@ bool KMTFCore::updateOffline(l1t::KMTFTrack& track, const l1t::MuonStubRef& stub
H(1, 1) = 0.0;
H(1, 2) = 1.0;

CovarianceMatrix2 R;
R(0, 0) = pointResolutionPhi_;
R(0, 1) = 0.0;
R(1, 0) = 0.0;
if (stub->quality() < 6)
R(1, 1) = pointResolutionPhiBL_[track.step() - 1];
else
R(1, 1) = pointResolutionPhiBH_[track.step() - 1];
const auto r11{stub->quality() < 6 ? pointResolutionPhiBL_[track.step() - 1]
: pointResolutionPhiBH_[track.step() - 1]};
const double r[]{pointResolutionPhi_, 0.0, 0.0, r11};
const CovarianceMatrix2 R(r, 4);

const std::vector<double>& covLine = track.covariance();
l1t::KMTFTrack::CovarianceMatrix cov(covLine.begin(), covLine.end());
const l1t::KMTFTrack::CovarianceMatrix cov(covLine.begin(), covLine.end());
CovarianceMatrix2 S = ROOT::Math::Similarity(H, cov) + R;
if (!S.Invert())
return false;
Matrix32 Gain = cov * ROOT::Math::Transpose(H) * S;
const Matrix32 Gain = cov * ROOT::Math::Transpose(H) * S;

track.setKalmanGain(
track.step(), fabs(trackK), Gain(0, 0), Gain(0, 1), Gain(1, 0), Gain(1, 1), Gain(2, 0), Gain(2, 1));
Expand All @@ -623,7 +619,7 @@ bool KMTFCore::updateOffline(l1t::KMTFTrack& track, const l1t::MuonStubRef& stub
}

track.setCoordinates(track.step(), KNew, phiNew, phiBNew);
Matrix33 covNew = cov - Gain * (H * cov);
const auto covNew{cov - Gain * (H * cov)};
l1t::KMTFTrack::CovarianceMatrix c;

c(0, 0) = covNew(0, 0);
Expand Down