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: |
|
---|---|
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.