diff --git a/data/observable-references.yaml b/data/observable-references.yaml index 89cb3c97..503b1feb 100644 --- a/data/observable-references.yaml +++ b/data/observable-references.yaml @@ -26,3 +26,15 @@ Default amplitude model: D(1232): 28.60 ± 0.29 ± 0.76 ± 0.16 D(1600): 4.5 ± 0.3 ± 1.5 ± 0.1 D(1700): 3.90 ± 0.20 ± 0.94 ± 0.07 +Point cross-check: + variables: + m2pk: 3.64862611 + m2kpi: 0.79807035 + pk_theta_r: 1.06382395 + pk_theta_p: -1.33775751 + ppi_theta_r: -0.487513 + ppi_theta_p: 1.11390452 + kpi_theta_k: 1.82134117 + p4p: [0.0, 0.0, 0.68416827, 1.16122377] + p4pi: [-0.28022697, 0.0, -0.1556354, 0.34961317] + p4k: [0.28022697, 0.0, -0.52853287, 0.77562306] diff --git a/julia/notebooks/eulerangles.jl b/julia/notebooks/eulerangles.jl index 9be39dfe..ee063982 100644 --- a/julia/notebooks/eulerangles.jl +++ b/julia/notebooks/eulerangles.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.11 +# v0.19.12 using Markdown using InteractiveUtils @@ -12,168 +12,348 @@ begin Pkg.activate(".") Pkg.instantiate() # - using Plots + import YAML + using Plots using RecipesBase # using LinearAlgebra using Parameters # using ThreeBodyDecay + using Lc2ppiKModelLHCb end -# ╔═╡ d65ed080-9654-11ec-0a8e-e530b9164a8c -Rz(p, θ) = [p[1] * cos(θ) - p[2] * sin(θ), p[2] * cos(θ) + p[1] * sin(θ), p[3]] +# ╔═╡ 049886e5-0839-4dce-9621-32cce58132f5 +md""" +# Studies of the polarization angles +""" -# ╔═╡ 9beb287e-91ee-4a01-b803-5686576cf087 -Ry(p, cθ, sθ) = [p[1] * cθ + p[3] * sθ, p[2], p[3] * cθ - p[1] * sθ] +# ╔═╡ 814a7e2b-60f5-4775-bed5-8ef54f02252e +theme(:wong2, frame=:box, grid=false, minorticks=true, + guidefontvalign=:top, guidefonthalign=:right, + xlim=(:auto, :auto), ylim=(:auto, :auto), + lw=1, lab="", colorbar=false) -# ╔═╡ 55cf2a64-dd00-461a-ab93-cad2ef71fbb0 -Ry(p, θ) = [p[1] * cos(θ) + p[3] * sin(θ), p[2], p[3] * cos(θ) - p[1] * sin(θ)] +# ╔═╡ 4a5e2b92-37fc-494b-8c00-d8a339ce7bcb +begin + const ms = Lc2ppiKModelLHCb.ms + const ms² = ms^2 ; + ms +end -# ╔═╡ f341c6fd-4b7a-4497-acf8-f343a95e9521 +# ╔═╡ 01777f79-392c-46d2-8dc7-b28cc8a6fc7a begin - Rz(θ) = x -> Rz(x, θ) - Ry(θ) = x -> Ry(x, θ) + refs = YAML.load_file(joinpath("..", "data", "observable-references.yaml")) + pointvariables = Dict{String,Any}(refs["Point cross-check"]["variables"]) end -# ╔═╡ 4a5e2b92-37fc-494b-8c00-d8a339ce7bcb -const ms = ThreeBodyMasses(0.938272046, 0.13957018, 0.493677; m0=2.28646) +# ╔═╡ ec44a76a-0079-4e76-b9f0-b60b649445c9 +begin + @unpack m2pk, m2kpi = pointvariables + σs0 = Invariants(ms, σ1=m2kpi, σ2=m2pk) +end -# ╔═╡ 570f8ee0-7c75-4c93-bc3a-debab0b81874 -const ms² = ms^2 +# ╔═╡ d65ed080-9654-11ec-0a8e-e530b9164a8c +begin + Rz(p, θ) = [p[1] * cos(θ) - p[2] * sin(θ), p[2] * cos(θ) + p[1] * sin(θ), p[3]] + Ry(p, cθ, sθ) = [p[1] * cθ + p[3] * sθ, p[2], p[3] * cθ - p[1] * sθ] + Ry(p, θ) = [p[1] * cos(θ) + p[3] * sin(θ), p[2], p[3] * cos(θ) - p[1] * sin(θ)] + + Rz(θ) = x -> Rz(x, θ) + Ry(θ) = x -> Ry(x, θ) + R(ϕ, θ, χ) = x -> R(x, ϕ, θ, χ) + + Ry(ps::NamedTuple{(:p1,:p2,:p3)}, θ) = + (; p1=Ry(ps.p1,θ), p2=Ry(ps.p2,θ), p3=Ry(ps.p3,θ)) + # + function R(ps::NamedTuple{(:p1,:p2,:p3)}, ϕ, θ, χ) + @unpack p1, p2, p3 = ps + p1′ = p1 |> Rz(χ) |> Ry(θ) |> Rz(ϕ) + p2′ = p2 |> Rz(χ) |> Ry(θ) |> Rz(ϕ) + p3′ = p3 |> Rz(χ) |> Ry(θ) |> Rz(ϕ) + (; p1=p1′, p2=p2′, p3=p3′) + end +end; # ╔═╡ 1a0a3c20-0990-4a7d-8395-941bf34ac9e3 +""" + constructaligned(σs) + +Constructs four vectors using the aligned configuration-1 +""" function constructinvariants(σs) - p₁ = sqrt(Kallen(ms.m0^2, ms[1]^2, σs[1])) / (2ms.m0) - p₂ = sqrt(Kallen(ms.m0^2, ms[2]^2, σs[2])) / (2ms.m0) - p₃ = sqrt(Kallen(ms.m0^2, ms[3]^2, σs[3])) / (2ms.m0) + p₁ = sqrtKallenFact(ms.m0, ms[1], sqrt(σs[1])) / (2ms.m0) + p₂ = sqrtKallenFact(ms.m0, ms[2], sqrt(σs[2])) / (2ms.m0) + p₃ = sqrtKallenFact(ms.m0, ms[3], sqrt(σs[3])) / (2ms.m0) # - p1 = [0, 0, p₁] + p1 = [0, 0, -p₁] p2 = (c = cosζ(wr(1, 2, 0), σs, ms²); - Ry([0, 0, p₂], c, -sqrt(1 - c^2))) + Ry([0, 0, -p₂], c, -sqrt(1 - c^2))) p3 = (c = cosζ(wr(3, 1, 0), σs, ms²); - Ry([0, 0, p₃], c, sqrt(1 - c^2))) + Ry([0, 0, -p₃], c, sqrt(1 - c^2))) return (; p1, p2, p3) end +# ╔═╡ 30b38727-cf5b-46f5-8aaf-7b5b7dc0d3a9 +begin + ps = constructinvariants(σs0) + plot() + map(enumerate(ps)) do (i,p) + plot!([0, [1im, 0, 1]' * p], arrow=true, lab="\$p_$i\$", lw=3) + end + plot!(xlab="\$p_z\$", ylab="\$p_x\$") +end + # ╔═╡ 34de7c63-83db-4247-b904-1eaa5822af18 md""" -### LHCb-PAPER-2022-002 relations +## Check of PAPER-2022-002 relations + +The decay amplitude in the LHCb amplitude analysis is written using the DPD, + +$T_{m,\lambda}= \sum_\nu D_{m,\nu}^{1/2*}(\phi_p,\theta_p,\chi) O^{\nu}_\lambda(m_{pK}^2, m_{K\pi}^2)$ + +The overall rotation align the decay vectors with the $xz$ plane, such that $\vec{p}_p \uparrow\uparrow \vec{z}$. """ # ╔═╡ 9a793648-ae8f-465d-9a55-0735a16fd1db function alteulerangles(p1′, p2′, p3′) ϕp = atan(p1′[2], p1′[1]) θp = acos(p1′[3] / norm(p1′)) - χ = atan((p1′×p3′)[3], -(p1′×p3′×p1′)[3] / norm(p1′)) + χK = atan((p1′ × p3′)[3], -(p1′ × p3′ × p1′)[3] / norm(p1′)) # - (; ϕp, θp, χ) + (; ϕp, θp, χK) end -# ╔═╡ 89d46224-82a3-4b53-b17e-4fb7ba702202 +# ╔═╡ 8d02d7fd-c45c-4ef1-9deb-c24686eef822 md""" -## Systematic check +### Check-1: +Construction of the momenta in the aligned configuration +""" + +# ╔═╡ 47f54ed9-5f87-4e21-a309-62eddfaeb2e6 +ps0 = constructinvariants(σs0) |> Ry(π) + +# ╔═╡ 36526f74-2e4c-44c1-8097-67553277ed83 +let + @unpack p4p, p4pi, p4k = pointvariables + isapprox(ps0.p1, p4p[1:3]; atol=1e-8), + isapprox(ps0.p2, p4pi[1:3]; atol=1e-8), + isapprox(ps0.p3, p4k[1:3]; atol=1e-8) +end |> x->x=>(prod(x) && "✔") + +# ╔═╡ b149fad4-efd0-4f03-82fe-0a8ccc587641 +md""" +#### Check-2: +Here, we validate that the rotation (ϕp, θp, χ) matches the standard DPD rotation (ϕ1, θ1, ϕ23) up to Ry(π). The plane is the same! """ # ╔═╡ 6fbb3423-090b-4e11-912c-902ccb6ab43a -function checkconsistency(σs; ϕ1, θ1, ϕ23) - (; p1, p2, p3) = constructinvariants(σs) - p1′ = p1 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - p2′ = p2 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - p3′ = p3 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - (; ϕp, θp, χ) = alteulerangles(p1′, p2′, p3′) - # - (ϕ1 ≈ ϕp) * 100 + (θ1 ≈ θp) * 10 + (ϕ23 ≈ χ) +begin + function checkconsistency(σs; ϕ1, θ1, ϕ23) + ps = constructinvariants(σs) |> Ry(π) + @unpack p1, p2, p3 = ps |> R(ϕ1, θ1, ϕ23) + @unpack ϕp, θp, χK = alteulerangles(p1, p2, p3) + # + (ϕ1 ≈ ϕp) * 100 + (θ1 ≈ θp) * 10 + (ϕ23 ≈ χK) + end + # + σsv = flatDalitzPlotSample(ms; Nev=10) + (checkconsistency.(σsv; ϕ1=-0.3, θ1=1.3, ϕ23=-0.4) .== 111) |> + x->x=>(prod(x) && "✔") end -# ╔═╡ f66d17ab-3022-4fe4-83de-8604cf8f69fb -σsv = flatDalitzPlotSample(ms; Nev=10_000) +# ╔═╡ c3dada83-3380-4564-aa3c-5bda1632bd80 +md""" +#### Check-3: +The angle-mapping relations are checked: +```math +\begin{align} + &&\bar{\theta}_K &= \theta_{23}\,,\\ \nonumber + \theta_{\Lambda} &= \pi - \zeta^0_{1(2)}\,,&\theta_p^{\Lambda} &= -(\pi - \theta_{31})\,, \\ \nonumber + \theta_{\Delta} &= -(\pi-\zeta^0_{3(1)})\,,&\theta_p^{\Delta} &= \theta_{12}\,. +\end{align} +``` +""" + +# ╔═╡ 30e6011a-a3c6-4080-a097-78424eafd6bc +begin # computed the DPD angles + θ12 = acos(cosθ12(σs0, ms²)) + θ23 = acos(cosθ23(σs0, ms²)) + θ31 = acos(cosθ31(σs0, ms²)) + # + ζ⁰12 = acos(cosζ(wr(1, 2, 0), σs0, ms²)) + ζ⁰31 = acos(cosζ(wr(3, 1, 0), σs0, ms²)) +end ; -# ╔═╡ c916fcc4-f570-4358-8030-7ca8de594d8b -prod(checkconsistency.(σsv; ϕ1=-0.3, θ1=π - 0.1, ϕ23=-0.4) .== 111) +# ╔═╡ cca593e6-be26-4d96-bb0c-035e38e9ebb5 +begin # get 2022-002 angles + @unpack pk_theta_r, pk_theta_p = pointvariables + @unpack ppi_theta_r, ppi_theta_p = pointvariables + @unpack kpi_theta_k = pointvariables +end; -# ╔═╡ 069f91af-0f1c-45d0-bc29-2f3da4506232 +# ╔═╡ a588bcfd-fe75-44f7-ac58-88f7039e7584 +begin # compare + kpi_theta_k ≈ θ23, + # + pk_theta_p ≈ -(π - θ31), + pk_theta_r ≈ π - ζ⁰12, + # + ppi_theta_p ≈ θ12, + ppi_theta_r ≈ -(π - ζ⁰31) +end |> x->x=>(prod(x) && "✔") + +# ╔═╡ 1780255f-65ac-4e82-ba82-0a549b65c4e2 md""" -### Vectors for the crosscheck +### Euler angles from the scalar products + +Numerical check of the expressions for the angles +```math +\begin{align} + \phi &= \arctan(-(\vec{p}_P \times \vec{p}_X) \cdot \vec p_D, (-(\vec{p}_P \times \vec{p}_X) \times \frac{-\vec{p}_X}{|\vec{p}_X|}) \cdot \vec p_D)\,,\\ \nonumber + \theta &= \arccos(\frac{\vec p_X \cdot \vec p_D}{|\vec p_X|\,|\vec p_D|})\,,\\ \nonumber + \chi &= \arctan((\vec{p}_X \times \vec{p}_D) \cdot \vec p_B, ((\vec{p}_X \times \vec{p}_D) \times \frac{-\vec{p}_D}{|\vec{p}_D|}) \cdot \vec p_B)\,. +\end{align} +``` +""" + +# ╔═╡ 01618641-7f67-4946-836f-8efe92c7ec36 """ + eulerfromalgebra(_pD, _pB, + _pX=[0,0,-1], # -z axes, + _pP = [1,0,0] # x axes + ) -# ╔═╡ 3e2a95ce-b7e9-419a-85eb-c025847ae8ae -function rotatedfv(σs; ϕ1, θ1, ϕ23) - (; p1, p2, p3) = constructinvariants(σs) - p1′ = p1 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - p2′ = p2 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - p3′ = p3 |> Rz(ϕ23) |> Ry(θ1) |> Rz(ϕ1) - return (p1′, p2′, p3′) +Computation of the Euler angles for the process A → B+C+D, +produced in the reaction P+Q → A+X +""" +function eulerfromalgebra(_pD, _pB, + _pX=[0,0,-1], # -z axes, + _pP = [1,0,0] # x axes + ) + pP, pX, pD, pB = _pP[1:3], _pX[1:3] ,_pD[1:3], _pB[1:3] + # + ϕ = atan(-(pP × pX) · pD, (-(pP × pX) × (-pX) ./ norm(pX)) · pD) + θ = acos((pX · pD) / norm(pX) / norm(pD)) + χ = atan((pX × pD) · pB, ((pX × pD) × -pD ./ norm(pD)) · pB) + (; ϕ, θ, χ) end -# ╔═╡ ec44a76a-0079-4e76-b9f0-b60b649445c9 -σs0 = Invariants(ms, - σ1=0.7980703453578917, - σ2=3.6486261122281745) +# ╔═╡ 6f8deba2-b45d-42e4-9424-ccbd98f9c9c1 +let + angles = (ϕ1=-0.3, θ1=3.0, ϕ23=-0.4) + pD, pB, pC = constructinvariants(σs0) |> R(angles...) + ϕθχ = eulerfromalgebra(pD, pB, [0,0,-1], [1,0,0]) + # + (collect(angles) .≈ collect(ϕθχ)) +end |> x->x=>(prod(x) && "✔") -# ╔═╡ b017b80b-44f0-4cb7-bf9c-c8511fd976cf -with_terminal() do - println.(rotatedfv(σs0; ϕ1=-0.3, θ1=π - 0.1, ϕ23=-0.4)) -end +# ╔═╡ eb6ed071-2a2a-41b6-9afa-637e1608ac51 +md""" +### CP conjugation +""" -# ╔═╡ 30b38727-cf5b-46f5-8aaf-7b5b7dc0d3a9 -p1, p2, p3 = constructinvariants(σs0) +# ╔═╡ a1b0bfdc-84ad-4075-b5f5-c924c0f42dee +md""" +#### First test: flipping $p$, $K$ and $\pi$ momenta in $\Lambda_c^+$ rest frame +The following cell validates the transformation of the angles under parity flip of the three-vectors in the $\Lambda_c^+$ rest frame. +```math +\begin{align} +\phi &\to \left\{ +\begin{array}{} +\pi+\phi &\text{ for } \phi < 0,\\ +-\pi+\phi &\text{ for } \phi > 0 +\end{array} +\right. +\\ +\theta&\to \pi-\theta \\ +\chi &\to +\left\{ +\begin{array}{} +-\pi-\chi &\text{ for } \chi < 0,\\ + \pi-\chi &\text{ for } \chi > 0 +\end{array} +\right. +\end{align} +``` +""" -# ╔═╡ 47f54ed9-5f87-4e21-a309-62eddfaeb2e6 +# ╔═╡ 060dfd12-7f22-483b-9189-6df247c9850e begin - p4p = [0.0, 0.0, 0.68416827, 1.16122377] - p4pi = [-0.28022697, 0.0, -0.1556354, 0.34961317] - p4k = [0.28022697, 0.0, -0.52853287, 0.77562306] -end + mapϕ(ϕ) = π+ϕ - 2π*(ϕ>0) + mapθ(θ) = π-θ + mapχ(χ) = -π-χ + 2π*(χ>0) +end ; -# ╔═╡ 0485c5fd-1ee2-4d57-a222-ca31044b1b63 -begin - # Lambda - pk_theta_r = 1.06382395 - pk_theta_p = -1.33775751 +# ╔═╡ 77eab378-4677-4349-91e3-2d3b81c1e466 +let # 3 angles x 10 tries + mapslices(rand(3,10), dims=1) do r + angles = NamedTuple{(:ϕ1, :θ1, :ϕ23)}(r .* [2π, π, 2π] .- [π,0,π]) + pD, pB, pC =constructinvariants(σs0) |> R(angles...) + # the xz axes remain, the vectors are flipped + ϕ, θ, χ = eulerfromalgebra(-pD, -pB, [0,0,-1], [1,0,0]) + # + mapϕ(angles.ϕ1) ≈ ϕ && mapθ(angles.θ1) ≈ θ && mapχ(angles.ϕ23) ≈ χ + end +end |> x->x=>(prod(x) && "✔") - # Delta - ppi_theta_r = -0.487513 - ppi_theta_p = 1.11390452 - # - kpi_theta_k = 1.82134117 - # - # m2ppi: 1.92475412 - # m2pk: 3.64862611 - # m2kpi: 0.79807035 -end +# ╔═╡ 7ed18287-8b9f-42b1-8504-1b03bd3c6bda +md""" +#### Second test: flipping all vectors +""" -# ╔═╡ a588bcfd-fe75-44f7-ac58-88f7039e7584 +# ╔═╡ f114f585-bce6-4455-82c8-b9911d861e1a begin - kpi_theta_k ≈ acos(cosθ23(σs0, ms²)), - # - pk_theta_p ≈ -(π - acos(cosθ31(σs0, ms²))), - pk_theta_r ≈ π - acos(cosζ(wr(1, 2, 0), σs0, ms²)), - # - ppi_theta_p ≈ acos(cosθ12(σs0, ms²)), - ppi_theta_r ≈ -(π - acos(cosζ(wr(3, 1, 0), σs0, ms²))) -end + mapϕ′(ϕ) = -ϕ + mapθ′(θ) = θ + mapχ′(χ) = -χ +end ; + +# ╔═╡ 23317a51-223e-44f9-b861-5c3d34736d87 +let # 3 angles x 10 tries + mapslices(rand(3,10), dims=1) do r + angles = NamedTuple{(:ϕ1, :θ1, :ϕ23)}(r .* [2π, π, 2π] .- [π,0,π]) + pD, pB, pC =constructinvariants(σs0) |> R(angles...) + # the xz axes remain, the vectors are flipped + pD′ = -pD |> Ry(π) + pB′ = -pB |> Ry(π) + pX′ = -[0,0,-1] |> Ry(π) + pP′ = -[1,0,0] |> Ry(π) + # + ϕ, θ, χ = eulerfromalgebra(pD′, pB′, pX′, pP′) + # + mapϕ′(angles.ϕ1) ≈ ϕ && mapθ′(angles.θ1) ≈ θ && mapχ′(angles.ϕ23) ≈ χ + end +end |> x->x=>(prod(x) && "✔") # ╔═╡ Cell order: +# ╟─049886e5-0839-4dce-9621-32cce58132f5 # ╠═b56fc9a7-fa03-47d6-b22e-0097be7155d3 -# ╠═d65ed080-9654-11ec-0a8e-e530b9164a8c -# ╠═9beb287e-91ee-4a01-b803-5686576cf087 -# ╠═55cf2a64-dd00-461a-ab93-cad2ef71fbb0 -# ╠═f341c6fd-4b7a-4497-acf8-f343a95e9521 +# ╠═814a7e2b-60f5-4775-bed5-8ef54f02252e # ╠═4a5e2b92-37fc-494b-8c00-d8a339ce7bcb -# ╠═570f8ee0-7c75-4c93-bc3a-debab0b81874 +# ╠═01777f79-392c-46d2-8dc7-b28cc8a6fc7a +# ╠═ec44a76a-0079-4e76-b9f0-b60b649445c9 +# ╠═d65ed080-9654-11ec-0a8e-e530b9164a8c # ╠═1a0a3c20-0990-4a7d-8395-941bf34ac9e3 +# ╟─30b38727-cf5b-46f5-8aaf-7b5b7dc0d3a9 # ╟─34de7c63-83db-4247-b904-1eaa5822af18 # ╠═9a793648-ae8f-465d-9a55-0735a16fd1db -# ╟─89d46224-82a3-4b53-b17e-4fb7ba702202 -# ╠═6fbb3423-090b-4e11-912c-902ccb6ab43a -# ╠═f66d17ab-3022-4fe4-83de-8604cf8f69fb -# ╠═c916fcc4-f570-4358-8030-7ca8de594d8b -# ╟─069f91af-0f1c-45d0-bc29-2f3da4506232 -# ╠═3e2a95ce-b7e9-419a-85eb-c025847ae8ae -# ╠═ec44a76a-0079-4e76-b9f0-b60b649445c9 -# ╠═b017b80b-44f0-4cb7-bf9c-c8511fd976cf -# ╠═30b38727-cf5b-46f5-8aaf-7b5b7dc0d3a9 +# ╟─8d02d7fd-c45c-4ef1-9deb-c24686eef822 # ╠═47f54ed9-5f87-4e21-a309-62eddfaeb2e6 -# ╠═0485c5fd-1ee2-4d57-a222-ca31044b1b63 +# ╠═36526f74-2e4c-44c1-8097-67553277ed83 +# ╟─b149fad4-efd0-4f03-82fe-0a8ccc587641 +# ╠═6fbb3423-090b-4e11-912c-902ccb6ab43a +# ╟─c3dada83-3380-4564-aa3c-5bda1632bd80 +# ╠═30e6011a-a3c6-4080-a097-78424eafd6bc +# ╠═cca593e6-be26-4d96-bb0c-035e38e9ebb5 # ╠═a588bcfd-fe75-44f7-ac58-88f7039e7584 +# ╟─1780255f-65ac-4e82-ba82-0a549b65c4e2 +# ╠═01618641-7f67-4946-836f-8efe92c7ec36 +# ╠═6f8deba2-b45d-42e4-9424-ccbd98f9c9c1 +# ╟─eb6ed071-2a2a-41b6-9afa-637e1608ac51 +# ╟─a1b0bfdc-84ad-4075-b5f5-c924c0f42dee +# ╠═060dfd12-7f22-483b-9189-6df247c9850e +# ╠═77eab378-4677-4349-91e3-2d3b81c1e466 +# ╟─7ed18287-8b9f-42b1-8504-1b03bd3c6bda +# ╠═f114f585-bce6-4455-82c8-b9911d861e1a +# ╠═23317a51-223e-44f9-b861-5c3d34736d87