CMS 3D CMS Logo

AlignTransformErrorExtended.h
Go to the documentation of this file.
1 #ifndef AlignTransformErrorExtended_H
2 #define AlignTransformErrorExtended_H
4 
5 #include "CLHEP/Matrix/SymMatrix.h"
6 #include "CLHEP/Vector/RotationInterfaces.h"
7 
9 
14 public:
15  typedef CLHEP::HepSymMatrix SymMatrix;
16 
17 
19  AlignTransformErrorExtended( const SymMatrix & symMatrix,
20  align::ID irawId ) :
21  m_rawId(irawId)
22  {
23  for ( unsigned int i=0; i<m_nPars; ++i )
24  for ( unsigned int j=0; j<=i; ++j )
25  m_Parameters[i*(i+1)/2+j] = symMatrix[i][j];
26  }
27 
28  SymMatrix matrix() const {
29  SymMatrix result(m_nPars);
30  for ( unsigned int i=0; i<m_nPars; ++i )
31  for ( unsigned int j=0; j<=i; ++j )
32  result[i][j] = m_Parameters[i*(i+1)/2+j];
33  return result;
34  }
35 
36  align::ID rawId() const { return m_rawId; }
37 
38  // Implemented so this can be sorted by rawId
39  const bool operator < ( const AlignTransformErrorExtended & other ) const
40  {
41  return ( m_rawId < other.rawId() );
42  }
43 
44 private:
45 
46  //FIXME difference here
47  static const unsigned int m_nPars = 6;
48  double m_Parameters[m_nPars*(m_nPars+1)/2];
50 
51 
52 
54 };
55 #endif //AlignTransformErrorExtended_H
uint32_t ID
Definition: Definitions.h:26
const bool operator<(const AlignTransformErrorExtended &other) const
AlignTransformErrorExtended(const SymMatrix &symMatrix, align::ID irawId)
double m_Parameters[m_nPars *(m_nPars+1)/2]
#define COND_SERIALIZABLE
Definition: Serializable.h:38