GooFit
v2.1.3
|
#include <Variable.h>
Classes | |
class | Key |
This provides a key for some special classes to access blind info (passkey) More... | |
Public Member Functions | |
Variable (const Variable &)=default | |
Variable (Variable &&)=default | |
Variable (std::string n, fptype v) | |
This is a constant variable. More... | |
Variable (std::string n, fptype v, fptype dn, fptype up) | |
This is a normal variable, with value and upper/lower limits. More... | |
Variable (std::string n, fptype v, fptype e, fptype dn, fptype up, bool fix=false) | |
This is a full variable with error scale as well (Fix added to allow single interface to fixed/free vars) More... | |
~Variable () override=default | |
Variable & | operator= (const Variable &)=delete |
fptype | getError () const |
Get the error. More... | |
void | setError (fptype val) |
Set the error. More... | |
int | getFitterIndex () const |
Get the index from the fitter. More... | |
void | setFitterIndex (int value) |
Set the index (should be done by the fitter) More... | |
bool | getChanged () const |
Check to see if the value has changed this iteration (always true the first time) More... | |
bool | IsFixed () const |
Check to see if this is a constant. More... | |
void | setFixed (bool fix) |
Set the fixedness of a variable. More... | |
void | setChanged (bool val=true) |
Check to see if this has been changed since last iteration. More... | |
void | setBlind (fptype val) |
Hides the number; the real value is the result minus this value. Cannot be retreived once set. More... | |
fptype | getBlind (const Key &) |
Protected by special locked key, only a few classes have access to create a Key. More... | |
const Variable & | operator= (const fptype &val) |
Support var = 3. More... | |
Public Member Functions inherited from GooFit::Indexable | |
Indexable (std::string n, fptype val=0) | |
Indexable (std::string n, fptype val, fptype lowerlimit, fptype upperlimit) | |
Indexable & | operator= (const Indexable &)=delete |
virtual | ~Indexable () |
int | getIndex () const |
Get the GooFit index. More... | |
void | setIndex (int value) |
Set the GooFit index. More... | |
const std::string & | getName () const |
Get the name. More... | |
fptype | getValue () const |
Get the value. More... | |
void | setValue (fptype val) |
Set the value. More... | |
fptype | getUpperLimit () const |
Get the upper limit. More... | |
void | setUpperLimit (fptype val) |
Set the upper limit. More... | |
fptype | getLowerLimit () const |
Get the lower limit. More... | |
void | setLowerLimit (fptype val) |
Set the lower limit. More... | |
const Indexable & | operator= (const fptype &val) |
Support var = 3. More... | |
operator fptype () const | |
Support fptype val = var. More... | |
bool | operator< (const Indexable &other) const |
Support for using as key in map - Notice this does NOT sort by index! More... | |
bool | operator== (const Indexable &other) const |
Support for comparison - only if really the same object, not just the same value. More... | |
bool | operator!= (const Indexable &other) const |
Support for comparison - only if really the same object, not just the same value. More... | |
operator bool () const | |
Check to see if in range. More... | |
Protected Attributes | |
std::shared_ptr< fptype > | error |
The error. More... | |
std::shared_ptr< fptype > | blind {std::make_shared<fptype>(0)} |
A blinding value to add. More... | |
std::shared_ptr< bool > | changed_ {std::make_shared<bool>(true)} |
True if the value was unchanged since the last iteration. More... | |
std::shared_ptr< bool > | fixed {std::make_shared<bool>(false)} |
This "fixes" the variable (constant) More... | |
std::shared_ptr< int > | fitter_index {std::make_shared<int>(-1)} |
The fitter index, -1 if unset. More... | |
Protected Attributes inherited from GooFit::Indexable | |
std::string | name |
The variable name. Should be unique. More... | |
std::shared_ptr< fptype > | value |
The value of the variable. More... | |
std::shared_ptr< fptype > | lowerlimit {std::make_shared<fptype>(0)} |
The lower limit. More... | |
std::shared_ptr< fptype > | upperlimit {std::make_shared<fptype>(0)} |
The upper limit. More... | |
std::shared_ptr< int > | index {std::make_shared<int>(-1)} |
The goofit index, -1 if unset. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const Variable &var) |
Nice print of Variable. More... | |
Contains information about a parameter allowed to vary in MINUIT, or an observable passed to a data set. The index can refer either to cudaArray or to an event.
Definition at line 149 of file Variable.h.
|
default |
|
default |
|
inline |
This is a constant variable.
Definition at line 167 of file Variable.h.
This is a normal variable, with value and upper/lower limits.
Definition at line 174 of file Variable.h.
|
inline |
This is a full variable with error scale as well (Fix added to allow single interface to fixed/free vars)
Definition at line 179 of file Variable.h.
References GooFit::Indexable::operator=().
|
overridedefault |
Protected by special locked key, only a few classes have access to create a Key.
Definition at line 214 of file Variable.h.
|
inline |
Check to see if the value has changed this iteration (always true the first time)
Definition at line 199 of file Variable.h.
Referenced by GooFit::PdfBase::parametersChanged().
|
inline |
Get the error.
Definition at line 189 of file Variable.h.
Referenced by GooFit::operator<<(), runCanonicalFit(), and runGeneratedMCFit().
|
inline |
Get the index from the fitter.
Definition at line 194 of file Variable.h.
Referenced by GooFit::max_fitter_index(), and GooFit::operator<<().
|
inline |
Check to see if this is a constant.
Definition at line 202 of file Variable.h.
Referenced by GooFit::operator<<().
Support var = 3.
Definition at line 217 of file Variable.h.
References GooFit::Indexable::setValue().
|
inline |
Hides the number; the real value is the result minus this value. Cannot be retreived once set.
Definition at line 211 of file Variable.h.
Referenced by runCanonicalFit().
|
inline |
Check to see if this has been changed since last iteration.
Definition at line 208 of file Variable.h.
Referenced by GooFit::FCN::FCN().
|
inline |
|
inline |
Set the index (should be done by the fitter)
Definition at line 196 of file Variable.h.
References GooFit::Indexable::value.
|
inline |
Set the fixedness of a variable.
Definition at line 205 of file Variable.h.
Referenced by main(), makeMikhailJSU_gg(), makeSignalJSU_gg(), and makeSignalPdf().
|
friend |
A blinding value to add.
Definition at line 227 of file Variable.h.
Referenced by GooFit::operator<<().
|
protected |
True if the value was unchanged since the last iteration.
Definition at line 230 of file Variable.h.
|
protected |
The error.
Definition at line 224 of file Variable.h.
|
protected |
The fitter index, -1 if unset.
Definition at line 236 of file Variable.h.
|
protected |
This "fixes" the variable (constant)
Definition at line 233 of file Variable.h.