#include <NCFitter.h>
Inheritance diagram for NC::Fitter::ConstrainRange:

Public Member Functions | |
| ConstrainRange (const ICallableND *f, int pn, double min, double max) | |
| virtual double | EvalAtEx (const CoordNDim &r, CoordNDim *ret) const |
| Find the value of the function and return additional information. | |
Protected Attributes | |
| const ICallableND * | fFunc |
| int | fParamNum |
| double | fMin |
| double | fMax |
I am aware that a similar penalizing scheme is implemented elsewhere. Hopefully this construct is only temporary.
Definition at line 40 of file NCFitter.h.
|
||||||||||||||||||||
|
Definition at line 43 of file NCFitter.h.
|
|
||||||||||||
|
Find the value of the function and return additional information.
Implements NC::Fitter::ICallableND. Definition at line 1403 of file NCFitter.cxx. References NC::Fitter::CoordNDim, NC::Fitter::ICallableND::EvalAtEx(), and fFunc. 01404 {
01405 CoordNDim r2 = r;
01406 double pen = 0;
01407 if(r2[fParamNum] > fMax){
01408 // TODO - there should be some scaling based on the width,
01409 // but we happen to know all these variables are approx 0-1
01410 pen += 1e3*(r2[fParamNum]-fMax)*(r2[fParamNum]-fMax);
01411 r2[fParamNum] = fMax;
01412 }
01413 if(r2[fParamNum] < fMin){
01414 pen += 1e3*(r2[fParamNum]-fMin)*(r2[fParamNum]-fMin);
01415 r2[fParamNum] = fMin;
01416 }
01417 return fFunc->EvalAtEx(r2, ret)+pen;
01418 }
|
|
|
Definition at line 47 of file NCFitter.h. Referenced by EvalAtEx(). |
|
|
Definition at line 49 of file NCFitter.h. |
|
|
Definition at line 49 of file NCFitter.h. |
|
|
Definition at line 48 of file NCFitter.h. |
1.3.9.1