BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DifIndepPar.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: DifIndepPar.cxx,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4//
5// Description:
6// Class Implementation for |DifIndepPar|
7// What do i do ?
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// A. Snyder
13//
14// Copyright Information:
15// Copyright (C) 1996 SLAC
16//
17// History:
18// Migration for BESIII MDC
19//
20//------------------------------------------------------------------------
21// #include "BaBar/BaBar.h"
22
23#include "MdcRecoUtil/DifIndepPar.h"
24#include "MdcRecoUtil/DifArray.h"
25#include "MdcRecoUtil/DifNumber.h"
26using std::endl;
27using std::ostream;
28
29DifIndepPar::DifIndepPar( int ndim ) : parvec( ndim, 0 ), parcov( ndim, 1 ) {}
30
31DifIndepPar::DifIndepPar( const HepVector& a ) : parvec( a ), parcov( nPar(), 1 ) {}
32
34 : parvec( rhs.parameter() ), parcov( rhs.covariance() ) {}
35
37 DifArray pars( nPar(), nPar() );
38 for ( int i = 1; i <= nPar(); i++ ) { pars( i ) = difPar( i ); }
39 return pars;
40}
41
42DifIndepPar::DifIndepPar( const HepVector& pvec, const HepSymMatrix& pcov )
43 : parvec( pvec ), parcov( pcov ) {}
44// void DifIndepPar::setDerives(){
45// for(int i=0; i<nPar(); i++){
46// _parameters[i].zeroDerivatives();
47// _parameters[i].setDerivative(i+1,1.0);
48// _parameters[i].setIndepPar(this);
49// }
50// }
51
52DifNumber DifIndepPar::difPar( int i ) const { return DifNumber( parvec( i ), i, this ); }
53
54//--------------------------------------
55void DifIndepPar::print( ostream& os ) const {
56 //--------------------------------------
57 os << "DifIndepPar Parameter Vector = " << parvec;
58}
59
60//--------------------------------------
61void DifIndepPar::printAll( ostream& os ) const {
62 //--------------------------------------
63 os << "DifIndepPar Parameter Vector = " << parvec << endl;
64 os << "DifIndepPar Covariance Matrix = " << parcov << endl;
65}
DifIndepPar(int n)
void print(std::ostream &os=std::cout) const
DifArray difParameters() const
void printAll(std::ostream &os=std::cout) const
DifNumber difPar(int i) const