5 template <
class T>
inline T sqr(
T t) {
return t*
t;}
8 const std::vector<float> & aZ,
9 const std::vector<float> & aErrZ) :
10 storage(3*aR.
size()) {
23 const vector<GlobalError> &
errors,
24 const vector<bool>& isBarrel) :
25 storage(3*points.
size()) {
36 float simpleCot2 = (
z[nPoints-1]-
z[0] )/ (
r[nPoints-1] -
r[0] );
37 simpleCot2 *= simpleCot2;
39 errZ2[
i] = (isBarrel[
i]) ? errors[
i].czz() :
40 errors[
i].rerr(points[
i]) * simpleCot2;
45 float &covss,
float &covii,
float &covsi)
const
RZLine(const std::vector< GlobalPoint > &points, const std::vector< GlobalError > &errors, const std::vector< bool > &isBarrel)
std::vector< float > storage
void linearFit(T const *__restrict__ x, T const *__restrict__ y, int ndat, T const *__restrict__ sigy2, T &slope, T &intercept, T &covss, T &covii, T &covsi)
Square< F >::type sqr(const F &f)
void fit(float &cotTheta, float &intercept, float &covss, float &covii, float &covsi) const
float chi2(float cotTheta, float intercept) const
tuple size
Write out results.