CMS 3D CMS Logo

Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DataFormats/CLHEP/interface/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>
ROOT::Math::SMatrix< double,
N1, N1, typename
ROOT::Math::MatRepSym< double,
N1 > > 
asSMatrix (const CLHEP::HepSymMatrix &m)
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::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.

                                                                                      {
        CLHEP::HepSymMatrix am(N1);
        memcpy(&am(1,1), rm.Array(), (N1*(N1+1))/2*sizeof(double));
        return am;
    }
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(), GCC11_FINAL::parameters(), and reco::BeamSpot::rotatedCovariance3D().

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

                                                                                                                {
        typedef typename ROOT::Math::MatRepSym<double,N1>  REP;
        assert(m.num_row() == N1);
        return  ROOT::Math::SMatrix<double,N1,N1,REP> (&m(1,1), REP::kSize);
    }
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.

                                                                                                                {
        typedef typename ROOT::Math::MatRepStd<double,N1,N2>  REP;
        assert(m.num_row() == N1); assert(m.num_col() == N2);
        return  ROOT::Math::SMatrix<double,N1,N2,REP> (&m(1,1), REP::kSize);
    }
template<unsigned int N1>
ROOT::Math::SVector<double,N1> asSVector ( const CLHEP::HepVector &  m)

Definition at line 39 of file Migration.h.

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