202 int i1, multiplicity, secondTwoBody = 0, isDecayChannel = ( outputChannel->
reaction == NULL );
205 double phi,
p, masses[3];
209 if( isDecayChannel ) {
210 masses[0] = masses_[0];
211 masses[1] = masses_[1]; }
218 product = &(outputChannel->
products[i1]);
224 if( !secondTwoBody ) {
226 decaySamplingInfo->
rng( decaySamplingInfo->
rngState ) );
227 while( multiplicity > 0 ) {
230 decaySamplingInfo->
pop = product->
pop;
231 decaySamplingInfo->
mu = 0;
232 decaySamplingInfo->
Ep = 0;
234 productData[0].
pop = product->
pop;
242 switch( outputChannel->
genre ) {
247 phi = 2. *
M_PI * decaySamplingInfo->
rng( decaySamplingInfo->
rngState );
249 if( !
smr_isOk( smr ) )
return( -1 );
250 productData[1].
pop = product[1].
pop;
255 if( !
smr_isOk( smr ) )
return( -1 );
257 if( !
smr_isOk( smr ) )
return( -1 );
263 switch( distribution->
type ) {
277 printf(
"Unknown spectral data form product name = %s, channel genre = %d\n", product->
pop->
name, outputChannel->
genre );
282 printf(
"Channel is undefined\n" );
284 printf(
"Channel is twoBodyDecay\n" );
286 printf(
"Channel is uncorrelatedDecay\n" );
288 printf(
"Unsupported channel genre = %d\n", outputChannel->
genre );
290 if( !
smr_isOk( smr ) )
return( -1 );
291 if( !secondTwoBody ) {
296 p = std::sqrt( decaySamplingInfo->
Ep * ( decaySamplingInfo->
Ep + 2. * product->
pop->
mass_MeV ) );
298 productData[0].
pz_vz = p * decaySamplingInfo->
mu;
299 p = std::sqrt( 1. - decaySamplingInfo->
mu * decaySamplingInfo->
mu ) *
p;
300 phi = 2. *
M_PI * decaySamplingInfo->
rng( decaySamplingInfo->
rngState );
301 productData[0].
px_vx = p * std::sin( phi );
302 productData[0].
py_vy = p * std::cos( phi );
304 if( !
smr_isOk( smr ) )
return( -1 );
#define MCGIDI_speedOfLight_cm_sec
int MCGIDI_product_sampleMultiplicity(statusMessageReporting *smr, MCGIDI_product *product, double e_in, double r)
int MCGIDI_angularEnergy_sampleDistribution(statusMessageReporting *smr, MCGIDI_angularEnergy *angularEnergy, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
int MCGIDI_sampledProducts_addProduct(statusMessageReporting *smr, MCGIDI_sampledProductsDatas *sampledProductsDatas, MCGIDI_sampledProductsData *sampledProductsData)
double MCGIDI_product_getMass_MeV(statusMessageReporting *smr, MCGIDI_product *product)
double delayedNeutronRate
int MCGIDI_energyAngular_sampleDistribution(statusMessageReporting *smr, MCGIDI_distribution *distribution, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
int MCGIDI_uncorrelated_sampleDistribution(statusMessageReporting *smr, MCGIDI_distribution *distribution, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
int MCGIDI_angular_sampleMu(statusMessageReporting *smr, MCGIDI_angular *angular, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)
double MCGIDI_reaction_getProjectileMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int smr_isOk(statusMessageReporting *smr)
double delayedNeutronRate
G4double G4Log(G4double x)
enum MCGIDI_distributionType type
enum MCGIDI_channelGenre genre
MCGIDI_KalbachMann * KalbachMann
int MCGIDI_kinetics_COM2Lab(statusMessageReporting *smr, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, double masses[3])
enum xDataTOM_frame frame
int MCGIDI_kinetics_2BodyReaction(statusMessageReporting *smr, MCGIDI_angular *angular, double K, double mu, double phi, MCGIDI_sampledProductsData *outgoingData)
MCGIDI_outputChannel decayChannel
MCGIDI_distribution distribution
double MCGIDI_reaction_getTargetMass_MeV(statusMessageReporting *smr, MCGIDI_reaction *reaction)
int MCGIDI_outputChannel_sampleProductsAtE(statusMessageReporting *smr, MCGIDI_outputChannel *outputChannel, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo, MCGIDI_sampledProductsDatas *productDatas, double *masses)
MCGIDI_product * products
double getProjectileEnergy(void) const
MCGIDI_angularEnergy * angularEnergy
MCGIDI_reaction * reaction
int MCGIDI_KalbachMann_sampleEp(statusMessageReporting *smr, MCGIDI_KalbachMann *KalbachMann, MCGIDI_quantitiesLookupModes &modes, MCGIDI_decaySamplingInfo *decaySamplingInfo)