CMS 3D CMS Logo

AlignTransform.h
Go to the documentation of this file.
1 #ifndef AlignTransform_H
2 #define AlignTransform_H
4 
5 #include "CLHEP/Vector/EulerAngles.h"
6 #include "CLHEP/Vector/Rotation.h"
7 #include "CLHEP/Vector/ThreeVector.h"
8 #include "CLHEP/Geometry/Transform3D.h"
9 
11 
16 public:
17  typedef CLHEP::HepEulerAngles EulerAngles;
18  typedef CLHEP::Hep3Vector Translation;
19  typedef CLHEP::HepRotation Rotation;
20  typedef HepGeom::Transform3D Transform;
21 
24 
26  AlignTransform(const Translation& itranslation, const EulerAngles& ieulerAngles, align::ID irawId)
27  : m_translation(itranslation), m_eulerAngles(ieulerAngles), m_rawId(irawId) {}
28 
30  AlignTransform(const Translation& itranslation, const Rotation& irotation, align::ID irawId)
31  : m_translation(itranslation), m_eulerAngles(irotation.eulerAngles()), m_rawId(irawId) {}
32 
33  const Translation& translation() const { return m_translation; }
35  // const EulerAngles & eulerAngles() const { return m_eulerAngles; }
36  align::ID rawId() const { return m_rawId; }
37 
39  const { //std::cout<<"Inside aligntransform::rotation() with id="<<std::hex<<m_rawId<<std::dec<<std::endl ;
40  //std::cout<<" for e.a.="<<m_eulerAngles<<std::endl;
41  return Rotation(m_eulerAngles);
42  }
43 
44  Transform transform() const { return Transform(rotation(), translation()); }
45 
46  // Implemented so this can be sorted by rawId
47  const bool operator<(const AlignTransform& other) const { return (m_rawId < other.rawId()); }
48 
49 private:
53 
55 };
56 #endif //AlignTransform_H
AlignTransform::m_eulerAngles
EulerAngles m_eulerAngles
Definition: AlignTransform.h:51
AlignTransform::rawId
align::ID rawId() const
Do not expose Euler angles since we may change its type later.
Definition: AlignTransform.h:36
AlignTransform::Rotation
CLHEP::HepRotation Rotation
Definition: AlignTransform.h:19
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
AlignTransform::EulerAngles
CLHEP::HepEulerAngles EulerAngles
Definition: AlignTransform.h:17
AlignTransform::Translation
CLHEP::Hep3Vector Translation
Definition: AlignTransform.h:18
trackingPlots.other
other
Definition: trackingPlots.py:1460
AlignTransform::AlignTransform
AlignTransform(const Translation &itranslation, const EulerAngles &ieulerAngles, align::ID irawId)
Constructor from Euler angles.
Definition: AlignTransform.h:26
AlignTransform
Definition: AlignTransform.h:15
AlignTransform::AlignTransform
AlignTransform(const Translation &itranslation, const Rotation &irotation, align::ID irawId)
Constructor from Rotation.
Definition: AlignTransform.h:30
align::ID
uint32_t ID
Definition: Definitions.h:24
AlignTransform::rotation
Rotation rotation() const
Definition: AlignTransform.h:38
AlignTransform::Transform
HepGeom::Transform3D Transform
Definition: AlignTransform.h:20
Definitions.h
AlignTransform::m_translation
Translation m_translation
Definition: AlignTransform.h:50
Serializable.h
AlignTransform::translation
const Translation & translation() const
Definition: AlignTransform.h:33
AlignTransform::AlignTransform
AlignTransform()
Default constructor.
Definition: AlignTransform.h:23
AlignTransform::operator<
const bool operator<(const AlignTransform &other) const
Definition: AlignTransform.h:47
AlignTransform::transform
Transform transform() const
Definition: AlignTransform.h:44
AlignTransform::m_rawId
align::ID m_rawId
Definition: AlignTransform.h:52