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 () |
A method to compute the weight associated with 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... | |
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... | |
bool | isWriteChain () const |
A method to check if the observable is listed for writing chains. More... | |
double | LogGaussian (double x, double ave, double sigma) |
double | LogSplitGaussian (double x, double ave, double errl, double errr) |
Observable () | |
The default constructor. More... | |
Observable (const Observable &orig) | |
The copy constructor. More... | |
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... | |
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 | setErrgl (double errgl) |
A set method to fix the left Gaussian error of the observable. More... | |
void | setErrgr (double errgr) |
A set method to fix the right Gaussian error of the observable. More... | |
void | setFilename (std::string filename_i) |
void | setHasInverseCovariance (bool hasInverseCovariance) |
A set method to state that the Observable is a part of ObservablesWithInverseCovariance. More... | |
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... | |
double | errgl |
The lower gaussian error of the observable. More... | |
double | errgr |
The upper gaussian error of the observable. More... | |
std::string | filename |
The name of the file containing the experimental likelihood for the observable. More... | |
bool | hasInverseCovariance |
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 observable 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... | |
bool | writeChain |
The flag to write the chain for 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 18 of file Observable.cpp.
Observable::Observable | ( | const Observable & | orig | ) |
The copy constructor.
Definition at line 49 of file Observable.cpp.
Observable::Observable | ( | ) |
|
virtual |
double Observable::computeTheoryValue | ( | ) |
A method to access the computed theory value of the observable.
Definition at line 130 of file Observable.cpp.
|
inlinevirtual |
A method to compute the weight associated with the observable.
Reimplemented in HiggsObservable, and Observable2D.
Definition at line 113 of file Observable.h.
|
virtual |
A method to compute the weight associated with the observable.
[in] | th | the theoretical value of the observable |
Definition at line 152 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 182 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 105 of file Observable.h.
|
inline |
A get method to access the average value of the observable.
Definition at line 122 of file Observable.h.
|
inline |
A get method to access the name of the distribution of the observable.
Definition at line 140 of file Observable.h.
|
inline |
A get method to access the flat error of the observable.
Definition at line 158 of file Observable.h.
|
inline |
A get method to access the Gaussian error of the observble.
Definition at line 176 of file Observable.h.
|
inline |
A get method to access the filename of the observables experimental likelihood file.
Definition at line 212 of file Observable.h.
|
inline |
A get method to access the name for the histogram of the observable.
Definition at line 251 of file Observable.h.
|
inline |
A get method to access the label for the observable.
Definition at line 269 of file Observable.h.
|
inline |
A get method to access the maximum value of the observable.
Definition at line 287 of file Observable.h.
|
inline |
A get method to access the minimum value of the observable.
Definition at line 305 of file Observable.h.
|
inline |
A get method to access the name of the observable.
Definition at line 323 of file Observable.h.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
A get method to get the Observable type.
Definition at line 404 of file Observable.h.
|
inlinevirtual |
|
inline |
A get method to access the thname of the observable as defined in ThFactory class.
Definition at line 368 of file Observable.h.
|
inline |
A get method to access the pointer to the object of the ThObservable class.
Definition at line 386 of file Observable.h.
|
inlinevirtual |
Reimplemented in HiggsObservable.
Definition at line 458 of file Observable.h.
|
inline |
A method to check if the observable is listed for MCMC.
Definition at line 341 of file Observable.h.
|
inline |
A method to check if the observable is listed for writing chains.
Definition at line 350 of file Observable.h.
double Observable::LogGaussian | ( | double | x, |
double | ave, | ||
double | sigma | ||
) |
A method to compute the log of a Gaussian likelihood
[in] | x | the value of the Gaussian distributed variable |
[in] | ave | the average value |
[in] | sigma | the error |
Definition at line 147 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 | |
[in] | ave | the average value |
[in] | errl | the left-side error |
[in] | errr | the right-side error |
Definition at line 141 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] | infilename | the name of the config file being parsed |
[in] | rank | the MPI rank of the process accessing the code |
Definition at line 202 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 131 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 149 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 167 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 185 of file Observable.h.
|
inline |
A set method to fix the left Gaussian error of the observable.
[in] | errgl | the left Gaussian error of the observable |
Definition at line 194 of file Observable.h.
|
inline |
A set method to fix the right Gaussian error of the observable.
[in] | errgr | the right Gaussian error of the observable |
Definition at line 203 of file Observable.h.
|
inline |
Definition at line 217 of file Observable.h.
|
inline |
A set method to state that the Observable is a part of ObservablesWithInverseCovariance.
[in] | hasInverseCovariance | a boolean which is true for ObservablesWithInverseCovariance |
Definition at line 464 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 260 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 278 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 111 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 296 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 314 of file Observable.h.
|
inline |
A set method to fix the name for the observable.
name | for the observable |
Definition at line 332 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 395 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 234 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 244 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 377 of file Observable.h.
|
inline |
A set method to fix the pointer to object of type ThObservable.
[in] | tho_i | pointer to the object of type ThObservable |
Definition at line 413 of file Observable.h.
|
inline |
A set method to fix the pointer to object of type ThObservable.
[in] | tho_i | pointer to the object of type ThObservable |
[in] | bmin | the lower limit of the bin |
[in] | bmax | the upper limit of the bin |
Definition at line 426 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 359 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 102 of file Observable.cpp.
|
protected |
The average value of the observable.
Definition at line 485 of file Observable.h.
|
protected |
The maximum valus of the observable bin.
Definition at line 497 of file Observable.h.
|
protected |
The minimum value of the observable bin.
Definition at line 496 of file Observable.h.
|
protected |
The name of the distribution of the the observable.
Definition at line 482 of file Observable.h.
|
protected |
The flat error of the observable.
Definition at line 487 of file Observable.h.
|
protected |
The gaussian error of the observable.
Definition at line 486 of file Observable.h.
|
protected |
The lower gaussian error of the observable.
Definition at line 488 of file Observable.h.
|
protected |
The upper gaussian error of the observable.
Definition at line 489 of file Observable.h.
|
protected |
The name of the file containing the experimental likelihood for the observable.
Definition at line 483 of file Observable.h.
|
protected |
Definition at line 500 of file Observable.h.
|
protected |
The name of the histogram for the observable.
Definition at line 484 of file Observable.h.
|
protected |
1D Histogram containing the experimental likelihood for the observable
Definition at line 494 of file Observable.h.
|
protected |
A counter for the interation that helps with the observable caching.
Definition at line 498 of file Observable.h.
|
protected |
A label for the observable.
Definition at line 481 of file Observable.h.
|
protected |
The maximum valus of the observable.
Definition at line 491 of file Observable.h.
|
protected |
The minimum value of the observable.
Definition at line 490 of file Observable.h.
|
protected |
A name for the observable.
Definition at line 479 of file Observable.h.
|
protected |
Type of the Observable. 0: Observable, 1: HiggsObservable, 2: BinnedObservable, 3: FunctionObservable.
Definition at line 495 of file Observable.h.
|
protected |
The name for the observable as fixed in the ThObservable class.
Definition at line 480 of file Observable.h.
|
protected |
A pointer of to the object of the ThObservables class.
Definition at line 478 of file Observable.h.
|
protected |
The theory value of the first observable.
Definition at line 499 of file Observable.h.
|
protected |
The flag to include or exclude the observable from the MCMC run.
Definition at line 492 of file Observable.h.
|
protected |
The flag to write the chain for the observable from the MCMC run.
Definition at line 493 of file Observable.h.