laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for defining the abstract interface for complex coefficient classes. More...

#include <LauAbsCoeffSet.hh>

Inheritance diagram for LauAbsCoeffSet:
LauBelleCPCoeffSet LauCartesianCPCoeffSet LauCartesianGammaCPCoeffSet LauCleoCPCoeffSet LauMagPhaseCoeffSet LauMagPhaseCPCoeffSet LauPolarGammaCPCoeffSet LauRealImagCoeffSet LauRealImagCPCoeffSet LauRealImagGammaCPCoeffSet

Public Types

enum  CloneOption {
  All, TiePhase, TieMagnitude, TieRealPart,
  TieImagPart, TieCPPars
}
 Options for cloning operation. More...
 

Public Member Functions

virtual ~LauAbsCoeffSet ()
 Destructor. More...
 
virtual std::vector
< LauParameter * > 
getParameters ()=0
 Retrieve the parameters of the coefficient so that they can be loaded into a fit. More...
 
virtual void printParValues () const =0
 Print the current values of the parameters. More...
 
virtual void printTableHeading (std::ostream &stream) const =0
 Print the column headings for a results table. More...
 
virtual void printTableRow (std::ostream &stream) const =0
 Print the parameters of the complex coefficient as a row in the results table. More...
 
virtual void randomiseInitValues ()=0
 Randomise the starting values of the parameters for a fit. More...
 
virtual void finaliseValues ()=0
 Make sure values are in "standard" ranges, e.g. phases should be between -pi and pi. More...
 
virtual const LauComplexparticleCoeff ()=0
 Retrieve the complex coefficient for a particle. More...
 
virtual const LauComplexantiparticleCoeff ()=0
 Retrieve the complex coefficient for an antiparticle. More...
 
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. More...
 
virtual LauParameter acp ()=0
 Calculate the CP asymmetry. More...
 
virtual LauAbsCoeffSetcreateClone (const TString &newName, CloneOption cloneOption=All, Double_t constFactor=1.0)=0
 Create a clone of the coefficient set. More...
 
virtual TString name () const
 Retrieve the name of the coefficient set. More...
 
virtual void name (const TString &theName)
 Set the name of the coefficient set. More...
 
virtual const TString & baseName () const
 Retrieve the base name of the coefficient set. More...
 
virtual void baseName (const TString &theBasename)
 Set the base name of the coefficient set. More...
 
virtual UInt_t index () const
 Retrieve the index number of the coefficient set. More...
 
virtual void index (UInt_t newIndex)
 Set the index number of the coefficient set. More...
 
virtual void setParameterValue (const TString &parName, Double_t value, Bool_t init)
 Set the value of the named parameter. More...
 
virtual void setParameterError (const TString &parName, Double_t error)
 Set the error of the named parameter. More...
 
virtual void fixParameter (const TString &parName)
 Set the named parameter to be fixed in the fit. More...
 
virtual void floatParameter (const TString &parName)
 Set the named parameter to float in the fit. More...
 
virtual void blindParameter (const TString &parName, const TString &blindingString, const Double_t width)
 Blind the named parameter. More...
 
virtual void addGaussianConstraint (const TString &parName, const Double_t mean, const Double_t width)
 Add Gaussian constraint to the named parameter. More...
 
virtual void addSuffixToParameterName (const TString &parName, const TString &suffix)
 Add suffix to the name of the given parameter. More...
 

Static Public Member Functions

static void setMagnitudeRange (Double_t minMag, Double_t maxMag)
 Set the allowed range for magnitude parameters. More...
 
static void setPhaseRange (Double_t minPhase, Double_t maxPhase)
 Set the allowed range for phase parameters. More...
 
static void setRealImagRange (Double_t minPar, Double_t maxPar)
 Set the allowed range for real/imaginary part parameters. More...
 
static void setCPParRange (Double_t minPar, Double_t maxPar)
 Set the allowed range for CP-violating parameters. More...
 
static void setRandomiser (TRandom *randomiser)
 Set the randomiser. More...
 
static TRandom * getRandomiser ()
 Access the randomiser. More...
 

Protected Member Functions

 LauAbsCoeffSet (const TString &theName, const TString &theBaseName="A")
 Constructor. More...
 
LauParameterfindParameter (const TString &parName)
 Find the parameter with the given name. More...
 
virtual void adjustName (LauParameter *par, const TString &oldBaseName)
 Prepend the base name and index to the name of a parameter. More...
 
 LauAbsCoeffSet (const LauAbsCoeffSet &rhs)
 Copy constructor. More...
 
LauAbsCoeffSetoperator= (const LauAbsCoeffSet &rhs)
 Copy assignment operator. More...
 

Static Protected Attributes

static Double_t minMagnitude_ = -10.0
 Minimum allowed value of magnitude parameters. More...
 
static Double_t maxMagnitude_ = 10.0
 Maximum allowed value of magnitude parameters. More...
 
static Double_t minPhase_ = -LauConstants::threePi
 Minimum allowed value of phase parameters. More...
 
static Double_t maxPhase_ = LauConstants::threePi
 Maximum allowed value of phase parameters. More...
 
static Double_t minRealImagPart_ = -10.0
 Minimum allowed value of real/imaginary part parameters. More...
 
static Double_t maxRealImagPart_ = 10.0
 Maximum allowed value of real/imaginary part parameters. More...
 
static Double_t minDelta_ = -2.0
 Minimum allowed value of CP-violating real/imaginary part parameters. More...
 
static Double_t maxDelta_ = 2.0
 Maximum allowed value of CP-violating real/imaginary part parameters. More...
 

Private Attributes

TString name_
 The name of the coefficient set. More...
 
TString basename_
 The base name of the coefficient set. More...
 
UInt_t index_
 The index number of the coefficient set. More...
 

Static Private Attributes

static TRandom * randomiser_ = 0
 Random number generator to use for randomising parameter starting values. More...
 

Detailed Description

Class for defining the abstract interface for complex coefficient classes.

Class for defining the abstract interface for complex coefficient classes. Some common code is implemented but most methods are not.

Definition at line 49 of file LauAbsCoeffSet.hh.

Member Enumeration Documentation

Options for cloning operation.

Enumerator
All 

no special operation, all parameters cloned

TiePhase 

phase cloned, magnitude free to vary

TieMagnitude 

magnitude cloned, phase free to vary

TieRealPart 

real part cloned, imaginary part free to vary

TieImagPart 

imaginary part cloned, real part free to vary

TieCPPars 

CP-violating parameters cloned, CP-conserving ones free to vary

Definition at line 53 of file LauAbsCoeffSet.hh.

Constructor & Destructor Documentation

virtual LauAbsCoeffSet::~LauAbsCoeffSet ( )
inlinevirtual

Destructor.

Definition at line 63 of file LauAbsCoeffSet.hh.

LauAbsCoeffSet::LauAbsCoeffSet ( const TString &  theName,
const TString &  theBaseName = "A" 
)
protected

Constructor.

Parameters
[in]theNamethe name of the coefficient set
[in]theBaseNamethe single character base for the parameter names

Definition at line 50 of file LauAbsCoeffSet.cc.

LauAbsCoeffSet::LauAbsCoeffSet ( const LauAbsCoeffSet rhs)
protected

Copy constructor.

Parameters
[in]rhsthe coefficient to clone

Definition at line 57 of file LauAbsCoeffSet.cc.

Member Function Documentation

void LauAbsCoeffSet::addGaussianConstraint ( const TString &  parName,
const Double_t  mean,
const Double_t  width 
)
virtual

Add Gaussian constraint to the named parameter.

Parameters
[in]parNamethe name of the parameter to adjust
[in]meanthe mean of the Gaussian constraint
[in]widththe width of the Gaussian constraint

Definition at line 170 of file LauAbsCoeffSet.cc.

void LauAbsCoeffSet::addSuffixToParameterName ( const TString &  parName,
const TString &  suffix 
)
virtual

Add suffix to the name of the given parameter.

Parameters
[in]parNamethe name of the parameter to adjust
[in]suffixthe suffix to add to the parameter name

Definition at line 181 of file LauAbsCoeffSet.cc.

void LauAbsCoeffSet::adjustName ( LauParameter par,
const TString &  oldBaseName 
)
protectedvirtual

Prepend the base name and index to the name of a parameter.

Parameters
[in,out]parpointer to the parameter
[in]oldBaseNamethe old base name, which might need to be removed before adding the new one

Reimplemented in LauPolarGammaCPCoeffSet.

Definition at line 101 of file LauAbsCoeffSet.cc.

virtual const LauComplex& LauAbsCoeffSet::antiparticleCoeff ( )
pure virtual

Retrieve the complex coefficient for an antiparticle.

Returns
the complex coefficient for an antiparticle

Implemented in LauPolarGammaCPCoeffSet, LauCartesianGammaCPCoeffSet, LauBelleCPCoeffSet, LauCleoCPCoeffSet, LauRealImagGammaCPCoeffSet, LauMagPhaseCPCoeffSet, LauCartesianCPCoeffSet, LauRealImagCPCoeffSet, LauMagPhaseCoeffSet, and LauRealImagCoeffSet.

virtual const TString& LauAbsCoeffSet::baseName ( ) const
inlinevirtual

Retrieve the base name of the coefficient set.

The base name is generally of the form "Ai", where i is an integer. This is used in the fit results ntuple.

Returns
the base name of the coefficient set

Definition at line 147 of file LauAbsCoeffSet.hh.

virtual void LauAbsCoeffSet::baseName ( const TString &  theBasename)
inlinevirtual

Set the base name of the coefficient set.

The base name is generally of the form "Ai", where i is an integer. This is used in the fit results ntuple.

Parameters
[in]theBasenamethe base name to set

Definition at line 155 of file LauAbsCoeffSet.hh.

void LauAbsCoeffSet::blindParameter ( const TString &  parName,
const TString &  blindingString,
const Double_t  width 
)
virtual

Blind the named parameter.

See LauBlind documentation for details of blinding procedure

Parameters
[in]parNamethe name of the parameter to adjust
[in]blindingStringthe unique blinding string used to seed the random number generator
[in]widththe width of the Gaussian from which the offset should be sampled

Definition at line 159 of file LauAbsCoeffSet.cc.

virtual LauAbsCoeffSet* LauAbsCoeffSet::createClone ( const TString &  newName,
CloneOption  cloneOption = All,
Double_t  constFactor = 1.0 
)
pure virtual

Create a clone of the coefficient set.

Parameters
[in]newNamethe clone's name
[in]cloneOptionspecial option for the cloning operation
[in]constFactora constant factor by which to multiply the cloned parameters
Returns
a clone of the coefficient set

Implemented in LauPolarGammaCPCoeffSet, LauCartesianGammaCPCoeffSet, LauRealImagGammaCPCoeffSet, LauBelleCPCoeffSet, LauCleoCPCoeffSet, LauMagPhaseCPCoeffSet, LauCartesianCPCoeffSet, LauRealImagCPCoeffSet, LauMagPhaseCoeffSet, and LauRealImagCoeffSet.

virtual void LauAbsCoeffSet::finaliseValues ( )
pure virtual
LauParameter * LauAbsCoeffSet::findParameter ( const TString &  parName)
protected

Find the parameter with the given name.

Parameters
[in]parNamethe name of the parameter to be found return the retrieved parameter

Definition at line 197 of file LauAbsCoeffSet.cc.

void LauAbsCoeffSet::fixParameter ( const TString &  parName)
virtual

Set the named parameter to be fixed in the fit.

Parameters
[in]parNamethe name of the parameter to adjust

Definition at line 137 of file LauAbsCoeffSet.cc.

void LauAbsCoeffSet::floatParameter ( const TString &  parName)
virtual

Set the named parameter to float in the fit.

Parameters
[in]parNamethe name of the parameter to adjust

Definition at line 148 of file LauAbsCoeffSet.cc.

virtual std::vector<LauParameter*> LauAbsCoeffSet::getParameters ( )
pure virtual

Retrieve the parameters of the coefficient so that they can be loaded into a fit.

Returns
the parameters of the coefficient

Implemented in LauPolarGammaCPCoeffSet, LauCartesianGammaCPCoeffSet, LauBelleCPCoeffSet, LauCleoCPCoeffSet, LauRealImagGammaCPCoeffSet, LauMagPhaseCPCoeffSet, LauCartesianCPCoeffSet, LauRealImagCPCoeffSet, LauMagPhaseCoeffSet, and LauRealImagCoeffSet.

TRandom * LauAbsCoeffSet::getRandomiser ( )
static

Access the randomiser.

Returns
the random number generator to use for randomising parameter starting values

Definition at line 74 of file LauAbsCoeffSet.cc.

virtual UInt_t LauAbsCoeffSet::index ( ) const
inlinevirtual

Retrieve the index number of the coefficient set.

Returns
the index number of the coefficient set

Definition at line 161 of file LauAbsCoeffSet.hh.

void LauAbsCoeffSet::index ( UInt_t  newIndex)
virtual

Set the index number of the coefficient set.

Parameters
[in]newIndexthe new index

Definition at line 82 of file LauAbsCoeffSet.cc.

virtual TString LauAbsCoeffSet::name ( ) const
inlinevirtual

Retrieve the name of the coefficient set.

The name should correspond to the name of the resonance in the model.

Returns
the name of the coefficient set

Definition at line 132 of file LauAbsCoeffSet.hh.

virtual void LauAbsCoeffSet::name ( const TString &  theName)
inlinevirtual

Set the name of the coefficient set.

The name should correspond to the name of the resonance in the model.

Parameters
[in]theNamethe name to set

Definition at line 139 of file LauAbsCoeffSet.hh.

LauAbsCoeffSet & LauAbsCoeffSet::operator= ( const LauAbsCoeffSet rhs)
protected

Copy assignment operator.

Parameters
[in]rhsthe coefficient to clone

Definition at line 64 of file LauAbsCoeffSet.cc.

virtual const LauComplex& LauAbsCoeffSet::particleCoeff ( )
pure virtual
virtual void LauAbsCoeffSet::printParValues ( ) const
pure virtual
virtual void LauAbsCoeffSet::printTableHeading ( std::ostream &  stream) const
pure virtual
virtual void LauAbsCoeffSet::printTableRow ( std::ostream &  stream) const
pure virtual

Print the parameters of the complex coefficient as a row in the results table.

Parameters
[out]streamthe stream to print to

Implemented in LauPolarGammaCPCoeffSet, LauCartesianGammaCPCoeffSet, LauBelleCPCoeffSet, LauCleoCPCoeffSet, LauRealImagGammaCPCoeffSet, LauMagPhaseCPCoeffSet, LauCartesianCPCoeffSet, LauRealImagCPCoeffSet, LauMagPhaseCoeffSet, and LauRealImagCoeffSet.

virtual void LauAbsCoeffSet::randomiseInitValues ( )
pure virtual
virtual void LauAbsCoeffSet::setCoeffValues ( const LauComplex coeff,
const LauComplex coeffBar,
Bool_t  init 
)
pure virtual

Set the parameters based on the complex coefficients for particles and antiparticles.

Parameters
[in]coeffthe complex coefficient for a particle
[in]coeffBarthe complex coefficient for an antiparticle
[in]initwhether or not the initial and generated values should also be adjusted

Implemented in LauPolarGammaCPCoeffSet, LauCartesianGammaCPCoeffSet, LauRealImagGammaCPCoeffSet, LauBelleCPCoeffSet, LauCleoCPCoeffSet, LauMagPhaseCPCoeffSet, LauCartesianCPCoeffSet, LauRealImagCPCoeffSet, LauMagPhaseCoeffSet, and LauRealImagCoeffSet.

static void LauAbsCoeffSet::setCPParRange ( Double_t  minPar,
Double_t  maxPar 
)
inlinestatic

Set the allowed range for CP-violating parameters.

Parameters
[in]minParthe lower edge of the range
[in]maxParthe upper edge of the range

Definition at line 248 of file LauAbsCoeffSet.hh.

static void LauAbsCoeffSet::setMagnitudeRange ( Double_t  minMag,
Double_t  maxMag 
)
inlinestatic

Set the allowed range for magnitude parameters.

Parameters
[in]minMagthe lower edge of the range
[in]maxMagthe upper edge of the range

Definition at line 227 of file LauAbsCoeffSet.hh.

void LauAbsCoeffSet::setParameterError ( const TString &  parName,
Double_t  error 
)
virtual

Set the error of the named parameter.

This is particularly useful for tuning the step size used by MINUIT

Parameters
[in]parNamethe name of the parameter to adjust
[in]errorthe new error value for the parameter to take

Definition at line 126 of file LauAbsCoeffSet.cc.

void LauAbsCoeffSet::setParameterValue ( const TString &  parName,
Double_t  value,
Bool_t  init 
)
virtual

Set the value of the named parameter.

Parameters
[in]parNamethe name of the parameter to adjust
[in]valuethe new value for the parameter to take
[in]initwhether or not the initial and generated values should also be adjusted

Definition at line 111 of file LauAbsCoeffSet.cc.

static void LauAbsCoeffSet::setPhaseRange ( Double_t  minPhase,
Double_t  maxPhase 
)
inlinestatic

Set the allowed range for phase parameters.

Parameters
[in]minPhasethe lower edge of the range
[in]maxPhasethe upper edge of the range

Definition at line 234 of file LauAbsCoeffSet.hh.

static void LauAbsCoeffSet::setRandomiser ( TRandom *  randomiser)
inlinestatic

Set the randomiser.

Set the random number generator to use for randomising parameter starting values. Will default to LauRandom::zeroSeedRandom if not explicitly supplied via this function.

Parameters
[in]randomiserthe random number generator to use for randomising parameter starting values

Definition at line 257 of file LauAbsCoeffSet.hh.

static void LauAbsCoeffSet::setRealImagRange ( Double_t  minPar,
Double_t  maxPar 
)
inlinestatic

Set the allowed range for real/imaginary part parameters.

Parameters
[in]minParthe lower edge of the range
[in]maxParthe upper edge of the range

Definition at line 241 of file LauAbsCoeffSet.hh.

Member Data Documentation

TString LauAbsCoeffSet::basename_
private

The base name of the coefficient set.

Definition at line 324 of file LauAbsCoeffSet.hh.

UInt_t LauAbsCoeffSet::index_
private

The index number of the coefficient set.

Definition at line 327 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::maxDelta_ = 2.0
staticprotected

Maximum allowed value of CP-violating real/imaginary part parameters.

Definition at line 302 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::maxMagnitude_ = 10.0
staticprotected

Maximum allowed value of magnitude parameters.

Definition at line 290 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::maxPhase_ = LauConstants::threePi
staticprotected

Maximum allowed value of phase parameters.

Definition at line 294 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::maxRealImagPart_ = 10.0
staticprotected

Maximum allowed value of real/imaginary part parameters.

Definition at line 298 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::minDelta_ = -2.0
staticprotected

Minimum allowed value of CP-violating real/imaginary part parameters.

Definition at line 300 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::minMagnitude_ = -10.0
staticprotected

Minimum allowed value of magnitude parameters.

Definition at line 288 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::minPhase_ = -LauConstants::threePi
staticprotected

Minimum allowed value of phase parameters.

Definition at line 292 of file LauAbsCoeffSet.hh.

Double_t LauAbsCoeffSet::minRealImagPart_ = -10.0
staticprotected

Minimum allowed value of real/imaginary part parameters.

Definition at line 296 of file LauAbsCoeffSet.hh.

TString LauAbsCoeffSet::name_
private

The name of the coefficient set.

Definition at line 321 of file LauAbsCoeffSet.hh.

TRandom * LauAbsCoeffSet::randomiser_ = 0
staticprivate

Random number generator to use for randomising parameter starting values.

Definition at line 318 of file LauAbsCoeffSet.hh.


The documentation for this class was generated from the following files: