laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFormulaPar.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2013 - 2014.
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 
23 #ifndef LAU_FORMULAPAR
24 #define LAU_FORMULAPAR
25 
26 #include <map>
27 #include <vector>
28 
29 #include "TString.h"
30 #include "TFormula.h"
31 #include "LauAbsRValue.hh"
32 #include "LauParameter.hh"
33 
34 
35 class LauFormulaPar : public LauAbsRValue {
36 
37  public:
39 
44  LauFormulaPar(const TString& forName, const TString& formula, const std::vector<LauParameter*>& params);
45 
46  // Destructor
47  virtual ~LauFormulaPar();
48 
50  LauFormulaPar(const LauFormulaPar& rhs);
51 
54 
56 
59  Double_t value() const;
60 
62 
65  inline const TString& name() const {return name_;}
66 
68 
71  std::vector<LauParameter*> getPars() {return paramVec_;}
72 
74 
77  inline Bool_t isLValue() const {return kFALSE;}
78 
80 
83  Bool_t fixed() const;
84 
86 
89  inline Bool_t gaussConstraint() const {return gaussConstraint_;}
90 
92 
95  inline Double_t constraintMean() const {return constraintMean_;}
96 
98 
101  inline Double_t constraintWidth() const {return constraintWidth_;}
102 
104 
108  void addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth);
109 
112 
113  protected:
114 
115  private:
117  TString name_;
118 
120  mutable TFormula formula_;
121 
123  std::vector<LauParameter*> paramVec_;
124 
126  Double_t* dummy_;
128  Double_t* paramArray_;
129 
133  Double_t constraintMean_;
136 
137  ClassDef(LauFormulaPar, 0)
138 
139 };
140 
141 #endif
Double_t constraintMean() const
The mean of the Gaussian constraint.
Class for defining combinations of fit parameter objects.
virtual ~LauFormulaPar()
const TString & name() const
The parameter name.
std::vector< LauParameter * > paramVec_
Vector of LauParameters in the formula.
LauFormulaPar(const TString &forName, const TString &formula, const std::vector< LauParameter * > &params)
Constructor.
Bool_t fixed() const
Boolean to say if the LauFormulaPar is fixed.
Bool_t gaussConstraint() const
Check whether a Gaussian constraints is applied.
TString name_
The parameter name.
TFormula formula_
The formula.
void addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth)
Add a Gaussian constraint (or modify an existing one)
Double_t * dummy_
Array.
File containing declaration of LauAbsRValue class.
File containing declaration of LauParameter class.
Double_t constraintMean_
Mean value of the Gaussian constraint.
Double_t * paramArray_
Array.
std::vector< LauParameter * > getPars()
Get the LauParameters used in LauFormulaPar.
Double_t constraintWidth_
Width of the Gaussian constraint.
Bool_t gaussConstraint_
Choice to use Gaussian constraint.
Bool_t isLValue() const
Boolean to say it is not an L value.
void removeGaussianConstraint()
Remove the Gaussian constraint.
LauFormulaPar & operator=(const LauFormulaPar &rhs)
Copy assignment operator.
Double_t constraintWidth() const
The width of the Gaussian constraint.
Pure abstract base class for defining a parameter containing an R value.
Definition: LauAbsRValue.hh:29
Double_t value() const
Return the value of the LauFormalaPar.