17 #include <boost/archive/xml_iarchive.hpp> 18 #include <boost/archive/xml_oarchive.hpp> 19 #include <boost/property_tree/ptree.hpp> 20 #include <boost/property_tree/xml_parser.hpp> 50 <Intensity Class="NormalizedIntensity"> 51 <IntegrationStrategy Class="MCIntegrationStrategy"/> 52 <Intensity Class="CoherentIntensity" Component="jpsiGammaPiPi"> 53 <Amplitude Class="CoefficientAmplitude" Component="f2(1270)"> 54 <Parameter Class='Double' Type="Magnitude" Name="Magnitude_f2"> 60 <Parameter Class='Double' Type="Phase" Name="Phase_f2"> 66 <Amplitude Class="NormalizedAmplitude"> 67 <IntegrationStrategy Class="MCIntegrationStrategy"/> 68 <Amplitude Class="HelicityDecay"> 69 <DecayParticle Name="f2(1270)" Helicity="0"/> 70 <RecoilSystem FinalState="0" /> 72 <Particle Name="pi0" FinalState="1" Helicity="0"/> 73 <Particle Name="pi0" FinalState="2" Helicity="0"/> 78 <Amplitude Class="CoefficientAmplitude" Component="myAmp"> 79 <Parameter Class='Double' Type="Magnitude" Name="Magnitude_my"> 85 <Parameter Class='Double' Type="Phase" Name="Phase_my`"> 91 <Amplitude Class="NormalizedAmplitude"> 92 <IntegrationStrategy Class="MCIntegrationStrategy"/> 93 <Amplitude Class="HelicityDecay" > 94 <DecayParticle Name="myRes" Helicity="0"/> 95 <RecoilSystem FinalState="0" /> 97 <Particle Name="pi0" FinalState="1" Helicity="0"/> 98 <Particle Name="pi0" FinalState="2" Helicity="0"/> 109 <Particle Name="J/psi"> 111 <Parameter Type="Mass" Name="Mass_jpsi"> 112 <Value>3.096900</Value> 115 <QuantumNumber Class="Spin" Type="Spin" Value="1" /> 116 <QuantumNumber Class="Int" Type="Charge" Value="0" /> 117 <QuantumNumber Class="Int" Type="Parity" Value="-1" /> 118 <QuantumNumber Class="Int" Type="Cparity" Value="-1" /> 119 <QuantumNumber Class="Int" Type="Gparity" Value="-1" /> 120 <QuantumNumber Class="Spin" Type="IsoSpin" Value="0" Projection="0" /> 121 <QuantumNumber Class="Int" Type="BaryonNumber" Value="0" /> 122 <QuantumNumber Class="Int" Type="Charm" Value="0" /> 123 <QuantumNumber Class="Int" Type="Strangeness" Value="0" /> 124 <DecayInfo Type="relativisticBreitWigner"> 125 <FormFactor Type="0" /> 126 <Parameter Type="Width" Name="Width_jpsi"> 127 <Value>9.29E-05</Value> 130 <Parameter Type="MesonRadius" Name="Radius_jpsi"> 138 <Particle Name="pi0"> 140 <Parameter Type="Mass" Name="Mass_neutralPion"> 141 <Value>0.1349766</Value> 142 <Error>0.000006</Error> 144 <QuantumNumber Class="Spin" Type="Spin" Value="0" /> 145 <QuantumNumber Class="Int" Type="Charge" Value="0" /> 146 <QuantumNumber Class="Int" Type="Parity" Value="-1" /> 147 <QuantumNumber Class="Int" Type="Cparity" Value="1" /> 148 <QuantumNumber Class="Int" Type="Gparity" Value="-1" /> 149 <QuantumNumber Class="Spin" Type="IsoSpin" Value="1" Projection="0" /> 150 <QuantumNumber Class="Int" Type="BaryonNumber" Value="0" /> 151 <QuantumNumber Class="Int" Type="Charm" Value="0" /> 152 <QuantumNumber Class="Int" Type="Strangeness" Value="0" /> 154 <Particle Name="gamma"> 156 <Parameter Type="Mass" Name="Mass_gamma"> 159 <QuantumNumber Class="Spin" Type="Spin" Value="1" /> 160 <QuantumNumber Class="Int" Type="Charge" Value="0" /> 161 <QuantumNumber Class="Int" Type="Parity" Value="-1" /> 162 <QuantumNumber Class="Int" Type="Cparity" Value="-1" /> 163 <QuantumNumber Class="Spin" Type="IsoSpin" Value="0" Projection="0" /> 164 <QuantumNumber Class="Int" Type="BaryonNumber" Value="0" /> 165 <QuantumNumber Class="Int" Type="Charm" Value="0" /> 166 <QuantumNumber Class="Int" Type="Strangeness" Value="0" /> 168 <Particle Name="f2(1270)"> 170 <Parameter Class='Double' Type="Mass" Name="Mass_f2(1270)"> 171 <Value>1.2755</Value> 172 <Error>8.0E-04</Error> 177 <QuantumNumber Class="Spin" Type="Spin" Value="2"/> 178 <QuantumNumber Class="Int" Type="Charge" Value="0"/> 179 <QuantumNumber Class="Int" Type="Parity" Value="+1"/> 180 <QuantumNumber Class="Int" Type="Cparity" Value="+1"/> 181 <DecayInfo Type="relativisticBreitWigner"> 182 <FormFactor Type="0" /> 183 <Parameter Class='Double' Type="Width" Name="Width_f2(1270)"> 184 <Value>0.1867</Value> 186 <Parameter Class='Double' Type="MesonRadius" Name="Radius_rho"> 192 <Particle Name="myRes"> 194 <Parameter Class='Double' Type="Mass" Name="Mass_myRes"> 196 <Error>8.0E-04</Error> 201 <QuantumNumber Class="Spin" Type="Spin" Value="1"/> 202 <QuantumNumber Class="Int" Type="Charge" Value="0"/> 203 <QuantumNumber Class="Int" Type="Parity" Value="+1"/> 204 <QuantumNumber Class="Int" Type="Cparity" Value="+1"/> 205 <DecayInfo Type="relativisticBreitWigner"> 206 <FormFactor Type="0" /> 207 <Parameter Class='Double' Type="Width" Name="Width_myRes"> 213 <Parameter Class='Double' Type="MesonRadius" Name="Radius_myRes"> 233 int main(
int argc,
char **argv) {
235 Logging Log(
"debug",
"DalitzFit-log.txt");
244 std::vector<pid> InitialState = {443};
245 std::vector<pid> FinalState = {22, 111, 111};
262 std::stringstream ModelStream;
264 boost::property_tree::ptree ModelTree;
265 boost::property_tree::xml_parser::read_xml(ModelStream, ModelTree);
269 Particles, Kinematics, ModelTree.get_child(
"Intensity"), PhspSample);
270 auto Intensity = Builder.createIntensity();
276 Intensity, PhspSample);
278 auto SampleDataSet = Kinematics.
convert(DataSample);
283 Intensity, SampleDataSet);
285 LOG(DEBUG) << Estimator.first.print(25);
291 Optimizer.optimize(std::get<0>(Estimator), std::get<1>(Estimator));
296 auto Components = Builder.createIntensityComponents(
297 {{
"f2(1270)"}, {
"myAmp"}, {
"jpsiGammaPiPi"}});
299 auto MyFractions = {std::make_pair(Components[0], Components[2]),
300 std::make_pair(Components[1], Components[2])};
312 std::ofstream FileStream(
"DalitzFit-fitResult.xml");
313 boost::archive::xml_oarchive Archive(FileStream);
314 Archive << BOOST_SERIALIZATION_NVP(
FitResult);
320 Plot.
fill(DataSample,
true,
"data",
"Data sample", kBlack);
321 Plot.
fill(PhspSample,
false,
"phsp",
"Phsp sample", kGreen);
322 Plot.
fill(PhspSample, Intensity,
false,
"fit",
"jpsiGammaPiPi model", kBlue);
EventCollection generatePhsp(unsigned int NumberOfEvents, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::UniformRealNumberGenerator &RandomGenerator)
std::string MyParticleList
std::string AmplitudeModel
Wrapper of the Minuit2 Optimizer library.
ParticleList readParticles(std::stringstream &Stream)
Read list of particles from a stringstream For some reason the boost xml parser needs a non-const ref...
int main(int argc, char **argv)
Simple Dalitz plot fit of the channel J/psi -> gamma pi0 pi0.
Some useful functions for Monte-Carlo event generation.
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.
The Kinematics interface defines the conversion of Events to a DataSet.
EventCollection generate(unsigned int NumberOfEvents, const ComPWA::Kinematics &Kinematics, const ComPWA::PhaseSpaceEventGenerator &Generator, ComPWA::Intensity &Intensity, ComPWA::UniformRealNumberGenerator &RandomGenerator)
Logging class provides an interface for logging all over the framework.
Interface template for a general Function of the form OutputType Function(InputTypes) The concept clo...