This Julia package is specifically crafted for creating Dalitz plots, providing users with the capability to visualize the three-body decays of particles by specifying amplitudes. With this package, users enjoy a high degree of flexibility in adjusting amplitude settings, allowing them to tailor the plots to meet their specific needs.
Please note that this package is designed for theoretical calculations of Dalitz plots and is not intended for the analysis of experimental data.
The cross section, denoted by
Here,
The flux factor
For decay width, the flux factor is modified to
To install the "DalitzPlot" package, you can follow the standard Julia package manager procedure. Open Julia and use the following commands:
Using the Julia REPL
Pkg.add("DalitzPlot")
using DalitzPlot
Alternatively, if you want to install it directly from the GitHub repository:
Using the Julia REPL:
import Pkg
Pkg.add(url="https://github.com/junhe1979/DalitzPlot.jl")
using DalitzPlot
Or, in the Julia package manager (Pkg) prompt:
pkg> add "https://github.com/junhe1979/DalitzPlot.jl"
using DalitzPlot
These commands will install the "DalitzPlot" package and allow you to use it in your Julia environment.
Users are required to supply amplitudes with factors amp
here.
We can take it as 1ใ
amp(tecm, kf, ch, para)=1.
Define more intricate amplitudes for a 2->3 process.
This function, named amp
, calculates amplitudes with factors for a 2->3 process. The input parameters are:
tecm
: Total energy in the center-of-mass frame.kf
: Final momenta generated.ch
: Information about the process (to be defined below).para
: Additional parameters.
Users are expected to customize the amplitudes within this function according to their specific requirements.
function amp(tecm, kf, ch, para)
# get kf as momenta in the center-of-mass ,
#k1,k2,k3=getkf(kf)
#get kf as momenta in laboratory frame
k1, k2, k3 = getkf(para.p, kf, ch)
# Incoming particle momentum
# Center-of-mass frame: p1 = [p 0.0 0.0 E1]
#p1, p2 = pcm(tecm, ch.mi)
# Laboratory frame
p1, p2 = plab(para.p, ch.mi)
#flux
#flux factor for cross section in Laboratory frame
fac = 1 / (4 * para.p * ch.mi[2] * (2 * pi)^5)
k12 = k1 + k2
s12 = cdot(k12, k12)
m = 3.2
A = 1e9 / (s12 - m^2 + im * m * 0.1)
total = abs2(A) * fac* 0.389379e-3
return total
The mass of initial and final particles is specified in a NamedTuple (named ch
here) with fields mi
and mf
.
Particle names can also be provided for PlotD as namei
and namef
.
The function for amplitudes with factors is saved as amp
.
Example usage:
ch = (mi=[mass_i_1, mass_i_2], mf=[mass_f_1, mass_f_2, mass_f_3], namei=["p^i_{1}", "p^i_{2}"], namef=["p^f_{1}", "p^f_{2}", "p^f_{3}"], amp=amp)
Make sure to replace mass_i_1
, mass_i_2
, mass_f_1
, mass_f_2
, and mass_f_3
with the actual masses of the particles (1.0, 1.0, 1.0, 2.0, 3.0 here).
Momentum in the Laboratory frame and transfer it to the total energy in the center-of-mass frame.
Example usage:
p_lab = 20.0
tecm = pcm(p_lab, ch.mi)
Calculate the cross section and related spectra using the GENEV function.
The function Xsection
takes the momentum of the incoming particle in the Laboratory frame (p_lab
), the information about the particles (ch
), the axes representing invariant masses (axes
), the total number of events (nevtot
), the number of bins (Nbin
), and additional parameters (para
). The function uses the plab2pcm function to transform the momentum from the Laboratory frame to the center-of-mass frame.
Example usage:
res = Xsection(plab2pcm(p_lab, ch.mi), ch, axes=[23, 21], nevtot=Int64(1e7), Nbin=500, para=(p=p_lab, l=1.0), ProgressBars=true)
The results are stored in the variable res
as a NamedTuple
. Specifically, res.cs0
corresponds to the total cross section, res.cs1
represents the invariant mass spectrum, and res.cs2
captures the data for the Dalitz plot.
plotD(res)