11#if defined __cplusplus
26 return( energyAngular );
67 char const *nativeData;
72 if( strcmp( nativeData,
"KalbachMann" ) == 0 ) {
74 else if( strcmp( nativeData,
"linear" ) == 0 ) {
75 return( MCGIDI_energyAngular_linear_parseFromTOM( smr, energyAngularElement, distribution ) ); }
92 double y, norm, energyInFactor, energyOutFactor;
93 char const *energyUnit, *multiplicityProbabilityUnits[2] = {
"",
"1/MeV" };
118 if( ( pdfOfEpGivenE->
Ws = (
double *)
smr_malloc2( smr, V_W_XYs->
length *
sizeof(
double ), 1,
"pdfOfEpGivenE->Ws" ) ) == NULL )
goto err;
132 for( iV = 0; iV < V_W_XYs->
length; iV++ ) {
133 W_XYs = &(V_W_XYs->
W_XYs[iV]);
134 pdfOfMuGivenEAndEp2 = &(pdfOfMuGivenEAndEp[iV]);
135 pdfOfMuGivenEAndEp2->interpolationWY = interpolationWY;
136 pdfOfMuGivenEAndEp2->interpolationXY = interpolationXY;
137 if( ( pdfXY2 =
ptwXY_new( interpolationWY, NULL, 2., 1e-6, W_XYs->
length, 10, &status, 0 ) ) == NULL )
goto errA;
138 if( ( pdfOfMuGivenEAndEp2->Ws = (
double *)
smr_malloc2( smr, W_XYs->
length *
sizeof(
double ), 1,
"pdfOfMuGivenEAndEp2->Ws" ) ) == NULL )
goto err;
140 for( iW = 0; iW < W_XYs->
length; iW++ ) {
141 XYs = &(W_XYs->
XYs[iW]);
150 pdfOfMuGivenEAndEp2->Ws[iW] = energyOutFactor * XYs->
value;
152 pdfOfMuGivenEAndEp2->numberOfWs++;
156 pdfOfEpGivenE->
Ws[iV] = energyInFactor * W_XYs->
value;
187 Ep = decaySamplingInfo->
mu;
188 decaySamplingInfo->
mu = decaySamplingInfo->
Ep;
189 decaySamplingInfo->
Ep = Ep;
190 decaySamplingInfo->
frame = energyAngular->
frame;
195#if defined __cplusplus
MCGIDI_energyAngular * MCGIDI_energyAngular_free(statusMessageReporting *smr, MCGIDI_energyAngular *energyAngular)
int MCGIDI_sampling_pdfsOfXGivenW_release(statusMessageReporting *smr, MCGIDI_pdfsOfXGivenW *dists)
@ MCGIDI_distributionType_energyAngular_e
int MCGIDI_sampling_doubleDistribution(statusMessageReporting *smr, MCGIDI_pdfsOfXGivenW *pdfOfWGivenV, MCGIDI_pdfsOfXGivenW *pdfOfXGivenVAndW, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
int MCGIDI_energyAngular_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_distribution *distribution)
int MCGIDI_KalbachMann_parseFromTOM(statusMessageReporting *smr, xDataTOM_element *element, MCGIDI_distribution *distribution)
int MCGIDI_energyAngular_release(statusMessageReporting *smr, MCGIDI_energyAngular *energyAngular)
int MCGIDI_energyAngular_initialize(statusMessageReporting *smr, MCGIDI_energyAngular *energyAngular)
int MCGIDI_energyAngular_sampleDistribution(statusMessageReporting *smr, MCGIDI_distribution *distribution, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
MCGIDI_energyAngular * MCGIDI_energyAngular_new(statusMessageReporting *smr)
int MCGIDI_fromTOM_interpolation(statusMessageReporting *smr, xDataTOM_element *element, int index, enum ptwXY_interpolation_e *interpolation)
int MCGIDI_fromTOM_pdfOfX(statusMessageReporting *smr, ptwXYPoints *pdfXY, MCGIDI_pdfOfX *dist, double *norm)
ptwXYPoints * MCGIDI_misc_dataFromXYs2ptwXYPointsInUnitsOf(statusMessageReporting *smr, xDataTOM_XYs *XYs, ptwXY_interpolation interpolation, char const *units[2])
double MCGIDI_misc_getUnitConversionFactor(statusMessageReporting *smr, char const *fromUnit, char const *toUnit)
enum xDataTOM_frame MCGIDI_misc_getProductFrame(statusMessageReporting *smr, xDataTOM_element *frameElement)
enum nfu_status_e nfu_status
const char * nfu_statusMessage(nfu_status status)
nfu_status ptwXY_setValueAtX(ptwXYPoints *ptwXY, double x, double y)
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)
enum ptwXY_interpolation_e ptwXY_interpolation
nfu_status ptwXY_add_double(ptwXYPoints *ptwXY, double value)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
double ptwXY_integrateDomain(ptwXYPoints *ptwXY, nfu_status *status)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
void * smr_freeMemory(void **p)
int smr_isOk(statusMessageReporting *smr)
#define smr_malloc2(smr, size, zero, forItem)
enum xDataTOM_frame frame
enum MCGIDI_distributionType type
MCGIDI_energyAngular * energyAngular
enum xDataTOM_frame frame
MCGIDI_pdfsOfXGivenW * pdfOfMuGivenEAndEp
MCGIDI_pdfsOfXGivenW pdfOfEpGivenE
ptwXY_interpolation interpolationXY
ptwXY_interpolation interpolationWY
xDataTOM_element * xDataTOME_getOneElementByName(statusMessageReporting *smr, xDataTOM_element *element, char const *name, int required)
char const * xDataTOM_getAttributesValueInElement(xDataTOM_element *element, char const *name)
char const * xDataTOM_subAxes_getUnit(statusMessageReporting *smr, xDataTOM_subAxes *subAxes, int index)
void * xDataTOME_getXDataIfID(statusMessageReporting *smr, xDataTOM_element *TE, char const *ID)