ATLAS Offline Software
Loading...
Searching...
No Matches
ElementModelSTGC.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONNSWASBUILT_ELEMENTMODELSTGC_H
6#define MUONNSWASBUILT_ELEMENTMODELSTGC_H
7
9
10namespace NswAsBuilt {
27 public:
29 X=0,
30 Y=1,
31 Z=2,
32 THX=3,
33 THY=4,
34 THZ=5,
35 ROT=6,
36 OFF=7,
37 SCL=8,
39 };
40
41 ElementModelSTGC(double lenX, double lenY, Amg::Vector3D defo0);
42 ElementModelSTGC() = delete;
43
47 virtual int nParameters() const override { return 10; }
48
52 virtual void transform(const ParameterVector& parvec, VectorSetRef local) const override;
53
57 virtual void cacheTransform(ParameterVector& parvec) const override;
58
59 /*
60 * Helper methods to convert parameter index to string representation
61 */
62 virtual ipar_t getParameterIndex(const std::string& parname) const override;
63 virtual std::string getParameterName(ipar_t ipar) const override;
64
65 private:
66 // The actual implementation: applyDeformation is the reference
67 // implementation, which does not make use of Eigen optimizations
68 // Not actually used, provided for comparison purposes
69 void applyDeformation(const ParameterVector& parvec, Eigen::Ref<Amg::Vector3D> local) const;
70
71 // The actual implementation: applyDeformation2 makes use of the Eigen
72 // optimizations.
73 void applyDeformation2(const ParameterVector& parvec, VectorSetRef local) const;
74
75 static Amg::Vector3D stgcOffset(double off) ;
76 static Amg::Vector3D stgcRotation(double rot, const Amg::Vector3D& d0) ;
77 Amg::Vector3D stgcScale(double scl, const Amg::Vector3D& d0) const;
78 Amg::Vector3D stgcNonPar(double npar, const Amg::Vector3D& d0) const;
79
80 // Properties and scales needed for the calculation
81 double m_lenY{0.};
82 double m_lenX{0.};
83 Amg::Vector3D m_defo0 {Amg::Vector3D::Zero()};
84
85 };
86}
87
88#endif
static Amg::Vector3D stgcOffset(double off)
virtual int nParameters() const override
The number of parameters used.
void applyDeformation2(const ParameterVector &parvec, VectorSetRef local) const
virtual ipar_t getParameterIndex(const std::string &parname) const override
virtual std::string getParameterName(ipar_t ipar) const override
void applyDeformation(const ParameterVector &parvec, Eigen::Ref< Amg::Vector3D > local) const
ElementModelSTGC(double lenX, double lenY, Amg::Vector3D defo0)
static Amg::Vector3D stgcRotation(double rot, 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 stgcNonPar(double npar, const Amg::Vector3D &d0) const
Amg::Vector3D stgcScale(double scl, const Amg::Vector3D &d0) const
virtual void cacheTransform(ParameterVector &parvec) const override
Cache the rigid component of this deformation model.
Pure abstract class representing the deformation model of an Element.
Eigen::Ref< VectorSet > VectorSetRef
Eigen::Matrix< double, 3, 1 > Vector3D