Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

BaseFitObject.C

Go to the documentation of this file.
00001 
00014 #include "jbltools/kinfit/BaseFitObject.h"
00015 #include <cassert>
00016 
00017 
00018 int BaseFitObject::getNMeasured() const {
00019   int nmeasured = 0;
00020   for (int i = 0; i < getNPar(); ++i) if (isParamMeasured(i) && !isParamFixed(i)) ++nmeasured;
00021   return nmeasured;
00022 }
00023 int BaseFitObject::getNUnmeasrd() const {
00024   int nunmeasrd = 0;
00025   for (int i = 0; i < getNPar(); ++i) if (!isParamMeasured(i) && !isParamFixed(i)) ++nunmeasrd;
00026   return nunmeasrd;
00027 }
00028 int BaseFitObject::getNFree() const {
00029   int nfree = 0;
00030   for (int i = 0; i < getNPar(); ++i) if (!isParamFixed(i)) ++nfree;
00031   return nfree;
00032 }
00033 int BaseFitObject::getNFixed() const {
00034   int nfixed = 0;
00035   for (int i = 0; i < getNPar(); ++i) if (isParamFixed(i)) ++nfixed;
00036   return nfixed;
00037 }
00038     
00039 std::ostream& BaseFitObject::printParams(std::ostream& os) const {
00040   os << "(";
00041   for (int i = 0; i < getNPar(); ++i) {
00042     if (i>0) os << ", ";
00043     os << getParam(i);
00044     if (isParamFixed (i))  os << " fix";
00045     else if (getError(i)>0) os << " \261 " << getError(i);
00046   }
00047   os << ")";  
00048   return os;
00049 }

Generated on Fri Sep 14 17:38:20 2007 for Kinfit by doxygen 1.3.2