13 #if defined __cplusplus
18 #define nParticleChanges 6
90 char const *outputChannelStr, *crossSectionUnits[2] = {
"MeV",
"b" };
137 reaction->
finalQ = finalQ;
143 case 18 :
case 19 :
case 20 :
case 21 :
case 38 :
157 if( numberOfChanges == 0 ) {
182 if( projectileGlobalIndex != gammaIndex ) {
184 if( i1 == productsInfo->
numberOfProducts ) particlesChanges[i2++] = projectileGlobalIndex;
188 if( i1 == productsInfo->
numberOfProducts ) particlesChanges[i2++] = targetGlobalIndex;
191 if( i2 == n1 )
break;
215 int twoBodyProductsWithData = 0;
220 for( iProduct = 0; iProduct < nProducts; iProduct++ ) {
223 twoBodyProductsWithData = -1; }
225 if( twoBodyProductsWithData >= 0 ) twoBodyProductsWithData = 1;
229 if( twoBodyProductsWithData < 0 ) twoBodyProductsWithData = 0;
231 for( iProduct = 0; iProduct < nProducts; iProduct++ ) {
232 productIsTrackable = twoBodyProductsWithData;
236 productIsTrackable = 1;
237 if( globalPoPsIndex < 0 ) {
241 if( productIsTrackable ) {
245 if( ( product->
pop->
name[len-2] ==
'_' ) && ( product->
pop->
name[len-1] ==
'c' ) ) {
247 productIsTrackable = 1;
251 if( globalPoPsIndex < 0 ) {
258 if( productIsTrackable ) {
301 if( product == NULL ) {
331 return( reaction->
target );
359 *EMin = reaction->
EMin;
360 *EMax = reaction->
EMax;
368 double lowerEps = 1
e-14, upperEps = -1
e-14;
370 if( reaction->
EMin == EMin ) lowerEps = 0.;
371 if( reaction->
EMax == EMax ) upperEps = 0.;
372 if( ( lowerEps == 0. ) && ( upperEps == 0. ) )
return( 0 );
386 if( e_in < reaction->EMin ) e_in = reaction->
EMin;
387 if( e_in > reaction->
EMax ) e_in = reaction->
EMax;
393 if( xSecP != NULL ) {
410 return( reaction->
finalQ );
424 if( S != NULL ) *S = reaction->
ENDL_S;
425 return( reaction->
ENDL_C );
433 int MT1_50ToC[] = { 1, 10, -3, -4, -5, 0, 0, 0, 0, -10,
434 32, 0, 0, 0, 0, 12, 13, 15, 15, 15,
435 15, 26, 36, 33, -25, 0, -27, 20, 27, -30,
436 0, 22, 24, 25, -35, -36, 14, 15, 0, 0,
437 29, 16, 0, 17, 34, 0, 0, 0, 0 };
438 int MT100_200ToC[] = { -101, 46, 40, 41, 42, 44, 45, 37, -109, 0,
439 18, 48, -113, -114, 19, 39, 47, 0, 0, 0,
440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
443 0, -152, -153, -154, 43, -156, -157, 23, 31, -160,
444 -161, -162, -163, -164, -165, -166, -167, -168, -169, -170,
445 -171, -172, -173, -174, -175, -176, -177, -178, -179, -180,
446 -181, -182, -183, -184, -185, -186, -187, -188, 28, -190,
447 -191, -192, 38, -194, -195, -196, -197, -198, -199, -200 };
451 if( MT <= 0 )
return( 1 );
452 if( MT > 891 )
return( 1 );
454 reaction->
ENDL_C = MT1_50ToC[MT - 1]; }
455 else if( MT <= 91 ) {
457 if( MT != 91 ) reaction->
ENDL_S = 1; }
458 else if( ( MT > 100 ) && ( MT <= 200 ) ) {
459 reaction->
ENDL_C = MT100_200ToC[MT - 101]; }
460 else if( ( MT == 452 ) || ( MT == 455 ) || ( MT == 456 ) || ( MT == 458 ) ) {
462 if( MT == 455 ) reaction->
ENDL_S = 7; }
463 else if( MT >= 600 ) {
466 if( MT != 649 ) reaction->
ENDL_S = 1; }
467 else if( MT < 700 ) {
469 if( MT != 699 ) reaction->
ENDL_S = 1; }
470 else if( MT < 750 ) {
472 if( MT != 749 ) reaction->
ENDL_S = 1; }
473 else if( MT < 800 ) {
475 if( MT != 799 ) reaction->
ENDL_S = 1; }
476 else if( MT < 850 ) {
478 if( MT != 849 ) reaction->
ENDL_S = 1; }
479 else if( ( MT >= 875 ) && ( MT <= 891 ) ) {
481 if( MT != 891 ) reaction->
ENDL_S = 1;
499 if( totalGroupedCrossSection != NULL ) {
536 if( ( index < 0 ) || ( index >= productsInfo->
numberOfProducts ) )
return( -1 );
552 if( ( index < 0 ) || ( index >= productsInfo->
numberOfProducts ) )
return( -1 );
560 if( ( index < 0 ) || ( index >= productsInfo->
numberOfProducts ) )
return( -1 );
564 #if defined __cplusplus
ptwXYPoints ** piecewiseMultiplicities
enum MCGIDI_productMultiplicityType MCGIDI_productsInfo_getMultiplicityTypeAtIndex(MCGIDI_productsInfo *productsInfo, int index)
ptwXPoints * ptwX_free(ptwXPoints *ptwX)
double MCGIDI_reaction_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_productsInfo_getNumberOfUniqueProducts(MCGIDI_productsInfo *productsInfo)
#define smr_allocateCopyString2(smr, s, forItem)
#define smr_realloc2(smr, old, size, forItem)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
MCGIDI_reaction * MCGIDI_reaction_free(statusMessageReporting *smr, MCGIDI_reaction *reaction)
nfu_status ptwXY_dullEdges(ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly)
void MCGIDI_misc_updateTransportabilitiesMap2(transportabilitiesMap *transportabilities, int PoPID, int transportable)
int numberOfAllocatedProducts
double ptwXY_getXMax(ptwXYPoints *ptwXY)
double MCGIDI_target_heated_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)
ptwXYPoints * multiplicityVsEnergy
double MCGIDI_reaction_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_reaction_getDomain(statusMessageReporting *smr, MCGIDI_reaction *reaction, double *EMin, double *EMax)
double * ptwX_getPointAtIndex(ptwXPoints *ptwX, int64_t index)
xDataTOM_interpolationQualifier
enum MCGIDI_distributionType type
ptwXYPoints * crossSection
static int MCGIDI_reaction_setENDL_CSNumbers(statusMessageReporting *smr, MCGIDI_reaction *reaction)
enum MCGIDI_channelGenre genre
int MCGIDI_reaction_getENDL_CSNumbers(MCGIDI_reaction *reaction, int *S)
int MCGIDI_outputChannel_numberOfProducts(MCGIDI_outputChannel *outputChannel)
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
int getGroupIndex(void) const
MCGIDI_productsInfo * MCGIDI_reaction_getProductsInfo(MCGIDI_reaction *reaction)
MCGIDI_outputChannel decayChannel
double MCGIDI_outputChannel_getQ_MeV(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, double e_in)
#define smr_malloc2(smr, size, zero, forItem)
GIDI_settings_group getGroup(void) const
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
MCGIDI_productsInfo productsInfo
int MCGIDI_productsInfo_getPoPsIndexAtIndex(MCGIDI_productsInfo *productsInfo, int index)
MCGIDI_POP * projectilePOP
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
ptwXYPoints * MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_element *linear, char const *toUnits[2])
int MCGIDI_reaction_getENDF_MTNumber(MCGIDI_reaction *reaction)
MCGIDI_target_heated * target
int MCGIDI_reaction_recast(statusMessageReporting *smr, MCGIDI_reaction *reaction, GIDI_settings &settings, GIDI_settings_particle const *projectileSettings, double temperature_MeV, ptwXPoints *totalGroupedCrossSection)
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
nfu_status ptwX_add_ptwX(ptwXPoints *ptwX1, ptwXPoints *ptwX2)
MCGIDI_productInfo * productInfo
double thresholdGroupedDeltaCrossSection
char const * outputChannelStr
int PoPs_particleIndex(char const *name)
MCGIDI_outputChannel outputChannel
double MCGIDI_reaction_getCrossSectionAtE(statusMessageReporting *smr, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &modes, bool sampling)
static int MCGIDI_reaction_ParseReactionTypeAndDetermineProducts(statusMessageReporting *smr, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
int MCGIDI_outputChannel_release(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
enum nfu_status_e nfu_status
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
nfu_status ptwXY_getValueAtX(ptwXYPoints *ptwXY, double x, double *y)
static int MCGIDI_reaction_addReturnProduct(statusMessageReporting *smr, MCGIDI_productsInfo *productsInfo, int ID, MCGIDI_product *product, MCGIDI_reaction *reaction, int transportable)
enum MCGIDI_reactionType MCGIDI_reaction_getReactionType(statusMessageReporting *smr, MCGIDI_reaction *reaction)
MCGIDI_product * MCGIDI_outputChannel_getProductAtIndex(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, int i)
static int MCGIDI_reaction_ParseDetermineReactionProducts(statusMessageReporting *smr, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_productsInfo *productsInfo, MCGIDI_reaction *reaction, double *finalQ, int level)
transportabilitiesMap * transportabilities
enum MCGIDI_quantityLookupMode getCrossSectionMode(void) const
int MCGIDI_outputChannel_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_reaction *reaction, MCGIDI_product *parent)
int MCGIDI_productsInfo_getIntegerMultiplicityAtIndex(MCGIDI_productsInfo *productsInfo, int index)
static int MCGIDI_reaction_initialize2(statusMessageReporting *smr, MCGIDI_reaction *reaction)
void * smr_freeMemory(void **p)
double MCGIDI_target_heated_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
enum MCGIDI_reactionType reactionType
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
MCGIDI_reaction * MCGIDI_reaction_new(statusMessageReporting *smr)
double getProjectileEnergy(void) const
static int MCGIDI_reaction_particleChanges(MCGIDI_POP *projectile, MCGIDI_POP *target, MCGIDI_productsInfo *productsInfo, int n1, int *particlesChanges)
int MCGIDI_productsInfo_getTransportableAtIndex(MCGIDI_productsInfo *productsInfo, int index)
MCGIDI_target_heated * MCGIDI_reaction_getTargetHeated(statusMessageReporting *smr, MCGIDI_reaction *reaction)
std::map< int, enum GIDI::MCGIDI_transportability > transportabilitiesMap
xDataTOM_attributionList attributes
xDataTOM_interpolationFlag
enum MCGIDI_productMultiplicityType productMultiplicityType
int MCGIDI_reaction_release(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_reaction_initialize(statusMessageReporting *smr, MCGIDI_reaction *reaction)
double ptwXY_getXMin(ptwXYPoints *ptwXY)
enum MCGIDI_angularType type
MCGIDI_distribution distribution
int MCGIDI_reaction_fixDomains(statusMessageReporting *smr, MCGIDI_reaction *reaction, double EMin, double EMax, nfu_status *status)
ptwXPoints * crossSectionGrouped
GIDI::ptwXPoints * groupFunction(GIDI::statusMessageReporting *smr, GIDI::ptwXYPoints *ptwXY1, double temperature, int order) const
int MCGIDI_reaction_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_target_heated *target, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
MCGIDI_productMultiplicityType
double thresholdGroupDomain
double MCGIDI_reaction_getFinalQ(statusMessageReporting *smr, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &modes)