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

References submit::rm.

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

Definition at line 48 of file Migration.h.

References AnalysisDataFormats_SUSYBSMObjects::hv, and N.

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

48  {
49  CLHEP::HepVector hv(N);
50  memcpy(&hv[0], &v[0], N*sizeof(double));
51  return hv;
52  }
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 funct::m.

30  {
31  typedef typename ROOT::Math::MatRepStd<double,N1,N2> REP;
32  assert(m.num_row() == N1); assert(m.num_col() == N2);
33  return ROOT::Math::SMatrix<double,N1,N2,REP> (&m(1,1), REP::kSize);
34  }
template<unsigned int N1>
ROOT::Math::SMatrix<double,N1,N1, typename ROOT::Math::MatRepSym<double,N1> > asSMatrix ( const CLHEP::HepSymMatrix &  m)

Definition at line 37 of file Migration.h.

References funct::m.

37  {
38  typedef typename ROOT::Math::MatRepSym<double,N1> REP;
39  assert(m.num_row() == N1);
40  return ROOT::Math::SMatrix<double,N1,N1,REP> (&m(1,1), REP::kSize);
41  }
template<unsigned int N1>
ROOT::Math::SVector<double,N1> asSVector ( const CLHEP::HepVector &  m)

Definition at line 44 of file Migration.h.

44  {
45  return ROOT::Math::SVector<double,N1> (&m[0], N1);
46  }