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

#include <MCGIDI.hpp>

Public Member Functions

LUPI_HOST_DEVICE NuclideGammaBranchStateInfo ()
LUPI_HOST NuclideGammaBranchStateInfo (PoPI::NuclideGammaBranchStateInfo const &a_nuclideGammaBranchingInfo, std::vector< NuclideGammaBranchInfo * > &a_nuclideGammaBranchInfos, std::map< std::string, int > &a_stateNamesToIndices, bool a_makePhotonEmissionProbabilitiesOne, bool a_ignoreNuclearLevelEnergy)
LUPI_HOST_DEVICE char const * state () const
LUPI_HOST_DEVICE int intid () const
LUPI_HOST_DEVICE double nuclearLevelEnergy () const
LUPI_HOST_DEVICE double nuclearLevelEnergyWidth () const
LUPI_HOST_DEVICE double multiplicity () const
LUPI_HOST_DEVICE double averageGammaEnergy () const
LUPI_HOST_DEVICE Vector< std::size_t > const & branchIndices () 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 968 of file MCGIDI.hpp.

Constructor & Destructor Documentation

◆ NuclideGammaBranchStateInfo() [1/2]

LUPI_HOST_DEVICE MCGIDI::NuclideGammaBranchStateInfo::NuclideGammaBranchStateInfo ( )

Definition at line 95 of file MCGIDI_nuclideGammaBranching.cc.

95 :
96 m_intid( -1 ),
97 m_nuclearLevelEnergy( 0.0 ),
98 m_nuclearLevelEnergyWidth( 0.0 ),
99 m_multiplicity( 0.0 ),
100 m_averageGammaEnergy( 0.0 ) {
101
102 m_state[0] = 0;
103}

◆ NuclideGammaBranchStateInfo() [2/2]

MCGIDI::NuclideGammaBranchStateInfo::NuclideGammaBranchStateInfo ( PoPI::NuclideGammaBranchStateInfo const & a_nuclideGammaBranchingInfo,
std::vector< NuclideGammaBranchInfo * > & a_nuclideGammaBranchInfos,
std::map< std::string, int > & a_stateNamesToIndices,
bool a_makePhotonEmissionProbabilitiesOne,
bool a_ignoreNuclearLevelEnergy )

Definition at line 108 of file MCGIDI_nuclideGammaBranching.cc.

111 :
112 m_intid( a_nuclideGammaBranchingInfo.intid( ) ),
113 m_nuclearLevelEnergy( a_nuclideGammaBranchingInfo.nuclearLevelEnergy( ) ),
114 m_nuclearLevelEnergyWidth( a_nuclideGammaBranchingInfo.nuclearLevelEnergyWidth( ) ),
115 m_multiplicity( a_nuclideGammaBranchingInfo.multiplicity( ) ),
116 m_averageGammaEnergy( a_nuclideGammaBranchingInfo.averageGammaEnergy( ) ) {
117
118 if( a_zeroNuclearLevelEnergyWidth ) m_nuclearLevelEnergyWidth = 0.0;
119
120 strncpy( m_state, a_nuclideGammaBranchingInfo.state( ).c_str( ), sizeof( m_state ) );
121 m_state[sizeof( m_state )-1] = 0;
122
123 std::vector<PoPI::NuclideGammaBranchInfo> const &branches = a_nuclideGammaBranchingInfo.branches( );
124 m_branchIndices.reserve( branches.size( ) );
125
126 for( std::size_t i1 = 0; i1 < branches.size( ); ++i1 ) {
127 m_branchIndices.push_back( a_nuclideGammaBranchInfos.size( ) );
128 a_nuclideGammaBranchInfos.push_back( new NuclideGammaBranchInfo( branches[i1], a_stateNamesToIndices, a_makePhotonEmissionProbabilitiesOne ) );
129 }
130}

Member Function Documentation

◆ averageGammaEnergy()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchStateInfo::averageGammaEnergy ( ) const
inline

Returns the value of the m_averageGammaEnergy member.

Definition at line 992 of file MCGIDI.hpp.

Referenced by MCGIDI::HeatedCrossSectionContinuousEnergy::HeatedCrossSectionContinuousEnergy(), and NuclideGammaBranchStateInfo().

◆ branchIndices()

LUPI_HOST_DEVICE Vector< std::size_t > const & MCGIDI::NuclideGammaBranchStateInfo::branchIndices ( ) const
inline

Returns the value of the m_branchIndices member.

Definition at line 993 of file MCGIDI.hpp.

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

◆ intid()

LUPI_HOST_DEVICE int MCGIDI::NuclideGammaBranchStateInfo::intid ( ) const
inline

Returns a pointer to the m_intid member.

Definition at line 987 of file MCGIDI.hpp.

Referenced by NuclideGammaBranchStateInfo(), MCGIDI::GRIN_capture::sampleProducts(), and MCGIDI::GRIN_inelastic::sampleProducts().

◆ multiplicity()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchStateInfo::multiplicity ( ) const
inline

Returns the value of the m_multiplicity member.

Definition at line 991 of file MCGIDI.hpp.

Referenced by MCGIDI::HeatedCrossSectionContinuousEnergy::HeatedCrossSectionContinuousEnergy(), and NuclideGammaBranchStateInfo().

◆ nuclearLevelEnergy()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchStateInfo::nuclearLevelEnergy ( ) const
inline

◆ nuclearLevelEnergyWidth()

LUPI_HOST_DEVICE double MCGIDI::NuclideGammaBranchStateInfo::nuclearLevelEnergyWidth ( ) const
inline

Returns the value of the m_nuclearLevelEnergyWidth member.

Definition at line 989 of file MCGIDI.hpp.

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

◆ print()

LUPI_HOST void MCGIDI::NuclideGammaBranchStateInfo::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 160 of file MCGIDI_nuclideGammaBranching.cc.

161 {
162
163 std::cout << a_indent << std::left << std::setw( 17 ) << m_state << LUPI::Misc::argumentsToString( a_dFormat.c_str( ), m_multiplicity ) <<
164 LUPI::Misc::argumentsToString( a_dFormat.c_str( ), m_averageGammaEnergy );
165 for( auto branchIter = m_branchIndices.begin( ); branchIter != m_branchIndices.end( ); ++branchIter ) {
166 std::cout << LUPI::Misc::argumentsToString( a_iFormat.c_str( ), (*branchIter) );
167 }
168 std::cout << std::endl;
169}
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305

◆ serialize()

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

140 {
141
142 DATA_MEMBER_CHAR_ARRAY( m_state, a_buffer, a_mode );
143 DATA_MEMBER_INT( m_intid, a_buffer, a_mode );
144 DATA_MEMBER_DOUBLE( m_nuclearLevelEnergy, a_buffer, a_mode );
145 DATA_MEMBER_DOUBLE( m_nuclearLevelEnergyWidth, a_buffer, a_mode );
146 DATA_MEMBER_DOUBLE( m_multiplicity, a_buffer, a_mode );
147 DATA_MEMBER_DOUBLE( m_averageGammaEnergy, a_buffer, a_mode );
148 DATA_MEMBER_VECTOR_SIZE_T( m_branchIndices, a_buffer, a_mode );
149}
#define DATA_MEMBER_VECTOR_SIZE_T(member, buf, mode)
#define DATA_MEMBER_CHAR_ARRAY(member, buf, mode)
#define DATA_MEMBER_DOUBLE(member, buf, mode)
#define DATA_MEMBER_INT( member, buf, mode)

◆ state()

LUPI_HOST_DEVICE char const * MCGIDI::NuclideGammaBranchStateInfo::state ( ) const
inline

Returns a pointer to the m_state member.

Definition at line 986 of file MCGIDI.hpp.


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