14 #if defined __cplusplus
20 #if defined __cplusplus
28 #if defined __cplusplus
64 int projectile_PoPID,
int target_PoPID ) {
75 const char *targetName ) {
79 if( ( targetPath =
MCGIDI_map_findTarget( smr, map, evaluation, projectileName, targetName ) ) == NULL )
return( 1 );
86 int projectile_PoPID,
int target_PoPID ) {
100 const char *targetName ) {
106 if( targetPath == NULL )
return( NULL );
150 int i, iHeated, nHeated = 0, status = 1;
153 char const *
version, *contents;
160 if( strcmp( element->
name,
"xTarget" ) != 0 ) {
168 if( strcmp( version,
"xMCProcess 0.1" ) != 0 ) {
176 if( strcmp( child->name,
"target" ) != 0 ) {
198 for( iHeated = 0; iHeated < nHeated; iHeated++ )
if( target->
heatedTargets[iHeated].
temperature > temperature )
break;
230 if( i == nHeated ) i = 0;
362 double xsec = 0., xsec1, xsec2, temperature = modes.
getTemperature( );
387 for( ir = 0; ir < nr; ir++ ) {
393 if( *EMin > EMin_ ) *EMin = EMin_;
394 if( *EMax < EMax_ ) *EMax = EMax_;
406 double xsec = 0., xsec1, xsec2, temperature = modes.
getTemperature( );
427 double (*userrng)(
void * ),
void *rngState ) {
430 double rngValue = (*userrng)( rngState );
431 double cumm_xsec = 0., r_xsec = rngValue * totalXSec;
433 for( ir = 0; ir < nr; ir++ ) {
435 if( cumm_xsec >= r_xsec )
break;
438 if( ( totalXSec - cumm_xsec ) >= 1
e-12 * totalXSec ) {
440 "Failed to sample a reaction for temperature = %.12e, energy = %.12e, totalXSec = %16.e, rngValue = %16.e, r_xsec = %16.e, cumm_xsec = %16.e",
469 productData.
px_vx = 0.;
470 productData.
py_vy = 0.;
526 #if defined __cplusplus