ATLAS Offline Software
Loading...
Searching...
No Matches
ElementModelScaleSag.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONNSWASBUILT_ELEMENTMODELSCALESAG_H
6#define MUONNSWASBUILT_ELEMENTMODELSCALESAG_H
7
9
10namespace NswAsBuilt {
36 public:
38 X=0,
39 Y=1,
40 Z=2,
41 THX=3,
42 THY=4,
43 THZ=5,
44 EGX=6,
45 EGY=7,
46 EGZ=8,
48 SAGY=10,
49 DEGX=11,
50 DEGY=12,
51 PGX=13,
52 PGY=14,
55 };
56
57 ElementModelScaleSag(double lenX, double lenY, Amg::Vector3D defo0);
59
60 // Number of parameters used
61 virtual int nParameters() const override { return 17; }
62
63 // Transform a set of vectors expressed in local frame, stored in a matrix
64 virtual void transform(const ParameterVector& parvec, VectorSetRef local) const override;
65
66 // Cache the rigid component of this deformation model
67 virtual void cacheTransform(ParameterVector& parvec) const override;
68
69 // Helper methods to convert parameter index to string representation
70 virtual ipar_t getParameterIndex(const std::string& parname) const override;
71 virtual std::string getParameterName(ipar_t ipar) const override;
72
73 private:
74 // The actual implementation: applyDeformation is the reference
75 // implementation, which does not make use of Eigen optimizations
76 // Not actually used, provided for comparison purposes
77 void applyDeformation(const ParameterVector& parvec, Eigen::Ref<Amg::Vector3D> local) const;
78 // The actual implementation: applyDeformation makes use of the Eigen
79 // optimizations.
80 void applyDeformation2(const ParameterVector& parvec, VectorSetRef local) const;
81
82 // Basic ingredients of the calculation, called by method applyDeformation
83 static Amg::Vector3D DEg( double egx, double egy, double egz, const Amg::Vector3D& d0) ;
84 Amg::Vector3D DSagX(double sagx, const Amg::Vector3D& d0) const;
85 Amg::Vector3D DSagY(double sagy, const Amg::Vector3D& d0) const;
86 Amg::Vector3D DDSagX(double dsagx, const Amg::Vector3D& d0) const;
87 Amg::Vector3D DDSagY(double dsagy, const Amg::Vector3D& d0) const;
88 Amg::Vector3D DDegX(double degx, const Amg::Vector3D& d0) const;
89 Amg::Vector3D DDegY(double degy, const Amg::Vector3D& d0) const;
90 Amg::Vector3D DPgX(double pgx, const Amg::Vector3D& d0) const;
91 Amg::Vector3D DPgY(double pgy, const Amg::Vector3D& d0) const;
92
93 // Properties and scales needed for the calculation
94 double m_lenX {0.};
95 double m_lenY {0.};
96 Amg::Vector3D m_defo0 {Amg::Vector3D::Zero()};
97 };
98}
99
100#endif
101
virtual ipar_t getParameterIndex(const std::string &parname) const override
virtual int nParameters() const override
Amg::Vector3D DDSagX(double dsagx, const Amg::Vector3D &d0) const
void applyDeformation2(const ParameterVector &parvec, VectorSetRef local) const
virtual std::string getParameterName(ipar_t ipar) const override
Amg::Vector3D DPgX(double pgx, const Amg::Vector3D &d0) const
Amg::Vector3D DPgY(double pgy, const Amg::Vector3D &d0) const
static Amg::Vector3D DEg(double egx, double egy, double egz, const Amg::Vector3D &d0)
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 DDegY(double degy, const Amg::Vector3D &d0) const
Amg::Vector3D DDSagY(double dsagy, const Amg::Vector3D &d0) const
void applyDeformation(const ParameterVector &parvec, Eigen::Ref< Amg::Vector3D > local) const
virtual void cacheTransform(ParameterVector &parvec) const override
Cache the rigid component of this deformation model.
ElementModelScaleSag(double lenX, double lenY, Amg::Vector3D defo0)
Amg::Vector3D DSagY(double sagy, const Amg::Vector3D &d0) const
Amg::Vector3D DSagX(double sagx, const Amg::Vector3D &d0) const
Amg::Vector3D DDegX(double degx, const Amg::Vector3D &d0) const
Pure abstract class representing the deformation model of an Element.
Eigen::Ref< VectorSet > VectorSetRef
Eigen::Matrix< double, 3, 1 > Vector3D