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

The abstract interface for the objects that control the calculation of the likelihood. More...

#include <LauFitObject.hh>

Inheritance diagram for LauFitObject:
LauSimFitMaster LauSimFitSlave LauAbsFitModel LauRooFitSlave LauCPFitModel LauSimpleFitModel

Classes

struct  StoreConstraints
 Struct to store constraint information until the fit is run. More...
 

Public Member Functions

virtual ~LauFitObject ()
 Destructor. More...
 
void useAsymmFitErrors (Bool_t useAsymmErrors)
 Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit) More...
 
Bool_t useAsymmFitErrors () const
 Report whether or not calculation of asymmetric errors is enabled. More...
 
void twoStageFit (Bool_t doTwoStageFit)
 Turn on or off the two stage fit. More...
 
Bool_t twoStageFit () const
 Report whether the two-stage fit is enabled. More...
 
virtual void withinAsymErrorCalc (const Bool_t inAsymErrCalc)
 Mark that the fit is calculating asymmetric errors. More...
 
Bool_t withinAsymErrorCalc () const
 Query whether the fit is calculating the asymmetric errors. More...
 
void setNExpts (UInt_t nExperiments, UInt_t firstExperiment=0)
 Set the number of experiments and the first experiment. More...
 
UInt_t eventsPerExpt () const
 Obtain the total number of events in the current experiment. More...
 
UInt_t nExpt () const
 Obtain the number of experiments. More...
 
UInt_t firstExpt () const
 Obtain the number of the first experiment. More...
 
UInt_t iExpt () const
 Obtain the number of the current experiment. More...
 
virtual void setParsFromMinuit (Double_t *par, Int_t npar)=0
 This function sets the parameter values from Minuit. More...
 
virtual Double_t getTotNegLogLikelihood ()=0
 Calculate the new value of the negative log likelihood. More...
 
virtual void addConstraint (const TString &formula, const std::vector< TString > &pars, const Double_t mean, const Double_t width)
 Store constraint information for fit parameters. More...
 

Protected Member Functions

 LauFitObject ()
 Constructor. More...
 
const std::vector
< StoreConstraints > & 
constraintsStore () const
 Const access to the constraints store. More...
 
std::vector< StoreConstraints > & constraintsStore ()
 Access to the constraints store. More...
 
void resetFitCounters ()
 Reset the good/bad fit counters. More...
 
void setCurrentExperiment (const UInt_t curExpt)
 Set the ID of the current experiment. More...
 
void startNewFit (const UInt_t nPars, const UInt_t nFreePars)
 Indicate the start of a new fit. More...
 
void eventsPerExpt (UInt_t nEvents)
 Set the number of events in the current experiment. More...
 
Double_t worstLogLike () const
 Access the worst log likelihood found so far. More...
 
void worstLogLike (const Double_t newWorstLogLike)
 Set a new value for the worst log likelihood. More...
 
void storeFitStatus (const LauAbsFitter::FitStatus &status, const TMatrixD &covMatrix)
 Store fit status information. More...
 
UInt_t nTotParams () const
 Access the total number of fit parameters. More...
 
UInt_t nFreeParams () const
 Access the total number of fit parameters. More...
 
const LauAbsFitter::FitStatusfitStatus () const
 Access the fit status information. More...
 
Double_t nll () const
 Access the current NLL value. More...
 
Double_t edm () const
 Access the current EDM value. More...
 
Int_t statusCode () const
 Access the fit status code. More...
 
const TMatrixD & covarianceMatrix () const
 Access the fit covariance matrix. More...
 
UInt_t numberOKFits () const
 Access the number of successful fits. More...
 
UInt_t numberBadFits () const
 Access the number of failed fits. More...
 

Private Member Functions

 LauFitObject (const LauFitObject &rhs)
 Copy constructor (not implemented) More...
 
LauFitObjectoperator= (const LauFitObject &rhs)
 Copy assignment operator (not implemented) More...
 

Private Attributes

std::vector< StoreConstraintsstoreCon_
 Store the constraints for fit parameters until initialisation is complete. More...
 
Bool_t twoStageFit_
 Option to perform a two stage fit. More...
 
Bool_t useAsymmFitErrors_
 Option to use asymmetric errors. More...
 
UInt_t nParams_
 The number of fit parameters. More...
 
UInt_t nFreeParams_
 The number of free fit parameters. More...
 
Bool_t withinAsymErrorCalc_
 Flag to indicate if the asymmetric error calculation (e.g. MINOS) is currently running. More...
 
UInt_t firstExpt_
 The number of the first experiment to consider. More...
 
UInt_t nExpt_
 The number of experiments to consider. More...
 
UInt_t iExpt_
 The current experiment number. More...
 
UInt_t evtsPerExpt_
 The number of events in the current experiment. More...
 
LauAbsFitter::FitStatus fitStatus_
 The status of the current fit. More...
 
Double_t worstLogLike_
 The worst log likelihood value found so far. More...
 
TMatrixD covMatrix_
 The fit covariance matrix. More...
 
UInt_t numberOKFits_
 The number of successful fits. More...
 
UInt_t numberBadFits_
 The number of fit failures. More...
 

Detailed Description

The abstract interface for the objects that control the calculation of the likelihood.

Definition at line 30 of file LauFitObject.hh.

Constructor & Destructor Documentation

virtual LauFitObject::~LauFitObject ( )
inlinevirtual

Destructor.

Definition at line 34 of file LauFitObject.hh.

LauFitObject::LauFitObject ( )
protected

Constructor.

Definition at line 20 of file LauFitObject.cc.

LauFitObject::LauFitObject ( const LauFitObject rhs)
private

Copy constructor (not implemented)

Member Function Documentation

void LauFitObject::addConstraint ( const TString &  formula,
const std::vector< TString > &  pars,
const Double_t  mean,
const Double_t  width 
)
virtual

Store constraint information for fit parameters.

Parameters
[in]formulathe formula to be used in the LauFormulaPar
[in]parsa vector of LauParameter names to be used in the Formula, in the order specified by the formula
[in]meanthe value of the mean of the Gaussian constraint
[in]widththe value of the width of the Gaussian constraint

Definition at line 77 of file LauFitObject.cc.

const std::vector<StoreConstraints>& LauFitObject::constraintsStore ( ) const
inlineprotected

Const access to the constraints store.

Definition at line 145 of file LauFitObject.hh.

std::vector<StoreConstraints>& LauFitObject::constraintsStore ( )
inlineprotected

Access to the constraints store.

Definition at line 148 of file LauFitObject.hh.

const TMatrixD& LauFitObject::covarianceMatrix ( ) const
inlineprotected

Access the fit covariance matrix.

Definition at line 204 of file LauFitObject.hh.

Double_t LauFitObject::edm ( ) const
inlineprotected

Access the current EDM value.

Definition at line 198 of file LauFitObject.hh.

UInt_t LauFitObject::eventsPerExpt ( ) const
inline

Obtain the total number of events in the current experiment.

Definition at line 87 of file LauFitObject.hh.

void LauFitObject::eventsPerExpt ( UInt_t  nEvents)
inlineprotected

Set the number of events in the current experiment.

Definition at line 167 of file LauFitObject.hh.

UInt_t LauFitObject::firstExpt ( ) const
inline

Obtain the number of the first experiment.

Definition at line 93 of file LauFitObject.hh.

const LauAbsFitter::FitStatus& LauFitObject::fitStatus ( ) const
inlineprotected

Access the fit status information.

Definition at line 192 of file LauFitObject.hh.

virtual Double_t LauFitObject::getTotNegLogLikelihood ( )
pure virtual

Calculate the new value of the negative log likelihood.

This function has to be public since it is called from the global FCN. It should not be called otherwise!

Implemented in LauAbsFitModel, LauSimFitMaster, LauSimFitSlave, and LauRooFitSlave.

UInt_t LauFitObject::iExpt ( ) const
inline

Obtain the number of the current experiment.

Definition at line 96 of file LauFitObject.hh.

UInt_t LauFitObject::nExpt ( ) const
inline

Obtain the number of experiments.

Definition at line 90 of file LauFitObject.hh.

UInt_t LauFitObject::nFreeParams ( ) const
inlineprotected

Access the total number of fit parameters.

Definition at line 189 of file LauFitObject.hh.

Double_t LauFitObject::nll ( ) const
inlineprotected

Access the current NLL value.

Definition at line 195 of file LauFitObject.hh.

UInt_t LauFitObject::nTotParams ( ) const
inlineprotected

Access the total number of fit parameters.

Definition at line 186 of file LauFitObject.hh.

UInt_t LauFitObject::numberBadFits ( ) const
inlineprotected

Access the number of failed fits.

Definition at line 210 of file LauFitObject.hh.

UInt_t LauFitObject::numberOKFits ( ) const
inlineprotected

Access the number of successful fits.

Definition at line 207 of file LauFitObject.hh.

LauFitObject& LauFitObject::operator= ( const LauFitObject rhs)
private

Copy assignment operator (not implemented)

void LauFitObject::resetFitCounters ( )
protected

Reset the good/bad fit counters.

Definition at line 39 of file LauFitObject.cc.

void LauFitObject::setCurrentExperiment ( const UInt_t  curExpt)
inlineprotected

Set the ID of the current experiment.

Parameters
[in]curExptthe experiment number

Definition at line 157 of file LauFitObject.hh.

void LauFitObject::setNExpts ( UInt_t  nExperiments,
UInt_t  firstExperiment = 0 
)
inline

Set the number of experiments and the first experiment.

Parameters
[in]nExperimentsthe number of experiments
[in]firstExperimentthe number of the first experiment

Definition at line 81 of file LauFitObject.hh.

virtual void LauFitObject::setParsFromMinuit ( Double_t *  par,
Int_t  npar 
)
pure virtual

This function sets the parameter values from Minuit.

This function has to be public since it is called from the global FCN. It should not be called otherwise!

Parameters
[in]paran array storing the various parameter values
[in]nparthe number of free parameters

Implemented in LauAbsFitModel, LauSimFitMaster, LauSimFitSlave, and LauRooFitSlave.

void LauFitObject::startNewFit ( const UInt_t  nPars,
const UInt_t  nFreePars 
)
protected

Indicate the start of a new fit.

Parameters
[in]nParsthe total number of fit parameters
[in]nFreeParsthe number of free fit parameters

Definition at line 46 of file LauFitObject.cc.

Int_t LauFitObject::statusCode ( ) const
inlineprotected

Access the fit status code.

Definition at line 201 of file LauFitObject.hh.

void LauFitObject::storeFitStatus ( const LauAbsFitter::FitStatus status,
const TMatrixD &  covMatrix 
)
protected

Store fit status information.

Parameters
[in]statusthe status information of the fit
[in]covMatrixthe fit covariance matrix

Definition at line 56 of file LauFitObject.cc.

void LauFitObject::twoStageFit ( Bool_t  doTwoStageFit)
inline

Turn on or off the two stage fit.

The two-stage fit allows certain parameters to be fixed in one stage and floated in another stage of the fit. Can be used, for example, in a CP fit where the CP-parameters are fixed to zero in the first stage (while the CP-average parameters are determined), then floated in the second.

Parameters
[in]doTwoStageFitboolean specifying whether or not the two-stage fit should be enabled

Definition at line 56 of file LauFitObject.hh.

Bool_t LauFitObject::twoStageFit ( ) const
inline

Report whether the two-stage fit is enabled.

Definition at line 59 of file LauFitObject.hh.

void LauFitObject::useAsymmFitErrors ( Bool_t  useAsymmErrors)
inline

Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit)

Parameters
[in]useAsymmErrorsboolean specifying whether or not the computation of asymmetric errors is enabled

Definition at line 40 of file LauFitObject.hh.

Bool_t LauFitObject::useAsymmFitErrors ( ) const
inline

Report whether or not calculation of asymmetric errors is enabled.

Definition at line 43 of file LauFitObject.hh.

virtual void LauFitObject::withinAsymErrorCalc ( const Bool_t  inAsymErrCalc)
inlinevirtual

Mark that the fit is calculating asymmetric errors.

This is called by the fitter interface to mark when entering and exiting the asymmetric error calculation.

Parameters
[in]inAsymErrCalcboolean marking that the fit is calculating the asymmetric errors

Reimplemented in LauSimFitMaster.

Definition at line 68 of file LauFitObject.hh.

Bool_t LauFitObject::withinAsymErrorCalc ( ) const
inline

Query whether the fit is calculating the asymmetric errors.

Returns
kTRUE if the fit is calculating the asymmetric errors, kFALSE otherwise

Definition at line 74 of file LauFitObject.hh.

Double_t LauFitObject::worstLogLike ( ) const
inlineprotected

Access the worst log likelihood found so far.

Definition at line 170 of file LauFitObject.hh.

void LauFitObject::worstLogLike ( const Double_t  newWorstLogLike)
inlineprotected

Set a new value for the worst log likelihood.

Parameters
[in]newWorstLogLikethe new value of the worst log likelihood

Definition at line 176 of file LauFitObject.hh.

Member Data Documentation

TMatrixD LauFitObject::covMatrix_
private

The fit covariance matrix.

Definition at line 256 of file LauFitObject.hh.

UInt_t LauFitObject::evtsPerExpt_
private

The number of events in the current experiment.

Definition at line 247 of file LauFitObject.hh.

UInt_t LauFitObject::firstExpt_
private

The number of the first experiment to consider.

Definition at line 238 of file LauFitObject.hh.

LauAbsFitter::FitStatus LauFitObject::fitStatus_
private

The status of the current fit.

Definition at line 250 of file LauFitObject.hh.

UInt_t LauFitObject::iExpt_
private

The current experiment number.

Definition at line 244 of file LauFitObject.hh.

UInt_t LauFitObject::nExpt_
private

The number of experiments to consider.

Definition at line 241 of file LauFitObject.hh.

UInt_t LauFitObject::nFreeParams_
private

The number of free fit parameters.

Definition at line 232 of file LauFitObject.hh.

UInt_t LauFitObject::nParams_
private

The number of fit parameters.

Definition at line 229 of file LauFitObject.hh.

UInt_t LauFitObject::numberBadFits_
private

The number of fit failures.

Definition at line 262 of file LauFitObject.hh.

UInt_t LauFitObject::numberOKFits_
private

The number of successful fits.

Definition at line 259 of file LauFitObject.hh.

std::vector<StoreConstraints> LauFitObject::storeCon_
private

Store the constraints for fit parameters until initialisation is complete.

Definition at line 220 of file LauFitObject.hh.

Bool_t LauFitObject::twoStageFit_
private

Option to perform a two stage fit.

Definition at line 223 of file LauFitObject.hh.

Bool_t LauFitObject::useAsymmFitErrors_
private

Option to use asymmetric errors.

Definition at line 226 of file LauFitObject.hh.

Bool_t LauFitObject::withinAsymErrorCalc_
private

Flag to indicate if the asymmetric error calculation (e.g. MINOS) is currently running.

Definition at line 235 of file LauFitObject.hh.

Double_t LauFitObject::worstLogLike_
private

The worst log likelihood value found so far.

Definition at line 253 of file LauFitObject.hh.


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