Geant4-11
Macros | Functions
MCGIDI_reaction.cc File Reference
#include <string.h>
#include <cmath>
#include <PoPs.h>
#include "MCGIDI.h"
#include "MCGIDI_misc.h"
#include "MCGIDI_private.h"

Go to the source code of this file.

Macros

#define nParticleChanges   6
 

Functions

int MCGIDI_productsInfo_getIntegerMultiplicityAtIndex (MCGIDI_productsInfo *productsInfo, int index)
 
enum MCGIDI_productMultiplicityType MCGIDI_productsInfo_getMultiplicityTypeAtIndex (MCGIDI_productsInfo *productsInfo, int index)
 
int MCGIDI_productsInfo_getNumberOfUniqueProducts (MCGIDI_productsInfo *productsInfo)
 
int MCGIDI_productsInfo_getPoPsIndexAtIndex (MCGIDI_productsInfo *productsInfo, int index)
 
int MCGIDI_productsInfo_getTransportableAtIndex (MCGIDI_productsInfo *productsInfo, int index)
 
static int MCGIDI_reaction_addReturnProduct (statusMessageReporting *smr, MCGIDI_productsInfo *productsInfo, int ID, MCGIDI_product *product, MCGIDI_reaction *reaction, int transportable)
 
int MCGIDI_reaction_fixDomains (statusMessageReporting *, MCGIDI_reaction *reaction, double EMin, double EMax, nfu_status *status)
 
MCGIDI_reactionMCGIDI_reaction_free (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
double MCGIDI_reaction_getCrossSectionAtE (statusMessageReporting *smr, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &modes, bool sampling)
 
int MCGIDI_reaction_getDomain (statusMessageReporting *, MCGIDI_reaction *reaction, double *EMin, double *EMax)
 
int MCGIDI_reaction_getENDF_MTNumber (MCGIDI_reaction *reaction)
 
int MCGIDI_reaction_getENDL_CSNumbers (MCGIDI_reaction *reaction, int *S)
 
double MCGIDI_reaction_getFinalQ (statusMessageReporting *, MCGIDI_reaction *reaction, MCGIDI_quantitiesLookupModes &)
 
MCGIDI_productsInfoMCGIDI_reaction_getProductsInfo (MCGIDI_reaction *reaction)
 
double MCGIDI_reaction_getProjectileMass_MeV (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
enum MCGIDI_reactionType MCGIDI_reaction_getReactionType (statusMessageReporting *, MCGIDI_reaction *reaction)
 
MCGIDI_target_heatedMCGIDI_reaction_getTargetHeated (statusMessageReporting *, MCGIDI_reaction *reaction)
 
double MCGIDI_reaction_getTargetMass_MeV (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
int MCGIDI_reaction_initialize (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
static int MCGIDI_reaction_initialize2 (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
MCGIDI_reactionMCGIDI_reaction_new (statusMessageReporting *smr)
 
static int MCGIDI_reaction_ParseDetermineReactionProducts (statusMessageReporting *smr, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_productsInfo *productsInfo, MCGIDI_reaction *reaction, double *finalQ, int level)
 
int MCGIDI_reaction_parseFromTOM (statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_target_heated *target, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
 
static int MCGIDI_reaction_ParseReactionTypeAndDetermineProducts (statusMessageReporting *smr, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
 
static int MCGIDI_reaction_particleChanges (MCGIDI_POP *projectile, MCGIDI_POP *target, MCGIDI_productsInfo *productsInfo, int n1, int *particlesChanges)
 
int MCGIDI_reaction_recast (statusMessageReporting *smr, MCGIDI_reaction *reaction, GIDI_settings &, GIDI_settings_particle const *projectileSettings, double temperature_MeV, ptwXPoints *totalGroupedCrossSection)
 
int MCGIDI_reaction_release (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 
static int MCGIDI_reaction_setENDL_CSNumbers (statusMessageReporting *smr, MCGIDI_reaction *reaction)
 

Macro Definition Documentation

◆ nParticleChanges

#define nParticleChanges   6

Definition at line 18 of file MCGIDI_reaction.cc.

Function Documentation

◆ MCGIDI_productsInfo_getIntegerMultiplicityAtIndex()

int MCGIDI_productsInfo_getIntegerMultiplicityAtIndex ( MCGIDI_productsInfo productsInfo,
int  index 
)

Definition at line 550 of file MCGIDI_reaction.cc.

550 {
551
552 if( ( index < 0 ) || ( index >= productsInfo->numberOfProducts ) ) return( -1 );
553 return( productsInfo->productInfo[index].multiplicity );
554}
MCGIDI_productInfo * productInfo
Definition: MCGIDI.h:275

References MCGIDI_productInfo_s::multiplicity, MCGIDI_productsInfo_s::numberOfProducts, and MCGIDI_productsInfo_s::productInfo.

◆ MCGIDI_productsInfo_getMultiplicityTypeAtIndex()

enum MCGIDI_productMultiplicityType MCGIDI_productsInfo_getMultiplicityTypeAtIndex ( MCGIDI_productsInfo productsInfo,
int  index 
)

Definition at line 542 of file MCGIDI_reaction.cc.

542 {
543
544 if( ( index < 0 ) || ( index >= productsInfo->numberOfProducts ) ) return( MCGIDI_productMultiplicityType_invalid_e );
545 return( productsInfo->productInfo[index].productMultiplicityType );
546}
@ MCGIDI_productMultiplicityType_invalid_e
Definition: MCGIDI.h:205
enum MCGIDI_productMultiplicityType productMultiplicityType
Definition: MCGIDI.h:267

References MCGIDI_productMultiplicityType_invalid_e, MCGIDI_productsInfo_s::numberOfProducts, MCGIDI_productsInfo_s::productInfo, and MCGIDI_productInfo_s::productMultiplicityType.

◆ MCGIDI_productsInfo_getNumberOfUniqueProducts()

int MCGIDI_productsInfo_getNumberOfUniqueProducts ( MCGIDI_productsInfo productsInfo)

Definition at line 527 of file MCGIDI_reaction.cc.

527 {
528
529 return( productsInfo->numberOfProducts );
530}

References MCGIDI_productsInfo_s::numberOfProducts.

◆ MCGIDI_productsInfo_getPoPsIndexAtIndex()

int MCGIDI_productsInfo_getPoPsIndexAtIndex ( MCGIDI_productsInfo productsInfo,
int  index 
)

Definition at line 534 of file MCGIDI_reaction.cc.

534 {
535
536 if( ( index < 0 ) || ( index >= productsInfo->numberOfProducts ) ) return( -1 );
537 return( productsInfo->productInfo[index].globalPoPsIndex );
538}

References MCGIDI_productInfo_s::globalPoPsIndex, MCGIDI_productsInfo_s::numberOfProducts, and MCGIDI_productsInfo_s::productInfo.

◆ MCGIDI_productsInfo_getTransportableAtIndex()

int MCGIDI_productsInfo_getTransportableAtIndex ( MCGIDI_productsInfo productsInfo,
int  index 
)

Definition at line 558 of file MCGIDI_reaction.cc.

558 {
559
560 if( ( index < 0 ) || ( index >= productsInfo->numberOfProducts ) ) return( -1 );
561 return( productsInfo->productInfo[index].transportable );
562}

References MCGIDI_productsInfo_s::numberOfProducts, MCGIDI_productsInfo_s::productInfo, and MCGIDI_productInfo_s::transportable.

◆ MCGIDI_reaction_addReturnProduct()

static int MCGIDI_reaction_addReturnProduct ( statusMessageReporting smr,
MCGIDI_productsInfo productsInfo,
int  ID,
MCGIDI_product product,
MCGIDI_reaction reaction,
int  transportable 
)
static

Definition at line 279 of file MCGIDI_reaction.cc.

280 {
281
282 int i1;
283 enum MCGIDI_productMultiplicityType productMultiplicityType;
284
285 MCGIDI_misc_updateTransportabilitiesMap2( reaction->transportabilities, ID, transportable );
286 for( i1 = 0; i1 < productsInfo->numberOfProducts; i1++ ) {
287 if( productsInfo->productInfo[i1].globalPoPsIndex == ID ) break;
288 }
289 if( i1 == productsInfo->numberOfProducts ) {
290 if( productsInfo->numberOfProducts == productsInfo->numberOfAllocatedProducts ) {
291 productsInfo->numberOfAllocatedProducts += 4;
292 if( ( productsInfo->productInfo = (MCGIDI_productInfo *) smr_realloc2( smr, productsInfo->productInfo,
293 productsInfo->numberOfAllocatedProducts * sizeof( MCGIDI_productInfo ), "productsInfo->productInfo" ) ) == NULL ) return( 1 );
294 }
295 productsInfo->numberOfProducts++;
296 productsInfo->productInfo[i1].globalPoPsIndex = ID;
298 productsInfo->productInfo[i1].multiplicity = 0;
299 productsInfo->productInfo[i1].transportable = transportable;
300 }
301 if( product == NULL ) {
302 productMultiplicityType = MCGIDI_productMultiplicityType_gammaBranching_e; }
303 else {
304 if( ( product->multiplicityVsEnergy != NULL ) || ( product->piecewiseMultiplicities != NULL ) ) {
305 productMultiplicityType = MCGIDI_productMultiplicityType_energyDependent_e; }
306 else {
307 productsInfo->productInfo[i1].multiplicity += product->multiplicity;
308 productMultiplicityType = MCGIDI_productMultiplicityType_integer_e;
309 }
310 }
312 ( productsInfo->productInfo[i1].productMultiplicityType == productMultiplicityType ) ) {
313 productsInfo->productInfo[i1].productMultiplicityType = productMultiplicityType; }
314 else {
316 }
317 return( 0 );
318}
MCGIDI_productMultiplicityType
Definition: MCGIDI.h:205
@ MCGIDI_productMultiplicityType_energyDependent_e
Definition: MCGIDI.h:206
@ MCGIDI_productMultiplicityType_unknown_e
Definition: MCGIDI.h:205
@ MCGIDI_productMultiplicityType_mixed_e
Definition: MCGIDI.h:206
@ MCGIDI_productMultiplicityType_integer_e
Definition: MCGIDI.h:205
@ MCGIDI_productMultiplicityType_gammaBranching_e
Definition: MCGIDI.h:206
void MCGIDI_misc_updateTransportabilitiesMap2(transportabilitiesMap *transportabilities, int PoPID, int transportable)
Definition: MCGIDI_misc.cc:524
#define smr_realloc2(smr, old, size, forItem)
int multiplicity
Definition: MCGIDI.h:404
ptwXYPoints * multiplicityVsEnergy
Definition: MCGIDI.h:407
ptwXYPoints ** piecewiseMultiplicities
Definition: MCGIDI.h:410
int numberOfAllocatedProducts
Definition: MCGIDI.h:274
transportabilitiesMap * transportabilities
Definition: MCGIDI.h:430

References MCGIDI_productInfo_s::globalPoPsIndex, MCGIDI_misc_updateTransportabilitiesMap2(), MCGIDI_productMultiplicityType_energyDependent_e, MCGIDI_productMultiplicityType_gammaBranching_e, MCGIDI_productMultiplicityType_integer_e, MCGIDI_productMultiplicityType_mixed_e, MCGIDI_productMultiplicityType_unknown_e, MCGIDI_productInfo_s::multiplicity, MCGIDI_product_s::multiplicity, MCGIDI_product_s::multiplicityVsEnergy, MCGIDI_productsInfo_s::numberOfAllocatedProducts, MCGIDI_productsInfo_s::numberOfProducts, MCGIDI_product_s::piecewiseMultiplicities, MCGIDI_productsInfo_s::productInfo, MCGIDI_productInfo_s::productMultiplicityType, smr_realloc2, MCGIDI_reaction_s::transportabilities, and MCGIDI_productInfo_s::transportable.

Referenced by MCGIDI_reaction_ParseDetermineReactionProducts().

◆ MCGIDI_reaction_fixDomains()

int MCGIDI_reaction_fixDomains ( statusMessageReporting smr,
MCGIDI_reaction reaction,
double  EMin,
double  EMax,
nfu_status status 
)

Definition at line 366 of file MCGIDI_reaction.cc.

366 {
367
368 double lowerEps = 1e-14, upperEps = -1e-14;
369
370 if( reaction->EMin == EMin ) lowerEps = 0.;
371 if( reaction->EMax == EMax ) upperEps = 0.;
372 if( ( lowerEps == 0. ) && ( upperEps == 0. ) ) return( 0 );
373
374 *status = ptwXY_dullEdges( reaction->crossSection, lowerEps, upperEps, 1 );
375 return( *status != nfu_Okay );
376}
@ nfu_Okay
Definition: nf_utilities.h:25
nfu_status ptwXY_dullEdges(ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly)
ptwXYPoints * crossSection
Definition: MCGIDI.h:426

References MCGIDI_reaction_s::crossSection, MCGIDI_reaction_s::EMax, MCGIDI_reaction_s::EMin, nfu_Okay, and ptwXY_dullEdges().

Referenced by MCGIDI_target_heated_read().

◆ MCGIDI_reaction_free()

MCGIDI_reaction * MCGIDI_reaction_free ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 60 of file MCGIDI_reaction.cc.

60 {
61
62 MCGIDI_reaction_release( smr, reaction );
63 smr_freeMemory( (void **) &reaction );
64 return( NULL );
65}
int MCGIDI_reaction_release(statusMessageReporting *smr, MCGIDI_reaction *reaction)
void * smr_freeMemory(void **p)

References MCGIDI_reaction_release(), and smr_freeMemory().

Referenced by MCGIDI_reaction_new().

◆ MCGIDI_reaction_getCrossSectionAtE()

double MCGIDI_reaction_getCrossSectionAtE ( statusMessageReporting smr,
MCGIDI_reaction reaction,
MCGIDI_quantitiesLookupModes modes,
bool  sampling 
)

Definition at line 380 of file MCGIDI_reaction.cc.

381 {
382
383 double e_in = modes.getProjectileEnergy( ), xsec;
384
386 if( e_in < reaction->EMin ) e_in = reaction->EMin;
387 if( e_in > reaction->EMax ) e_in = reaction->EMax;
388 ptwXY_getValueAtX( reaction->crossSection, e_in, &xsec ); }
390 int index = modes.getGroupIndex( );
391 double *xSecP = ptwX_getPointAtIndex( reaction->crossSectionGrouped, index );
392
393 if( xSecP != NULL ) {
394 xsec = *xSecP;
395 if( sampling && ( index == reaction->thresholdGroupIndex ) ) xsec += reaction->thresholdGroupedDeltaCrossSection; }
396 else {
397 xsec = 0.;
398 smr_setReportError2( smr, smr_unknownID, 1, "Invalid cross section group index %d", index );
399 } }
400 else {
401 xsec = 0.;
402 }
403 return( xsec );
404}
@ MCGIDI_quantityLookupMode_pointwise
Definition: MCGIDI.h:78
@ MCGIDI_quantityLookupMode_grouped
Definition: MCGIDI.h:79
int getGroupIndex(void) const
Definition: MCGIDI.h:100
enum MCGIDI_quantityLookupMode getCrossSectionMode(void) const
Definition: MCGIDI.h:107
double getProjectileEnergy(void) const
Definition: MCGIDI.h:97
nfu_status ptwXY_getValueAtX(ptwXYPoints *ptwXY, double x, double *y)
Definition: ptwXY_core.cc:844
double * ptwX_getPointAtIndex(ptwXPoints *ptwX, int64_t index)
Definition: ptwX_core.cc:206
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_unknownID
int thresholdGroupIndex
Definition: MCGIDI.h:422
double thresholdGroupedDeltaCrossSection
Definition: MCGIDI.h:424
ptwXPoints * crossSectionGrouped
Definition: MCGIDI.h:427

References MCGIDI_reaction_s::crossSection, MCGIDI_reaction_s::crossSectionGrouped, MCGIDI_reaction_s::EMax, MCGIDI_reaction_s::EMin, MCGIDI_quantitiesLookupModes::getCrossSectionMode(), MCGIDI_quantitiesLookupModes::getGroupIndex(), MCGIDI_quantitiesLookupModes::getProjectileEnergy(), MCGIDI_quantityLookupMode_grouped, MCGIDI_quantityLookupMode_pointwise, ptwX_getPointAtIndex(), ptwXY_getValueAtX(), smr_setReportError2, smr_unknownID, MCGIDI_reaction_s::thresholdGroupedDeltaCrossSection, and MCGIDI_reaction_s::thresholdGroupIndex.

Referenced by MCGIDI_target_heated_getIndexReactionCrossSectionAtE().

◆ MCGIDI_reaction_getDomain()

int MCGIDI_reaction_getDomain ( statusMessageReporting smr,
MCGIDI_reaction reaction,
double *  EMin,
double *  EMax 
)

Definition at line 350 of file MCGIDI_reaction.cc.

350 {
351/*
352* Return value
353* < 0 No cross section data.
354* == 0 Okay and EMin and EMax set.
355* > 0 error, EMin and EMax undefined.
356*/
357
358 if( !reaction->domainValuesPresent ) return( -1 );
359 *EMin = reaction->EMin;
360 *EMax = reaction->EMax;
361 return( 0 );
362}
int domainValuesPresent
Definition: MCGIDI.h:421

References MCGIDI_reaction_s::domainValuesPresent, MCGIDI_reaction_s::EMax, and MCGIDI_reaction_s::EMin.

Referenced by MCGIDI_outputChannel_getDomain(), and MCGIDI_target_heated_read().

◆ MCGIDI_reaction_getENDF_MTNumber()

int MCGIDI_reaction_getENDF_MTNumber ( MCGIDI_reaction reaction)

◆ MCGIDI_reaction_getENDL_CSNumbers()

int MCGIDI_reaction_getENDL_CSNumbers ( MCGIDI_reaction reaction,
int *  S 
)

Definition at line 422 of file MCGIDI_reaction.cc.

422 {
423
424 if( S != NULL ) *S = reaction->ENDL_S;
425 return( reaction->ENDL_C );
426}
G4double S(G4double temp)

References MCGIDI_reaction_s::ENDL_C, MCGIDI_reaction_s::ENDL_S, and S().

◆ MCGIDI_reaction_getFinalQ()

double MCGIDI_reaction_getFinalQ ( statusMessageReporting smr,
MCGIDI_reaction reaction,
MCGIDI_quantitiesLookupModes modes 
)

Definition at line 408 of file MCGIDI_reaction.cc.

408 {
409
410 return( reaction->finalQ );
411}
double finalQ
Definition: MCGIDI.h:425

References MCGIDI_reaction_s::finalQ.

Referenced by MCGIDI_target_heated_getIndexReactionFinalQ().

◆ MCGIDI_reaction_getProductsInfo()

MCGIDI_productsInfo * MCGIDI_reaction_getProductsInfo ( MCGIDI_reaction reaction)

Definition at line 489 of file MCGIDI_reaction.cc.

489 {
490
491 return( &(reaction->productsInfo) );
492}
MCGIDI_productsInfo productsInfo
Definition: MCGIDI.h:429

References MCGIDI_reaction_s::productsInfo.

◆ MCGIDI_reaction_getProjectileMass_MeV()

double MCGIDI_reaction_getProjectileMass_MeV ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 336 of file MCGIDI_reaction.cc.

336 {
337
338 return( MCGIDI_target_heated_getProjectileMass_MeV( smr, reaction->target ) );
339}
double MCGIDI_target_heated_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)
MCGIDI_target_heated * target
Definition: MCGIDI.h:416

References MCGIDI_target_heated_getProjectileMass_MeV(), and MCGIDI_reaction_s::target.

Referenced by MCGIDI_outputChannel_getProjectileMass_MeV(), MCGIDI_outputChannel_parseFromTOM(), and MCGIDI_outputChannel_sampleProductsAtE().

◆ MCGIDI_reaction_getReactionType()

enum MCGIDI_reactionType MCGIDI_reaction_getReactionType ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 322 of file MCGIDI_reaction.cc.

322 {
323
324 return( reaction->reactionType );
325}
enum MCGIDI_reactionType reactionType
Definition: MCGIDI.h:418

References MCGIDI_reaction_s::reactionType.

Referenced by MCGIDI_target_getReactionTypeAtIndex().

◆ MCGIDI_reaction_getTargetHeated()

MCGIDI_target_heated * MCGIDI_reaction_getTargetHeated ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 329 of file MCGIDI_reaction.cc.

329 {
330
331 return( reaction->target );
332}

References MCGIDI_reaction_s::target.

Referenced by MCGIDI_outputChannel_getTargetHeated().

◆ MCGIDI_reaction_getTargetMass_MeV()

double MCGIDI_reaction_getTargetMass_MeV ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 343 of file MCGIDI_reaction.cc.

343 {
344
345 return( MCGIDI_target_heated_getTargetMass_MeV( smr, reaction->target ) );
346}
double MCGIDI_target_heated_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_target_heated *target)

References MCGIDI_target_heated_getTargetMass_MeV(), and MCGIDI_reaction_s::target.

Referenced by MCGIDI_outputChannel_getTargetMass_MeV(), MCGIDI_outputChannel_parseFromTOM(), and MCGIDI_outputChannel_sampleProductsAtE().

◆ MCGIDI_reaction_initialize()

int MCGIDI_reaction_initialize ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 42 of file MCGIDI_reaction.cc.

42 {
43
44 if( MCGIDI_reaction_initialize2( smr, reaction ) != 0 ) return( 1 );
46 return( 0 );
47}
std::map< int, enum GIDI::MCGIDI_transportability > transportabilitiesMap
Definition: MCGIDI.h:171
static int MCGIDI_reaction_initialize2(statusMessageReporting *smr, MCGIDI_reaction *reaction)

References MCGIDI_reaction_initialize2(), and MCGIDI_reaction_s::transportabilities.

Referenced by MCGIDI_reaction_new(), and MCGIDI_reaction_parseFromTOM().

◆ MCGIDI_reaction_initialize2()

static int MCGIDI_reaction_initialize2 ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)
static

Definition at line 51 of file MCGIDI_reaction.cc.

51 {
52
53 memset( reaction, 0, sizeof( MCGIDI_reaction ) );
54 xDataTOMAL_initial( smr, &(reaction->attributes) );
55 return( 0 );
56}
xDataTOM_attributionList attributes
Definition: MCGIDI.h:420
void xDataTOMAL_initial(statusMessageReporting *smr, xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:353

References MCGIDI_reaction_s::attributes, and xDataTOMAL_initial().

Referenced by MCGIDI_reaction_initialize(), and MCGIDI_reaction_release().

◆ MCGIDI_reaction_new()

MCGIDI_reaction * MCGIDI_reaction_new ( statusMessageReporting smr)

Definition at line 31 of file MCGIDI_reaction.cc.

31 {
32
33 MCGIDI_reaction *reaction;
34
35 if( ( reaction = (MCGIDI_reaction *) smr_malloc2( smr, sizeof( MCGIDI_reaction ), 0, "reaction" ) ) == NULL ) return( NULL );
36 if( MCGIDI_reaction_initialize( smr, reaction ) ) reaction = MCGIDI_reaction_free( smr, reaction );
37 return( reaction );
38}
int MCGIDI_reaction_initialize(statusMessageReporting *smr, MCGIDI_reaction *reaction)
MCGIDI_reaction * MCGIDI_reaction_free(statusMessageReporting *smr, MCGIDI_reaction *reaction)
#define smr_malloc2(smr, size, zero, forItem)

References MCGIDI_reaction_free(), MCGIDI_reaction_initialize(), and smr_malloc2.

◆ MCGIDI_reaction_ParseDetermineReactionProducts()

static int MCGIDI_reaction_ParseDetermineReactionProducts ( statusMessageReporting smr,
MCGIDI_POPs pops,
MCGIDI_outputChannel outputChannel,
MCGIDI_productsInfo productsInfo,
MCGIDI_reaction reaction,
double *  finalQ,
int  level 
)
static

Definition at line 202 of file MCGIDI_reaction.cc.

203 {
204/*
205* This function determines all products that can be returned during sampling for this outputChannel. Note, products like 'U238_c' and
206* 'U238_e3' are not returned during sampling as both are decay to the groud state (unless a meta-stable is encountered).
207* Some examples for projectile 'n' and target 'U238' are:
208* outputChannel products returned during sampling.
209* 'n + U238' n, U238
210* 'n + U238 + gamma' n, U238, gamma
211* 'n + U238_c' n, U238 (even if no gammas are give, return ground state of residual.
212* 'n + (U238_e3 -> U238 + gamma)' n, U238, gamma
213*/
214 int iProduct, nProducts = MCGIDI_outputChannel_numberOfProducts( outputChannel ), globalPoPsIndex, productIsTrackable;
215 int twoBodyProductsWithData = 0;
216 MCGIDI_product *product;
217 MCGIDI_POP *residual;
218
219 if( ( level == 0 ) && ( outputChannel->genre == MCGIDI_channelGenre_twoBody_e ) ) {
220 for( iProduct = 0; iProduct < nProducts; iProduct++ ) {
221 product = MCGIDI_outputChannel_getProductAtIndex( smr, outputChannel, iProduct );
222 if( product->pop->globalPoPsIndex < 0 ) {
223 twoBodyProductsWithData = -1; }
225 if( twoBodyProductsWithData >= 0 ) twoBodyProductsWithData = 1;
226 }
227 }
228 }
229 if( twoBodyProductsWithData < 0 ) twoBodyProductsWithData = 0;
230 *finalQ += MCGIDI_outputChannel_getQ_MeV( smr, outputChannel, 0 );
231 for( iProduct = 0; iProduct < nProducts; iProduct++ ) {
232 productIsTrackable = twoBodyProductsWithData;
233 product = MCGIDI_outputChannel_getProductAtIndex( smr, outputChannel, iProduct );
234 globalPoPsIndex = product->pop->globalPoPsIndex;
236 productIsTrackable = 1;
237 if( globalPoPsIndex < 0 ) {
238 if( product->distribution.angular != NULL ) {
239 if( product->distribution.angular->type == MCGIDI_angularType_recoil ) productIsTrackable = 0;
240 }
241 if( productIsTrackable ) {
242 int len = (int) strlen( product->pop->name );
243
244 if( len > 2 ) { /* Special case for continuum reactions with data for residual (e.g., n + U233 -> n + U233_c). */
245 if( ( product->pop->name[len-2] == '_' ) && ( product->pop->name[len-1] == 'c' ) ) {
246 for( residual = product->pop; residual->globalPoPsIndex < 0; residual = residual->parent ) ;
247 productIsTrackable = 1;
248 globalPoPsIndex = residual->globalPoPsIndex;
249 }
250 }
251 if( globalPoPsIndex < 0 ) {
252 smr_setReportError2( smr, smr_unknownID, 1, "product determination for '%s' cannot be determined", product->pop->name );
253 return( 1 );
254 }
255 }
256 }
257 }
258 if( productIsTrackable ) {
259 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, globalPoPsIndex, product, reaction, 1 ) != 0 ) return( 1 ); }
260 else {
262 if( MCGIDI_reaction_ParseDetermineReactionProducts( smr, pops, &(product->decayChannel), productsInfo, reaction, finalQ, level + 1 ) != 0 ) return( 1 ); }
263 else {
264 *finalQ += product->pop->level_MeV;
265 for( residual = product->pop; residual->globalPoPsIndex < 0; residual = residual->parent ) ;
266 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, residual->globalPoPsIndex, product, reaction, 0 ) != 0 ) return( 1 );
267 if( product->pop->numberOfGammaBranchs != 0 ) {
268 int gammaIndex = PoPs_particleIndex( "gamma" );
269 if( MCGIDI_reaction_addReturnProduct( smr, productsInfo, gammaIndex, NULL, reaction, 1 ) != 0 ) return( 1 );
270 }
271 }
272 }
273 }
274 return( 0 );
275}
double MCGIDI_outputChannel_getQ_MeV(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, double e_in)
@ MCGIDI_distributionType_unknown_e
Definition: MCGIDI.h:208
@ MCGIDI_distributionType_angular_e
Definition: MCGIDI.h:208
@ MCGIDI_distributionType_none_e
Definition: MCGIDI.h:208
@ MCGIDI_channelGenre_twoBody_e
Definition: MCGIDI.h:202
@ MCGIDI_channelGenre_undefined_e
Definition: MCGIDI.h:202
@ MCGIDI_angularType_recoil
Definition: MCGIDI.h:212
int MCGIDI_outputChannel_numberOfProducts(MCGIDI_outputChannel *outputChannel)
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)
static int MCGIDI_reaction_addReturnProduct(statusMessageReporting *smr, MCGIDI_productsInfo *productsInfo, int ID, MCGIDI_product *product, MCGIDI_reaction *reaction, int transportable)
int PoPs_particleIndex(char const *name)
Definition: PoPs.cc:204
double level_MeV
Definition: MCGIDI.h:236
char * name
Definition: MCGIDI.h:232
MCGIDI_POP * parent
Definition: MCGIDI.h:231
int globalPoPsIndex
Definition: MCGIDI.h:233
int numberOfGammaBranchs
Definition: MCGIDI.h:237
enum MCGIDI_angularType type
Definition: MCGIDI.h:320
MCGIDI_angular * angular
Definition: MCGIDI.h:383
enum MCGIDI_distributionType type
Definition: MCGIDI.h:382
enum MCGIDI_channelGenre genre
Definition: MCGIDI.h:391
MCGIDI_POP * pop
Definition: MCGIDI.h:401
MCGIDI_outputChannel decayChannel
Definition: MCGIDI.h:412
MCGIDI_distribution distribution
Definition: MCGIDI.h:411

References MCGIDI_distribution_s::angular, MCGIDI_product_s::decayChannel, MCGIDI_product_s::distribution, MCGIDI_outputChannel_s::genre, MCGIDI_POP_s::globalPoPsIndex, MCGIDI_POP_s::level_MeV, MCGIDI_angularType_recoil, MCGIDI_channelGenre_twoBody_e, MCGIDI_channelGenre_undefined_e, MCGIDI_distributionType_angular_e, MCGIDI_distributionType_none_e, MCGIDI_distributionType_unknown_e, MCGIDI_outputChannel_getProductAtIndex(), MCGIDI_outputChannel_getQ_MeV(), MCGIDI_outputChannel_numberOfProducts(), MCGIDI_reaction_addReturnProduct(), MCGIDI_reaction_ParseDetermineReactionProducts(), MCGIDI_POP_s::name, MCGIDI_POP_s::numberOfGammaBranchs, MCGIDI_POP_s::parent, MCGIDI_product_s::pop, PoPs_particleIndex(), smr_setReportError2, smr_unknownID, MCGIDI_angular_s::type, and MCGIDI_distribution_s::type.

Referenced by MCGIDI_reaction_ParseDetermineReactionProducts(), and MCGIDI_reaction_ParseReactionTypeAndDetermineProducts().

◆ MCGIDI_reaction_parseFromTOM()

int MCGIDI_reaction_parseFromTOM ( statusMessageReporting smr,
xDataTOM_element element,
MCGIDI_target_heated target,
MCGIDI_POPs pops,
MCGIDI_reaction reaction 
)

Definition at line 84 of file MCGIDI_reaction.cc.

85 {
86
87 xDataTOM_element *child, *linear, *outputChannel;
88 enum xDataTOM_interpolationFlag independent, dependent;
90 char const *outputChannelStr, *crossSectionUnits[2] = { "MeV", "b" };
91
92 MCGIDI_reaction_initialize( smr, reaction );
93
94 reaction->target = target;
96 if( xDataTOME_copyAttributionList( smr, &(reaction->attributes), element ) ) goto err;
97 if( xDataTOME_convertAttributeToInteger( smr, element, "ENDF_MT", &(reaction->ENDF_MT) ) ) goto err;
98 if( ( outputChannelStr = xDataTOM_getAttributesValueInElement( element, "outputChannel" ) ) == NULL ) goto err;
99 if( ( reaction->outputChannelStr = smr_allocateCopyString2( smr, outputChannelStr, "reaction->outputChannelStr" ) ) == NULL ) goto err;
100
101 if( ( child = xDataTOME_getOneElementByName( smr, element, "crossSection", 1 ) ) == NULL ) goto err;
102 if( ( linear = xDataTOME_getOneElementByName( smr, child, "linear", 0 ) ) == NULL ) {
103 if( ( linear = xDataTOME_getOneElementByName( smr, child, "pointwise", 1 ) ) == NULL ) goto err;
104 }
105 if( xDataTOME_getInterpolation( smr, linear, 0, &independent, &dependent, &qualifier ) ) goto err;
106 if( ( independent != xDataTOM_interpolationFlag_linear ) || ( dependent != xDataTOM_interpolationFlag_linear ) ) {
107 smr_setReportError2( smr, smr_unknownID, 1, "cross section interpolation (%d,%d) is not linear-linear", independent, dependent );
108 goto err;
109 }
110 if( ( reaction->crossSection = MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf( smr, linear, crossSectionUnits ) ) == NULL ) goto err;
111 reaction->domainValuesPresent = 1;
112 reaction->EMin = ptwXY_getXMin( reaction->crossSection );
113 reaction->EMax = ptwXY_getXMax( reaction->crossSection );
114
115 if( ( outputChannel = xDataTOME_getOneElementByName( smr, element, "outputChannel", 1 ) ) == NULL ) goto err;
116 if( MCGIDI_outputChannel_parseFromTOM( smr, outputChannel, pops, &(reaction->outputChannel), reaction, NULL ) ) goto err;
117
118 if( MCGIDI_reaction_ParseReactionTypeAndDetermineProducts( smr, pops, reaction ) != 0 ) goto err;
119
120 return( 0 );
121
122err:
123 MCGIDI_reaction_release( smr, reaction );
124 return( 1 );
125}
@ MCGIDI_reactionType_unknown_e
Definition: MCGIDI.h:187
int MCGIDI_outputChannel_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_reaction *reaction, MCGIDI_product *parent)
ptwXYPoints * MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_element *linear, char const *toUnits[2])
Definition: MCGIDI_misc.cc:424
static int MCGIDI_reaction_ParseReactionTypeAndDetermineProducts(statusMessageReporting *smr, MCGIDI_POPs *pops, MCGIDI_reaction *reaction)
double ptwXY_getXMin(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1206
double ptwXY_getXMax(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1239
#define smr_allocateCopyString2(smr, s, forItem)
char const * outputChannelStr
Definition: MCGIDI.h:419
MCGIDI_outputChannel outputChannel
Definition: MCGIDI.h:428
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
Definition: xDataTOM.cc:246
int xDataTOME_copyAttributionList(statusMessageReporting *smr, xDataTOM_attributionList *desc, xDataTOM_element *element)
Definition: xDataTOM.cc:293
xDataTOM_interpolationFlag
Definition: xDataTOM.h:19
@ xDataTOM_interpolationFlag_linear
Definition: xDataTOM.h:19
int xDataTOME_getInterpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum xDataTOM_interpolationFlag *independent, enum xDataTOM_interpolationFlag *dependent, enum xDataTOM_interpolationQualifier *qualifier)
Definition: xDataTOM.cc:314
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
Definition: xDataTOM.cc:286
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
Definition: xDataTOM.cc:300
xDataTOM_interpolationQualifier
Definition: xDataTOM.h:21

References MCGIDI_reaction_s::attributes, MCGIDI_reaction_s::crossSection, MCGIDI_reaction_s::domainValuesPresent, MCGIDI_reaction_s::EMax, MCGIDI_reaction_s::EMin, MCGIDI_reaction_s::ENDF_MT, MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(), MCGIDI_outputChannel_parseFromTOM(), MCGIDI_reaction_initialize(), MCGIDI_reaction_ParseReactionTypeAndDetermineProducts(), MCGIDI_reaction_release(), MCGIDI_reactionType_unknown_e, MCGIDI_reaction_s::outputChannel, MCGIDI_reaction_s::outputChannelStr, ptwXY_getXMax(), ptwXY_getXMin(), MCGIDI_reaction_s::reactionType, smr_allocateCopyString2, smr_setReportError2, smr_unknownID, MCGIDI_reaction_s::target, xDataTOM_getAttributesValueInElement(), xDataTOM_interpolationFlag_linear, xDataTOME_convertAttributeToInteger(), xDataTOME_copyAttributionList(), xDataTOME_getInterpolation(), and xDataTOME_getOneElementByName().

Referenced by MCGIDI_target_heated_parseReaction().

◆ MCGIDI_reaction_ParseReactionTypeAndDetermineProducts()

static int MCGIDI_reaction_ParseReactionTypeAndDetermineProducts ( statusMessageReporting smr,
MCGIDI_POPs pops,
MCGIDI_reaction reaction 
)
static

Definition at line 129 of file MCGIDI_reaction.cc.

129 {
130
131 MCGIDI_outputChannel *outputChannel = &(reaction->outputChannel);
132 int MT;
133 int particlesChanges[nParticleChanges], numberOfChanges;
134 double finalQ = 0.;
135
136 if( MCGIDI_reaction_ParseDetermineReactionProducts( smr, pops, outputChannel, &(reaction->productsInfo), reaction, &finalQ, 0 ) != 0 ) return( 1 );
137 reaction->finalQ = finalQ;
139 switch( MT ) {
140 case 2 :
142 break;
143 case 18 : case 19 : case 20 : case 21 : case 38 :
145 break;
146 case 102 :
148 break;
149 case 5 :
151 break;
152 default :
153 numberOfChanges = MCGIDI_reaction_particleChanges( reaction->target->projectilePOP, reaction->target->targetPOP, &(reaction->productsInfo),
154 nParticleChanges, particlesChanges );
155
157 if( numberOfChanges == 0 ) {
159 else {
161 }
162
163/*
164 Currently, these are not handled properly:
165 MCGIDI_reactionType_nuclearLevelTransition_e
166 MCGIDI_reactionType_atomic_e
167*/
168 break;
169 }
170
171 MCGIDI_reaction_setENDL_CSNumbers( smr, reaction );
172 return( 0 );
173}
@ MCGIDI_reactionType_nuclearIsomerTransmutation_e
Definition: MCGIDI.h:193
@ MCGIDI_reactionType_elastic_e
Definition: MCGIDI.h:189
@ MCGIDI_reactionType_scattering_e
Definition: MCGIDI.h:190
@ MCGIDI_reactionType_capture_e
Definition: MCGIDI.h:196
@ MCGIDI_reactionType_sumOfRemainingOutputChannels_e
Definition: MCGIDI.h:198
@ MCGIDI_reactionType_fission_e
Definition: MCGIDI.h:197
static int MCGIDI_reaction_setENDL_CSNumbers(statusMessageReporting *smr, MCGIDI_reaction *reaction)
static int MCGIDI_reaction_particleChanges(MCGIDI_POP *projectile, MCGIDI_POP *target, MCGIDI_productsInfo *productsInfo, int n1, int *particlesChanges)
#define nParticleChanges
int MCGIDI_reaction_getENDF_MTNumber(MCGIDI_reaction *reaction)
MCGIDI_POP * projectilePOP
Definition: MCGIDI.h:438
MCGIDI_POP * targetPOP
Definition: MCGIDI.h:439

References MCGIDI_reaction_s::finalQ, MCGIDI_reaction_getENDF_MTNumber(), MCGIDI_reaction_ParseDetermineReactionProducts(), MCGIDI_reaction_particleChanges(), MCGIDI_reaction_setENDL_CSNumbers(), MCGIDI_reactionType_capture_e, MCGIDI_reactionType_elastic_e, MCGIDI_reactionType_fission_e, MCGIDI_reactionType_nuclearIsomerTransmutation_e, MCGIDI_reactionType_scattering_e, MCGIDI_reactionType_sumOfRemainingOutputChannels_e, MCGIDI_reactionType_unknown_e, MT, nParticleChanges, MCGIDI_reaction_s::outputChannel, MCGIDI_reaction_s::productsInfo, MCGIDI_target_heated_s::projectilePOP, MCGIDI_reaction_s::reactionType, MCGIDI_reaction_s::target, and MCGIDI_target_heated_s::targetPOP.

Referenced by MCGIDI_reaction_parseFromTOM().

◆ MCGIDI_reaction_particleChanges()

static int MCGIDI_reaction_particleChanges ( MCGIDI_POP projectile,
MCGIDI_POP target,
MCGIDI_productsInfo productsInfo,
int  n1,
int *  particlesChanges 
)
static

Definition at line 177 of file MCGIDI_reaction.cc.

177 {
178
179 int projectileGlobalIndex = projectile->globalPoPsIndex, targetGlobalIndex = target->globalPoPsIndex, i1, i2 = 0;
180 int gammaIndex = PoPs_particleIndex( "gamma" );
181
182 if( projectileGlobalIndex != gammaIndex ) {
183 for( i1 = 0; i1 < productsInfo->numberOfProducts; i1++ ) if( projectileGlobalIndex == productsInfo->productInfo[i1].globalPoPsIndex ) break;
184 if( i1 == productsInfo->numberOfProducts ) particlesChanges[i2++] = projectileGlobalIndex;
185 }
186
187 for( i1 = 0; i1 < productsInfo->numberOfProducts; i1++ ) if( targetGlobalIndex == productsInfo->productInfo[i1].globalPoPsIndex ) break;
188 if( i1 == productsInfo->numberOfProducts ) particlesChanges[i2++] = targetGlobalIndex;
189
190 for( i1 = 0; i1 < productsInfo->numberOfProducts; i1++ ) {
191 if( i2 == n1 ) break;
192 if( /*(*/ projectileGlobalIndex == productsInfo->productInfo[i1].globalPoPsIndex /*)*/ ) continue;
193 if( /*(*/ targetGlobalIndex == productsInfo->productInfo[i1].globalPoPsIndex /*)*/ ) continue;
194 if( /*(*/ gammaIndex == productsInfo->productInfo[i1].globalPoPsIndex /*)*/ ) continue;
195 particlesChanges[i2++] = productsInfo->productInfo[i1].globalPoPsIndex;
196 }
197 return( i2 );
198}

References MCGIDI_POP_s::globalPoPsIndex, MCGIDI_productInfo_s::globalPoPsIndex, MCGIDI_productsInfo_s::numberOfProducts, PoPs_particleIndex(), and MCGIDI_productsInfo_s::productInfo.

Referenced by MCGIDI_reaction_ParseReactionTypeAndDetermineProducts().

◆ MCGIDI_reaction_recast()

int MCGIDI_reaction_recast ( statusMessageReporting smr,
MCGIDI_reaction reaction,
GIDI_settings settings,
GIDI_settings_particle const *  projectileSettings,
double  temperature_MeV,
ptwXPoints totalGroupedCrossSection 
)

Definition at line 496 of file MCGIDI_reaction.cc.

497 {
498
499 if( totalGroupedCrossSection != NULL ) {
500 nfu_status status_nf;
501 GIDI_settings_group group( projectileSettings->getGroup( ) );
502
503 if( reaction->crossSectionGrouped != NULL ) reaction->crossSectionGrouped = ptwX_free( reaction->crossSectionGrouped );
504 if( ( reaction->crossSectionGrouped = projectileSettings->groupFunction( smr, reaction->crossSection, temperature_MeV, 0 ) ) == NULL ) return( 1 );
505 if( ( status_nf = ptwX_add_ptwX( totalGroupedCrossSection, reaction->crossSectionGrouped ) ) != nfu_Okay ) return( 1 );
506
508 reaction->thresholdGroupIndex = group.getGroupIndexFromEnergy( reaction->EMin, false );
509 if( reaction->thresholdGroupIndex > -1 ) {
510 reaction->thresholdGroupDomain = group[reaction->thresholdGroupIndex+1] - reaction->EMin;
511 if( reaction->thresholdGroupDomain > 0 ) {
512 /* factor 2 for linear reject in bin but above threshold. */
514 ( 2 * ( group[reaction->thresholdGroupIndex+1] - group[reaction->thresholdGroupIndex] ) / reaction->thresholdGroupDomain - 1 );
515 }
516 }
517 }
518 return( 0 );
519}
enum nfu_status_e nfu_status
nfu_status ptwX_add_ptwX(ptwXPoints *ptwX1, ptwXPoints *ptwX2)
Definition: ptwX_core.cc:479
ptwXPoints * ptwX_free(ptwXPoints *ptwX)
Definition: ptwX_core.cc:158
double thresholdGroupDomain
Definition: MCGIDI.h:423

References MCGIDI_reaction_s::crossSection, MCGIDI_reaction_s::crossSectionGrouped, MCGIDI_reaction_s::EMin, GIDI_settings_particle::getGroup(), GIDI_settings_group::getGroupIndexFromEnergy(), GIDI_settings_particle::groupFunction(), nfu_Okay, ptwX_add_ptwX(), ptwX_free(), ptwX_getPointAtIndex(), MCGIDI_reaction_s::thresholdGroupDomain, MCGIDI_reaction_s::thresholdGroupedDeltaCrossSection, and MCGIDI_reaction_s::thresholdGroupIndex.

Referenced by MCGIDI_target_heated_recast().

◆ MCGIDI_reaction_release()

int MCGIDI_reaction_release ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)

Definition at line 69 of file MCGIDI_reaction.cc.

69 {
70
71 ptwXY_free( reaction->crossSection );
72 ptwX_free( reaction->crossSectionGrouped );
74 xDataTOMAL_release( &(reaction->attributes) );
75 smr_freeMemory( (void **) &(reaction->outputChannelStr) );
76 if( reaction->productsInfo.productInfo != NULL ) smr_freeMemory( (void **) &(reaction->productsInfo.productInfo) );
77 delete reaction->transportabilities;
78 MCGIDI_reaction_initialize2( smr, reaction );
79 return( 0 );
80}
int MCGIDI_outputChannel_release(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:574
void xDataTOMAL_release(xDataTOM_attributionList *attributes)
Definition: xDataTOM.cc:361

References MCGIDI_reaction_s::attributes, MCGIDI_reaction_s::crossSection, MCGIDI_reaction_s::crossSectionGrouped, MCGIDI_outputChannel_release(), MCGIDI_reaction_initialize2(), MCGIDI_reaction_s::outputChannel, MCGIDI_reaction_s::outputChannelStr, MCGIDI_productsInfo_s::productInfo, MCGIDI_reaction_s::productsInfo, ptwX_free(), ptwXY_free(), smr_freeMemory(), MCGIDI_reaction_s::transportabilities, and xDataTOMAL_release().

Referenced by MCGIDI_reaction_free(), MCGIDI_reaction_parseFromTOM(), and MCGIDI_target_heated_release().

◆ MCGIDI_reaction_setENDL_CSNumbers()

static int MCGIDI_reaction_setENDL_CSNumbers ( statusMessageReporting smr,
MCGIDI_reaction reaction 
)
static

Definition at line 430 of file MCGIDI_reaction.cc.

430 {
431
432 int MT = MCGIDI_reaction_getENDF_MTNumber( reaction );
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 };
448
449 reaction->ENDL_C = 0;
450 reaction->ENDL_S = 0;
451 if( MT <= 0 ) return( 1 );
452 if( MT > 891 ) return( 1 );
453 if( MT < 50 ) {
454 reaction->ENDL_C = MT1_50ToC[MT - 1]; }
455 else if( MT <= 91 ) {
456 reaction->ENDL_C = 11;
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 ) ) {
461 reaction->ENDL_C = 15;
462 if( MT == 455 ) reaction->ENDL_S = 7; }
463 else if( MT >= 600 ) {
464 if( MT < 650 ) {
465 reaction->ENDL_C = 40;
466 if( MT != 649 ) reaction->ENDL_S = 1; }
467 else if( MT < 700 ) {
468 reaction->ENDL_C = 41;
469 if( MT != 699 ) reaction->ENDL_S = 1; }
470 else if( MT < 750 ) {
471 reaction->ENDL_C = 42;
472 if( MT != 749 ) reaction->ENDL_S = 1; }
473 else if( MT < 800 ) {
474 reaction->ENDL_C = 44;
475 if( MT != 799 ) reaction->ENDL_S = 1; }
476 else if( MT < 850 ) {
477 reaction->ENDL_C = 45;
478 if( MT != 849 ) reaction->ENDL_S = 1; }
479 else if( ( MT >= 875 ) && ( MT <= 891 ) ) {
480 reaction->ENDL_C = 12;
481 if( MT != 891 ) reaction->ENDL_S = 1;
482 }
483 }
484 return( 0 );
485}

References MCGIDI_reaction_s::ENDL_C, MCGIDI_reaction_s::ENDL_S, MCGIDI_reaction_getENDF_MTNumber(), and MT.

Referenced by MCGIDI_reaction_ParseReactionTypeAndDetermineProducts().