// ****************************************************** // DecayTreeFitter Package // We thank the original author Wouter Hulsbergen // (BaBar, LHCb) for providing the sources. // http://arxiv.org/abs/physics/0503191v1 (2005) // Adaptation & Development for PANDA: Ralf Kliemt (2015) // ****************************************************** #include #include #include "FitParams.h" using namespace DecayTreeFitter; ClassImp(FitParams); DecayTreeFitter::FitParams::FitParams(int adim) : m_dim(adim),m_par(adim),m_cov(adim),//m_scale(adim), m_chiSquare(0),m_nConstraints(0),m_nConstraintsVec(adim,0) { ////fill m_scale with "1" at diagonals //for(int i=0;i& indexVec) const { int nrow = indexVec.size() ; TMatrixDSym thecov(nrow) ; for(int row=0; row& indexVec) const { int nrow = indexVec.size() ; TVectorD thepar(nrow) ; for(int row=0; row m_dim ) { m_dim = newdim ; // very expensive, but okay ... // TVectorD newpar(newdim) ; // newpar.sub(1,m_par); // // TMatrixDSym newcov(newdim) ; // newcov.sub(1,m_cov) ; // // // HepVector newpar(newdim,0) ; // // HepSymMatrix newcov(newdim,0) ; // // std::cout << newpar << std::endl ; // // for(int row=0; row::const_iterator it = m_chiSquareMap.find( &p ) ; return it != m_chiSquareMap.end() ? it->second : ChiSquare() ; } // void DecayTreeFitter::FitParams::copy(const FitParams& rhs, // const indexmap& anindexmap) // { // for(indexmap::const_iterator it = anindexmap.begin() ; // it != anindexmap.end(); ++it) { // int idim = it->first->dim() ; // int indexrhs = it->second ; // int indexlhs = it->first->index() ; // for(int i=0; ifirst->dim() ; // int jndexrhs = it2->second ; // int jndexlhs = it2->first->index() ; // for(int i=0; i