Build status Test coverage CodeFactor Code quality pre-commit

Common Partial-Wave-Analysis Framework (ComPWA)#

Warning

This C++ project is deprecated. ComPWA has migrated to several Python projects and has become an organization. Go to compwa.github.io for an overview of the new projects.

Welcome to the class documentation of ComPWA!

These pages are useful if you are working on the C++ backend of the ComPWA framework. See the repository on GitHub for the source code.

ComPWA is best used through it’s python interface (pycompwa). You can find all installation instructions and usage examples on our website, compwa.github.io/pycompwa.

Note

The original Doxygen pages are still available and kept up-to-date at compwa.github.io/legacy-doxygen.

API#

Common Partial-Wave-Analysis Framework (ComPWA)#

page index

Welcome to the class documentation of ComPWA!

These pages are useful if you are working on the C++ backend of the ComPWA framework. See the repository on GitHub for the source code.

ComPWA is best used through it’s python interface (pycompwa). You can find all installation instructions and usage examples on our website, compwa.github.io/pycompwa.

A Sphinx version of these pages can be viewed at .

Page Hierarchy#

Full API#

Namespaces#
Namespace ComPWA#
Namespaces#
Classes#
Functions#
Typedefs#
Namespace ComPWA::Data::EvtGen#

Contents

Classes#
Namespace ComPWA::Estimator::ChiOneD#

Contents

Classes#
Namespace ComPWA::FunctionTree#
Classes#
Enums#
Functions#
Variables#
Namespace ComPWA::Optimizer::Geneva#

Contents

Classes#
Enums#
Namespace ComPWA::Physics::EvtGen#

Contents

Classes#
Namespace ComPWA::Tools::Adapter#

Contents

Namespaces#
Namespace ComPWA::Tools::Adapter::BOSS#

Contents

Functions#
Namespace std#

Contents

Functions#
Namespace Voigtian#

Namespace Voigtian is the convolution of a non-relativisitc Breit-Wigner with a Gaussian, see Wikipedia :math:`[ mathrm{Voig}(x; sigma, gamma) = int Gaus(x’;sigma)BW(x - x’;gamma) dx’ = Re[w(z)]/(sigmasqrt{2pi}) and z = (x + igamma)/(sigmasqrt{s}) ` In the calculation of voigt function, a Faddeeva Package this page is a package for computation of w(z)) is used to calculate w(z).

Classes and Structs#
Struct BoolTranslator#
Struct Documentation#
struct BoolTranslator#

Public Types

typedef std::string internal_type#
typedef bool external_type#

Public Functions

inline boost::optional<external_type> get_value(const internal_type &str)#
inline boost::optional<internal_type> put_value(const external_type &b)#
Struct DataSet#
Struct Documentation#
struct DataSet#

Public Members

ComPWA::DataMap Data#
std::vector<double> Weights#
Struct Event#
Struct Documentation#
struct Event#

Data structure containing all kinematic information of a physics event.

The information is stored in form of a FourMomentum list.

Public Members

std::vector<FourMomentum> FourMomenta#
double Weight = 1.0#
Struct EventCollection#
Struct Documentation#
struct EventCollection#

Public Functions

inline bool checkPidMatchesEvents() const#

Public Members

std::vector<pid> Pids#
std::vector<Event> Events#
Template Struct FitParameter#
Struct Documentation#
template<typename T>
struct FitParameter#

Public Functions

FitParameter() = default#
inline FitParameter(std::string name, T val, bool isfixed = true)#
inline FitParameter(std::string name, T val, T min, T max, bool isfixed = true)#

Public Members

T Value#
std::pair<T, T> Error#
std::string Name = ""#
std::pair<T, T> Bounds#
bool HasBounds = false#
bool IsFixed = true#

Friends

inline friend std::ostream &operator<<(std::ostream &os, const FitParameter<double> &x)#
Struct FitResult#
Inheritance Relationships#
Derived Types#
Struct Documentation#
struct FitResult#

Data structure which resembles a general fit result.

Optimizers should derive from this structure and append more information via inheritance.

Subclassed by ComPWA::Optimizer::Geneva::GenevaResult, ComPWA::Optimizer::Minuit2::MinuitResult

Public Functions

void write(std::string filename) const#

Public Members

FitParameterList InitialParameters#
FitParameterList FinalParameters#
unsigned int NumFreeParameters#
bool IsValid = false#
double InitialEstimatorValue = 0.0#
double FinalEstimatorValue = 0.0#
std::chrono::seconds FitDuration = std::chrono::seconds(0)#
std::vector<std::vector<double>> CovarianceMatrix#

Friends

friend std::ostream &operator<<(std::ostream &os, const FitResult &Result)#
Struct KahanSummation#
Struct Documentation#
struct KahanSummation#

Public Members

double sum#
double correction#
Struct GenevaResult#
Inheritance Relationships#
Base Type#
Struct Documentation#
struct GenevaResult : public ComPWA::FitResult#

Public Functions

GenevaResult() = default#
inline GenevaResult(FitResult Result)#
Struct MinuitResult#
Inheritance Relationships#
Base Type#
Struct Documentation#
struct MinuitResult : public ComPWA::FitResult#

Public Functions

MinuitResult() = default#
MinuitResult(const FitResult &Result, const ROOT::Minuit2::FunctionMinimum &FMin)#
void write(std::string filename) const#

Public Members

bool CovPosDef = false#
bool HasValidParameters = false#
bool HasValidCov = false#
bool HasAccCov = false#
bool HasReachedCallLimit = false#
bool EdmAboveMax = false#
bool HesseFailed = false#
double ErrorDef = false#
unsigned int NFcn = 0#
double Edm = 0.0#
std::vector<double> GlobalCC#

Friends

friend std::ostream &operator<<(std::ostream &os, const MinuitResult &Result)#
Struct Parameter#
Struct Documentation#
struct Parameter#

Public Members

std::string Name#
double Value#
Struct InputInfo#
Inheritance Relationships#
Base Type#
Struct Documentation#
struct InputInfo : public ComPWA::Physics::Dynamics::InputInfo#

Public Members

std::shared_ptr<ComPWA::FunctionTree::FitParameter> G#

Coupling to signal channel.

std::vector<Coupling> HiddenCouplings#

Coupling parameters and final state masses for multiple hidden channels.

Struct InputInfo#
Inheritance Relationships#
Derived Types#
  • public ComPWA::Physics::Dynamics::Flatte::InputInfo (Struct InputInfo)

  • public ComPWA::Physics::Dynamics::RelativisticBreitWigner::InputInfo (Struct InputInfo)

Struct Documentation#
struct InputInfo#

Subclassed by ComPWA::Physics::Dynamics::Flatte::InputInfo, ComPWA::Physics::Dynamics::RelativisticBreitWigner::InputInfo

Public Members

std::string Type#
unsigned int L#

Orbital Angular Momentum between two daughters in Resonance decay.

std::pair<std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>>, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>>> DaughterInvariantMasses#

Invariant Masses of daughter particles.

std::shared_ptr<ComPWA::FunctionTree::FitParameter> Mass#

Resonance mass.

std::shared_ptr<ComPWA::FunctionTree::FitParameter> MesonRadius#

Meson radius of resonant state.

std::shared_ptr<FormFactor> FormFactorFunctor#

Form factor function object.

Struct InputInfo#
Inheritance Relationships#
Base Type#
Derived Type#
Struct Documentation#
struct InputInfo : public ComPWA::Physics::Dynamics::InputInfo#

Subclassed by ComPWA::Physics::Dynamics::Voigtian::InputInfo

Public Members

std::shared_ptr<ComPWA::FunctionTree::FitParameter> Width#

Decay width of resonant state.

Struct InputInfo#
Inheritance Relationships#
Base Type#
  • public ComPWA::Physics::Dynamics::RelativisticBreitWigner::InputInfo (Struct InputInfo)

Struct Documentation#
struct InputInfo : public ComPWA::Physics::Dynamics::RelativisticBreitWigner::InputInfo#

Public Members

double Sigma#

resolution: the width of gaussian function which is used to represent the resolution of mass spectrum

Struct IntensityBuilderXML::DataContainer#
Nested Relationships#

This struct is a nested type of Class IntensityBuilderXML.

Struct Documentation#
struct DataContainer#

Public Members

ComPWA::FunctionTree::ParameterList Data#
std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> Weights#
double WeightSum = 0.0#
Struct TwoBodyDecayInfo#
Struct Documentation#
struct TwoBodyDecayInfo#

Public Members

SubSystem SubSys#
std::pair<std::string, std::string> Names#
std::pair<double, double> Helicities#
Struct FitFraction#
Struct Documentation#
struct FitFraction#

Public Members

std::string Name#
double Value#
double Error#
Struct FitFractions::DerivativeData#
Nested Relationships#

This struct is a nested type of Class FitFractions.

Struct Documentation#
struct DerivativeData#

Public Members

std::string ParameterName#
double ValueAtParameterPlusEpsilon#
double ValueAtParameterMinusEpsilon#
double StepSize#
Struct KahanSummation#
Struct Documentation#
struct KahanSummation#

Public Functions

inline operator double() const#

Public Members

double sum#
double correction#
Struct EnergyParameters#
Struct Documentation#
struct EnergyParameters#

Public Members

size_t NumberOfEvents#
ComPWA::Physics::HelicityFormalism::HelicityKinematics Kinematics#
ComPWA::FunctionTree::FunctionTreeIntensity Intensity#
ComPWA::EventCollection DataSample#
ComPWA::EventCollection PhspSample#
ComPWA::Data::DataSet Points#
Class ChiOneD#
Class Documentation#
class ChiOneD#

Simple \(\chi^{2}\)-Estimator.

Class BadConfig#
Inheritance Relationships#
Base Type#
Class Documentation#
class BadConfig : public ComPWA::Exception#

Config is not complete.

Public Functions

inline BadConfig(const std::string &error)#
inline BadConfig(const char *error)#
inline virtual ~BadConfig()#
Class BadIndex#
Inheritance Relationships#
Base Type#
Class Documentation#
class BadIndex : public ComPWA::Exception#

Index out of range.

Public Functions

inline BadIndex(const std::string &error)#
inline BadIndex(const char *error)#
inline virtual ~BadIndex()#
Class BadParameter#
Inheritance Relationships#
Base Type#
Class Documentation#
class BadParameter : public ComPWA::Exception#

Parameter not existing.

Public Functions

inline BadParameter(const std::string &error)#
inline BadParameter(const char *error)#
inline virtual ~BadParameter()#
Class BeyondPhsp#
Inheritance Relationships#
Base Type#
Class Documentation#
class BeyondPhsp : public ComPWA::Exception#

Data beyond phasespace requested.

Public Functions

inline BeyondPhsp(const std::string &error = "Data beyond phsp!")#
inline BeyondPhsp(const char *error)#
inline virtual ~BeyondPhsp()#
Class CorruptFile#
Inheritance Relationships#
Base Type#
Class Documentation#
class CorruptFile : public ComPWA::Exception#

Input data file is corrupt or incomplete.

Public Functions

inline CorruptFile(const std::string &error)#
inline CorruptFile(const char *error)#
inline virtual ~CorruptFile()#
Class AsciiHeader#
Class Documentation#
class AsciiHeader#

Representation of data contained in an ASCII header.

This object takes care of reading and writing data concerning a set of events from and to a data file. The concept of a header was introduced to allow the user to document data files and facilitate comparison between Pawian and ComPWA.

Public Functions

inline AsciiHeader(std::vector<int> PIDs = {}, std::string Unit = "GeV", bool EnergyFirst = false)#
void importYAML(const std::string &HeaderContent)#

Set data members by reading a YAML-like string (including newlines).

Set data members by reading a YAML-like string (including newline characters).

Example:

Pids: [211, 421, -411]
Unit: GeV
Order: px py pz E
Note that even though the syntax within the header is YAML-like, there is no full YAML support. In addition, key words are case-insensitive.

inline void importYAML(std::istream &InputStream)#
void dumpToYAML(std::ostream &os) const#

Serialise data members to YAML format, embedded in XML header tags.

See also

importYAML

inline const std::vector<int> getFinalStatePIDs() const#
inline bool isEnergyFirst() const#
inline const std::string &getUnit() const#

Public Static Functions

static std::string extractHeaderContent(std::istream &InputStream)#

Extract the part that is between the XML/HTML tags <header>...</header> including newlines.

Class EvtGenGenerator#
Inheritance Relationships#
Base Type#
Class Documentation#
class EvtGenGenerator : public ComPWA::PhaseSpaceEventGenerator#

Public Functions

EvtGenGenerator(const ComPWA::FourMomentum &CMSP4_, const std::vector<double> &FinalStateMasses_, const std::vector<ComPWA::pid> &FinalStatePIDs_)#
EvtGenGenerator(const Physics::ParticleStateTransitionKinematicsInfo &KinematicsInfo)#

Constructor: Information on the decay is obtained from Kinematics.

virtual ComPWA::EventCollection generate(unsigned int NumberOfEvents, UniformRealNumberGenerator &RandomGenerator) const final#
Class EvtGenStdRandomEngine#
Inheritance Relationships#
Base Type#
  • public EvtRandomEngine

Class Documentation#
class EvtGenStdRandomEngine : public EvtRandomEngine#

Public Functions

EvtGenStdRandomEngine()#
void setRandomNumberGenerator(UniformRealNumberGenerator &NumberGenerator_)#
double random()#
Class RootAngleEfficiency#
Inheritance Relationships#
Base Type#
Class Documentation#
class RootAngleEfficiency : public ComPWA::Data::Root::RootEfficiency#

Uses also TEfficiency object, but the variables are one invariant mass and the corresponding helicity angle.

This avoids binning effects near the phsp boundaries. ATTENTION: We assume that the invariant mass of particle 2 and 3 and the helicity angle between 1 and 2 are used!

Public Functions

inline RootAngleEfficiency(TEfficiency *eff)#
inline RootAngleEfficiency(TH1 *passed, TH1 *total)#
~RootAngleEfficiency() = default#
virtual std::vector<double> evaluate(const DataSet &dataset) const#
Class RootEfficiency#
Inheritance Relationships#
Base Type#
Derived Type#
Class Documentation#
class RootEfficiency : public ComPWA::Efficiency#

Efficiency provided by a histogram.

Subclassed by ComPWA::Data::Root::RootAngleEfficiency

Public Functions

RootEfficiency(TEfficiency *eff)#

Construct RootEfficiency from TEfficiency object.

RootEfficiency(TH1 *passed, TH1 *total)#

Construct RootEfficiency from two TH2 objects for passed and total events.

~RootEfficiency() = default#
virtual std::vector<double> evaluate(const DataSet &dataset) const#

Protected Attributes

std::shared_ptr<TEfficiency> effHist#
Class RootGenerator#
Inheritance Relationships#
Base Type#
Class Documentation#
class RootGenerator : public ComPWA::PhaseSpaceEventGenerator#

Public Functions

RootGenerator(const ComPWA::FourMomentum &CMSP4_, const std::vector<double> &FinalStateMasses_, const std::vector<ComPWA::pid> &FinalStatePIDs_)#

Constructor for a three particle decay with given masses.

RootGenerator(const Physics::ParticleStateTransitionKinematicsInfo &KinematicsInfo)#

Constructor: Information on the decay is obtained from Kinematics.

RootGenerator(const ComPWA::ParticleList &PartL, std::vector<pid> FinalS, std::vector<pid> InitialS)#

Constructor: Information on the decay is provides via lists of initial and final states.

inline virtual ~RootGenerator()#
virtual ComPWA::EventCollection generate(unsigned int NumberOfEvents, UniformRealNumberGenerator &RandomGenerator) const final#
Class RootUniformRealGenerator#
Inheritance Relationships#
Base Type#
Class Documentation#
class RootUniformRealGenerator : public ComPWA::UniformRealNumberGenerator#

Public Functions

RootUniformRealGenerator(int seed = 123456)#
virtual double operator()() final#
virtual int getSeed() const final#
virtual void setSeed(int seed) final#
Class Efficiency#
Inheritance Relationships#
Derived Types#
Class Documentation#
class Efficiency#

Base class for efficiency description over the phase space.

Subclassed by ComPWA::Data::Root::RootEfficiency, ComPWA::UnitEfficiency

Public Functions

Efficiency()#
virtual ~Efficiency()#
virtual double evaluate(const DataPoint &point) const = 0#
Class ChiOneD#
Inheritance Relationships#
Base Type#
Class Documentation#
class ChiOneD : public ComPWA::Estimator::Estimator<double>#

Public Functions

ChiOneD(std::shared_ptr<ComPWA::Intensity> Intensity_, const Data::DataSet &DataSample_)#
double evaluate() noexcept#
Template Class Estimator#
Inheritance Relationships#
Base Type#
Class Documentation#
template<typename OutputType>
class Estimator : public ComPWA::Function<OutputType>#

This class template provides the interface to implementations, which estimate the “closeness” of a Function to a data set, with respect to the parameters of the Function.

The Estimator is defined as a Function with a return value, but without input arguments.

Optimizer implementations use the Estimator to find the parameter set, that model the data set optimally.

Class MinLogLH#
Inheritance Relationships#
Base Type#
Class Documentation#
class MinLogLH : public ComPWA::Estimator::Estimator<double>#

Negative Log Likelihood-Estimator.

This class calculates the negative log likelihood -log(LH) using an Intensity and data samples. Data data samples are retrieved from the DataStorage.

The sum over all weights is necessary to normalize the weights to one. Otherwise the error estimate would be incorrect. The Intensity does not have to be normalized. This is done automatically by the phase space integral.

log likelihood

The negative log LH is given by:

\[ -log \mathcal{L} = N_{\mathrm{obs}} * \log(\lambda) - \sum_i^{N_{\mathrm{obs}}} \log(I(x_i)) \]
with the Intensity \(I(x_i)\) for a given event \(x_i\) and the phase integral \( \lambda = \frac{V}{\sum w_i}\sum_i^{N_{\mathrm{phsp}}} I(x_i)\cdot \epsilon_i \cdot w_i \) \( \epsilon \) and \( w \) are the efficiency and weight for each event \( V \) is the phase space volume (in which the phase space events lie)

Efficiency correction

It is assumed that the data already includes the efficiency.

Public Functions

MinLogLH(ComPWA::Intensity &intensity, const Data::DataSet &datasample, const Data::DataSet &phspdatasample)#
double evaluate() noexcept final#

Value of log likelihood function.

virtual void updateParametersFrom(const std::vector<double> &params) final#

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then use this ordering and to input new values in this method.

virtual std::vector<ComPWA::Parameter> getParameters() const final#
Class SumMinLogLH#
Inheritance Relationships#
Base Type#
Class Documentation#
class SumMinLogLH : public ComPWA::Estimator::Estimator<double>#

Calculates the combined likelihood of multiple MinLogLH.

Public Functions

SumMinLogLH(std::vector<std::shared_ptr<Estimator>> Estimators)#
double evaluate() noexcept final#

Value of minimum log likelihood function.

virtual void updateParametersFrom(const std::vector<double> &params) final#

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then use this ordering and to input new values in this method.

virtual std::vector<ComPWA::Parameter> getParameters() const final#
Class Exception#
Inheritance Relationships#
Base Type#
  • public exception

Derived Types#
Class Documentation#
class Exception : public exception#

ComPWA Exceptions base class.

This class defines the ComPWA exception base-class and provides a set of standard exceptions.

Subclassed by ComPWA::BadConfig, ComPWA::BadIndex, ComPWA::BadParameter, ComPWA::BeyondPhsp, ComPWA::CorruptFile, ComPWA::ParameterFixed, ComPWA::ParameterOutOfBound, ComPWA::TreeBuildError, ComPWA::WrongParType, ComPWA::WrongVariableID

Public Functions

inline Exception(const Exception &e)#
inline Exception &operator=(const Exception &rhs)#
inline virtual ~Exception()#
inline virtual const char *what() const#

Protected Functions

inline Exception(const char *w = "")#
inline Exception(const std::string &w)#

Protected Attributes

std::string what_#
Class FourMomentum#
Class Documentation#
class FourMomentum#

ComPWA four momentum class.

Public Functions

inline FourMomentum()#
inline FourMomentum(double E)#
inline FourMomentum(double Px, double Py, double Pz, double E)#
inline FourMomentum(std::array<double, 4> P4_)#
inline FourMomentum(std::vector<double> P4_)#
inline double px() const#
inline double py() const#
inline double pz() const#
inline double e() const#
inline FourMomentum operator+(const FourMomentum &pB) const#
inline void operator+=(const FourMomentum &pB)#
inline bool operator==(const FourMomentum &pB) const#
inline double invariantMassSquared() const#
inline double invariantMass() const#
inline double threeMomentumSquared() const#

Friends

inline friend std::ostream &operator<<(std::ostream &stream, const FourMomentum &p4)#
Template Class Function#
Inheritance Relationships#
Derived Types#
Class Documentation#
template<typename OutputType, typename ...InputTypes>
class Function#

Interface template for a general Function of the form OutputType Function(InputTypes) The concept closely follows the mathematical definition of a function/mapping.

The parameters are stated by the Function and can be retrieved via getParameters(). The only difference to a mathematical function is that the evaluation and the setting of the parameters are separated. Parameter have to be altered with updateParametersFrom().

Subclassed by ComPWA::FunctionTree::FunctionTreeIntensity, ComPWA::Physics::EvtGen::EvtGenIF

Public Functions

virtual ~Function() = default#
virtual OutputType evaluate(const InputTypes&... args) noexcept = 0#
virtual void updateParametersFrom(const std::vector<double>&) = 0#

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then use this ordering and to input new values in this method.

virtual std::vector<Parameter> getParameters() const = 0#
Class AbsSquare#
Inheritance Relationships#
Base Type#
Class Documentation#
class AbsSquare : public ComPWA::FunctionTree::Strategy#

Public Functions

inline AbsSquare(ParType out)#
inline virtual ~AbsSquare()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class AddAll#
Inheritance Relationships#
Base Type#
Class Documentation#
class AddAll : public ComPWA::FunctionTree::Strategy#

Calculates the square root of input double values and double parameters.

Complex parameters are currently not supported.

Public Functions

inline AddAll(ParType out)#
inline virtual ~AddAll()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Add all values.

Depending on the output type the summation is a little different:

  • ParType::MCOMPLEX: all single complex, integer and double values are added to a std::complex<double>. Each multi value is added element by element and the previous result from the single values is added to each element.

  • ParType::MDOUBLE: same ad MCOMPLEX except that complex

Class ComplexConjugate#
Inheritance Relationships#
Base Type#
Class Documentation#
class ComplexConjugate : public ComPWA::FunctionTree::Strategy#

Public Functions

inline ComplexConjugate(ParType out)#
inline virtual ~ComplexConjugate()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class Complexify#
Inheritance Relationships#
Base Type#
Class Documentation#
class Complexify : public ComPWA::FunctionTree::Strategy#

Public Functions

inline Complexify(ParType out)#
inline virtual ~Complexify()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class Exp#
Inheritance Relationships#
Base Type#
Class Documentation#
class Exp : public ComPWA::FunctionTree::Strategy#

Public Functions

inline Exp(ParType out)#
inline virtual ~Exp()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class FitParameter#
Inheritance Relationships#
Base Type#
Class Documentation#
class FitParameter : public ComPWA::FunctionTree::Parameter#

Public Functions

FitParameter(std::string inName = "")#

Standard constructor with no information provided.

Creates parameter with value 0 but without bounds or an error.

Parameters

inName – internal string identifier of this parameter

FitParameter(const boost::property_tree::ptree &pt)#

Construct parameter from a property tree.

The expected tree layout is described in load().

FitParameter(std::string inName, const double value)#

Standard constructor with just a value provided.

Creates parameter with given value but without bounds or an error.

FitParameter(std::string inName, const double value, const double error)#

Standard constructor with value and error provided.

Creates parameter with given value and error but without bounds.

FitParameter(std::string inName, const double value, const double min, const double max)#

Standard constructor with value and bounds provided.

Creates parameter with given value and bounds but without error. If a check for valid bounds fails, just the value is used.

FitParameter(std::string inName, const double value, const double min, const double max, const double error)#

Standard constructor with value, bounds and error provided.

Creates parameter with the given information. If a check for valid bounds fails, just value and error are used.

FitParameter(ComPWA::FitParameter<double> par)#
inline virtual bool isParameter() const#
inline operator double() const#
inline virtual bool hasBounds() const#
inline virtual bool isFixed() const#
inline virtual void fixParameter(const bool fixed)#
virtual void updateParameter(std::shared_ptr<FitParameter> newPar)#

Update member variables from other FitParameter.

Do to the Observer pattern we can’t use a copy constructor. Therefore we use this workaround. The function ignores if parameter is fixed!

inline virtual double value() const#

Getter for value of parameter.

virtual void setValue(const double inVal)#

Setter for value of parameter.

virtual std::pair<double, double> bounds() const#

Bounds of parameter.

virtual void setBounds(const double min, const double max)#

Bounds of parameter.

virtual void setBounds(const std::pair<double, double> r)#

Bounds of parameter.

virtual bool hasError() const#

Is an error set?

inline virtual ErrorType errorType() const#
virtual std::pair<double, double> error() const#

Parameter error.

inline virtual double avgError() const#

Average parameter error (in case of asymmetric errors) or simply parameter error.

virtual void setError(double errLow, double errHigh)#

Set parameter error and assume that this parameter has asymmetric errors.

virtual void setError(std::pair<double, double> err)#

Set parameter error and assume that this parameter has asymmetric errors.

virtual void setError(double err)#

Setter parameter error and assume that this parameter has symmetric errors.

bool operator==(const FitParameter otherPar) const#
void load(const boost::property_tree::ptree &pt)#

Load parameters from a ptree.

This approach is more or less equivalent to the serialization of a parameter but provides a better readable format.

boost::property_tree::ptree save() const#

Save parameter to a ptree.

This approach is more or less equivalent to the serialization of a parameter but provides a better readable format.

virtual std::string to_str() const#

String with detailed information about the parameter.

Used in operator<<().

virtual std::string val_to_str() const#

String with detailed information about the parameter.

Used in operator<<().

Protected Functions

inline virtual std::string className() const#

Getter for typename of object, to be defined by the actual implementation.

inline virtual void SetErrorType(ErrorType t)#
bool check_bounds(const std::pair<double, double> bounds) const#

Check if min and max are valid bounds.

Protected Attributes

bool HasBounds#

Are valid bounds defined for this parameter?

bool IsFixed#

Do you want to keep parameter fixed?

double Value#

Parameter value.

std::pair<double, double> Bounds#

Parameter bounds.

ErrorType ErrType#

No error / symmetric error / asymmetric error.

std::pair<double, double> Error#

Lower parameter error.

Class FunctionTreeEstimator#
Inheritance Relationships#
Base Type#
Class Documentation#
class FunctionTreeEstimator : public ComPWA::Estimator::Estimator<double>#

Public Functions

FunctionTreeEstimator(std::shared_ptr<TreeNode> tree, ParameterList parameters)#
FunctionTreeEstimator(const FunctionTreeEstimator &other) = delete#
FunctionTreeEstimator(FunctionTreeEstimator &&other) = default#
double evaluate() noexcept#
virtual void updateParametersFrom(const std::vector<double> &params)#

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then use this ordering and to input new values in this method.

virtual std::vector<ComPWA::Parameter> getParameters() const#
std::string print(int level) const#
std::shared_ptr<TreeNode> getFunctionTree() const#
ParameterList getParameterList() const#
Class FunctionTreeIntensity#
Inheritance Relationships#
Base Type#
Class Documentation#
ComPWA::FunctionTree::FunctionTreeIntensity : public ComPWA::Function< double >, DataMap >

Public Functions

FunctionTreeIntensity(std::shared_ptr<TreeNode> Tree_, ParameterList Parameters_, ParameterList Data_)#
FunctionTreeIntensity(const FunctionTreeIntensity &other) = delete#
FunctionTreeIntensity(FunctionTreeIntensity &&other) = default#
std::vector<double> evaluate(const ComPWA::DataMap &data) noexcept#
virtual void updateParametersFrom(const std::vector<double> &params)#

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then use this ordering and to input new values in this method.

virtual std::vector<ComPWA::Parameter> getParameters() const#
std::tuple<std::shared_ptr<ComPWA::FunctionTree::TreeNode>, ComPWA::FunctionTree::ParameterList> bind(const ComPWA::DataMap &data)#
std::string print(int level) const#
Class Inverse#
Inheritance Relationships#
Base Type#
Class Documentation#
class Inverse : public ComPWA::FunctionTree::Strategy#

Calculates the inverse of input double values and double parameters.

Public Functions

inline Inverse(ParType out)#
inline virtual ~Inverse()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class LogOf#
Inheritance Relationships#
Base Type#
Class Documentation#
class LogOf : public ComPWA::FunctionTree::Strategy#

Public Functions

inline LogOf(ParType out)#
inline virtual ~LogOf()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class MultAll#
Inheritance Relationships#
Base Type#
Class Documentation#
class MultAll : public ComPWA::FunctionTree::Strategy#

Public Functions

inline MultAll(ParType out)#
inline virtual ~MultAll()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class Parameter#
Inheritance Relationships#
Derived Types#
Class Documentation#
class Parameter#

Base class for internal parameter.

This class defines the internal container of a parameter. For the use in the function tree, the observer pattern is used and this class takes over the role of the Subject. Therefore the actual implementations of Parameter are the ConcreteSubjects of the observer pattern and the TreeNodes take the role of the observers.

Subclassed by ComPWA::FunctionTree::FitParameter, ComPWA::FunctionTree::Value< T >

Public Functions

inline Parameter(std::string name, ParType type = ParType::UNDEFINED)#

Constructor with name of parameter and optional type.

virtual ~Parameter() = default#
inline virtual std::string name() const#

Getter for name of object.

inline virtual void setName(std::string n)#

Getter for name of object.

inline virtual ParType type() const#

Getter for type of object.

virtual std::string className() const = 0#

Getter for typename of object, to be defined by the actual implementation.

inline virtual bool isParameter() const#
inline void attach(std::weak_ptr<ParObserver> newObserver)#

Attaches a new TreeNode as Observer.

inline void detachExpired()#

Removes TreeNodes not needed as Observer anymore.

inline void notify()#

Notify all observing TreeNodes that parameter changed.

virtual std::string to_str() const = 0#

A public function returning a string with parameter information.

virtual std::string val_to_str() const = 0#

A public function returning a string with parameter value.

Protected Attributes

std::string Name#

Name of parameter.

ParType Type#

Type of parameter (e.g. Double, Integer, …)

std::vector<std::weak_ptr<ParObserver>> ObservingNodes#

List of observers, e.g. TreeNodes.

Friends

inline friend std::ostream &operator<<(std::ostream &out, std::shared_ptr<Parameter> b)#
inline friend std::ostream &operator<<(std::ostream &out, Parameter &b)#
Class ParameterList#
Class Documentation#
class ParameterList#

This class provides a list of parameters and values of different types.

Public Functions

inline ParameterList()#
ParameterList(const ComPWA::Data::DataSet &DataSample)#
ParameterList(const ParameterList &in) = default#

Only shared_ptr are copied.

Those still point to the same object. See DeepCopy(const ParameterList &in).

void DeepCopy(const ParameterList &in)#

Clear this parameter and deep-copy all parameters from in.

Deep-copy means that for each parameter a new object is created (not only the shared_ptr is copied).

inline virtual ~ParameterList()#
virtual std::size_t numParameters() const#
std::shared_ptr<FitParameter> addUniqueParameter(std::shared_ptr<FitParameter> par)#
virtual void addParameter(std::shared_ptr<Parameter> par)#
virtual void addParameter(std::shared_ptr<FitParameter> par)#
virtual void addParameters(std::vector<std::shared_ptr<Parameter>> pars)#
virtual std::size_t numValues() const#
virtual void addValue(std::shared_ptr<Parameter> value)#
virtual void addValues(std::vector<std::shared_ptr<Parameter>> values)#
inline virtual std::shared_ptr<FitParameter> doubleParameter(size_t i) const#
inline virtual std::vector<std::shared_ptr<FitParameter>> &doubleParameters()#
inline virtual const std::vector<std::shared_ptr<FitParameter>> &doubleParameters() const#
inline virtual std::shared_ptr<Value<int>> intValue(size_t i)#
inline virtual std::vector<std::shared_ptr<Value<int>>> &intValues()#
inline virtual const std::vector<std::shared_ptr<Value<int>>> &intValues() const#
inline virtual std::shared_ptr<Value<double>> doubleValue(size_t i) const#
inline virtual std::vector<std::shared_ptr<Value<double>>> &doubleValues()#
inline virtual const std::vector<std::shared_ptr<Value<double>>> &doubleValues() const#
inline virtual std::shared_ptr<Value<std::complex<double>>> complexValue(size_t i) const#
inline virtual std::vector<std::shared_ptr<Value<std::complex<double>>>> &complexValues()#
inline virtual const std::vector<std::shared_ptr<Value<std::complex<double>>>> &complexValues() const#
inline virtual std::shared_ptr<Value<std::vector<int>>> mIntValue(size_t i) const#
inline virtual std::vector<std::shared_ptr<Value<std::vector<int>>>> &mIntValues()#
inline virtual const std::vector<std::shared_ptr<Value<std::vector<int>>>> &mIntValues() const#
inline virtual std::shared_ptr<Value<std::vector<double>>> mDoubleValue(size_t i) const#
inline virtual std::vector<std::shared_ptr<Value<std::vector<double>>>> &mDoubleValues()#
inline virtual const std::vector<std::shared_ptr<Value<std::vector<double>>>> &mDoubleValues() const#
inline virtual std::shared_ptr<Value<std::vector<std::complex<double>>>> mComplexValue(size_t i) const#
inline virtual std::vector<std::shared_ptr<Value<std::vector<std::complex<double>>>>> &mComplexValues()#
inline virtual const std::vector<std::shared_ptr<Value<std::vector<std::complex<double>>>>> &mComplexValues() const#
virtual std::string to_str() const#

A public function returning a string with parameter information.

Protected Attributes

std::vector<std::shared_ptr<Value<int>>> IntValues#
std::vector<std::shared_ptr<Value<double>>> DoubleValues#
std::vector<std::shared_ptr<Value<std::complex<double>>>> ComplexValues#
std::vector<std::shared_ptr<Value<std::vector<int>>>> MultiIntValues#
std::vector<std::shared_ptr<Value<std::vector<double>>>> MultiDoubleValues#
std::vector<std::shared_ptr<Value<std::vector<std::complex<double>>>>> MultiComplexValues#
std::vector<std::shared_ptr<FitParameter>> FitParameters#

Friends

inline friend std::ostream &operator<<(std::ostream &out, const ParameterList &b)#
Class ParObserver#
Inheritance Relationships#
Derived Type#
Class Documentation#
class ParObserver#

ParObserver Base class parameter observer.

For the use in the function tree, the observer pattern is used. This class takes the role of the Observer. It’s implemented by the TreeNode class, which then are able to observe a parameter and note changes.

Subclassed by ComPWA::FunctionTree::TreeNode

Public Functions

virtual void update() = 0#

Call this function to mark the observing node as modified.

Class Pow#
Inheritance Relationships#
Base Type#
Class Documentation#
class Pow : public ComPWA::FunctionTree::Strategy#

Public Functions

inline Pow(ParType out, int power_)#
inline virtual ~Pow()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class SquareRoot#
Inheritance Relationships#
Base Type#
Class Documentation#
class SquareRoot : public ComPWA::FunctionTree::Strategy#

Calculates the square root of input double values and double parameters.

Complex parameters are currently not supported.

Public Functions

inline SquareRoot(ParType out)#
inline virtual ~SquareRoot()#
virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out)#

Strategy execution.

Class Strategy#
Inheritance Relationships#
Derived Types#
Class Documentation#
class Strategy#

Virtual base class for operations of FunctionTree nodes.

Subclassed by ComPWA::FunctionTree::AbsSquare, ComPWA::FunctionTree::AddAll, ComPWA::FunctionTree::ComplexConjugate, ComPWA::FunctionTree::Complexify, ComPWA::FunctionTree::Exp, ComPWA::FunctionTree::Inverse, ComPWA::FunctionTree::LogOf, ComPWA::FunctionTree::MultAll, ComPWA::FunctionTree::Pow, ComPWA::FunctionTree::SquareRoot, ComPWA::Physics::Dynamics::BreitWignerStrategy, ComPWA::Physics::Dynamics::FlatteStrategy, ComPWA::Physics::Dynamics::FormFactorStrategy, ComPWA::Physics::Dynamics::VoigtianStrategy, ComPWA::Physics::HelicityFormalism::WignerDStrategy

Public Functions

inline Strategy(ParType out, std::string name)#
virtual ~Strategy() = default#
inline virtual const ParType OutType() const#

Return parameter type.

virtual void execute(ParameterList &paras, std::shared_ptr<Parameter> &out) = 0#

Strategy execution.

inline std::string str() const#

Protected Attributes

ParType checkType#
const std::string Name#

Friends

inline friend std::ostream &operator<<(std::ostream &out, std::shared_ptr<Strategy> b)#
inline friend std::ostream &operator<<(std::ostream &out, const Strategy &b)#
Class TreeNode#
Inheritance Relationships#
Base Types#
  • public std::enable_shared_from_this< TreeNode >

  • public ComPWA::FunctionTree::ParObserver (Class ParObserver)

Class Documentation#
class TreeNode : public std::enable_shared_from_this<TreeNode>, public ComPWA::FunctionTree::ParObserver#

TreeNode is the basic building block of the FunctionTree.

A FunctionTree is merely a collection of TreeNodes that are connected to each other in a specific way via addNode(). The FunctionTree represents an arbitrary function. structure. Parts of the tree that were calculated before and have not been changed are cached. This reduces the amount of recalculation at evaluation time.

There are normal TreeNodes which perform a calculation. They have a Strategy to calculate its value. The other type of TreeNodes are leaves. They simply need an output parameter and acts as a data source. Leaves can be created via createLeaf().

Public Functions

TreeNode(std::shared_ptr<Strategy> strategy)#

Constructor for tree using a strategy.

This will not cache the output value

TreeNode(std::shared_ptr<Parameter> parameter, std::shared_ptr<Strategy> strategy = nullptr)#

Constructor for tree using a parameter and a strategy.

The output value will be cached.

virtual ~TreeNode()#
void removeExpiredParents()#
void addNode(std::shared_ptr<TreeNode> node)#
void addNodes(std::vector<std::shared_ptr<TreeNode>> nodes)#
void addParent(std::weak_ptr<TreeNode> node)#
std::shared_ptr<Parameter> parameter()#

Obtain parameter of node.

In case child nodes have changed, child nodes are recalculated and Parameter is updated

void fillParameters(ParameterList &list)#

Fill ParameterList with parameters.

The function is intended to be filled with fit parameters, so we add only FitParameters.

virtual void update()#

Flags the node as modified. Should only be called from its child nodes.

std::string print(int level = -1, std::string prefix = "")#

Print node and its child nodes to std::string.

The recursion goes down until level is reached. A prefix can be added inorder to create a tree like output.

Friends

inline friend std::ostream &operator<<(std::ostream &os, std::shared_ptr<TreeNode> p)#
Template Class Value#
Inheritance Relationships#
Base Type#
Class Documentation#
template<class T>
class Value : public ComPWA::FunctionTree::Parameter#

Public Functions

inline Value(std::string name = "")#
inline Value(T val)#
inline Value(std::string name, T val)#
inline virtual T value() const#
inline virtual T &values()#

Reference on the value.

In case of T = std::vector<T2> a reference to the vector is returned.

inline virtual void setValue(T inVal)#
inline operator T() const#

Conversion operator for internal type.

inline const T &operator()() const#
inline T &operator()()#
inline virtual std::string to_str() const#

A public function returning a string with parameter information.

inline virtual std::string val_to_str() const#

A public function returning a string with parameter value.

Protected Functions

inline virtual std::string className() const#

Getter for typename of object, to be defined by the actual implementation.

Protected Attributes

T Val#
Class Kinematics#
Inheritance Relationships#
Derived Types#
Class Documentation#
class Kinematics#

The Kinematics interface defines the conversion of Events to a DataSet.

Subclassed by ComPWA::Physics::EvtGen::DalitzKinematics, ComPWA::Physics::HelicityFormalism::HelicityKinematics

Public Functions

virtual ~Kinematics() = default#
virtual ComPWA::Data::DataSet convert(const EventCollection &Events) const = 0#
virtual EventCollection reduceToPhaseSpace(const EventCollection &Events) const = 0#

checks if DataPoint is within phase space boundaries

virtual double phspVolume() const = 0#
virtual const std::vector<pid> &getFinalStatePIDs() const = 0#

Get a vector of PIDs of the final state.

This interface allows the user to use the info in this object to interpret momentum tuples in a date file.

Class Logging#
Class Documentation#
class Logging#

Logging class provides an interface for logging all over the framework.

Behind the scenes easyloggingcpp is currently used which allows a detailed on logging format and log levels

Public Functions

Logging(std::string level = "INFO", std::string filename = "")#
void setLogLevel(std::string level)#
inline std::string getLogLevel()#
Class GenevaIF#
Inheritance Relationships#
Base Type#
Class Documentation#
class GenevaIF : public ComPWA::Optimizer::Optimizer<GenevaResult>#

Public Functions

GenevaIF(std::vector<ComPWA::Optimizer::Geneva::AlgorithmTypes> AlgorithmOrder_ = {AlgorithmTypes::EVOLUTIONARY, AlgorithmTypes::GRADIENT_DECENT}, std::string ConfigFileDir_ = "./")#
virtual GenevaResult optimize(Estimator::Estimator<double> &Estimator, FitParameterList FitParameters) final#

Finds the optimal value of the Estimator, by varying its parameters.

virtual ~GenevaIF() = default#
Class MinuitIF#
Inheritance Relationships#
Base Type#
Class Documentation#
class MinuitIF : public ComPWA::Optimizer::Optimizer<MinuitResult>#

Wrapper of the Minuit2 Optimizer library.

This class provides a wrapper around the Minuit2 library. It fulfills the Optimizer interface to be easily adapted to other modules. The data needs to be provided with the ControlParameter interface.

Public Functions

inline MinuitIF()#
virtual MinuitResult optimize(ComPWA::Estimator::Estimator<double> &Estimator, ComPWA::FitParameterList InitialParameters)#

Finds the optimal value of the Estimator, by varying its parameters.

void setStrategy(std::string strategy)#

Minuit strategy (low, medium(default), high) See https://root.cern.ch/root/htmldoc/guides/minuit2/Minuit2.html#m-strategy Sets Minuit configuration variables to pre-defined values.

Public Members

bool UseHesse = 1#
bool UseMinos = 0#
unsigned int GradientNCycles#
double GradientStepTolerance#
double GradientTolerance#
unsigned int HessianNCycles#
unsigned int HessianGradientNCycles#
double HessianStepTolerance#
double HessianG2Tolerance#
Template Class Optimizer#
Class Documentation#
template<typename FitResultType, typename EstimatorType = double>
class Optimizer#

This class template provides the interface to optimization libraries.

Note: The dynamic polymorphism by inheriting from Optimizer is not useful within ComPWA, since Optimizers are not never passed to another part of the code.

Public Functions

virtual ~Optimizer() = default#
virtual FitResultType optimize(Estimator::Estimator<EstimatorType> &Estimator, FitParameterList FitParameters) = 0#

Finds the optimal value of the Estimator, by varying its parameters.

Class ParameterFixed#
Inheritance Relationships#
Base Type#
Class Documentation#
class ParameterFixed : public ComPWA::Exception#

Parameter cannot be changed.

Public Functions

inline ParameterFixed(const std::string &error = "Parameter fixed")#
inline ParameterFixed(const char *error)#
inline virtual ~ParameterFixed()#
Class ParameterOutOfBound#
Inheritance Relationships#
Base Type#
Class Documentation#
class ParameterOutOfBound : public ComPWA::Exception#

Parameter out of bound.

Public Functions

inline ParameterOutOfBound(const std::string &error = "Variable not within its limits!")#
inline ParameterOutOfBound(const char *error)#
inline virtual ~ParameterOutOfBound()#
Class ParticleProperties#
Class Documentation#
class ParticleProperties#

Public Functions

ParticleProperties(boost::property_tree::ptree pt)#
inline std::string getName() const#
inline pid getId() const#
inline ComPWA::FitParameter<double> getMass() const#
template<typename T>
T getQuantumNumber(std::string type) const#
inline boost::property_tree::ptree getDecayInfo() const#
inline std::string getDecayType() const#
template<>
inline int getQuantumNumber(std::string type) const#
template<>
inline double getQuantumNumber(std::string type) const#

Friends

inline friend bool operator<(const ParticleProperties &l, const ParticleProperties &r)#
Class PhaseSpaceEventGenerator#
Inheritance Relationships#
Derived Types#
Class Documentation#
class PhaseSpaceEventGenerator#

Interface class for PHSP event generators.

Subclassed by ComPWA::Data::EvtGen::EvtGenGenerator, ComPWA::Data::Root::RootGenerator

Public Functions

virtual ~PhaseSpaceEventGenerator() = default#
virtual EventCollection generate(unsigned int NumberOfEvents, UniformRealNumberGenerator &RandomGenerator) const = 0#
Class BlattWeisskopfFormFactor#
Inheritance Relationships#
Base Type#
Class Documentation#
class BlattWeisskopfFormFactor : public ComPWA::Physics::Dynamics::FormFactor#

Blatt-Weisskopf form factors with normalization F(x=mR) = 1.

Reference: S.U.Chung Annalen der Physik 4(1995) 404-430 z = q / (interaction range). For the interaction range we assume 1/mesonRadius

Class BreitWignerStrategy#
Inheritance Relationships#
Base Type#
Class Documentation#
class BreitWignerStrategy : public ComPWA::FunctionTree::Strategy#

Public Functions

inline BreitWignerStrategy(std::shared_ptr<FormFactor> FF, RelativisticBreitWigner::BreitWignerFunction BWFunction_)#
virtual void execute(ComPWA::FunctionTree::ParameterList &paras, std::shared_ptr<ComPWA::FunctionTree::Parameter> &out)#
Class Coupling#
Class Documentation#
class Coupling#

Public Functions

inline Coupling()#
inline Coupling(double c, double massA, double massB)#
inline Coupling(const ComPWA::ParticleList &partL, const boost::property_tree::ptree tr)#

Public Members

std::shared_ptr<ComPWA::FunctionTree::FitParameter> G#
std::shared_ptr<ComPWA::FunctionTree::FitParameter> MassA#
std::shared_ptr<ComPWA::FunctionTree::FitParameter> MassB#
Class CrystalBarrelFormFactor#
Inheritance Relationships#
Base Type#
Class Documentation#
class CrystalBarrelFormFactor : public ComPWA::Physics::Dynamics::FormFactor#

Form factor for a0(980) used by Crystal Barrel (Phys.Rev.D78-074023)

Class FlatteStrategy#
Inheritance Relationships#
Base Type#
Class Documentation#
class FlatteStrategy : public ComPWA::FunctionTree::Strategy#

Public Functions

inline FlatteStrategy(std::shared_ptr<FormFactor> FF)#
virtual void execute(ComPWA::FunctionTree::ParameterList &paras, std::shared_ptr<ComPWA::FunctionTree::Parameter> &out)#
Class FormFactor#
Inheritance Relationships#
Derived Types#
Class Documentation#
class FormFactor#

Defines interface for form factors It should be noted that when exchanging various form factor implementations in the code, no correctness of the mathematical description is guaranteed.

Subclassed by ComPWA::Physics::Dynamics::BlattWeisskopfFormFactor, ComPWA::Physics::Dynamics::CrystalBarrelFormFactor, ComPWA::Physics::Dynamics::NoFormFactor

Public Functions

virtual double operator()(double QSquared, unsigned int L, double MesonRadius) const = 0#
virtual std::string getName() const = 0#
Class FormFactorStrategy#
Inheritance Relationships#
Base Type#
Class Documentation#
class FormFactorStrategy : public ComPWA::FunctionTree::Strategy#

Public Functions

inline FormFactorStrategy(std::shared_ptr<FormFactor> FF)#
virtual void execute(ComPWA::FunctionTree::ParameterList &paras, std::shared_ptr<ComPWA::FunctionTree::Parameter> &out)#
Class NoFormFactor#
Inheritance Relationships#
Base Type#
Class Documentation#
class NoFormFactor : public ComPWA::Physics::Dynamics::FormFactor#

Public Functions

inline virtual double operator()(double QSquared, unsigned int L, double MesonRadius) const#
inline virtual std::string getName() const#
Class VoigtianStrategy#
Inheritance Relationships#
Base Type#
Class Documentation#
class VoigtianStrategy : public ComPWA::FunctionTree::Strategy#

Public Functions

inline VoigtianStrategy(std::string name = "")#
virtual void execute(ComPWA::FunctionTree::ParameterList &paras, std::shared_ptr<ComPWA::FunctionTree::Parameter> &out)#
Class DalitzKinematics#
Inheritance Relationships#
Base Type#
Class Documentation#
class DalitzKinematics : public ComPWA::Kinematics#

Implementation of the ComPWA::Kinematics interface for amplitude models using the helicity formalism.

The basic functionality is the calculation of the kinematics variables from four-momenta.

Public Functions

DalitzKinematics(ParticleStateTransitionKinematicsInfo KinInfo, double PhspVol)#
DalitzKinematics(ParticleStateTransitionKinematicsInfo kininfo)#
DalitzKinematics(ComPWA::ParticleList partL, std::vector<pid> initialState, std::vector<pid> finalState, ComPWA::FourMomentum cmsP4 = ComPWA::FourMomentum(0, 0, 0, 0))#

Create DalitzKinematics from inital and final state particle lists.

The lists contain the pid of initial and final state. The position of a particle in initial or final state list is used later on for identification.

DalitzKinematics(const DalitzKinematics &that) = delete#

Delete copy constructor.

For each Kinematics in the analysis only one instance should exist since Kinematics does the bookkeeping which SubSystems variables are needs to be calculated. That instance can then be passed as (smart) pointer.

DalitzKinematics(DalitzKinematics &&that) = default#
virtual ComPWA::Data::DataSet convert(const EventCollection &DataSample) const final#
virtual EventCollection reduceToPhaseSpace(const EventCollection &DataSample) const final#

Returns a subset of events that are within phase space boundaries.

virtual double phspVolume() const#
inline virtual const std::vector<pid> &getFinalStatePIDs() const override#

Get a vector of PIDs of the final state.

This interface allows the user to use the info in this object to interpret momentum tuples in a date file.

Class EvtGenIF#
Inheritance Relationships#
Base Type#
Class Documentation#
ComPWA::Physics::EvtGen::EvtGenIF : public ComPWA::Function< double >, DataMap >

Public Functions

inline EvtGenIF()#
inline EvtGenIF(double mA, double mB, double mC, double bigM, double ldel = 0., double rdel = 0.)#
void addResonance(const std::string &name, double m0, double g0, double spin, const ComPWA::Physics::SubSystem &subsys)#

Add EvtGen Dalitz Resonance.

void addHeliResonance(const boost::property_tree::ptree &pt, const ComPWA::ParticleList &partL)#

Add EvtGen Dalitz Resonance.

void addResonances(const boost::property_tree::ptree &pt, std::shared_ptr<DalitzKinematics> kin, const ComPWA::ParticleList &partL)#

Add EvtGen Dalitz Resonances from XML model.

std::vector<double> evaluate(const ComPWA::DataMap &data) noexcept
virtual void updateParametersFrom(const std::vector<double> &Parameters) final

It is important to input the vector in the same length and order as defined in the getParameters() method.

So in other words, call getParameters() first, then modify the contents and finally input them in this method.

virtual std::vector<ComPWA::Parameter> getParameters() const final
inline virtual void setPhspSample(std::shared_ptr<ComPWA::Data::DataSet> phspSample, std::shared_ptr<ComPWA::Data::DataSet> toySample)#

Set phase space sample.

We use a phase space sample to calculate the normalization and determine the maximum of the amplitude. In case that the efficiency is already applied to the sample set fEff to false.

inline virtual void setPhspVolume(double vol)#
Class HelicityKinematics#
Inheritance Relationships#
Base Type#
Class Documentation#
class HelicityKinematics : public ComPWA::Kinematics#

Implementation of the ComPWA::Kinematics interface for amplitude models using the helicity formalism.

The basic functionality is the calculation of the kinematics variables from four-momenta.

Each

SubSystem defines three kinematic variables: the invariant mass \(m^2\), and the helicity angles \(\Theta\) and \(\phi\) are calculated

See also

ComPWA::Data::DataSet convert(const EventCollection &Events) const;

A SubSystem uniquely defines a two body decay based on the participating four-momenta: the two final states (which make up the decaying state), the decaying state recoil system, and the parents recoil). Since usually a large number of possible SubSystems can be defined in a particle decay but not all of them are used, bookkeeping system is introduced. This increases efficiency (cpu+memory) significantly. Kinematic variables can be registered for calculation via the register methods:

  1. See also

    std::pair<std::string, std::string> registerHelicityAngles(SubSystem System);

Public Functions

HelicityKinematics(ParticleStateTransitionKinematicsInfo KinInfo, double PhspVol)#
HelicityKinematics(ParticleStateTransitionKinematicsInfo KinInfo)#
HelicityKinematics(ComPWA::ParticleList partL, std::vector<pid> initialState, std::vector<pid> finalState, ComPWA::FourMomentum cmsP4 = ComPWA::FourMomentum(0, 0, 0, 0))#

Create HelicityKinematics from inital and final state particle lists.

The lists contain the pid of initial and final state. The position of a particle in initial or final state list is used later on for identification.

HelicityKinematics(const HelicityKinematics &that) = delete#

Delete copy constructor.

For each Kinematics in the analysis only one instance should exist since Kinematics does the bookkeeping which SubSystems variables are needs to be calculated. That instance can then be passed by reference.

HelicityKinematics(HelicityKinematics &&that) = default#
std::pair<double, double> calculateHelicityAngles(const Event &Event, const SubSystem &SubSys) const#

Calculates the pair of values \((\Theta, \phi)\) of the Event Event for SubSystem SubSys.

The step-by-step procedure to calculate the helicity angles is:

  1. Calculate the four-momentum of center-of-mass system of the decay, by summing up all final state particle four-momenta.

  2. Boost the the final state particles, the recoil and the parent recoil into the CMS of the decaying state.

  3. Rotate the whole CMS system so that the recoil of the decaying state points in the -z-axis direction. This makes the z-axis the path of flight of the decaying state.

  4. Then rotate the CMS system so that the parent recoil lies in the x-z plane. This defines the angle \(\phi\) of the current transformed final state particles as the angle difference with respect to the production plane.

  5. The helicity angles \(\Theta\) and \(\phi\) can now simply be read of the momenta of the final state particles.

A (two-dimensional) illustration is given below doxyoutput/xml/HelicityAngle.png

double calculateInvariantMassSquared(const Event &Event, const IndexList &FinalStateIDs) const#

Calculates the squared invariant mass \(m^2\) of list of final state particles FinalStateIDs.

The actual final state four momenta are extracted from the Event.

virtual ComPWA::Data::DataSet convert(const EventCollection &Events) const final#

Creates a DataSet from Events.

Calculates all registered kinematic variables for all Events. Kinematic variables can be registered for example via the registerSubSystem(const SubSystem &newSys) method (see also other register methods). In this way only the variables are calculated that are used by the model.

virtual EventCollection reduceToPhaseSpace(const EventCollection &Events) const final#

Returns a subset of Events that are within phase space boundaries.

std::string registerInvariantMassSquared(IndexList System)#
std::pair<std::string, std::string> registerHelicityAngles(SubSystem System)#
void createAllSubsystems()#
std::tuple<std::string, std::string, std::string> registerSubSystem(const SubSystem &NewSys)#

Add NewSys to list of SubSystems and return a tuple of names, that id the registered kinematic variables.

In case that this SubSystem is already in the list only the variable names is returned.

std::tuple<std::string, std::string, std::string> registerSubSystem(const std::vector<unsigned int> &FinalA, const std::vector<unsigned int> &FinalB, const std::vector<unsigned int> &Recoil, const std::vector<unsigned int> &ParentRecoil)#

Add SubSystem from pos indices of final state particles.

const std::pair<double, double> &getInvariantMassBounds(const std::string &InvariantMassName) const#

Get phase space bounds for the registered invariant mass with name InvariantMassName.

virtual double phspVolume() const#
inline const ParticleStateTransitionKinematicsInfo &getParticleStateTransitionKinematicsInfo() const#
inline virtual const std::vector<pid> &getFinalStatePIDs() const override#

Get a vector of PIDs of the final state.

This interface allows the user to use the info in this object to interpret momentum tuples in a date file.

Class WignerDStrategy#
Inheritance Relationships#
Base Type#
Class Documentation#
class WignerDStrategy : public ComPWA::FunctionTree::Strategy#

Public Functions

inline WignerDStrategy(std::string Name = "")#
virtual void execute(ComPWA::FunctionTree::ParameterList &paras, std::shared_ptr<ComPWA::FunctionTree::Parameter> &out)#
Class IntegrationSample#
Inheritance Relationships#
Base Type#
  • public std::vector< double >

Class Documentation#
class IntegrationSample : public std::vector<double>#

Public Functions

IntegrationSample(double lower, double upper, std::size_t SampleSize = 100)#

Public Members

const double BinSize#
Class IntensityBuilderXML#
Nested Relationships#
Nested Types#
Class Documentation#
class IntensityBuilderXML#

Public Functions

IntensityBuilderXML(ParticleList ParticleList, Kinematics &Kinematics, const boost::property_tree::ptree &ModelTree, const EventCollection &TruePhspSample = {}, const EventCollection &RecoPhspSample = {})#
ComPWA::FunctionTree::FunctionTreeIntensity createIntensity()#
std::vector<ComPWA::Tools::IntensityComponent> createIntensityComponents(std::vector<std::vector<std::string>> ComponentList = {})#
std::map<std::string, std::string> getAllComponentNames() const#
Class ParticleStateTransitionKinematicsInfo#
Class Documentation#
class ParticleStateTransitionKinematicsInfo#

Public Functions

ParticleStateTransitionKinematicsInfo(std::vector<pid> InitialState_, std::vector<pid> FinalState_, ComPWA::ParticleList ParticleList_, ComPWA::FourMomentum InitialStateP4_, std::vector<unsigned int> FinalStateEventPositionMapping_)#
ParticleStateTransitionKinematicsInfo(std::vector<pid> InitialState_, std::vector<pid> FinalState_, ComPWA::ParticleList ParticleList_, std::vector<unsigned int> FinalStateEventPositionMapping_)#
unsigned int convertFinalStateIDToPositionIndex(unsigned int fs_id) const#
std::vector<unsigned int> convertFinalStateIDToPositionIndex(const std::vector<unsigned int> &fs_ids) const#
unsigned int convertPositionIndexToFinalStateID(unsigned int pos) const#
std::vector<unsigned int> convertPositionIndexToFinalStateID(const std::vector<unsigned int> &pos) const#
double calculateFinalStateIDMassSum(const std::vector<unsigned int> ids) const#
std::vector<double> getFinalStateMasses() const#
double getInitialStateInvariantMassSquared() const#
ComPWA::FourMomentum getInitialStateFourMomentum() const#
unsigned int getFinalStateParticleCount() const#
std::map<unsigned int, std::string> getFinalStateIDToNameMapping() const#
inline const std::vector<pid> &getFinalStatePIDs() const#

Friends

friend std::ostream &operator<<(std::ostream &outstream, const ParticleStateTransitionKinematicsInfo &kininfo)#
Class SubSystem#
Class Documentation#
class SubSystem#

Definition of a two-body decay node within a sequential decay tree.

Class contains lists for both final states of the two-body decay and a list for all recoiling particles. This information is needed to calculate invariant mass and angles at a two-body decay node.

Public Functions

SubSystem(const std::vector<std::vector<unsigned int>> &FinalStates, const std::vector<unsigned int> &Recoil, const std::vector<unsigned int> &ParentRecoil)#
virtual ~SubSystem() = default#
bool operator==(const SubSystem &b) const#
virtual const std::vector<std::vector<unsigned int>> &getFinalStates() const#
virtual const std::vector<unsigned int> &getRecoilState() const#
virtual const std::vector<unsigned int> &getParentRecoilState() const#

Friends

friend std::ostream &operator<<(std::ostream &stream, const SubSystem &s)#
Class ProgressBar#
Class Documentation#
class ProgressBar#

Public Functions

ProgressBar()#
ProgressBar(std::size_t size, int update = 1)#
~ProgressBar()#
void next(size_t increment = 1)#

indicate the next step in process

Protected Functions

double timeRemaining()#
double timePassed()#
time_t endTime()#
void update()#

Protected Attributes

std::size_t numEvents#
int updateInterval#
bool hasStarted#
time_t startTime#
double currentPercent#
unsigned int currentEvent#