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>
17
using
std::ostream;
18
19
// Construct with the correct dimension
20
//--------------------------------------
21
TrkParams::TrkParams
(
int
ndim )
22
:
DifIndepPar
( ndim )
23
, _weightInverted( false )
24
//--------------------------------------
25
{}
26
27
// Construct from an input parameter vector and covariance matrix
28
//--------------------------------------
29
TrkParams::TrkParams
(
const
HepVector& pvec,
const
HepSymMatrix& pcov )
30
:
DifIndepPar
( pvec, pcov )
31
, _weightInverted( false )
32
//--------------------------------------
33
{}
34
35
// copy constructor
36
//--------------------------------------
37
TrkParams::TrkParams
(
const
TrkParams
& old )
38
:
DifIndepPar
( old )
39
, _weightInverted( old._weightInverted )
40
, _weightMatrix( old._weightMatrix )
41
//--------------------------------------
42
{}
43
44
// base implementation of clone function
45
//--------------------------------------
46
TrkParams
*
TrkParams::clone
()
const
{
47
//--------------------------------------
48
return
new
TrkParams
( *
this
);
49
}
50
51
//--------------------------------------
52
TrkParams::~TrkParams
() {}
53
//--------------------------------------
54
55
// Assignment operator
56
//--------------------------------------
57
TrkParams
&
TrkParams::operator=
(
const
TrkParams
& other ) {
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
//--------------------------------------
68
void
TrkParams::printAll
( ostream& os )
const
{
69
//--------------------------------------
70
DifIndepPar::printAll
( os );
71
}
72
73
const
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::DifIndepPar
DifIndepPar(int n)
Definition
DifIndepPar.cxx:29
DifIndepPar::parameter
HepVector & parameter()
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/DifIndepPar.h:51
DifIndepPar::printAll
void printAll(std::ostream &os=std::cout) const
TrkParams::TrkParams
TrkParams(int nParam)
Definition
TrkParams.cxx:21
TrkParams::covariance
HepSymMatrix & covariance()
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkParams.h:54
TrkParams::~TrkParams
virtual ~TrkParams()
Definition
TrkParams.cxx:52
TrkParams::clone
virtual TrkParams * clone() const
Definition
TrkParams.cxx:46
TrkParams::printAll
void printAll(std::ostream &os) const
TrkParams::operator=
TrkParams & operator=(const TrkParams &)
Definition
TrkParams.cxx:57
TrkParams::weightMatrix
const HepSymMatrix & weightMatrix() const
Definition
TrkParams.cxx:73
8.0.0
BOSS_Source
Reconstruction
MdcPatRec
TrkBase
src
TrkParams.cxx
Generated by
1.16.1