Skip to content
Snippets Groups Projects
Commit cfa24b7e authored by Naomi Davis's avatar Naomi Davis
Browse files

AlignmentTrackChi2: Making sure track fit is checked, before getting the chisq

parent 9159a8bb
No related branches found
No related tags found
No related merge requests found
Pipeline #5233842 failed
...@@ -150,8 +150,15 @@ void AlignmentTrackChi2::MinimiseTrackChi2(Int_t&, Double_t*, Double_t& result, ...@@ -150,8 +150,15 @@ void AlignmentTrackChi2::MinimiseTrackChi2(Int_t&, Double_t*, Double_t& result,
fitIterations = 0; fitIterations = 0;
} }
// Add the new chi2 // check if the fit has failed
return track->getChi2(); if(!track->isFitted()) {
LOG(WARNING) << "Refit failed - track will be discarded for this alignment step ";
return 0.0;
}
else {
// add the new chi2
return track->getChi2();
}
}; };
// Loop over all tracks // Loop over all tracks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment