10 #ifndef LITFILTRATION_H_
11 #define LITFILTRATION_H_
35 static const T
ONE = 1., TWO = 2.;
37 T dxx = hit.
Dx * hit.
Dx;
39 T dyy = hit.
Dy * hit.
Dy;
47 / (dxx * dyy + dxx * par.
C5 + dyy * par.
C0 + par.
C0 * par.
C5
48 - dxy * dxy - TWO * dxy * par.
C1 - par.
C1 * par.
C1);
49 T R00 = (dyy + par.
C5) * t;
50 T R01 = -(dxy + par.
C1) * t;
51 T R11 = (dxx + par.
C0) * t;
54 T K00 = par.
C0 * R00 + par.
C1 * R01;
55 T K01 = par.
C0 * R01 + par.
C1 * R11;
56 T K10 = par.
C1 * R00 + par.
C5 * R01;
57 T K11 = par.
C1 * R01 + par.
C5 * R11;
58 T K20 = par.
C2 * R00 + par.
C6 * R01;
59 T K21 = par.
C2 * R01 + par.
C6 * R11;
60 T K30 = par.
C3 * R00 + par.
C7 * R01;
61 T K31 = par.
C3 * R01 + par.
C7 * R11;
62 T K40 = par.
C4 * R00 + par.
C8 * R01;
63 T K41 = par.
C4 * R01 + par.
C8 * R11;
66 par.
X += K00 * dx + K01 * dy;
67 par.
Y += K10 * dx + K11 * dy;
68 par.
Tx += K20 * dx + K21 * dy;
69 par.
Ty += K30 * dx + K31 * dy;
70 par.
Qp += K40 * dx + K41 * dy;
89 par.
C0 += -K00 * cIn[0] - K01 * cIn[1];
90 par.
C1 += -K00 * cIn[1] - K01 * cIn[5];
91 par.
C2 += -K00 * cIn[2] - K01 * cIn[6];
92 par.
C3 += -K00 * cIn[3] - K01 * cIn[7];
93 par.
C4 += -K00 * cIn[4] - K01 * cIn[8];
95 par.
C5 += -K11 * cIn[5] - K10 * cIn[1];
96 par.
C6 += -K11 * cIn[6] - K10 * cIn[2];
97 par.
C7 += -K11 * cIn[7] - K10 * cIn[3];
98 par.
C8 += -K11 * cIn[8] - K10 * cIn[4];
100 par.
C9 += -K20 * cIn[2] - K21 * cIn[6];
101 par.
C10 += -K20 * cIn[3] - K21 * cIn[7];
102 par.
C11 += -K20 * cIn[4] - K21 * cIn[8];
104 par.
C12 += -K30 * cIn[3] - K31 * cIn[7];
105 par.
C13 += -K30 * cIn[4] - K31 * cIn[8];
107 par.
C14 += -K40 * cIn[4] - K41 * cIn[8];
110 T xmx = hit.
X - par.
X;
111 T ymy = hit.
Y - par.
Y;
112 T norm = dxx * dyy - dxx * par.
C5 - dyy * par.
C0 + par.
C0 * par.
C5
113 - dxy * dxy + TWO * dxy * par.
C1 - par.
C1 * par.
C1;
114 chiSq = ((xmx * (dyy - par.
C5) - ymy * (dxy - par.
C1)) * xmx
115 + (-xmx * (dxy - par.
C1) + ymy * (dxx - par.
C0)) * ymy)
133 static const T
ONE = 1., TWO = 2.;
135 T duu = hit.
Du * hit.
Du;
143 duu + par.
C0 * phiCosSq + phi2SinCos * par.
C1 + par.
C5 * phiSinSq;
192 / (duu - phiCosSq * par.
C0 - phi2SinCos * par.
C1 - phiSinSq * par.
C5);
209 pixelHit.
Dx = hit.
Dx;
210 pixelHit.
Dy = hit.
Dy;
212 LitFiltration<fscal>(par, pixelHit, chiSq);