38    #define _USE_MATH_DEFINES 
   43 #if defined __cplusplus 
   60     return( product->
next );
 
   72     if( nProductData < decayChannel->numberOfProducts ) {
 
   73         smr_setMessageError( smr, NULL, __FILE__, __LINE__, 1, 
"nProductData = %d < decayChannel->numberOfProducts = %d", nProductData,
 
   79         if( !secondTwoBody ) {
 
   82             while( multiplicity > 0 ) {
 
   83                 if( n >= nProductData ) 
break;          
 
   85                 decaySamplingInfo->
genre = product->genre;
 
   86                 decaySamplingInfo->
productID = product->productID;
 
   87                 decaySamplingInfo->
mu = 0;
 
   88                 decaySamplingInfo->
Ep = 0;
 
   89                 productDatas[
n].
genre = product->genre;
 
   92                 productDatas[
n].
productID = product->productID;
 
   94                 if( strcmp( product->genre, 
"twoBody_angular" ) == 0 ) {
 
   97                     productDatas[
n].
genre = product->genre;
 
  105                 else if( strcmp( product->genre, 
"NBody_Legendre" ) == 0 ) {
 
  107                 else if( strcmp( product->genre, 
"NBody_angular_energy" ) == 0 ) {
 
  110                 else if( strcmp( product->genre, 
"NBody_uncorrelate_Legendre" ) == 0 ) {
 
  113                 else if( strcmp( product->genre, 
"unknown" ) == 0 ) {
 
  116                     printf( 
"Unknown spectral data form product name = %s, genre = %s\n", product->productID->name, product->genre );
 
  118                 if( !
smr_isOk( smr ) ) 
return( -1 );
 
  119                 if( secondTwoBody ) {
 
  125                     p = std::sqrt( decaySamplingInfo->
Ep * ( decaySamplingInfo->
Ep + 2. * product->productID->fullMass_MeV ) );
 
  126                     productDatas[
n].
pz_vz = p * decaySamplingInfo->
mu;
 
  127                     p = std::sqrt( 1. - decaySamplingInfo->
mu * decaySamplingInfo->
mu ) * 
p;
 
  129                     productDatas[
n].
px_vx = p * std::sin( phi );
 
  130                     productDatas[
n].
py_vy = p * std::cos( phi );
 
  139 #if defined __cplusplus 
int tpia_angular_SampleMu(statusMessageReporting *smr, tpia_angular *angular, tpia_decaySamplingInfo *decaySamplingInfo)
 
double tpia_misc_drng(double(*rng)(void *), void *rngState)
 
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
 
tpia_particle * productID
 
int tpia_kinetics_2BodyReaction(statusMessageReporting *smr, tpia_decayChannel *decayChannel, double K, double mu, double phi, tpia_productOutgoingData *outgoingData)
 
int tpia_Legendre_SampleEp(statusMessageReporting *smr, tpia_Legendre *Legendre, int sampleMu, tpia_decaySamplingInfo *decaySamplingInfo)
 
int tpia_decayChannel_sampleProductsAtE(statusMessageReporting *smr, tpia_decayChannel *decayChannel, tpia_decaySamplingInfo *decaySamplingInfo, int nProductData, tpia_productOutgoingData *productData)
 
int smr_isOk(statusMessageReporting *smr)
 
#define tpia_referenceFrame_lab
 
int tpia_frame_setColumns(statusMessageReporting *smr, tpia_data_frame *frame, int nColumns, int *values)
 
tpia_particle * productID
 
int tpia_angularEnergy_SampleEp(statusMessageReporting *smr, tpia_angularEnergy *angularEnergy, tpia_decaySamplingInfo *decaySamplingInfo)
 
tpia_decayChannel * decayChannel
 
printf("%d Experimental points found\n", nlines)
 
int tpia_product_sampleMultiplicity(statusMessageReporting *smr, tpia_product *product, double e_in, double r)
 
tpia_product * tpia_decayChannel_getFirstProduct(tpia_decayChannel *decayChannel)
 
tpia_particle * productID
 
tpia_product * tpia_decayChannel_getNextProduct(tpia_product *product)