#Energy balance of a nuclear reaction
mu = 931.5 # Energy equivalent of 1 amu, MeV
M_D = 2.0141 # Mass of deuterium atom, amu
M_He = 3.01603 # Mass of helium-3, amu
mn = 1.008665 # Mass of neutron, amu
MD = (2*M_D - M_He - mn) # Mass defect of the reaction, amu
Q = MD*mu # Energy balance of the nuclear reaction, MeV
print "The energy balance of the nuclear reaction = %4.2f MeV"% Q
#Threshold energy for the reaction
mu = 931.5 # Energy equivalent of 1 amu, MeV
mx = 1.008665 # Mass of neutron, amu
Mx = 13.003355 # Mass of carbon atom, amu
M_alpha = 4.002603 # Mass of alpha particle, amu
M_Be = 10.013534 # Mass of beryllium, amu
MD = (Mx + mx - M_Be - M_alpha) # Mass defect of the reaction, amu
Q = MD*mu # Q-value of the nuclear reaction, MeV
E_th = -Q*(1 + mx/Mx) # Threshold energy for the reaction in the laboratory, MeV
print "The threshold energy of the reaction is = %4.2f MeV"% E_th
#Gamma ray emission
h_bar = 1.0e-034 # Order of reduced Planck's constant, Js
e = 1.0e-019 # Order of energy equivalent of 1 eV, J/eV
tau1 = 1e-009 # Life time of gamma ray emission, sec
tau2 = 1e-012 # Life time of gamma ray emission, sec
W1 = h_bar/tau1 # Full width at half maxima for tau1, eV
W2 = h_bar/tau2 # Full width at half maxima for tau2, eV
print "The full width at half maxima for %1.0e = %1.0e eV"%(tau1, W1/e)
print "The full width at half maxima for %1.0e = %1.0e eV"%(tau2, W2/e)