Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MCGIDI::Probabilities::ProbabilityBase2d_d2 Class Reference

#include <MCGIDI_functions.hpp>

Inheritance diagram for MCGIDI::Probabilities::ProbabilityBase2d_d2:

Public Member Functions

LUPI_HOST_DEVICE ProbabilityBase2d_d2 ()
LUPI_HOST ProbabilityBase2d_d2 (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d_d2 (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE double evaluate (double a_x2, double a_x1) const
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double sample2dOf3d (double a_x2, double a_rngValue, RNG &&a_rng, double *a_x1_1, double *a_x1_2) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase2d_d1
LUPI_HOST_DEVICE ProbabilityBase2d_d1 ()
LUPI_HOST ProbabilityBase2d_d1 (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d_d1 (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE double evaluate (double a_x2, double a_x1) const
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double sample2dOf3d (double a_x2, double a_rngValue, RNG &&a_rng, double *a_x1_1, double *a_x1_2) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase2d
LUPI_HOST_DEVICE ProbabilityBase2d ()
LUPI_HOST ProbabilityBase2d (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase2d (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE ~ProbabilityBase2d ()
LUPI_HOST_DEVICE ProbabilityBase2dType type () const
LUPI_HOST_DEVICE String typeString () const
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double evaluate (double a_x2, double a_x1) const MCGIDI_TRUE_VIRTUAL
template<typename RNG>
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double sample (double a_x2, double a_rngValue, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE double sample (double a_x2, double a_rngValue, RNG &&a_rng) const
Public Member Functions inherited from MCGIDI::Probabilities::ProbabilityBase
LUPI_HOST_DEVICE ProbabilityBase ()
LUPI_HOST ProbabilityBase (GIDI::Functions::FunctionForm const &a_probabilty)
LUPI_HOST ProbabilityBase (GIDI::Functions::FunctionForm const &a_probabilty, Vector< double > const &a_Xs)
LUPI_HOST_DEVICE ~ProbabilityBase ()
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
Public Member Functions inherited from MCGIDI::Functions::FunctionBase
LUPI_HOST_DEVICE FunctionBase ()
LUPI_HOST FunctionBase (GIDI::Functions::FunctionForm const &a_function)
LUPI_HOST_DEVICE FunctionBase (int a_dimension, double a_domainMin, double a_domainMax, Interpolation a_interpolation, double a_outerDomainValue=0)
virtual LUPI_HOST_DEVICE ~FunctionBase ()=0
LUPI_HOST_DEVICE Interpolation interpolation () const
LUPI_HOST_DEVICE double domainMin () const
LUPI_HOST_DEVICE double domainMax () const
LUPI_HOST_DEVICE double outerDomainValue () const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

Additional Inherited Members

Protected Attributes inherited from MCGIDI::Probabilities::ProbabilityBase2d
ProbabilityBase2dType m_type
Protected Attributes inherited from MCGIDI::Probabilities::ProbabilityBase
Vector< double > m_Xs

Detailed Description

Definition at line 442 of file MCGIDI_functions.hpp.

Constructor & Destructor Documentation

◆ ProbabilityBase2d_d2() [1/3]

◆ ProbabilityBase2d_d2() [2/3]

LUPI_HOST MCGIDI::Probabilities::ProbabilityBase2d_d2::ProbabilityBase2d_d2 ( GIDI::Functions::FunctionForm const & a_probabilty)
inline

Definition at line 447 of file MCGIDI_functions.hpp.

447 :
448 ProbabilityBase2d_d1( a_probabilty ) { }

◆ ProbabilityBase2d_d2() [3/3]

LUPI_HOST MCGIDI::Probabilities::ProbabilityBase2d_d2::ProbabilityBase2d_d2 ( GIDI::Functions::FunctionForm const & a_probabilty,
Vector< double > const & a_Xs )
inline

Definition at line 449 of file MCGIDI_functions.hpp.

449 :
450 ProbabilityBase2d_d1( a_probabilty, a_Xs ) { }

Member Function Documentation

◆ evaluate()

LUPI_HOST_DEVICE double MCGIDI::Probabilities::ProbabilityBase2d_d2::evaluate ( double a_x2,
double a_x1 ) const

Returns the value of the function evaluated at the point (a_x2, a_x1).

Parameters
a_x2[in] Value of the outer most independent variable (i.e., x2).
a_x1[in] Value of the inner most independent variable (i.e., x1).
Returns
The value of the function at a_x2 and a_x1.

Definition at line 1559 of file MCGIDI_functions.cc.

1559 {
1560
1561 double value = 0.0;
1562
1563 switch( type( ) ) {
1565 value = static_cast<XYs2d const *>( this )->evaluate( a_x2, a_x1 );
1566 break;
1568 value = static_cast<Isotropic2d const *>( this )->evaluate( a_x2, a_x1 );
1569 break;
1571 value = static_cast<DiscreteGamma2d const *>( this )->evaluate( a_x2, a_x1 );
1572 break;
1574 value = static_cast<PrimaryGamma2d const *>( this )->evaluate( a_x2, a_x1 );
1575 break;
1577 value = static_cast<Recoil2d const *>( this )->evaluate( a_x2, a_x1 );
1578 break;
1580 value = static_cast<NBodyPhaseSpace2d const *>( this )->evaluate( a_x2, a_x1 );
1581 break;
1583 value = static_cast<Evaporation2d const *>( this )->evaluate( a_x2, a_x1 );
1584 break;
1586 value = static_cast<GeneralEvaporation2d const *>( this )->evaluate( a_x2, a_x1 );
1587 break;
1589 value = static_cast<SimpleMaxwellianFission2d const *>( this )->evaluate( a_x2, a_x1 );
1590 break;
1592 value = static_cast<Watt2d const *>( this )->evaluate( a_x2, a_x1 );
1593 break;
1597 LUPI_THROW( "ProbabilityBase2d_d2::evaluate: This should never happen." );
1598 }
1599
1600 return( value );
1601}
#define LUPI_THROW(arg)
LUPI_HOST_DEVICE double evaluate(double a_x2, double a_x1) const
LUPI_HOST_DEVICE ProbabilityBase2dType type() const
@ NBodyPhaseSpace2d
Definition GIDI.hpp:129

Referenced by evaluate().

◆ sample()

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Probabilities::ProbabilityBase2d_d2::sample ( double a_x2,
double a_rngValue,
RNG && a_rng ) const

Returns the value of x1, given x2 and the cumulative probability a_rngValue.

Parameters
a_x2[in] Value of the outer most independent variable (i.e., x2).
a_rngValue[in] The value of the cumulative probability used to determine the x1 value.
a_rng[in] The random number generator function that returns a double in the range [0, 1.0).
Returns
The value x1 where the cumulative probability is a_rngValue for x2 = a_x2.

Definition at line 1798 of file MCGIDI_headerSource.hpp.

1798 {
1799
1800 double value = 0.0;
1801
1802 switch( type( ) ) {
1804 value = static_cast<XYs2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1805 break;
1807 value = static_cast<Isotropic2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1808 break;
1810 value = static_cast<DiscreteGamma2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1811 break;
1813 value = static_cast<PrimaryGamma2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1814 break;
1816 value = static_cast<Recoil2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1817 break;
1819 value = static_cast<NBodyPhaseSpace2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1820 break;
1822 value = static_cast<Evaporation2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1823 break;
1825 value = static_cast<GeneralEvaporation2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1826 break;
1828 value = static_cast<SimpleMaxwellianFission2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1829 break;
1831 value = static_cast<Watt2d const *>( this )->sample( a_x2, a_rngValue, a_rng );
1832 break;
1836 LUPI_THROW( "ProbabilityBase2d_d2::sample: This should never happen." );
1837 }
1838
1839 return( value );
1840}
LUPI_HOST_DEVICE double sample(double a_x2, double a_rngValue, RNG &&a_rng) const

Referenced by sample().

◆ sample2dOf3d()

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Probabilities::ProbabilityBase2d_d2::sample2dOf3d ( double a_x2,
double a_rngValue,
RNG && a_rng,
double * a_x1_1,
double * a_x1_2 ) const

This method returns two x1 values for use with ProbabilityBase3d functions.

Parameters
a_x2[in] The value of x2.
a_rngValue[in] The value of the cumulative value used to determine the x1 value.
a_rng[in] The random number generator function that returns a double in the range [0, 1.0).
a_x1_1[in] The lower value of the x1 value.
a_x1_2[in] The upper value of the x1 value.

Definition at line 1853 of file MCGIDI_headerSource.hpp.

1854 {
1855
1856 double value = 0.0;
1857
1858 switch( type( ) ) {
1860 value = static_cast<XYs2d const *>( this )->sample2dOf3d( a_x2, a_rngValue, a_rng, a_x1_1, a_x1_2 );
1861 break;
1862 default:
1863 LUPI_THROW( "ProbabilityBase2d_d2::sample2dOf3d: not implemented." );
1864 }
1865
1866 return( value );
1867}
LUPI_HOST_DEVICE double sample2dOf3d(double a_x2, double a_rngValue, RNG &&a_rng, double *a_x1_1, double *a_x1_2) const

Referenced by sample2dOf3d().


The documentation for this class was generated from the following files: