|
ATLAS Offline Software
|
Go to the documentation of this file.
11 constexpr
double DivBy1k = 1.e-3;
15 : m_lenX(lenX), m_lenY(lenY), m_defo0(std::move(defo0))
24 throw std::runtime_error(
"Should call Element::cacheTransforms() first");
48 * Eigen::AngleAxisd(
pars[
THZ], Eigen::Vector3d::UnitZ())
49 * Eigen::AngleAxisd(
pars[
THY], Eigen::Vector3d::UnitY())
50 * Eigen::AngleAxisd(
pars[
THX], Eigen::Vector3d::UnitX());
62 if (
parname ==
"thx")
return parameter_t::THX;
63 if (
parname ==
"thy")
return parameter_t::THY;
64 if (
parname ==
"thz")
return parameter_t::THZ;
65 if (
parname ==
"egx")
return parameter_t::EGX;
66 if (
parname ==
"egy")
return parameter_t::EGY;
67 if (
parname ==
"egz")
return parameter_t::EGZ;
68 if (
parname ==
"sagx")
return parameter_t::SAGX;
69 if (
parname ==
"sagy")
return parameter_t::SAGY;
70 if (
parname ==
"degx")
return parameter_t::DEGX;
71 if (
parname ==
"degy")
return parameter_t::DEGY;
72 if (
parname ==
"pgx")
return parameter_t::PGX;
73 if (
parname ==
"pgy")
return parameter_t::PGY;
74 if (
parname ==
"dsagx")
return parameter_t::DSAGX;
75 if (
parname ==
"dsagy")
return parameter_t::DSAGY;
76 throw std::runtime_error(
"Invalid parameter name "+
parname);
87 case THX:
return "thx";
88 case THY:
return "thy";
89 case THZ:
return "thz";
90 case EGX:
return "egx";
91 case EGY:
return "egy";
92 case EGZ:
return "egz";
93 case SAGX:
return "sagx";
94 case SAGY:
return "sagy";
95 case DEGX:
return "degx";
96 case DEGY:
return "degy";
97 case PGX:
return "pgx";
98 case PGY:
return "pgy";
99 case DSAGX:
return "dsagx";
100 case DSAGY:
return "dsagy";
101 default:
throw std::runtime_error(
"Invalid parameter");
110 return d0.array() * Eigen::Array3d{egx*DivBy1k, egy*DivBy1k, egz*DivBy1k};
120 double delta = sagx * (1. -
r*
r);
131 double delta = sagy * (1. -
r*
r);
140 double sagx = dsagx *
d0[0]/(0.5*
m_lenX);
143 double delta = sagx * (1. -
r*
r);
152 double sagy = dsagy *
d0[1]/(0.5*
m_lenY);
155 double delta = sagy * (1. -
r*
r);
163 double egx_eff = degx *
d0[1]/(0.5*
m_lenY);
164 double delta = egx_eff *
d0[0]*DivBy1k;
172 double egy_eff = degy *
d0[0]/(0.5*
m_lenX);
173 double delta = egy_eff *
d0[1]*DivBy1k;
181 double delta = pgx *
d0[1]/(0.5*
m_lenY);
189 double delta = pgy *
d0[0]/(0.5*
m_lenX);
230 VectorSet p2 = -1.0*(
r.array().square().colwise() - Eigen::Array3d::Ones());
232 double egx = parvec[
EGX];
233 double egy = parvec[
EGY];
234 double egz = parvec[
EGZ];
235 double sagx = parvec[
SAGX];
236 double sagy = parvec[
SAGY];
237 double dsagx = parvec[
DSAGX];
238 double dsagy = parvec[
DSAGY];
239 double degx = parvec[
DEGX];
240 double degy = parvec[
DEGY];
241 double pgx = parvec[
PGX];
242 double pgy = parvec[
PGY];
246 local.array() +=
d0.array().colwise() * Eigen::Array3d{egx*DivBy1k, egy*DivBy1k, egz*DivBy1k};
250 local.topRows<2>().
array() +=
p2.topRows<2>().
array().colwise().reverse().colwise() * Eigen::Array2d{sagx, sagy};
254 local.topRows<2>().
array() += (
p2.topRows<2>().
array().colwise().reverse() *
r.topRows<2>().
array()).colwise() * Eigen::Array2d{dsagx, dsagy};
258 local.topRows<2>().
array() += (
d0.topRows<2>().
array() *
r.topRows<2>().
array().colwise().reverse()).colwise() * Eigen::Array2d{degx*DivBy1k, degy*DivBy1k};
262 local.topRows<2>().
array() +=
r.topRows<2>().
array().colwise().reverse().colwise() * Eigen::Array2d{pgx, pgy};
Amg::Vector3D DDSagX(double dsagx, const Amg::Vector3D &d0) const
virtual std::string getParameterName(ipar_t ipar) const override
Amg::Vector3D DSagX(double sagx, const Amg::Vector3D &d0) const
Eigen::Ref< VectorSet > VectorSetRef
std::vector< double > parameters
Amg::Vector3D DDSagY(double dsagy, const Amg::Vector3D &d0) const
virtual void transform(const ParameterVector &parvec, VectorSetRef local) const override
Transform a set of vectors expressed in local frame, stored in a matrix.
Amg::Vector3D DPgY(double pgy, const Amg::Vector3D &d0) const
static Amg::Vector3D DEg(double egx, double egy, double egz, const Amg::Vector3D &d0)
Amg::Vector3D DPgX(double pgx, const Amg::Vector3D &d0) const
virtual ipar_t getParameterIndex(const std::string &parname) const override
Eigen::Affine3d transformCache
Eigen::Matrix< double, 3, Eigen::Dynamic, Eigen::ColMajor|Eigen::AutoAlign, 3, 5 > VectorSet
void applyDeformation(const ParameterVector &parvec, Eigen::Ref< Amg::Vector3D > local) const
Eigen::Matrix< double, 3, 1 > Vector3D
void applyDeformation2(const ParameterVector &parvec, VectorSetRef local) const
Amg::Vector3D DSagY(double sagy, const Amg::Vector3D &d0) const
virtual void cacheTransform(ParameterVector &parvec) const override
Cache the rigid component of this deformation model.
Amg::Vector3D DDegY(double degy, const Amg::Vector3D &d0) const
ElementModelScaleSag()=delete
Amg::Vector3D DDegX(double degx, const Amg::Vector3D &d0) const