CMS 3D CMS Logo

Functions
Migration.h File Reference
#include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
#include "CLHEP/Matrix/Matrix.h"
#include "CLHEP/Matrix/Vector.h"
#include "CLHEP/Matrix/SymMatrix.h"
#include <cstring>
#include <cassert>

Go to the source code of this file.

Functions

template<unsigned int N1>
CLHEP::HepSymMatrix asHepMatrix (const ROOT::Math::SMatrix< double, N1, N1, typename ROOT::Math::MatRepSym< double, N1 > > &rm)
 
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 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

◆ asHepMatrix() [1/2]

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

Definition at line 68 of file Migration.h.

69  {
70  CLHEP::HepSymMatrix am(N1);
71  memcpy(&am(1, 1), rm.Array(), (N1 * (N1 + 1)) / 2 * sizeof(double));
72  return am;
73 }

References submit::rm.

◆ asHepMatrix() [2/2]

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)

◆ asHepVector()

template<unsigned int N>
CLHEP::HepVector asHepVector ( const ROOT::Math::SVector< double, N > &  v)

Definition at line 53 of file Migration.h.

53  {
54  CLHEP::HepVector hv(N);
55  memcpy(&hv[0], &v[0], N * sizeof(double));
56  return hv;
57 }

References N, and findQualityFiles::v.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), TwoBodyDecayEstimator::constructMatrices(), MeasurementExtractor::measuredParameters(), and TRecHit5DParamConstraint::parameters().

◆ asSMatrix() [1/2]

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 31 of file Migration.h.

32  {
33  typedef typename ROOT::Math::MatRepStd<double, N1, N2> REP;
34  assert(m.num_row() == N1);
35  assert(m.num_col() == N2);
36  return ROOT::Math::SMatrix<double, N1, N2, REP>(&m(1, 1), REP::kSize);
37 }

References cms::cuda::assert(), and visualization-live-secondInstance_cfg::m.

◆ asSMatrix() [2/2]

template<unsigned int N1>
ROOT::Math::SMatrix<double, N1, N1, typename ROOT::Math::MatRepSym<double, N1> > asSMatrix ( const CLHEP::HepSymMatrix &  m)

Definition at line 40 of file Migration.h.

41  {
42  typedef typename ROOT::Math::MatRepSym<double, N1> REP;
43  assert(m.num_row() == N1);
44  return ROOT::Math::SMatrix<double, N1, N1, REP>(&m(1, 1), REP::kSize);
45 }

References cms::cuda::assert(), and visualization-live-secondInstance_cfg::m.

◆ asSVector()

template<unsigned int N1>
ROOT::Math::SVector<double, N1> asSVector ( const CLHEP::HepVector &  m)

Definition at line 48 of file Migration.h.

48  {
49  return ROOT::Math::SVector<double, N1>(&m[0], N1);
50 }

References visualization-live-secondInstance_cfg::m.

cms::cuda::assert
assert(be >=bs)
findQualityFiles.v
v
Definition: findQualityFiles.py:179
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
N
#define N
Definition: blowfish.cc:9
submit.rm
rm
Definition: submit.py:77