Commit 7cca1539 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'ndof_definitions' into 'master'

Fixing the ndofs definition for the straight line fit

See merge request !385
parents d0b5fdba 087eb65d
Pipeline #2150391 passed with stages
in 14 minutes and 57 seconds
......@@ -33,8 +33,8 @@ ROOT::Math::XYPoint Multiplet::getKinkAt(const std::string&) const {
void Multiplet::calculateChi2() {
chi2_ = m_upstream->getChi2() + m_downstream->getChi2() + sqrt(m_offsetAtScatterer.Dot(m_offsetAtScatterer));
ndof_ = static_cast<double>(track_clusters_.size()) - 4.;
chi2_ = m_upstream->getChi2() + m_downstream->getChi2();
ndof_ = m_upstream->getNdof() + m_downstream->getNdof();
chi2ndof_ = chi2_ / ndof_;
}
......
......@@ -36,8 +36,9 @@ ROOT::Math::XYPoint StraightLineTrack::getKinkAt(const std::string&) const {
void StraightLineTrack::calculateChi2() {
// Get the number of clusters
ndof_ = static_cast<double>(track_clusters_.size()) - 2.;
// We do have a 2-dimensional offset(x_0,y_0) and slope (dx,dy). Each hit provides two measurements.
// ndof_ = 2*num_planes - 4 = 2 * (num_planes -2)
ndof_ = (static_cast<double>(track_clusters_.size()) - 2.) * 2.;
chi2_ = 0.;
chi2ndof_ = 0.;
......
......@@ -19,8 +19,7 @@ time_cut_frameedge = 10ns
#DEPENDS test_io_write_rootobj.conf
#PASS Total efficiency of detector W0013_G02: 100%, measured with 32108/32108 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100%, measured with 34446/34446 matched/total tracks
# Please note:
# Pixels are masked in the [EventLoaderTimepix3] when reading in the online configuration files.
# Therefore, no pixels are masked here and the number of associated tracks is slightly higher than
......
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