41#if defined __cplusplus
99 for( i = 0, mus = angularEnergy->
binned.
energies; i < list->n; i++, mus++ ) {
141 double Ep, Ep1, Ep2, f, e_in = decaySamplingInfo->
e_in;
149 for( iE2 = 0; iE2 < angularEnergy->
binned.
numberOfEs; iE2++ )
if( energies[iE2].dValue >= e_in )
break;
162 f = ( energies[iE2].
dValue - e_in ) / ( energies[iE2].dValue - energies[iE1].dValue );
163 Ep = f * Ep1 + ( 1 - f ) * Ep2;
165 decaySamplingInfo->
Ep = Ep;
170#if defined __cplusplus
int smr_isOk(statusMessageReporting *smr)
tpia_EqualProbableBinSpectrum * energies
tpia_EqualProbableBinSpectra * energies
tpia_angularEnergyBin binned
xData_elementListItem * items
int tpia_misc_setMessageError_Element(statusMessageReporting *smr, void *userInterface, xData_element *element, const char *file, int line, int code, const char *fmt,...)
tpia_EqualProbableBinSpectrum * tpia_misc_getEqualProbableBins(statusMessageReporting *smr, xData_element *parent, const char *name, xData_Int nBins, xData_Int *n)
int tpia_frame_setFromElement(statusMessageReporting *smr, xData_element *element, int dimension, tpia_data_frame *frame)
struct tpia_EqualProbableBinSpectra_s tpia_EqualProbableBinSpectra
int tpia_angularEnergy_release(statusMessageReporting *smr, tpia_angularEnergy *angularEnergy)
int tpia_angularEnergy_getFromElement(statusMessageReporting *smr, xData_element *angularEnergyElement, tpia_angularEnergy *angularEnergy)
int tpia_misc_sampleEqualProbableBin(statusMessageReporting *smr, tpia_decaySamplingInfo *decaySamplingInfo, double e_in, int nBins, tpia_EqualProbableBinSpectra *binned, double *value_)
int tpia_frame_setFromString(statusMessageReporting *smr, const char *forItem, const char *value, int dimension, tpia_data_frame *frame)
int tpia_angularEnergy_initialize(statusMessageReporting *smr, tpia_angularEnergy *angularEnergy)
int tpia_angularEnergy_SampleEp(statusMessageReporting *smr, tpia_angularEnergy *angularEnergy, tpia_decaySamplingInfo *decaySamplingInfo)
int xData_convertAttributeToDouble(statusMessageReporting *smr, xData_element *element, const char *name, double *d)
void * xData_free(statusMessageReporting *smr, void *p)
void xData_freeElementList(statusMessageReporting *smr, xData_elementList *list)
xData_elementList * xData_getElementsByTagNameAndSort(statusMessageReporting *smr, xData_element *element, const char *tagName, const char *sortAttributeName, xData_sortElementFunc sortFunction)
xData_element * xData_getOneElementByTagName(statusMessageReporting *smr, xData_element *element, char *name, int required)
int xData_addToAccessed(statusMessageReporting *smr, xData_element *element, int increment)
xData_Int xData_convertAttributeTo_xData_Int(statusMessageReporting *smr, xData_element *element, const char *name, xData_Int *n)
#define xData_malloc2(smr, size, zero, forItem)