function value = cross_section ( e )

%*****************************************************************************80
%
%% cross_section() returns the "cross section" of a particle based on its energy.
%
%  Discussion:
%
%    The particle's cross section is a measure of its likelihood to collide
%    with the material of the slab.  This quantity typically depends on both
%    the particle's energy and the kind of medium through which it is traveling.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 September 2012
%
%  Author:
%
%    Original FORTRAN77 version by Kahaner, Moler, Nash.
%    This version by John Burkardt.
%
%  Reference:
%
%    David Kahaner, Cleve Moler, Steven Nash,
%    Numerical Methods and Software,
%    Prentice Hall, 1989,
%    ISBN: 0-13-627258-4,
%    LC: TA345.K34.
%
%  Input:
%
%    real E, the energy of the particle.
%
%  Output:
%
%    real VALUE, the cross section.
%
  s = abs ( sin ( 100.0 * ( exp ( e ) - 1.0 ) ) ...
    + sin ( 18.81 * ( exp ( e ) - 1.0 ) ) );

  y = max ( 0.02, s );

  value = 10.0 * exp ( -0.1 / y );

  return
end

