12 #if defined __cplusplus
85 char const *
name, *label, *delayedNeutron, *multiplicityStr, *multiplicityUnits[2] = {
"MeV",
"" };
88 ptwXYPoints *multiplicityVsEnergy = NULL, *norms1 = NULL, *norms2 = NULL;
103 if( strcmp( delayedNeutron,
"delayed" ) == 0 ) {
109 (*delayedNeutronIndex)++;
115 if( strcmp( multiplicityStr,
"energyDependent" ) ) {
133 if( strcmp( product->
pop->
name,
"gamma" ) == 0 ) {
140 if( norms2 != NULL ) {
148 if( ( norms1 != NULL ) && ( norms2 != NULL ) ) {
154 product->
norms = norms1;
155 if( norms2 != NULL ) product->
norms = norms2;
164 if( multiplicityVsEnergy != NULL )
ptwXY_free( multiplicityVsEnergy );
179 char const *multiplicityUnits[2] = {
"MeV",
"" };
181 if( ( product->piecewiseMultiplicities = (
ptwXYPoints **)
smr_malloc2( smr, regionsXYs->length *
sizeof(
ptwXYPoints * ), 1,
"piecewiseMultiplicities" ) ) == NULL )
return( 1 );
183 for( i = 0; i < regionsXYs->length; i++ ) {
185 XYs = &(regionsXYs->XYs[i]);
187 ) == NULL )
return( 1 );
188 product->piecewiseMultiplicities[i] = multiplicityVsEnergy;
189 product->numberOfPiecewiseMultiplicities++;
200 double *coefficients;
201 char const *energyUnit;
224 int i,
n = 4 * length;
225 double E = EMin,
dE = ( EMax - EMin ) / n;
227 for( i = 1; i <
n; i++ ) {
257 char const *link, *energyInMWUnits[2] = {
"MeV",
"" };
258 xDataTOM_element *reference, *productTOM, *multiplicity, *weights, *pointwise;
275 if( *multiplicityVsEnergy != NULL ) *multiplicityVsEnergy =
ptwXY_free( *multiplicityVsEnergy );
276 if( *norms != NULL ) *norms =
ptwXY_free( *norms );
290 double productMass_MeV,
double residualMass_MeV ) {
328 double y,
norm = 1.0;
340 multiplicity = (
int) y;
341 if( r < ( y - multiplicity ) ) multiplicity++;
343 return( multiplicity );
364 if( incrementSize < 10 ) incrementSize = 10;
368 sampledProductsDatas->
products = NULL;
419 if( index < 0 )
return( NULL );
421 return( &(sampledProductsDatas->
products[index]) );
424 #if defined __cplusplus
int MCGIDI_sampledProducts_release(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas)
int MCGIDI_outputChannel_getDomain(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, double *EMin, double *EMax)
ptwXYPoints ** piecewiseMultiplicities
ptwXYPoints * ptwXY_new(ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, nfu_status *status, int userFlag)
MCGIDI_product * MCGIDI_product_free(statusMessageReporting *smr, MCGIDI_product *product)
MCGIDI_target_heated * MCGIDI_product_getTargetHeated(statusMessageReporting *smr, MCGIDI_product *product)
double MCGIDI_misc_getUnitConversionFactor(statusMessageReporting *smr, char const *fromUnit, char const *toUnit)
int MCGIDI_sampledProducts_addProduct(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, MCGIDI_sampledProductsData *sampledProductsData)
double MCGIDI_product_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_product *product)
#define smr_allocateCopyString2(smr, s, forItem)
#define smr_realloc2(smr, old, size, forItem)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
int64_t ptwXY_length(ptwXYPoints *ptwXY)
int MCGIDI_product_getDomain(statusMessageReporting *smr, MCGIDI_product *product, double *EMin, double *EMax)
MCGIDI_sampledProductsData * MCGIDI_sampledProducts_getProductAtIndex(MCGIDI_sampledProductsDatas *sampledProductsDatas, int index)
MCGIDI_outputChannel * outputChannel
double ptwXY_getXMax(ptwXYPoints *ptwXY)
ptwXYPoints * multiplicityVsEnergy
ptwXYPoints * MCGIDI_misc_dataFromXYs2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_XYs *XYs, ptwXY_interpolation interpolation, char const *units[2])
MCGIDI_sampledProductsData * products
int MCGIDI_angular_sampleMu(statusMessageReporting *smr, MCGIDI_angular *angular, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
double MCGIDI_outputChannel_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
int MCGIDI_misc_PQUStringToDoubleInUnitOf(statusMessageReporting *smr, char const *str, char const *toUnit, double *value)
enum MCGIDI_distributionType type
int MCGIDI_product_initialize(statusMessageReporting *smr, MCGIDI_product *product)
xDataTOM_xDataInfo xDataInfo
MCGIDI_product * MCGIDI_product_new(statusMessageReporting *smr)
MCGIDI_outputChannel decayChannel
#define smr_malloc2(smr, size, zero, forItem)
int MCGIDI_product_release(statusMessageReporting *smr, MCGIDI_product *product)
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
int MCGIDI_product_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_outputChannel *outputChannel, MCGIDI_POPs *pops, MCGIDI_product *product, int *delayedNeutronIndex)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
ptwXYPoints * MCGIDI_misc_dataFromElement2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_element *linear, char const *toUnits[2])
const XML_Char int const XML_Char * value
static int MCGIDI_product_parsePiecewiseMultiplicity(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product)
double MCGIDI_sampling_ptwXY_getValueAtX(ptwXYPoints *ptwXY, double x1)
int smr_isOk(statusMessageReporting *smr)
int MCGIDI_outputChannel_release(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
int MCGIDI_product_sampleMu(statusMessageReporting *smr, MCGIDI_product *product, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
xDataTOM_element * xDataTOM_getLinksElement(statusMessageReporting *smr, xDataTOM_element *element, char const *link)
int MCGIDI_distribution_release(statusMessageReporting *smr, MCGIDI_distribution *distribution)
double delayedNeutronRate
int MCGIDI_angular_setTwoBodyMasses(statusMessageReporting *smr, MCGIDI_angular *angular, double projectileMass_MeV, double targetMass_MeV, double productMass_MeV, double residualMass_MeV)
enum nfu_status_e nfu_status
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
static double MCGIDI_product_evaluatePolynomial(double x, polynomialCallbackArgs *args)
struct polynomialCallbackArgs_s polynomialCallbackArgs
int MCGIDI_outputChannel_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_POPs *pops, MCGIDI_outputChannel *outputChannel, MCGIDI_reaction *reaction, MCGIDI_product *parent)
double MCGIDI_product_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_product *product)
#define smr_setReportError2p(smr, libraryID, code, fmt)
int MCGIDI_sampledProducts_remalloc(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas)
int numberOfPiecewiseMultiplicities
int xDataTOM_polynomial_getDataFromXDataInfo(xDataTOM_xDataInfo *xDI, double **data)
void * smr_freeMemory(void **p)
int MCGIDI_product_setTwoBodyMasses(statusMessageReporting *smr, MCGIDI_product *product, double projectileMass_MeV, double targetMass_MeV, double productMass_MeV, double residualMass_MeV)
int xDataTOME_convertAttributeToInteger(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int *n)
MCGIDI_POP * MCGIDI_POPs_findParticle(MCGIDI_POPs *pops, char const *name)
static ptwXYPoints * MCGIDI_product_parsePolynomialMultiplicity(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product)
int MCGIDI_product_sampleMultiplicity(statusMessageReporting *smr, MCGIDI_product *product, double e_in, double r)
MCGIDI_target_heated * MCGIDI_outputChannel_getTargetHeated(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
double ptwXY_getYMin(ptwXYPoints *ptwXY)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
double ptwXY_getYMax(ptwXYPoints *ptwXY)
nfu_status ptwXY_simpleCoalescePoints(ptwXYPoints *ptwXY)
double MCGIDI_POP_getMass_MeV(MCGIDI_POP *pop)
int MCGIDI_distribution_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product, MCGIDI_POPs *pops, ptwXYPoints *norms)
static int MCGIDI_product_parseWeightedReferenceMultiplicityFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_product *product, ptwXYPoints **multiplicityVsEnergy, ptwXYPoints **norms)
int MCGIDI_sampledProducts_number(MCGIDI_sampledProductsDatas *sampledProductsDatas)
const char * nfu_statusMessage(nfu_status status)
double MCGIDI_outputChannel_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel)
nfu_status ptwXY_setValueAtX(ptwXYPoints *ptwXY, double x, double y)
MCGIDI_distribution distribution
double MCGIDI_product_getMass_MeV(statusMessageReporting *smr, MCGIDI_product *product)
int MCGIDI_sampledProducts_initialize(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, int incrementSize)
char const * xDataTOM_axes_getUnit(statusMessageReporting *smr, xDataTOM_axes *axes, int index)