mirror of
https://github.com/vale981/bachelor_thesis
synced 2025-03-10 04:46:40 -04:00
3.9 KiB
3.9 KiB
Init
Required Modules
import numpy as np
import matplotlib.pyplot as plt
Utilities
%run ../utility.py
Implementation
"""
Implementation of the analytical cross section for q q_bar ->
gamma gamma
Author: Valentin Boettcher <hiro@protagon.space>
"""
import numpy as np
from scipy.constants import alpha
# NOTE: a more elegant solution would be a decorator
def energy_factor(charge, esp):
"""
Calculates the factor common to all other values in this module
Arguments:
esp -- center of momentum energy in GeV
charge -- charge of the particle in units of the elementary charge
"""
return charge**4*(alpha/esp)**2/6
def diff_xs(θ, charge, esp):
"""
Calculates the differential cross section as a function of the
azimuth angle θ in units of 1/GeV².
Arguments:
θ -- azimuth angle
esp -- center of momentum energy in GeV
charge -- charge of the particle in units of the elementary charge
"""
f = energy_factor(charge, esp)
return f*((np.cos(θ)**+1)/np.sin(θ)**2)
def diff_xs_eta(η, charge, esp):
"""
Calculates the differential cross section as a function of the
pseudo rapidity of the photons in units of 1/GeV^2.
Arguments:
η -- pseudo rapidity
esp -- center of momentum energy in GeV
charge -- charge of the particle in units of the elementary charge
"""
f = energy_factor(charge, esp)
return f*(2*np.cosh(η)**2 - 1)
def total_xs_eta(η, charge, esp):
"""
Calculates the total cross section as a function of the pseudo
rapidity of the photons in units of 1/GeV^2. If the rapditiy is
specified as a tuple, it is interpreted as an interval. Otherwise
the interval [-η, η] will be used.
Arguments:
η -- pseudo rapidity (tuple or number)
esp -- center of momentum energy in GeV
charge -- charge of the particle in units of the elementar charge
"""
f = energy_factor(charge, esp)
if not isinstance(η, tuple):
η = (-η, η)
if len(η) != 2:
raise ValueError('Invalid η cut.')
def F(x):
return np.tanh(x) - 2*x
return 2*np.pi*f*(F(η[0]) - F(η[1]))
Calculations
XS qq -> gamma gamma
First, set up the input parameters.
η = 2.5
charge = 1/3
esp = 200 # GeV
And now calculate the cross section in picobarn.
xs_gev = total_xs_eta(η, charge, esp)
xs_pb = gev_to_pb(xs_gev)
print(tex_value(xs_pb, unit=r'\pico\barn', prefix=r'\sigma = ', prec=5))
Compared to sherpa, it's pretty close.
sherpa = 0.0538009
xs_pb/sherpa
0.9998585425137037
I had to set the runcard option EW_SCHEME: alpha0
to use the pure
QED coupling constant.