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

#include <MCGIDI_distributions.hpp>

Inheritance diagram for MCGIDI::Distributions::Branching3d:

Public Member Functions

LUPI_HOST_DEVICE Branching3d ()
LUPI_HOST Branching3d (GIDI::Distributions::Branching3d const &a_branching3d, SetupInfo &a_setupInfo)
LUPI_HOST_DEVICE ~Branching3d ()
template<typename RNG>
LUPI_HOST_DEVICE void sample (double a_X, Sampling::Input &a_input, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double angleBiasing (Reaction const *a_reaction, double a_temperature, double a_energy_in, double a_mu_lab, RNG &&a_rng, double &a_energy_out) const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE void sample (LUPI_maybeUnused double a_X, LUPI_maybeUnused Sampling::Input &a_input, LUPI_maybeUnused RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double angleBiasing (LUPI_maybeUnused Reaction const *a_reaction, LUPI_maybeUnused double a_temperature, LUPI_maybeUnused double a_energy_in, LUPI_maybeUnused double a_mu_lab, LUPI_maybeUnused RNG &&a_rng, LUPI_maybeUnused double &a_energy_out) const
Public Member Functions inherited from MCGIDI::Distributions::Distribution
LUPI_HOST_DEVICE Distribution ()
LUPI_HOST Distribution (Type a_type, GIDI::Distributions::Distribution const &a_distribution, SetupInfo &a_setupInfo)
LUPI_HOST Distribution (Type a_type, GIDI::Frame a_productFrame, SetupInfo &a_setupInfo)
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION ~Distribution () MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE Type type () const
LUPI_HOST_DEVICE GIDI::Frame productFrame () const
LUPI_HOST_DEVICE double projectileMass () const
LUPI_HOST_DEVICE double targetMass () const
LUPI_HOST_DEVICE double productMass () const
LUPI_HOST void setModelDBRC_data (Sampling::Upscatter::ModelDBRC_data *a_modelDBRC_data)
template<typename RNG>
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION void sample (double a_X, Sampling::Input &a_input, RNG &&a_rng) const MCGIDI_TRUE_VIRTUAL
template<typename RNG>
LUPI_HOST_DEVICE MCGIDI_VIRTUAL_FUNCTION double angleBiasing (Reaction const *a_reaction, double a_temperature, double a_energy_in, double a_mu_lab, RNG &&a_rng, double &a_energy_out) const MCGIDI_TRUE_VIRTUAL
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
template<typename RNG>
LUPI_HOST_DEVICE void sample (double a_X, MCGIDI::Sampling::Input &a_input, RNG &&a_rng) const
template<typename RNG>
LUPI_HOST_DEVICE double angleBiasing (Reaction const *a_reaction, double a_temperature, double a_energy_in, double a_mu_lab, RNG &&a_rng, double &a_energy_out) const

Detailed Description

This class represents the distribution for an outgoing product for which the distribution is the product of uncorrelated angular (i.e., P(mu|E)) and energy (i.e., P(E'|E)) distributions.

Definition at line 128 of file MCGIDI_distributions.hpp.

Constructor & Destructor Documentation

◆ Branching3d() [1/2]

LUPI_HOST_DEVICE MCGIDI::Distributions::Branching3d::Branching3d ( )

Default constructor used when broadcasting a Protare as needed by MPI or GPUs.

Definition at line 250 of file MCGIDI_distributions.cc.

250 :
251 m_initialStateIndex( -1 ) {
252
253}

◆ Branching3d() [2/2]

LUPI_HOST MCGIDI::Distributions::Branching3d::Branching3d ( GIDI::Distributions::Branching3d const & a_branching3d,
SetupInfo & a_setupInfo )
Parameters
a_branching3d[in] The GIDI::Distributions::Branching3dinstance whose data is to be used to construct this.
a_setupInfo[in] Used internally when constructing a Protare to pass information to other constructors.

Definition at line 260 of file MCGIDI_distributions.cc.

260 :
261 Distribution( Type::branching3d, a_branching3d, a_setupInfo ),
262 m_initialStateIndex( -1 ) {
263
264 auto iter = a_setupInfo.m_stateNamesToIndices.find( a_branching3d.initialState( ) );
265 if( iter == a_setupInfo.m_stateNamesToIndices.end( ) ) {
266 std::string message( "Branching3d: initial state not found: pid = '" + a_branching3d.initialState( ) + "'." );
267 throw std::runtime_error( message.c_str( ) );
268 }
269 m_initialStateIndex = iter->second;
270
271 a_setupInfo.m_initialStateIndex = m_initialStateIndex;
272}

◆ ~Branching3d()

LUPI_HOST_DEVICE MCGIDI::Distributions::Branching3d::~Branching3d ( )

Definition at line 277 of file MCGIDI_distributions.cc.

277 {
278
279}

Member Function Documentation

◆ angleBiasing() [1/2]

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Distributions::Branching3d::angleBiasing ( LUPI_maybeUnused Reaction const * a_reaction,
LUPI_maybeUnused double a_temperature,
LUPI_maybeUnused double a_energy_in,
LUPI_maybeUnused double a_mu_lab,
LUPI_maybeUnused RNG && a_rng,
LUPI_maybeUnused double & a_energy_out ) const

Returns the probability for a projectile with energy a_energy_in to cause a particle to be emitted at angle a_mu_lab as seen in the lab frame. a_energy_out is the sampled outgoing energy.

Parameters
a_reaction[in] The reaction containing the particle which this distribution describes.
a_temperature[in] The temperature of the material.
a_energy_in[in] The energy of the incident particle.
a_mu_lab[in] The desired mu in the lab frame for the emitted particle.
a_rng[in] The random number generator function that returns a double in the range [0, 1.0).
a_energy_out[in] The energy of the emitted outgoing particle.
Returns
The probability of emitting outgoing particle into lab angle a_mu_lab.

Definition at line 729 of file MCGIDI_headerSource.hpp.

730 {
731
732 double probability = 0.0;
733
734 return( probability );
735}

◆ angleBiasing() [2/2]

template<typename RNG>
LUPI_HOST_DEVICE double MCGIDI::Distributions::Branching3d::angleBiasing ( Reaction const * a_reaction,
double a_temperature,
double a_energy_in,
double a_mu_lab,
RNG && a_rng,
double & a_energy_out ) const

◆ sample() [1/2]

template<typename RNG>
LUPI_HOST_DEVICE void MCGIDI::Distributions::Branching3d::sample ( double a_X,
Sampling::Input & a_input,
RNG && a_rng ) const

◆ sample() [2/2]

template<typename RNG>
LUPI_HOST_DEVICE void MCGIDI::Distributions::Branching3d::sample ( LUPI_maybeUnused double a_X,
LUPI_maybeUnused Sampling::Input & a_input,
LUPI_maybeUnused RNG && a_rng ) const

This method samples the outgoing branching photons.

Parameters
a_X[in] The energy of the projectile in the lab frame.
a_input[in] Sample options requested by user.
a_rng[in] The random number generator function that returns a double in the range [0, 1.0).

Definition at line 710 of file MCGIDI_headerSource.hpp.

710 {
711
712}

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::Distributions::Branching3d::serialize ( LUPI::DataBuffer & a_buffer,
LUPI::DataBuffer::Mode a_mode )

This method serializes this for broadcasting as needed for MPI and GPUs. The method can count the number of required bytes, pack this or unpack this depending on a_mode.

Parameters
a_buffer[in] The buffer to read or write data to depending on a_mode.
a_mode[in] Specifies the action of this method.

Definition at line 290 of file MCGIDI_distributions.cc.

290 {
291
292 Distribution::serialize( a_buffer, a_mode );
293 DATA_MEMBER_INT( m_initialStateIndex, a_buffer, a_mode );
294}
#define DATA_MEMBER_INT( member, buf, mode)
LUPI_HOST_DEVICE void serialize(LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)

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