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#
double lastUpdate#
Class Resolution#
Inheritance Relationships#
Derived Type#
Class Documentation#
class Resolution#

Subclassed by ComPWA::ZeroResolution

Public Functions

inline Resolution()#
inline virtual ~Resolution()#
virtual void resolution(Event &ev) = 0#
virtual std::vector<double> resolution(std::vector<double> v) = 0#
Class StdUniformRealGenerator#
Inheritance Relationships#
Base Type#
Class Documentation#
class StdUniformRealGenerator : public ComPWA::UniformRealNumberGenerator#

Public Functions

StdUniformRealGenerator(int seed = 123456)#
virtual double operator()() final#
virtual int getSeed() const final#
virtual void setSeed(int seed) final#
Class TableFormatter#
Class Documentation#
class TableFormatter#

Public Functions

inline TableFormatter(std::ostream *output)#
inline virtual ~TableFormatter()#
virtual void reset()#
virtual void delim()#
virtual void footer()#
virtual void header()#
virtual void addColumn(std::string title, unsigned int fixlength = 999)#
void trimString(std::string &src)#
template<typename T>
inline TableFormatter &operator<<(T in)#

Protected Attributes

std::ostream *OutputStream#
std::vector<unsigned int> ColumnWidth#
std::vector<std::string> ColumnTitle#
unsigned int CurRow#
unsigned int CurCol#
unsigned int TotalWidth#
std::string sep#
std::string firstSep#
std::string lastSep#
std::string pm#
Class FitFractions#
Nested Relationships#
Nested Types#
Class Documentation#
class FitFractions#

Public Functions

FitFractionList calculateFitFractionsWithCovarianceErrorPropagation(const std::vector<std::pair<IntensityComponent, IntensityComponent>> &Components, const ComPWA::Data::DataSet &PhspSample, const ComPWA::FitResult &Result)#

Calculates the fit fractions with errors via error propagation from the covariance matrix.

The gradients are calculated via numerical differentiation:

\[ f´(x) = \frac{f(x+h) - f(x-h)}{2h} + O(h^2) \]

Class DalitzHisto#
Class Documentation#
class DalitzHisto#

Simple class to create and fill Dalitz plots.

Public Functions

DalitzHisto(const DalitzHisto &that) = delete#

Disable copy constructor since TTree is not copyable.

DalitzHisto(DalitzHisto &&other) = default#

Default move constructor.

DalitzHisto(ComPWA::Physics::HelicityFormalism::HelicityKinematics &Kinematics, std::string Name, std::string Title, unsigned int Bins, Color_t Color = kBlack)#
void setStats(bool b)#

Switch on/off stats.

void fill(const ComPWA::Data::DataSet &DataSet, std::vector<double> Intensities = {})#
void scale(double w)#

Scale all distributions.

TH1D *getHistogram(std::string Name)#

Get 1D histogram.

TH2D *getHistogram2D(std::pair<std::string, std::string> Names)#

Get 2D histogram.

void setColor(Color_t Color)#

set line color

void write()#

Write to TFile.

inline double integral()#

GetIntegral.

Class DalitzPlot#
Class Documentation#
class DalitzPlot#

Public Functions

DalitzPlot(ComPWA::Physics::HelicityFormalism::HelicityKinematics &Kinematics, const std::string &Name, int bins = 100)#
virtual ~DalitzPlot() = default#
inline void setGlobalScale(double Scale)#
void fill(const ComPWA::EventCollection &Data, bool Normalize = false, const std::string &Name = "", const std::string &Title = "", Color_t Color = kBlack)#
void fill(const ComPWA::EventCollection &data, Intensity &intens, bool Normalize = false, const std::string &Name = "", const std::string &Title = "", Color_t Color = kBlack)#
void plot()#
Class RootPlotData#
Class Documentation#
class RootPlotData#

Allows output of a data sample and an Intensity (and optionally its components) into a ROOT file via TTrees.

See the appropriate write functions. The Intensity is evaluated using a phase space sample, which is re-weighted accordingly.

Public Functions

RootPlotData(const Physics::ParticleStateTransitionKinematicsInfo &KinematicsInfo, const std::string &filename, const std::string &option = "RECREATE")#
void createDirectory(std::string Name)#
void writeData(const Data::DataSet &DataSample, std::string TreeName = "data")#
void writeIntensityWeightedPhspSample(const Data::DataSet &PhspSample, ComPWA::Intensity &Intensity, std::string TreeName = "intensity_weighted_phspdata", std::map<std::string, std::shared_ptr<ComPWA::Intensity>> IntensityComponents = {})#
void writeHitMissSample(const Data::DataSet &HitMissSample, std::string TreeName = "hitmiss_data")#
Class TreeBuildError#
Inheritance Relationships#
Base Type#
Class Documentation#
class TreeBuildError : public ComPWA::Exception#

Error in tree at construction.

Public Functions

inline TreeBuildError(const std::string &error = "Tree can not be build!")#
inline TreeBuildError(const char *error)#
inline virtual ~TreeBuildError()#
Class UniformRealNumberGenerator#
Inheritance Relationships#
Derived Types#
Class Documentation#
class UniformRealNumberGenerator#

Subclassed by ComPWA::Data::Root::RootUniformRealGenerator, ComPWA::StdUniformRealGenerator

Public Functions

virtual ~UniformRealNumberGenerator() = default#
virtual double operator()() = 0#
virtual int getSeed() const = 0#
virtual void setSeed(int seed) = 0#
Class UnitEfficiency#
Inheritance Relationships#
Base Type#
Class Documentation#
class UnitEfficiency : public ComPWA::Efficiency#

Efficiency object with unit efficiency all over the phase space.

Public Functions

inline UnitEfficiency()#
inline ~UnitEfficiency()#
inline virtual double evaluate(const DataPoint &point) const#
Class WrongParType#
Inheritance Relationships#
Base Type#
Class Documentation#
class WrongParType : public ComPWA::Exception#

Parameter of wrong type.

Public Functions

inline WrongParType(const std::string &error = "Parameter type wrong!")#
inline WrongParType(const char *error)#
inline virtual ~WrongParType()#
Class WrongVariableID#
Inheritance Relationships#
Base Type#
Class Documentation#
class WrongVariableID : public ComPWA::Exception#

Variable not found.

Public Functions

inline WrongVariableID(const std::string &error = "Variable does not exist!")#
inline WrongVariableID(const char *error)#
inline virtual ~WrongVariableID()#
Class ZeroResolution#
Inheritance Relationships#
Base Type#
Class Documentation#
class ZeroResolution : public ComPWA::Resolution#

Public Functions

inline ZeroResolution()#
inline virtual ~ZeroResolution()#
inline virtual void resolution(Event &ev)#
inline virtual std::vector<double> resolution(std::vector<double> v)#
Class GenevaIF#
Class Documentation#
class GenevaIF#

Wrapper of the Geneva Optimizer library.

Class UniformRealDistribution#
Class Documentation#
class UniformRealDistribution#

Interface class for generating random doubles in the range [0,1)

Enums#
Enum ErrorType#
Enum Documentation#
enum ComPWA::FunctionTree::ErrorType#

Values:

enumerator SYM#
enumerator ASYM#
enumerator LHSCAN#
enumerator NOTDEF#
Enum ParType#
Enum Documentation#
enum ComPWA::FunctionTree::ParType#

Enums for the type of the parameter, should be extended if an new parameter type is added.

Values:

enumerator UNDEFINED#
enumerator COMPLEX#
enumerator DOUBLE#
enumerator INTEGER#
enumerator MCOMPLEX#
enumerator MDOUBLE#
enumerator MINTEGER#
Enum AlgorithmTypes#
Enum Documentation#
enum ComPWA::Optimizer::Geneva::AlgorithmTypes#

Values:

enumerator EVOLUTIONARY#
enumerator PARTICLE_SWARM#
enumerator GRADIENT_DECENT#
Functions#
Function adaptiveBinning#
Function Documentation#
inline TH2Poly *adaptiveBinning(UInt_t DataSize, UInt_t DataDimension, Double_t *Data, UInt_t NBins = 100)#
Function calculateAIC#
Function Documentation#
inline double calculateAIC(double LH, int sampleSize, int nFreePar)#

Calculate Akaike Information Criterium AICc https://en.wikipedia.org/wiki/Akaike_information_criterion.

Parameters
  • LH – assuming -log(L) is passed

  • sampleSize – number of points in the data sample

  • nFreePar – number of free parameters

Function calculateBIC#
Function Documentation#
inline double calculateBIC(double LH, int sampleSize, int nFreePar)#

Calculate Beyesian Information Criterium BIC https://en.wikipedia.org/wiki/Bayesian_information_criterion.

Parameters
  • LH – assuming -log(L) is passed

  • sampleSize – number of points in the data sample

  • nFreePar – number of free parameters

Function ComPWA::calculateInvariantMass#
Function Documentation#
double ComPWA::calculateInvariantMass(const Event &ev)#
Function ComPWA::Data::addIntensityWeights#
Function Documentation#
ComPWA::EventCollection ComPWA::Data::addIntensityWeights(std::shared_ptr<ComPWA::Intensity> Intensity, const EventCollection &DataSample, const ComPWA::Kinematics &Kinematics)#
Function ComPWA::Data::Ascii::readData#
Function Documentation#
EventCollection ComPWA::Data::Ascii::readData(const std::string &InputFilePath, long long NumberEventsToRead = -1)#

Read momentum tuples from an ASCII file.

The file should start with a header that defines the final state, like so:

<header>
  Pids: [211, -211, 22]
  Order: E px Py pz
  Unit: GeV
</header>
Note that the section within the header tags is YAML syntax.This header is followed by rows of momentum tuples, grouped per event. In this case, you would have a row for the \(\pi^+\), then for the \(\pi^-\), then one for the \(\gamma\), and finally back to \(\pi^+\). You may choose to start each event group with a weight value, but you don’t need to.

Function ComPWA::Data::Ascii::writeData#
Function Documentation#
void ComPWA::Data::Ascii::writeData(const EventCollection &DataSample, const std::string &OutputFilePath, bool OverwriteFile)#
Function ComPWA::Data::generate(unsigned int, const ComPWA::Kinematics&, const ComPWA::PhaseSpaceEventGenerator&, ComPWA::Intensity&, ComPWA::UniformRealNumberGenerator&)#
Function Documentation#
EventCollection ComPWA::Data::generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator)#
Function ComPWA::Data::generate(unsigned int, const ComPWA::Kinematics&, ComPWA::UniformRealNumberGenerator&, ComPWA::Intensity&, const EventCollection&, const EventCollection&)#
Function Documentation#
EventCollection ComPWA::Data::generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, ComPWA::UniformRealNumberGenerator &RandomGenerator, ComPWA::Intensity &Intensity, const EventCollection &PhspSample, const EventCollection &PhspSampleTrue)#
Function ComPWA::Data::generate(unsigned int, const ComPWA::Kinematics&, ComPWA::UniformRealNumberGenerator&, ComPWA::Intensity&, const EventCollection&)#
Function Documentation#
inline ComPWA::EventCollection ComPWA::Data::generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, ComPWA::UniformRealNumberGenerator &RandomGenerator, ComPWA::Intensity &Intensity, const EventCollection &PhspSample)#
Function ComPWA::Data::generateBunch#
Function Documentation#
std::tuple<EventCollection, double> ComPWA::Data::generateBunch(unsigned int EventBunchSize, const ComPWA::Kinematics &Kinematics, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator, double generationMaxValue, std::vector<ComPWA::Event>::const_iterator PhspStartIterator, std::vector<ComPWA::Event>::const_iterator PhspTrueStartIterator, bool InverseIntensityWeighting = false)#
Function ComPWA::Data::generateImportanceSampledPhsp#
Function Documentation#
EventCollection ComPWA::Data::generateImportanceSampledPhsp(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator)#
Function ComPWA::Data::generatePhsp#
Function Documentation#
EventCollection ComPWA::Data::generatePhsp(unsigned int NumberOfEvents, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::UniformRealNumberGenerator &RandomGenerator)#
Function ComPWA::Data::resize#
Function Documentation#
inline void ComPWA::Data::resize(DataSet &set, size_t size)#
Function ComPWA::Data::Root::pidsToUniqueStrings#
Function Documentation#
std::vector<std::string> ComPWA::Data::Root::pidsToUniqueStrings(std::vector<pid> Pids)#
Function ComPWA::Data::Root::readData#
Function Documentation#
ComPWA::EventCollection ComPWA::Data::Root::readData(const std::string &InputFileName, const std::string &TreeName, long long NumberEventsToRead = -1)#

Create a vector of Events from a ROOT file.

The input file should have at least one event-based with:

  • A branch named "Particles" containing s. These arrays should contain objects with a defined 4-momentum.

  • A branch of doubles called "Weight".

Parameters
  • InputFileName – Input ROOT file(s); can take wildcards, see .

  • TreeName – Name of the event-based tree

  • NumberEventsToRead – Limit the resulting vector to this number of events (optional).

Function ComPWA::Data::Root::uniqueStringsToPids#
Function Documentation#
std::vector<pid> ComPWA::Data::Root::uniqueStringsToPids(std::vector<std::string> UniqueStrings)#
Function ComPWA::Data::Root::writeData#
Function Documentation#
void ComPWA::Data::Root::writeData(const EventCollection &OutputSample, const std::string &OutputFilePath, const std::string &TreeName, bool OverwriteFile = true)#

Write a vector of Events to a ROOT file.

See readData for the structure of the output file.

Parameters
  • OutputSample – List of Events including a info header

  • OutputFilePath – Path to the output ROOT file

  • TreeName – Name of the event-based output TTree in the file

  • OverwriteFile – Set to true if you do not want to append

Function ComPWA::Data::uniform#
Function Documentation#
inline double ComPWA::Data::uniform(double random, double min, double max)#
Function ComPWA::enableDisableLvl#
Function Documentation#
void ComPWA::enableDisableLvl(el::Logger *logger, std::array<std::string, 5> levels)#

Enable or disable levels TRACE, DEBUG, INFO, WARNING, ERROR, FATAL.

An array of strings is passed. E.g {“0”,”1”,”1”,”1”,”1”,”1”} to disable TRACE and enable all other levels.

Function ComPWA::Estimator::createMinLogLHFunctionTreeEstimator#
Function Documentation#
std::pair<ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList> ComPWA::Estimator::createMinLogLHFunctionTreeEstimator(ComPWA::FunctionTree::FunctionTreeIntensity &Intensity, const ComPWA::Data::DataSet &DataSample)#
Function ComPWA::Estimator::createSumMinLogLHFunctionTreeEstimator#
Function Documentation#
std::tuple<FunctionTreeEstimator, FitParameterList> ComPWA::Estimator::createSumMinLogLHFunctionTreeEstimator(std::vector<std::pair<ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList>> Estimators)#
Function ComPWA::findParticle(const ParticleList&, pid)#
Function Documentation#
inline const ParticleProperties &ComPWA::findParticle(const ParticleList &list, pid Pid)#
Function ComPWA::findParticle(const ParticleList&, std::string)#
Function Documentation#
inline const ParticleProperties &ComPWA::findParticle(const ParticleList &list, std::string refname)#
Function ComPWA::FunctionTree::createFitParameterList#
Function Documentation#
FitParameterList ComPWA::FunctionTree::createFitParameterList(ComPWA::FunctionTree::ParameterList Parameters)#
Function ComPWA::FunctionTree::createLeaf(std::shared_ptr<Parameter>)#
Function Documentation#
std::shared_ptr<TreeNode> ComPWA::FunctionTree::createLeaf(std::shared_ptr<Parameter> parameter)#
Template Function ComPWA::FunctionTree::createLeaf(const T&, std::string)#
Function Documentation#
template<typename T>
std::shared_ptr<TreeNode> ComPWA::FunctionTree::createLeaf(const T &value, std::string name = "")#

helper function to create TreeNode leaves which are constants

Function ComPWA::FunctionTree::findMDoubleValue#
Function Documentation#
inline std::shared_ptr<Value<std::vector<double>>> ComPWA::FunctionTree::findMDoubleValue(const std::string &name, const ParameterList &list)#
Function ComPWA::FunctionTree::FindParameter(std::string, const ParameterList&)#
Function Documentation#
inline std::shared_ptr<FitParameter> ComPWA::FunctionTree::FindParameter(std::string name, const ParameterList &v)#

Search ParameterList for a FitParameter with name.

The first match is returned. Be aware that name are not unique. In case no match is found a BadParameter exception is thrown.

Function ComPWA::FunctionTree::FindParameter(std::string, std::vector<std::shared_ptr<FitParameter>>&)#
Function Documentation#
inline std::shared_ptr<FitParameter> ComPWA::FunctionTree::FindParameter(std::string name, std::vector<std::shared_ptr<FitParameter>> &v)#

Search list for a FitParameter with name.

The first match is returned. Be aware that name are not unique. In case no match is found a BadParameter exception is thrown.

Function ComPWA::FunctionTree::KahanSum#
Function Documentation#
KahanSummation ComPWA::FunctionTree::KahanSum(KahanSummation accumulation, double value)#

KahanSummation keeps track of lost bits and reduced the uncertainty in the summation of many large/small numbers.

See https://en.wikipedia.org/wiki/Kahan_summation_algorithm

Function ComPWA::FunctionTree::MComplex(std::string, size_t, std::complex<double>)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<std::complex<double>>>> ComPWA::FunctionTree::MComplex(std::string name, size_t s, std::complex<double> el = std::complex<double>(0., 0.))#
Function ComPWA::FunctionTree::MComplex(std::string, std::vector<std::complex<double>>)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<std::complex<double>>>> ComPWA::FunctionTree::MComplex(std::string name, std::vector<std::complex<double>> v)#
Function ComPWA::FunctionTree::MDouble(std::string, size_t, double)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<double>>> ComPWA::FunctionTree::MDouble(std::string name, size_t s, double el = 0.)#
Function ComPWA::FunctionTree::MDouble(std::string, std::vector<double>)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<double>>> ComPWA::FunctionTree::MDouble(std::string name, std::vector<double> v)#
Function ComPWA::FunctionTree::MInteger(std::string, size_t, int)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<int>>> ComPWA::FunctionTree::MInteger(std::string name, size_t s, int el = 0.)#
Function ComPWA::FunctionTree::MInteger(std::string, std::vector<int>)#
Function Documentation#
inline std::shared_ptr<Value<std::vector<int>>> ComPWA::FunctionTree::MInteger(std::string name, std::vector<int> v)#
Template Function ComPWA::FunctionTree::operator<<#
Function Documentation#
template<class T>
std::ostream &ComPWA::FunctionTree::operator<<(std::ostream &stream, const std::vector<T> &values)#
Template Function ComPWA::FunctionTree::typeName#
Function Documentation#
template<typename T>
inline ParType ComPWA::FunctionTree::typeName(void)#

Template functions which return above specified parameter types.

Specialized Template Function ComPWA::FunctionTree::typeName< double >#
Function Documentation#
template<>
inline ParType ComPWA::FunctionTree::typeName<double>(void)#
Specialized Template Function ComPWA::FunctionTree::typeName< int >#
Function Documentation#
template<>
inline ParType ComPWA::FunctionTree::typeName<int>(void)#
Function ComPWA::FunctionTree::updateDataContainers#
Function Documentation#
void ComPWA::FunctionTree::updateDataContainers(ParameterList Data, const ComPWA::DataMap &data)#
Function ComPWA::FunctionTree::ValueFactory#
Function Documentation#
inline std::shared_ptr<Parameter> ComPWA::FunctionTree::ValueFactory(ParType t, std::string name = "")#
Function ComPWA::getMaximumSampleWeight#
Function Documentation#
double ComPWA::getMaximumSampleWeight(const EventCollection &Sample)#
Function ComPWA::initializeWithFitResult#
Function Documentation#
void ComPWA::initializeWithFitResult(ComPWA::Intensity &Intens, ComPWA::FitResult Result)#
Function ComPWA::insertParticles(ParticleList&, const boost::property_tree::ptree&)#
Function Documentation#
void ComPWA::insertParticles(ParticleList &list, const boost::property_tree::ptree &pt)#

Read list of particles from a boost::property_tree.

insert particles from a boost::property_tree into a ParticleList

Function ComPWA::insertParticles(ParticleList&, std::stringstream&)#
Function Documentation#
void ComPWA::insertParticles(ParticleList &list, std::stringstream &Stream)#

insert particles from a stringstream into a ParticleList

Function ComPWA::insertParticles(ParticleList&, std::string)#
Function Documentation#
void ComPWA::insertParticles(ParticleList &list, std::string FileName)#

insert particles from a xml file into a ParticleList

Function ComPWA::isValid#
Function Documentation#
inline bool ComPWA::isValid(const FitParameterList &FitParameters, const std::vector<ComPWA::Parameter> &EstimatorParameters)#
Function ComPWA::load#
Function Documentation#
FitResult ComPWA::load(std::string filename)#
Function ComPWA::makeFitParameterString#
Function Documentation#
std::string ComPWA::makeFitParameterString(ComPWA::FitParameter<double> p)#
Function ComPWA::operator<<(std::ostream&, const Event&)#
Function Documentation#
std::ostream &ComPWA::operator<<(std::ostream &os, const Event &ev)#
Function ComPWA::operator<<(std::ostream&, const FitResult&)#
Function Documentation#
std::ostream &ComPWA::operator<<(std::ostream &os, const FitResult &Result)#
Function ComPWA::operator<<(std::ostream&, const ParticleList&)#
Function Documentation#
inline std::ostream &ComPWA::operator<<(std::ostream &os, const ParticleList &p)#
Function ComPWA::Optimizer::Minuit2::getCovarianceMatrix#
Function Documentation#
std::vector<std::vector<double>> ComPWA::Optimizer::Minuit2::getCovarianceMatrix(const ROOT::Minuit2::MnUserParameterState &minState)#
Function ComPWA::Optimizer::Minuit2::getFinalParameters#
Function Documentation#
FitParameterList ComPWA::Optimizer::Minuit2::getFinalParameters(const ROOT::Minuit2::MnUserParameterState &minState, FitParameterList InitialParameters)#
Function ComPWA::Optimizer::Minuit2::getGlobalCorrelations#
Function Documentation#
std::vector<double> ComPWA::Optimizer::Minuit2::getGlobalCorrelations(const ROOT::Minuit2::MnUserParameterState &minState)#
Function ComPWA::Optimizer::Minuit2::load#
Function Documentation#
MinuitResult ComPWA::Optimizer::Minuit2::load(std::string filename)#
Function ComPWA::Optimizer::Minuit2::operator<<#
Function Documentation#
std::ostream &ComPWA::Optimizer::Minuit2::operator<<(std::ostream &os, const MinuitResult &Result)#
Function ComPWA::Physics::createFourMomentum#
Function Documentation#
FourMomentum ComPWA::Physics::createFourMomentum(const boost::property_tree::ptree &pt)#
Function ComPWA::Physics::createHelicityKinematics(const std::string)#
Function Documentation#
HelicityKinematics ComPWA::Physics::createHelicityKinematics(const std::string XmlFile)#

Create HelicityKinematics object from an XML file that contains both a kinematics section and a particle section.

Function ComPWA::Physics::createHelicityKinematics(const ComPWA::ParticleList&, const std::string)#
Function Documentation#
HelicityKinematics ComPWA::Physics::createHelicityKinematics(const ComPWA::ParticleList &PartList, const std::string XmlFile)#

Create HelicityKinematics object from an XML file with a kinematics section and provide a particle list separately.

Function ComPWA::Physics::createHelicityKinematics(const ComPWA::ParticleList&, const boost::property_tree::ptree&)#
Function Documentation#
HelicityKinematics ComPWA::Physics::createHelicityKinematics(const ComPWA::ParticleList &ParticleList, const boost::property_tree::ptree &ptree)#
Function ComPWA::Physics::createKinematicsInfo#
Function Documentation#
ParticleStateTransitionKinematicsInfo ComPWA::Physics::createKinematicsInfo(const ComPWA::ParticleList &PartList, const boost::property_tree::ptree &pt)#
Function ComPWA::Physics::Dynamics::couplingToWidth#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::couplingToWidth(double mR, double g, std::complex<double> gamma, std::complex<double> phspFactor)#

Convert width to complex coupling.

This is the implementation of PDG2014, Chapter 47.2, Eq. 47.21 (inverted).

Function ComPWA::Physics::Dynamics::createFunctionTree#
Function Documentation#
std::shared_ptr<ComPWA::FunctionTree::TreeNode> ComPWA::Physics::Dynamics::createFunctionTree(std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquaredDaughter1, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquaredDaughter2, std::shared_ptr<ComPWA::FunctionTree::FitParameter> MesonRadius, unsigned int L, std::shared_ptr<FormFactor> FormFactorFunctor, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquared)#
Function ComPWA::Physics::Dynamics::Flatte::createFunctionTree#
Function Documentation#
std::shared_ptr<ComPWA::FunctionTree::TreeNode> ComPWA::Physics::Dynamics::Flatte::createFunctionTree(InputInfo Params, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquared)#
Function ComPWA::Physics::Dynamics::Flatte::dynamicalFunction(double, double, double, std::complex<double>, std::complex<double>, std::complex<double>)#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::Flatte::dynamicalFunction(double mSq, double mR, double gA, std::complex<double> termA, std::complex<double> termB, std::complex<double> termC = std::complex<double>(0, 0))#

Dynamical function for two coupled channel approach.

Parameters
  • mSq – center-of-mass energy^2 (=s)

  • mR – mass of resonances

  • gA – coupling constant for signal channel

  • termACoupling term to signal channel

  • termBCoupling term to second channel

  • termCCoupling term to third channel (optional)

Returns

Function ComPWA::Physics::Dynamics::Flatte::dynamicalFunction(double, double, double, double, double, double, double, double, double, double, double, unsigned int, double, std::shared_ptr<FormFactor>)#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::Flatte::dynamicalFunction(double mSq, double mR, double massA1, double massA2, double gA, double massB1, double massB2, double couplingB, double massC1, double massC2, double couplingC, unsigned int L, double mesonRadius, std::shared_ptr<FormFactor> FormFactorFunctor)#

Dynamical function for two coupled channel approach.

Parameters
  • mSq – center-of-mass energy^2 (=s)

  • mR – mass of resonances

  • massA1 – mass of first particle of signal channel

  • massA2 – mass of second particle of signal channel

  • gA – coupling constant for signal channel

  • massB1 – mass of first particle of second channel

  • massB2 – mass of second particle of second channel

  • couplingB – coupling constant for second channel

  • massC1 – mass of first particle of third channel

  • massC2 – mass of third particle of third channel

  • couplingC – coupling constant for third channel

  • L – Orbital angular momentum between two daughters a and b

  • mesonRadius – 1/interaction length (needed for barrier factors)

  • FormFactorFunctor – functor of the form factor

Returns

Function ComPWA::Physics::Dynamics::Flatte::flatteCouplingTerm#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::Flatte::flatteCouplingTerm(double sqrtS, double mR, double coupling, double massA, double massB, unsigned int J, double mesonRadius, std::shared_ptr<FormFactor> FormFactorFunctor)#

Helper function to calculate the coupling terms for the Flatte formular.

Function ComPWA::Physics::Dynamics::phspFactor#
Function Documentation#
inline double ComPWA::Physics::Dynamics::phspFactor(double sqrtS, double ma, double mb)#
Function ComPWA::Physics::Dynamics::phspFactorAC#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::phspFactorAC(double sqrtS, double ma, double mb)#

Two body phsp factor.

From PDG2014 Eqn.47-2

Parameters
  • sqrtS – invariant mass of particles A and B

  • ma – Mass of particle A

  • mb – Mass of particle B

Function ComPWA::Physics::Dynamics::qSquared#
Function Documentation#
inline double ComPWA::Physics::Dynamics::qSquared(double S, double sqrtSA, double sqrtSB)#

Calculate Break-up momentum squared.

At energy S for particles with masses sqrtSA and sqrtSB. From PDG2014 Eq.46-20a.

Parameters
  • S – squared invariant mass of decaying system

  • sqrtSA – invariant mass of decay product A

  • sqrtSB – invariant mass of decay product B

Function ComPWA::Physics::Dynamics::qValueAC#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::qValueAC(double sqrtS, double ma, double mb)#

Calculate Break-up momentum.

At energy sqrtS for particles with masses ma and mb. From PDG2014 Eq.46-20a. Below threshold the function is analytically continued.

Parameters
  • sqrtS – center-of-mass energy

  • ma – mass particle A

  • mb – mass particle B

Function ComPWA::Physics::Dynamics::RelativisticBreitWigner::createFunctionTree#
Function Documentation#
std::shared_ptr<ComPWA::FunctionTree::TreeNode> ComPWA::Physics::Dynamics::RelativisticBreitWigner::createFunctionTree(InputInfo Params, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquared)#
Function ComPWA::Physics::Dynamics::RelativisticBreitWigner::relativisticBreitWigner#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::RelativisticBreitWigner::relativisticBreitWigner(double mSq, double mR, double ma, double mb, double width, unsigned int L, double mesonRadius, std::shared_ptr<FormFactor> FormFactorFunctor)#

Relativistic Breit-Wigner model with barrier factors.

The dynamical function implemented here is taken from PDG2018 (Eq.48.22) for the one channel case. The dynamic reaction

\[ \mathcal{A}_R(s) = \frac{g_p*g}{s - M_R^2 + i \sqrt{s} \Gamma_R B^2} \]
\( g_p, g\) are the coupling constants for production and decay and the barrier term \( B^2\) is parameterized according to Eq.48.23:
\[ B^2 = \left( \frac{q(\sqrt{s})}{q(M_R)} \right)^{2L+1} \times \left( \frac{M_R}{\sqrt{s}} \right) \times \left( \frac{F(\sqrt{s})}{F(\sqrt{s_R})} \right)^{2} \]
This corresponds to the Blatt Weisskopf form factors B_L like
\[ B^2 = \left( \frac{q(\sqrt{s})}{q(M_R)} \right) \times \left( \frac{M_R}{\sqrt{s}} \right) \times \left( \frac{B_L(\sqrt{s})}{B_L(\sqrt{s_R})} \right)^{2} \]

Parameters
  • mSq – Invariant mass squared

  • mR – Mass of the resonant state

  • ma – Mass of daughter particle

  • mb – Mass of daughter particle

  • width – Decay width

  • L – Orbital angular momentum between two daughters a and b

  • mesonRadius – Meson Radius

  • FormFactorFunctor – Form factor functor

Returns

Amplitude value

Function ComPWA::Physics::Dynamics::RelativisticBreitWigner::relativisticBreitWignerAnalyticCont#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::RelativisticBreitWigner::relativisticBreitWignerAnalyticCont(double mSq, double mR, double ma, double mb, double width, unsigned int L, double mesonRadius, std::shared_ptr<FormFactor> FormFactorFunctor)#

Relativistic Breit-Wigner model with barrier factors.

The dynamical function implemented here is taken from PDG2018 (Eq.48.22) for the one channel case. The dynamic reaction

\[ \mathcal{A}_R(s) = \frac{g_p*g}{s - M_R^2 + i \sqrt{s} \Gamma_R B^2} \]
\( g_p, g\) are the coupling constants for production and decay and the barrier term \( B^2\) is parameterized according to Eq.48.23:
\[ B^2 = \left( \frac{q(\sqrt{s})}{q(M_R)} \right)^{2L+1} \times \left( \frac{M_R}{\sqrt{s}} \right) \times \left( \frac{F(\sqrt{s})}{F(\sqrt{s_R})} \right)^{2} \]
This corresponds to the Blatt Weisskopf form factors B_L like
\[ B^2 = \left( \frac{q(\sqrt{s})}{q(M_R)} \right) \times \left( \frac{M_R}{\sqrt{s}} \right) \times \left( \frac{B_L(\sqrt{s})}{B_L(\sqrt{s_R})} \right)^{2} \]

Parameters
  • mSq – Invariant mass squared

  • mR – Mass of the resonant state

  • ma – Mass of daughter particle

  • mb – Mass of daughter particle

  • width – Decay width

  • L – Orbital angular momentum between two daughters a and b

  • mesonRadius – Meson Radius

  • FormFactorFunctor – Form factor functor

Returns

Amplitude value

Function ComPWA::Physics::Dynamics::Voigtian::createFunctionTree#
Function Documentation#
std::shared_ptr<ComPWA::FunctionTree::TreeNode> ComPWA::Physics::Dynamics::Voigtian::createFunctionTree(InputInfo Params, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> InvMassSquared)#
Function ComPWA::Physics::Dynamics::Voigtian::dynamicalFunction#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::Voigtian::dynamicalFunction(double mSq, double mR, double wR, double sigma)#

Dynamical voigt function.

Parameters
  • mSq – Invariant mass squared

  • mR – Mass of the resonant state

  • wR – Width of the resonant state

  • sigma – Width of the gaussian, i.e., the resolution of the mass spectrum at mR

Returns

Amplitude value

Function ComPWA::Physics::Dynamics::widthToCoupling#
Function Documentation#
inline std::complex<double> ComPWA::Physics::Dynamics::widthToCoupling(double mR, double width, std::complex<double> gamma, std::complex<double> phspFactor)#

Convert width to complex coupling.

The form factor formFactorR, the normalized vertex function gamma (both evaluated at the resonance pole) and the phspFactor (evaluated at sqrt(s)) can be passed in order to save computation time. This is the implementation of PDG2014, Chapter 47.2, Eq. 47.21. See also widthToCoupling(double mSq, double mR, double width, double ma, double mb, double spin, double mesonRadius, formFactorType type)

Function ComPWA::Physics::extractDecayInfo#
Function Documentation#
TwoBodyDecayInfo ComPWA::Physics::extractDecayInfo(const boost::property_tree::ptree &pt)#
Function ComPWA::Physics::HelicityFormalism::redistributeIndexLists#
Function Documentation#
std::vector<std::pair<ComPWA::IndexList, ComPWA::IndexList>> ComPWA::Physics::HelicityFormalism::redistributeIndexLists(const ComPWA::IndexList &A, const ComPWA::IndexList &B)#
Function ComPWA::Physics::HelicityFormalism::sortSubsystem#
Function Documentation#
IndexListTuple ComPWA::Physics::HelicityFormalism::sortSubsystem(const IndexListTuple &SubSys)#
Function ComPWA::Physics::HelicityFormalism::WignerD::createFunctionTree#
Function Documentation#
std::shared_ptr<ComPWA::FunctionTree::TreeNode> ComPWA::Physics::HelicityFormalism::WignerD::createFunctionTree(double J, double MuPrime, double Mu, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> Theta, std::shared_ptr<ComPWA::FunctionTree::Value<std::vector<double>>> Phi)#
Function ComPWA::Physics::HelicityFormalism::WignerD::dynamicalFunction(double, double, double, double)#
Function Documentation#
inline double ComPWA::Physics::HelicityFormalism::WignerD::dynamicalFunction(double J, double muPrime, double mu, double beta)#
Function ComPWA::Physics::HelicityFormalism::WignerD::dynamicalFunction(double, double, double, double, double, double)#
Function Documentation#
inline std::complex<double> ComPWA::Physics::HelicityFormalism::WignerD::dynamicalFunction(double J, double muPrime, double mu, double alpha, double beta, double gamma)#
Function ComPWA::Physics::KallenFunction#
Function Documentation#
double ComPWA::Physics::KallenFunction(double x, double y, double z)#

Original Källén function, that is, not having square values in its argument.

We use this function instead of the one that can be factorised (see Heron’s formula), because we need to enter \(s\) without taking its square root.

Function ComPWA::Physics::operator<<(std::ostream&, const ParticleStateTransitionKinematicsInfo&)#
Function Documentation#
std::ostream &ComPWA::Physics::operator<<(std::ostream &outstream, const ParticleStateTransitionKinematicsInfo &kininfo)#
Function ComPWA::Physics::operator<<(std::ostream&, const SubSystem&)#
Function Documentation#
std::ostream &ComPWA::Physics::operator<<(std::ostream &stream, const SubSystem &s)#
Function ComPWA::Physics::PhspVolume#
Function Documentation#
std::pair<double, double> ComPWA::Physics::PhspVolume(double s, std::vector<double> &FSMasses, std::size_t SampleSize = 1000)#

Compute phasespace volume of momentum space for an arbitrary number of particles in the final state using Riemann integration.

Todo:

Implement errors (second member of the pair).

Algorithm might be improved with Simpson’s rule, because we integrate over a function that is polynomial in the limit \(m_i\rightarrow 0\)

Returns

A pair: first value is the volume, second is the error (currently set to 0.)

Function ComPWA::Physics::PhspVolumeTwoParticles#
Function Documentation#
double ComPWA::Physics::PhspVolumeTwoParticles(double s, double m1, double m2)#

Phase space element for a two particle decay.

An analytic solution exists only for the volume of the phasespace of two-particle decays.

Function ComPWA::Physics::SRange#
Function Documentation#
std::pair<double, double> ComPWA::Physics::SRange(double s, std::vector<double> &masses)#
Function ComPWA::Physics::stringToVectInt#
Function Documentation#
inline std::vector<unsigned int> ComPWA::Physics::stringToVectInt(std::string str)#

Helper funtions to transfor a string of space-separated numbers to a vector<unsigned int>.

E.g. “1 2 3” =? vector<unsigned int>({1,2,3})

Function ComPWA::Physics::updateDataContainerContent#
Function Documentation#
void ComPWA::Physics::updateDataContainerContent(ComPWA::FunctionTree::ParameterList &DataList, const EventCollection &DataSample, const Kinematics &Kinematics)#
Function ComPWA::Physics::updateDataContainerState#
Function Documentation#
void ComPWA::Physics::updateDataContainerState(ComPWA::FunctionTree::ParameterList &DataSample, const Kinematics &Kinematics)#
Function ComPWA::readParticles(std::stringstream&)#
Function Documentation#
ParticleList ComPWA::readParticles(std::stringstream &Stream)#

Read list of particles from a stringstream For some reason the boost xml parser needs a non-const reference.

Function ComPWA::readParticles(std::string)#
Function Documentation#
ParticleList ComPWA::readParticles(std::string FileName)#

Read list of particles from a xml file.

Function ComPWA::readParticles(boost::property_tree::ptree&)#
Function Documentation#
ParticleList ComPWA::readParticles(boost::property_tree::ptree &pt)#

Read list of particles from a boost::property_tree::ptree

Function ComPWA::Tools::Adapter::BOSS::createHelicityModel#
Function Documentation#
std::pair<FunctionTree::FunctionTreeIntensity, Physics::HelicityFormalism::HelicityKinematics> ComPWA::Tools::Adapter::BOSS::createHelicityModel(const char *modelXMLFile, int seed, const std::vector<pid> &initialState, const std::vector<pid> &finalState, const char *particleXMLFile)#
Function ComPWA::Tools::fixParameter#
Function Documentation#
void ComPWA::Tools::fixParameter(boost::property_tree::ptree &Tree, const std::string ParameterName, double Value = -999)#

Fix specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • ParameterName – Parameters with same name will be updated.

  • Value – New value of parameter. Default means fix to current value.

Function ComPWA::Tools::integrate#
Function Documentation#
double ComPWA::Tools::integrate(ComPWA::Intensity &intensity, const ComPWA::Data::DataSet &phspsample, double phspVolume)#
Function ComPWA::Tools::integrateWithError#
Function Documentation#
std::pair<double, double> ComPWA::Tools::integrateWithError(ComPWA::Intensity &intensity, const ComPWA::Data::DataSet &phspsample, double phspVolume = 1.0)#

Calculate integral and its error.

We follow https://en.wikipedia.org/wiki/Monte_Carlo_integration. The average intensity is given by:

\[ \langle f \rangle =\frac{1}{N} \sum_{i=1}^N f(\overline{\mathbf{x}}_i) \]
and the integral estimate Q_N using a sample size of N events is given by:
\[ I \approx Q_N = V*\langle f \rangle. \]
The variance is given by
\[ \mathrm{Var}(Q_N) = \frac{V^2}{N} \frac{1}{(N-1)} \sum_{i=1}^N \left (f(\overline{\mathbf{x}}_i) - \langle f \rangle \right )^2 \]
We use a Kahan summation to improve numerical stability. We return \( \sqrt{\mathrm{Var}(Q_N)} \) as error.

Function ComPWA::Tools::KahanSum#
Function Documentation#
KahanSummation ComPWA::Tools::KahanSum(KahanSummation accumulation, double value)#

KahanSummation keeps track of lost bits and reduced the uncertainty in the summation of many large/small numbers.

See https://en.wikipedia.org/wiki/Kahan_summation_algorithm

Function ComPWA::Tools::maximum#
Function Documentation#
double ComPWA::Tools::maximum(ComPWA::Intensity &intensity, const ComPWA::Data::DataSet &sample)#
Function ComPWA::Tools::operator<<#
Function Documentation#
std::ostream &ComPWA::Tools::operator<<(std::ostream &os, const FitFractionList &FFList)#
Function ComPWA::Tools::Plotting::phspContour#
Function Documentation#
void ComPWA::Tools::Plotting::phspContour(unsigned int SysX, unsigned int SysY, unsigned int n, double *CoordX, double *CoordY)#
Function ComPWA::Tools::Plotting::writeDataSimple#
Function Documentation#
void ComPWA::Tools::Plotting::writeDataSimple(const Data::DataSet &DataSample, std::string TreeName)#
Function ComPWA::Tools::releaseParameter#
Function Documentation#
void ComPWA::Tools::releaseParameter(boost::property_tree::ptree &Tree, const std::string ParameterName, double Value = -999)#

Release specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • ParameterName – Parameters with same name will be updated.

  • Value – New value of parameter. Default means the current value.

Function ComPWA::Tools::updateParameter(boost::property_tree::ptree&, const std::string&, const std::string&, double, bool, double, double, bool, bool, bool)#
Function Documentation#
void ComPWA::Tools::updateParameter(boost::property_tree::ptree &Tree, const std::string &KeyType, const std::string &KeyValue, double Value, bool Fix, double Min, double Max, bool UpdateValue, bool UpdateFix, bool UpdateRange)#

Update specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • KeyType – The type(e.g., “Name” or “Type”) of ‘key’ used to find parameter in the ptree.

  • KeyValue – The value of ‘key’ used to find parameter in the ptree.

  • Value – New value of parameter.

  • FixParameter will be fixed or not.

  • Min – Lower range of the parameter

  • Max – Upper range of the parameter

  • UpdateValue – If update value of the parameter or not.

  • UpdateFix – If update fix status of the parameter or not.

  • UpdateRange – If update range of the parameter or not.

Function ComPWA::Tools::updateParameter(boost::property_tree::ptree&, const FitParameterList&)#
Function Documentation#
void ComPWA::Tools::updateParameter(boost::property_tree::ptree &Tree, const FitParameterList &FitParameters)#

Update value, range, fix status of parameters of a ptree, the new values comes from fitParameters.

Parameters
  • Tree – Property tree which contains parameters.

  • FitParameters – Target parameters’ vector. Parameters appear both in Tree and FitParameters will be updated according the parameter in FitParameters

Function ComPWA::Tools::updateParameterRangeByName#
Function Documentation#
void ComPWA::Tools::updateParameterRangeByName(boost::property_tree::ptree &Tree, const std::string &ParameterName, double Min, double Max)#

Update range of specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • ParameterName – Parameters with same name will be updated.

  • Min – Minimum value of the range.

  • Max – Maximum value of the range.

Function ComPWA::Tools::updateParameterRangeByType#
Function Documentation#
void ComPWA::Tools::updateParameterRangeByType(boost::property_tree::ptree &Tree, const std::string &ParameterType, double Min, double Max)#

Update range of specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • ParameterType – Parameters with same type (e.g., Magnitude) will be updated.

  • Min – Minimum value of the range.

  • Max – Maximum value of the range.

Function ComPWA::Tools::updateParameterValue#
Function Documentation#
void ComPWA::Tools::updateParameterValue(boost::property_tree::ptree &Tree, const std::string ParameterName, double Value)#

Update value of specified parameters of a ptree.

Parameters
  • Tree – Property tree which contains parameters.

  • ParameterName – Parameters with same name will be updated.

  • Value – New value of parameter.

Function ComPWA::Utils::equal#
Function Documentation#
inline bool ComPWA::Utils::equal(double x, double y, int nEpsilon)#

Check of numbers x and are equal within nEpsion times the numerical limit.

Function ComPWA::Utils::shiftAngle#
Function Documentation#
inline double ComPWA::Utils::shiftAngle(double value)#
Function ComPWA::Utils::splitString#
Function Documentation#
inline std::vector<std::string> ComPWA::Utils::splitString(const std::string &str, char separator = ' ')#

split the string into pieces, which are separated by the separator character (default separator: space)

Function cpolar#
Function Documentation#

Warning

doxygenfunction: Cannot find function “cpolar” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function createEnergyPar#
Function Documentation#

Warning

doxygenfunction: Cannot find function “createEnergyPar” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function Dawson(double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “Dawson” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function Dawson(cmplx, double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “Dawson” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function drawHist#
Function Documentation#
inline TPad *drawHist(std::vector<TH1D*> Histograms, std::vector<TString> DrawOption, double Min = 0, double Max = 0)#
Function drawPull(std::vector<TH1D *>, std::vector<TString>, double, double)#
Function Documentation#
inline TPad *drawPull(std::vector<TH1D*> Histogram, std::vector<TString> DrawOptions, double Min = 0, double Max = 0)#
Function drawPull(TH1D *, TH1D *, TString, TString, double, double)#
Function Documentation#
inline TPad *drawPull(TH1D *Histogram1, TH1D *Histogram2, TString DrawOption1, TString DrawOption2, double Min = 0, double Max = 0)#
Function drawResidual(std::vector<TH1D *>, std::vector<TString>, double, double)#
Function Documentation#
inline TPad *drawResidual(std::vector<TH1D*> Histograms, std::vector<TString> DrawOptions, double Min = 0, double Max = 0)#
Function drawResidual(TH1D *, TH1D *, TString, TString, double, double)#
Function Documentation#
inline TPad *drawResidual(TH1D *Histogram1, TH1D *Histogram2, TString DrawOption1, TString DrawOption2, double Min = 0, double Max = 0)#
Function erf(double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erf” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erf(cmplx, double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erf” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfc(double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfc” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfc(cmplx, double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfc” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfcx(cmplx, double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfcx” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfcx(double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfcx” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfcx_y100#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfcx_y100” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfi(cmplx, double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfi” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function erfi(double)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “erfi” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function getPull#
Function Documentation#
inline TH1 *getPull(TH1 *Histogram1, TH1 *Histogram2, TString Name = "pull_")#
Function getResidual#
Function Documentation#
inline TH1 *getResidual(TH1 *Histogram1, TH1 *Histogram2, TString Name = "res_")#
Function getTH2PolyChi2#
Function Documentation#
inline void getTH2PolyChi2(TH2Poly *Histogram1, TH2Poly *Histogram2, double &Chi2, int &NDF, int &IGood)#
Function getTH2PolyPull#
Function Documentation#
inline TH2Poly *getTH2PolyPull(TH2Poly *Histogram1, TH2Poly *Histogram2, TString Name)#
Function main(int, char **)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “main” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function main(int, char **)#
Function Documentation#

Warning

doxygenfunction: Cannot find function “main” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function sinc#
Function Documentation#

Warning

doxygenfunction: Cannot find function “sinc” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function sinh_taylor#
Function Documentation#

Warning

doxygenfunction: Cannot find function “sinh_taylor” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function sqr#
Function Documentation#

Warning

doxygenfunction: Cannot find function “sqr” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Template Function std::combineHash#
Function Documentation#
template<typename T>
std::size_t std::combineHash(size_t hash, const T &v)#
Function w#
Function Documentation#

Warning

doxygenfunction: Cannot find function “w” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function w_im#
Function Documentation#

Warning

doxygenfunction: Cannot find function “w_im” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Function w_im_y100#
Function Documentation#

Warning

doxygenfunction: Cannot find function “w_im_y100” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variables#
Variable AmplitudeModel#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “AmplitudeModel” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variable ComPWA::FunctionTree::ParNames#
Variable Documentation#
static const char *const ComPWA::FunctionTree::ParNames[7] = {"UNDEFINED", "COMPLEX", "DOUBLE", "INTEGER", "MCOMPLEX", "MDOUBLE", "MINTEGER"}#

Names of the parameter types, should be extended if an new parameter type is added.

Variable expa2n2#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “expa2n2” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variable ModelSqrtS4230#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “ModelSqrtS4230” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variable ModelSqrtS4260#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “ModelSqrtS4260” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variable MyParticleList#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “MyParticleList” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Variable MyParticleList#
Variable Documentation#

Warning

doxygenvariable: Cannot find variable “MyParticleList” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Defines#
Define Inf#
Define Documentation#

Warning

doxygendefine: Cannot find define “Inf” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Define NaN#
Define Documentation#

Warning

doxygendefine: Cannot find define “NaN” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Define USE_CONTINUED_FRACTION#
Define Documentation#

Warning

doxygendefine: Cannot find define “USE_CONTINUED_FRACTION” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Typedefs#
Typedef cmplx#
Typedef Documentation#

Warning

doxygentypedef: Cannot find typedef “cmplx” in doxygen xml output for project “ComPWA” from directory: ./doxyoutput/xml

Typedef ComPWA::DataMap#
Typedef Documentation#
using ComPWA::DataMap = std::unordered_map<std::string, std::vector<double>>#
Typedef ComPWA::FitParameterList#
Typedef Documentation#
using ComPWA::FitParameterList = std::vector<FitParameter<double>>#
Typedef ComPWA::IndexList#
Typedef Documentation#
typedef std::vector<unsigned int> ComPWA::IndexList#
Typedef ComPWA::Intensity#
Typedef Documentation#
using ComPWA::Intensity = Function<std::vector<double>, DataMap>#

An Intensity is just a Function that takes a list of data vectors and returns a list of intensities (double)

Typedef ComPWA::ParticleList#
Typedef Documentation#
using ComPWA::ParticleList = std::set<ParticleProperties>#
Typedef ComPWA::Physics::Dynamics::RelativisticBreitWigner::BreitWignerFunction#
Typedef Documentation#
using ComPWA::Physics::Dynamics::RelativisticBreitWigner::BreitWignerFunction = std::function<std::complex<double>(double, double, double, double, double, unsigned int, double, std::shared_ptr<FormFactor>)>#
Typedef ComPWA::Physics::HelicityFormalism::IndexListTuple#
Typedef Documentation#
using ComPWA::Physics::HelicityFormalism::IndexListTuple = std::tuple<IndexList, IndexList, IndexList, IndexList>#
Typedef ComPWA::pid#
Typedef Documentation#
typedef int ComPWA::pid#

Particle ID.

Usually the PIDs from PDG are used here: http://pdg.lbl.gov/mc_particleId_contents.html

Typedef ComPWA::Tools::FitFractionList#
Typedef Documentation#
using ComPWA::Tools::FitFractionList = std::vector<FitFraction>#
Typedef ComPWA::Tools::IntensityComponent#
Typedef Documentation#
using ComPWA::Tools::IntensityComponent = std::pair<std::string, std::shared_ptr<Intensity>>#