ComPWA
Common Partial-Wave-Analysis Framework
EvtGenIF.hpp
Go to the documentation of this file.
1 // Copyright (c) 2018 The ComPWA Team.
2 // This file is part of the ComPWA framework, check
3 // https://github.com/ComPWA/ComPWA/license.txt for details.
4 
5 #ifndef COMPWA_PHYSICS_EVTGEN_EVTGENIF_HPP
6 #define COMPWA_PHYSICS_EVTGEN_EVTGENIF_HPP
7 
8 #include "Core/Event.hpp"
10 #include "Core/Logging.hpp"
11 #include "Data/DataSet.hpp"
13 #include "Physics/SubSystem.hpp"
14 #include "ThirdParty/EvtGen/EvtDalitzPlot.hh"
15 #include "ThirdParty/EvtGen/EvtDalitzReso.hh"
16 #include "Tools/Integration.hpp"
17 
18 namespace ComPWA {
19 namespace Physics {
20 namespace EvtGen {
21 
22 class EvtGenIF : public ComPWA::Intensity {
23 
24 public:
26 
27  EvtGenIF(double mA, double mB, double mC, double bigM, double ldel = 0.,
28  double rdel = 0.)
29  : ComPWA::Intensity(), PhspVolume(1.0),
30  DalitzPlot(mA, mB, mC, bigM, ldel, rdel) {}
31 
33  void addResonance(const std::string &name, double m0, double g0, double spin,
34  const ComPWA::Physics::SubSystem &subsys);
35 
37  void addHeliResonance(const boost::property_tree::ptree &pt,
38  const ComPWA::ParticleList &partL);
39 
41  void addResonances(const boost::property_tree::ptree &pt,
42  std::shared_ptr<DalitzKinematics> kin,
43  const ComPWA::ParticleList &partL);
44 
45  std::vector<double> evaluate(const ComPWA::DataMap &data) noexcept;
46 
51  void updateParametersFrom(const std::vector<double> &Parameters) final;
52  std::vector<ComPWA::Parameter> getParameters() const final;
53 
58  virtual void setPhspSample(std::shared_ptr<ComPWA::Data::DataSet> phspSample,
59  std::shared_ptr<ComPWA::Data::DataSet> toySample) {
60  PhspSample = phspSample;
61  };
62 
63  virtual void setPhspVolume(double vol) { PhspVolume = vol; };
64 
65 private:
67  std::shared_ptr<ComPWA::Data::DataSet> PhspSample;
68 
69  double PhspVolume;
70 
72  std::vector<double> NormalizationValues;
73 
75  // std::vector<std::vector<double>> Parameters;
76  std::map<std::string, std::shared_ptr<ComPWA::FunctionTree::FitParameter>>
78 
79  EvtDalitzPlot DalitzPlot;
80  std::vector<EvtDalitzReso> Resos;
81 };
82 
83 } // namespace EvtGen
84 } // namespace Physics
85 } // namespace ComPWA
86 
87 #endif
EvtGenIF(double mA, double mB, double mC, double bigM, double ldel=0., double rdel=0.)
Definition: EvtGenIF.hpp:27
Implementations of Parameter for various data types.
std::vector< double > NormalizationValues
Caching of normalization values for each intensity.
Definition: EvtGenIF.hpp:72
void addHeliResonance(const boost::property_tree::ptree &pt, const ComPWA::ParticleList &partL)
Add EvtGen Dalitz Resonance.
Definition: EvtGenIF.cpp:69
void addResonances(const boost::property_tree::ptree &pt, std::shared_ptr< DalitzKinematics > kin, const ComPWA::ParticleList &partL)
Add EvtGen Dalitz Resonances from XML model.
Definition: EvtGenIF.cpp:126
std::vector< double > evaluate(const ComPWA::DataMap &data) noexcept
Definition: EvtGenIF.cpp:175
Contains DalitzKinematics class.
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() me...
Definition: EvtGenIF.cpp:203
virtual void setPhspSample(std::shared_ptr< ComPWA::Data::DataSet > phspSample, std::shared_ptr< ComPWA::Data::DataSet > toySample)
Set phase space sample.
Definition: EvtGenIF.hpp:58
void addResonance(const std::string &name, double m0, double g0, double spin, const ComPWA::Physics::SubSystem &subsys)
Add EvtGen Dalitz Resonance.
Definition: EvtGenIF.cpp:17
std::set< ParticleProperties > ParticleList
Definition: Properties.hpp:84
std::vector< EvtDalitzReso > Resos
Definition: EvtGenIF.hpp:80
std::map< std::string, std::shared_ptr< ComPWA::FunctionTree::FitParameter > > evtPars
Temporary storage of the para.
Definition: EvtGenIF.hpp:77
std::vector< ComPWA::Parameter > getParameters() const final
Definition: EvtGenIF.cpp:212
std::unordered_map< std::string, std::vector< double > > DataMap
Definition: Function.hpp:15
virtual void setPhspVolume(double vol)
Definition: EvtGenIF.hpp:63
std::shared_ptr< ComPWA::Data::DataSet > PhspSample
Phase space sample to calculate the normalization and maximum value.
Definition: EvtGenIF.hpp:63
Definition of a two-body decay node within a sequential decay tree.
Definition: SubSystem.hpp:31
Interface template for a general Function of the form OutputType Function(InputTypes) The concept clo...
Definition: Function.hpp:24
Contains SubSystem class.