diff --git a/src/juobs_obs.jl b/src/juobs_obs.jl index 4ce3fa9cb0caa054dd72c208c5ec9030233dd03b..634f6530f9c44a7e8797a182cc595ffee5a3bc4e 100644 --- a/src/juobs_obs.jl +++ b/src/juobs_obs.jl @@ -14,9 +14,9 @@ corr_pp = corr_obs.(data) m = meff(corr_pp[1], [50, 60], pl=false) ``` """ -function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bool=false) +function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bool=false, mu::Union{Vector{Float64}, Nothing}=nothing) dim = length(corr) - aux = log.(corr[2:dim-2] ./ corr[3:dim-1]) + aux = 0.5 .* log.((corr[2:dim-2] ./ corr[3:dim-1]).^2) mass = plat_av(aux, plat) uwerr(mass) if pl == true @@ -31,6 +31,10 @@ function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bo errorbar(x, y, dy, fmt="x", color="black") ylabel(L"$m_\mathrm{eff}$") xlabel(L"$x_0$") + + if !isnothing(mu) + title(string(L"$\mu_1 = $", mu[1], L" $\mu_2 = $", mu[2])) + end display(gcf()) end if data == false @@ -40,7 +44,7 @@ function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bo end end meff(corr::Corr, plat::Vector{Int64}; pl::Bool=true, data::Bool=false) = - meff(corr.obs, plat, pl=pl, data=data) + meff(corr.obs, plat, pl=pl, data=data, mu=corr.mu) ## Decay constants @doc raw""" @@ -83,6 +87,7 @@ function dec_const_pcvc(corr::Vector{uwreal}, plat::Vector{Int64}, m::uwreal, mu errorbar(1:length(R), value.(R), err.(R), fmt="x", color="black") ylabel(L"$R$") xlabel(L"$x_0$") + title(string(L"$\mu_1 = $", mu[1], L" $\mu_2 = $", mu[2])) display(gcf()) end if data == false