Mixing local and global coordinates in the chi2 of the straightline track
The chi2 is defined as
chi2_ += ((dist.x() * dist.x() / ex2) + (dist.y() * dist.y() / ey2));
Here,dist
is in global coordinates, while the errors are in local coordinates. The same is done in the fit function.
In most practical cases this is not an issue :)