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>

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

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

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

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

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

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

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

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

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

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

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