Commit a4c6307a authored by Alessandro 's avatar Alessandro

gevp_tools folder removed

parent 3e20520f
This diff is collapsed.
{\rtf1\ansi\ansicpg1252\cocoartf2509
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 $H400\
$Z^\{tm\}_M \\mu_c \\sqrt\{8t_0\} = $3.030627780344985 +/- 0.07902594921440798\
$M_D \\sqrt\{8t_0\} = $3.981135432856687 +/- 0.05781090729513162\
$M_Ds \\sqrt\{8t_0\} = $3.981135432856687 +/- 0.05781090729513162\
$M_D* \\sqrt\{8t_0\} = $4.278807884262479 +/- 0.05002067830312485\
$M_Ds* \\sqrt\{8t_0\} = $4.278807884262479 +/- 0.05002067830312485\
$M_eta* \\sqrt\{8t_0\} = $6.096944664722402 +/- 0.09777085253831523\
$M_jpsi* \\sqrt\{8t_0\} = $6.3445407150455315 +/- 0.09568980579456061\
$f_D \\sqrt\{8t_0\} = $0.516849796654617 +/- 0.0030631272287505134\
$f_Ds \\sqrt\{8t_0\} = $0.516849796654617 +/- 0.0030631272287505134\
$f_D* \\sqrt\{8t_0\} = $0.21312484071325435 +/- 0.003968470514564074\
$f_Ds* \\sqrt\{8t_0\} = $0.21312484071325435 +/- 0.003968470514564074\
$f_eta \\sqrt\{8t_0\} = $0.9689427427736942 +/- 0.015398690942284236\
$f_jpsi \\sqrt\{8t_0\} = $0.4391703592723876 +/- 0.009322107275879348\
$\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 $N200\
$Z^\{tm\}_M \\mu_c \\sqrt\{8t_0\} = $3.095508084190539 +/- 0.07424875770953374\
$M_D \\sqrt\{8t_0\} = $3.958264727738654 +/- 0.05515406625525418\
$M_Ds \\sqrt\{8t_0\} = $4.072538504215807 +/- 0.05467443552294891\
$M_D* \\sqrt\{8t_0\} = $4.229272703354319 +/- 0.05006705711946871\
$M_Ds* \\sqrt\{8t_0\} = $4.361851498402342 +/- 0.04975162489041616\
$M_eta* \\sqrt\{8t_0\} = $6.198773176967105 +/- 0.0967669789483958\
$M_jpsi* \\sqrt\{8t_0\} = $6.439877922484902 +/- 0.0942314903150228\
$f_D \\sqrt\{8t_0\} = $0.47414683350372805 +/- 0.002821170657997782\
$f_Ds \\sqrt\{8t_0\} = $0.5204052951135102 +/- 0.002351052892691432\
$f_D* \\sqrt\{8t_0\} = $0.18581645952897405 +/- 0.0032030018851700124\
$f_Ds* \\sqrt\{8t_0\} = $0.20920280395715848 +/- 0.0024790842850004667\
$f_eta \\sqrt\{8t_0\} = $0.9266388913538548 +/- 0.011566795910907063\
$f_jpsi \\sqrt\{8t_0\} = $0.42904806660632133 +/- 0.007884932722702343\
$\
$N203\
$Z^\{tm\}_M \\mu_c \\sqrt\{8t_0\} = $3.07608073397371 +/- 0.07386718423714976\
$M_D \\sqrt\{8t_0\} = $3.966409130806326 +/- 0.054959061347465483\
$M_Ds \\sqrt\{8t_0\} = $4.030944118480624 +/- 0.05473249525087825\
$M_D* \\sqrt\{8t_0\} = $4.254701932623177 +/- 0.04997144163893854\
$M_Ds* \\sqrt\{8t_0\} = $4.320267491882463 +/- 0.049563464976048445\
$M_eta* \\sqrt\{8t_0\} = $6.175405773876267 +/- 0.09615293679832428\
$M_jpsi* \\sqrt\{8t_0\} = $6.418715171251667 +/- 0.09346001316883264\
$f_D \\sqrt\{8t_0\} = $0.48810439044765425 +/- 0.0026045102710287034\
$f_Ds \\sqrt\{8t_0\} = $0.513802783972585 +/- 0.002279763193762235\
$f_D* \\sqrt\{8t_0\} = $0.19370973720440873 +/- 0.0028186032755263607\
$f_Ds* \\sqrt\{8t_0\} = $0.20485862913653624 +/- 0.0024571277939203565\
$f_eta \\sqrt\{8t_0\} = $0.9262934445841321 +/- 0.011380030137209169\
$f_jpsi \\sqrt\{8t_0\} = $0.4287220496155749 +/- 0.007707612363034976\
$\
$N300\
$Z^\{tm\}_M \\mu_c \\sqrt\{8t_0\} = $2.996157019535518 +/- 0.07903034846063876\
$M_D \\sqrt\{8t_0\} = $3.9418982012432258 +/- 0.0596919625451062\
$M_Ds \\sqrt\{8t_0\} = $3.9418982012432258 +/- 0.0596919625451062\
$M_D* \\sqrt\{8t_0\} = $4.2918918432116255 +/- 0.04985913651457226\
$M_Ds* \\sqrt\{8t_0\} = $4.2918918432116255 +/- 0.04985913651457226\
$M_eta* \\sqrt\{8t_0\} = $6.077559366401819 +/- 0.10543357205926039\
$M_jpsi* \\sqrt\{8t_0\} = $6.322315861178219 +/- 0.1024859602694168\
$f_D \\sqrt\{8t_0\} = $0.502826744878361 +/- 0.0026201800440417583\
$f_Ds \\sqrt\{8t_0\} = $0.502826744878361 +/- 0.0026201800440417583\
$f_D* \\sqrt\{8t_0\} = $0.2068623601937379 +/- 0.003546907525867658\
$f_Ds* \\sqrt\{8t_0\} = $0.2068623601937379 +/- 0.003546907525867658\
$f_eta \\sqrt\{8t_0\} = $0.8669858354378843 +/- 0.010734940135830663\
$f_jpsi \\sqrt\{8t_0\} = $0.402925306634495 +/- 0.008184816863154212\
$\
$J303\
$Z^\{tm\}_M \\mu_c \\sqrt\{8t_0\} = $3.106805094851814 +/- 0.07428519131808012\
$M_D \\sqrt\{8t_0\} = $3.951817203146415 +/- 0.05634686437630071\
$M_Ds \\sqrt\{8t_0\} = $4.091122020600407 +/- 0.05584799044824401\
$M_D* \\sqrt\{8t_0\} = $4.220571557429657 +/- 0.050571226554394465\
$M_Ds* \\sqrt\{8t_0\} = $4.378430678774368 +/- 0.05075096037526913\
$M_eta* \\sqrt\{8t_0\} = $6.222653661097548 +/- 0.09980503048093914\
$M_jpsi* \\sqrt\{8t_0\} = $6.45871173311589 +/- 0.09688893871726818\
$f_D \\sqrt\{8t_0\} = $0.46790893343380957 +/- 0.0035987447382407898\
$f_Ds \\sqrt\{8t_0\} = $0.5204463638699105 +/- 0.0025343572218284698\
$f_D* \\sqrt\{8t_0\} = $0.17563003352045548 +/- 0.004603348336097794\
$f_Ds* \\sqrt\{8t_0\} = $0.20465609887290984 +/- 0.0030029574421112505\
$f_eta \\sqrt\{8t_0\} = $0.876239237941407 +/- 0.008803719053134774\
$f_jpsi \\sqrt\{8t_0\} = $0.4070411608133558 +/- 0.006650155013434349\
}
\ No newline at end of file
function read_dat(ens::String, g1::String="G5", g2::String="G5")
path = joinpath(path_data, ens)
rep = readdir(path, join=true)
aux = read_mesons.(rep, g1, g2)
res = []
for j =1:length(aux[1])
aux2 = [aux[i][j] for i =1:length(aux)]
push!(res, aux2)
end
return res
end
function get_mu(mu_list::Vector{Vector{Float64}}, deg::Bool)
mu_sorted = unique(sort(minimum.(mu_list)))
mul = mu_sorted[1]
deg ? mus = 0.0 : mus = mu_sorted[2]
muh = unique(maximum.(mu_list))
muh = filter(x-> x > mul && x > mus, muh)
return mul, mus, muh
end
function get_lh(mu_list, obs::Array{juobs.Corr}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_lh = Array{juobs.Corr}(undef, 0)
for k = 1:length(mu_list)
mu = mu_list[k]
if mul in mu && mu[1] != mu[2] && !(mus in mu) #l-h
push!(obs_lh, obs[k])
end
end
return obs_lh
end
function get_lh(mu_list, obs::Vector{Vector{juobs.Corr}}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_lh = Array{Array{juobs.Corr}}(undef, length(obs), length(muh))
for n_obs = 1:length(obs)
obs_lh[n_obs] = get_lh(mu_list, obs[n_obs], deg)
end
return obs_lh
end
function get_sh(mu_list, obs::Array{juobs.Corr}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_sh = Array{juobs.Corr}(undef, 0)
for k = 1:length(mu_list)
mu = mu_list[k]
if mus in mu && mu[1] != mu[2] && !(mul in mu)#s-h
push!(obs_sh, obs[k])
end
end
return obs_sh
end
function get_sh(mu_list, obs::Vector{Vector{juobs.Corr}}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_sh = Array{Array{juobs.Corr}}(undef, length(obs), length(muh))
for n_obs = 1:length(obs)
obs_sh[n_obs] = get_sh(mu_list, obs[n_obs], deg)
end
return obs_sh
end
function get_hh(mu_list, obs::Array{juobs.Corr}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_hh = Array{juobs.Corr}(undef,0)
for k = 1:length(mu_list)
mu = mu_list[k]
for i =1:length(muh)
if muh[i] in mu && mu[1] == mu[2]#h-h
push!(obs_hh, obs[k])
end
end
end
return obs_hh
end
function get_hh(mu_list, obs::Vector{Vector{juobs.Corr}}, deg::Bool)
mul, mus, muh = get_mu(mu_list, deg)
obs_hh = Array{Array{juobs.Corr}}(undef, length(obs), length(muh))
for n_obs = 1:length(obs)
obs_hh[n_obs] = get_hh(mu_list, obs[n_obs], deg)
end
return obs_hh
end
mutable struct infoMatt
mat::Vector{Matrix}
mu::Vector{Float64}
y0::Int64
function infoMatt(a11::Array{juobs.Corr}, a12::Array{juobs.Corr}, a22::Array{juobs.Corr})
mu = getfield(a11[1], :mu)
y0 = Int64(getfield(a11[1], :y0))
elem11 = (sum(a11[i].obs for i =1:length(a11)))
elem12 = (sum(a12[i].obs for i =1:length(a12)))
elem22 = (sum(a22[i].obs for i =1:length(a22)))
diag = [elem11, elem22]
subdiag =[ elem12 ]
#diag = [a11.obs, a22[1].obs.+a22[2].obs.+a22[3].obs]
#subdiag = [a12[1].obs.+a12[2].obs.+a12[3].obs]
mat = get_matrix(diag, subdiag)
return new(mat, mu, y0)
end
function infoMatt(a11::Array{juobs.Corr}, a12::Array{juobs.Corr}, a13::Array{juobs.Corr}, a22::Array{juobs.Corr}, a23::Array{juobs.Corr}, a33::Array{juobs.Corr})
mu = getfield(a11[1], :mu)
y0 = Int64(getfield(a11[1], :y0))
elem11 = sum(a11[i].obs for i =1:length(a11))
elem12 = sum(a12[i].obs for i =1:length(a12))
elem22 = sum(a22[i].obs for i =1:length(a22))
elem13 = sum(a13[i].obs for i =1:length(a13))
elem23 = sum(a23[i].obs for i =1:length(a23))
elem33 = sum(a33[i].obs for i =1:length(a33))
diag = [elem11, elem22, elem33]
subdiag =[ elem12, elem13, elem23 ]
#diag = [a11.obs, a22[1].obs.+a22[2].obs.+a22[3].obs]
#subdiag = [a12[1].obs.+a12[2].obs.+a12[3].obs]
mat = get_matrix(diag, subdiag)
return new(mat, mu, y0)
end
end
function comp_mat(tot11::Array{Array{juobs.Corr}}, tot12::Array{Array{juobs.Corr}}, tot22::Array{Array{juobs.Corr}})
mu = getfield.(tot11[1],:mu)
res = Array{infoMatt}(undef, length(mu))
for i = 1:length(mu)
a11 = [ tot11[j][i] for j = 1:size(tot11,1) ]
a12 = [ tot12[j][i] for j = 1:size(tot12,1) ]
a22 = [ tot22[j][i] for j = 1:size(tot22,1) ]
res[i] = infoMatt(a11, a12, a22)
#res[i]= infoMatt(tot11[i], [tot12[1][i],tot12[2][i],tot12[3][i]], [tot22[1][i],tot22[2][i],tot22[3][i]])
end
return res
end
function comp_mat(tot11::Array{Array{juobs.Corr}}, tot12::Array{Array{juobs.Corr}}, tot13::Array{Array{juobs.Corr}}, tot22::Array{Array{juobs.Corr}}, tot33::Array{Array{juobs.Corr}}, tot23::Array{Array{juobs.Corr}})
mu = getfield.(tot11[1],:mu)
res = Array{infoMatt}(undef, length(mu))
for i = 1:length(mu)
a11 = [ tot11[j][i] for j = 1:size(tot11,1) ]
a12 = [ tot12[j][i] for j = 1:size(tot12,1) ]
a22 = [ tot22[j][i] for j = 1:size(tot22,1) ]
a33 = [ tot33[j][i] for j = 1:size(tot33,1) ]
a13 = [ tot13[j][i] for j = 1:size(tot13,1) ]
a23 = [ tot23[j][i] for j = 1:size(tot23,1) ]
res[i] = infoMatt(a11, a12, a13, a22, a23, a33)
#res[i]= infoMatt(tot11[i], [tot12[1][i],tot12[2][i],tot12[3][i]], [tot22[1][i],tot22[2][i],tot22[3][i]])
end
return res
end
function comp_energy(tot11::Array{Array{juobs.Corr}}, tot12::Array{Array{juobs.Corr}}, tot22::Array{Array{juobs.Corr}}, evec::Bool=false; tnot::Int64=3)
aux_mat = comp_mat(tot11, tot12, tot22)
y0 = getfield(aux_mat[1], :y0)
res_en = Array{infoEn}(undef, length(aux_mat))
if !evec
for i = 1:length(aux_mat)
mat_obs = getfield(aux_mat[i], :mat)[y0+1:end-1]
evalues = uwgevp_tot(mat_obs, tnot)
res_en[i] = infoEn(energies(evalues), aux_mat[i])
end
return res_en
else
evec = Array{Array{}}(undef, length(aux_mat))
for i = 1:length(aux_mat)
mat_obs = getfield(aux_mat[i], :mat)[y0+1:end-1]
evalues, eigvec = uwgevp_tot(mat_obs, tnot, evec=true, iter=50)
res_en[i] = infoEn(energies(evalues), aux_mat[i])
evec[i] = eigvec
end
return res_en, evec
end
end
function comp_energy(tot11::Array{Array{juobs.Corr}}, tot12::Array{Array{juobs.Corr}}, tot13::Array{Array{juobs.Corr}}, tot22::Array{Array{juobs.Corr}}, tot33::Array{Array{juobs.Corr}}, tot23::Array{Array{juobs.Corr}}, evec::Bool=false; tnot::Int64=2)
aux_mat = comp_mat(tot11, tot12, tot13, tot22, tot23, tot33)
y0 = getfield(aux_mat[1], :y0)
res_en = Array{infoEn}(undef, length(aux_mat))
if !evec
for i = 1:length(aux_mat)
mat_obs = getfield(aux_mat[i], :mat)[y0+1:end-1]
evalues = uwgevp_tot(mat_obs, tnot, iter=50)
res_en[i] = infoEn(energies(evalues), aux_mat[i])
end
return res_en
else
evec = Array{Array{}}(undef, length(aux_mat))
for i = 1:length(aux_mat)
mat_obs = getfield(aux_mat[i], :mat)[y0+1:end-1]
evalues, eigvec = uwgevp_tot(mat_obs, tnot, evec=true)
println("in comp_energy, i is = ", i)
res_en[i] = infoEn(energies(evalues), aux_mat[i])
evec[i] = eigvec
end
return res_en, evec
end
end
mutable struct infoEn
en_val::Array{Array{uwreal}}
mu::Vector{Float64}
y0::Int64
function infoEn(energ::Array{Array{uwreal}},matr::infoMatt )
en_val = energ
mu = getfield(matr,:mu)
y0 = getfield(matr,:y0)
new(en_val, mu, y0)
end
end
function pseudo_mat_elem(evec::Array{Array{T,2} where T,1}, mass::uwreal, mu::Array{Float64})
Rn = [exp(mass * (t)/2) * evec[t][1] for t =2:length(evec)]
aux = sqrt(2)*sum(mu) / mass^1.5
return uwdot(aux,Rn)
end
function vec_mat_elem(evec::Array{Array{T,2} where T,1}, mass::uwreal, deg::Bool)
if !deg
Rn = [exp(mass * t/2) * evec[t][1] for t =1:length(evec)]
return uwdot(Rn , za(beta[iens]) * sqrt(2/ mass))
else
Rn = [exp(mass * t/2) * evec[t][4] for t =1:length(evec)]
println(za(beta[iens]))
println(mass)
return uwdot(Rn , za(beta[iens]) * sqrt(2/ mass))
#return uwdot(Rn , 1/mass)# * sqrt(2/ mass))
end
end
function extract_dec_const(mat_elem::uwreal, mass::uwreal, mu::Array{Float64})
return sqrt(2)*sum(mu)*mat_elem / mass^1.5
end
function match_muc(muh, m_lh, m_lh_star, target)
M = (m_lh .+ 3 .* m_lh_star) ./ 4
par, chi2exp = lin_fit(muh, M)
muh_target = x_lin_fit(par, target)
return muh_target
end
function match_muc(muh, m_lh, m_sh, m_lh_star, m_sh_star, target)
M = (2 .* m_lh .+ 6 .* m_lh_star .+ m_sh .+ 3 .* m_sh_star) ./ 12
par, chi2exp = lin_fit(muh, M)
muh_target = x_lin_fit(par, target)
return muh_target
end
function match_muc_flav(muh, m_lh, m_sh, target)
M = (2/3 .* m_lh .+ 1/3*m_sh )
#M = m_lh
par, chi2exp = lin_fit(muh, M)
muh_target = x_lin_fit(par, target)
return muh_target
end
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