BCObservable Class Reference
A class representing a variable of a model. More...
#include <BCObservable.h>
Inheritance diagram for BCObservable:
Collaboration diagram for BCObservable:
Public Member Functions | |
Constructors and destructor | |
BCObservable () | |
The default constructor. More... | |
BCObservable (const std::string &name, double lowerlimit, double upperlimit, const std::string &latexname="", const std::string &unitstring="") | |
Constructor with names and limits. More... | |
operators and swap | |
BCObservable & | operator= (const double &value) |
assignment to a double operator | |
Member functions (get) | |
double | Value () const |
Member functions (set) | |
virtual void | Value (double val) |
Set value of observable. More... | |
Public Member Functions inherited from BCVariable | |
BCVariable () | |
The default constructor. More... | |
BCVariable (const std::string &name, double lowerlimit, double upperlimit, const std::string &latexname="", const std::string &unitstring="") | |
A constructor. More... | |
virtual | ~BCVariable () |
Destructor. | |
virtual const std::string & | GetPrefix () const |
virtual const std::string & | GetName () const |
virtual const std::string & | GetSafeName () const |
virtual const std::string & | GetLatexName () const |
virtual const std::string & | GetUnitString () const |
virtual std::string | GetLatexNameWithUnits () const |
virtual double | GetLowerLimit () const |
virtual double | GetUpperLimit () const |
virtual double | GetRangeWidth () const |
Returns the range width of the variable values. More... | |
virtual double | GetRangeCenter () const |
Returns center of variable range. More... | |
virtual unsigned | GetPrecision () const |
virtual bool | FillH1 () const |
virtual bool | FillH2 () const |
virtual unsigned | GetNbins () const |
virtual void | SetName (const std::string &name) |
virtual void | SetLatexName (const std::string &latex_name) |
virtual void | SetUnitString (const std::string &unit_string) |
virtual void | SetLowerLimit (double limit) |
Set the lower limit of the variable values. More... | |
virtual void | SetUpperLimit (double limit) |
Set the upper limit of the variable values. More... | |
virtual void | SetLimits (double lowerlimit=0, double upperlimit=1) |
Set the limits of the variable values. More... | |
virtual void | SetPrecision (unsigned precision) |
Set the precision of the output of variable. More... | |
virtual void | FillHistograms (bool flag) |
Set the filling of 1D and 2D histograms. More... | |
virtual void | FillHistograms (bool fill_1d, bool fill_2d) |
Set the filling of 1D and 2D histograms. More... | |
virtual void | FillH1 (bool flag) |
Set the filling of 1D histogram. More... | |
virtual void | FillH2 (bool flag) |
Set the filling of 2D histograms. More... | |
virtual void | SetNbins (unsigned nbins) |
virtual bool | IsNamed (const std::string &name) const |
Check if name is that of variable. More... | |
virtual bool | IsSafeNamed (const std::string &safename) const |
Check if safe name is that of variable. More... | |
virtual double | PositionInRange (double x) const |
return position in range of given value from 0 (at lower limit) to 1 (at upper limit) More... | |
virtual double | ValueFromPositionInRange (double p) const |
Translate from unit interval to value in variable range. More... | |
virtual void | CalculatePrecision (bool force=false) |
Calculate the necessary precision for outputting this parameter and replace current precision is smaller or if force is set true. More... | |
virtual bool | IsAtLimit (double value) const |
virtual bool | IsWithinLimits (double value) const |
virtual void | PrintSummary () const |
Prints a variable summary on the screen. More... | |
virtual std::string | OneLineSummary (bool print_prefix=true, int name_length=-1) const |
virtual std::string | H1Title () const |
virtual std::string | H2Title (const BCVariable &ordinate) const |
virtual std::string | H3Title (const BCVariable &ordinate_y, const BCVariable &ordinate_z) const |
virtual TH1 * | CreateH1 (const std::string &name) const |
Creates a 1D Histogram for this variable. More... | |
virtual TH2 * | CreateH2 (const std::string &name, const BCVariable &ordinate) const |
virtual TH3 * | CreateH3 (const std::string &name, const BCVariable &ordinate_y, const BCVariable &ordinate_z) const |
virtual double | GetUniformRandomValue (TRandom *const R) const |
Get random value uniformly distributed in range. More... | |
Additional Inherited Members | |
Protected Attributes inherited from BCVariable | |
bool | fFillH1 |
Flag to store MCMC samples in 1D histogram. | |
bool | fFillH2 |
Flag to store MCMC samples in 2D histograms. | |
std::string | fLatexName |
The latex name of the variable. | |
double | fLowerLimit |
The lower limit of the variable value. | |
std::string | fName |
The name of the variable. | |
unsigned | fNbins |
The number of equal-size bins used in histograms involving this variable. | |
unsigned | fPrecision |
Necessary precision for output. | |
std::string | fPrefix |
prefix for output | |
std::string | fSafeName |
Safe name of the variable for use in ROOT object naming. | |
std::string | fUnitString |
Unit string for variable. | |
double | fUpperLimit |
The upper limit of the variable value. | |
Detailed Description
A class representing a variable of a model.
- Version
- 1.0
- Date
- 08.2008
This class represents a variable of a model. It contains information about the name and the range of the variable.
Definition at line 32 of file BCObservable.h.
Constructor & Destructor Documentation
BCObservable::BCObservable | ( | ) |
The default constructor.
Definition at line 12 of file BCObservable.cxx.
BCObservable::BCObservable | ( | const std::string & | name, |
double | lowerlimit, | ||
double | upperlimit, | ||
const std::string & | latexname = "" , |
||
const std::string & | unitstring = "" |
||
) |
Constructor with names and limits.
- Parameters
-
name The name of the variable. lowerlimit The lower limit of the variable values. upperlimit The upper limit of the variable values. latexname The latex name of the variable used in axis labeling. unitstring Unit string to be printed for variable.
Definition at line 20 of file BCObservable.cxx.
Member Function Documentation
|
inline |
- Returns
- Value of the observable.
Definition at line 69 of file BCObservable.h.
|
inlinevirtual |
Set value of observable.
Definition at line 80 of file BCObservable.h.
The documentation for this class was generated from the following files:
- /root/bat/BAT/BCObservable.h
- /root/bat/src/BCObservable.cxx