1 #ifndef PixelTrackFitting_RZLine_H 2 #define PixelTrackFitting_RZLine_H 28 template <
typename P,
typename E,
typename B>
30 const size_t n = points.size();
34 for(
size_t i=0;
i<
n; ++
i) {
40 float simpleCot2 =
sqr( (
z[n-1]-
z[0])/ (
r[n-1]-
r[0]) );
41 for (
size_t i=0;
i<
n; ++
i) {
42 errZ2[
i] = (isBarrel[
i]) ? errors[
i].czz() :
43 errors[
i].rerr(points[
i]) * simpleCot2;
53 const std::vector<float> &
z,
54 const std::vector<float> &
errZ) {
55 const size_t n = errZ.size();
57 for(
size_t i=0;
i<
n; ++
i) errZ2[
i] =
sqr(errZ[
i]);
66 const std::array<float, N>&
z,
67 const std::array<float, N>&
errZ) {
68 std::array<float, N> errZ2;
69 for(
size_t i=0;
i<
N; ++
i) errZ2[
i] =
sqr(errZ[
i]);
100 template <
typename R,
typename Z,
typename E>
102 const size_t n = r.size();
105 for(
size_t i=0;
i<
n; ++
i) {
110 template <
typename T>
RZLine(const P &points, const E &errors, const B &isBarrel)
RZLine(const std::array< float, N > &r, const std::array< float, N > &z, const std::array< float, N > &errZ)
RZLine(const T &r, const T &z, const T &errZ2, ErrZ2_tag)
void calculate(const R &r, const Z &z, const E &errZ2)
std::pair< OmniClusterRef, TrackingParticleRef > P
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)
#define declareDynArray(T, n, x)
RZLine(const std::vector< float > &r, const std::vector< float > &z, const std::vector< float > &errZ)