BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkParams.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkParams.cxx,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Implementation of TrkParams class
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Dave Brown, Steve Schaffner
12//------------------------------------------------------------------------
13// #include "BaBar/BaBar.h"
14#include "TrkBase/TrkParams.h"
15#include <assert.h>
16#include <iostream>
17using std::ostream;
18
19// Construct with the correct dimension
20//--------------------------------------
22 : DifIndepPar( ndim )
23 , _weightInverted( false )
24//--------------------------------------
25{}
26
27// Construct from an input parameter vector and covariance matrix
28//--------------------------------------
29TrkParams::TrkParams( const HepVector& pvec, const HepSymMatrix& pcov )
30 : DifIndepPar( pvec, pcov )
31 , _weightInverted( false )
32//--------------------------------------
33{}
34
35// copy constructor
36//--------------------------------------
38 : DifIndepPar( old )
39 , _weightInverted( old._weightInverted )
40 , _weightMatrix( old._weightMatrix )
41//--------------------------------------
42{}
43
44// base implementation of clone function
45//--------------------------------------
47 //--------------------------------------
48 return new TrkParams( *this );
49}
50
51//--------------------------------------
53//--------------------------------------
54
55// Assignment operator
56//--------------------------------------
58 //--------------------------------------
59 if ( this == &other ) return *this;
60 parameter() = other.parameter();
61 covariance() = other.covariance();
62 _weightInverted = other._weightInverted;
63 _weightMatrix = other._weightMatrix;
64 return *this;
65}
66
67//--------------------------------------
68void TrkParams::printAll( ostream& os ) const {
69 //--------------------------------------
71}
72
73const HepSymMatrix& TrkParams::weightMatrix() const {
74
75 if ( !_weightInverted )
76 {
77 _weightMatrix = covariance();
78 int invStatus;
79 _weightMatrix.invert( invStatus );
80 _weightInverted = true;
81 }
82 return _weightMatrix;
83}
DifIndepPar(int n)
void printAll(std::ostream &os=std::cout) const
TrkParams(int nParam)
Definition TrkParams.cxx:21
virtual ~TrkParams()
Definition TrkParams.cxx:52
virtual TrkParams * clone() const
Definition TrkParams.cxx:46
void printAll(std::ostream &os) const
TrkParams & operator=(const TrkParams &)
Definition TrkParams.cxx:57
const HepSymMatrix & weightMatrix() const
Definition TrkParams.cxx:73