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 
18  AlignTransformErrorExtended(const SymMatrix& symMatrix, align::ID irawId) : m_rawId(irawId) {
19  for (unsigned int i = 0; i < m_nPars; ++i)
20  for (unsigned int j = 0; j <= i; ++j)
21  m_Parameters[i * (i + 1) / 2 + j] = symMatrix[i][j];
22  }
23 
24  SymMatrix matrix() const {
26  for (unsigned int i = 0; i < m_nPars; ++i)
27  for (unsigned int j = 0; j <= i; ++j)
28  result[i][j] = m_Parameters[i * (i + 1) / 2 + j];
29  return result;
30  }
31 
32  align::ID rawId() const { return m_rawId; }
33 
34  // Implemented so this can be sorted by rawId
35  const bool operator<(const AlignTransformErrorExtended& other) const { return (m_rawId < other.rawId()); }
36 
37 private:
38  //FIXME difference here
39  static const unsigned int m_nPars = 6;
40  double m_Parameters[m_nPars * (m_nPars + 1) / 2];
42 
44 };
45 #endif //AlignTransformErrorExtended_H
const bool operator<(const AlignTransformErrorExtended &other) const
uint32_t ID
Definition: Definitions.h:24
AlignTransformErrorExtended(const SymMatrix &symMatrix, align::ID irawId)
double m_Parameters[m_nPars *(m_nPars+1)/2]
#define COND_SERIALIZABLE
Definition: Serializable.h:39