Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Re_alpha_zero_1 = FitParameter("Re_alpha_zero_1", priors_nlh.param_mean_H[8], -0.01, 0.01, 0)
Im_alpha_perp_1 = FitParameter("Im_alpha_perp_1", priors_nlh.param_mean_H[9], -0.01, 0.01, 0)
Im_alpha_para_1 = FitParameter("Im_alpha_para_1", priors_nlh.param_mean_H[10], -0.01, 0.01, 0)
Im_alpha_zero_1 = FitParameter("Im_alpha_zero_1", priors_nlh.param_mean_H[11], -0.01, 0.01, 0)
Re_alpha_perp_2 = FitParameter("Re_alpha_perp_2", priors_nlh.param_mean_H[12], -0.01, 0.01, 0)
Re_alpha_para_2 = FitParameter("Re_alpha_para_2", priors_nlh.param_mean_H[13], -0.01, 0.01, 0)
Im_alpha_perp_2 = FitParameter("Im_alpha_perp_2", priors_nlh.param_mean_H[14], -0.01, 0.01, 0)
Im_alpha_para_2 = FitParameter("Im_alpha_para_2", priors_nlh.param_mean_H[15], -0.01, 0.01, 0)
Re_alpha_zero_2 = FitParameter("Re_alpha_zero_2", 0., -0.1, 0.1, 0)
Im_alpha_zero_2 = FitParameter("Im_alpha_zero_2", 0., -0.1, 0.1, 0)
Re_alpha_perp_3 = FitParameter("Re_alpha_perp_3", 0., -0.1, 0.1, 0)
Re_alpha_para_3 = FitParameter("Re_alpha_para_3", 0., -0.1, 0.1, 0)
Im_alpha_perp_3 = FitParameter("Im_alpha_perp_3", 0., -0.1, 0.1, 0)
Im_alpha_para_3 = FitParameter("Im_alpha_para_3", 0., -0.1, 0.1, 0)
Re_alpha_zero_3 = FitParameter("Re_alpha_zero_3", 0., -1., 1., 0)
Im_alpha_zero_3 = FitParameter("Im_alpha_zero_3", 0., -1., 1., 0)
Re_alpha_perp_4 = FitParameter("Re_alpha_perp_4", 0., -1., 1., 0)
Re_alpha_para_4 = FitParameter("Re_alpha_para_4", 0., -1., 1., 0)
Im_alpha_perp_4 = FitParameter("Im_alpha_perp_4", 0., -1., 1., 0)
Im_alpha_para_4 = FitParameter("Im_alpha_para_4", 0., -1., 1., 0)
Re_alpha_zero_4 = FitParameter("Re_alpha_zero_4", 0., -1., 1., 0)
Im_alpha_zero_4 = FitParameter("Im_alpha_zero_4", 0., -1., 1., 0)
Re_alpha_perp_5 = FitParameter("Re_alpha_perp_5", 0., -1., 1., 0)
Re_alpha_para_5 = FitParameter("Re_alpha_para_5", 0., -1., 1., 0)
Im_alpha_perp_5 = FitParameter("Im_alpha_perp_5", 0., -1., 1., 0)
Im_alpha_para_5 = FitParameter("Im_alpha_para_5", 0., -1., 1., 0)
from __future__ import absolute_import, division, print_function
from zfit.core.parameter import FitParameter
from .data import priors_ff
# Form Factors for B0 -> K* ll
A0_0 = FitParameter("A0_0", priors_ff.param_mean_FF[0], -10., 10., 0)
A0_1 = FitParameter("A0_1", priors_ff.param_mean_FF[1], -10., 10., 0)
A0_2 = FitParameter("A0_2", priors_ff.param_mean_FF[2], -15., 15., 0)
A1_0 = FitParameter("A1_0", priors_ff.param_mean_FF[3], -10., 10., 0)
A1_1 = FitParameter("A1_1", priors_ff.param_mean_FF[4], -10., 10., 0)
A1_2 = FitParameter("A1_2", priors_ff.param_mean_FF[5], -10., 10., 0)
A12_1 = FitParameter("A12_1", priors_ff.param_mean_FF[6], -10., 10., 0)
A12_2 = FitParameter("A12_2", priors_ff.param_mean_FF[7], -10., 10., 0)
V_0 = FitParameter("V_0", priors_ff.param_mean_FF[8], -10., 10., 0)
V_1 = FitParameter("V_1", priors_ff.param_mean_FF[9], -10., 10., 0)
V_2 = FitParameter("V_2", priors_ff.param_mean_FF[10], -15., 15., 0)
T1_0 = FitParameter("T1_0", priors_ff.param_mean_FF[11], -10., 10., 0)
T1_1 = FitParameter("T1_1", priors_ff.param_mean_FF[12], -10., 10., 0)
T1_2 = FitParameter("T1_2", priors_ff.param_mean_FF[13], -15., 15., 0)
T2_1 = FitParameter("T2_1", priors_ff.param_mean_FF[14], -10., 10., 0)
T2_2 = FitParameter("T2_2", priors_ff.param_mean_FF[15], -10., 10., 0)
T23_0 = FitParameter("T23_0", priors_ff.param_mean_FF[16], -10., 10., 0)
T23_1 = FitParameter("T23_1", priors_ff.param_mean_FF[17], -10., 10., 0)
T23_2 = FitParameter("T23_2", priors_ff.param_mean_FF[18], -20., 20., 0)
# Form factors
ff = [ A0_0, A0_1, A0_2, A1_0, A1_1, A1_2, A12_1, A12_2, V_0, V_1, V_2, T1_0, T1_1, T1_2, T2_1, T2_2, T23_0, T23_1, T23_2 ]
Im_alpha_zero_1 = FitParameter("Im_alpha_zero_1", priors_nlh.param_mean_H[11], -0.01, 0.01, 0)
Re_alpha_perp_2 = FitParameter("Re_alpha_perp_2", priors_nlh.param_mean_H[12], -0.01, 0.01, 0)
Re_alpha_para_2 = FitParameter("Re_alpha_para_2", priors_nlh.param_mean_H[13], -0.01, 0.01, 0)
Im_alpha_perp_2 = FitParameter("Im_alpha_perp_2", priors_nlh.param_mean_H[14], -0.01, 0.01, 0)
Im_alpha_para_2 = FitParameter("Im_alpha_para_2", priors_nlh.param_mean_H[15], -0.01, 0.01, 0)
Re_alpha_zero_2 = FitParameter("Re_alpha_zero_2", 0., -0.1, 0.1, 0)
Im_alpha_zero_2 = FitParameter("Im_alpha_zero_2", 0., -0.1, 0.1, 0)
Re_alpha_perp_3 = FitParameter("Re_alpha_perp_3", 0., -0.1, 0.1, 0)
Re_alpha_para_3 = FitParameter("Re_alpha_para_3", 0., -0.1, 0.1, 0)
Im_alpha_perp_3 = FitParameter("Im_alpha_perp_3", 0., -0.1, 0.1, 0)
Im_alpha_para_3 = FitParameter("Im_alpha_para_3", 0., -0.1, 0.1, 0)
Re_alpha_zero_3 = FitParameter("Re_alpha_zero_3", 0., -1., 1., 0)
Im_alpha_zero_3 = FitParameter("Im_alpha_zero_3", 0., -1., 1., 0)
Re_alpha_perp_4 = FitParameter("Re_alpha_perp_4", 0., -1., 1., 0)
Re_alpha_para_4 = FitParameter("Re_alpha_para_4", 0., -1., 1., 0)
Im_alpha_perp_4 = FitParameter("Im_alpha_perp_4", 0., -1., 1., 0)
Im_alpha_para_4 = FitParameter("Im_alpha_para_4", 0., -1., 1., 0)
Re_alpha_zero_4 = FitParameter("Re_alpha_zero_4", 0., -1., 1., 0)
Im_alpha_zero_4 = FitParameter("Im_alpha_zero_4", 0., -1., 1., 0)
Re_alpha_perp_5 = FitParameter("Re_alpha_perp_5", 0., -1., 1., 0)
Re_alpha_para_5 = FitParameter("Re_alpha_para_5", 0., -1., 1., 0)
Im_alpha_perp_5 = FitParameter("Im_alpha_perp_5", 0., -1., 1., 0)
Im_alpha_para_5 = FitParameter("Im_alpha_para_5", 0., -1., 1., 0)
# Define complex parameters alphas
alpha_perp_0 = tf.complex(Re_alpha_perp_0, Im_alpha_perp_0)
Re_alpha_perp_3 = FitParameter("Re_alpha_perp_3", 0., -0.1, 0.1, 0)
Re_alpha_para_3 = FitParameter("Re_alpha_para_3", 0., -0.1, 0.1, 0)
Im_alpha_perp_3 = FitParameter("Im_alpha_perp_3", 0., -0.1, 0.1, 0)
Im_alpha_para_3 = FitParameter("Im_alpha_para_3", 0., -0.1, 0.1, 0)
Re_alpha_zero_3 = FitParameter("Re_alpha_zero_3", 0., -1., 1., 0)
Im_alpha_zero_3 = FitParameter("Im_alpha_zero_3", 0., -1., 1., 0)
Re_alpha_perp_4 = FitParameter("Re_alpha_perp_4", 0., -1., 1., 0)
Re_alpha_para_4 = FitParameter("Re_alpha_para_4", 0., -1., 1., 0)
Im_alpha_perp_4 = FitParameter("Im_alpha_perp_4", 0., -1., 1., 0)
Im_alpha_para_4 = FitParameter("Im_alpha_para_4", 0., -1., 1., 0)
Re_alpha_zero_4 = FitParameter("Re_alpha_zero_4", 0., -1., 1., 0)
Im_alpha_zero_4 = FitParameter("Im_alpha_zero_4", 0., -1., 1., 0)
Re_alpha_perp_5 = FitParameter("Re_alpha_perp_5", 0., -1., 1., 0)
Re_alpha_para_5 = FitParameter("Re_alpha_para_5", 0., -1., 1., 0)
Im_alpha_perp_5 = FitParameter("Im_alpha_perp_5", 0., -1., 1., 0)
Im_alpha_para_5 = FitParameter("Im_alpha_para_5", 0., -1., 1., 0)
# Define complex parameters alphas
alpha_perp_0 = tf.complex(Re_alpha_perp_0, Im_alpha_perp_0)
alpha_para_0 = tf.complex(Re_alpha_para_0, Im_alpha_para_0)
alpha_zero_0 = tf.complex(Re_alpha_zero_0, Im_alpha_zero_0)
alpha_perp_1 = tf.complex(Re_alpha_perp_1, Im_alpha_perp_1)
alpha_para_1 = tf.complex(Re_alpha_para_1, Im_alpha_para_1)
alpha_zero_1 = tf.complex(Re_alpha_zero_1, Im_alpha_zero_1)
alpha_perp_2 = tf.complex(Re_alpha_perp_2, Im_alpha_perp_2)
alpha_para_2 = tf.complex(Re_alpha_para_2, Im_alpha_para_2)
# Form Factors for B0 -> K* ll
A0_0 = FitParameter("A0_0", priors_ff.param_mean_FF[0], -10., 10., 0)
A0_1 = FitParameter("A0_1", priors_ff.param_mean_FF[1], -10., 10., 0)
A0_2 = FitParameter("A0_2", priors_ff.param_mean_FF[2], -15., 15., 0)
A1_0 = FitParameter("A1_0", priors_ff.param_mean_FF[3], -10., 10., 0)
A1_1 = FitParameter("A1_1", priors_ff.param_mean_FF[4], -10., 10., 0)
A1_2 = FitParameter("A1_2", priors_ff.param_mean_FF[5], -10., 10., 0)
A12_1 = FitParameter("A12_1", priors_ff.param_mean_FF[6], -10., 10., 0)
A12_2 = FitParameter("A12_2", priors_ff.param_mean_FF[7], -10., 10., 0)
V_0 = FitParameter("V_0", priors_ff.param_mean_FF[8], -10., 10., 0)
V_1 = FitParameter("V_1", priors_ff.param_mean_FF[9], -10., 10., 0)
V_2 = FitParameter("V_2", priors_ff.param_mean_FF[10], -15., 15., 0)
T1_0 = FitParameter("T1_0", priors_ff.param_mean_FF[11], -10., 10., 0)
T1_1 = FitParameter("T1_1", priors_ff.param_mean_FF[12], -10., 10., 0)
T1_2 = FitParameter("T1_2", priors_ff.param_mean_FF[13], -15., 15., 0)
T2_1 = FitParameter("T2_1", priors_ff.param_mean_FF[14], -10., 10., 0)
T2_2 = FitParameter("T2_2", priors_ff.param_mean_FF[15], -10., 10., 0)
T23_0 = FitParameter("T23_0", priors_ff.param_mean_FF[16], -10., 10., 0)
T23_1 = FitParameter("T23_1", priors_ff.param_mean_FF[17], -10., 10., 0)
T23_2 = FitParameter("T23_2", priors_ff.param_mean_FF[18], -20., 20., 0)
# Form factors
ff = [ A0_0, A0_1, A0_2, A1_0, A1_1, A1_2, A12_1, A12_2, V_0, V_1, V_2, T1_0, T1_1, T1_2, T2_1, T2_2, T23_0, T23_1, T23_2 ]
import tensorflow as tf
from zfit.core.parameter import FitParameter
from .data import priors_nlh
# Parametrization of non-local hadronic effects in B0 -> K* ll
# TODO: refactoring.
# - Create lists?
Re_alpha_perp_0 = FitParameter("Re_alpha_perp_0", priors_nlh.param_mean_H[0], -0.01, 0.01, 0)
Re_alpha_para_0 = FitParameter("Re_alpha_para_0", priors_nlh.param_mean_H[1], -0.01, 0.01, 0)
Re_alpha_zero_0 = FitParameter("Re_alpha_zero_0", priors_nlh.param_mean_H[2], -0.01, 0.01, 0)
Im_alpha_perp_0 = FitParameter("Im_alpha_perp_0", priors_nlh.param_mean_H[3], -0.01, 0.01, 0)
Im_alpha_para_0 = FitParameter("Im_alpha_para_0", priors_nlh.param_mean_H[4], -0.01, 0.01, 0)
Im_alpha_zero_0 = FitParameter("Im_alpha_zero_0", priors_nlh.param_mean_H[5], -0.01, 0.01, 0)
Re_alpha_perp_1 = FitParameter("Re_alpha_perp_1", priors_nlh.param_mean_H[6], -0.01, 0.01, 0)
Re_alpha_para_1 = FitParameter("Re_alpha_para_1", priors_nlh.param_mean_H[7], -0.01, 0.01, 0)
Re_alpha_zero_1 = FitParameter("Re_alpha_zero_1", priors_nlh.param_mean_H[8], -0.01, 0.01, 0)
Im_alpha_perp_1 = FitParameter("Im_alpha_perp_1", priors_nlh.param_mean_H[9], -0.01, 0.01, 0)
Im_alpha_para_1 = FitParameter("Im_alpha_para_1", priors_nlh.param_mean_H[10], -0.01, 0.01, 0)
Im_alpha_zero_1 = FitParameter("Im_alpha_zero_1", priors_nlh.param_mean_H[11], -0.01, 0.01, 0)
Re_alpha_perp_2 = FitParameter("Re_alpha_perp_2", priors_nlh.param_mean_H[12], -0.01, 0.01, 0)
Re_alpha_para_2 = FitParameter("Re_alpha_para_2", priors_nlh.param_mean_H[13], -0.01, 0.01, 0)
Im_alpha_perp_2 = FitParameter("Im_alpha_perp_2", priors_nlh.param_mean_H[14], -0.01, 0.01, 0)
Im_alpha_para_2 = FitParameter("Im_alpha_para_2", priors_nlh.param_mean_H[15], -0.01, 0.01, 0)
Re_alpha_zero_2 = FitParameter("Re_alpha_zero_2", 0., -0.1, 0.1, 0)
Im_alpha_zero_2 = FitParameter("Im_alpha_zero_2", 0., -0.1, 0.1, 0)
from __future__ import absolute_import, division, print_function
from zfit.core.parameter import FitParameter
from .data import priors_ff
# Form Factors for B0 -> K* ll
A0_0 = FitParameter("A0_0", priors_ff.param_mean_FF[0], -10., 10., 0)
A0_1 = FitParameter("A0_1", priors_ff.param_mean_FF[1], -10., 10., 0)
A0_2 = FitParameter("A0_2", priors_ff.param_mean_FF[2], -15., 15., 0)
A1_0 = FitParameter("A1_0", priors_ff.param_mean_FF[3], -10., 10., 0)
A1_1 = FitParameter("A1_1", priors_ff.param_mean_FF[4], -10., 10., 0)
A1_2 = FitParameter("A1_2", priors_ff.param_mean_FF[5], -10., 10., 0)
A12_1 = FitParameter("A12_1", priors_ff.param_mean_FF[6], -10., 10., 0)
A12_2 = FitParameter("A12_2", priors_ff.param_mean_FF[7], -10., 10., 0)
V_0 = FitParameter("V_0", priors_ff.param_mean_FF[8], -10., 10., 0)
V_1 = FitParameter("V_1", priors_ff.param_mean_FF[9], -10., 10., 0)
V_2 = FitParameter("V_2", priors_ff.param_mean_FF[10], -15., 15., 0)
T1_0 = FitParameter("T1_0", priors_ff.param_mean_FF[11], -10., 10., 0)
T1_1 = FitParameter("T1_1", priors_ff.param_mean_FF[12], -10., 10., 0)
T1_2 = FitParameter("T1_2", priors_ff.param_mean_FF[13], -15., 15., 0)
T2_1 = FitParameter("T2_1", priors_ff.param_mean_FF[14], -10., 10., 0)
T2_2 = FitParameter("T2_2", priors_ff.param_mean_FF[15], -10., 10., 0)
T23_0 = FitParameter("T23_0", priors_ff.param_mean_FF[16], -10., 10., 0)
T23_1 = FitParameter("T23_1", priors_ff.param_mean_FF[17], -10., 10., 0)
T23_2 = FitParameter("T23_2", priors_ff.param_mean_FF[18], -20., 20., 0)
from zfit.core.parameter import FitParameter
# Fit parameters: Wilson coefficients
ReC7 = FitParameter("ReC7" , -0.33726473 , -5., 5., 0)
ImC7 = FitParameter("ImC7" , 0. , -5., 5., 0)
ReC7p = FitParameter("ReC7p" , 0. , -5., 5., 0)
ImC7p = FitParameter("ImC7p" , 0. , -5., 5., 0)
ReC9 = FitParameter("ReC9" , 4.27342842 , -20., 20., 0)
ImC9 = FitParameter("ImC9" , 0. , -5., 5., 0)
ReC10 = FitParameter("ReC10" , -4.16611761 , -20., 20., 0)
ImC10 = FitParameter("ImC10" , 0. , -5., 5., 0)
ReC9p = FitParameter("ReC9p" , 0. , -10., 10., 0)
ImC9p = FitParameter("ImC9p" , 0. , -5., 5., 0)
ReC10p = FitParameter("ReC10p", 0. , -10., 10., 0)
ImC10p = FitParameter("ImC10p", 0. , -5., 5., 0)
# define Wilson coeff.
C7 = tf.complex(ReC7 , ImC7 )
C7p = tf.complex(ReC7p , ImC7p )
C9 = tf.complex(ReC9 , ImC9 )
C9p = tf.complex(ReC9p , ImC9p )
C10 = tf.complex(ReC10 , ImC10 )
C10p = tf.complex(ReC10p, ImC10p)
from zfit.core.tfext import abs_square, to_complex
# CKM parameters (from C. Bobeth, M. Chrzaszcz, D. van Dyk and J. Virto (in preparation))
lambda_CKM_init = 0.225
A_CKM_init = 0.829
rho_CKM_init = 0.132
eta_CKM_init = 0.348
lambda_CKM_sigma = 0.006
A_CKM_sigma = 0.012
rho_CKM_sigma = 0.018
eta_CKM_sigma = 0.012
# CKM parameters
lambda_CKM = FitParameter("lambda_CKM", lambda_CKM_init, 0., 2., 0)
A_CKM = FitParameter("A_CKM", A_CKM_init, 0., 2., 0)
rho_CKM = FitParameter("rho_CKM", rho_CKM_init, 0., 2., 0)
eta_CKM = FitParameter("eta_CKM", eta_CKM_init, 0., 2., 0)
# CKM parameters
ckm = [lambda_CKM, A_CKM, rho_CKM, eta_CKM]
# CKM parametrization taken from EOS
rho_eta = (tf.complex(rho_CKM, eta_CKM) *
to_complex(tf.sqrt(1. - tf.square(A_CKM) * tf.pow(lambda_CKM, 4)) /
tf.sqrt(1.0 - tf.square(lambda_CKM))) /
(1. - to_complex(tf.square(A_CKM) * tf.pow(lambda_CKM, 4)) * tf.complex(rho_CKM,
eta_CKM)))
Vtb = (1. - tf.square(A_CKM) * tf.pow(lambda_CKM, 4) / 2. - tf.square(A_CKM) * tf.pow(lambda_CKM,
6) *
abs_square(rho_eta) / 2. - tf.pow(A_CKM, 4) * tf.pow(lambda_CKM, 8) / 8.)
A0_2 = FitParameter("A0_2", priors_ff.param_mean_FF[2], -15., 15., 0)
A1_0 = FitParameter("A1_0", priors_ff.param_mean_FF[3], -10., 10., 0)
A1_1 = FitParameter("A1_1", priors_ff.param_mean_FF[4], -10., 10., 0)
A1_2 = FitParameter("A1_2", priors_ff.param_mean_FF[5], -10., 10., 0)
A12_1 = FitParameter("A12_1", priors_ff.param_mean_FF[6], -10., 10., 0)
A12_2 = FitParameter("A12_2", priors_ff.param_mean_FF[7], -10., 10., 0)
V_0 = FitParameter("V_0", priors_ff.param_mean_FF[8], -10., 10., 0)
V_1 = FitParameter("V_1", priors_ff.param_mean_FF[9], -10., 10., 0)
V_2 = FitParameter("V_2", priors_ff.param_mean_FF[10], -15., 15., 0)
T1_0 = FitParameter("T1_0", priors_ff.param_mean_FF[11], -10., 10., 0)
T1_1 = FitParameter("T1_1", priors_ff.param_mean_FF[12], -10., 10., 0)
T1_2 = FitParameter("T1_2", priors_ff.param_mean_FF[13], -15., 15., 0)
T2_1 = FitParameter("T2_1", priors_ff.param_mean_FF[14], -10., 10., 0)
T2_2 = FitParameter("T2_2", priors_ff.param_mean_FF[15], -10., 10., 0)
T23_0 = FitParameter("T23_0", priors_ff.param_mean_FF[16], -10., 10., 0)
T23_1 = FitParameter("T23_1", priors_ff.param_mean_FF[17], -10., 10., 0)
T23_2 = FitParameter("T23_2", priors_ff.param_mean_FF[18], -20., 20., 0)
# Form factors
ff = [ A0_0, A0_1, A0_2, A1_0, A1_1, A1_2, A12_1, A12_2, V_0, V_1, V_2, T1_0, T1_1, T1_2, T2_1, T2_2, T23_0, T23_1, T23_2 ]