98 const T*
a =
A.fArray;
100 const Tv*
b =
B.fArray;
105 #include "RecoTracker/MkFitCore/standalone/CFMatrix33Vector3.ah" 126 for (
int n = 0;
n <
N; ++
n) {
139 for (
int i = 0;
i < 3; ++
i) {
146 for (
int n = 0;
n <
N; ++
n) {
147 outPar.
At(
n, 0, 0) =
x.constAt(
n, 0, 0);
148 outPar.
At(
n, 1, 0) = y.constAt(
n, 0, 0);
149 outPar.
At(
n, 2, 0) = z.constAt(
n, 0, 0);
155 for (
int n = 0;
n <
N; ++
n) {
160 x.constAt(
n, 0, 0) *
x.constAt(
n, 0, 0) * invvarR2 + y.constAt(
n, 0, 0) * y.constAt(
n, 0, 0) * varPhi;
161 outErr.
At(
n, 0, 1) =
x.constAt(
n, 0, 0) * y.constAt(
n, 0, 0) * (invvarR2 - varPhi);
165 y.constAt(
n, 0, 0) * y.constAt(
n, 0, 0) * invvarR2 +
x.constAt(
n, 0, 0) *
x.constAt(
n, 0, 0) * varPhi;
173 for (
int n = 0;
n <
N; ++
n) {
181 for (
int n = 0;
n <
N; ++
n) {
182 if (xtou.
At(
n, 0, 0))
184 for (
int i = 0;
i < 3; ++
i) {
185 u.
At(
n,
i, 0) =
x.constAt(
n,
i, 0) /
r2.constAt(
n,
i, 0);
186 v.At(
n,
i, 0) = y.constAt(
n,
i, 0) /
r2.constAt(
n,
i, 0);
190 for (
int i = 0;
i < 3; ++
i) {
191 u.
At(
n,
i, 0) = y.constAt(
n,
i, 0) /
r2.constAt(
n,
i, 0);
192 v.At(
n,
i, 0) =
x.constAt(
n,
i, 0) /
r2.constAt(
n,
i, 0);
199 for (
int n = 0;
n <
N; ++
n) {
200 for (
int i = 0;
i < 3; ++
i) {
201 A.At(
n,
i, 0) = 1.0f;
212 for (
int n = 0;
n <
N; ++
n) {
213 b.At(
n, 0, 0) = 1.0f / (2.0f *
C.constAt(
n, 0, 0));
214 a.At(
n, 0, 0) =
b.constAt(
n, 0, 0) *
C.constAt(
n, 1, 0);
222 for (
int n = 0;
n <
N; ++
n) {
224 (xtou.
constAt(
n, 0, 0) ?
x.constAt(
n, 0, 0) -
a.constAt(
n, 0, 0) :
x.constAt(
n, 0, 0) -
b.constAt(
n, 0, 0));
226 (xtou.
constAt(
n, 0, 0) ? y.constAt(
n, 0, 0) -
b.constAt(
n, 0, 0) : y.constAt(
n, 0, 0) -
a.constAt(
n, 0, 0));
228 px.At(
n, 0, 0) = std::copysign(
k * vry.
constAt(
n, 0, 0),
x.constAt(
n, 2, 0) -
x.constAt(
n, 0, 0));
229 py.At(
n, 0, 0) = std::copysign(
k * vrx.
constAt(
n, 0, 0), y.constAt(
n, 2, 0) - y.constAt(
n, 0, 0));
230 pz.
At(
n, 0, 0) = (
pT.constAt(
n, 0, 0) * (z.constAt(
n, 2, 0) - z.constAt(
n, 0, 0))) /
231 hipo((
x.constAt(
n, 2, 0) -
x.constAt(
n, 0, 0)), (y.constAt(
n, 2, 0) - y.constAt(
n, 0, 0)));
235 for (
int n = 0;
n <
N; ++
n) {
236 outPar.
At(
n, 3, 0) = 1.0f /
pT.constAt(
n, 0, 0);
239 #ifdef INWARDFIT // arctan is odd, so pz -> -pz means theta -> -theta 241 outPar.
At(
n, 5, 0) *= -1.0f;
246 for (
int n = 0;
n <
N; ++
n) {
255 for (
int n = 0;
n <
N; ++
n) {
259 for (
int i = 0;
i < 6;
i++) {
261 for (
int j = 0;
j < 6;
j++) {
267 updatedState.convertFromCCSToCartesian();
269 dprint(
"--------------------------------");
void conformalFitMPlex(bool fitting, MPlexQI seedID, MPlexLS &outErr, MPlexLV &outPar, const MPlexHV &msPar0, const MPlexHV &msPar1, const MPlexHV &msPar2)
const T & constAt(idx_t n, idx_t i, idx_t j) const
T & At(idx_t n, idx_t i, idx_t j)
float getTheta(float r, float z)
constexpr float phierr012
constexpr float thetaerr049
const T & constAt(idx_t n, idx_t i, idx_t j) const
constexpr Matriplex::idx_t NN
float getRad2(float x, float y)
Abs< T >::type abs(const T &t)
constexpr float ptinverr049
constexpr float thetaerr012
void invertCramer(MPlex< T, D, D, N > &A, double *determ=nullptr)
float hipo(float x, float y)
void print(std::string_view label, const MeasurementState &s)
float getPhi(float x, float y)
constexpr float phierr049
void CFMap(const MPlexHH &A, const MPlexHV &B, MPlexHV &C)
constexpr float ptinverr012
#define ASSUME_ALIGNED(a, b)
T & At(idx_t n, idx_t i, idx_t j)