ATLAS Offline Software
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 
10 namespace NswAsBuilt {
26  class ElementModelSTGC : public ElementModel {
27  public:
28  enum parameter_t {
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,
38  NPAR=9
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.};
84 
85  };
86 }
87 
88 #endif
ElementModel.h
NswAsBuilt::ElementModelSTGC::SCL
@ SCL
Definition: ElementModelSTGC.h:37
NswAsBuilt::ElementModelSTGC::stgcRotation
static Amg::Vector3D stgcRotation(double rot, const Amg::Vector3D &d0)
Definition: ElementModelSTGC.cxx:93
NswAsBuilt::ElementModelSTGC::OFF
@ OFF
Definition: ElementModelSTGC.h:36
NswAsBuilt::ElementModelSTGC::ElementModelSTGC
ElementModelSTGC()=delete
NswAsBuilt::ElementModelSTGC::m_lenX
double m_lenX
Definition: ElementModelSTGC.h:82
NswAsBuilt::ElementModelSTGC::getParameterName
virtual std::string getParameterName(ipar_t ipar) const override
Definition: ElementModelSTGC.cxx:72
NswAsBuilt::ElementModelSTGC::parameter_t
parameter_t
Definition: ElementModelSTGC.h:28
NswAsBuilt::ElementModel::VectorSetRef
Eigen::Ref< VectorSet > VectorSetRef
Definition: ElementModel.h:37
python.CreateTierZeroArgdict.parname
parname
Definition: CreateTierZeroArgdict.py:194
NswAsBuilt::ElementModelSTGC::ROT
@ ROT
Definition: ElementModelSTGC.h:35
NswAsBuilt::ElementModelSTGC::THY
@ THY
Definition: ElementModelSTGC.h:33
NswAsBuilt::ElementModelSTGC::stgcOffset
static Amg::Vector3D stgcOffset(double off)
Definition: ElementModelSTGC.cxx:88
NswAsBuilt::ElementModelSTGC::THZ
@ THZ
Definition: ElementModelSTGC.h:34
NswAsBuilt::ElementModelSTGC::m_lenY
double m_lenY
Definition: ElementModelSTGC.h:81
NswAsBuilt::ElementModelSTGC::stgcNonPar
Amg::Vector3D stgcNonPar(double npar, const Amg::Vector3D &d0) const
Definition: ElementModelSTGC.cxx:104
NswAsBuilt::ElementModelSTGC::applyDeformation2
void applyDeformation2(const ParameterVector &parvec, VectorSetRef local) const
Definition: ElementModelSTGC.cxx:122
NswAsBuilt::ElementModelSTGC::nParameters
virtual int nParameters() const override
The number of parameters used.
Definition: ElementModelSTGC.h:47
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
NswAsBuilt::ElementModelSTGC
An element model implementing the deformations used for the NSW sTGC as-built parameters.
Definition: ElementModelSTGC.h:26
NswAsBuilt::ElementModelSTGC::stgcScale
Amg::Vector3D stgcScale(double scl, const Amg::Vector3D &d0) const
Definition: ElementModelSTGC.cxx:98
NswAsBuilt::ElementModelSTGC::NPAR
@ NPAR
Definition: ElementModelSTGC.h:38
NswAsBuilt::ElementModelSTGC::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: ElementModelSTGC.cxx:20
NswAsBuilt::ElementModel::ipar_t
unsigned int ipar_t
Definition: ElementModel.h:35
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
NswAsBuilt::ElementModelSTGC::applyDeformation
void applyDeformation(const ParameterVector &parvec, Eigen::Ref< Amg::Vector3D > local) const
Definition: ElementModelSTGC.cxx:110
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NswAsBuilt::ElementModelSTGC::getParameterIndex
virtual ipar_t getParameterIndex(const std::string &parname) const override
Definition: ElementModelSTGC.cxx:58
NswAsBuilt::ElementModelSTGC::THX
@ THX
Definition: ElementModelSTGC.h:32
NswAsBuilt::ElementModel
Pure abstract class representing the deformation model of an Element.
Definition: ElementModel.h:33
NswAsBuilt::ElementModelSTGC::Y
@ Y
Definition: ElementModelSTGC.h:30
NswAsBuilt::ElementModelSTGC::m_defo0
Amg::Vector3D m_defo0
Definition: ElementModelSTGC.h:83
NswAsBuilt
Definition: CathodeBoardElement.h:12
NswAsBuilt::ElementModelSTGC::Z
@ Z
Definition: ElementModelSTGC.h:31
NswAsBuilt::ElementModelSTGC::cacheTransform
virtual void cacheTransform(ParameterVector &parvec) const override
Cache the rigid component of this deformation model.
Definition: ElementModelSTGC.cxx:45
NswAsBuilt::ElementModelSTGC::X
@ X
Definition: ElementModelSTGC.h:29
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32