CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
Migration.h File Reference
#include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
#include <cstring>

Go to the source code of this file.

Functions

template<unsigned int N1, unsigned int N2>
CLHEP::HepMatrix asHepMatrix (const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
 
template<unsigned int N1>
CLHEP::HepSymMatrix asHepMatrix (const ROOT::Math::SMatrix< double, N1, N1, typename ROOT::Math::MatRepSym< double, N1 > > &rm)
 
template<unsigned int N>
CLHEP::HepVector asHepVector (const ROOT::Math::SVector< double, N > &v)
 
template<unsigned int N1, unsigned int N2>
ROOT::Math::SMatrix< double,
N1, N2, typename
ROOT::Math::MatRepStd< double,
N1, N2 > > 
asSMatrix (const CLHEP::HepMatrix &m)
 
template<unsigned int N1>
ROOT::Math::SMatrix< double,
N1, N1, typename
ROOT::Math::MatRepSym< double,
N1 > > 
asSMatrix (const CLHEP::HepSymMatrix &m)
 
template<unsigned int N1>
ROOT::Math::SVector< double, N1 > asSVector (const CLHEP::HepVector &m)
 

Function Documentation

template<unsigned int N1, unsigned int N2>
CLHEP::HepMatrix asHepMatrix ( const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &  rm)
template<unsigned int N1>
CLHEP::HepSymMatrix asHepMatrix ( const ROOT::Math::SMatrix< double, N1, N1, typename ROOT::Math::MatRepSym< double, N1 > > &  rm)

Definition at line 56 of file Migration.h.

References submit::rm.

57  {
58  CLHEP::HepSymMatrix am(N1);
59  memcpy(&am(1,1), rm.Array(), (N1*(N1+1))/2*sizeof(double));
60  return am;
61  }
string rm
Definition: submit.py:76
template<unsigned int N>
CLHEP::HepVector asHepVector ( const ROOT::Math::SVector< double, N > &  v)

Definition at line 43 of file Migration.h.

References N.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), TwoBodyDecayEstimator::constructMatrices(), MeasurementExtractor::measuredParameters(), and GCC11_FINAL< T, TOPO >::parameters().

43  {
44  CLHEP::HepVector hv(N);
45  memcpy(&hv[0], &v[0], N*sizeof(double));
46  return hv;
47  }
#define N
Definition: blowfish.cc:9
template<unsigned int N1, unsigned int N2>
ROOT::Math::SMatrix<double,N1,N2, typename ROOT::Math::MatRepStd<double,N1,N2> > asSMatrix ( const CLHEP::HepMatrix &  m)

Definition at line 25 of file Migration.h.

References m.

25  {
26  typedef typename ROOT::Math::MatRepStd<double,N1,N2> REP;
27  assert(m.num_row() == N1); assert(m.num_col() == N2);
28  return ROOT::Math::SMatrix<double,N1,N2,REP> (&m(1,1), REP::kSize);
29  }
template<unsigned int N1>
ROOT::Math::SMatrix<double,N1,N1, typename ROOT::Math::MatRepSym<double,N1> > asSMatrix ( const CLHEP::HepSymMatrix &  m)

Definition at line 32 of file Migration.h.

References m.

32  {
33  typedef typename ROOT::Math::MatRepSym<double,N1> REP;
34  assert(m.num_row() == N1);
35  return ROOT::Math::SMatrix<double,N1,N1,REP> (&m(1,1), REP::kSize);
36  }
template<unsigned int N1>
ROOT::Math::SVector<double,N1> asSVector ( const CLHEP::HepVector &  m)

Definition at line 39 of file Migration.h.

39  {
40  return ROOT::Math::SVector<double,N1> (&m[0], N1);
41  }