mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 08:55:37 +00:00
Ignore verbose minimiser for samples
This commit is contained in:
parent
60d91cbff5
commit
bac8356de5
@ -288,6 +288,7 @@ SampleFitResult XYSampleData::fit(std::vector<Minimizer *> &minimizer,
|
|||||||
SampleFitResult result;
|
SampleFitResult result;
|
||||||
FitResult sampleResult;
|
FitResult sampleResult;
|
||||||
DVec initCopy = init;
|
DVec initCopy = init;
|
||||||
|
Minimizer::Verbosity verbCopy = minimizer.back()->getVerbosity();
|
||||||
|
|
||||||
result.resize(nSample_);
|
result.resize(nSample_);
|
||||||
result.chi2_.resize(nSample_);
|
result.chi2_.resize(nSample_);
|
||||||
@ -299,9 +300,14 @@ SampleFitResult XYSampleData::fit(std::vector<Minimizer *> &minimizer,
|
|||||||
{
|
{
|
||||||
sampleResult = data_.fit(minimizer, initCopy, v);
|
sampleResult = data_.fit(minimizer, initCopy, v);
|
||||||
initCopy = sampleResult.segment(0, initCopy.size());
|
initCopy = sampleResult.segment(0, initCopy.size());
|
||||||
|
if (verbCopy != Minimizer::Verbosity::Debug)
|
||||||
|
{
|
||||||
|
minimizer.back()->setVerbosity(Minimizer::Verbosity::Silent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
sampleResult = data_.fit(*(minimizer.back()), initCopy, v);
|
sampleResult = data_.fit(*(minimizer.back()), initCopy, v);
|
||||||
}
|
}
|
||||||
result[s] = sampleResult;
|
result[s] = sampleResult;
|
||||||
@ -312,6 +318,7 @@ SampleFitResult XYSampleData::fit(std::vector<Minimizer *> &minimizer,
|
|||||||
result.model_[j][s] = sampleResult.getModel(j);
|
result.model_[j][s] = sampleResult.getModel(j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
minimizer.back()->setVerbosity(verbCopy);
|
||||||
result.nPar_ = sampleResult.getNPar();
|
result.nPar_ = sampleResult.getNPar();
|
||||||
result.nDof_ = sampleResult.nDof_;
|
result.nDof_ = sampleResult.nDof_;
|
||||||
result.parName_ = sampleResult.parName_;
|
result.parName_ = sampleResult.parName_;
|
||||||
|
Loading…
Reference in New Issue
Block a user