CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/TrackReco/src/TrackExtra.cc

Go to the documentation of this file.
00001 #include "DataFormats/TrackReco/interface/TrackExtra.h"
00002 #include "DataFormats/TrackReco/interface/fillCovariance.h"
00003 using namespace reco;
00004 
00005 TrackExtra::TrackExtra( const Point & outerPosition, const Vector & outerMomentum, bool ok ,
00006                         const Point & innerPosition, const Vector & innerMomentum, bool iok,
00007                         const CovarianceMatrix& outerCov, unsigned int outerId,
00008                         const CovarianceMatrix& innerCov, unsigned int innerId,
00009                         PropagationDirection seedDir,
00010                         edm::RefToBase<TrajectorySeed>  seedRef):    
00011   TrackExtraBase(),
00012   outerPosition_( outerPosition ), outerMomentum_( outerMomentum ), outerOk_( ok ), 
00013   outerDetId_( outerId ),
00014   innerPosition_( innerPosition ), innerMomentum_( innerMomentum ), innerOk_( iok ),
00015   innerDetId_( innerId ), seedDir_(seedDir), seedRef_(seedRef) {
00016   index idx = 0;
00017   for( index i = 0; i < dimension; ++ i ) {
00018     for( index j = 0; j <= i; ++ j ) {
00019       outerCovariance_[ idx ] = outerCov( i, j );
00020       innerCovariance_[ idx ] = innerCov( i, j );
00021       ++idx;
00022     }
00023   }
00024 }
00025 
00026 TrackExtra::CovarianceMatrix TrackExtra::outerStateCovariance() const {
00027   CovarianceMatrix v; fillCovariance( v, outerCovariance_ ); return v;
00028 }
00029 
00030 TrackExtra::CovarianceMatrix TrackExtra::innerStateCovariance() const {
00031   CovarianceMatrix v; fillCovariance( v, innerCovariance_ ); return v;
00032 }
00033 
00034 TrackExtra::CovarianceMatrix & TrackExtra::fillOuter( CovarianceMatrix & v ) const {
00035   return fillCovariance( v, outerCovariance_ );
00036 }
00037 
00038 TrackExtra::CovarianceMatrix & TrackExtra::fillInner( CovarianceMatrix & v ) const {
00039   return fillCovariance( v, innerCovariance_ );
00040 }
00041