/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/MdcRecoUtil/MdcRecoUtil-00-01-08/src/DifIndepPar.cxx

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: DifIndepPar.cxx,v 1.2 2009/12/23 02:59:56 zhangy Exp $
00004 //
00005 // Description:
00006 //      Class Implementation for |DifIndepPar| 
00007 //      What do i do ?
00008 // Environment:
00009 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00010 //
00011 // Author List:
00012 //      A. Snyder
00013 //
00014 // Copyright Information:
00015 //      Copyright (C) 1996      SLAC
00016 // 
00017 // History:
00018 //      Migration for BESIII MDC
00019 //
00020 //------------------------------------------------------------------------
00021 //#include "BaBar/BaBar.h"
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 //void DifIndepPar::setDerives(){
00056 //  for(int i=0; i<nPar(); i++){
00057 //    _parameters[i].zeroDerivatives();
00058 //    _parameters[i].setDerivative(i+1,1.0);
00059 //    _parameters[i].setIndepPar(this);  
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 }

Generated on Tue Nov 29 23:13:32 2016 for BOSS_7.0.2 by  doxygen 1.4.7