mupp 1.1.0
Loading...
Searching...
No Matches
PmuppParam Class Reference

Represents a single fit parameter with its value and uncertainties. More...

#include <Pmupp.h>

Public Member Functions

 PmuppParam ()
 Default constructor for PmuppParam.
 
 PmuppParam (QString name, double param, double posErr)
 Constructor for PmuppParam with symmetric errors.
 
 PmuppParam (QString name, double param, double posErr, double negErr)
 Constructor for PmuppParam with asymmetric errors.
 
void ResetParam ()
 Resets the parameter to undefined state.
 
void SetParam (QString name, double param, double posErr)
 Sets parameter with symmetric errors.
 
void SetParam (QString name, double param, double posErr, double negErr)
 Sets parameter with asymmetric errors.
 
void SetName (QString name)
 Sets the parameter name.
 
void SetValue (double dval)
 Sets the parameter value.
 
void SetPosErr (double dval)
 Sets the positive error of the parameter.
 
void SetNegErr (double dval)
 Sets the negative error of the parameter.
 
QString GetName ()
 Gets the parameter name.
 
double GetValue ()
 Gets the parameter value.
 
double GetPosErr ()
 Gets the positive error of the parameter.
 
double GetNegErr ()
 Gets the negative error of the parameter.
 

Private Attributes

QString fName
 parameter name (e.g., "alpha", "lambda", "phase")
 
double fValue
 central value of the parameter
 
double fPosErr
 positive (upper) error of the parameter
 
double fNegErr
 negative (lower) error of the parameter
 

Detailed Description

Represents a single fit parameter with its value and uncertainties.

The PmuppParam class encapsulates a single parameter from a muSR fit, including its name, central value, and asymmetric error bars (positive and negative errors). This class is the fundamental building block for storing parameter information in mupp.

The class supports both symmetric errors (where positive and negative errors are equal) and asymmetric errors (where they differ), which is common in fits with non-Gaussian likelihood profiles.

Definition at line 80 of file Pmupp.h.

Constructor & Destructor Documentation

◆ PmuppParam() [1/3]

PmuppParam::PmuppParam ( )

Default constructor for PmuppParam.

Initializes a parameter with undefined values (MUPP_UNDEF) and an empty name.

Definition at line 83 of file Pmupp.cpp.

◆ PmuppParam() [2/3]

PmuppParam::PmuppParam ( QString name,
double param,
double posErr )

Constructor for PmuppParam with symmetric errors.

Initializes a parameter with a name, value, and symmetric error (positive error = negative error).

Parameters
nameparameter name (e.g., "alpha", "lambda")
paramparameter central value
posErrparameter error (used for both positive and negative)

Definition at line 98 of file Pmupp.cpp.

◆ PmuppParam() [3/3]

PmuppParam::PmuppParam ( QString name,
double param,
double posErr,
double negErr )

Constructor for PmuppParam with asymmetric errors.

Initializes a parameter with a name, value, and asymmetric errors. This is useful when the uncertainty is not symmetric around the central value, which can occur with non-Gaussian likelihoods.

Parameters
nameparameter name (e.g., "alpha", "lambda")
paramparameter central value
posErrpositive (upper) parameter error
negErrnegative (lower) parameter error

Definition at line 116 of file Pmupp.cpp.

Member Function Documentation

◆ GetName()

QString PmuppParam::GetName ( )
inline

Gets the parameter name.

Returns
the parameter name

Definition at line 118 of file Pmupp.h.

◆ GetNegErr()

double PmuppParam::GetNegErr ( )
inline

Gets the negative error of the parameter.

Returns
the negative error value

Definition at line 136 of file Pmupp.h.

◆ GetPosErr()

double PmuppParam::GetPosErr ( )
inline

Gets the positive error of the parameter.

Returns
the positive error value

Definition at line 130 of file Pmupp.h.

◆ GetValue()

double PmuppParam::GetValue ( )
inline

Gets the parameter value.

Returns
the parameter value

Definition at line 124 of file Pmupp.h.

◆ ResetParam()

void PmuppParam::ResetParam ( )

Resets the parameter to undefined state.

Clears the parameter name and sets all numeric values to MUPP_UNDEF, effectively marking the parameter as uninitialized.

Definition at line 128 of file Pmupp.cpp.

◆ SetName()

void PmuppParam::SetName ( QString name)
inline

Sets the parameter name.

Parameters
namethe parameter name to be set

Definition at line 94 of file Pmupp.h.

◆ SetNegErr()

void PmuppParam::SetNegErr ( double dval)
inline

Sets the negative error of the parameter.

Parameters
dvalthe negative error value to be set

Definition at line 112 of file Pmupp.h.

◆ SetParam() [1/2]

void PmuppParam::SetParam ( QString name,
double param,
double posErr )

Sets parameter with symmetric errors.

Sets the parameter name, value, and error. The negative error is not explicitly set and should be set separately if asymmetric errors are needed.

Parameters
nameparameter name
paramparameter central value
posErrparameter error

Definition at line 147 of file Pmupp.cpp.

◆ SetParam() [2/2]

void PmuppParam::SetParam ( QString name,
double param,
double posErr,
double negErr )

Sets parameter with asymmetric errors.

Sets the parameter name, value, positive error, and negative error. Use this when the uncertainty is asymmetric around the central value.

Parameters
nameparameter name
paramparameter central value
posErrpositive (upper) error value
negErrnegative (lower) error value

Definition at line 166 of file Pmupp.cpp.

◆ SetPosErr()

void PmuppParam::SetPosErr ( double dval)
inline

Sets the positive error of the parameter.

Parameters
dvalthe positive error value to be set

Definition at line 106 of file Pmupp.h.

◆ SetValue()

void PmuppParam::SetValue ( double dval)
inline

Sets the parameter value.

Parameters
dvalthe parameter value to be set

Definition at line 100 of file Pmupp.h.

Member Data Documentation

◆ fName

QString PmuppParam::fName
private

parameter name (e.g., "alpha", "lambda", "phase")

Definition at line 139 of file Pmupp.h.

◆ fNegErr

double PmuppParam::fNegErr
private

negative (lower) error of the parameter

Definition at line 142 of file Pmupp.h.

◆ fPosErr

double PmuppParam::fPosErr
private

positive (upper) error of the parameter

Definition at line 141 of file Pmupp.h.

◆ fValue

double PmuppParam::fValue
private

central value of the parameter

Definition at line 140 of file Pmupp.h.


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