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

#include <MCGIDI.hpp>

Public Member Functions

LUPI_HOST_DEVICE NuclideGammaBranchInfo ()
LUPI_HOST NuclideGammaBranchInfo (PoPI::NuclideGammaBranchInfo const &a_nuclideGammaBranchInfo, std::map< std::string, int > &a_stateNamesToIndices, bool a_makePhotonEmissionProbabilitiesOne)
LUPI_HOST_DEVICE double probability () const
LUPI_HOST_DEVICE double photonEmissionProbability () const
LUPI_HOST_DEVICE double gammaEnergy () const
LUPI_HOST_DEVICE int residualStateIndex () const
LUPI_HOST_DEVICE bool residualStateKindIsContinuum () const
LUPI_HOST_DEVICE void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
LUPI_HOST void print (ProtareSingle const *a_protareSingle, std::string const &a_indent, std::string const &a_iFormat, std::string const &a_energyFormat, std::string const &a_dFormat) const

Detailed Description

Definition at line 938 of file MCGIDI.hpp.

Constructor & Destructor Documentation

◆ NuclideGammaBranchInfo() [1/2]

LUPI_HOST_DEVICE MCGIDI::NuclideGammaBranchInfo::NuclideGammaBranchInfo ( )

Definition at line 26 of file MCGIDI_nuclideGammaBranching.cc.

26 :
27 m_probability( 0.0 ),
28 m_photonEmissionProbability( 0.0 ),
29 m_gammaEnergy( 0.0 ),
30 m_residualStateIndex( -1 ),
31 m_residualStateKindIsContinuum( false ) {
32
33}

◆ NuclideGammaBranchInfo() [2/2]

MCGIDI::NuclideGammaBranchInfo::NuclideGammaBranchInfo ( PoPI::NuclideGammaBranchInfo const & a_nuclideGammaBranchInfo,
std::map< std::string, int > & a_stateNamesToIndices,
bool a_makePhotonEmissionProbabilitiesOne )

Definition at line 38 of file MCGIDI_nuclideGammaBranching.cc.

39 :
40 m_probability( a_nuclideGammaBranchInfo.probability( ) ),
41 m_photonEmissionProbability( a_nuclideGammaBranchInfo.photonEmissionProbability( ) ),
42 m_gammaEnergy( a_nuclideGammaBranchInfo.gammaEnergy( ) ),
43 m_residualStateIndex( -1 ),
44 m_residualStateKindIsContinuum( false ) {
45
46 if( a_makePhotonEmissionProbabilitiesOne ) m_photonEmissionProbability = 1.0;
47 std::map<std::string,int>::iterator iter = a_stateNamesToIndices.find( a_nuclideGammaBranchInfo.residualState( ) );
48 if( iter != a_stateNamesToIndices.end( ) ) m_residualStateIndex = iter->second;
49}

Member Function Documentation

◆ gammaEnergy()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchInfo::gammaEnergy ( ) const
inline

Returns the value of the m_gammaEnergy.

Definition at line 954 of file MCGIDI.hpp.

Referenced by NuclideGammaBranchInfo(), and MCGIDI::ProtareSingle::sampleBranchingGammas().

◆ photonEmissionProbability()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchInfo::photonEmissionProbability ( ) const
inline

Returns the value of the m_photonEmissionProbability.

Definition at line 953 of file MCGIDI.hpp.

Referenced by NuclideGammaBranchInfo(), and MCGIDI::ProtareSingle::sampleBranchingGammas().

◆ print()

LUPI_HOST void MCGIDI::NuclideGammaBranchInfo::print ( ProtareSingle const * a_protareSingle,
std::string const & a_indent,
std::string const & a_iFormat,
std::string const & a_energyFormat,
std::string const & a_dFormat ) const

Print to std::cout the content of this. This is mainly meant for debugging.

Parameters
a_protareSingle[in] The ProtareSingle instance this resides in.
a_indent[in] The buffer to read or write data to depending on a_mode.
a_iFormat[in] C printf format specifier for any interger that is printed (e.g., "%3d").
a_energyFormat[in] C printf format specifier for any interger that is printed (e.g., "%20.12e").
a_dFormat[in] C printf format specifier for any interger that is printed (e.g., "%14.7e").

Definition at line 77 of file MCGIDI_nuclideGammaBranching.cc.

78 {
79
80 std::cout << a_indent << std::left << std::setw( 17 ) << LUPI::Misc::argumentsToString( a_dFormat.c_str( ), m_probability )
81 << LUPI::Misc::argumentsToString( a_dFormat.c_str( ), m_photonEmissionProbability )
82 << LUPI::Misc::argumentsToString( a_dFormat.c_str( ), m_gammaEnergy )
83 << LUPI::Misc::argumentsToString( a_iFormat.c_str( ), m_residualStateIndex ) << std::endl;
84}
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

◆ probability()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchInfo::probability ( ) const
inline

Returns the value of the m_probability.

Definition at line 952 of file MCGIDI.hpp.

Referenced by NuclideGammaBranchInfo(), and MCGIDI::ProtareSingle::sampleBranchingGammas().

◆ residualStateIndex()

LUPI_HOST_DEVICE int MCGIDI::NuclideGammaBranchInfo::residualStateIndex ( ) const
inline

Returns the value of the m_residualStateIndex.

Definition at line 955 of file MCGIDI.hpp.

Referenced by MCGIDI::ProtareSingle::sampleBranchingGammas().

◆ residualStateKindIsContinuum()

LUPI_HOST_DEVICE bool MCGIDI::NuclideGammaBranchInfo::residualStateKindIsContinuum ( ) const
inline

Returns the value of the **m_residualStateKindIsContinuum. **.

Definition at line 956 of file MCGIDI.hpp.

◆ serialize()

LUPI_HOST_DEVICE void MCGIDI::NuclideGammaBranchInfo::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 59 of file MCGIDI_nuclideGammaBranching.cc.

59 {
60
61 DATA_MEMBER_DOUBLE( m_probability, a_buffer, a_mode );
62 DATA_MEMBER_DOUBLE( m_photonEmissionProbability, a_buffer, a_mode );
63 DATA_MEMBER_DOUBLE( m_gammaEnergy, a_buffer, a_mode );
64 DATA_MEMBER_INT( m_residualStateIndex, a_buffer, a_mode );
65 DATA_MEMBER_CAST( m_residualStateKindIsContinuum, a_buffer, a_mode, bool );
66}
#define DATA_MEMBER_CAST(member, buf, mode, someType)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)

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