CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/GsfTrackReco/src/GsfComponent5D.cc

Go to the documentation of this file.
00001 #include "DataFormats/GsfTrackReco/interface/GsfComponent5D.h"
00002 
00003 using namespace reco;
00004 
00005 GsfComponent5D::GsfComponent5D (const double& weight,
00006                                 const ParameterVector& parameters,
00007                                 const CovarianceMatrix& matrix) :
00008   weight_(weight), parameters_(parameters) {
00009   float* data(covariance_);
00010   typedef unsigned int index;
00011   for( index i = 0; i < dimension; ++ i )
00012     for( index j = 0; j <= i; ++ j )
00013       *(data++) = matrix(i,j);
00014 }
00015 
00016 GsfComponent5D::CovarianceMatrix&
00017 GsfComponent5D::covariance (CovarianceMatrix& matrix) const {
00018   const float* data(covariance_);
00019   typedef unsigned int index;
00020   for( index i = 0; i < dimension; ++ i )
00021     for( index j = 0; j <= i; ++ j )
00022       matrix(i,j) = *(data++);
00023   return matrix;
00024 }