CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondFormats/Alignment/interface/AlignTransformError.h

Go to the documentation of this file.
00001 #ifndef AlignTransformError_H
00002 #define AlignTransformError_H
00003 #include "CLHEP/Matrix/SymMatrix.h"
00004 #include "CLHEP/Vector/RotationInterfaces.h"
00005 
00006 #include "CondFormats/Alignment/interface/Definitions.h"
00007 
00011 class  AlignTransformError {
00012 public:
00013   typedef CLHEP::HepSymMatrix SymMatrix;
00014 
00015 
00016   AlignTransformError(){ }
00017   AlignTransformError( const SymMatrix & symMatrix,
00018                        align::ID irawId ) :
00019     m_rawId(irawId) 
00020   { 
00021     for ( unsigned int i=0; i<m_nPars; ++i )
00022       for ( unsigned int j=0; j<=i; ++j )
00023         m_Parameters[i*(i+1)/2+j] = symMatrix[i][j];
00024   }
00025   
00026   SymMatrix matrix() const { 
00027     SymMatrix result(m_nPars);
00028     for ( unsigned int i=0; i<m_nPars; ++i )
00029       for ( unsigned int j=0; j<=i; ++j )
00030         result[i][j] = m_Parameters[i*(i+1)/2+j];
00031     return result;
00032   }
00033 
00034   align::ID rawId()  const { return m_rawId; }
00035 
00036 private:
00037 
00038   static const unsigned int m_nPars = 3;
00039   double m_Parameters[m_nPars*(m_nPars+1)/2];
00040   align::ID m_rawId;
00041 
00042 
00043 };
00044 #endif //AlignTransformError_H