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

Classes

class  FunctionBase
class  Function1d
class  Function1d_d1
class  Function1d_d2
class  Constant1d
class  XYs1d
class  Polynomial1d
class  Gridded1d
class  Regions1d
class  Branching1d
class  TerrellFissionNeutronMultiplicityModel
class  Function2d
class  XYs2d

Functions

LUPI_HOST Function1dparseMultiplicityFunction1d (SetupInfo &a_setupInfo, Transporting::MC const &a_settings, GIDI::Suite const &a_suite)
LUPI_HOST Function1d_d1parseFunction1d_d1 (Transporting::MC const &a_settings, GIDI::Suite const &a_suite)
LUPI_HOST Function1d_d1parseFunction1d_d1 (GIDI::Functions::Function1dForm const *form1d)
LUPI_HOST Function1d_d2parseFunction1d_d2 (GIDI::Functions::Function1dForm const *form1d)
LUPI_HOST Function2dparseFunction2d (Transporting::MC const &a_settings, GIDI::Suite const &a_suite)
LUPI_HOST Function2dparseFunction2d (GIDI::Functions::Function2dForm const *form2d)
LUPI_HOST Function1dparseMultiplicityFunction1d (SetupInfo &a_setupInfo, LUPI_maybeUnused Transporting::MC const &a_settings, GIDI::Suite const &a_suite)

Function Documentation

◆ parseFunction1d_d1() [1/2]

LUPI_HOST Function1d_d1 * MCGIDI::Functions::parseFunction1d_d1 ( GIDI::Functions::Function1dForm const * form1d)

Definition at line 1099 of file MCGIDI_functions.cc.

1099 {
1100
1101 GIDI::FormType type = a_form1d->type( );
1102
1103 switch( type ) {
1105 return( new Constant1d( *static_cast<GIDI::Functions::Constant1d const *>( a_form1d ) ) );
1107 return( new XYs1d( *static_cast<GIDI::Functions::XYs1d const *>( a_form1d ) ) );
1109 return( new Polynomial1d( *static_cast<GIDI::Functions::Polynomial1d const *>( a_form1d ) ) );
1111 return( new Gridded1d( *static_cast<GIDI::Functions::Gridded1d const *>( a_form1d ) ) );
1113 return( new Regions1d( *static_cast<GIDI::Functions::Regions1d const *>( a_form1d ) ) );
1115 std::cout << "parseFunction1d_d1: Unsupported Function1d reference1d.";
1116 break;
1117 default : // GIDI::FormTypes Legendre1d, reference1d, xs_pdFormType::cdf1d and resonancesWithBackground1d
1118 throw std::runtime_error( "Functions::parseFunction1d_d1: Unsupported Function1d" );
1119 }
1120
1121 return( nullptr );
1122}
FormType
Definition GIDI.hpp:118

◆ parseFunction1d_d1() [2/2]

◆ parseFunction1d_d2()

LUPI_HOST Function1d_d2 * MCGIDI::Functions::parseFunction1d_d2 ( GIDI::Functions::Function1dForm const * form1d)

Definition at line 1127 of file MCGIDI_functions.cc.

1127 {
1128
1129 GIDI::FormType type = a_form1d->type( );
1130
1131 switch( type ) {
1133 return( new Constant1d( *static_cast<GIDI::Functions::Constant1d const *>( a_form1d ) ) );
1135 return( new XYs1d( *static_cast<GIDI::Functions::XYs1d const *>( a_form1d ) ) );
1137 return( new Polynomial1d( *static_cast<GIDI::Functions::Polynomial1d const *>( a_form1d ) ) );
1139 return( new Gridded1d( *static_cast<GIDI::Functions::Gridded1d const *>( a_form1d ) ) );
1141 std::cout << "Functions::parseFunction1d_d2: Unsupported Function1d reference1d.";
1142 break;
1143 default :
1144 throw std::runtime_error( "Functions::parseFunction1d_d2: Unsupported Function1d" );
1145 }
1146
1147 return( nullptr );
1148}

Referenced by MCGIDI::Functions::Regions1d::Regions1d().

◆ parseFunction2d() [1/2]

LUPI_HOST Function2d * MCGIDI::Functions::parseFunction2d ( GIDI::Functions::Function2dForm const * form2d)

Definition at line 1153 of file MCGIDI_functions.cc.

1153 {
1154
1155 GIDI::FormType type = form2d->type( );
1156
1157 switch( type ) {
1159 return( new XYs2d( *static_cast<GIDI::Functions::XYs2d const *>( form2d ) ) );
1160 default :
1161 throw std::runtime_error( "Functions::parseFunction2d: Unsupported Function2d" );
1162 }
1163
1164 return( nullptr );
1165}

◆ parseFunction2d() [2/2]

LUPI_HOST Function2d * MCGIDI::Functions::parseFunction2d ( Transporting::MC const & a_settings,
GIDI::Suite const & a_suite )

◆ parseMultiplicityFunction1d() [1/2]

LUPI_HOST Function1d * MCGIDI::Functions::parseMultiplicityFunction1d ( SetupInfo & a_setupInfo,
LUPI_maybeUnused Transporting::MC const & a_settings,
GIDI::Suite const & a_suite )

Definition at line 1077 of file MCGIDI_functions.cc.

1077 {
1078
1079 auto preProcessingChainEnds = a_setupInfo.m_GIDI_protare.styles( ).preProcessingChainEnds( );
1080 if( preProcessingChainEnds.size( ) != 1 ) throw std::runtime_error( "Functions::parseMultiplicityFunction1d: preProcessingChainEnds != 1." );
1081
1082 std::string const &label = preProcessingChainEnds[0]->label( );
1083 GIDI::Functions::Function1dForm const *form1d = nullptr;
1084 if( a_suite.has( "muCutoff" ) ) { // Special case to handle legacy no-Rutherford processing which set the label to "muCutoff".
1085 form1d = a_suite.get<GIDI::Functions::Function1dForm const>( 0 ); }
1086 else {
1087 form1d = a_suite.getViaLineage<GIDI::Functions::Function1dForm const>( label );
1088 }
1089
1090 if( form1d->type( ) == GIDI::FormType::branching1d ) return( new Branching1d( a_setupInfo, *static_cast<GIDI::Functions::Branching1d const *>( form1d ) ) );
1091 if( form1d->type( ) == GIDI::FormType::unspecified1d ) return( nullptr );
1092
1093 return( parseFunction1d_d1( form1d ) );
1094}
FormType type() const
Definition GIDI.hpp:667
Styles::Suite & styles()
Definition GIDI.hpp:4802
std::vector< Base const * > const & preProcessingChainEnds() const
Definition GIDI.hpp:3405
GIDI::ProtareSingle const & m_GIDI_protare
Definition MCGIDI.hpp:255
LUPI_HOST Function1d_d1 * parseFunction1d_d1(Transporting::MC const &a_settings, GIDI::Suite const &a_suite)

◆ parseMultiplicityFunction1d() [2/2]

LUPI_HOST Function1d * MCGIDI::Functions::parseMultiplicityFunction1d ( SetupInfo & a_setupInfo,
Transporting::MC const & a_settings,
GIDI::Suite const & a_suite )