16 : m_dim(adim),m_par(adim),m_cov(adim),
17 m_chiSquare(0),m_nConstraints(0),m_nConstraintsVec(adim,0)
23 : m_dim(fpar.dim()),m_par(fpar.dim()),m_cov(fpar.dim()),
24 m_chiSquare(0),m_nConstraints(0),m_nConstraintsVec(fpar.dim(),0)
52 m_cov(row,row) *= aScale ;
53 if(m_cov(row,row) < 0 ) m_cov(row,row)*=-1 ;
54 if(m_cov(row,row) == 0 ) m_cov(row,row)=aScale ;
60 nConstraintsVec(
row) = 0 ;
62 m_chiSquareMap.clear() ;
73 std::cout << std::setw(3) <<
"index" << std::setw(15) <<
"val" << std::setw(15) <<
"err" << std::endl ;
74 std::cout << std::setprecision(5) ;
76 std::cout << std::setw(3) <<
row
77 << std::setw(15) << m_par(
row)
78 << std::setw(15) <<
sqrt(m_cov(
row,
row)) << std::endl ;
79 std::cout << std::setprecision(10) ;
83 int nrow = indexVec.size() ;
84 TMatrixDSym thecov(nrow) ;
93 int nrow = indexVec.size() ;
94 TVectorD thepar(nrow) ;
96 thepar(
row) = m_par(indexVec[
row]) ;
104 if( newdim != m_dim )
106 m_par.ResizeTo(newdim);
107 m_cov.ResizeTo(newdim,newdim);
108 m_nConstraintsVec.resize(newdim,0) ;
114 if( newdim > m_dim ) {
135 m_par.ResizeTo(newdim);
136 m_cov.ResizeTo(newdim,newdim);
137 m_nConstraintsVec.resize(newdim,0) ;
143 m_chiSquare += chisq;
144 m_nConstraints += nconstraints ;
145 if( p ) m_chiSquareMap[
p ] +=
ChiSquare(chisq,nconstraints) ;
150 std::map<const ParticleBase*, ChiSquare>::const_iterator it = m_chiSquareMap.find( &p ) ;
151 return it != m_chiSquareMap.end() ? it->second :
ChiSquare() ;
friend F32vec4 sqrt(const F32vec4 &a)
void addChiSquare(double chi2, int nconstraints, const ParticleBase *p)
void resetCov(double scale=100)