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

References submit::rm.

68  {
69  CLHEP::HepSymMatrix am(N1);
70  memcpy(&am(1, 1), rm.Array(), (N1 * (N1 + 1)) / 2 * sizeof(double));
71  return am;
72 }
rm
Definition: submit.py:77
template<unsigned int N>
CLHEP::HepVector asHepVector ( const ROOT::Math::SVector< double, N > &  v)

Definition at line 52 of file Migration.h.

References AnalysisDataFormats_SUSYBSMObjects::hv, and N.

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

52  {
53  CLHEP::HepVector hv(N);
54  memcpy(&hv[0], &v[0], N * sizeof(double));
55  return hv;
56 }
susybsm::HSCParticleRefVector hv
Definition: classes.h:28
#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 30 of file Migration.h.

References visualization-live-secondInstance_cfg::m.

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 }
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.

References visualization-live-secondInstance_cfg::m.

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 }
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 }