laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsFitter.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2013 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
36 #ifndef LAU_ABS_FITTER
37 #define LAU_ABS_FITTER
38 
39 #include <vector>
40 
41 #include "Rtypes.h"
42 #include "TMatrixDfwd.h"
43 
44 class LauFitObject;
45 class LauParameter;
46 
47 
48 class LauAbsFitter {
49 
50  public:
55  struct FitStatus {
57  Int_t status;
59  Double_t NLL;
61  Double_t EDM;
62  };
63 
65  virtual ~LauAbsFitter() {}
66 
68 
72  virtual void initialise( LauFitObject* fitObj, const std::vector<LauParameter*>& parameters ) = 0;
73 
75  virtual LauFitObject* getFitObject() =0;
76 
78  virtual UInt_t nParameters() const = 0;
79 
81  virtual UInt_t nFreeParameters() const = 0;
82 
84  virtual Bool_t twoStageFit() const = 0;
85 
87 
97  virtual void twoStageFit(Bool_t doTwoStageFit) = 0;
98 
100  virtual Bool_t useAsymmFitErrors() const = 0;
101 
103 
106  virtual void useAsymmFitErrors(Bool_t useAsymmErrors) = 0;
107 
109 
112  virtual const FitStatus& minimise() = 0;
113 
115  virtual void fixSecondStageParameters() = 0;
116 
118  virtual void releaseSecondStageParameters() = 0;
119 
121  virtual void updateParameters() = 0;
122 
124  virtual const TMatrixD& covarianceMatrix() const = 0;
125 
126  protected:
129 
130  private:
132  LauAbsFitter( const LauAbsFitter& );
133 
135  LauAbsFitter& operator=( const LauAbsFitter& rhs );
136 
138 };
139 
140 #endif
141 
virtual const FitStatus & minimise()=0
Perform the minimisation of the fit function.
Double_t EDM
The estimated distance to the minimum.
Definition: LauAbsFitter.hh:61
virtual void updateParameters()=0
Update the values and errors of the parameters based on the fit minimum.
virtual ~LauAbsFitter()
Destructor.
Definition: LauAbsFitter.hh:65
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:48
Double_t NLL
The negative log-likelihood.
Definition: LauAbsFitter.hh:59
Int_t status
The status code of the fit.
Definition: LauAbsFitter.hh:57
Struct to store fit status information.
Definition: LauAbsFitter.hh:55
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:49
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:44
virtual const TMatrixD & covarianceMatrix() const =0
Retrieve the fit covariance matrix.
LauAbsFitter & operator=(const LauAbsFitter &rhs)
Copy assignment operator - private and not implemented.