Skip to content

Commit

Permalink
removed commented-out statements
Browse files Browse the repository at this point in the history
  • Loading branch information
vlimant authored and mmusich committed Jan 18, 2023
1 parent 3f8ecfd commit 5c28160
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions DataFormats/PatCandidates/src/PackedCandidate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,17 @@ float pat::PackedCandidate::dz(const Point &p) const {
}

const reco::Track pat::PackedCandidate::pseudoPosDefTrack() const {
//if (posdeftrack_) return *posdeftrack_;
// perform the regular unpacking of the track
if (!track_)
unpackTrk();

// std::cout<<"unpacking enforcing positive-definite cov matrix"<<std::endl;
//calculate the determinant and verify positivity
double det = 0;
bool notPosDef = (!(*m_).Sub<AlgebraicSymMatrix22>(0, 0).Det(det) || det < 0) ||
(!(*m_).Sub<AlgebraicSymMatrix33>(0, 0).Det(det) || det < 0) ||
(!(*m_).Sub<AlgebraicSymMatrix44>(0, 0).Det(det) || det < 0) || (!(*m_).Det(det) || det < 0);

if (notPosDef) {
// std::cout << "during unpacking, the determinant is: " << det << std::endl;
reco::TrackBase::CovarianceMatrix m(*m_);
//if not positive-definite, alter values to allow for pos-def
TMatrixDSym eigenCov(5);
Expand All @@ -200,10 +197,6 @@ const reco::Track pat::PackedCandidate::pseudoPosDefTrack() const {
m(i, i) += delta - minEigenValue;
}

// bool notPosDef = (!m.Sub<AlgebraicSymMatrix22>(0, 0).Det(det) || det < 0) ||
// (!m.Sub<AlgebraicSymMatrix33>(0, 0).Det(det) || det < 0) ||
// (!m.Sub<AlgebraicSymMatrix44>(0, 0).Det(det) || det < 0) || (!m.Det(det) || det < 0);
// std::cout << " the determinant of the corrected covariance matrix is: " << det << std::endl;
// make a track object with pos def covariance matrix
return reco::Track(normalizedChi2_ * (*track_).ndof(),
(*track_).ndof(),
Expand Down

0 comments on commit 5c28160

Please sign in to comment.