52 validateDerivativeOutput(*
this, out);
53 if (ctx.sensorID < 0 || ctx.layerID < 0) {
54 throw std::invalid_argument(
"LegendreDOFSet requires an ITS3 measurement context");
57 const double gloX = ctx.measX * std::cos(ctx.measAlpha);
58 const double gloY = ctx.measX * std::sin(ctx.measAlpha);
64 for (
int i = 0;
i <= mOrder; ++
i) {
65 for (
int j = 0;
j <=
i; ++
j) {
66 const double basis = pu[
j] * pv[
i -
j];
67 out(0, idx) = ctx.dydx * basis;
68 out(1, idx) = ctx.dzdx * basis;
76 validateDerivativeOutput(*
this, out);
77 if (ctx.sensorID < 0 || ctx.layerID < 0) {
78 throw std::invalid_argument(
"InextensionalDOFSet requires an ITS3 measurement context");
82 const double gloX = ctx.measX * std::cos(ctx.measAlpha);
83 const double gloY = ctx.measX * std::sin(ctx.measAlpha);
86 const double zOverR = ctx.measZ /
r;
92 const auto fill = [&out, &ctx](
int idx,
double mR,
double mPhi,
double mZ) {
93 out(0, idx) = (ctx.dydx * mR) - mPhi;
94 out(1, idx) = (ctx.dzdx * mR) - mZ;
97 const int order = std::max(mMaxOrder,
hasExtensional() ? mExtOrderPhi : 0);
102 for (
int k = 0; k <= mMaxOrder; ++k) {
105 zOverR * cPhi * cPhi * pu2[k],
106 -zOverR * cPhi * pu1[k],
109 fill(
gIdx(k), -cPhi * pu1[k], pu[k], 0.);
114 for (
int k = 0; k <= mExtOrderPhi; ++k) {
115 for (
int l = 1; l <= mExtOrderZ; ++l) {
117 fill(
hIdx(k, l), pu[k] * pv[l], 0., 0.);
void fillDerivatives(const DerivativeContext &ctx, Eigen::Ref< Eigen::MatrixXd > out) const override