11 #include <boost/archive/xml_iarchive.hpp> 12 #include <boost/archive/xml_oarchive.hpp> 13 #include <boost/property_tree/ptree.hpp> 14 #include <boost/property_tree/xml_parser.hpp> 34 <Particle Name="f0(980)"> 36 <Parameter Type="Mass" Name="Mass_f0(980)"> 41 <QuantumNumber Class="Spin" Type="Spin" Value="0"/> 42 <QuantumNumber Class="Int" Type="Charge" Value="0"/> 43 <QuantumNumber Class="Int" Type="Parity" Value="1"/> 44 <DecayInfo Type="flatte"> 45 <FormFactor Type="0" /> 46 <Parameter Type="Coupling" Name="gPiPi_f0(980)"> 50 <ParticleA>pi+</ParticleA> 51 <ParticleB>pi-</ParticleB> 53 <Parameter Type="Coupling" Name="gKK_f0(980)"> 54 <Value>3.121343843602647</Value> 57 <ParticleA>K+</ParticleA> 58 <ParticleB>K-</ParticleB> 60 <Parameter Type="Coupling" Name="gKK_f0(980)"> 61 <Value>3.121343843602647</Value> 64 <ParticleA>K_S0</ParticleA> 65 <ParticleB>K_S0</ParticleB> 67 <Parameter Type="MesonRadius" Name="Radius_f0(980)"> 75 <Particle Name="Zc(3900)"> 77 <Parameter Type="Mass" Name="Mass_Zc(3900)"> 82 <QuantumNumber Class="Spin" Type="Spin" Value="0"/> 83 <QuantumNumber Class="Int" Type="Charge" Value="0"/> 84 <QuantumNumber Class="Int" Type="Parity" Value="1"/> 85 <DecayInfo Type="flatte"> 86 <FormFactor Type="0" /> 87 <Parameter Type="Coupling" Name="gPiJPsi_Zc(3900)"> 91 <ParticleA>pi+</ParticleA> 92 <ParticleB>J/psi</ParticleB> 94 <Parameter Type="Coupling" Name="gDD_Zc(3900)"> 98 <ParticleA>D+</ParticleA> 99 <ParticleB>D-</ParticleB> 101 <Parameter Type="MesonRadius" Name="Radius_Zc(3900)"> 113 <Intensity Class="IncoherentIntensity"> 114 <Intensity Class="CoherentIntensity"> 115 <Amplitude Class="CoefficientAmplitude"> 116 <Parameter Type="Magnitude" Name="Magnitude_f0(980)0"> 120 <Parameter Type="Phase" Name="Phase_f0(980)0"> 124 <Amplitude Class="SequentialAmplitude"> 125 <Amplitude Class="HelicityDecay"> 126 <DecayParticle Name="f0(980)" Helicity="0"/> 127 <RecoilSystem FinalState="2" /> 129 <Particle Name="pi+" FinalState="0" Helicity="0"/> 130 <Particle Name="pi-" FinalState="1" Helicity="0"/> 135 <Amplitude Class="SequentialAmplitude"> 136 <Amplitude Class="HelicityDecay"> 137 <DecayParticle Name="Zc(3900)" Helicity="0"/> 138 <RecoilSystem FinalState="0" /> 140 <Particle Name="pi-" FinalState="1" Helicity="0"/> 141 <Particle Name="J/psi" FinalState="2" Helicity="0"/> 145 <Amplitude Class="SequentialAmplitude"> 146 <Amplitude Class="HelicityDecay"> 147 <DecayParticle Name="Zc(3900)" Helicity="0"/> 148 <RecoilSystem FinalState="1" /> 150 <Particle Name="pi+" FinalState="0" Helicity="0"/> 151 <Particle Name="J/psi" FinalState="2" Helicity="0"/> 160 <Intensity Class="IncoherentIntensity"> 161 <Intensity Class="CoherentIntensity"> 162 <Amplitude Class="CoefficientAmplitude"> 163 <Parameter Type="Magnitude" Name="Magnitude_f0(980)0"> 167 <Parameter Type="Phase" Name="Phase_f0(980)0"> 171 <Amplitude Class="SequentialAmplitude"> 172 <Amplitude Class="HelicityDecay"> 173 <DecayParticle Name="f0(980)" Helicity="0"/> 174 <RecoilSystem FinalState="2" /> 176 <Particle Name="pi+" FinalState="0" Helicity="0"/> 177 <Particle Name="pi-" FinalState="1" Helicity="0"/> 199 std::vector<ComPWA::pid> InitialState,
200 std::vector<ComPWA::pid> FinalState,
201 const boost::property_tree::ptree &ModelTree) {
203 ParticleList, InitialState, FinalState,
219 auto Intensity = Builder.createIntensity();
233 int main(
int argc,
char **argv) {
238 Logging Log(
"log.txt",
"debug");
240 std::stringstream ModelStream;
247 std::vector<pid> InitialState({11, -11});
248 std::vector<pid> FinalState({211, -211, 443});
257 xml_parser::read_xml(ModelStream, ModelTr);
260 1000, 4.230, 123,
ParticleList, InitialState, FinalState, ModelTr);
268 xml_parser::read_xml(ModelStream, ModelTree4260);
271 1000, 4.260, 456,
ParticleList, InitialState, FinalState, ModelTree4260);
277 std::pair<ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList>>
284 auto LogLHSumEstimator =
286 std::move(Estimators));
298 auto FitResult = Optimizer.optimize(std::get<0>(LogLHSumEstimator),
299 std::get<1>(LogLHSumEstimator));
306 std::ofstream OutputStream(
"fitResult.xml");
307 boost::archive::xml_oarchive Archive(OutputStream);
308 Archive << BOOST_SERIALIZATION_NVP(
FitResult);
315 "plot.root",
"RECREATE");
318 PlotData4230.writeIntensityWeightedPhspSample(
323 "plot.root",
"UPDATE");
326 PlotData4260.writeIntensityWeightedPhspSample(
ComPWA::Physics::HelicityFormalism::HelicityKinematics Kinematics
ComPWA four momentum class.
EventCollection generatePhsp(unsigned int NumberOfEvents, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::UniformRealNumberGenerator &RandomGenerator)
std::string ModelSqrtS4260
Wrapper of the Minuit2 Optimizer library.
std::string MyParticleList
ParticleList readParticles(std::stringstream &Stream)
Read list of particles from a stringstream For some reason the boost xml parser needs a non-const ref...
ComPWA::EventCollection PhspSample
Some useful functions for Monte-Carlo event generation.
ComPWA::FunctionTree::FunctionTreeIntensity Intensity
std::set< ParticleProperties > ParticleList
std::pair< ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList > createMinLogLHFunctionTreeEstimator(ComPWA::FunctionTree::FunctionTreeIntensity &Intensity, const ComPWA::Data::DataSet &DataSample)
Data structure which resembles a general fit result.
EnergyParameters createEnergyPar(size_t NumberOfEvents, double SqrtS, int Seed, ComPWA::ParticleList ParticleList, std::vector< ComPWA::pid > InitialState, std::vector< ComPWA::pid > FinalState, const boost::property_tree::ptree &ModelTree)
void insertParticles(ParticleList &list, const boost::property_tree::ptree &pt)
Read list of particles from a boost::property_tree.
std::string ModelSqrtS4230
ComPWA::Data::DataSet Points
EventCollection generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator)
int main(int argc, char **argv)
Simultaneous fit of multiple energy points of the reaction .
Logging class provides an interface for logging all over the framework.
ComPWA::EventCollection DataSample
std::tuple< FunctionTreeEstimator, FitParameterList > createSumMinLogLHFunctionTreeEstimator(std::vector< std::pair< ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList >> Estimators)