Xephyr  0.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Likelihood Class Referenceabstract

#include <XeStat.h>

Inheritance diagram for Likelihood:
XeStat errorHandler printTools ProfileLikelihood CombinedProfileLikelihood pdfLikelihood

Public Member Functions

virtual double computeTheLogLikelihood ()=0
 
double computeTheConstraint ()
 
 Likelihood (TString name)
 
double getSigmaHat ()
 
double getLogD ()
 
bool parameterExists (int p)
 
void addParameter (int id, int type, TString nam, double initialVal, double step, double mi, double ma)
 
void addParameter (LKParameter *param, int id=SAME)
 
void replaceParameter (LKParameter *param)
 
void addParameterTolerant (LKParameter *param)
 
void activateParameter (LKParameter *param, bool active=true)
 
void removeParameter (LKParameter *param, bool tolerant=false)
 
void removeParameter (int id, bool tolerant=false)
 
void listParameters ()
 
void printInitialParameters ()
 
void printResultParameters ()
 
void printCurrentParameters ()
 
void printCurrentParameters (bool with_err)
 
void ignoreParameter (int id)
 
void setParameterType (int id, int type)
 
void setParameterValue (int id, double v)
 
void setInitialValue (int id, double v)
 
double getParameterValue (int id)
 
double maximize (bool freezeParametersOfInterest)
 
double maximizeNumerically (int numberOfToys, bool freezeParametersOfInterest)
 
void setSeed (double Inputseed)
 
int getNTotalParameters ()
 
int getNActiveParameters ()
 
int getNParametersOfInterest ()
 
int getNMinuitParameters ()
 
int getNNuisanceParameters ()
 
int getNParameters (int type)
 
void resetParameters ()
 
LKParametergetParameter (int id)
 
LKParametergetPOI ()
 
map< int, LKParameter * > * getParameters ()
 get Parameter Of Interest
 
TH1F getPullsHisto ()
 
void setCurrentValues (const double *v, const double *ers=NULL)
 
void setCurrentValuesInMinuitUnits (const double *v, const double *e=NULL)
 
void setCombinedMode (bool mode=true)
 
void printInitialHeader ()
 
void printCurrentHeader ()
 
bool checkConsistency ()
 
bool inCombinedMode ()
 
int mapMinuitParameters (bool freezeParametersOfInterest)
 
int getNParametersForChi2 ()
 
void forceNParametersOfInterest (int nF)
 
void clearTheParameters ()
 
- Public Member Functions inherited from XeStat
 XeStat (TString name)
 
void setName (TString nam="No_Name")
 helper method to set the name of this instance.
 
TString getName ()
 helper method to return the name of this instance.
 
void setExperiment (int exp)
 set the experiment number, usefull for combination
 
int getExperiment ()
 set the experiment number, usefull for combination
 
- Public Member Functions inherited from errorHandler
 errorHandler (TString name)
 
void Error (TString functionName, TString message)
 Send an Error message to the user. More...
 
void Warning (TString functionName, TString message)
 Send a Warning message to the user. More...
 
void Info (TString functionName, TString message)
 Send an Info message to the user. More...
 
void Debug (TString functionName, TString message)
 Send a Debug message to the user. More...
 
void setPrintLevel (int level)
 Set the local printing level (for this instance only) More...
 
int getPrintLevel ()
 Return the current print level for this instance. remind that if you set with setPrintLevel this will override the global print level.
 
- Public Member Functions inherited from printTools
 printTools ()
 ---------— Print Toools -----------— ///
 

Static Public Member Functions

static double shapeLikelihood (vector< int > *bins, int nDist, double **dists, double *norm)
 
- Static Public Member Functions inherited from XeStat
static void setAnalysisMode (int mode)
 
static int getAnalysisMode ()
 
static bool checkAnalysisMode (TString name, int requested)
 
static bool isAnalysisDefined (bool verbose=false)
 
static bool isCutsBased ()
 
static bool isPL ()
 
static int getSigmaLinLog (int unit)
 
static TString getAnalysisModeName ()
 
static TString getAnalysisModeName (int mode)
 
static TString getSystematicModeName (int syst)
 
static TString getSigmaUnitName (int unit)
 
static TString getSigmaLabel (int unit)
 
static TString getSigmaModeName (int mode)
 
static TString getUpperSigmaLabel (int unit)
 
- Static Public Member Functions inherited from printTools
static TString upperCase (TString s)
 
static TString lowerCase (TString s)
 
static TString trim (TString s)
 
static TString justify (TString s, int w, bool left, bool trim)
 
static TString rightJustify (TString s, int w, bool trim=false)
 
static TString leftJustify (TString s, int w, bool trim=false)
 
static TString format0I (int v, int w=1)
 
static TString formatLI (int v, int w=1, int p=1)
 
static TString formatRI (int v, int w=1, int p=1)
 
static TString formatF (double v, int w=1, int p=1)
 
static TString formatR (double v, int w=1, int p=1)
 
static TString formatLF (double v, int w=1, int p=1)
 
static TString formatRF (double v, int w=1, int p=1)
 
static TString formatG (double v, int w=1, int p=1)
 
static TString formatLG (double v, int w=1, int p=1)
 
static TString formatRG (double v, int w=1, int p=1)
 
static TString formatI (int v, int w=1, int trailer=0)
 
static TString doOrDont (bool b)
 

Public Attributes

double seed
 
- Public Attributes inherited from errorHandler
int localPrintLevel
 
TString className
 

Protected Member Functions

void setup ()
 
void clear ()
 
bool checkParameter (int p, bool shouldExist)
 

Protected Attributes

int currentId
 
int nParametersOfInterest
 
int nActiveParameters
 
int nNuisanceParameters
 
int forcedNParametersOfInterest
 
bool combinedMode
 
vector< LKParameter * > MinuitParameters
 
map< int, LKParameter * > parameters
 
double sigmaHat
 
double LogD
 
- Protected Attributes inherited from XeStat
TString name
 
int experiment
 

Additional Inherited Members

- Static Public Attributes inherited from errorHandler
static int globalPrintLevel = 1
 
- Static Protected Attributes inherited from XeStat
static int analysisMode = NO_ANALYSIS
 

Detailed Description

A likelihood object, consisting of parameters. This is a virtual class

Constructor & Destructor Documentation

◆ Likelihood()

Likelihood::Likelihood ( TString  name)

Constructor

Parameters
namename of the object

Member Function Documentation

◆ activateParameter()

void Likelihood::activateParameter ( LKParameter param,
bool  active = true 
)

Activate (add or remove) a parameter with its own id

Parameters
parampointer to existing LKParameter
activeactivate(true) or disable (true)

◆ addParameter() [1/2]

void Likelihood::addParameter ( int  id,
int  type,
TString  nam,
double  initialVal,
double  step,
double  mi,
double  ma 
)

Add a parameter

Parameters
ideither its hard coded id or the keyword AUTO
typeNUISANCE_PARAMETER,PARAMETER_OF_INTEREST or FIXED_PARAMETER
nameparameter name
initialValinitial value
stepstep for minimisation
miminimum value
mamaximum value

◆ addParameter() [2/2]

void Likelihood::addParameter ( LKParameter param,
int  id = SAME 
)

add an existing parameter

Parameters
parampointer to existing LKParameter
idrequested id, or SAME (the one coded in the parameter), or AUTO

◆ addParameterTolerant()

void Likelihood::addParameterTolerant ( LKParameter param)

Add a parameter with its own id, wheter already added or not

Parameters
parampointer to existing LKParameter

◆ computeTheLogLikelihood()

virtual double Likelihood::computeTheLogLikelihood ( )
pure virtual
Returns
Pure virtual method returning the log likelihood
Parameters
noneAll parameters values set thru LKParameter

Implemented in CombinedProfileLikelihood, and pdfLikelihood.

◆ getLogD()

double Likelihood::getLogD ( )

Return the log likelilood for the estimated sigma

◆ getSigmaHat()

double Likelihood::getSigmaHat ( )

Method returning current estimated sigma

Returns
current value of estimated sigma

◆ parameterExists()

bool Likelihood::parameterExists ( int  p)

Check wheher a parameter exists

◆ removeParameter() [1/2]

void Likelihood::removeParameter ( LKParameter param,
bool  tolerant = false 
)

Remove a parameter with its own id

Parameters
parampointer to existing LKParameter
tolerantdon't issue a warning if it does not exist

◆ removeParameter() [2/2]

void Likelihood::removeParameter ( int  id,
bool  tolerant = false 
)

Remove a parameter giving its id

Parameters
ididentifier
tolerantdon't issue a warning if it does not exist

◆ replaceParameter()

void Likelihood::replaceParameter ( LKParameter param)

Replace a parameter. If exists, delete the existing one

Parameters
parampointer to existing LKParameter

◆ setup()

void Likelihood::setup ( )
protected

Technical routine for constructors

◆ shapeLikelihood()

static double Likelihood::shapeLikelihood ( vector< int > *  bins,
int  nDist,
double **  dists,
double *  norm 
)
static

return the shape LL that a set of values comes from a mixture of tabulated parent distribution. Makes sure that no bin has a negative expetancy!

Returns
Log Likelihood
Parameters
binslist of bin number of input values
nDistsnumber of distributions
diststabulated distributions
normnormalized weights (i.e. normalized to 1.)

Member Data Documentation

◆ LogD

double Likelihood::LogD
protected

Saved value of Log Likelihood at estimated sigma

◆ sigmaHat

double Likelihood::sigmaHat
protected

Saved value of estimated sigma


The documentation for this class was generated from the following files: