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
HepGeom::Transform3D Transform
align::ID rawId() const
Do not expose Euler angles since we may change its type later.
AlignTransform(const Translation &itranslation, const EulerAngles &ieulerAngles, align::ID irawId)
Constructor from Euler angles.
uint32_t ID
Definition: Definitions.h:24
CLHEP::Hep3Vector Translation
const bool operator<(const AlignTransform &other) const
const Translation & translation() const
CLHEP::HepEulerAngles EulerAngles
Transform transform() const
AlignTransform(const Translation &itranslation, const Rotation &irotation, align::ID irawId)
Constructor from Rotation.
EulerAngles m_eulerAngles
align::ID m_rawId
AlignTransform()
Default constructor.
#define COND_SERIALIZABLE
Definition: Serializable.h:39
Translation m_translation
Rotation rotation() const
CLHEP::HepRotation Rotation