Beispiel #1
0
def calcSpectrum(E_R, m_x, sigma_p):
    dRdE = np.zeros_like(E_R)

    for nuc in nuclei_Xe:
        N_p = 54.
        N_n = get_A(nuc) - N_p
        dRdE += get_frac(nuc) * DMU.dRdE_standard(E_R, N_p, N_n, m_x, sigma_p)

    return dRdE
Beispiel #2
0
ER_grid, EEM_grid = np.meshgrid(ER_list, EEM_list, indexing='ij')

#--------------------------------------------------
#--------- Standard Elastic Nuclear Recoils -------
#--------------------------------------------------

eta_list = np.trapz(f_clip / (v_list + 1e-30), v_list) - cumtrapz(
    f_clip / (v_list + 1e-30), v_list, initial=0)
eta_func = interp1d(v_list, eta_list, bounds_error=False, fill_value=0.0)

#plt.figure()
#
#plt.plot(v_list, eta_list)

R_NR_list = DMU_standard.dRdE_generic(ER_list, A_Ge, 0, m_x, sigma_p, eta_func)
R_NR_list_noscatter = DMU_standard.dRdE_standard(ER_list, A_Ge, 0, m_x,
                                                 sigma_p)

outfile = "results/spectra/Elastic/Elastic_" + interaction + "_MOD_mx" + '{0:.3f}'.format(
    m_x) + "_lsig" + '{0:.2f}'.format(np.log10(sigma_p)) + ".txt"
headertxt = "Elastic nuclear recoil spectrum for " + interaction + " interactions. Ge detector at Modane (d=1700m, latitude=45.2deg)"
headertxt += "\nColumns: Nuclear recoil energy [keV], dR/dE (w/ Earth-shielding) [events/keV/kg/day]"
#Output format - short
#np.savetxt(outfile, list(zip(ER_list, R_NR_list, R_NR_list_noscatter)), header=headertxt, fmt='%.4e')
np.savetxt(outfile,
           list(zip(ER_list, R_NR_list)),
           header=headertxt,
           fmt='%.3e')

#plt.figure()
#
#plt.loglog(ER_list, R_NR_list_noscatter, '--')