Module flavio.physics.bdecays.bvll.observables
Functions for exclusive $B\to V\ell^+\ell^-$ decays.
Functions
def AFBCP_experiment_num(J, J_bar)-
Expand source code
def AFBCP_experiment_num(J, J_bar): return 3/4.*A_experiment_num(J, J_bar, '6s') + 3/8.*A_experiment_num(J, J_bar, '6c') def AFB_experiment(J, J_bar)-
Expand source code
def AFB_experiment(J, J_bar): r"""Forward-backward asymmetry in the LHCb convention. See eq. (C.9) of arXiv:1506.03970v2. """ return AFB_experiment_num(J, J_bar)/SA_den(J, J_bar)Forward-backward asymmetry in the LHCb convention.
See eq. (C.9) of arXiv:1506.03970v2.
def AFB_experiment_num(J, J_bar)-
Expand source code
def AFB_experiment_num(J, J_bar): return 3/4.*S_experiment_num(J, J_bar, '6s') + 3/8.*S_experiment_num(J, J_bar, '6c') def AFB_theory(J, J_bar)-
Expand source code
def AFB_theory(J, J_bar): """Forward-backward asymmetry in the original theory convention. """ return AFB_theory_num(J, J_bar)/SA_den(J, J_bar)Forward-backward asymmetry in the original theory convention.
def AFB_theory_num(J, J_bar)-
Expand source code
def AFB_theory_num(J, J_bar): return 3/4.*S_theory_num(J, J_bar, '6s') + 3/8.*S_theory_num(J, J_bar, '6c') def A_experiment(J, J_bar, i)-
Expand source code
def A_experiment(J, J_bar, i): r"""Angular CP asymmetry $A_i$ in the LHCb convention. See eq. (C.8) of arXiv:1506.03970v2. """ return A_experiment_num(J, J_bar, i)/SA_den(J, J_bar)Angular CP asymmetry $A_i$ in the LHCb convention.
See eq. (C.8) of arXiv:1506.03970v2.
def A_experiment_num(J, J_bar, i)-
Expand source code
def A_experiment_num(J, J_bar, i): if i in [4, '6s', '6c', 7, 9]: return -A_theory_num(J, J_bar, i) return A_theory_num(J, J_bar, i) def A_theory(J, J_bar, i)-
Expand source code
def A_theory(J, J_bar, i): r"""Angular CP asymmetry $A_i$ in the theory convention.""" return A_theory_num(J, J_bar, i)/SA_den(J, J_bar)Angular CP asymmetry $A_i$ in the theory convention.
def A_theory_num(J, J_bar, i)-
Expand source code
def A_theory_num(J, J_bar, i): return (J[i] - J_bar[i]) def FL(J, J_bar)-
Expand source code
def FL(J, J_bar): r"""Longitudinal polarization fraction $F_L$""" return FL_num(J, J_bar)/SA_den(J, J_bar)Longitudinal polarization fraction $F_L$
def FL_num(J, J_bar)-
Expand source code
def FL_num(J, J_bar): return -S_theory_num(J, J_bar, '2c') def FLhat(J, J_bar)-
Expand source code
def FLhat(J, J_bar): r"""Modified longitudinal polarization fraction for vanishing lepton masses, $\hat F_L$. See eq. (32) of arXiv:1510.04239. """ return FLhat_num(J, J_bar)/SA_den(J, J_bar)Modified longitudinal polarization fraction for vanishing lepton masses, $\hat F_L$.
See eq. (32) of arXiv:1510.04239.
def FLhat_num(J, J_bar)-
Expand source code
def FLhat_num(J, J_bar): return -S_theory_num(J, J_bar, '1c') def P_den(J, J_bar)-
Expand source code
def P_den(J, J_bar): return S_theory_num(J, J_bar, '2s') def SA_den(J, J_bar)-
Expand source code
def SA_den(J, J_bar): return 2*dGdq2_ave(J, J_bar) def S_experiment(J, J_bar, i)-
Expand source code
def S_experiment(J, J_bar, i): r"""CP-averaged angular observable $S_i$ in the LHCb convention. See eq. (C.8) of arXiv:1506.03970v2. """ return S_experiment_num(J, J_bar, i)/SA_den(J, J_bar)CP-averaged angular observable $S_i$ in the LHCb convention.
See eq. (C.8) of arXiv:1506.03970v2.
def S_experiment_num(J, J_bar, i)-
Expand source code
def S_experiment_num(J, J_bar, i): if i in [4, '6s', '6c', 7, 9]: return -S_theory_num(J, J_bar, i) return S_theory_num(J, J_bar, i) def S_theory(J, J_bar, i)-
Expand source code
def S_theory(J, J_bar, i): r"""CP-averaged angular observable $S_i$ in the theory convention.""" return S_theory_num(J, J_bar, i)/SA_den(J, J_bar)CP-averaged angular observable $S_i$ in the theory convention.
def S_theory_num(J, J_bar, i)-
Expand source code
def S_theory_num(J, J_bar, i): return (J[i] + J_bar[i]) def bvll_obs_int_ratio_leptonflavour(func, B, V, l1, l2)-
Expand source code
def bvll_obs_int_ratio_leptonflavour(func, B, V, l1, l2): def fct(wc_obj, par, q2min, q2max): # ignore QCDF warnings for LFU ratios! with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="The QCDF corrections should not be trusted .*") numobj = BVll_obs_int(func, q2min, q2max, B, V, l1, wc_obj, par) numobj.epsrel = 0.0005 num = numobj() if num == 0: return 0 denobj = BVll_obs_int(func, q2min, q2max, B, V, l2, wc_obj, par) denobj.epsrel = 0.0005 den = denobj() return num / den return fct def bvll_obs_ratio_leptonflavour(func, B, V, l1, l2)-
Expand source code
def bvll_obs_ratio_leptonflavour(func, B, V, l1, l2): def fct(wc_obj, par, q2): with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="The QCDF corrections should not be trusted .*") num = BVll_obs(func, q2, B, V, l1, wc_obj, par)() if num == 0: return 0 den = BVll_obs(func, q2, B, V, l2, wc_obj, par)() return num / den return fct def dGdq2(J)-
Expand source code
def dGdq2(J): return 3/4. * (2 * J['1s'] + J['1c']) - 1/4. * (2 * J['2s'] + J['2c']) def dGdq2_ave(J, J_bar)-
Expand source code
def dGdq2_ave(J, J_bar): return ( dGdq2(J) + dGdq2(J_bar) )/2. def dGdq2_diff(J, J_bar)-
Expand source code
def dGdq2_diff(J, J_bar): return ( dGdq2(J) - dGdq2(J_bar) )/2. def diff(x, y)-
Expand source code
def diff(x, y): return x-y def make_metadata_binned(M, l, obs, obsdict)-
Expand source code
def make_metadata_binned(M, l, obs, obsdict): _process_tex = _hadr[M]['tex'] +_tex[l]+r"^+"+_tex[l]+r"^-" _process_taxonomy = r'Process :: $b$ hadron decays :: FCNC decays :: $B\to V\ell^+\ell^-$ :: $' + _process_tex + r"$" B = _hadr[M]['B'] V = _hadr[M]['V'] _obs_name = "<" + obs + ">("+M+l+l+")" _obs = Observable(name=_obs_name, arguments=['q2min', 'q2max']) _obs.set_description('Binned ' + obsdict['desc'] + r" in $" + _process_tex + r"$") _obs.tex = r"$\langle " + obsdict['tex'] + r"\rangle(" + _process_tex + r")$" _obs.add_taxonomy(_process_taxonomy) return _obs def make_metadata_differential(M, l, obs, obsdict)-
Expand source code
def make_metadata_differential(M, l, obs, obsdict): _process_tex = _hadr[M]['tex'] +_tex[l]+r"^+"+_tex[l]+r"^-" _process_taxonomy = r'Process :: $b$ hadron decays :: FCNC decays :: $B\to V\ell^+\ell^-$ :: $' + _process_tex + r"$" B = _hadr[M]['B'] V = _hadr[M]['V'] _obs_name = obs + "("+M+l+l+")" _obs = Observable(name=_obs_name, arguments=['q2']) _obs.set_description(obsdict['desc'][0].capitalize() + obsdict['desc'][1:] + r" in $" + _process_tex + r"$") _obs.tex = r"$" + obsdict['tex'] + r"(" + _process_tex + r")$" _obs.add_taxonomy(_process_taxonomy) return _obs def make_obs(M, l, obs, obsdict)-
Expand source code
def make_obs(M, l, obs, obsdict): B = _hadr[M]['B'] V = _hadr[M]['V'] func_num = obsdict['func_num'] # binned angular observables _obs = make_metadata_binned(M, l, obs, obsdict) func = lambda wc_obj, par, q2min, q2max: BVll_int_ratio(func_num, SA_den, q2min, q2max, B, V, l, wc_obj, par)() Prediction(_obs.name, func) # differential angular observables _obs = make_metadata_differential(M, l, obs, obsdict) func = lambda wc_obj, par, q2: BVll_ratio(func_num, SA_den, q2, B, V, l, wc_obj, par)() Prediction(_obs.name, func) def make_obs_br(M, l)-
Expand source code
def make_obs_br(M, l): """Make observable instances for branching ratios""" _process_tex = _hadr[M]['tex'] +_tex[l]+r"^+"+_tex[l]+r"^-" _process_taxonomy = r'Process :: $b$ hadron decays :: FCNC decays :: $B\to V\ell^+\ell^-$ :: $' + _process_tex + r"$" B = _hadr[M]['B'] V = _hadr[M]['V'] # binned branching ratio _obs_name = "<dBR/dq2>("+M+l+l+")" _obs = Observable(name=_obs_name, arguments=['q2min', 'q2max']) _obs.set_description(r"Binned differential branching ratio of $" + _process_tex + r"$") _obs.tex = r"$\langle \frac{d\text{BR}}{dq^2} \rangle(" + _process_tex + r")$" _obs.add_taxonomy(_process_taxonomy) func = lambda wc_obj, par, q2min, q2max: BVll_dBRdq2_int(q2min, q2max, B, V, l, wc_obj, par)() Prediction(_obs_name, func) # differential branching ratio _obs_name = "dBR/dq2("+M+l+l+")" _obs = Observable(name=_obs_name, arguments=['q2']) _obs.set_description(r"Differential branching ratio of $" + _process_tex + r"$") _obs.tex = r"$\frac{d\text{BR}}{dq^2}(" + _process_tex + r")$" _obs.add_taxonomy(_process_taxonomy) func = lambda wc_obj, par, q2: BVll_dBRdq2(q2, B, V, l, wc_obj, par)() Prediction(_obs_name, func)Make observable instances for branching ratios
def make_obs_lfur(M, l)-
Expand source code
def make_obs_lfur(M, l): """Make observable instances for lepton flavour ratios""" # binned ratio of BRs _obs_name = "<R"+l[0]+l[1]+">("+M+"ll)" _obs = Observable(name=_obs_name, arguments=['q2min', 'q2max']) _obs.set_description(r"Ratio of partial branching ratios of $" + _hadr[M]['tex'] +_tex[l[0]]+r"^+ "+_tex[l[0]]+r"^-$" + " and " + r"$" + _hadr[M]['tex'] +_tex[l[1]]+r"^+ "+_tex[l[1]]+"^-$") _obs.tex = r"$\langle R_{" + _tex[l[0]] + ' ' + _tex[l[1]] + r"} \rangle(" + _hadr[M]['tex'] + r"\ell^+\ell^-)$" for li in l: # add taxonomy for both processes (e.g. B->Vee and B->Vmumu) _obs.add_taxonomy(r'Process :: $b$ hadron decays :: FCNC decays :: $B\to V\ell^+\ell^-$ :: $' + _hadr[M]['tex'] +_tex[li]+r"^+"+_tex[li]+r"^-$") Prediction(_obs_name, bvll_obs_int_ratio_leptonflavour(dGdq2_ave, _hadr[M]['B'], _hadr[M]['V'], *l)) # differential ratio of BRs _obs_name = "R"+l[0]+l[1]+"("+M+"ll)" _obs = Observable(name=_obs_name, arguments=['q2']) _obs.set_description(r"Ratio of differential branching ratios of $" + _hadr[M]['tex'] +_tex[l[0]]+r"^+ "+_tex[l[0]]+r"^-$" + " and " + r"$" + _hadr[M]['tex'] +_tex[l[1]]+r"^+ "+_tex[l[1]]+"^-$") _obs.tex = r"$R_{" + _tex[l[0]] + ' ' + _tex[l[1]] + r"} (" + _hadr[M]['tex'] + r"\ell^+\ell^-)$" for li in l: # add taxonomy for both processes (e.g. B->Vee and B->Vmumu) _obs.add_taxonomy(r'Process :: $b$ hadron decays :: FCNC decays :: $B\to V\ell^+\ell^-$ :: $' + _hadr[M]['tex'] +_tex[li]+r"^+"+_tex[li]+r"^-$") func = lambda wc_obj, par, q2: BVll_dBRdq2(q2, B, V, l, wc_obj, par)() Prediction(_obs_name, bvll_obs_ratio_leptonflavour(dGdq2_ave, _hadr[M]['B'], _hadr[M]['V'], *l))Make observable instances for lepton flavour ratios
def make_obs_p(M, l, obs, obsdict)-
Expand source code
def make_obs_p(M, l, obs, obsdict): B = _hadr[M]['B'] V = _hadr[M]['V'] func_num = obsdict['func_num'] # binned "optimized" angular observables P _obs = make_metadata_binned(M, l, obs, obsdict) func = lambda wc_obj, par, q2min, q2max: BVll_int_ratio(func_num, P_den, q2min, q2max, B, V, l, wc_obj, par)() Prediction(_obs.name, func) # differential "optimized" angular observables _obs = make_metadata_differential(M, l, obs, obsdict) func = lambda wc_obj, par, q2: BVll_ratio(func_num, P_den, q2, B, V, l, wc_obj, par)() Prediction(_obs.name, func) def make_obs_pprime(M, l, obs, obsdict)-
Expand source code
def make_obs_pprime(M, l, obs, obsdict): B = _hadr[M]['B'] V = _hadr[M]['V'] func_num = obsdict['func_num'] # binned "optimized" angular observables _obs = make_metadata_binned(M, l, obs, obsdict) func = lambda wc_obj, par, q2min, q2max: BVll_int_pprime(func_num, q2min, q2max, B, V, l, wc_obj, par)() Prediction(_obs.name, func) # differential "optimized" angular observables _obs = make_metadata_differential(M, l, obs, obsdict) func = lambda wc_obj, par, q2: BVll_pprime(func_num, q2, B, V, l, wc_obj, par)() Prediction(_obs.name, func) def nintegrate_pole(function, q2min, q2max, epsrel=0.005)-
Expand source code
def nintegrate_pole(function, q2min, q2max, epsrel=0.005): # this is a special integration function to treat the presence of the # photon pole at low q^2. If q2min is below 0.1 GeV^2, it adds and subtracts # the 1/q^2-enhanced pole part to split the integral into a well-behaved part # and one that is trivially solved analytically. # This leads to a huge speed-up. if q2min <= 0.1 and q2min > 0: q20 = q2min f_q20 = function(q20) int_a = flavio.math.integrate.nintegrate(lambda q2: function(q2)-f_q20*q20/q2, q2min, q2max, epsrel=epsrel) int_b = f_q20*q20 * log(q2max/q2min) return int_a + int_b else: return flavio.math.integrate.nintegrate(function, q2min, q2max)
Classes
class BVllObservable (B, V, lep, wc_obj, par)-
Expand source code
class BVllObservable(object): r"""Base class for $B\to V\ell^+\ell^- observable functions that facilitates caching/memoization.""" def __init__(self, B, V, lep, wc_obj, par): """Initialize the class and cache results needed more often.""" self.B = B self.V = V self.lep = lep self.wc_obj = wc_obj self.par = par self.par_conjugate = conjugate_par(par) self.prefactor = prefactor(None, self.par, B, V) self.prefactor_conjugate = prefactor(None, self.par_conjugate, B, V) self.scale = config['renormalization scale']['bvll'] self.label = meson_quark[(B,V)] + lep + lep # e.g. bsmumu, bdtautau self.wctot_dict = wctot_dict(wc_obj, self.label, self.scale, par) self._ff = {} self._wceff = {} self._wceff_bar = {} self._ha = {} self._ha_bar = {} self._j = {} self._j_bar = {} self.ml = par['m_'+lep] self.mB = par['m_'+B] self.mV = par['m_'+V] self.mb = running.get_mb(par, self.scale) def ff(self, q2): """Get form factors. Cache and only recompute if necessary.""" if q2 not in self._ff: self._ff[q2] = get_ff(q2, self.par, self.B, self.V) return self._ff[q2] def wceff(self, q2): """Get effective WCs. Cache and only recompute if necessary.""" if q2 not in self._wceff: self._wceff[q2] = get_wceff(q2, self.wctot_dict, self.par, self.B, self.V, self.lep, self.scale) return self._wceff[q2] def wceff_bar(self, q2): """Get CP conjugate effective WCs. Cache and only recompute if necessary.""" if q2 not in self._wceff_bar: self._wceff_bar[q2] = get_wceff(q2, conjugate_wc(self.wctot_dict), self.par_conjugate, self.B, self.V, self.lep, self.scale) return self._wceff_bar[q2] def helicity_amps_ff(self, q2, cp_conjugate): """Get helicity amps proportional to FFs. Cache and only recompute if necessary.""" if not cp_conjugate: return angular.helicity_amps_v(q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml, self.ff(q2), self.wceff(q2), self.prefactor) else: return angular.helicity_amps_v(q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml, self.ff(q2), self.wceff_bar(q2), self.prefactor_conjugate) def ha(self, q2): """Get full helicity amps. Cache and only recompute if necessary.""" if q2 not in self._ha: self._ha[q2] = add_dict(( self.helicity_amps_ff(q2, cp_conjugate=False), get_ss(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=False), get_subleading(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=False) )) return self._ha[q2] def ha_bar(self, q2): """Get CP conjugate full helicity amps. Cache and only recompute if necessary.""" if q2 not in self._ha_bar: self._ha_bar[q2] = add_dict(( self.helicity_amps_ff(q2, cp_conjugate=True), get_ss(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=True), get_subleading(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=True) )) return self._ha_bar[q2] def j(self, q2): """Get angular coeffs. Cache and only recompute if necessary.""" h = self.ha(q2) if q2 not in self._j: self._j[q2] = angular.angularcoeffs_general_v(h, q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml) return self._j[q2] def jbar(self, q2): """Get CP conjugate angular coeffs. Cache and only recompute if necessary.""" hbar = self.ha_bar(q2) if q2 not in self._j_bar: self._j_bar[q2] = angular.angularcoeffs_general_v(hbar, q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml) return self._j_bar[q2] def jfunc(self, function, q2): """Return a function of J and Jbar at one value of q2.""" return function(self.j(q2), self.jbar(q2))Base class for $B\to V\ell^+\ell^- observable functions that facilitates caching/memoization.
Initialize the class and cache results needed more often.
Subclasses
Methods
def ff(self, q2)-
Expand source code
def ff(self, q2): """Get form factors. Cache and only recompute if necessary.""" if q2 not in self._ff: self._ff[q2] = get_ff(q2, self.par, self.B, self.V) return self._ff[q2]Get form factors. Cache and only recompute if necessary.
def ha(self, q2)-
Expand source code
def ha(self, q2): """Get full helicity amps. Cache and only recompute if necessary.""" if q2 not in self._ha: self._ha[q2] = add_dict(( self.helicity_amps_ff(q2, cp_conjugate=False), get_ss(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=False), get_subleading(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=False) )) return self._ha[q2]Get full helicity amps. Cache and only recompute if necessary.
def ha_bar(self, q2)-
Expand source code
def ha_bar(self, q2): """Get CP conjugate full helicity amps. Cache and only recompute if necessary.""" if q2 not in self._ha_bar: self._ha_bar[q2] = add_dict(( self.helicity_amps_ff(q2, cp_conjugate=True), get_ss(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=True), get_subleading(q2, self.wc_obj, self.par, self.B, self.V, cp_conjugate=True) )) return self._ha_bar[q2]Get CP conjugate full helicity amps. Cache and only recompute if necessary.
def helicity_amps_ff(self, q2, cp_conjugate)-
Expand source code
def helicity_amps_ff(self, q2, cp_conjugate): """Get helicity amps proportional to FFs. Cache and only recompute if necessary.""" if not cp_conjugate: return angular.helicity_amps_v(q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml, self.ff(q2), self.wceff(q2), self.prefactor) else: return angular.helicity_amps_v(q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml, self.ff(q2), self.wceff_bar(q2), self.prefactor_conjugate)Get helicity amps proportional to FFs. Cache and only recompute if necessary.
def j(self, q2)-
Expand source code
def j(self, q2): """Get angular coeffs. Cache and only recompute if necessary.""" h = self.ha(q2) if q2 not in self._j: self._j[q2] = angular.angularcoeffs_general_v(h, q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml) return self._j[q2]Get angular coeffs. Cache and only recompute if necessary.
def jbar(self, q2)-
Expand source code
def jbar(self, q2): """Get CP conjugate angular coeffs. Cache and only recompute if necessary.""" hbar = self.ha_bar(q2) if q2 not in self._j_bar: self._j_bar[q2] = angular.angularcoeffs_general_v(hbar, q2, self.mB, self.mV, self.mb, 0, self.ml, self.ml) return self._j_bar[q2]Get CP conjugate angular coeffs. Cache and only recompute if necessary.
def jfunc(self, function, q2)-
Expand source code
def jfunc(self, function, q2): """Return a function of J and Jbar at one value of q2.""" return function(self.j(q2), self.jbar(q2))Return a function of J and Jbar at one value of q2.
def wceff(self, q2)-
Expand source code
def wceff(self, q2): """Get effective WCs. Cache and only recompute if necessary.""" if q2 not in self._wceff: self._wceff[q2] = get_wceff(q2, self.wctot_dict, self.par, self.B, self.V, self.lep, self.scale) return self._wceff[q2]Get effective WCs. Cache and only recompute if necessary.
def wceff_bar(self, q2)-
Expand source code
def wceff_bar(self, q2): """Get CP conjugate effective WCs. Cache and only recompute if necessary.""" if q2 not in self._wceff_bar: self._wceff_bar[q2] = get_wceff(q2, conjugate_wc(self.wctot_dict), self.par_conjugate, self.B, self.V, self.lep, self.scale) return self._wceff_bar[q2]Get CP conjugate effective WCs. Cache and only recompute if necessary.
class BVllObservableBinned (q2min, q2max, *args, **kwargs)-
Expand source code
class BVllObservableBinned(BVllObservable): """Base class for binned observables depending on q2min and q2max.""" def __init__(self, q2min, q2max, *args, **kwargs): super().__init__(*args, **kwargs) self.q2min = q2min self.q2max = q2max self.q2min_allowed = max(4 * self.ml**2, self.q2min) self.q2max_allowed = min((self.mB - self.mV)**2, self.q2max)Base class for binned observables depending on q2min and q2max.
Initialize the class and cache results needed more often.
Ancestors
Subclasses
Inherited members
class BVllObservableDifferential (q2, *args, **kwargs)-
Expand source code
class BVllObservableDifferential(BVllObservable): """Base class for differential observables depending on q2.""" def __init__(self, q2, *args, **kwargs): super().__init__(*args, **kwargs) self.q2 = q2 if q2 < 4 * self.ml**2 or q2 > (self.mB - self.mV)**2: self.allowed = False else: self.allowed = TrueBase class for differential observables depending on q2.
Initialize the class and cache results needed more often.
Ancestors
Subclasses
Inherited members
class BVll_dBRdq2 (*args, **kwargs)-
Expand source code
class BVll_dBRdq2(BVllObservableDifferential): """Differential branching ratio""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def __call__(self): if not self.allowed: return 0 tauB = self.par['tau_' + self.B] return tauB * self.jfunc(dGdq2_ave, self.q2)Differential branching ratio
Initialize the class and cache results needed more often.
Ancestors
Inherited members
class BVll_dBRdq2_int (*args, **kwargs)-
Expand source code
class BVll_dBRdq2_int(BVllObservableBinned): """Binned branching ratio""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.epsrel = 0.005 def obs(self, q2): tauB = self.par['tau_' + self.B] return tauB * self.jfunc(dGdq2_ave, q2) def __call__(self): if self.q2max_allowed <= self.q2min_allowed: return 0 return nintegrate_pole(self.obs, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) / (self.q2max - self.q2min)Binned branching ratio
Initialize the class and cache results needed more often.
Ancestors
Methods
def obs(self, q2)-
Expand source code
def obs(self, q2): tauB = self.par['tau_' + self.B] return tauB * self.jfunc(dGdq2_ave, q2)
Inherited members
class BVll_int_pprime (func_num, *args, **kwargs)-
Expand source code
class BVll_int_pprime(BVllObservableBinned): r"""Binned $P'$ observables""" def __init__(self, func_num, *args, **kwargs): super().__init__(*args, **kwargs) self.epsrel = 0.005 self.func_num = func_num def obs_num(self, q2): return self.jfunc(self.func_num, q2) def obs_2s(self, q2): return self.jfunc(lambda J, J_bar: S_experiment_num(J, J_bar, '2s'), q2) def obs_2c(self, q2): return self.jfunc(lambda J, J_bar: S_experiment_num(J, J_bar, '2c'), q2) def __call__(self): if self.q2max_allowed <= self.q2min_allowed: return 0 num = nintegrate_pole(self.obs_num, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) if num == 0: return 0 den_2s = nintegrate_pole(self.obs_2s, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) den_2c = nintegrate_pole(self.obs_2c, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) den = 2 * sqrt(-den_2s * den_2c) return num / denBinned $P'$ observables
Initialize the class and cache results needed more often.
Ancestors
Methods
def obs_2c(self, q2)-
Expand source code
def obs_2c(self, q2): return self.jfunc(lambda J, J_bar: S_experiment_num(J, J_bar, '2c'), q2) def obs_2s(self, q2)-
Expand source code
def obs_2s(self, q2): return self.jfunc(lambda J, J_bar: S_experiment_num(J, J_bar, '2s'), q2) def obs_num(self, q2)-
Expand source code
def obs_num(self, q2): return self.jfunc(self.func_num, q2)
Inherited members
class BVll_int_ratio (func_num, func_den, *args, **kwargs)-
Expand source code
class BVll_int_ratio(BVllObservableBinned): """Binned ratio of functions if angular coefficients""" def __init__(self, func_num, func_den, *args, **kwargs): super().__init__(*args, **kwargs) self.epsrel = 0.005 self.func_num = func_num self.func_den = func_den def obs_num(self, q2): return self.jfunc(self.func_num, q2) def obs_den(self, q2): return self.jfunc(self.func_den, q2) def __call__(self): if self.q2max_allowed <= self.q2min_allowed: return 0 num = nintegrate_pole(self.obs_num, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) if num == 0: return 0 den = nintegrate_pole(self.obs_den, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) return num / denBinned ratio of functions if angular coefficients
Initialize the class and cache results needed more often.
Ancestors
Methods
def obs_den(self, q2)-
Expand source code
def obs_den(self, q2): return self.jfunc(self.func_den, q2) def obs_num(self, q2)-
Expand source code
def obs_num(self, q2): return self.jfunc(self.func_num, q2)
Inherited members
class BVll_obs (func, *args, **kwargs)-
Expand source code
class BVll_obs(BVllObservableDifferential): """Differential function of angular coefficients""" def __init__(self, func, *args, **kwargs): super().__init__(*args, **kwargs) self.func = func def __call__(self): if not self.allowed: return 0 return self.jfunc(self.func, self.q2)Differential function of angular coefficients
Initialize the class and cache results needed more often.
Ancestors
Inherited members
class BVll_obs_int (func, *args, **kwargs)-
Expand source code
class BVll_obs_int(BVllObservableBinned): """Binned function of angular coefficients""" def __init__(self, func, *args, **kwargs): super().__init__(*args, **kwargs) self.epsrel = 0.005 self.func = func def obs(self, q2): return self.jfunc(self.func, q2) def __call__(self): if self.q2max_allowed <= self.q2min_allowed: return 0 return nintegrate_pole(self.obs, self.q2min_allowed, self.q2max_allowed, epsrel=self.epsrel) / (self.q2max - self.q2min)Binned function of angular coefficients
Initialize the class and cache results needed more often.
Ancestors
Methods
def obs(self, q2)-
Expand source code
def obs(self, q2): return self.jfunc(self.func, q2)
Inherited members
class BVll_pprime (func_num, *args, **kwargs)-
Expand source code
class BVll_pprime(BVllObservableDifferential): r"""Differential $P'$ observables""" def __init__(self, func_num, *args, **kwargs): super().__init__(*args, **kwargs) self.func_num = func_num @staticmethod def func_2s(J, J_bar): return S_experiment_num(J, J_bar, '2s') @staticmethod def func_2c(J, J_bar): return S_experiment_num(J, J_bar, '2c') def __call__(self): if not self.allowed: return 0 num = self.jfunc(self.func_num, self.q2) if num == 0: return 0 den_2s = self.jfunc(self.func_2s, self.q2) den_2c = self.jfunc(self.func_2c, self.q2) den = 2 * sqrt(-den_2s * den_2c) return num / denDifferential $P'$ observables
Initialize the class and cache results needed more often.
Ancestors
Static methods
def func_2c(J, J_bar)-
Expand source code
@staticmethod def func_2c(J, J_bar): return S_experiment_num(J, J_bar, '2c') def func_2s(J, J_bar)-
Expand source code
@staticmethod def func_2s(J, J_bar): return S_experiment_num(J, J_bar, '2s')
Inherited members
class BVll_ratio (func_num, func_den, *args, **kwargs)-
Expand source code
class BVll_ratio(BVllObservableDifferential): """Differential ratio of functions of angular coefficients""" def __init__(self, func_num, func_den, *args, **kwargs): super().__init__(*args, **kwargs) self.func_num = func_num self.func_den = func_den def __call__(self): if not self.allowed: return 0 num = self.jfunc(self.func_num, self.q2) if num == 0: return 0 den = self.jfunc(self.func_den, self.q2) return num / denDifferential ratio of functions of angular coefficients
Initialize the class and cache results needed more often.
Ancestors
Inherited members