Commit f3ec800f authored by Alessandro 's avatar Alessandro

bayesian av implemented in my branch, new Corr constructor, minor modifications

parent d6bd07c8
......@@ -9,7 +9,7 @@ const ZM_data = [1.9684, 1.9935, 2.0253, 2.0630, 2.0814]
const ZM_error = [35, 27, 33, 38, 45] .* 1e-4
const ZM_tm_data = [2.6047, 2.6181, 2.6312, 2.6339, 2.6127]
const ZM_tm_error = [42, 33, 42, 48, 55] .* 1e-4
# 1808.09236
#1808.09236
const ZA_data = [0.75642, 0.76169, 0.76979, 0.78378, 0.79667]
const ZA_err = [72, 93, 43, 47, 47] .*1e-5
const ZV_data = [0.72259, 0.72845, 0.73886, 0.75574, 0.77074]
......@@ -18,16 +18,21 @@ const ZV_err = [74, 89, 46, 48, 49] .* 1e-5
const ZS_over_ZP_data = [1.3497, 1.2914, 1.2317, 1.1709, 1.1343]
const ZS_over_ZP_err = [83, 64, 48, 23, 25 ] .* 1e-4
#1608.08900
const b_values2 = [3.40, 3.46, 3.55, 3.70]
const t0_data = [2.86, 3.659, 5.164, 8.595]
const t0_error = [11, 16, 18, 29] .* 1e-3
# const b_values2 = [3.40, 3.46, 3.55, 3.70]
const t0_data = [2.86, 3.659, 5.164, 8.595, 14.040]
const t0_error = [11, 16, 18, 29, 49] .* 1e-3
const t0_ph_value = [0.413]
const t0_ph_error = ones(1,1) .* 5e-3
#2101.10969
const RM_data = [2.335, 1.869, 1.523, 1.267, 1.149]
const RM_err = [31, 19, 14, 16, 18] .* 1e-3
#1906.03445 LCP1 for heavy quarks
const BA_MINUS_BP_data = [-0.324, -0.265, -0.196, -0.119, -0.073]
const BA_MINUS_BP_err = [17, 14, 14, 14, 12] .*1e-3
const ZDATA = [0.8981, 0.9468, 1.0015, 1.0612, 1.0971]
const ZERR = [35, 35, 30, 17, 18 ] .* 1e-4
## taking into account correlations in zm_tm
#1802.05243 taking into account correlations in zm_tm
C = [[0.375369e-6, 0.429197e-6, -0.186896e-5] [0.429197e-6, 0.268393e-4, 0.686776e-4] [-0.186896e-5, 0.686776e-4, 0.212386e-3]]
z = cobs([0.348629, 0.020921, 0.070613], C, "z")
ZP(b) = z[1] + z[2] * (b - 3.79) + z[3] * (b - 3.79)^2
......@@ -43,12 +48,15 @@ zm_tm_covar(b) = Mrat / ZP(b)
#Cov matrices
const C1 = zeros(5, 5)
const C2 = zeros(5, 5)
const C3 = zeros(4, 4)
const C3 = zeros(5, 5)
const C4 = zeros(7, 7)
const C5 = zeros(5, 5)
const C6 = zeros(5, 5)
const C7 = zeros(5, 5)
const C8 = zeros(5, 5)
const C9 = zeros(5, 5)
const C10 = zeros(5, 5)
for i = 1:7
C4[i, i] = M_error[i] ^ 2
if i<=5
......@@ -58,9 +66,9 @@ for i = 1:7
C6[i, i] = ZS_over_ZP_err[i] ^ 2
C7[i, i] = ZV_err[i] ^ 2
C8[i, i] = RM_err[i] ^2
if i <= 4
C3[i, i] = t0_error[i] ^ 2
end
C9[i,i] = BA_MINUS_BP_err[i] ^2
C10[i,i] = ZERR[i] ^2
C3[i, i] = t0_error[i] ^ 2
end
end
......@@ -72,14 +80,18 @@ const a_ = t0_ph ./ sqrt.(8 .* t0_)
const M = cobs(M_values, C4, "charmed meson masses")
const Za = cobs(ZA_data, C5, "ZA")
const Zv = cobs(ZV_data, C7, "ZV")
const ZS_over_ZP = cobs(ZS_over_ZP_data, C6, "ZS over ZP")
const ZS_over_ZP = cobs(ZS_over_ZP_data, C6, "ZS/ZP")
const RM = cobs(RM_data, C8, "rm")
const BA_BP = cobs(BA_MINUS_BP_data, C9, "ba-bp")
const ZZ = cobs(ZDATA, C10, "Z")
zm(beta::Float64) = ZM[b_values .== beta][1]
zm_tm(beta::Float64) = ZM_tm[b_values .== beta][1]
t0(beta::Float64) = t0_[b_values2 .== beta][1]
a(beta::Float64) = a_[b_values2 .== beta][1]
t0(beta::Float64) = t0_[b_values .== beta][1]
a(beta::Float64) = a_[b_values .== beta][1]
za(beta::Float64) = Za[b_values .== beta][1]
zv(beta::Float64) = Zv[b_values .== beta][1]
zs_over_zp(beta::Float64) = ZS_over_ZP[b_values .== beta][1]
rm(beta::Float64) = RM[b_values .== beta][1]
\ No newline at end of file
rm(beta::Float64) = RM[b_values .== beta][1]
ba_bp(beta::Float64) = BA_BP[b_values .== beta][1]
Z(beta::Float64) = ZZ[b_values .== beta][1]
\ No newline at end of file
module juobs
using ADerrors, PyPlot, LaTeXStrings, LinearAlgebra, LsqFit, Optim
using ADerrors, PyPlot, LaTeXStrings, LinearAlgebra, LsqFit, Optim, ForwardDiff
using Base: Float64
import Statistics: mean
......
......@@ -35,7 +35,7 @@ function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bo
xlabel(L"$x_0$")
ylim(v-30*e, v+30*e)
# ylim(0.05, 0.075)
#xlim(64,length(y))
xlim(64,length(y))
if !isnothing(kappa)
title(string(L"$\kappa_1 = $", kappa[1], L" $\kappa_2 = $", kappa[2]))
......@@ -108,7 +108,7 @@ function mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca:
# der_a0p = der_a0p + ca * der2_pp
#end
aux = der_a0p ./ ( corr_pp[3:end-2])
aux = der_a0p ./ ( 2. .* corr_pp[3:end-2])
mass = plat_av(aux, plat, wpm)
if pl
isnothing(wpm) ? uwerr(mass) : uwerr(mass, wpm)
......@@ -123,7 +123,7 @@ function mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca:
errorbar(x, y, dy, fmt="x", color="black")
ylabel(L"$m_\mathrm{PCAC}$")
xlabel(L"$x_0$")
ylim(v-100*e, v+100*e)
ylim(v-20*e, v+20*e)
if !isnothing(kappa)
title(string(L"$\kappa_1 = $", kappa[1], L" $\kappa_2 = $", kappa[2]))
......@@ -330,13 +330,13 @@ function dec_const(vv::Vector{uwreal}, plat::Vector{Int64}, m::uwreal, y0::Int64
corr_vv = vv[2:end-1]
T = length(corr_vv)
aux = exp.((collect(1:T) .- y0 ) .* fill(m, T))
aux = exp.((collect(1:T) .- y0 ) .* fill(m, T))
R = ((aux .* corr_vv).^2).^0.25
R_av = plat_av(R, plat, wpm)
f = sqrt(2 / m) * R_av
R .*= sqrt.(2 ./ [m for i in 1:length(R)])
if pl
R .*= sqrt.(2 ./ [m for i in 1:length(R)])
uwerr.(R)
R_av *= sqrt(2/m)
isnothing(wpm) ? uwerr(R_av) : uwerr(R_av, wpm)
......@@ -389,13 +389,13 @@ function dec_const_w(vv::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}
aux = exp.((collect(1:T-2) .- y0 ) .* fill(m, T-2))
else
#corr_vv = corr_vv[2:end-1]
aux = exp.((collect(1:T) .- y0 ) .* fill(m, T))
aux = exp.((collect(1:T) .- y0 ) .* fill(m/2, T))
end
R = (aux .* corr_vv)
R = (aux .* corr_vv ./ sqrt.(corr_pp))
R_av = plat_av(R, plat, wpm)
f = sqrt(2 / m) * sqrt(R_av)
f = sqrt(2 / m) * R_av
if pl
R .*= sqrt.(2 ./ [m for i in 1:length(R)])
uwerr.(R)
......
This diff is collapsed.
......@@ -182,7 +182,7 @@ mutable struct Corr
theta2 = h[1].theta2
return new(a, kappa, mu, gamma, y0, theta1, theta2)
end
Corr(o::Vector{uwreal}, k::Vector{Float64}, m::Vector{Float64}, g::Vector{String}, y::Int64) = new(o, k, m, g, y)
Corr(o::Vector{uwreal}, k::Vector{Float64}, m::Vector{Float64}, g::Vector{String}, y::Int64, th1::Vector{Float64}, th2::Vector{Float64} ) = new(o, k, m, g, y, th1, th2)
end
mutable struct YData
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment