ATLAS Offline Software
SurveyConstraintPoint.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 //--------------------------------------------------------------------------
6 // Description:
7 // Class SurveyConstraintPoint. Descripts points in global coordinates
8 // for the survey markers in 2 different alignments, current and survey.
9 //
10 // Author List:
11 // Tobias Golling
12 //
13 //------------------------------------------------------------------------
14 
15 #ifndef SURVEYCONSTRAINTPOINT_HH
16 #define SURVEYCONSTRAINTPOINT_HH
17 
18 //-------------------------------
19 // Collaborating Class Headers --
20 //-------------------------------
23 #include <iostream>
24 
26 
27 //--------------------
28 // Instance Members --
29 //--------------------
30 
31 public:
33  // Constructors
35  const Amg::Vector3D& current );
36 
37  // Copy Constructor
39 
40  // Destructor
41  virtual ~SurveyConstraintPoint( );
42 
43  // Operators
45  bool operator==( const SurveyConstraintPoint& ) const;
46  bool operator!=( const SurveyConstraintPoint& ) const;
47 
48  // Selectors (const)
49  const Amg::Vector3D& survey() const { return m_survey; };
50  const Amg::Vector3D& current() const { return m_current; };
51 
52 // non-const
53  Amg::Vector3D& survey() { return m_survey; };
55 
56  // Modifiers
57  void setSurvey( const Amg::Vector3D& point ) {
58  m_survey = point;
59  }
60 
61  void setCurrent( const Amg::Vector3D& point ) {
62  m_current = point;
63  }
64 // trasform both points
65  void moveTo( const Amg::Transform3D& trans ) {
66  m_survey = trans * m_survey;
67  m_current = trans * m_current;
68  }
69 
70  void moveFrom( const Amg::Transform3D& trans ) {
71  m_survey = (trans.inverse()) * m_survey ;
72  m_current = (trans.inverse()) * m_current;
73  }
74 
75  void scaleZ( float scale ) {
76  //float before = m_survey.z();
77  float zs = m_survey.z() * scale;
78  float zc = m_current.z() * scale;
79  m_survey[2] = zs;
80  m_current[2] = zc;
81  // cout << "scale, before, after, after = " << scale << "," << before << "," << zs << "," << m_survey.z() << endl;
82  }
83 
84 
85 protected:
86 
87  // Helper functions
88 
89 private:
90 
91  // Data members
94 
95 };
96 
97 #endif
SurveyConstraintPoint::operator!=
bool operator!=(const SurveyConstraintPoint &) const
Definition: SurveyConstraintPoint.cxx:60
SurveyConstraintPoint::moveTo
void moveTo(const Amg::Transform3D &trans)
Definition: SurveyConstraintPoint.h:65
SurveyConstraintPoint::survey
const Amg::Vector3D & survey() const
Definition: SurveyConstraintPoint.h:49
SurveyConstraintPoint::scaleZ
void scaleZ(float scale)
Definition: SurveyConstraintPoint.h:75
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
SurveyConstraintPoint::operator=
SurveyConstraintPoint & operator=(const SurveyConstraintPoint &)
Definition: SurveyConstraintPoint.cxx:46
GeoPrimitives.h
SurveyConstraintPoint::current
Amg::Vector3D & current()
Definition: SurveyConstraintPoint.h:54
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
SurveyConstraintPoint::moveFrom
void moveFrom(const Amg::Transform3D &trans)
Definition: SurveyConstraintPoint.h:70
SurveyConstraintPoint::current
const Amg::Vector3D & current() const
Definition: SurveyConstraintPoint.h:50
EventPrimitives.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SurveyConstraintPoint::survey
Amg::Vector3D & survey()
Definition: SurveyConstraintPoint.h:53
SurveyConstraintPoint::setSurvey
void setSurvey(const Amg::Vector3D &point)
Definition: SurveyConstraintPoint.h:57
SurveyConstraintPoint::m_current
Amg::Vector3D m_current
Definition: SurveyConstraintPoint.h:93
SurveyConstraintPoint
Definition: SurveyConstraintPoint.h:25
SurveyConstraintPoint::SurveyConstraintPoint
SurveyConstraintPoint()
Definition: SurveyConstraintPoint.cxx:18
SurveyConstraintPoint::operator==
bool operator==(const SurveyConstraintPoint &) const
Definition: SurveyConstraintPoint.cxx:55
SurveyConstraintPoint::m_survey
Amg::Vector3D m_survey
Definition: SurveyConstraintPoint.h:92
SurveyConstraintPoint::setCurrent
void setCurrent(const Amg::Vector3D &point)
Definition: SurveyConstraintPoint.h:61
SurveyConstraintPoint::~SurveyConstraintPoint
virtual ~SurveyConstraintPoint()
Definition: SurveyConstraintPoint.cxx:38