38 #include "tpia_target.h"
39 #include "tpia_misc.h"
41 #if defined __cplusplus
51 memset( angular, 0,
sizeof( tpia_angular ) );
53 angular->binned.numberOfEs = 0;
54 angular->binned.energies = NULL;
63 angular->binned.energies = (tpia_EqualProbableBinSpectrum*)
xData_free( smr, angular->binned.energies );
64 angular->binned.numberOfEs = 0;
76 angular->binned.iValue = 0;
77 angular->binned.dValue = 0;
78 angular->binned.nBins = (int) nBins;
79 angular->binned.numberOfEs = (int) n;
87 int tpia_angular_SampleMu( statusMessageReporting *smr, tpia_angular *angular, tpia_decaySamplingInfo *decaySamplingInfo ) {
89 tpia_EqualProbableBinSpectra *binned = &(angular->binned);
90 int nBins = binned->nBins, status = 1;
96 if( binned->numberOfEs > 0 ) {
98 if( mu < -1. ) mu = -1.;
99 if( mu > 1. ) mu = 1.;
100 decaySamplingInfo->mu = mu;
107 #if defined __cplusplus
int tpia_angular_release(statusMessageReporting *smr, tpia_angular *angular)
int tpia_angular_SampleMu(statusMessageReporting *smr, tpia_angular *angular, tpia_decaySamplingInfo *decaySamplingInfo)
tpia_EqualProbableBinSpectrum * tpia_misc_getEqualProbableBin(statusMessageReporting *smr, xData_element *parent, xData_Int *n, xData_Int *nBins)
int tpia_angular_getFromElement(statusMessageReporting *smr, xData_element *angularElement, tpia_angular *angular)
int tpia_frame_setFromString(statusMessageReporting *smr, const char *forItem, const char *value, int dimension, tpia_data_frame *frame)
int tpia_angular_initialize(statusMessageReporting *smr, tpia_angular *angular)
int tpia_frame_setFromElement(statusMessageReporting *smr, xData_element *element, int dimension, tpia_data_frame *frame)
void * xData_free(statusMessageReporting *, void *p)
int tpia_misc_sampleEqualProbableBin(statusMessageReporting *, tpia_decaySamplingInfo *decaySamplingInfo, double e_in, int nBins, tpia_EqualProbableBinSpectra *binned, double *value_)