laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauFormulaPar.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2014 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 
37 #ifndef LAU_FORMULAPAR
38 #define LAU_FORMULAPAR
39 
40 #include <map>
41 #include <vector>
42 
43 #include "TString.h"
44 #include "TFormula.h"
45 #include "LauAbsRValue.hh"
46 #include "LauParameter.hh"
47 
48 
49 class LauFormulaPar : public LauAbsRValue {
50 
51  public:
53 
58  LauFormulaPar(const TString& forName, const TString& formula, const std::vector<LauParameter*>& params);
59 
60  // Destructor
61  virtual ~LauFormulaPar();
62 
64  LauFormulaPar(const LauFormulaPar& rhs);
65 
68 
70 
73  Double_t value() const;
74 
76 
79  Double_t unblindValue() const;
80 
82 
85  Double_t genValue() const;
86 
88 
91  Double_t initValue() const;
92 
94 
97  inline const TString& name() const {return name_;}
98 
100 
103  inline void name(const TString& newName) {name_ = newName;};
104 
106 
109  std::vector<LauParameter*> getPars() {return paramVec_;}
110 
112 
115  inline Bool_t isLValue() const {return kFALSE;}
116 
118 
121  Bool_t fixed() const;
122 
124 
127  Bool_t blind() const;
128 
130 
133  inline Bool_t gaussConstraint() const {return gaussConstraint_;}
134 
136 
139  inline Double_t constraintMean() const {return constraintMean_;}
140 
142 
145  inline Double_t constraintWidth() const {return constraintWidth_;}
146 
148 
152  void addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth);
153 
156 
157  protected:
158 
159  private:
161  TString name_;
162 
164  mutable TFormula formula_;
165 
167  std::vector<LauParameter*> paramVec_;
168 
170  Double_t* dummy_;
172  Double_t* paramArray_;
173 
177  Double_t constraintMean_;
180 
181  ClassDef(LauFormulaPar, 0)
182 
183 };
184 
185 #endif
Double_t constraintMean() const
The mean of the Gaussian constraint.
Double_t initValue() const
The initial value of the parameter.
Double_t unblindValue() const
The unblinded value of the parameter.
Bool_t blind() const
The blinding state.
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.
void name(const TString &newName)
Set the parameter name.
File containing declaration of LauAbsRValue class.
File containing declaration of LauParameter class.
Double_t constraintMean_
Mean value of the Gaussian constraint.
Double_t genValue() const
The value generated for the parameter.
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:43
Double_t value() const
Return the value of the LauFormalaPar.