CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/CondFormats/Alignment/interface/AlignTransform.h

Go to the documentation of this file.
00001 #ifndef AlignTransform_H
00002 #define AlignTransform_H
00003 #include "CLHEP/Vector/EulerAngles.h"
00004 #include "CLHEP/Vector/Rotation.h"
00005 #include "CLHEP/Vector/ThreeVector.h"
00006 #include "CLHEP/Geometry/Transform3D.h"
00007 
00008 #include "CondFormats/Alignment/interface/Definitions.h"
00009 
00013 class  AlignTransform 
00014 {
00015 public:
00016   typedef CLHEP::HepEulerAngles EulerAngles;
00017   typedef CLHEP::Hep3Vector     Translation;
00018   typedef CLHEP::HepRotation    Rotation;
00019   typedef HepGeom::Transform3D Transform;
00020 
00022   AlignTransform(){}
00023 
00025   AlignTransform( const Translation & itranslation, 
00026                   const EulerAngles & ieulerAngles,
00027                   align::ID irawId ) :
00028     m_translation(itranslation),
00029     m_eulerAngles(ieulerAngles),
00030     m_rawId(irawId) {}
00031   
00033   AlignTransform( const Translation & itranslation, 
00034                   const Rotation    & irotation,
00035                   align::ID irawId ) :
00036     m_translation(itranslation),
00037     m_eulerAngles(irotation.eulerAngles()),
00038     m_rawId(irawId) {}
00039 
00040   const Translation & translation() const { return m_translation; }
00042   //   const EulerAngles & eulerAngles() const { return m_eulerAngles; }
00043   align::ID rawId() const { return m_rawId; }
00044 
00045   Rotation rotation() const 
00046   { //std::cout<<"Inside aligntransform::rotation() with id="<<std::hex<<m_rawId<<std::dec<<std::endl ;
00047      //std::cout<<" for e.a.="<<m_eulerAngles<<std::endl;
00048      return Rotation(m_eulerAngles); }
00049 
00050   Transform transform() const { return Transform( rotation(), translation() ) ; }  
00051       
00052  private:
00053 
00054   Translation m_translation;
00055   EulerAngles m_eulerAngles;
00056   align::ID   m_rawId;
00057 
00058 
00059 };
00060 #endif //AlignTransform_H