Hazma

hazma.rambo.generate_energy_histogram

hazma.rambo.generate_energy_histogram(num_ps_pts, masses, cme, mat_elem_sqrd=<function <lambda>>, num_bins=25, num_cpus=None)

Generate energy histograms for each of the final state particles.

Parameters:
  • num_ps_pts (int) – Total number of phase space points to generate.
  • masses (numpy.ndarray) – List of masses of the final state particles.
  • cme (double) – Center-of-mass-energy of the process.
  • mat_elem_sqrd ((double)(numpy.ndarray) {lambda klist: 1}) – Function for the matrix element squared.
  • num_bins (int) – Number of energy bins to use for each of the final state particles.
  • num_cpus (int {None}) – Number of cpus to use in parallel with rambo. If not specified, 75% of the cpus will be used.
Returns:

energy_histograms (numpy.ndarray) – List of energies and dsigma/dE’s. The resulting array has the shape (num_fsp, 2, num_bins). The array is formatted such that energy_histograms = {{{E11, E12, ….}, {hist11, hist12, …}},

., ., .,

{{EN1, EN2, ….}, {histM1, histN2, …}}}.

Examples

Making energy histograms for 4 final state particles and plotting their energy spectra.

>>> from hazma import rambo
>>> import numpy as np
>>> num_ps_pts = 100000
>>> masses = np.array([100., 100., 0.0, 0.0])
>>> cme = 1000.
>>> num_bins = 100
>>>
>>> eng_hist = rambo.generate_energy_histogram(num_ps_pts, masses, cme,
...                                            num_bins=num_bins)
>>> import matplotlib as plt
>>> for i in range(len(masses)):
...     plt.loglog(pts[i, 0], pts[i, 1])

Built with Sphinx using a RiboKit Theme . Hosted on GitHub Pages.

© Copyright 2017, Logan A. Morrison.