ATLAS Offline Software
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 
10 namespace NswAsBuilt {
36  public:
37  enum parameter_t {
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,
47  SAGX=9,
48  SAGY=10,
49  DEGX=11,
50  DEGY=12,
51  PGX=13,
52  PGY=14,
53  DSAGX=15,
54  DSAGY=16
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.};
97  };
98 }
99 
100 #endif
101 
ElementModel.h
NswAsBuilt::ElementModelScaleSag::THX
@ THX
Definition: ElementModelScaleSag.h:41
NswAsBuilt::ElementModelScaleSag::nParameters
virtual int nParameters() const override
Definition: ElementModelScaleSag.h:61
NswAsBuilt::ElementModelScaleSag::DDSagX
Amg::Vector3D DDSagX(double dsagx, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:137
NswAsBuilt::ElementModelScaleSag::getParameterName
virtual std::string getParameterName(ipar_t ipar) const override
Definition: ElementModelScaleSag.cxx:81
NswAsBuilt::ElementModelScaleSag::DEGX
@ DEGX
Definition: ElementModelScaleSag.h:49
NswAsBuilt::ElementModelScaleSag::DSagX
Amg::Vector3D DSagX(double sagx, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:115
NswAsBuilt::ElementModelScaleSag::EGX
@ EGX
Definition: ElementModelScaleSag.h:44
NswAsBuilt::ElementModelScaleSag::Y
@ Y
Definition: ElementModelScaleSag.h:39
NswAsBuilt::ElementModelScaleSag::parameter_t
parameter_t
Definition: ElementModelScaleSag.h:37
NswAsBuilt::ElementModel::VectorSetRef
Eigen::Ref< VectorSet > VectorSetRef
Definition: ElementModel.h:37
python.CreateTierZeroArgdict.parname
parname
Definition: CreateTierZeroArgdict.py:194
NswAsBuilt::ElementModelScaleSag::Z
@ Z
Definition: ElementModelScaleSag.h:40
NswAsBuilt::ElementModelScaleSag::m_lenX
double m_lenX
Definition: ElementModelScaleSag.h:94
NswAsBuilt::ElementModelScaleSag::DDSagY
Amg::Vector3D DDSagY(double dsagy, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:149
NswAsBuilt::ElementModelScaleSag::X
@ X
Definition: ElementModelScaleSag.h:38
NswAsBuilt::ElementModelScaleSag::transform
virtual void transform(const ParameterVector &parvec, VectorSetRef local) const override
Transform a set of vectors expressed in local frame, stored in a matrix.
Definition: ElementModelScaleSag.cxx:21
NswAsBuilt::ElementModelScaleSag::DPgY
Amg::Vector3D DPgY(double pgy, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:187
NswAsBuilt::ElementModelScaleSag::PGY
@ PGY
Definition: ElementModelScaleSag.h:52
NswAsBuilt::ElementModelScaleSag::m_lenY
double m_lenY
Definition: ElementModelScaleSag.h:95
NswAsBuilt::ElementModelScaleSag::DEg
static Amg::Vector3D DEg(double egx, double egy, double egz, const Amg::Vector3D &d0)
Definition: ElementModelScaleSag.cxx:107
NswAsBuilt::ElementModelScaleSag::DPgX
Amg::Vector3D DPgX(double pgx, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:179
NswAsBuilt::ElementModelScaleSag::getParameterIndex
virtual ipar_t getParameterIndex(const std::string &parname) const override
Definition: ElementModelScaleSag.cxx:57
NswAsBuilt::ElementModelScaleSag::EGY
@ EGY
Definition: ElementModelScaleSag.h:45
NswAsBuilt::ElementModelScaleSag::DEGY
@ DEGY
Definition: ElementModelScaleSag.h:50
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
NswAsBuilt::ElementModelScaleSag::SAGY
@ SAGY
Definition: ElementModelScaleSag.h:48
NswAsBuilt::ElementModelScaleSag::THZ
@ THZ
Definition: ElementModelScaleSag.h:43
NswAsBuilt::ElementModel::ipar_t
unsigned int ipar_t
Definition: ElementModel.h:35
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
NswAsBuilt::ElementModelScaleSag::PGX
@ PGX
Definition: ElementModelScaleSag.h:51
NswAsBuilt::ElementModelScaleSag::THY
@ THY
Definition: ElementModelScaleSag.h:42
NswAsBuilt::ElementModelScaleSag::DSAGX
@ DSAGX
Definition: ElementModelScaleSag.h:53
NswAsBuilt::ElementModelScaleSag::applyDeformation
void applyDeformation(const ParameterVector &parvec, Eigen::Ref< Amg::Vector3D > local) const
Definition: ElementModelScaleSag.cxx:195
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NswAsBuilt::ElementModelScaleSag::applyDeformation2
void applyDeformation2(const ParameterVector &parvec, VectorSetRef local) const
Definition: ElementModelScaleSag.cxx:215
NswAsBuilt::ElementModelScaleSag::DSagY
Amg::Vector3D DSagY(double sagy, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:126
NswAsBuilt::ElementModelScaleSag::SAGX
@ SAGX
Definition: ElementModelScaleSag.h:47
NswAsBuilt::ElementModel
Pure abstract class representing the deformation model of an Element.
Definition: ElementModel.h:33
NswAsBuilt::ElementModelScaleSag::m_defo0
Amg::Vector3D m_defo0
Definition: ElementModelScaleSag.h:96
NswAsBuilt::ElementModelScaleSag
An element model implementing the deformations used for the NSW MM as-built parameters.
Definition: ElementModelScaleSag.h:35
NswAsBuilt::ElementModelScaleSag::cacheTransform
virtual void cacheTransform(ParameterVector &parvec) const override
Cache the rigid component of this deformation model.
Definition: ElementModelScaleSag.cxx:44
NswAsBuilt
Definition: CathodeBoardElement.h:12
NswAsBuilt::ElementModelScaleSag::DDegY
Amg::Vector3D DDegY(double degy, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:170
NswAsBuilt::ElementModelScaleSag::ElementModelScaleSag
ElementModelScaleSag()=delete
NswAsBuilt::ElementModelScaleSag::EGZ
@ EGZ
Definition: ElementModelScaleSag.h:46
NswAsBuilt::ElementModelScaleSag::DSAGY
@ DSAGY
Definition: ElementModelScaleSag.h:54
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NswAsBuilt::ElementModelScaleSag::DDegX
Amg::Vector3D DDegX(double degx, const Amg::Vector3D &d0) const
Definition: ElementModelScaleSag.cxx:161