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;
158 if( ( doc =
xDataXML_importFile2( smr, fileName ) ) == NULL )
return( _MCGIDI_target_releaseAndReturnOne( smr, target ) );
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 ) >= 1e-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
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex(MCGIDI_target_heated *target, int index)
int MCGIDI_target_heated_numberOfReactions(statusMessageReporting *smr, MCGIDI_target_heated *target)
enum MCGIDI_reactionType MCGIDI_target_getReactionTypeAtIndex(statusMessageReporting *smr, MCGIDI_target *target, int index)
MCGIDI_reaction * MCGIDI_target_heated_getReactionAtIndex_smr(statusMessageReporting *smr, MCGIDI_target_heated *target, int index)
double MCGIDI_target_heated_getIndexReactionFinalQ(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, MCGIDI_quantitiesLookupModes &modes)
int MCGIDI_target_readHeatedTarget(statusMessageReporting *smr, MCGIDI_target *target, int index)
int MCGIDI_target_heated_getReactionsDomain(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, double *EMin, double *EMax)
@ MCGIDI_reactionType_unknown_e
#define MCGIDI_speedOfLight_cm_sec
double MCGIDI_target_getTotalCrossSectionAtTAndE(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_quantitiesLookupModes &modes, bool sampling)
enum MCGIDI_reactionType MCGIDI_reaction_getReactionType(statusMessageReporting *smr, MCGIDI_reaction *reaction)
MCGIDI_target * MCGIDI_target_new(statusMessageReporting *smr)
char const * MCGIDI_target_getAttributesValue(statusMessageReporting *smr, MCGIDI_target *target, char const *name)
MCGIDI_target_heated * MCGIDI_target_getHeatedTargetAtTIndex(statusMessageReporting *smr, MCGIDI_target *target, int index)
int MCGIDI_target_initialize(statusMessageReporting *smr, MCGIDI_target *target)
MCGIDI_reaction * MCGIDI_target_getReactionAtIndex(MCGIDI_target *target, int index)
double MCGIDI_target_getIndexReactionCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes, bool sampling)
int MCGIDI_target_readFromMap(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_map *map, const char *evaluation, const char *projectileName, const char *targetName)
int MCGIDI_target_recast(statusMessageReporting *smr, MCGIDI_target *target, GIDI_settings &settings)
int MCGIDI_target_heated_recast(statusMessageReporting *smr, MCGIDI_target_heated *target, GIDI_settings &settings)
int MCGIDI_target_getDomain(statusMessageReporting *smr, MCGIDI_target *target, double *EMin, double *EMax)
double MCGIDI_target_heated_getIndexReactionCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, MCGIDI_quantitiesLookupModes &modes, bool sampling)
MCGIDI_target * MCGIDI_target_free(statusMessageReporting *smr, MCGIDI_target *target)
int MCGIDI_target_getTemperatures(statusMessageReporting *smr, MCGIDI_target *target, double *temperatures)
double MCGIDI_target_heated_getTotalCrossSectionAtE(statusMessageReporting *smr, MCGIDI_target_heated *target, MCGIDI_quantitiesLookupModes &modes, bool sampling)
int MCGIDI_target_numberOfReactions(statusMessageReporting *smr, MCGIDI_target *target)
int MCGIDI_target_numberOfProductionReactions(statusMessageReporting *smr, MCGIDI_target *target)
double MCGIDI_target_getIndexReactionFinalQ(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes)
MCGIDI_target * MCGIDI_target_newReadFromMap(statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, const char *projectileName, const char *targetName)
int MCGIDI_target_heated_sampleIndexReactionProductsAtE(statusMessageReporting *smr, MCGIDI_target_heated *target, int index, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productData)
MCGIDI_target_heated * MCGIDI_target_getHeatedTargetAtIndex_ReadIfNeeded(statusMessageReporting *smr, MCGIDI_target *target, int index)
MCGIDI_target * MCGIDI_target_newReadFromMapViaPoPIDs(statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID)
MCGIDI_target_heated * MCGIDI_target_heated_free(statusMessageReporting *smr, MCGIDI_target_heated *target)
MCGIDI_target * MCGIDI_target_newRead(statusMessageReporting *smr, const char *fileName)
transportabilitiesMap const * MCGIDI_target_getUniqueProducts(statusMessageReporting *smr, MCGIDI_target *target)
int MCGIDI_target_sampleReaction(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_quantitiesLookupModes &modes, double totalXSec, double(*userrng)(void *), void *rngState)
#define MCGIDI_nullReaction
int MCGIDI_target_readFromMapViaPoPIDs(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID)
@ MCGIDI_quantityLookupMode_grouped
int MCGIDI_target_sampleNullReactionProductsAtE(statusMessageReporting *smr, MCGIDI_target *target, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productDatas)
int MCGIDI_sampledProducts_addProduct(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, MCGIDI_sampledProductsData *sampledProductsData)
int MCGIDI_target_heated_numberOfProductionReactions(statusMessageReporting *smr, MCGIDI_target_heated *target)
int MCGIDI_target_read(statusMessageReporting *smr, MCGIDI_target *target, const char *fileName)
int MCGIDI_target_release(statusMessageReporting *smr, MCGIDI_target *target)
transportabilitiesMap const * MCGIDI_target_heated_getUniqueProducts(statusMessageReporting *smr, MCGIDI_target_heated *target)
int MCGIDI_target_sampleIndexReactionProductsAtE(statusMessageReporting *smr, MCGIDI_target *target, int index, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productData)
MCGIDI_reaction * MCGIDI_target_getReactionAtIndex_smr(statusMessageReporting *smr, MCGIDI_target *target, int index)
MCGIDI_target_heated * MCGIDI_target_heated_newRead(statusMessageReporting *smr, const char *fileName)
char * MCGIDI_map_findTarget(statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, const char *projectile, const char *targetName)
char * MCGIDI_map_findTargetViaPoPIDs(statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID)
int MCGIDI_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xDataXML_element *element, char const *file, int line, int code, char const *fmt,...)
char * MCGIDI_misc_getAbsPath(statusMessageReporting *smr, char const *fileName)
int getGroupIndex(void) const
enum MCGIDI_quantityLookupMode getCrossSectionMode(void) const
double getProjectileEnergy(void) const
double getTemperature(void) const
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_setReportError2p(smr, libraryID, code, fmt)
#define smr_allocateCopyString2(smr, s, forItem)
void * smr_freeMemory(void **p)
#define smr_malloc2(smr, size, zero, forItem)
double thresholdGroupDomain
double delayedNeutronRate
MCGIDI_target_heated * heatedTarget
MCGIDI_POP * projectilePOP
MCGIDI_target_heated_info * heatedTargets
MCGIDI_POP * projectilePOP
xDataTOM_attributionList attributes
MCGIDI_target_heated * baseHeatedTarget
MCGIDI_target_heated_info ** readHeatedTargets
char const * xDataTOMAL_getAttributesValue(xDataTOM_attributionList *attributes, char const *name)
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
void * xDataXML_freeDoc(statusMessageReporting *smr, xDataXML_document *doc)
xDataXML_element * xDataXML_getNextElement(xDataXML_element *element)
xDataXML_element * xDataXML_getDocumentsElement(xDataXML_document *doc)
char const * xDataXML_getAttributesValueInElement(xDataXML_element *element, char const *name)
xDataXML_element * xDataXML_getFirstElement(xDataXML_element *element)
int xDataXML_convertAttributeToDouble(statusMessageReporting *smr, xDataXML_element *element, char const *name, double *d, int required)
xDataXML_document * xDataXML_importFile2(statusMessageReporting *smr, char const *fileName)