laura is hosted by Hepforge, IPPP Durham
Laura++  v3r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsFitter.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2013 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
22 #ifndef LAU_ABS_FITTER
23 #define LAU_ABS_FITTER
24 
25 #include <vector>
26 
27 #include "Rtypes.h"
28 #include "TMatrixDfwd.h"
29 
30 class LauFitObject;
31 class LauParameter;
32 
33 
34 class LauAbsFitter {
35 
36  public:
41  struct FitStatus {
43  Int_t status;
45  Double_t NLL;
47  Double_t EDM;
48  };
49 
51  virtual ~LauAbsFitter() {}
52 
54 
58  virtual void initialise( LauFitObject* fitObj, const std::vector<LauParameter*>& parameters ) = 0;
59 
61  virtual LauFitObject* getFitObject() =0;
62 
64  virtual UInt_t nParameters() const = 0;
65 
67  virtual UInt_t nFreeParameters() const = 0;
68 
70  virtual Bool_t twoStageFit() const = 0;
71 
73 
83  virtual void twoStageFit(Bool_t doTwoStageFit) = 0;
84 
86  virtual Bool_t useAsymmFitErrors() const = 0;
87 
89 
92  virtual void useAsymmFitErrors(Bool_t useAsymmErrors) = 0;
93 
95 
98  virtual const FitStatus& minimise() = 0;
99 
101  virtual void fixSecondStageParameters() = 0;
102 
104  virtual void releaseSecondStageParameters() = 0;
105 
107  virtual void updateParameters() = 0;
108 
110  virtual const TMatrixD& covarianceMatrix() const = 0;
111 
112  protected:
115 
116  private:
118  LauAbsFitter( const LauAbsFitter& );
119 
121  LauAbsFitter& operator=( const LauAbsFitter& rhs );
122 
124 };
125 
126 #endif
127 
virtual const FitStatus & minimise()=0
Perform the minimisation of the fit function.
Double_t EDM
The estimated distance to the minimum.
Definition: LauAbsFitter.hh:47
virtual void updateParameters()=0
Update the values and errors of the parameters based on the fit minimum.
virtual ~LauAbsFitter()
Destructor.
Definition: LauAbsFitter.hh:51
virtual Bool_t twoStageFit() const =0
Determine whether the two-stage fit is enabled.
ClassDef(LauAbsFitter, 0)
virtual void initialise(LauFitObject *fitObj, const std::vector< LauParameter * > &parameters)=0
Initialise the fitter, setting the information on the parameters.
The abstract interface to the fitter.
Definition: LauAbsFitter.hh:34
Double_t NLL
The negative log-likelihood.
Definition: LauAbsFitter.hh:45
Int_t status
The status code of the fit.
Definition: LauAbsFitter.hh:43
Struct to store fit status information.
Definition: LauAbsFitter.hh:41
virtual UInt_t nParameters() const =0
Get the total number of fit parameters.
virtual void releaseSecondStageParameters()=0
Release parameters marked as &quot;second stage&quot;.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:35
virtual void fixSecondStageParameters()=0
Fix parameters marked as &quot;second stage&quot;.
virtual LauFitObject * getFitObject()=0
Get the object that controls the calculation of the likelihood.
virtual UInt_t nFreeParameters() const =0
Get the number of floating fit parameters.
virtual Bool_t useAsymmFitErrors() const =0
Determine whether calculation of asymmetric errors is enabled.
LauAbsFitter()
Constructor.
The abstract interface for the objects that control the calculation of the likelihood.
Definition: LauFitObject.hh:30
virtual const TMatrixD & covarianceMatrix() const =0
Retrieve the fit covariance matrix.
LauAbsFitter & operator=(const LauAbsFitter &rhs)
Copy assignment operator - private and not implemented.