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