[back]

Fitter

A fitter can optimize parameters to fit a function to a histogram etc.
and also calculates parabolic and asymmetric fitting errors.

Fitting Engines

Engine Name
Optimization
Parabolic Error
Asymmetric Error
Comments
SimplePAIDA
o
o
-
default engine
PAIDA
o
o
o
SimpleGA
o
o
-
Genetic Algorithm
GA
o
o
o
Genetic Algorithm

GA and SimpleGA are very slow but will resolve not continuous problems.

Fitting Methods

  • Fitting methods are:
    • Chi2 (default)
    • CleverChi2
    • LeastSquares
    • BinnedMaximumLikelihood
      • fitting function is automatically normalized
    • UnbinnedMaximumLikelihood
      • fitting function must be normalized

Constraints

  • Various constraints are supported:
    • e.g. "Gauss_mean = sin(exp(Gauss_sigma)) * 3.0"
    • or "7.0 <= Gauss_mean <= 13.0"
    • ranged fitting like "5.0 <= x[0] <= 15.0"
    • refer to the sample code for details

Fitting Result Codes

Result Code
Optimization
Parabolic Error Asymmetric Error
0
o
o
o
1
o
o
failed
2
o
failed
failed
-1
failed
failed
failed

sampleFitter.py

A fitter can scan function values around any point
and search contour points around the optimized point.

sampleFitter_scanAndContour.py

Chi2 fitting with asymmetric errors of data points; asymmetric weighted fitting.

sampleFitter_asymmetric.py

[back]