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