A class for observables. More...
#include <Observable.h>
A class for observables.
The class for building an observable and storing its different parameters read from the SomeModel.conf file or specified by the user. The name (thname) of the observable has to correspond to the allowed name of observables listed in the ThFactory class.
Definition at line 28 of file Observable.h.
Public Member Functions | |
| double | computeTheoryValue () |
| A method to access the computed theory value of the observable. More... | |
| virtual double | computeWeight (double th) |
| A method to compute the weight associated with the observable. More... | |
| virtual double | computeWeight (double th, double ave_i, double errg_i, double errf_i) |
| A method to compute the weight associated with the observable. More... | |
| virtual double | computeWeight (double th1, double th2) |
| A method to compute the weight associated with the observable. More... | |
| virtual double | computeWeight () |
| A method to compute the weight associated with the observable. More... | |
| double | getAve () const |
| A get method to access the average value of the observable. More... | |
| std::string | getDistr () const |
| A get method to access the name of the distribution of the observable. More... | |
| double | getErrf () const |
| A get method to access the flat error of the observable. More... | |
| double | getErrg () const |
| A get method to access the Gaussian error of the observble. More... | |
| std::string | getFilename () const |
| A get method to access the filename of the observables experimental likelihood file. More... | |
| std::string | getHistoname () const |
| A get method to access the name for the histogram of the observable. More... | |
| std::string | getLabel () const |
| A get method to access the label for the observable. More... | |
| double | getMax () const |
| A get method to access the maximum value of the observable. More... | |
| double | getMin () const |
| A get method to access the minimum value of the observable. More... | |
| std::string | getName () const |
| A get method to access the name of the observable. More... | |
| virtual int | getNChannels () |
| virtual int | getNTheoryValues () |
| std::string | getObsType () const |
| A get method to get the Observable type. More... | |
| virtual void | getTheoryValues (std::vector< double > &theoryValues_i) |
| std::string | getThname () const |
| A get method to access the thname of the observable as defined in ThFactory class. More... | |
| ThObservable * | getTho () const |
| A get method to access the pointer to the object of the ThObservable class. More... | |
| virtual bool | isNew () |
| bool | isTMCMC () const |
| A method to check if the observable is listed for MCMC. More... | |
| double | LogGaussian (double x, double ave, double sigma) |
| double | LogSplitGaussian (double x, double ave, double errl, double errr) |
| Observable (const std::string name_i, const std::string thname_i, const std::string label_i, const bool tMCMC_i, const double min_i, const double max_i, ThObservable *tho_i) | |
| Constructor. More... | |
| Observable (const Observable &orig) | |
| The copy constructor. More... | |
| Observable () | |
| The default constructor. More... | |
| boost::tokenizer< boost::char_separator< char > >::iterator & | ParseObservable (std::string &type, boost::tokenizer< boost::char_separator< char > > *tok, boost::tokenizer< boost::char_separator< char > >::iterator &beg, std::string &filepath, std::string &infilename, int rank) |
| The parser for Observables. More... | |
| void | setAve (double ave) |
| A set method to fix the average value of the observable. More... | |
| void | setDistr (std::string distr) |
| A set method to fix the name of the distribution of the observable. More... | |
| void | setErrf (double errf) |
| A set method to fix the flat error of the observable. More... | |
| void | setErrg (double errg) |
| A set method to fix the gaussian error of the observable. More... | |
| void | setFilename (std::string filename_i) |
| void | setHistoname (std::string histoname_i) |
| A set method to set the name of the histogram containing the likelihood. More... | |
| void | setLabel (std::string label) |
| A set method to fix the label for the observable. More... | |
| virtual void | setLikelihoodFromHisto (std::string filename, std::string histoname) |
| A set method to set the likelihood from which the experimental likelihood of the observable will be read. More... | |
| void | setMax (double max) |
| A set method to fix the maximum value for the observable. More... | |
| void | setMin (double min) |
| A set method to fix the minimum value for the observable. More... | |
| void | setName (std::string name) |
| A set method to fix the name for the observable. More... | |
| void | setObsType (std::string &obsType_s) |
| A set method to set the Observable type. More... | |
| virtual void | setParametricLikelihood (std::string filename) |
| A set method to set a parametric likelihood reading parameters from a file. More... | |
| virtual void | setParametricLikelihood (std::string filename, std::vector< ThObservable * > thObsV) |
| void | setThname (std::string thname) |
| A set method to fix the name of the observable as listed in ThFactory class. More... | |
| void | setTho (ThObservable *tho_i) |
| A set method to fix the pointer to object of type ThObservable. More... | |
| void | setTho (ThObservable *tho_i, double bmin, double bmax) |
| A set method to fix the pointer to object of type ThObservable. More... | |
| void | setTMCMC (bool tMCMC) |
| A set method to fix the observable's inclusion in the MCMC listing. More... | |
| virtual | ~Observable () |
| The default destructor. More... | |
Protected Attributes | |
| double | ave |
| The average value of the observable. More... | |
| double | bin_max |
| The maximum valus of the observable bin. More... | |
| double | bin_min |
| The minimum value of the observable bin. More... | |
| std::string | distr |
| The name of the distribution of the the observable. More... | |
| double | errf |
| the flat error of the observable. More... | |
| double | errg |
| The gaussian error of the observable. More... | |
| std::string | filename |
| The name of the file containing the experimental likelihood for the observable. More... | |
| std::string | histoname |
| The name of the histogram for the observable. More... | |
| TH1D * | inhisto |
| 1D Histogram containing the experimental likelihood for the observable More... | |
| int | iterationNo |
| A counter for the interation that helps with the observable caching. More... | |
| std::string | label |
| A label for the observable. More... | |
| double | max |
| The maximum valus of the observable. More... | |
| double | min |
| The minimum value of the observable. More... | |
| std::string | name |
| A name for the observable. More... | |
| std::string | obsType |
| Type of the Observable. 0: Observable, 1: HiggsObservable, 2: BinnedObservable, 3: FunctionObservable. More... | |
| std::string | thname |
| The name for the oservable as fixed in the ThObservable class. More... | |
| ThObservable * | tho |
| A pointer of to the object of the ThObservables class. More... | |
| double | thValue |
| The theory value of the first observable. More... | |
| bool | tMCMC |
| The flag to include or exclude the observable from the MCMC run. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &output, const Observable &o) |
| Befriending of the std::ostream operator << to generate an output stream for printing the observables details. More... | |
| Observable::Observable | ( | const std::string | name_i, |
| const std::string | thname_i, | ||
| const std::string | label_i, | ||
| const bool | tMCMC_i, | ||
| const double | min_i, | ||
| const double | max_i, | ||
| ThObservable * | tho_i | ||
| ) |
Constructor.
| [in] | name_i | a given name for the observable |
| [in] | thname_i | the thname for the observable fixed in ThFactory() |
| [in] | label_i | the label assigned to the observable |
| [in] | tMCMC_i | boolean flag to indicate inclusion in MCMC |
| [in] | min_i | minimum value for the observable |
| [in] | max_i | maximum value for the observable |
| [in] | tho_i | a pointer to an object of type ThObservable |
Definition at line 16 of file Observable.cpp.
| Observable::Observable | ( | const Observable & | orig | ) |
The copy constructor.
Definition at line 43 of file Observable.cpp.
| Observable::Observable | ( | ) |
The default constructor.
Definition at line 64 of file Observable.cpp.
|
virtual |
| double Observable::computeTheoryValue | ( | ) |
A method to access the computed theory value of the observable.
Definition at line 115 of file Observable.cpp.
|
virtual |
A method to compute the weight associated with the observable.
| [in] | th | the theoretical value of the observable |
Definition at line 137 of file Observable.cpp.
|
virtual |
A method to compute the weight associated with the observable.
| [in] | th | the theoretical value of the observable |
| [in] | ave_i | the average value of the observable |
| [in] | errg_i | the Gaussian error of the observable |
| [in] | errf_i | the flat error of the observable |
Definition at line 164 of file Observable.cpp.
|
inlinevirtual |
A method to compute the weight associated with the observable.
| [in] | th1 | the theoretical value of the first observable |
| [in] | th2 | the theoretical value of the second observable |
Reimplemented in Observable2D.
Definition at line 104 of file Observable.h.
|
inlinevirtual |
A method to compute the weight associated with the observable.
Reimplemented in Observable2D, and HiggsObservable.
Definition at line 112 of file Observable.h.
|
inline |
A get method to access the average value of the observable.
Definition at line 121 of file Observable.h.
|
inline |
A get method to access the name of the distribution of the observable.
Definition at line 139 of file Observable.h.
|
inline |
A get method to access the flat error of the observable.
Definition at line 157 of file Observable.h.
|
inline |
A get method to access the Gaussian error of the observble.
Definition at line 175 of file Observable.h.
|
inline |
A get method to access the filename of the observables experimental likelihood file.
Definition at line 193 of file Observable.h.
|
inline |
A get method to access the name for the histogram of the observable.
Definition at line 232 of file Observable.h.
|
inline |
A get method to access the label for the observable.
Definition at line 250 of file Observable.h.
|
inline |
A get method to access the maximum value of the observable.
Definition at line 268 of file Observable.h.
|
inline |
A get method to access the minimum value of the observable.
Definition at line 286 of file Observable.h.
|
inline |
A get method to access the name of the observable.
Definition at line 304 of file Observable.h.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
A get method to get the Observable type.
Definition at line 376 of file Observable.h.
|
inlinevirtual |
|
inline |
A get method to access the thname of the observable as defined in ThFactory class.
Definition at line 340 of file Observable.h.
|
inline |
A get method to access the pointer to the object of the ThObservable class.
Definition at line 358 of file Observable.h.
|
inlinevirtual |
Reimplemented in HiggsObservable.
Definition at line 428 of file Observable.h.
|
inline |
A method to check if the observable is listed for MCMC.
Definition at line 322 of file Observable.h.
| double Observable::LogGaussian | ( | double | x, |
| double | ave, | ||
| double | sigma | ||
| ) |
A method to compute the log of a Gaussian likelihood
| x | the value of the Gaussian distributed variable |
| ave | the average value |
| sigma | the error |
Definition at line 132 of file Observable.cpp.
| double Observable::LogSplitGaussian | ( | double | x, |
| double | ave, | ||
| double | errl, | ||
| double | errr | ||
| ) |
A method to compute the log of a split Gaussian likelihood
| x | the value of the split-Gaussian distributed variable |
| ave | the average value |
| errl | the left-side error |
| errr | the right-side error |
Definition at line 126 of file Observable.cpp.
| boost::tokenizer< boost::char_separator< char > >::iterator & Observable::ParseObservable | ( | std::string & | type, |
| boost::tokenizer< boost::char_separator< char > > * | tok, | ||
| boost::tokenizer< boost::char_separator< char > >::iterator & | beg, | ||
| std::string & | filepath, | ||
| std::string & | infilename, | ||
| int | rank | ||
| ) |
The parser for Observables.
| [in] | type | the string specifying the type of the observable |
| [in] | tok | the tokenizer containing the line being parsed |
| [in] | beg | the iterator that parses a line in the config file |
| [in] | filepath | the path to the config file being parsed |
| [in] | filename | the name of the config file being parsed |
Definition at line 184 of file Observable.cpp.
|
inline |
A set method to fix the average value of the observable.
| [in] | ave | the average value of the observable |
Definition at line 130 of file Observable.h.
|
inline |
A set method to fix the name of the distribution of the observable.
| [in] | distr | the name of the distribution of the observable |
Definition at line 148 of file Observable.h.
|
inline |
A set method to fix the flat error of the observable.
| [in] | errf | the flat error of the observable |
Definition at line 166 of file Observable.h.
|
inline |
A set method to fix the gaussian error of the observable.
| [in] | errg | the Gaussian error of the observable |
Definition at line 184 of file Observable.h.
|
inline |
Definition at line 198 of file Observable.h.
|
inline |
A set method to set the name of the histogram containing the likelihood.
| [in] | histoname_i | a string that contains the name of the histogram |
Definition at line 241 of file Observable.h.
|
inline |
A set method to fix the label for the observable.
| [in] | label | the label for the observable |
Definition at line 259 of file Observable.h.
|
virtual |
A set method to set the likelihood from which the experimental likelihood of the observable will be read.
| filename | the name of the file |
| histoname | the name of the histogram |
Reimplemented in Observable2D.
Definition at line 96 of file Observable.cpp.
|
inline |
A set method to fix the maximum value for the observable.
| [in] | max | the maximum value for the observable |
Definition at line 277 of file Observable.h.
|
inline |
A set method to fix the minimum value for the observable.
| [in] | min | the minimum value for the observable |
Definition at line 295 of file Observable.h.
|
inline |
A set method to fix the name for the observable.
| name | for the observable |
Definition at line 313 of file Observable.h.
|
inline |
A set method to set the Observable type.
| [in] | obsType_s | a string that contains the parameter name |
Definition at line 367 of file Observable.h.
|
inlinevirtual |
A set method to set a parametric likelihood reading parameters from a file.
| filename | the name of the file |
Definition at line 215 of file Observable.h.
|
inlinevirtual |
Set the parametric likelihood to be overloaded by HiggsObservable.
| filename | the name of the config file |
| thObsV | a vector of ThObservables |
Reimplemented in HiggsObservable.
Definition at line 225 of file Observable.h.
|
inline |
A set method to fix the name of the observable as listed in ThFactory class.
| [in] | thname | the name of the observable as listed in ThFactory class |
Definition at line 349 of file Observable.h.
|
inline |
A set method to fix the pointer to object of type ThObservable.
| [in] | tho | pointer to the object of type ThObservable |
Definition at line 385 of file Observable.h.
|
inline |
A set method to fix the pointer to object of type ThObservable.
| [in] | tho | pointer to the object of type ThObservable |
Definition at line 396 of file Observable.h.
|
inline |
A set method to fix the observable's inclusion in the MCMC listing.
| [in] | tMCMC | true or false |
Definition at line 331 of file Observable.h.
|
friend |
Befriending of the std::ostream operator << to generate an output stream for printing the observables details.
| [out] | output | the formatted output stream to print the model parameters |
| [in] | o | a reference to an object of type Observable() |
Definition at line 87 of file Observable.cpp.
|
protected |
The average value of the observable.
Definition at line 446 of file Observable.h.
|
protected |
The maximum valus of the observable bin.
Definition at line 455 of file Observable.h.
|
protected |
The minimum value of the observable bin.
Definition at line 454 of file Observable.h.
|
protected |
The name of the distribution of the the observable.
Definition at line 443 of file Observable.h.
|
protected |
the flat error of the observable.
Definition at line 448 of file Observable.h.
|
protected |
The gaussian error of the observable.
Definition at line 447 of file Observable.h.
|
protected |
The name of the file containing the experimental likelihood for the observable.
Definition at line 444 of file Observable.h.
|
protected |
The name of the histogram for the observable.
Definition at line 445 of file Observable.h.
|
protected |
1D Histogram containing the experimental likelihood for the observable
Definition at line 452 of file Observable.h.
|
protected |
A counter for the interation that helps with the observable caching.
Definition at line 456 of file Observable.h.
|
protected |
A label for the observable.
Definition at line 442 of file Observable.h.
|
protected |
The maximum valus of the observable.
Definition at line 450 of file Observable.h.
|
protected |
The minimum value of the observable.
Definition at line 449 of file Observable.h.
|
protected |
A name for the observable.
Definition at line 440 of file Observable.h.
|
protected |
Type of the Observable. 0: Observable, 1: HiggsObservable, 2: BinnedObservable, 3: FunctionObservable.
Definition at line 453 of file Observable.h.
|
protected |
The name for the oservable as fixed in the ThObservable class.
Definition at line 441 of file Observable.h.
|
protected |
A pointer of to the object of the ThObservables class.
Definition at line 439 of file Observable.h.
|
protected |
The theory value of the first observable.
Definition at line 457 of file Observable.h.
|
protected |
The flag to include or exclude the observable from the MCMC run.
Definition at line 451 of file Observable.h.