00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "MdcRecoUtil/DifIndepPar.h"
00024 #include "MdcRecoUtil/DifNumber.h"
00025 #include "MdcRecoUtil/DifArray.h"
00026 using std::endl;
00027 using std::ostream;
00028
00029 DifIndepPar::DifIndepPar(int ndim):
00030 parvec(ndim,0),
00031 parcov(ndim,1)
00032 {}
00033
00034 DifIndepPar::DifIndepPar(const HepVector& a):
00035 parvec(a),
00036 parcov(nPar(),1)
00037 {}
00038
00039 DifIndepPar::DifIndepPar(const DifIndepPar& rhs):
00040 parvec(rhs.parameter()),
00041 parcov(rhs.covariance())
00042 {}
00043
00044 DifArray DifIndepPar::difParameters()const{
00045 DifArray pars(nPar(),nPar());
00046 for(int i=1; i<=nPar(); i++){
00047 pars(i)=difPar(i);
00048 }
00049 return pars;
00050 }
00051
00052 DifIndepPar::DifIndepPar(const HepVector& pvec, const HepSymMatrix& pcov) :
00053 parvec(pvec), parcov(pcov) {
00054 }
00055
00056
00057
00058
00059
00060
00061
00062
00063 DifNumber DifIndepPar::difPar(int i)const{
00064 return DifNumber(parvec(i),i,this);
00065 }
00066
00067
00068 void
00069 DifIndepPar::print(ostream& os) const {
00070
00071 os << "DifIndepPar Parameter Vector = " << parvec;
00072 }
00073
00074
00075 void
00076 DifIndepPar::printAll(ostream& os) const {
00077
00078 os << "DifIndepPar Parameter Vector = " << parvec << endl;
00079 os << "DifIndepPar Covariance Matrix = " << parcov << endl;
00080 }