laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
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 "Rtypes.h"
40 #include "TMatrixDfwd.h"
41 
42 #include <vector>
43 
44 class LauFitObject;
45 class LauParameter;
46 
47 class LauAbsFitter {
48 
49  public:
54  struct FitStatus {
56  Int_t status;
58  Double_t NLL;
60  Double_t EDM;
61  };
62 
64  virtual ~LauAbsFitter() = default;
65 
67 
71  virtual void initialise( LauFitObject* fitObj, const std::vector<LauParameter*>& parameters ) = 0;
72 
74  virtual LauFitObject* getFitObject() = 0;
75 
77  virtual UInt_t nParameters() const = 0;
78 
80  virtual UInt_t nFreeParameters() const = 0;
81 
83  virtual Bool_t twoStageFit() const = 0;
84 
86 
96  virtual void twoStageFit( Bool_t doTwoStageFit ) = 0;
97 
99  virtual Bool_t useAsymmFitErrors() const = 0;
100 
102 
105  virtual void useAsymmFitErrors( Bool_t useAsymmErrors ) = 0;
106 
108 
111  virtual const FitStatus& minimise() = 0;
112 
114  virtual void fixSecondStageParameters() = 0;
115 
117  virtual void releaseSecondStageParameters() = 0;
118 
120  virtual void updateParameters() = 0;
121 
123  virtual const TMatrixD& covarianceMatrix() const = 0;
124 
125  protected:
127  LauAbsFitter() = default;
128 
129  private:
131  LauAbsFitter( const LauAbsFitter& ) = delete;
132 
134  LauAbsFitter( LauAbsFitter&& ) = delete;
135 
137  LauAbsFitter& operator=( const LauAbsFitter& rhs ) = delete;
138 
140  LauAbsFitter& operator=( LauAbsFitter&& rhs ) = delete;
141 
142  ClassDef( LauAbsFitter, 0 );
143 };
144 
145 #endif
virtual ~LauAbsFitter()=default
Destructor.
virtual void fixSecondStageParameters()=0
Fix parameters marked as "second stage".
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
Struct to store fit status information.
Definition: LauAbsFitter.hh:54
LauAbsFitter & operator=(LauAbsFitter &&rhs)=delete
Move assignment operator - private and not implemented.
LauAbsFitter & operator=(const LauAbsFitter &rhs)=delete
Copy assignment operator - private and not implemented.
LauAbsFitter()=default
Constructor.
virtual void twoStageFit(Bool_t doTwoStageFit)=0
Turn on or off the two stage fit.
virtual Bool_t useAsymmFitErrors() const =0
Determine whether calculation of asymmetric errors is enabled.
virtual Bool_t twoStageFit() const =0
Determine whether the two-stage fit is enabled.
virtual UInt_t nParameters() const =0
Get the total number of fit parameters.
The abstract interface to the fitter.
Definition: LauAbsFitter.hh:47
virtual const FitStatus & minimise()=0
Perform the minimisation of the fit function.
virtual const TMatrixD & covarianceMatrix() const =0
Retrieve the fit covariance matrix.
virtual LauFitObject * getFitObject()=0
Get the object that controls the calculation of the likelihood.
LauAbsFitter(const LauAbsFitter &)=delete
Copy constructor - private and not implemented.
Double_t NLL
The negative log-likelihood.
Definition: LauAbsFitter.hh:58
virtual void useAsymmFitErrors(Bool_t useAsymmErrors)=0
Turn on or off the computation of asymmetric errors (e.g. MINOS routine in Minuit)
The abstract interface for the objects that control the calculation of the likelihood.
Definition: LauFitObject.hh:47
Double_t EDM
The estimated distance to the minimum.
Definition: LauAbsFitter.hh:60
virtual void initialise(LauFitObject *fitObj, const std::vector< LauParameter * > &parameters)=0
Initialise the fitter, setting the information on the parameters.
virtual UInt_t nFreeParameters() const =0
Get the number of floating fit parameters.
Int_t status
The status code of the fit.
Definition: LauAbsFitter.hh:56
LauAbsFitter(LauAbsFitter &&)=delete
Move constructor - private and not implemented.
virtual void releaseSecondStageParameters()=0
Release parameters marked as "second stage".
virtual void updateParameters()=0
Update the values and errors of the parameters based on the fit minimum.