added per run block chisq output

This commit is contained in:
nemu
2011-07-25 07:35:29 +00:00
parent 2a4f5bf78a
commit 58a79084b1
18 changed files with 327 additions and 130 deletions

View File

@ -92,30 +92,11 @@ Double_t PFitterFcn::operator()(const std::vector<Double_t>& par) const
return value;
}
//--------------------------------------------------------------------------
// GetNoOfFittedBins()
//--------------------------------------------------------------------------
/**
* <p>Get the number of fitted bins of the run block idx.
*
* \param idx index of the run block
*/
UInt_t PFitterFcn::GetNoOfFittedBins(const UInt_t idx)
{
UInt_t result = 0;
if (idx < fRunListCollection->GetNoOfSingleHisto())
result = fRunListCollection->GetNoOfBinsFitted(idx);
return result;
}
//--------------------------------------------------------------------------
// CalcExpectedChiSquare()
//--------------------------------------------------------------------------
/**
* <p>Calculates the expected chisq, if applicable.
* <p>Calculates the expected chisq, expected chisq per run, and chisq per run, if applicable.
*
* \param par
* \param totalExpectedChisq expected chisq for all run blocks
@ -130,6 +111,8 @@ void PFitterFcn::CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_
// only do something for chisq
if (fUseChi2) {
Double_t value = 0.0;
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
value = fRunListCollection->GetSingleHistoChisqExpected(par, i); // calculate the expected chisq for single histo run block 'i'
expectedChisqPerRun.push_back(value);