Commit ac2abbf0 authored by Lennart Huth's avatar Lennart Huth
Browse files

corrected the ndofs for the straight line fit

parent 1af43b5d
...@@ -34,7 +34,7 @@ ROOT::Math::XYPoint Multiplet::getKinkAt(const std::string&) const { ...@@ -34,7 +34,7 @@ ROOT::Math::XYPoint Multiplet::getKinkAt(const std::string&) const {
void Multiplet::calculateChi2() { void Multiplet::calculateChi2() {
chi2_ = m_upstream->getChi2() + m_downstream->getChi2() + sqrt(m_offsetAtScatterer.Dot(m_offsetAtScatterer)); chi2_ = m_upstream->getChi2() + m_downstream->getChi2() + sqrt(m_offsetAtScatterer.Dot(m_offsetAtScatterer));
ndof_ = static_cast<double>(track_clusters_.size()) - 4.; ndof_ = m_upstream->getNdof() + m_downstream->getNdof();
chi2ndof_ = chi2_ / ndof_; chi2ndof_ = chi2_ / ndof_;
} }
......
...@@ -36,8 +36,7 @@ ROOT::Math::XYPoint StraightLineTrack::getKinkAt(const std::string&) const { ...@@ -36,8 +36,7 @@ ROOT::Math::XYPoint StraightLineTrack::getKinkAt(const std::string&) const {
void StraightLineTrack::calculateChi2() { void StraightLineTrack::calculateChi2() {
// Get the number of clusters // Get the number of clusters
ndof_ = (static_cast<double>(track_clusters_.size()) - 2.) * 2.;
ndof_ = static_cast<double>(track_clusters_.size()) - 2.;
chi2_ = 0.; chi2_ = 0.;
chi2ndof_ = 0.; chi2ndof_ = 0.;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment