13#if defined __cplusplus
18#define nParticleChanges 6
44 if( MCGIDI_reaction_initialize2( smr, reaction ) != 0 )
return( 1 );
78 MCGIDI_reaction_initialize2( smr, reaction );
90 char const *outputChannelStr, *crossSectionUnits[2] = {
"MeV",
"b" };
118 if( MCGIDI_reaction_ParseReactionTypeAndDetermineProducts( smr, pops, reaction ) != 0 )
goto err;
136 if( MCGIDI_reaction_ParseDetermineReactionProducts( smr, pops, outputChannel, &(reaction->
productsInfo), reaction, &finalQ, 0 ) != 0 )
return( 1 );
137 reaction->
finalQ = finalQ;
143 case 18 :
case 19 :
case 20 :
case 21 :
case 38 :
157 if( numberOfChanges == 0 ) {
171 MCGIDI_reaction_setENDL_CSNumbers( smr, reaction );
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 ) {
242 int len = (int) strlen( product->
pop->
name );
245 if( ( product->
pop->
name[len-2] ==
'_' ) && ( product->
pop->
name[len-1] ==
'c' ) ) {
247 productIsTrackable = 1;
251 if( globalPoPsIndex < 0 ) {
258 if( productIsTrackable ) {
259 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, globalPoPsIndex, product, reaction, 1 ) != 0 )
return( 1 ); }
262 if( MCGIDI_reaction_ParseDetermineReactionProducts( smr, pops, &(product->
decayChannel), productsInfo, reaction, finalQ, level + 1 ) != 0 )
return( 1 ); }
266 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, residual->
globalPoPsIndex, product, reaction, 0 ) != 0 )
return( 1 );
269 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, gammaIndex, NULL, reaction, 1 ) != 0 )
return( 1 );
301 if( product == NULL ) {
331 return( reaction->
target );
359 *EMin = reaction->
EMin;
360 *EMax = reaction->
EMax;
368 double lowerEps = 1e-14, upperEps = -1e-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
G4double S(G4double temp)
int MCGIDI_reaction_initialize(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_productsInfo_getIntegerMultiplicityAtIndex(MCGIDI_productsInfo *productsInfo, int index)
std::map< int, enum GIDI::MCGIDI_transportability > transportabilitiesMap
@ MCGIDI_reactionType_nuclearIsomerTransmutation_e
@ MCGIDI_reactionType_unknown_e
@ MCGIDI_reactionType_elastic_e
@ MCGIDI_reactionType_scattering_e
@ MCGIDI_reactionType_capture_e
@ MCGIDI_reactionType_sumOfRemainingOutputChannels_e
@ MCGIDI_reactionType_fission_e
int MCGIDI_reaction_getENDL_CSNumbers(MCGIDI_reaction *reaction, int *S)
enum MCGIDI_reactionType MCGIDI_reaction_getReactionType(statusMessageReporting *smr, MCGIDI_reaction *reaction)
double MCGIDI_outputChannel_getQ_MeV(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, double e_in)
@ MCGIDI_distributionType_unknown_e
@ MCGIDI_distributionType_angular_e
@ MCGIDI_distributionType_none_e
int MCGIDI_productsInfo_getPoPsIndexAtIndex(MCGIDI_productsInfo *productsInfo, int index)
@ MCGIDI_channelGenre_twoBody_e
@ MCGIDI_channelGenre_undefined_e
MCGIDI_productMultiplicityType
@ MCGIDI_productMultiplicityType_energyDependent_e
@ MCGIDI_productMultiplicityType_invalid_e
@ MCGIDI_productMultiplicityType_unknown_e
@ MCGIDI_productMultiplicityType_mixed_e
@ MCGIDI_productMultiplicityType_integer_e
@ MCGIDI_productMultiplicityType_gammaBranching_e
int MCGIDI_productsInfo_getTransportableAtIndex(MCGIDI_productsInfo *productsInfo, int index)
@ MCGIDI_angularType_recoil
int MCGIDI_reaction_recast(statusMessageReporting *smr, MCGIDI_reaction *reaction, GIDI_settings &settings, GIDI_settings_particle const *projectileSettings, double temperature_MeV, ptwXPoints *totalGroupedCrossSection)
enum MCGIDI_productMultiplicityType MCGIDI_productsInfo_getMultiplicityTypeAtIndex(MCGIDI_productsInfo *productsInfo, int index)
int MCGIDI_outputChannel_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_reaction *reaction, MCGIDI_product *parent)
void MCGIDI_misc_updateTransportabilitiesMap2(transportabilitiesMap *transportabilities, int PoPID, int transportable)
MCGIDI_target_heated * MCGIDI_reaction_getTargetHeated(statusMessageReporting *smr, MCGIDI_reaction *reaction)
double MCGIDI_reaction_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
@ MCGIDI_quantityLookupMode_pointwise
@ MCGIDI_quantityLookupMode_grouped
int MCGIDI_reaction_fixDomains(statusMessageReporting *smr, MCGIDI_reaction *reaction, double EMin, double EMax, nfu_status *status)
double MCGIDI_target_heated_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)
int MCGIDI_productsInfo_getNumberOfUniqueProducts(MCGIDI_productsInfo *productsInfo)
int MCGIDI_outputChannel_numberOfProducts(MCGIDI_outputChannel *outputChannel)
MCGIDI_productsInfo * MCGIDI_reaction_getProductsInfo(MCGIDI_reaction *reaction)
int MCGIDI_reaction_getDomain(statusMessageReporting *smr, MCGIDI_reaction *reaction, double *EMin, double *EMax)
int MCGIDI_reaction_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_target_heated *target, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
int MCGIDI_reaction_getENDF_MTNumber(MCGIDI_reaction *reaction)
double MCGIDI_reaction_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_outputChannel_release(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
double MCGIDI_reaction_getFinalQ(statusMessageReporting *smr, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &modes)
double MCGIDI_reaction_getCrossSectionAtE(statusMessageReporting *smr, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &modes, bool sampling)
double MCGIDI_target_heated_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)
MCGIDI_product * MCGIDI_outputChannel_getProductAtIndex(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, int i)
MCGIDI_reaction * MCGIDI_reaction_free(statusMessageReporting *smr, MCGIDI_reaction *reaction)
MCGIDI_reaction * MCGIDI_reaction_new(statusMessageReporting *smr)
int MCGIDI_reaction_release(statusMessageReporting *smr, MCGIDI_reaction *reaction)
ptwXYPoints * MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_element *linear, char const *toUnits[2])
int PoPs_particleIndex(char const *name)
int getGroupIndexFromEnergy(double energy, bool encloseOutOfRange) const
GIDI::ptwXPoints * groupFunction(GIDI::statusMessageReporting *smr, GIDI::ptwXYPoints *ptwXY1, double temperature, int order) const
GIDI_settings_group getGroup(void) const
int getGroupIndex(void) const
enum MCGIDI_quantityLookupMode getCrossSectionMode(void) const
double getProjectileEnergy(void) const
enum nfu_status_e nfu_status
nfu_status ptwXY_dullEdges(ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly)
nfu_status ptwXY_getValueAtX(ptwXYPoints *ptwXY, double x, double *y)
double ptwXY_getXMin(ptwXYPoints *ptwXY)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
double ptwXY_getXMax(ptwXYPoints *ptwXY)
double * ptwX_getPointAtIndex(ptwXPoints *ptwX, int64_t index)
nfu_status ptwX_add_ptwX(ptwXPoints *ptwX1, ptwXPoints *ptwX2)
ptwXPoints * ptwX_free(ptwXPoints *ptwX)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_realloc2(smr, old, size, forItem)
#define smr_allocateCopyString2(smr, s, forItem)
void * smr_freeMemory(void **p)
#define smr_malloc2(smr, size, zero, forItem)
enum MCGIDI_angularType type
enum MCGIDI_distributionType type
enum MCGIDI_channelGenre genre
enum MCGIDI_productMultiplicityType productMultiplicityType
MCGIDI_outputChannel decayChannel
MCGIDI_distribution distribution
ptwXYPoints * multiplicityVsEnergy
ptwXYPoints ** piecewiseMultiplicities
MCGIDI_productInfo * productInfo
int numberOfAllocatedProducts
MCGIDI_target_heated * target
enum MCGIDI_reactionType reactionType
transportabilitiesMap * transportabilities
xDataTOM_attributionList attributes
double thresholdGroupedDeltaCrossSection
char const * outputChannelStr
MCGIDI_outputChannel outputChannel
ptwXPoints * crossSectionGrouped
double thresholdGroupDomain
MCGIDI_productsInfo productsInfo
ptwXYPoints * crossSection
MCGIDI_POP * projectilePOP
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
xDataTOM_interpolationFlag
@ xDataTOM_interpolationFlag_linear
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
xDataTOM_interpolationQualifier
void xDataTOMAL_release(xDataTOM_attributionList *attributes)