BOSS
7.1.2
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 <assert.h>
15
#include "
TrkBase/TrkParams.h
"
16
#include <iostream>
17
using
std::ostream;
18
19
// Construct with the correct dimension
20
//--------------------------------------
21
TrkParams::TrkParams
(
int
ndim) :
DifIndepPar
(ndim), _weightInverted(
false
)
22
//--------------------------------------
23
{
24
}
25
26
// Construct from an input parameter vector and covariance matrix
27
//--------------------------------------
28
TrkParams::TrkParams
(
const
HepVector& pvec,
const
HepSymMatrix& pcov) :
29
DifIndepPar
(pvec, pcov), _weightInverted(
false
)
30
//--------------------------------------
31
{
32
33
}
34
35
// copy constructor
36
//--------------------------------------
37
TrkParams::TrkParams
(
const
TrkParams
& old) :
38
DifIndepPar
(old), _weightInverted(old._weightInverted), _weightMatrix(old._weightMatrix)
39
//--------------------------------------
40
{}
41
42
// base implementation of clone function
43
//--------------------------------------
44
TrkParams
*
45
TrkParams::clone
()
const
{
46
//--------------------------------------
47
return
new
TrkParams
(*
this
);
48
}
49
50
//--------------------------------------
51
TrkParams::~TrkParams
() {}
52
//--------------------------------------
53
54
// Assignment operator
55
//--------------------------------------
56
TrkParams
&
57
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
69
TrkParams::printAll
(ostream& os)
const
{
70
//--------------------------------------
71
DifIndepPar::printAll
(os);
72
}
73
74
75
const
HepSymMatrix&
TrkParams::weightMatrix
()
const
{
76
77
if
(!_weightInverted){
78
_weightMatrix =
covariance
();
79
int
invStatus;
80
_weightMatrix.invert(invStatus);
81
_weightInverted =
true
;
82
}
83
return
_weightMatrix;
84
85
}
false
#define false
Definition
BesCxxPolicy/BesCxxPolicy-00-02-00/CxxFeatures/config.h:22
TrkParams.h
DifIndepPar
Definition
DifIndepPar.h:39
DifIndepPar::parameter
HepVector & parameter()
Definition
DifIndepPar.h:51
DifIndepPar::printAll
void printAll(std::ostream &os=std::cout) const
Definition
DifIndepPar.cxx:76
TrkParams
Definition
TrkParams.h:24
TrkParams::TrkParams
TrkParams(int nParam)
Definition
TrkParams.cxx:21
TrkParams::covariance
HepSymMatrix & covariance()
Definition
TrkParams.h:54
TrkParams::~TrkParams
virtual ~TrkParams()
Definition
TrkParams.cxx:51
TrkParams::clone
virtual TrkParams * clone() const
Definition
TrkParams.cxx:45
TrkParams::printAll
void printAll(std::ostream &os) const
Definition
TrkParams.cxx:69
TrkParams::operator=
TrkParams & operator=(const TrkParams &)
Definition
TrkParams.cxx:57
TrkParams::weightMatrix
const HepSymMatrix & weightMatrix() const
Definition
TrkParams.cxx:75
7.1.2
Reconstruction
MdcPatRec
TrkBase
TrkBase-00-01-12
src
TrkParams.cxx
Generated by
1.12.0