def plot_tagging(omega,d_omega,eff,d_eff, sigma_t,a_acc,n_acc,b_acc,beta_acc,cutoff_acc, dm,dg,gs,r=0,delta=0,gamma=0,beta=0,k=1, xmin=0,xmax=5,y_tag=0.4,y_untag=0.2,y_mix=1, k_acc=True,k_res=True, name='plot.eps',save=False, b_f=True, bbar_f=True, bbar_fbar=True, b_fbar=True, fold_amix=True): fig, (ax1,ax2,ax3) = plt.subplots(1,3, figsize=(30,10)) # phases delta_rad = delta*np.pi/180 gamma_rad = gamma*np.pi/180 beta_rad = beta/1000 # Decay Rate Equations t = np.linspace(xmin,xmax,pp) eff_acc = eff_pow(t,a_acc,n_acc,b_acc,beta_acc,cutoff_acc) if k_acc else 1 sigma_t = sigma_t if k_res else 0 B_f_t = eff_acc*P_t(t=t,qt=1,qf=1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if b_f else False Bbar_f_t = eff_acc*P_t(t=t,qt=-1,qf=1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if bbar_f else False B_fbar_t = eff_acc*P_t(t=t,qt=1,qf=-1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if b_fbar else False Bbar_fbar_t = eff_acc*P_t(t=t,qt=-1,qf=-1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if bbar_fbar else False plot_osc(ax1,t,B_f_t,Bbar_f_t,B_fbar_t,Bbar_fbar_t,xmin,xmax,ymax=y_tag,title='Tagged Decay Rate',leghead='') Untag_f_t = eff_acc*P_t(t=t,qt=0,qf=1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) Untag_fbar_t = eff_acc*P_t(t=t,qt=0,qf=-1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) plot_Untag_f_t = Untag_f_t if (b_f or bbar_f) else False plot_Untag_fbar_t = Untag_fbar_t if (b_fbar or bbar_fbar) else False plot_untag(ax2,t,plot_Untag_f_t,plot_Untag_fbar_t,xmin,xmax,ymax=y_untag,title='Untagged Decay Rate',leghead=tag_leg(omega,d_omega,eff,d_eff)) # Mixing Asymmetry xmin_mix = max(np.power(b_acc,1./n_acc)/a_acc,cutoff_acc) t_fold = fold_times(xmin_mix,xmax,dm) if fold_amix and (len(t_fold)>1): Amix_f_t_fold = Afold_qf(t=t_fold,qf=1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if (b_f or bbar_f) else False Amix_fbar_t_fold = Afold_qf(t=t_fold,qf=-1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,k=k, sigma_t=sigma_t,eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if (b_fbar or bbar_fbar) else False t_osc = np.linspace(0,2*np.pi/dm,pp) plot_amix(ax3,t_osc,Amix_f_t_fold,Amix_fbar_t_fold,0,2*np.pi/dm, title='Folded Asymmetries',xtitle=r't modulo $2\pi/\Delta m_{s}$ [ps]', xtitle_pos=[0.7,-0.07],ymin=-y_mix,ymax=y_mix) else: Amix_f_t = Amix_qf(t=t,qf=1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,sigma_t=sigma_t,k=k, eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if (b_f or bbar_f) else False Amix_fbar_t = Amix_qf(t=t,qf=-1,dm=dm,dg=dg,gs=gs,r=r,delta=delta_rad,gamma=gamma_rad,beta=beta_rad,sigma_t=sigma_t,k=k, eff=eff,d_eff=d_eff,omega=omega,d_omega=d_omega) if (b_fbar or bbar_fbar) else False plot_amix(ax3,t,Amix_f_t,Amix_fbar_t,xmin,xmax,ymin=-y_mix,ymax=y_mix) # Plot fig.tight_layout() if save: fig.savefig(name) plt.show()
def plot_decrate(dm=17.757, dg=0.085, gs=0.664, r=0, delta=0, gamma=0, beta=0, k=1, xmin=0, xmax=5, y_osc=2, y_mix=1, name='plot.eps', save=False, b_f=True, bbar_f=True, bbar_fbar=True, b_fbar=True, fold_amix=True): # ymin=0 # ymax=2 fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(30, 10)) # phases delta_rad = delta * np.pi / 180 gamma_rad = gamma * np.pi / 180 beta_rad = beta / 1000 # CP coefficients C_f_val = C_qf(r, +1) C_fbar_val = C_qf(r, -1) A_f_val = A_qf(r, delta_rad, gamma_rad, beta_rad, k=k, qf=+1) A_fbar_val = A_qf(r, delta_rad, gamma_rad, beta_rad, k=k, qf=-1) S_f_val = S_qf(r, delta_rad, gamma_rad, beta_rad, k=k, qf=+1) S_fbar_val = S_qf(r, delta_rad, gamma_rad, beta_rad, k=k, qf=-1) # Decay Rate Equations t = np.linspace(xmin, xmax, pp) B_f_t = P_t(t=t, qt=1, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if b_f else False Bbar_f_t = P_t(t=t, qt=-1, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if bbar_f else False B_fbar_t = P_t(t=t, qt=1, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if b_fbar else False Bbar_fbar_t = P_t(t=t, qt=-1, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if bbar_fbar else False plot_osc(ax1, t, B_f_t, Bbar_f_t, B_fbar_t, Bbar_fbar_t, xmin, xmax, ymax=y_osc, title='') # Mixing Asymmetries t_fold = fold_times(xmin, xmax, dm) if fold_amix and (len(t_fold) > 1): Amix_f_t_fold = Afold_qf(t=t_fold, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if (b_f or bbar_f) else False Amix_fbar_t_fold = Afold_qf(t=t_fold, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if (b_fbar or bbar_fbar) else False t_osc = np.linspace(0, 2 * np.pi / dm, pp) plot_amix( ax2, t_osc, Amix_f_t_fold, Amix_fbar_t_fold, 0, 2 * np.pi / dm, # title='Folded Asymmetries', title='', xtitle=r't modulo $2\pi/\Delta m_{s}$ [ps]', xtitle_pos=[0.7, -0.07], ymin=-y_mix, ymax=y_mix) else: Amix_f_t = Amix_qf(t=t, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if (b_f or bbar_f) else False Amix_fbar_t = Amix_qf(t=t, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) if (b_fbar or bbar_fbar) else False plot_amix(ax2, t, Amix_f_t, Amix_fbar_t, xmin, xmax, ymin=-y_mix, ymax=y_mix, title='') # Constraints on Gamma plot_gamma(ax3, r, delta_rad, gamma_rad - 2 * beta_rad, A_f_val, S_f_val, A_fbar_val, S_fbar_val, title='') # Plot fig.tight_layout() if save: fig.savefig(name) plt.show()
def plot_acceptance(a_acc, n_acc, b_acc, beta_acc, cutoff_acc, dm, dg, gs, r=0, delta=0, gamma=0, beta=0, k=1, xmin=0, xmax=5, y_osc=2, y_mix=1, name='plot.eps', save=False, fold_amix=True): fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(30, 10)) # phases delta_rad = delta * np.pi / 180 gamma_rad = gamma * np.pi / 180 beta_rad = beta / 1000 # Decay Rate Equations t = np.linspace(xmin, xmax, pp) eff_acc = eff_pow(t, a_acc, n_acc, b_acc, beta_acc, cutoff_acc) B_f_obs_t = eff_acc * P_t(t=t, qt=1, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) Bbar_f_obs_t = eff_acc * P_t(t=t, qt=-1, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) B_fbar_obs_t = eff_acc * P_t(t=t, qt=1, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) Bbar_fbar_obs_t = eff_acc * P_t(t=t, qt=-1, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) tot_dec = B_f_obs_t + Bbar_f_obs_t + B_fbar_obs_t + Bbar_fbar_obs_t plot_acc(ax1, t, tot_dec, xmin, xmax, ymin=0, ymax=y_osc, leghead='', title='') plot_acc( ax2, t, eff_acc, xmin, xmax, ymin=0, ymax=1, # title='Acceptance', title='', ytitle=r'$\varepsilon(t)$', leghead=acc_leg(a_acc, n_acc, b_acc, beta_acc, cutoff_acc), legcoo='lower right') # Mixing Asymmetry xmin_mix = max(np.power(b_acc, 1. / n_acc) / a_acc, cutoff_acc) t_fold = fold_times(xmin_mix, xmax, dm) if fold_amix and (len(t_fold) > 1): Amix_f_t_fold = Afold_qf(t=t_fold, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) Amix_fbar_t_fold = Afold_qf(t=t_fold, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) t_osc = np.linspace(0, 2 * np.pi / dm, pp) plot_amix( ax3, t_osc, Amix_f_t_fold, Amix_fbar_t_fold, 0, 2 * np.pi / dm, # title='Folded Asymmetries', title='', xtitle=r't modulo $2\pi/\Delta m_{s}$ [ps]', xtitle_pos=[0.7, -0.07], ymin=-y_mix, ymax=y_mix) else: Amix_f_t = Amix_qf(t=t, qf=1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) Amix_fbar_t = Amix_qf(t=t, qf=-1, dm=dm, dg=dg, gs=gs, r=r, delta=delta_rad, gamma=gamma_rad, beta=beta_rad, k=k) plot_amix(ax3, t, Amix_f_t, Amix_fbar_t, xmin, xmax, ymin=-y_mix, ymax=y_mix) # Plot fig.tight_layout() if save: fig.savefig(name) plt.show()