Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:34

0001 #include "DataFormats/GsfTrackReco/interface/GsfComponent5D.h"
0002 
0003 using namespace reco;
0004 
0005 GsfComponent5D::GsfComponent5D(const double& weight, const ParameterVector& parameters, const CovarianceMatrix& matrix)
0006     : weight_(weight), parameters_(parameters) {
0007   float* data(covariance_);
0008   typedef unsigned int index;
0009   for (index i = 0; i < dimension; ++i)
0010     for (index j = 0; j <= i; ++j)
0011       *(data++) = matrix(i, j);
0012 }
0013 
0014 GsfComponent5D::CovarianceMatrix& GsfComponent5D::covariance(CovarianceMatrix& matrix) const {
0015   const float* data(covariance_);
0016   typedef unsigned int index;
0017   for (index i = 0; i < dimension; ++i)
0018     for (index j = 0; j <= i; ++j)
0019       matrix(i, j) = *(data++);
0020   return matrix;
0021 }