CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignTransform.h
Go to the documentation of this file.
1 #ifndef AlignTransform_H
2 #define AlignTransform_H
3 #include "CLHEP/Vector/EulerAngles.h"
4 #include "CLHEP/Vector/Rotation.h"
5 #include "CLHEP/Vector/ThreeVector.h"
6 #include "CLHEP/Geometry/Transform3D.h"
7 
9 
14 {
15 public:
16  typedef CLHEP::HepEulerAngles EulerAngles;
17  typedef CLHEP::Hep3Vector Translation;
18  typedef CLHEP::HepRotation Rotation;
19  typedef HepGeom::Transform3D Transform;
20 
23 
25  AlignTransform( const Translation & itranslation,
26  const EulerAngles & ieulerAngles,
27  align::ID irawId ) :
28  m_translation(itranslation),
29  m_eulerAngles(ieulerAngles),
30  m_rawId(irawId) {}
31 
33  AlignTransform( const Translation & itranslation,
34  const Rotation & irotation,
35  align::ID irawId ) :
36  m_translation(itranslation),
37  m_eulerAngles(irotation.eulerAngles()),
38  m_rawId(irawId) {}
39 
40  const Translation & translation() const { return m_translation; }
42  // const EulerAngles & eulerAngles() const { return m_eulerAngles; }
43  align::ID rawId() const { return m_rawId; }
44 
45  Rotation rotation() const
46  { //std::cout<<"Inside aligntransform::rotation() with id="<<std::hex<<m_rawId<<std::dec<<std::endl ;
47  //std::cout<<" for e.a.="<<m_eulerAngles<<std::endl;
48  return Rotation(m_eulerAngles); }
49 
50  Transform transform() const { return Transform( rotation(), translation() ) ; }
51 
52  private:
53 
57 
58 
59 };
60 #endif //AlignTransform_H
HepGeom::Transform3D Transform
AlignTransform(const Translation &itranslation, const EulerAngles &ieulerAngles, align::ID irawId)
Constructor from Euler angles.
uint32_t ID
Definition: Definitions.h:26
CLHEP::Hep3Vector Translation
CLHEP::HepEulerAngles EulerAngles
AlignTransform(const Translation &itranslation, const Rotation &irotation, align::ID irawId)
Constructor from Rotation.
const Translation & translation() const
EulerAngles m_eulerAngles
align::ID m_rawId
AlignTransform()
Default constructor.
Transform transform() const
Translation m_translation
Rotation rotation() const
align::ID rawId() const
Do not expose Euler angles since we may change its type later.
CLHEP::HepRotation Rotation