laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for defining the fit parameter objects. More...

#include <LauParameter.hh>

Public Member Functions

 LauParameter ()
 Default constructor. More...
 
 LauParameter (const TString &parName)
 Constructor for named parameter. More...
 
 LauParameter (Double_t parValue)
 Constructor for parameter value. More...
 
 LauParameter (Double_t parValue, Double_t min, Double_t max)
 Constructor double limit parameter. More...
 
 LauParameter (Double_t parValue, Double_t min, Double_t max, Bool_t parFixed)
 Constructor double limit fixed parameter. More...
 
 LauParameter (Double_t parValue, Double_t parError, Double_t min, Double_t max)
 Constructor for double error and limit parameter. More...
 
 LauParameter (const TString &parName, Double_t parValue)
 Constructor for parameter value and name. More...
 
 LauParameter (const TString &parName, Double_t parValue, Double_t min, Double_t max)
 Constructor double limit parameter and name. More...
 
 LauParameter (const TString &parName, Double_t parValue, Double_t min, Double_t max, Bool_t parFixed)
 Constructor double limit fixed parameter and name. More...
 
 LauParameter (const TString &parName, Double_t parValue, Double_t parError, Double_t min, Double_t max)
 Constructor double error and limit parameter and name. More...
 
virtual ~LauParameter ()
 
 LauParameter (const LauParameter &rhs)
 Copy constructor. More...
 
LauParameteroperator= (const LauParameter &rhs)
 Copy assignment operator. More...
 
const TString & name () const
 The parameter name. More...
 
Double_t value () const
 The value of the parameter. More...
 
Double_t error () const
 The error on the parameter. More...
 
Double_t negError () const
 The lower error on the parameter. More...
 
Double_t posError () const
 The upper error on the parameter. More...
 
Double_t genValue () const
 The value generated for the parameter. More...
 
Double_t initValue () const
 The initial value of the parameter. More...
 
Double_t minValue () const
 The minimum value allowed for the parameter. More...
 
Double_t maxValue () const
 The maximum value allowed for the parameter. More...
 
Double_t range () const
 The range allowed for the parameter. More...
 
Bool_t fixed () const
 Check whether the parameter is fixed or floated. More...
 
Bool_t firstStage () const
 Check whether the parameter should be floated only in the first stage of a two stage fit. More...
 
Bool_t secondStage () const
 Check whether the parameter should be floated only in the second stage of a two stage fit. More...
 
Double_t bias () const
 The bias in the parameter. More...
 
Double_t pull () const
 The pull value for the parameter. More...
 
void name (const TString &newName)
 Set the parameter name. More...
 
void value (Double_t newValue)
 Set the value of the parameter. More...
 
void error (Double_t newError)
 Set the error on the parameter. More...
 
void negError (Double_t newNegError)
 Set the lower error on the parameter. More...
 
void posError (Double_t newPosError)
 Set the upper error on the parameter. More...
 
void errors (Double_t newError, Double_t newNegError, Double_t newPosError)
 Set the error values on the parameter. More...
 
void valueAndErrors (Double_t newValue, Double_t newError, Double_t newNegError=0.0, Double_t newPosError=0.0)
 Set the value and errors on the parameter. More...
 
void genValue (Double_t newGenValue)
 Set the generated value for the parameter. More...
 
void initValue (Double_t newInitValue)
 Set the inital value for the parameter. More...
 
void minValue (Double_t newMinValue)
 Set the minimum value for the parameter. More...
 
void maxValue (Double_t newMaxValue)
 Set the maximum value for the parameter. More...
 
void range (Double_t newMinValue, Double_t newMaxValue)
 Set the range for the parameter. More...
 
void valueAndRange (Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
 Set the value and range for the parameter. More...
 
void fixed (Bool_t parFixed)
 Fix or float the given parameter. More...
 
void firstStage (Bool_t firstStagePar)
 Set parameter as first-stage or not of the fit. More...
 
void secondStage (Bool_t secondStagePar)
 Set parameter as second-stage or not of the fit. More...
 
LauParameteroperator= (Double_t val)
 Basic assignment. More...
 
LauParameteroperator+= (Double_t val)
 Addition assignment operator. More...
 
LauParameteroperator-= (Double_t val)
 Subtraction assignment operator. More...
 
LauParameteroperator*= (Double_t val)
 Multiplication assignment operator. More...
 
LauParameteroperator/= (Double_t val)
 Division assignment operator. More...
 
Bool_t clone () const
 Check whether is a clone or not. More...
 
LauParametercreateClone (Double_t constFactor=1.0)
 Method to create a clone from the parent parameter using the copy constructor. More...
 
LauParametercreateClone (const TString &newName, Double_t constFactor=1.0)
 Method to create a clone from the parent parameter using the copy constructor and setting a new name. More...
 
void updatePull ()
 Call to update the bias and pull values. More...
 
void randomiseValue ()
 Randomise the value of the parameter (if it is floating). More...
 
void randomiseValue (Double_t minVal, Double_t maxVal)
 Randomise the value of the parameter (if it is floating). More...
 

Protected Member Functions

void checkRange (Double_t val, Double_t minVal, Double_t maxVal)
 Method to check whether value provided is within the range and that the minimum and maximum limits make sense. More...
 
void checkRange ()
 Method to check whether value provided is whithin the range and that the minimum and maximum limits make sense. More...
 
void clone (LauParameter *theparent)
 Mark this as a clone of the given parent. More...
 
LauParameterparent () const
 The parent parameter. More...
 
void wipeClones ()
 Method to clear the clone parameters. More...
 
void updateClones (Bool_t justValue=kFALSE)
 Method to update clone values. More...
 

Private Attributes

TString name_
 The parameter name. More...
 
Double_t value_
 The parameter value. More...
 
Double_t error_
 The error on the parameter. More...
 
Double_t negError_
 The lower error on the parameter. More...
 
Double_t posError_
 The upper error on the parameter. More...
 
Double_t genValue_
 Toy generation value. More...
 
Double_t initValue_
 Initial fit value. More...
 
Double_t minValue_
 Minimum value for the parameter. More...
 
Double_t maxValue_
 Maximum value for the parameter. More...
 
Bool_t fixed_
 Fix/float option for parameter. More...
 
Bool_t firstStage_
 Flag whether it is floated only in the first stage of the fit. More...
 
Bool_t secondStage_
 Flag whether it is floated only in the second stage of the fit. More...
 
Double_t bias_
 Parameter bias. More...
 
Double_t pull_
 Parameter pull. More...
 
Bool_t clone_
 Flag whether the parameter is a clone. More...
 
LauParameterparent_
 The parent parameter. More...
 
std::map< LauParameter
*, Double_t > 
clones_
 The clones of this parameter. More...
 

Friends

class LauFitNtuple
 LauFitNtuple is a friend class. More...
 

Detailed Description

Class for defining the fit parameter objects.

Holds all relevant information for the parameters for both generation and fitting step: current, initial and generated value, maximum and minimum range, error, asymmetric error, fix and float and etc.

Definition at line 31 of file LauParameter.hh.

Constructor & Destructor Documentation

LauParameter::LauParameter ( )

Default constructor.

Definition at line 30 of file LauParameter.cc.

LauParameter::LauParameter ( const TString &  parName)

Constructor for named parameter.

Parameters
[in]parNamethe parameter name

Definition at line 50 of file LauParameter.cc.

LauParameter::LauParameter ( Double_t  parValue)

Constructor for parameter value.

Parameters
[in]parValuethe parameter value

Definition at line 70 of file LauParameter.cc.

LauParameter::LauParameter ( Double_t  parValue,
Double_t  min,
Double_t  max 
)

Constructor double limit parameter.

Parameters
[in]parValuethe parameter value
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter

Definition at line 110 of file LauParameter.cc.

LauParameter::LauParameter ( Double_t  parValue,
Double_t  min,
Double_t  max,
Bool_t  parFixed 
)

Constructor double limit fixed parameter.

Parameters
[in]parValuethe parameter value
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter
[in]parFixedboolean flag to fix or float parameter

Definition at line 152 of file LauParameter.cc.

LauParameter::LauParameter ( Double_t  parValue,
Double_t  parError,
Double_t  min,
Double_t  max 
)

Constructor for double error and limit parameter.

Parameters
[in]parValuethe parameter value
[in]parErrorthe parameter error
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter

Definition at line 131 of file LauParameter.cc.

LauParameter::LauParameter ( const TString &  parName,
Double_t  parValue 
)

Constructor for parameter value and name.

Parameters
[in]parNamethe parameter name
[in]parValuethe parameter value

Definition at line 90 of file LauParameter.cc.

LauParameter::LauParameter ( const TString &  parName,
Double_t  parValue,
Double_t  min,
Double_t  max 
)

Constructor double limit parameter and name.

Parameters
[in]parNamethe parameter name
[in]parValuethe parameter value
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter

Definition at line 173 of file LauParameter.cc.

LauParameter::LauParameter ( const TString &  parName,
Double_t  parValue,
Double_t  min,
Double_t  max,
Bool_t  parFixed 
)

Constructor double limit fixed parameter and name.

Parameters
[in]parNamethe parameter name
[in]parValuethe parameter value
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter
[in]parFixedboolean flag to fix (kTRUE) or float (kFALSE) the parameter

Definition at line 194 of file LauParameter.cc.

LauParameter::LauParameter ( const TString &  parName,
Double_t  parValue,
Double_t  parError,
Double_t  min,
Double_t  max 
)

Constructor double error and limit parameter and name.

Parameters
[in]parNamethe parameter name
[in]parValuethe parameter value
[in]parErrorthe parameter error
[in]minthe minimum value of the parameter
[in]maxthe maximum value of the parameter

Definition at line 215 of file LauParameter.cc.

virtual LauParameter::~LauParameter ( )
inlinevirtual

Definition at line 112 of file LauParameter.hh.

LauParameter::LauParameter ( const LauParameter rhs)

Copy constructor.

Parameters
[in]rhsthe parameter to be copied

Definition at line 236 of file LauParameter.cc.

Member Function Documentation

Double_t LauParameter::bias ( ) const
inline

The bias in the parameter.

Returns
the bias in the parameter, defined as the difference between the value and the generated value

Definition at line 210 of file LauParameter.hh.

void LauParameter::checkRange ( Double_t  val,
Double_t  minVal,
Double_t  maxVal 
)
protected

Method to check whether value provided is within the range and that the minimum and maximum limits make sense.

Parameters
[in]valthe value of the parameter
[in]minValthe minimum value allowed
[in]maxValthe maximum value allowed

Definition at line 463 of file LauParameter.cc.

void LauParameter::checkRange ( )
inlineprotected

Method to check whether value provided is whithin the range and that the minimum and maximum limits make sense.

Definition at line 409 of file LauParameter.hh.

Bool_t LauParameter::clone ( ) const
inline

Check whether is a clone or not.

Returns
true/false whether is a clone

Definition at line 362 of file LauParameter.hh.

void LauParameter::clone ( LauParameter theparent)
inlineprotected

Mark this as a clone of the given parent.

Parameters
theparentthe parent parameter

Definition at line 418 of file LauParameter.hh.

LauParameter * LauParameter::createClone ( Double_t  constFactor = 1.0)

Method to create a clone from the parent parameter using the copy constructor.

Parameters
[in]constFactorthe optional constant factor by which the clone shold be multiplied
Returns
the cloned parameter

Definition at line 498 of file LauParameter.cc.

LauParameter * LauParameter::createClone ( const TString &  newName,
Double_t  constFactor = 1.0 
)

Method to create a clone from the parent parameter using the copy constructor and setting a new name.

Parameters
[in]newNamethe new name of the cloned parameter
[in]constFactorthe optional constant factor by which the clone shold be multiplied
Returns
the cloned parameter

Definition at line 518 of file LauParameter.cc.

Double_t LauParameter::error ( ) const
inline

The error on the parameter.

Returns
the error on the parameter

Definition at line 144 of file LauParameter.hh.

void LauParameter::error ( Double_t  newError)

Set the error on the parameter.

Parameters
[in]newErrorthe error on the parameter

Definition at line 276 of file LauParameter.cc.

void LauParameter::errors ( Double_t  newError,
Double_t  newNegError,
Double_t  newPosError 
)

Set the error values on the parameter.

Parameters
[in]newErrorthe error on the parameter
[in]newNegErrorthe lower error on the parameter
[in]newPosErrorthe upper error on the parameter

Definition at line 300 of file LauParameter.cc.

Bool_t LauParameter::firstStage ( ) const
inline

Check whether the parameter should be floated only in the first stage of a two stage fit.

Returns
the boolean flag true/false whether it floats only in the first stage

Definition at line 198 of file LauParameter.hh.

void LauParameter::firstStage ( Bool_t  firstStagePar)

Set parameter as first-stage or not of the fit.

Parameters
[in]firstStageParboolean flag to check whether is a first-stage parameter

Definition at line 384 of file LauParameter.cc.

Bool_t LauParameter::fixed ( ) const
inline

Check whether the parameter is fixed or floated.

Returns
the boolean flag true/false whether the parameter is fixed

Definition at line 192 of file LauParameter.hh.

void LauParameter::fixed ( Bool_t  parFixed)

Fix or float the given parameter.

Parameters
[in]parFixedboolean flag to fix or float the parameter

Definition at line 376 of file LauParameter.cc.

Double_t LauParameter::genValue ( ) const
inline

The value generated for the parameter.

Returns
the value generated for the parameter

Definition at line 162 of file LauParameter.hh.

void LauParameter::genValue ( Double_t  newGenValue)

Set the generated value for the parameter.

Parameters
[in]newGenValuethe generated value for the parameter

Definition at line 321 of file LauParameter.cc.

Double_t LauParameter::initValue ( ) const
inline

The initial value of the parameter.

Returns
the initial value of the parameter given to the fitter

Definition at line 168 of file LauParameter.hh.

void LauParameter::initValue ( Double_t  newInitValue)

Set the inital value for the parameter.

Parameters
[in]newInitValuethe initial value for the parameter

Definition at line 329 of file LauParameter.cc.

Double_t LauParameter::maxValue ( ) const
inline

The maximum value allowed for the parameter.

Returns
the maximum value allowed for the parameter

Definition at line 180 of file LauParameter.hh.

void LauParameter::maxValue ( Double_t  newMaxValue)

Set the maximum value for the parameter.

Parameters
[in]newMaxValuethe maximum value for the parameter

Definition at line 345 of file LauParameter.cc.

Double_t LauParameter::minValue ( ) const
inline

The minimum value allowed for the parameter.

Returns
the minimum value allowed for the parameter

Definition at line 174 of file LauParameter.hh.

void LauParameter::minValue ( Double_t  newMinValue)

Set the minimum value for the parameter.

Parameters
[in]newMinValuethe minimum value for the parameter

Definition at line 337 of file LauParameter.cc.

const TString& LauParameter::name ( ) const
inline

The parameter name.

Returns
the name of the parameter

Definition at line 132 of file LauParameter.hh.

void LauParameter::name ( const TString &  newName)

Set the parameter name.

Parameters
[in]newNamethe name of the parameter

Definition at line 369 of file LauParameter.cc.

Double_t LauParameter::negError ( ) const
inline

The lower error on the parameter.

Returns
the lower error on the parameter

Definition at line 150 of file LauParameter.hh.

void LauParameter::negError ( Double_t  newNegError)

Set the lower error on the parameter.

Parameters
[in]newNegErrorthe lower error on the parameter

Definition at line 284 of file LauParameter.cc.

LauParameter & LauParameter::operator*= ( Double_t  val)

Multiplication assignment operator.

Parameters
[in]valthe value this one is to be multiplied by

Definition at line 427 of file LauParameter.cc.

LauParameter & LauParameter::operator+= ( Double_t  val)

Addition assignment operator.

Parameters
[in]valthe value to be added to this one

Definition at line 409 of file LauParameter.cc.

LauParameter & LauParameter::operator-= ( Double_t  val)

Subtraction assignment operator.

Parameters
[in]valthe value to be subtracted from this one

Definition at line 418 of file LauParameter.cc.

LauParameter & LauParameter::operator/= ( Double_t  val)

Division assignment operator.

Parameters
[in]valthe value this one one is to be divided by

Definition at line 436 of file LauParameter.cc.

LauParameter & LauParameter::operator= ( const LauParameter rhs)

Copy assignment operator.

Parameters
[in]rhsthe parameter to be copied

Definition at line 250 of file LauParameter.cc.

LauParameter & LauParameter::operator= ( Double_t  val)

Basic assignment.

Parameters
[in]valvalue to be assigned

Definition at line 400 of file LauParameter.cc.

LauParameter* LauParameter::parent ( ) const
inlineprotected

The parent parameter.

Returns
the parent parameter

Definition at line 427 of file LauParameter.hh.

Double_t LauParameter::posError ( ) const
inline

The upper error on the parameter.

Returns
the upper error on the parameter

Definition at line 156 of file LauParameter.hh.

void LauParameter::posError ( Double_t  newPosError)

Set the upper error on the parameter.

Parameters
[in]newPosErrorthe upper error on the parameter

Definition at line 292 of file LauParameter.cc.

Double_t LauParameter::pull ( ) const
inline

The pull value for the parameter.

Returns
the pull value for the parameter, defined as the bias divided by the error

Definition at line 216 of file LauParameter.hh.

void LauParameter::randomiseValue ( )

Randomise the value of the parameter (if it is floating).

The pre-defined parameter range is used as the randomisation range.

Definition at line 551 of file LauParameter.cc.

void LauParameter::randomiseValue ( Double_t  minVal,
Double_t  maxVal 
)

Randomise the value of the parameter (if it is floating).

Use the given range unless either of the given values are outside the range of the parameter, in which case that value will be altered to the current max or min.

Parameters
[in]minValthe minimum value for the parameter
[in]maxValthe maximum value for the parameter

Definition at line 556 of file LauParameter.cc.

Double_t LauParameter::range ( ) const
inline

The range allowed for the parameter.

Returns
the range allowed for the parameters, defined as the difference between the max and min value

Definition at line 186 of file LauParameter.hh.

void LauParameter::range ( Double_t  newMinValue,
Double_t  newMaxValue 
)

Set the range for the parameter.

Parameters
[in]newMinValuethe minimum value for the parameter
[in]newMaxValuethe maximum value for the parameter

Definition at line 353 of file LauParameter.cc.

Bool_t LauParameter::secondStage ( ) const
inline

Check whether the parameter should be floated only in the second stage of a two stage fit.

Returns
the boolean flag true/false whether it floats only in the second stage

Definition at line 204 of file LauParameter.hh.

void LauParameter::secondStage ( Bool_t  secondStagePar)

Set parameter as second-stage or not of the fit.

Parameters
[in]secondStageParboolean flag to check whether is a second-stage parameter

Definition at line 392 of file LauParameter.cc.

void LauParameter::updateClones ( Bool_t  justValue = kFALSE)
protected

Method to update clone values.

Parameters
[in]justValueboolean flag to determine whether it is necessary to update all the parameter settings or only its value.

Definition at line 528 of file LauParameter.cc.

void LauParameter::updatePull ( )

Call to update the bias and pull values.

Definition at line 445 of file LauParameter.cc.

Double_t LauParameter::value ( ) const
inline

The value of the parameter.

Returns
the value of the parameter

Definition at line 138 of file LauParameter.hh.

void LauParameter::value ( Double_t  newValue)

Set the value of the parameter.

Parameters
[in]newValuethe value of the parameter

Definition at line 268 of file LauParameter.cc.

void LauParameter::valueAndErrors ( Double_t  newValue,
Double_t  newError,
Double_t  newNegError = 0.0,
Double_t  newPosError = 0.0 
)

Set the value and errors on the parameter.

Parameters
[in]newValuethe value of the parameter
[in]newErrorthe error on the parameter
[in]newNegErrorthe lower error on the parameter (default set to zero)
[in]newPosErrorthe upper error on the parameter (default set to zero)

Definition at line 310 of file LauParameter.cc.

void LauParameter::valueAndRange ( Double_t  newValue,
Double_t  newMinValue,
Double_t  newMaxValue 
)

Set the value and range for the parameter.

Parameters
[in]newValuethe value of the parameter
[in]newMinValuethe minimum value for the parameter
[in]newMaxValuethe maximum value for the parameter

Definition at line 361 of file LauParameter.cc.

void LauParameter::wipeClones ( )
inlineprotected

Method to clear the clone parameters.

Definition at line 430 of file LauParameter.hh.

Friends And Related Function Documentation

friend class LauFitNtuple
friend

LauFitNtuple is a friend class.

Definition at line 440 of file LauParameter.hh.

Member Data Documentation

Double_t LauParameter::bias_
private

Parameter bias.

Definition at line 472 of file LauParameter.hh.

Bool_t LauParameter::clone_
private

Flag whether the parameter is a clone.

Definition at line 477 of file LauParameter.hh.

std::map<LauParameter*, Double_t> LauParameter::clones_
private

The clones of this parameter.

Definition at line 482 of file LauParameter.hh.

Double_t LauParameter::error_
private

The error on the parameter.

Definition at line 449 of file LauParameter.hh.

Bool_t LauParameter::firstStage_
private

Flag whether it is floated only in the first stage of the fit.

Definition at line 467 of file LauParameter.hh.

Bool_t LauParameter::fixed_
private

Fix/float option for parameter.

Definition at line 465 of file LauParameter.hh.

Double_t LauParameter::genValue_
private

Toy generation value.

Definition at line 456 of file LauParameter.hh.

Double_t LauParameter::initValue_
private

Initial fit value.

Definition at line 459 of file LauParameter.hh.

Double_t LauParameter::maxValue_
private

Maximum value for the parameter.

Definition at line 463 of file LauParameter.hh.

Double_t LauParameter::minValue_
private

Minimum value for the parameter.

Definition at line 461 of file LauParameter.hh.

TString LauParameter::name_
private

The parameter name.

Definition at line 443 of file LauParameter.hh.

Double_t LauParameter::negError_
private

The lower error on the parameter.

Definition at line 451 of file LauParameter.hh.

LauParameter* LauParameter::parent_
private

The parent parameter.

Definition at line 479 of file LauParameter.hh.

Double_t LauParameter::posError_
private

The upper error on the parameter.

Definition at line 453 of file LauParameter.hh.

Double_t LauParameter::pull_
private

Parameter pull.

Definition at line 474 of file LauParameter.hh.

Bool_t LauParameter::secondStage_
private

Flag whether it is floated only in the second stage of the fit.

Definition at line 469 of file LauParameter.hh.

Double_t LauParameter::value_
private

The parameter value.

Definition at line 446 of file LauParameter.hh.


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