laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsCoeffSet.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2006 - 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_COEFF_SET
23 #define LAU_ABS_COEFF_SET
24 
25 #include <iosfwd>
26 #include <vector>
27 
28 #include "TString.h"
29 
30 class LauComplex;
31 class LauParameter;
32 
33 
35 
36  public:
38  enum CloneOption {
39  All,
45  };
46 
48  virtual ~LauAbsCoeffSet(){}
49 
51 
54  virtual std::vector<LauParameter*> getParameters() = 0;
55 
57  virtual void printParValues() const = 0;
58 
60 
63  virtual void printTableHeading(std::ostream& stream) const = 0;
64 
66 
69  virtual void printTableRow(std::ostream& stream) const = 0;
70 
72  virtual void randomiseInitValues() = 0;
73 
75  virtual void finaliseValues() = 0;
76 
78 
81  virtual const LauComplex& particleCoeff() = 0;
82 
84 
87  virtual const LauComplex& antiparticleCoeff() = 0;
88 
90 
95  virtual void setCoeffValues( const LauComplex& coeff, const LauComplex& coeffBar, Bool_t init ) = 0;
96 
98 
101  virtual LauParameter acp() = 0;
102 
104 
110  virtual LauAbsCoeffSet* createClone(const TString& newName, CloneOption cloneOption = All, Double_t constFactor = 1.0) = 0;
111 
113 
117  virtual TString name() const {return name_;}
118 
120 
124  virtual void name(const TString& theName) {name_ = theName;}
125 
127 
132  virtual const TString& baseName() const {return basename_;}
133 
135 
140  virtual void baseName(const TString& theBasename) {basename_ = theBasename;}
141 
143 
146  virtual UInt_t index() const {return index_;}
147 
149 
152  virtual void index(UInt_t newIndex);
153 
155 
160  virtual void setParameterValue(const TString& parName, Double_t value, Bool_t init);
161 
163 
166  virtual void fixParameter(const TString& parName);
167 
169 
172  virtual void floatParameter(const TString& parName);
173 
175 
179  static void setMagnitudeRange(Double_t minMag, Double_t maxMag) { minMagnitude_ = minMag; maxMagnitude_ = maxMag; }
180 
182 
186  static void setPhaseRange(Double_t minPhase, Double_t maxPhase) { minPhase_ = minPhase; maxPhase_ = maxPhase; }
187 
189 
193  static void setRealImagRange(Double_t minPar, Double_t maxPar) { minRealImagPart_ = minPar; maxRealImagPart_ = maxPar; }
194 
196 
200  static void setCPParRange(Double_t minPar, Double_t maxPar) { minDelta_ = minPar; maxDelta_ = maxPar; }
201 
202  protected:
204 
208  LauAbsCoeffSet(const TString& theName, const TString& theBaseName = "A");
209 
211 
215  LauParameter* findParameter(const TString& parName);
216 
218 
221  void adjustName(LauParameter* par);
222 
224  static Double_t minMagnitude_;
226  static Double_t maxMagnitude_;
228  static Double_t minPhase_;
230  static Double_t maxPhase_;
232  static Double_t minRealImagPart_;
234  static Double_t maxRealImagPart_;
236  static Double_t minDelta_;
238  static Double_t maxDelta_;
239 
240  private:
242  TString name_;
243 
245  TString basename_;
246 
248  UInt_t index_;
249 
250  ClassDef(LauAbsCoeffSet, 0)
251 
252 };
253 
254 #endif
virtual void randomiseInitValues()=0
Randomise the starting values of the parameters for a fit.
static Double_t maxPhase_
Maximum allowed value of phase parameters.
static void setMagnitudeRange(Double_t minMag, Double_t maxMag)
Set the allowed range for magnitude parameters.
static Double_t minDelta_
Minimum allowed value of CP-violating real/imaginary part parameters.
virtual LauAbsCoeffSet * createClone(const TString &newName, CloneOption cloneOption=All, Double_t constFactor=1.0)=0
Create a clone of the coefficient set.
virtual void setParameterValue(const TString &parName, Double_t value, Bool_t init)
Set the value of the named parameter.
virtual void setCoeffValues(const LauComplex &coeff, const LauComplex &coeffBar, Bool_t init)=0
Set the parameters based on the complex coefficients for particles and antiparticles.
virtual LauParameter acp()=0
Calculate the CP asymmetry.
virtual void printTableHeading(std::ostream &stream) const =0
Print the column headings for a results table.
static Double_t maxRealImagPart_
Maximum allowed value of real/imaginary part parameters.
static void setRealImagRange(Double_t minPar, Double_t maxPar)
Set the allowed range for real/imaginary part parameters.
static Double_t maxDelta_
Maximum allowed value of CP-violating real/imaginary part parameters.
virtual void printParValues() const =0
Print the current values of the parameters.
UInt_t index_
The index number of the coefficient set.
virtual void fixParameter(const TString &parName)
Set the named parameter to be fixed in the fit.
LauParameter * findParameter(const TString &parName)
Find the parameter with the given name.
virtual UInt_t index() const
Retrieve the index number of the coefficient set.
CloneOption
Options for cloning operation.
static void setPhaseRange(Double_t minPhase, Double_t maxPhase)
Set the allowed range for phase parameters.
static Double_t maxMagnitude_
Maximum allowed value of magnitude parameters.
TString basename_
The base name of the coefficient set.
virtual void name(const TString &theName)
Set the name of the coefficient set.
Class for defining the abstract interface for complex coefficient classes.
virtual void finaliseValues()=0
Make sure values are in &quot;standard&quot; ranges, e.g. phases should be between -pi and pi.
virtual ~LauAbsCoeffSet()
Destructor.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:33
virtual void printTableRow(std::ostream &stream) const =0
Print the parameters of the complex coefficient as a row in the results table.
static Double_t minRealImagPart_
Minimum allowed value of real/imaginary part parameters.
virtual void baseName(const TString &theBasename)
Set the base name of the coefficient set.
virtual const LauComplex & antiparticleCoeff()=0
Retrieve the complex coefficient for an antiparticle.
virtual const LauComplex & particleCoeff()=0
Retrieve the complex coefficient for a particle.
static void setCPParRange(Double_t minPar, Double_t maxPar)
Set the allowed range for CP-violating parameters.
virtual void floatParameter(const TString &parName)
Set the named parameter to float in the fit.
Class for defining a complex number.
Definition: LauComplex.hh:47
virtual TString name() const
Retrieve the name of the coefficient set.
static Double_t minPhase_
Minimum allowed value of phase parameters.
virtual std::vector< LauParameter * > getParameters()=0
Retrieve the parameters of the coefficient so that they can be loaded into a fit. ...
static Double_t minMagnitude_
Minimum allowed value of magnitude parameters.
virtual const TString & baseName() const
Retrieve the base name of the coefficient set.
void adjustName(LauParameter *par)
Prepend the base name and index to the name of a parameter.
TString name_
The name of the coefficient set.
LauAbsCoeffSet(const TString &theName, const TString &theBaseName="A")
Constructor.