Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -126,7 +126,8 @@ namespace G4INCL {
: InteractionAvatar(time, n, p1, p2), theCrossSection(crossSection),
isParticle1Spectator(false),
isParticle2Spectator(false),
isElastic(false)
isElastic(false),
isStrangeProduction(false)
{
setType(CollisionAvatarType);
}
@@ -181,17 +182,24 @@ namespace G4INCL {
return NULL;
}
/** Bias apply for this reaction in order to get the same
* ParticleBias for all stange particles.
* Can be reduced after because of the watchdog.
*/
G4double bias_apply = 1.;
if(bias != 1.) bias_apply = Particle::getBiasFromVector(Particle::MergeVectorBias(particle1,particle2)) * bias;
//// NN
if(particle1->isNucleon() && particle2->isNucleon()) {
G4double NLKProductionCX = CrossSections::NNToNLK(particle1, particle2)*bias;
G4double NSKProductionCX = CrossSections::NNToNSK(particle1, particle2)*bias;
G4double NLKpiProductionCX = CrossSections::NNToNLKpi(particle1, particle2)*bias;
G4double NSKpiProductionCX = CrossSections::NNToNSKpi(particle1, particle2)*bias;
G4double NLK2piProductionCX = CrossSections::NNToNLK2pi(particle1, particle2)*bias;
G4double NSK2piProductionCX = CrossSections::NNToNSK2pi(particle1, particle2)*bias;
G4double NNKKbProductionCX = CrossSections::NNToNNKKb(particle1, particle2)*bias;
G4double NNMissingCX = CrossSections::NNToMissingStrangeness(particle1, particle2)*bias;
G4double NLKProductionCX = CrossSections::NNToNLK(particle1, particle2)*bias_apply;
G4double NSKProductionCX = CrossSections::NNToNSK(particle1, particle2)*bias_apply;
G4double NLKpiProductionCX = CrossSections::NNToNLKpi(particle1, particle2)*bias_apply;
G4double NSKpiProductionCX = CrossSections::NNToNSKpi(particle1, particle2)*bias_apply;
G4double NLK2piProductionCX = CrossSections::NNToNLK2pi(particle1, particle2)*bias_apply;
G4double NSK2piProductionCX = CrossSections::NNToNSK2pi(particle1, particle2)*bias_apply;
G4double NNKKbProductionCX = CrossSections::NNToNNKKb(particle1, particle2)*bias_apply;
G4double NNMissingCX = CrossSections::NNToMissingStrangeness(particle1, particle2)*bias_apply;
const G4double UnStrangeProdCX = CrossSections::elastic(particle1, particle2) + CrossSections::NNToNDelta(particle1, particle2) + CrossSections::NNToxPiNN(1,particle1, particle2)
+ CrossSections::NNToxPiNN(2,particle1, particle2) + CrossSections::NNToxPiNN(3,particle1, particle2) + CrossSections::NNToxPiNN(4,particle1, particle2)
@@ -199,21 +207,21 @@ namespace G4INCL {
+ CrossSections::NNToNNEtaxPi(2,particle1, particle2) + CrossSections::NNToNNEtaxPi(3,particle1, particle2) + CrossSections::NNToNNEtaxPi(4,particle1, particle2)
+ CrossSections::NNToNNOmegaExclu(particle1, particle2) + CrossSections::NNToNDeltaOmega(particle1, particle2) + CrossSections::NNToNNOmegaxPi(1,particle1, particle2)
+ CrossSections::NNToNNOmegaxPi(2,particle1, particle2) + CrossSections::NNToNNOmegaxPi(3,particle1, particle2) + CrossSections::NNToNNOmegaxPi(4,particle1, particle2);
const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + NLKpiProductionCX + NSKpiProductionCX + NLK2piProductionCX + NSK2piProductionCX + NNKKbProductionCX + NNMissingCX)/bias;
const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + NLKpiProductionCX + NSKpiProductionCX + NLK2piProductionCX + NSK2piProductionCX + NNKKbProductionCX + NNMissingCX)/bias_apply;
G4double counterweight = (1. - bias * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
G4double limit_bias = bias;
G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
if(counterweight < 0.5) {
counterweight = 0.5;
limit_bias = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
NLKProductionCX = CrossSections::NNToNLK(particle1, particle2)*limit_bias;
NSKProductionCX = CrossSections::NNToNSK(particle1, particle2)*limit_bias;
NLKpiProductionCX = CrossSections::NNToNLKpi(particle1, particle2)*limit_bias;
NSKpiProductionCX = CrossSections::NNToNSKpi(particle1, particle2)*limit_bias;
NLK2piProductionCX = CrossSections::NNToNLK2pi(particle1, particle2)*limit_bias;
NSK2piProductionCX = CrossSections::NNToNSK2pi(particle1, particle2)*limit_bias;
NNKKbProductionCX = CrossSections::NNToNNKKb(particle1, particle2)*limit_bias;
NNMissingCX = CrossSections::NNToMissingStrangeness(particle1, particle2)*limit_bias;
bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
NLKProductionCX = CrossSections::NNToNLK(particle1, particle2)*bias_apply;
NSKProductionCX = CrossSections::NNToNSK(particle1, particle2)*bias_apply;
NLKpiProductionCX = CrossSections::NNToNLKpi(particle1, particle2)*bias_apply;
NSKpiProductionCX = CrossSections::NNToNSKpi(particle1, particle2)*bias_apply;
NLK2piProductionCX = CrossSections::NNToNLK2pi(particle1, particle2)*bias_apply;
NSK2piProductionCX = CrossSections::NNToNSK2pi(particle1, particle2)*bias_apply;
NNKKbProductionCX = CrossSections::NNToNNKKb(particle1, particle2)*bias_apply;
NNMissingCX = CrossSections::NNToMissingStrangeness(particle1, particle2)*bias_apply;
}
@@ -374,114 +382,130 @@ namespace G4INCL {
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NLK channel is chosen
INCL_DEBUG("NN interaction: NLK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNLKChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NLKpi channel is chosen
INCL_DEBUG("NN interaction: NLKpi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNLKpiChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NLK2pi channel is chosen
INCL_DEBUG("NN interaction: NLK2pi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNLK2piChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NSK channel is chosen
INCL_DEBUG("NN interaction: NSK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNSKChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NSKpi channel is chosen
INCL_DEBUG("NN interaction: NSKpi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNSKpiChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NSK2pi channel is chosen
INCL_DEBUG("NN interaction: NSK2pi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNSK2piChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX + NNKKbProductionCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> NNKKb channel is chosen
INCL_DEBUG("NN interaction: NNKKb channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToNNKKbChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + fourPiProductionCX
+ etaProductionCX + etadeltaProductionCX + etaonePiProductionCX + etatwoPiProductionCX + etathreePiProductionCX + etafourPiProductionCX
+ omegaProductionCX + omegadeltaProductionCX + omegaonePiProductionCX + omegatwoPiProductionCX + omegathreePiProductionCX + omegafourPiProductionCX
+ NLKProductionCX + NLKpiProductionCX + NLK2piProductionCX + NSKProductionCX + NSKpiProductionCX + NSK2piProductionCX + NNKKbProductionCX + NNMissingCX> rChannel) {
isElastic = false;
isStrangeProduction = true;
// NN -> Missing Strangeness channel is chosen
INCL_DEBUG("NN interaction: Missing Strangeness channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NNToMissingStrangenessChannel(particle1, particle2);
} else {
INCL_WARN("inconsistency within the NN Cross Sections (sum!=inelastic)" << '\n');
if(NNMissingCX>0.) {
INCL_WARN("Returning an Missing Strangeness channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNNKKbChannel(particle1, particle2);
} else if(NNKKbProductionCX>0.) {
INCL_WARN("Returning an NNKKb channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNNKKbChannel(particle1, particle2);
} else if(NSK2piProductionCX>0.) {
INCL_WARN("Returning an NSK2pi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNSK2piChannel(particle1, particle2);
} else if(NSKpiProductionCX>0.) {
INCL_WARN("Returning an NSKpi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNSKpiChannel(particle1, particle2);
} else if(NSKProductionCX>0.) {
INCL_WARN("Returning an NSK channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNSKChannel(particle1, particle2);
} else if(NLK2piProductionCX>0.) {
INCL_WARN("Returning an NLK2pi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNLK2piChannel(particle1, particle2);
} else if(NLKpiProductionCX>0.) {
INCL_WARN("Returning an NLKpi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNLKpiChannel(particle1, particle2);
} else if(NLKProductionCX>0.) {
INCL_WARN("Returning an NLK channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NNToNLKChannel(particle1, particle2);
} else if(omegafourPiProductionCX>0.) {
INCL_WARN("Returning an Omega + four Pions channel" << '\n');
@@ -581,26 +605,26 @@ namespace G4INCL {
else if((particle1->isNucleon() && particle2->isDelta()) ||
(particle1->isDelta() && particle2->isNucleon())) {
G4double NLKProductionCX = CrossSections::NDeltaToNLK(particle1, particle2)*bias;
G4double NSKProductionCX = CrossSections::NDeltaToNSK(particle1, particle2)*bias;
G4double DeltaLKProductionCX = CrossSections::NDeltaToDeltaLK(particle1, particle2)*bias;
G4double DeltaSKProductionCX = CrossSections::NDeltaToDeltaSK(particle1, particle2)*bias;
G4double NNKKbProductionCX = CrossSections::NDeltaToNNKKb(particle1, particle2)*bias;
G4double NLKProductionCX = CrossSections::NDeltaToNLK(particle1, particle2)*bias_apply;
G4double NSKProductionCX = CrossSections::NDeltaToNSK(particle1, particle2)*bias_apply;
G4double DeltaLKProductionCX = CrossSections::NDeltaToDeltaLK(particle1, particle2)*bias_apply;
G4double DeltaSKProductionCX = CrossSections::NDeltaToDeltaSK(particle1, particle2)*bias_apply;
G4double NNKKbProductionCX = CrossSections::NDeltaToNNKKb(particle1, particle2)*bias_apply;
const G4double UnStrangeProdCX = CrossSections::elastic(particle1, particle2) + CrossSections::NDeltaToNN(particle1, particle2);
const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX + NNKKbProductionCX)/bias;
const G4double StrangenessProdCX = (NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX + NNKKbProductionCX)/bias_apply;
G4double counterweight = (1. - bias * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
G4double limit_bias = bias;
G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
if(counterweight < 0.5){
counterweight = 0.5;
limit_bias = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
NLKProductionCX = CrossSections::NDeltaToNLK(particle1, particle2)*limit_bias;
NSKProductionCX = CrossSections::NDeltaToNSK(particle1, particle2)*limit_bias;
DeltaLKProductionCX = CrossSections::NDeltaToDeltaLK(particle1, particle2)*limit_bias;
DeltaSKProductionCX = CrossSections::NDeltaToDeltaSK(particle1, particle2)*limit_bias;
NNKKbProductionCX = CrossSections::NDeltaToNNKKb(particle1, particle2)*limit_bias;
NLKProductionCX = CrossSections::NDeltaToNLK(particle1, particle2)*bias_apply;
NSKProductionCX = CrossSections::NDeltaToNSK(particle1, particle2)*bias_apply;
DeltaLKProductionCX = CrossSections::NDeltaToDeltaLK(particle1, particle2)*bias_apply;
DeltaSKProductionCX = CrossSections::NDeltaToDeltaSK(particle1, particle2)*bias_apply;
NNKKbProductionCX = CrossSections::NDeltaToNNKKb(particle1, particle2)*bias_apply;
}
G4double elasticCX = CrossSections::elastic(particle1, particle2)*counterweight;
@@ -623,33 +647,38 @@ namespace G4INCL {
return new RecombinationChannel(particle1, particle2);
} else if (elasticCX + recombinationCX + NLKProductionCX > rChannel){
isElastic = false;
isStrangeProduction = true;
// NDelta -> NLK channel is chosen
INCL_DEBUG("NDelta interaction: NLK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NDeltaToNLKChannel(particle1, particle2);
} else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX > rChannel){
isElastic = false;
isStrangeProduction = true;
// NDelta -> NSK channel is chosen
INCL_DEBUG("NDelta interaction: NSK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NDeltaToNSKChannel(particle1, particle2);
} else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX > rChannel){
isElastic = false;
isStrangeProduction = true;
// NDelta -> DeltaLK channel is chosen
INCL_DEBUG("NDelta interaction: DeltaLK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NDeltaToDeltaLKChannel(particle1, particle2);
} else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX > rChannel){
isElastic = false;
isStrangeProduction = true;
// NDelta -> DeltaSK channel is chosen
INCL_DEBUG("NDelta interaction: DeltaSK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NDeltaToDeltaSKChannel(particle1, particle2);
} else if (elasticCX + recombinationCX + NLKProductionCX + NSKProductionCX + DeltaLKProductionCX + DeltaSKProductionCX + NNKKbProductionCX > rChannel){
isElastic = false;
isStrangeProduction = true;
// NDelta -> NNKKb channel is chosen
INCL_DEBUG("NDelta interaction: NNKKb channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NDeltaToNNKKbChannel(particle1, particle2);
}
else{
@@ -668,33 +697,33 @@ namespace G4INCL {
//// PiN
} else if(isPiN) {
G4double LKProdCX = CrossSections::NpiToLK(particle1,particle2)*bias;
G4double SKProdCX = CrossSections::NpiToSK(particle1,particle2)*bias;
G4double LKpiProdCX = CrossSections::NpiToLKpi(particle1,particle2)*bias;
G4double SKpiProdCX = CrossSections::NpiToSKpi(particle1,particle2)*bias;
G4double LK2piProdCX = CrossSections::NpiToLK2pi(particle1,particle2)*bias;
G4double SK2piProdCX = CrossSections::NpiToSK2pi(particle1,particle2)*bias;
G4double NKKbProdCX = CrossSections::NpiToNKKb(particle1,particle2)*bias;
G4double MissingCX = CrossSections::NpiToMissingStrangeness(particle1,particle2)*bias;
G4double LKProdCX = CrossSections::NpiToLK(particle1,particle2)*bias_apply;
G4double SKProdCX = CrossSections::NpiToSK(particle1,particle2)*bias_apply;
G4double LKpiProdCX = CrossSections::NpiToLKpi(particle1,particle2)*bias_apply;
G4double SKpiProdCX = CrossSections::NpiToSKpi(particle1,particle2)*bias_apply;
G4double LK2piProdCX = CrossSections::NpiToLK2pi(particle1,particle2)*bias_apply;
G4double SK2piProdCX = CrossSections::NpiToSK2pi(particle1,particle2)*bias_apply;
G4double NKKbProdCX = CrossSections::NpiToNKKb(particle1,particle2)*bias_apply;
G4double MissingCX = CrossSections::NpiToMissingStrangeness(particle1,particle2)*bias_apply;
const G4double UnStrangeProdCX = CrossSections::elastic(particle1, particle2) + CrossSections::piNToDelta(particle1, particle2)
+ CrossSections::piNToxPiN(2,particle1, particle2) + CrossSections::piNToxPiN(3,particle1, particle2) + CrossSections::piNToxPiN(4,particle1, particle2)
+ CrossSections::piNToEtaN(particle1, particle2) + CrossSections::piNToOmegaN(particle1, particle2);
const G4double StrangenessProdCX = (LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX + MissingCX)/bias;
const G4double StrangenessProdCX = (LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX + MissingCX)/bias_apply;
G4double counterweight = (1. - bias_apply * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
G4double counterweight = (1. - bias * StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX))/(1. - StrangenessProdCX / (StrangenessProdCX + UnStrangeProdCX));
G4double limit_bias = bias;
if(counterweight < 0.5) {
counterweight = 0.5;
limit_bias = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
LKProdCX = CrossSections::NpiToLK(particle1,particle2)*limit_bias;
SKProdCX = CrossSections::NpiToSK(particle1,particle2)*limit_bias;
LKpiProdCX = CrossSections::NpiToLKpi(particle1,particle2)*limit_bias;
SKpiProdCX = CrossSections::NpiToSKpi(particle1,particle2)*limit_bias;
LK2piProdCX = CrossSections::NpiToLK2pi(particle1,particle2)*limit_bias;
SK2piProdCX = CrossSections::NpiToSK2pi(particle1,particle2)*limit_bias;
NKKbProdCX = CrossSections::NpiToNKKb(particle1,particle2)*limit_bias;
MissingCX = CrossSections::NpiToMissingStrangeness(particle1,particle2)*limit_bias;
bias_apply = 0.5*UnStrangeProdCX/StrangenessProdCX+1;
LKProdCX = CrossSections::NpiToLK(particle1,particle2)*bias_apply;
SKProdCX = CrossSections::NpiToSK(particle1,particle2)*bias_apply;
LKpiProdCX = CrossSections::NpiToLKpi(particle1,particle2)*bias_apply;
SKpiProdCX = CrossSections::NpiToSKpi(particle1,particle2)*bias_apply;
LK2piProdCX = CrossSections::NpiToLK2pi(particle1,particle2)*bias_apply;
SK2piProdCX = CrossSections::NpiToSK2pi(particle1,particle2)*bias_apply;
NKKbProdCX = CrossSections::NpiToNKKb(particle1,particle2)*bias_apply;
MissingCX = CrossSections::NpiToMissingStrangeness(particle1,particle2)*bias_apply;
}
@@ -757,101 +786,117 @@ namespace G4INCL {
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> LK channel is chosen
INCL_DEBUG("PiN interaction: LK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToLKChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> SK channel is chosen
INCL_DEBUG("PiN interaction: SK channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToSKChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> LKpi channel is chosen
INCL_DEBUG("PiN interaction: LKpi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToLKpiChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> SKpi channel is chosen
INCL_DEBUG("PiN interaction: SKpi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToSKpiChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> LK2pi channel is chosen
INCL_DEBUG("PiN interaction: LK2pi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToLK2piChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> SK2pi channel is chosen
INCL_DEBUG("PiN interaction: SK2pi channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToSK2piChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX > rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> NKKb channel is chosen
INCL_DEBUG("PiN interaction: NKKb channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToNKKbChannel(particle1, particle2);
} else if(elasticCX + deltaProductionCX + onePiProductionCX + twoPiProductionCX + threePiProductionCX + etaProductionCX+ omegaProductionCX
+ LKProdCX + SKProdCX + LKpiProdCX + SKpiProdCX + LK2piProdCX + SK2piProdCX + NKKbProdCX + MissingCX> rChannel) {
isElastic = false;
isStrangeProduction = true;
// PiN -> Missinge Strangeness channel is chosen
INCL_DEBUG("PiN interaction: Missinge Strangeness channel chosen" << '\n');
weight = limit_bias;
weight = bias_apply;
return new NpiToMissingStrangenessChannel(particle1, particle2);
}
else {
INCL_WARN("inconsistency within the PiN Cross Sections (sum!=inelastic)" << '\n');
if(MissingCX>0.) {
INCL_WARN("Returning a Missinge Strangeness channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToMissingStrangenessChannel(particle1, particle2);
} else if(NKKbProdCX>0.) {
INCL_WARN("Returning a NKKb channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToNKKbChannel(particle1, particle2);
} else if(SK2piProdCX>0.) {
INCL_WARN("Returning a SK2pi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToSK2piChannel(particle1, particle2);
} else if(LK2piProdCX>0.) {
INCL_WARN("Returning a LK2pi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToLK2piChannel(particle1, particle2);
} else if(SKpiProdCX>0.) {
INCL_WARN("Returning a SKpi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToSKpiChannel(particle1, particle2);
} else if(LKpiProdCX>0.) {
INCL_WARN("Returning a LKpi channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToLKpiChannel(particle1, particle2);
} else if(SKProdCX>0.) {
INCL_WARN("Returning a SK channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToSKChannel(particle1, particle2);
} else if(LKProdCX>0.) {
INCL_WARN("Returning a LK channel" << '\n');
weight = limit_bias;
weight = bias_apply;
isElastic = false;
isStrangeProduction = true;
return new NpiToLKChannel(particle1, particle2);
} else if(omegaProductionCX>0.) {
INCL_WARN("Returning a Omega channel" << '\n');
@@ -1224,12 +1269,14 @@ namespace G4INCL {
case ValidFS:
Book &theBook = theNucleus->getStore()->getBook();
theBook.incrementAcceptedCollisions();
if(theBook.getAcceptedCollisions() == 1) {
// Store time and cross section of the first collision
G4double t = theBook.getCurrentTime();
theBook.setFirstCollisionTime(t);
theBook.setFirstCollisionXSec(oldXSec);
// Increase the number of Kaon by 1
if(isStrangeProduction) theNucleus->setNumberOfKaon(theNucleus->getNumberOfKaon()+1);
// Store position and momentum of the spectator on the first
// collision
if((isParticle1Spectator && isParticle2Spectator) || (!isParticle1Spectator && !isParticle2Spectator)) {
@@ -59,8 +59,12 @@ namespace G4INCL {
Sk = 0.0;
TbelowTf = 0.0;
std::for_each(remnantParticles.begin(), remnantParticles.end(), std::bind1st(std::mem_fun(&G4INCL::CDPP::processOneParticle), this));
std::for_each(created.begin(), created.end(), std::bind1st(std::mem_fun(&G4INCL::CDPP::processOneParticle), this));
std::for_each(remnantParticles.begin(), remnantParticles.end(),
[this](Particle const * const p){ this->G4INCL::CDPP::processOneParticle(p); }
);
std::for_each(created.begin(), created.end(),
[this](Particle const * const p){ this->G4INCL::CDPP::processOneParticle(p); }
);
const G4double Tinitial = nucleus->getInitialInternalEnergy();
const G4double Eblock = TbelowTf - Tinitial - Sk - S;
@@ -375,6 +375,9 @@ namespace G4INCL {
// Fill in the event information
theEventInfo.stoppingTime = propagationModel->getCurrentTime();
// The event bias
theEventInfo.eventBias = (Double_t) Particle::getTotalBias();
// Forced CN?
if(nucleus->getTryCompoundNucleus()) {
INCL_DEBUG("Trying compound nucleus" << '\n');
@@ -409,16 +412,13 @@ namespace G4INCL {
// Capture antiKaons and Sigmas and produce Lambda instead
theEventInfo.absorbedStrangeParticle = nucleus->decayInsideStrangeParticles();
// Emit antiKaons and Sigmas still inside the nucleus
// Emit strange particles still inside the nucleus
nucleus->emitInsideStrangeParticles();
theEventInfo.emitKaon = nucleus->emitInsideKaon();
// Should be activated only for geant4
#ifdef INCLXX_IN_GEANT4_MODE
theEventInfo.emitLambda = nucleus->emitInsideLambda();
#endif // INCLXX_IN_GEANT4_MODE
// The event bias
theEventInfo.eventBias = (Double_t) Particle::getTotalBias();
// Check if the nucleus contains deltas
theEventInfo.deltasInside = nucleus->containsDeltas();
@@ -520,8 +520,8 @@ namespace G4INCL {
// should actually take it into account!
ThreeVector theCNMomentum = nucleus->getIncomingMomentum();
ThreeVector theCNSpin = nucleus->getIncomingAngularMomentum();
const G4double theTargetMass = ParticleTable::getTableMass(theEventInfo.At, theEventInfo.Zt);
G4int theCNA=theEventInfo.At, theCNZ=theEventInfo.Zt;
const G4double theTargetMass = ParticleTable::getTableMass(theEventInfo.At, theEventInfo.Zt, theEventInfo.St);
G4int theCNA=theEventInfo.At, theCNZ=theEventInfo.Zt, theCNS=theEventInfo.St;
Cluster * const theProjectileRemnant = nucleus->getProjectileRemnant();
G4double theCNEnergy = theTargetMass + theProjectileRemnant->getEnergy();
@@ -529,7 +529,7 @@ namespace G4INCL {
ParticleList const &initialProjectileComponents = theProjectileRemnant->getParticles();
std::vector<Particle *> shuffledComponents(initialProjectileComponents.begin(), initialProjectileComponents.end());
// Shuffle the list of potential participants
std::random_shuffle(shuffledComponents.begin(), shuffledComponents.end(), Random::getAdapter());
std::shuffle(shuffledComponents.begin(), shuffledComponents.end(), Random::getAdapter());
G4bool success = true;
G4bool atLeastOneNucleonEntering = false;
@@ -557,6 +557,7 @@ namespace G4INCL {
// Add the particle to the CN
theCNA++;
theCNZ += (*p)->getZ();
theCNS += (*p)->getS();
break;
case PauliBlockedFS:
case NoEnergyConservationFS:
@@ -575,6 +576,7 @@ namespace G4INCL {
// assert(theCNA==nucleus->getA());
// assert(theCNA<=theEventInfo.At+theEventInfo.Ap);
// assert(theCNZ<=theEventInfo.Zt+theEventInfo.Zp);
// assert(theCNS>=theEventInfo.St+theEventInfo.Sp);
// Update the kinematics of the CN
theCNEnergy -= theProjectileRemnant->getEnergy();
@@ -588,7 +590,7 @@ namespace G4INCL {
theCNSpin -= theProjectileRemnant->getAngularMomentum();
// Compute the excitation energy of the CN
const G4double theCNMass = ParticleTable::getTableMass(theCNA,theCNZ);
const G4double theCNMass = ParticleTable::getTableMass(theCNA,theCNZ,theCNS);
const G4double theCNInvariantMassSquared = theCNEnergy*theCNEnergy-theCNMomentum.mag2();
if(theCNInvariantMassSquared<0.) {
// Negative invariant mass squared, return a transparent
@@ -601,6 +603,7 @@ namespace G4INCL {
INCL_DEBUG("CN excitation energy is negative, forcing a transparent" << '\n'
<< " theCNA = " << theCNA << '\n'
<< " theCNZ = " << theCNZ << '\n'
<< " theCNS = " << theCNS << '\n'
<< " theCNEnergy = " << theCNEnergy << '\n'
<< " theCNMomentum = (" << theCNMomentum.getX() << ", "<< theCNMomentum.getY() << ", " << theCNMomentum.getZ() << ")" << '\n'
<< " theCNExcitationEnergy = " << theCNExcitationEnergy << '\n'
@@ -613,6 +616,7 @@ namespace G4INCL {
INCL_DEBUG("CN excitation energy is positive, forcing a CN" << '\n'
<< " theCNA = " << theCNA << '\n'
<< " theCNZ = " << theCNZ << '\n'
<< " theCNS = " << theCNS << '\n'
<< " theCNEnergy = " << theCNEnergy << '\n'
<< " theCNMomentum = (" << theCNMomentum.getX() << ", "<< theCNMomentum.getY() << ", " << theCNMomentum.getZ() << ")" << '\n'
<< " theCNExcitationEnergy = " << theCNExcitationEnergy << '\n'
@@ -620,6 +624,7 @@ namespace G4INCL {
);
nucleus->setA(theCNA);
nucleus->setZ(theCNZ);
nucleus->setS(theCNS);
nucleus->setMomentum(theCNMomentum);
nucleus->setEnergy(theCNEnergy);
nucleus->setExcitationEnergy(theCNExcitationEnergy);
@@ -632,6 +637,9 @@ namespace G4INCL {
// Take care of any remaining etas and/or omegas
G4double timeThreshold=theConfig->getDecayTimeThreshold();
theEventInfo.forcedPionResonancesOutside = nucleus->decayOutgoingPionResonances(timeThreshold);
// Take care of any remaining Kaons
theEventInfo.emitKaon = nucleus->emitInsideKaon();
// Cluster decay
theEventInfo.clusterDecay = nucleus->decayOutgoingClusters() | nucleus->decayMe();
@@ -662,11 +670,14 @@ namespace G4INCL {
const G4double pLongBalance = theBalance.momentum.getZ();
const G4double pTransBalance = theBalance.momentum.perp();
if(theBalance.Z != 0) {
INCL_ERROR("Violation of charge conservation! ZBalance = " << theBalance.Z << '\n');
INCL_ERROR("Violation of charge conservation! ZBalance = " << theBalance.Z << " eventNumber=" << theEventInfo.eventNumber << '\n');
}
if(theBalance.A != 0) {
INCL_ERROR("Violation of baryon-number conservation! ABalance = " << theBalance.A << " Emit Lambda=" << theEventInfo.emitLambda << " eventNumber=" << theEventInfo.eventNumber << '\n');
}
if(theBalance.S != 0) {
INCL_ERROR("Violation of strange-number conservation! SBalance = " << theBalance.S << " eventNumber=" << theEventInfo.eventNumber << '\n');
}
G4double EThreshold, pLongThreshold, pTransThreshold;
if(afterRecoil) {
// Less stringent checks after accommodating recoil
@@ -73,6 +73,9 @@ namespace G4INCL {
case AlphaDecay:
decayParticle = new Cluster(2,4,0,false);
break;
case LambdaDecay:
decayParticle = new Particle(Lambda, mom, pos);
break;
default:
INCL_ERROR("Unrecognized cluster-decay mode in two-body decay: " << theDecayMode << '\n'
<< c->print());
@@ -85,17 +88,28 @@ namespace G4INCL {
decayParticle->setRealMass();
// Save some variables of the mother cluster
#ifdef INCLXX_IN_GEANT4_MODE
if ((c->getZ() == 1) && (c->getA() == 2) && (c->getS() == -1)) { // no Mass for A=2,Z=1,S=-1 in Geant4
c->setMass(2053.952);
if (c->getEnergy() < 2053.952) // Energy can be lower than the sum of p and Lambda masses (2053.952)...
c->setMomentum(c->getMomentum() * 0.) ;
else
c->setMomentum(c->getMomentum() / (std::sqrt(c->getMomentum().mag2())/std::sqrt(c->getMomentum().mag2() - 2053.952*2053.952))) ;
}
#endif
G4double motherMass = c->getMass();
const ThreeVector velocity = -c->boostVector();
// Characteristics of the daughter particle
const G4int daughterZ = c->getZ() - decayParticle->getZ();
const G4int daughterA = c->getA() - decayParticle->getA();
const G4double daughterMass = ParticleTable::getRealMass(daughterA,daughterZ);
const G4int daughterS = c->getS() - decayParticle->getS();
const G4double daughterMass = ParticleTable::getRealMass(daughterA,daughterZ,daughterS);
// The mother cluster becomes the daughter
c->setZ(daughterZ);
c->setA(daughterA);
c->setS(daughterS);
c->setMass(daughterMass);
c->setExcitationEnergy(0.);
@@ -155,15 +169,19 @@ namespace G4INCL {
// Masses and charges of the daughter particle and of the decay products
const G4int decayZ1 = decayParticle1->getZ();
const G4int decayA1 = decayParticle1->getA();
const G4int decayS1 = decayParticle1->getS();
const G4int decayZ2 = decayParticle2->getZ();
const G4int decayA2 = decayParticle2->getA();
const G4int decayS2 = decayParticle2->getS();
const G4int decayZ = decayZ1 + decayZ2;
const G4int decayA = decayA1 + decayA2;
const G4int decayS = decayS1 + decayS2;
const G4int daughterZ = c->getZ() - decayZ;
const G4int daughterA = c->getA() - decayA;
const G4int daughterS = c->getS() - decayS;
const G4double decayMass1 = decayParticle1->getMass();
const G4double decayMass2 = decayParticle2->getMass();
const G4double daughterMass = ParticleTable::getRealMass(daughterA,daughterZ);
const G4double daughterMass = ParticleTable::getRealMass(daughterA,daughterZ,daughterS);
// Q-values
G4double qValue = motherMass - daughterMass - decayMass1 - decayMass2;
@@ -181,6 +199,7 @@ namespace G4INCL {
// The mother cluster becomes the daughter
c->setZ(daughterZ);
c->setA(daughterA);
c->setS(daughterS);
c->setMass(daughterMass);
c->setExcitationEnergy(0.);
@@ -231,6 +250,7 @@ namespace G4INCL {
void phaseSpaceDecayLegacy(Cluster * const c, ClusterDecayType theDecayMode, ParticleList *decayProducts) {
const G4int theA = c->getA();
const G4int theZ = c->getZ();
// assert(c->getS() == 0);
const ThreeVector mom(0.0, 0.0, 0.0);
const ThreeVector pos = c->getPosition();
@@ -257,7 +277,7 @@ namespace G4INCL {
if(theZ<ParticleTable::clusterTableZSize && theA<ParticleTable::clusterTableASize) {
finalDaughterZ=theZ;
finalDaughterA=theA;
while(clusterDecayMode[finalDaughterZ][finalDaughterA]==theDecayMode) { /* Loop checking, 10.07.2015, D.Mancusi */
while(clusterDecayMode[0][finalDaughterZ][finalDaughterA]==theDecayMode) { /* Loop checking, 10.07.2015, D.Mancusi */
finalDaughterA--;
finalDaughterZ -= theZStep;
}
@@ -385,10 +405,12 @@ namespace G4INCL {
void phaseSpaceDecay(Cluster * const c, ClusterDecayType theDecayMode, ParticleList *decayProducts) {
const G4int theA = c->getA();
const G4int theZ = c->getZ();
const G4int theL = (-1)*(c->getS());
const ThreeVector mom(0.0, 0.0, 0.0);
const ThreeVector pos = c->getPosition();
G4int theZStep;
ParticleType theEjectileType;
switch(theDecayMode) {
case ProtonUnbound:
@@ -399,33 +421,48 @@ namespace G4INCL {
theZStep = 0;
theEjectileType = Neutron;
break;
case LambdaUnbound: // Will always completly decay. Append only if theA == 0 and/or theZ == 0
theZStep = -99;
if(theZ==0) theEjectileType = Neutron;
else theEjectileType = Proton;
break;
default:
INCL_ERROR("Unrecognized cluster-decay mode in phase-space decay: " << theDecayMode << '\n'
<< c->print());
return;
}
// Find the daughter cluster (first cluster which is not
// proton/neutron-unbound, in the sense of the table)
G4int finalDaughterZ, finalDaughterA;
if(theZ<ParticleTable::clusterTableZSize && theA<ParticleTable::clusterTableASize) {
G4int finalDaughterZ, finalDaughterA, finalDaughterL;
if(theZ<ParticleTable::clusterTableZSize && theA<ParticleTable::clusterTableASize && theZStep != -99) {
finalDaughterZ=theZ;
finalDaughterA=theA;
while(finalDaughterA>0 && clusterDecayMode[finalDaughterZ][finalDaughterA]!=StableCluster) { /* Loop checking, 10.07.2015, D.Mancusi */
finalDaughterL=theL;
while(finalDaughterA>0 && clusterDecayMode[finalDaughterL][finalDaughterZ][finalDaughterA]!=StableCluster) { /* Loop modified, 15.01.18, J. Hirtz */
finalDaughterA--;
finalDaughterZ -= theZStep;
}
} else {
finalDaughterA = 1;
if(theDecayMode==ProtonUnbound)
if(theDecayMode==ProtonUnbound){
finalDaughterZ = 1;
else
finalDaughterL = 0;
}
else if(theDecayMode==NeutronUnbound){
finalDaughterZ = 0;
finalDaughterL = 0;
}
else {
finalDaughterZ = 0;
finalDaughterL = 1;
}
}
// assert(finalDaughterZ<=theZ && finalDaughterA<theA && finalDaughterA>0 && finalDaughterZ>=0);
// assert(finalDaughterZ<=theZ && finalDaughterA<theA && finalDaughterA>0 && finalDaughterZ>=0 && finalDaughterL>=0);
// Compute the available decay energy
const G4int nSplits = theA-finalDaughterA;
const G4int nLambda = theL-finalDaughterL;
const G4int nSplits = theA-finalDaughterA-nLambda;
// c->getMass() can possibly contain some excitation energy, too
const G4double availableEnergy = c->getMass();
@@ -436,10 +473,17 @@ namespace G4INCL {
ParticleList products;
c->setA(finalDaughterA);
c->setZ(finalDaughterZ);
c->setS((-1)*finalDaughterL);
c->setRealMass();
c->setMomentum(ThreeVector());
c->adjustEnergyFromMomentum();
products.push_back(c);
for(G4int j=0; j<nLambda; ++j) {
Particle *ejectile = new Particle(Lambda, mom, pos);
ejectile->setRealMass();
products.push_back(ejectile);
}
for(G4int i=0; i<nSplits; ++i) {
Particle *ejectile = new Particle(theEjectileType, mom, pos);
ejectile->setRealMass();
@@ -465,12 +509,13 @@ namespace G4INCL {
void recursiveDecay(Cluster * const c, ParticleList *decayProducts) {
const G4int Z = c->getZ();
const G4int A = c->getA();
const G4int S = c->getS();
// assert(c->getExcitationEnergy()>-1.e-5);
if(c->getExcitationEnergy()<0.)
c->setExcitationEnergy(0.);
if(Z<ParticleTable::clusterTableZSize && A<ParticleTable::clusterTableASize) {
ClusterDecayType theDecayMode = clusterDecayMode[Z][A];
if(Z<ParticleTable::clusterTableZSize && A<ParticleTable::clusterTableASize && (S*(-1))<ParticleTable::clusterTableSSize) {
ClusterDecayType theDecayMode = clusterDecayMode[(S*(-1))][Z][A];
switch(theDecayMode) {
default:
@@ -484,6 +529,7 @@ namespace G4INCL {
break;
case ProtonDecay:
case NeutronDecay:
case LambdaDecay:
case AlphaDecay:
// Two-body decays
twoBodyDecay(c, theDecayMode, decayProducts);
@@ -495,6 +541,7 @@ namespace G4INCL {
break;
case ProtonUnbound:
case NeutronUnbound:
case LambdaUnbound:
// Phase-space decays
phaseSpaceDecay(c, theDecayMode, decayProducts);
break;
@@ -523,7 +570,8 @@ namespace G4INCL {
G4bool isStable(Cluster const * const c) {
const G4int Z = c->getZ();
const G4int A = c->getA();
return (clusterDecayMode[Z][A]==StableCluster);
const G4int L = ((-1)*c->getS());
return (clusterDecayMode[L][Z][A]==StableCluster);
}
/** \brief Table for cluster decays
@@ -536,8 +584,8 @@ namespace G4INCL {
* Unphysical nuclides (A<Z) are marked as stable, but should never be
* produced by INCL. If you find them in the output, something is fishy.
*/
G4ThreadLocal ClusterDecayType clusterDecayMode[ParticleTable::clusterTableZSize][ParticleTable::clusterTableASize] =
{
G4ThreadLocal ClusterDecayType clusterDecayMode[ParticleTable::clusterTableSSize][ParticleTable::clusterTableZSize][ParticleTable::clusterTableASize] =
{{/* S = 0 */
/* A = 0 1 2 3 4 5 6 7 8 9 10 11 12 */
/* Z = 0 */ {StableCluster, StableCluster, NeutronDecay, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound},
/* Z = 1 */ {StableCluster, StableCluster, StableCluster, StableCluster, NeutronDecay, TwoNeutronDecay, NeutronDecay, TwoNeutronDecay, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound, NeutronUnbound},
@@ -548,7 +596,43 @@ namespace G4INCL {
/* Z = 6 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, ProtonUnbound, ProtonUnbound, TwoProtonDecay, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 7 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, ProtonUnbound, ProtonUnbound, ProtonUnbound, ProtonDecay, ProtonDecay, StableCluster},
/* Z = 8 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, ProtonUnbound, ProtonUnbound, ProtonUnbound, ProtonUnbound, ProtonDecay}
};
},
{ /* S = -1 */
/* A = 0 1 2 3 4 5 6 7 8 9 10 11 12 */
/* Z = 0 */ {StableCluster, StableCluster, NeutronDecay, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound},
/* Z = 1 */ {StableCluster, StableCluster, LambdaDecay, StableCluster, StableCluster, NeutronDecay, StableCluster, StableCluster, StableCluster, NeutronDecay, NeutronUnbound,NeutronUnbound,NeutronUnbound},
/* Z = 2 */ {StableCluster, StableCluster, StableCluster, LambdaUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, NeutronDecay, StableCluster, NeutronUnbound},
/* Z = 3 */ {StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonDecay, ProtonDecay, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 4 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 5 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonDecay, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 6 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 7 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonDecay, ProtonDecay, ProtonDecay},
/* Z = 8 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonUnbound, ProtonUnbound}
},
{ /* S = -2 */
/* A = 0 1 2 3 4 5 6 7 8 9 10 11 12 */
/* Z = 0 */ {StableCluster, StableCluster, LambdaDecay, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound},
/* Z = 1 */ {StableCluster, StableCluster, StableCluster, LambdaUnbound, StableCluster, StableCluster, NeutronDecay, StableCluster, StableCluster, StableCluster, NeutronDecay,NeutronUnbound,NeutronUnbound},
/* Z = 2 */ {StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 3 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonDecay, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 4 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 5 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 6 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster},
/* Z = 7 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonDecay, ProtonDecay},
/* Z = 8 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonUnbound}
},
{ /* S = -3 */
/* A = 0 1 2 3 4 5 6 7 8 9 10 11 12 */
/* Z = 0 */ {StableCluster, StableCluster, StableCluster, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound, LambdaUnbound},
/* Z = 1 */ {StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 2 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 3 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonDecay, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 4 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster, StableCluster},
/* Z = 5 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster, StableCluster},
/* Z = 6 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, StableCluster, StableCluster},
/* Z = 7 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound, ProtonDecay},
/* Z = 8 */ {StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, StableCluster, LambdaUnbound, ProtonUnbound}
}};
ParticleList decay(Cluster * const c) {
ParticleList decayProducts;
@@ -561,6 +645,8 @@ namespace G4INCL {
// assert(c->getZ()==1 || c->getZ()==0);
if(c->getZ()==1)
c->setType(Proton);
else if(c->getS()==-1)
c->setType(Lambda);
else
c->setType(Neutron);
c->setRealMass();
@@ -158,7 +158,7 @@ namespace G4INCL {
// to the leading nucleon. The selected phase-space parameter corresponds
// to the running maximum cluster mass.
if(size < clusterPhaseSpaceCut[runningMaxClusterAlgorithmMass]) {
consideredPartners[nConsidered] = *i;
consideredPartners[nConsidered] = *i;
// Keep trace of how much energy is carried by cascading nucleons. This
// is used to stop the clustering algorithm as soon as possible.
if(!(*i)->isTargetSpectator())
@@ -194,7 +194,7 @@ namespace G4INCL {
// assert(std::count(isInRunningConfiguration, isInRunningConfiguration+nConsidered, true)==0);
// Start the cluster search!
findClusterStartingFrom(1, theLeadingParticle->getZ());
findClusterStartingFrom(1, theLeadingParticle->getZ(), 0);
// Again, make sure that all the elements of isInRunningConfiguration have
// been reset to false. This is a sanity check.
@@ -219,11 +219,12 @@ namespace G4INCL {
return psSpace * psMomentum * clusterPosFact2[oldA + 1];
}
void ClusteringModelIntercomparison::findClusterStartingFrom(const G4int oldA, const G4int oldZ) {
void ClusteringModelIntercomparison::findClusterStartingFrom(const G4int oldA, const G4int oldZ, const G4int oldS) {
const G4int newA = oldA + 1;
const G4int oldAMinusOne = oldA - 1;
G4int newZ;
G4int newN;
G4int newS;
// Look up the phase-space cut
const G4double phaseSpaceCut = clusterPhaseSpaceCut[newA];
@@ -260,10 +261,11 @@ namespace G4INCL {
// Z and A of the new cluster
newZ = oldZ + candidateNucleon.Z;
newS = oldS + candidateNucleon.S;
newN = newA - newZ;
// Skip this nucleon if we already have too many protons or neutrons
if(newZ > clusterZMaxAll || newN > clusterNMaxAll)
if(newZ > clusterZMaxAll || newN > clusterNMaxAll || newS>0)
continue;
// Compute the phase space factor for a new cluster which
@@ -343,8 +345,8 @@ namespace G4INCL {
// Note: sqc is real kinetic energy, not the square of the kinetic energy!
const G4double sqc = KinematicsUtils::invariantMass(runningEnergies[newA],
runningMomenta[newA]);
const G4double sqct = (sqc - 2.*newZ*protonMass - 2.*(newA-newZ)*neutronMass
+ ParticleTable::getRealMass(newA, newZ))
const G4double sqct = (sqc - 2.*newZ*protonMass - 2.*(newA+newS-newZ)*neutronMass + 2.*newS*lambdaMass
+ ParticleTable::getRealMass(newA, newZ, newS))
*clusterPosFact[newA];
if(sqct < sqtot) {
@@ -353,6 +355,7 @@ namespace G4INCL {
sqtot = sqct;
selectedA = newA;
selectedZ = newZ;
selectedS = newS;
// Store the running configuration in a ParticleList
for(G4int j=0; j<oldA; ++j)
@@ -364,8 +367,8 @@ namespace G4INCL {
}
// The method recursively calls itself for the next mass
if(newA < runningMaxClusterAlgorithmMass && newA+1 < theNucleus->getA()) {
findClusterStartingFrom(newA, newZ);
if(newA < runningMaxClusterAlgorithmMass && newA+1 < theNucleus->getA() && newS<=0) {
findClusterStartingFrom(newA, newZ, newS);
}
// Reset the running configuration flag and the cascading energy pool
@@ -376,7 +379,7 @@ namespace G4INCL {
G4bool ClusteringModelIntercomparison::clusterCanEscape(Nucleus const * const n, Cluster const * const c) {
// Forbid emission of the whole nucleus
if(c->getA()>=n->getA())
if(c->getA()>=n->getA() || c->getS()>0)
return false;
// Check the escape angle of the cluster
@@ -734,13 +734,19 @@ namespace G4INCL {
//
// XS from K. Tsushima, A. Sibirtsev, A. W. Thomas, and G. Q. Li. Phys.Rev.C 59, 369
//
// ratio
// D++ n -> p L K+ (3)
//
// D+ p -> p L K+ (1)
//
// D+ n -> p L K0 (1)
// D+ n -> n L K+ (1)
//return 0.;
G4double a = 4.169;
G4double b = 2.227;
G4double c = 2.511;
G4double n_channel = 4.; // number of channel divided by 2. Here 8/2
// assert((p1->isNucleon() && p2->isResonance()) || (p2->isNucleon() && p1->isResonance()));
const G4int iso = ParticleTable::getIsospin(p1->getType()) + ParticleTable::getIsospin(p2->getType());
@@ -753,7 +759,7 @@ namespace G4INCL {
if(s <= s0) return 0.;
sigma = 4.*4.169*std::pow(s/s0-1,2.227)*std::pow(s0/s,2.511);
sigma = n_channel*a*std::pow(s/s0-1,b)*std::pow(s0/s,c);
//const G4double pLab = sdt::sqrt(s*s/(4*ParticleTable::effectiveNucleonMass2)-s)*0.001;
//sigma = 3*1.11875*std::pow((pLab-2.3508),1.0951)/std::pow((pLab+2.3508),2.0958); // NDelta sim to NN
@@ -774,6 +780,7 @@ namespace G4INCL {
//
// XS from K. Tsushima, A. Sibirtsev, A. W. Thomas, and G. Q. Li. Phys.Rev.C 59, 369 ( X 1.25 (124/99) for isospin consideration)
//
// ratio
// D++ p -> p S+ K+ (6)
//
// D++ n -> p S+ K0 (3) ****
@@ -789,6 +796,11 @@ namespace G4INCL {
// D+ n -> n S+ K0 (2)
// D+ n -> n S0 K+ (2)
G4double a = 39.54;
G4double b = 2.799;
G4double c = 6.303;
G4double n_channel = 11.;
// assert((p1->isNucleon() && p2->isResonance()) || (p2->isNucleon() && p1->isResonance()));
G4double sigma = 0.;
@@ -800,7 +812,7 @@ namespace G4INCL {
if(s <= s0)
return 0.;
sigma = 11.*39.54*std::pow(s/s0-1,2.799)*std::pow(s0/s,6.303);
sigma = n_channel*a*std::pow(s/s0-1,b)*std::pow(s0/s,c);
//const G4double pLab = sdt::sqrt(s*s/(4*ParticleTable::effectiveNucleonMass2)-s)*0.001;
//sigma = 22./12./2. * 4.75*6.38*std::pow(pLab-2.593,2.1)/std::pow(pLab,4.162); // NDelta sim to NN
@@ -832,7 +844,11 @@ namespace G4INCL {
//
// D+ n -> L K+ D0 (4)
// D+ n -> L K0 D+ (2)
//return 0.;
G4double a = 2.679;
G4double b = 2.280;
G4double c = 5.086;
G4double n_channel = 7.;
// assert((p1->isNucleon() && p2->isResonance()) || (p2->isNucleon() && p1->isResonance()));
@@ -843,7 +859,7 @@ namespace G4INCL {
if(s <= s0)
return 0.;
G4double sigma = 7.*2.679*std::pow(s/s0-1,2.280)*std::pow(s0/s,5.086);
G4double sigma = n_channel*a*std::pow(s/s0-1,b)*std::pow(s0/s,c);
if(iso == 0)// D+ n
sigma *= 6./22.;
@@ -889,7 +905,11 @@ namespace G4INCL {
// D+ n -> S+ K0 D0 (i)* (2)*
// D+ n -> S0 K0 D+ (j)* (1)*
// D+ n -> S- K0 D++ (k)* (2)*
//return 0.;
G4double a = 8.407;
G4double b = 2.743;
G4double c = 21.18;
G4double n_channel = 19.;
// assert((p1->isNucleon() && p2->isResonance()) || (p2->isNucleon() && p1->isResonance()));
@@ -900,7 +920,7 @@ namespace G4INCL {
if(s <= s0)
return 0.;
G4double sigma = 19.*21.18*std::pow(s/s0-1,2.743)*std::pow(s0/s,8.407);
G4double sigma = n_channel*a*std::pow(s/s0-1,b)*std::pow(s0/s,c);
if(iso == 0)// D+ n
sigma *= 13./48.;
@@ -951,13 +971,13 @@ namespace G4INCL {
return 0.;
if(iso == 0)// D+ n
sigma = 8* 14. * 5./19. * 0.3 *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
sigma = 8* 22./60. * 3. *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
else if (ParticleTable::getIsospin(p1->getType()) == ParticleTable::getIsospin(p2->getType()))// D+ p
sigma = 7* 14. * 5./19. * 0.3 *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
sigma = 7* 22./60. * 3. *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
else if (std::abs(iso) == 2)// D++ n
sigma = 9* 14. * 5./19. * 0.3 *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
sigma = 9* 22./60. * 3. *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
else // D++ p
sigma = 6* 14. * 5./19. * 0.3 *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
sigma = 6* 22./60. * 3. *std::pow(1.-2.872*2.872/(ener*ener),3.)*std::pow(2.872*2.872/(ener*ener),0.8);
return sigma;
}
@@ -1893,17 +1913,17 @@ namespace G4INCL {
// Nucleon-antiKaon producing Nucleon-antiKaon-pion cross sections
//
// ratio
// p K0b (2) p K- (4)
// p K- (28) p K0b (20)
//
// p K- -> p K- pi0 (6)*
// p K- -> p K0b pi- (7)*
// p K- -> n K- pi+ (9)*
// p K- -> n K0b pi0 (6)
// p K0b -> p K0b pi0 (4)
// p K0b -> p K- pi+ (10)*
// p K0b -> n K0b pi+ (6)*
//
// p K0b -> p K0b pi0 (1/2)
// p K0b -> p K- pi+ (1)*
// p K0b -> n K0b pi+ (1/2)*
// p K- -> p K- pi0 (1/2)*
// p K- -> p K0b pi- (2/3)*
// p K- -> n K- pi+ (3/4)*
// p K- -> n K0b pi0 (2)
//
// assert((p1->isNucleon() && p2->isAntiKaon()) || (p1->isAntiKaon() && p2->isNucleon()));
G4double sigma=0.;
@@ -1927,9 +1947,9 @@ namespace G4INCL {
return 0.;
if(iso == 0)
sigma = 2. * 101.3*std::pow(pLab-0.526,5.846)/std::pow(pLab,8.343);
sigma = 28. * 10.13*std::pow(pLab-0.526,5.846)/std::pow(pLab,8.343);
else
sigma = 4. * 101.3*std::pow(pLab-0.526,5.846)/std::pow(pLab,8.343);
sigma = 20. * 10.13*std::pow(pLab-0.526,5.846)/std::pow(pLab,8.343);
return sigma;
}
@@ -179,10 +179,10 @@ namespace G4INCL {
// If there is no Nucleus, just return
if(!theNucleus) return;
// Mark pions that have been created outside their well (we will force them
// Mark pions and kaons that have been created outside their well (we will force them
// to be emitted later).
for(ParticleIter i=created.begin(), e=created.end(); i!=e; ++i )
if((*i)->isPion() && (*i)->getPosition().mag() > theNucleus->getSurfaceRadius(*i)) {
if(((*i)->isPion() || (*i)->isKaon() || (*i)->isAntiKaon()) && (*i)->getPosition().mag() > theNucleus->getSurfaceRadius(*i)) {
(*i)->makeParticipant();
(*i)->setOutOfWell();
fs->addOutgoingParticle(*i);
@@ -294,12 +294,12 @@ namespace G4INCL {
std::vector<G4int> newBiasCollisionVector;
newBiasCollisionVector = ModifiedAndDestroyed.getParticleListBiasVector();
if(std::fabs(weight-1.) > 1E-6){
newBiasCollisionVector.push_back(Particle::nextBiasedCollisionID);
Particle::FillINCLBiasVector(1./weight);
weight = 1.; //Should be reinitialized in case of next collision non baised
}
newBiasCollisionVector.push_back(Particle::nextBiasedCollisionID);
Particle::FillINCLBiasVector(1./weight);
weight = 1.; // useless?
}
for(ParticleIter i=modifiedAndCreated.begin(), e=modifiedAndCreated.end(); i!=e; ++i ) {
(*i)->setBiasCollisionVector(newBiasCollisionVector);
(*i)->setBiasCollisionVector(newBiasCollisionVector);
if(!(*i)->isOutOfWell()) {
// Decide if the particle should be made into a spectator
// (Back to spectator)
@@ -432,14 +432,14 @@ namespace G4INCL {
(*i)->setPotentialEnergy(0.);
//jcd if(shouldUseLocalEnergy && !(*i)->isPion()) { // This translates AECSVT's loops 1, 3 and 4
if(shouldUseLocalEnergy && !(*i)->isPion() && !(*i)->isEta() && !(*i)->isOmega() &&
!(*i)->isKaon() && !(*i)->isAntiKaon() &&!(*i)->isLambda() && !(*i)->isSigma()) { // This translates AECSVT's loops 1, 3 and 4
if(shouldUseLocalEnergy && !(*i)->isPion() && !(*i)->isEta() && !(*i)->isOmega() &&
!(*i)->isKaon() && !(*i)->isAntiKaon() && !(*i)->isSigma() && !(*i)->isLambda()) { // This translates AECSVT's loops 1, 3 and 4
// assert(theNucleus); // Local energy without a nucleus doesn't make sense
const G4double energy = (*i)->getEnergy(); // Store the energy of the particle
G4double locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // Initial value of local energy
G4double locEOld;
G4double deltaLocE = InteractionAvatar::locEAccuracy + 1E3;
for(G4int iterLocE=0;
const G4double energy = (*i)->getEnergy(); // Store the energy of the particle
G4double locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // Initial value of local energy
G4double locEOld;
G4double deltaLocE = InteractionAvatar::locEAccuracy + 1E3;
for(G4int iterLocE=0;
deltaLocE>InteractionAvatar::locEAccuracy && iterLocE<InteractionAvatar::maxIterLocE;
++iterLocE) {
locEOld = locE;
@@ -448,8 +448,27 @@ namespace G4INCL {
theNucleus->updatePotentialEnergy(*i); // ...update its potential energy...
locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // ...and recompute locE.
deltaLocE = std::abs(locE-locEOld);
}
}
//jlrs For lambdas and nuclei with masses higher than 19 also local energy
if(shouldUseLocalEnergy && (*i)->isLambda() && theNucleus->getA()>19) {
// assert(theNucleus); // Local energy without a nucleus doesn't make sense
const G4double energy = (*i)->getEnergy(); // Store the energy of the particle
G4double locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // Initial value of local energy
G4double locEOld;
G4double deltaLocE = InteractionAvatar::locEAccuracy + 1E3;
for(G4int iterLocE=0;
deltaLocE>InteractionAvatar::locEAccuracy && iterLocE<InteractionAvatar::maxIterLocE;
++iterLocE) {
locEOld = locE;
(*i)->setEnergy(energy + locE); // Update the energy of the particle...
(*i)->adjustMomentumFromEnergy();
theNucleus->updatePotentialEnergy(*i); // ...update its potential energy...
locE = KinematicsUtils::getLocalEnergy(theNucleus, *i); // ...and recompute locE.
deltaLocE = std::abs(locE-locEOld);
}
}
}
}
}
@@ -170,7 +170,7 @@ namespace G4INCL {
G4double gammaFromKineticEnergy(const ParticleSpecies &p, const G4double EKin) {
G4double mass;
if(p.theType==Composite)
mass = ParticleTable::getTableMass(p.theA, p.theZ);
mass = ParticleTable::getTableMass(p.theA, p.theZ, p.theS);
else
mass = ParticleTable::getTableParticleMass(p.theType);
return (1.+EKin/mass);
@@ -158,7 +158,6 @@ namespace G4INCL {
if(particle1->isDelta()) particle1->setMass(xmdel);
if(particle2->isDelta()) particle2->setMass(xmdel);
const ThreeVector &rcolnucleon1 = particle1->getPosition();
const ThreeVector &rcolnucleon2 = particle2->getPosition();
const ThreeVector rcol = (rcolnucleon1+rcolnucleon2)*0.5;
@@ -177,6 +176,7 @@ namespace G4INCL {
particle1->setHelicity(0.0);
else
particle1->setHelicity(ctet*ctet);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -157,7 +157,6 @@ namespace G4INCL {
if(particle1->isDelta()) particle1->setMass(xmdel);
if(particle2->isDelta()) particle2->setMass(xmdel);
const ThreeVector &rcolnucleon1 = particle1->getPosition();
const ThreeVector &rcolnucleon2 = particle2->getPosition();
const ThreeVector rcol = (rcolnucleon1+rcolnucleon2)*0.5;
@@ -176,6 +175,7 @@ namespace G4INCL {
particle1->setHelicity(0.0);
else
particle1->setHelicity(ctet*ctet);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -178,7 +178,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(delta);
@@ -244,7 +244,7 @@ namespace G4INCL {
particle1->setType(DeltaType);
delta->setMass(sampleDeltaMass(sqrtS));
particle1->setMass(sampleDeltaMass(sqrtS));
particle2->setType(SigmaType);
ParticleList list;
@@ -255,7 +255,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -92,7 +92,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -176,7 +176,8 @@ namespace G4INCL {
list.push_back(kaon);
list.push_back(antikaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -164,7 +164,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -56,14 +56,18 @@ namespace G4INCL {
void NKbToNKbpiChannel::fillFinalState(FinalState *fs) {
// p K0b -> p K0b pi0 (1/2)
// p K0b -> p K- pi+ (1)
// p K0b -> n K0b pi+ (1/2)
// ratio
// p K- (28) p K0b (20)
//
// p K- -> p K- pi0 (6)*
// p K- -> p K0b pi- (7)*
// p K- -> n K- pi+ (9)*
// p K- -> n K0b pi0 (6)
//
// p K0b -> p K0b pi0 (4)
// p K0b -> p K- pi+ (10)*
// p K0b -> n K0b pi+ (6)*
//
// p K- -> p K- pi0 (1/2)
// p K- -> p K0b pi- (2/3)
// p K- -> n K- pi+ (3/4)
// p K- -> n K0b pi0 (2)
Particle *nucleon;
Particle *kaon;
@@ -86,27 +90,27 @@ namespace G4INCL {
ParticleType PionType;
if(iso == 2 || iso == -2){
if(rdm*4. < 1.){
if(rdm*5. < 1.){
PionType = PiZero;
}
else if(rdm*4. < 3.){
PionType = ParticleTable::getPionType(iso);
kaon->setType(ParticleTable::getAntiKaonType(-iso/2));
}
else{
else if(rdm*2. < 1.){
PionType = ParticleTable::getPionType(iso);
nucleon->setType(ParticleTable::getNucleonType(-iso/2));
}
else{
PionType = ParticleTable::getPionType(iso);
kaon->setType(ParticleTable::getAntiKaonType(-iso/2));
}
}
else{
if(rdm*47. < 6.){
if(rdm*28. < 6.){
PionType = PiZero;
}
else if(rdm*47. < 14.){
else if(rdm*28. < 13.){
kaon->setType(ParticleTable::getAntiKaonType(iso_n));
PionType = ParticleTable::getPionType(-2*iso_n);
}
else if(rdm*47. < 23.){
else if(rdm*28. < 22.){
nucleon->setType(ParticleTable::getNucleonType(-iso_n));
PionType = ParticleTable::getPionType(2*iso_n);
}
@@ -139,7 +139,7 @@ namespace G4INCL {
if(WhichChannel == 0) max = 865;
else if(std::abs(WhichChannel) == 1) max = 1845;
else{
INCL_WARN("Bad channel choosed in Kb N To Sigma pi angulard distribution determination. Return an isotropic distribution.\n");
INCL_WARN("Bad channel chosen in Kb N To Sigma pi angular distribution determination. Return an isotropic distribution.\n");
return Random::normVector();
}
@@ -212,7 +212,7 @@ namespace G4INCL {
}
}
std::random_shuffle(isosp,isosp+npion,Random::getAdapter());
std::shuffle(isosp,isosp+npion,Random::getAdapter());
inter2Part(0.5);
}
@@ -212,7 +212,7 @@ namespace G4INCL {
}
}
std::random_shuffle(isosp,isosp+npion,Random::getAdapter());
std::shuffle(isosp,isosp+npion,Random::getAdapter());
inter2Part(0.5);
}
@@ -126,7 +126,7 @@ namespace G4INCL {
}
else if(available_iso-std::abs(iso-iso_system) == 2){
rdm = Random::shoot();
// pn pp too high (nn too low) -> PiMinus(PiPlus) pp too low (nn too high) -> PiPlus(PiMinus)
// pn pp too high (nn too low) -> PiMinus(PiPlus) pp too low (nn too high) -> PiPlus(PiMinus)
if(((iso == 0) && (rdm*0.7 < 0.3)) || ((rdm*0.60 < 0.25) && (Math::sign(iso-iso_system)*2-iso != 0)) || ((rdm*0.75 < 0.40) && (Math::sign(iso-iso_system)*2+iso != 0) && (iso != 0))){
pion->setType(ParticleTable::getPionType(Math::sign(iso-iso_system)*2));
iso_system += Math::sign(iso-iso_system)*2;
@@ -236,8 +236,6 @@ namespace G4INCL {
PhaseSpaceGenerator::generateBiased(sqrtS, list, list.size()-3, angularSlope);
// INCL_DEBUG("NN Missing " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
fs->addCreatedParticle(kaon);
@@ -209,7 +209,7 @@ namespace G4INCL {
}
}
std::random_shuffle(isosp,isosp+npion,Random::getAdapter());
std::shuffle(isosp,isosp+npion,Random::getAdapter());
inter2Part(0.5);
}
@@ -187,9 +187,8 @@ namespace G4INCL {
list.push_back(pion1);
list.push_back(pion2);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
INCL_DEBUG("NNToNLK2pi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -82,7 +82,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -134,9 +134,8 @@ namespace G4INCL {
list.push_back(kaon);
list.push_back(pion);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
INCL_DEBUG("NNToNLKpi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -132,9 +132,8 @@ namespace G4INCL {
list.push_back(kaon);
list.push_back(antikaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
INCL_DEBUG("NNToNNKKb " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -401,9 +401,8 @@ namespace G4INCL {
list.push_back(pion1);
list.push_back(pion2);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
INCL_DEBUG("NNToNSK2pi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -64,7 +64,8 @@ namespace G4INCL {
ParticleType KaonType;
const G4double rdm = Random::shoot();
// pp->pS+K0 (1/4)
// pp->pS0K+ (1/8)
// pp->pS0K+ (1/8) // HEM
// pp->pS0K+ (1/4) // Data
// pp->nS+K+ (1)
// pn->nS+K0 (1/4)
@@ -133,9 +134,8 @@ namespace G4INCL {
Particle *kaon = new Particle(KaonType,zero,rcol);
list.push_back(kaon);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
INCL_DEBUG("NNToNSK " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
fs->addModifiedParticle(particle1);
fs->addModifiedParticle(particle2);
@@ -246,7 +246,8 @@ namespace G4INCL {
list.push_back(kaon);
list.push_back(pion);
PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
INCL_DEBUG("NNToNSKpi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
@@ -214,8 +214,6 @@ namespace G4INCL {
PhaseSpaceGenerator::generateBiased(sqrtS, list, list.size()-1, angularSlope);
INCL_DEBUG("piN Missing " << (pion_initial->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
fs->addModifiedParticle(pion_initial);
fs->addModifiedParticle(nucleon_initial);
for(Int_t i=0; i<nbr_pions; i++) fs->addCreatedParticle(list[i]);
@@ -42,16 +42,17 @@
namespace G4INCL {
NuclearDensity::NuclearDensity(const G4int A, const G4int Z, InterpolationTable const * const rpCorrelationTableProton, InterpolationTable const * const rpCorrelationTableNeutron) :
NuclearDensity::NuclearDensity(const G4int A, const G4int Z, const G4int S, InterpolationTable const * const rpCorrelationTableProton, InterpolationTable const * const rpCorrelationTableNeutron, InterpolationTable const * const rpCorrelationTableLambda) :
theA(A),
theZ(Z),
theS(S),
theMaximumRadius(std::min((*rpCorrelationTableProton)(1.), (*rpCorrelationTableNeutron)(1.))),
theProtonNuclearRadius(ParticleTable::getNuclearRadius(Proton,theA,theZ))
{
std::fill(rFromP, rFromP + UnknownParticle, static_cast<InterpolationTable*>(NULL));
rFromP[Proton] = rpCorrelationTableProton;
rFromP[Neutron] = rpCorrelationTableNeutron;
rFromP[Lambda] = rpCorrelationTableNeutron;//As for neutrons
rFromP[Lambda] = rpCorrelationTableLambda;
rFromP[DeltaPlusPlus] = rpCorrelationTableProton;
rFromP[DeltaPlus] = rpCorrelationTableProton;
rFromP[DeltaZero] = rpCorrelationTableNeutron;
@@ -61,7 +62,7 @@ namespace G4INCL {
std::fill(pFromR, pFromR + UnknownParticle, static_cast<InterpolationTable*>(NULL));
pFromR[Proton] = new InterpolationTable(rFromP[Proton]->getNodeValues(), rFromP[Proton]->getNodeAbscissae());
pFromR[Neutron] = new InterpolationTable(rFromP[Neutron]->getNodeValues(), rFromP[Neutron]->getNodeAbscissae());
pFromR[Lambda] = new InterpolationTable(rFromP[Lambda]->getNodeValues(), rFromP[Lambda]->getNodeAbscissae());//As for neutrons
pFromR[Lambda] = new InterpolationTable(rFromP[Lambda]->getNodeValues(), rFromP[Lambda]->getNodeAbscissae());
pFromR[DeltaPlusPlus] = new InterpolationTable(rFromP[DeltaPlusPlus]->getNodeValues(), rFromP[DeltaPlusPlus]->getNodeAbscissae());
pFromR[DeltaPlus] = new InterpolationTable(rFromP[DeltaPlus]->getNodeValues(), rFromP[DeltaPlus]->getNodeAbscissae());
pFromR[DeltaZero] = new InterpolationTable(rFromP[DeltaZero]->getNodeValues(), rFromP[DeltaZero]->getNodeAbscissae());
@@ -74,11 +75,11 @@ namespace G4INCL {
<< '\n'
<< pFromR[Neutron]->print()
<< '\n'
<< "Interpolation table for delta++ local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
<< "Interpolation table for lambda local energy (A=" << theA << ", Z=" << theZ << ", S=" << theS << ") initialised:"
<< '\n'
<< pFromR[Lambda]->print()
<< '\n'
<< "Interpolation table for lambda local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
<< "Interpolation table for delta++ local energy (A=" << theA << ", Z=" << theZ << ") initialised:"
<< '\n'
<< pFromR[DeltaPlusPlus]->print()
<< '\n'
@@ -112,6 +113,7 @@ namespace G4INCL {
NuclearDensity::NuclearDensity(const NuclearDensity &rhs) :
theA(rhs.theA),
theZ(rhs.theZ),
theS(rhs.theS),
theMaximumRadius(rhs.theMaximumRadius),
theProtonNuclearRadius(rhs.theProtonNuclearRadius)
{
@@ -119,7 +121,7 @@ namespace G4INCL {
std::fill(rFromP, rFromP + UnknownParticle, static_cast<InterpolationTable*>(NULL));
rFromP[Proton] = rhs.rFromP[Proton];
rFromP[Neutron] = rhs.rFromP[Neutron];
rFromP[Lambda] = rhs.rFromP[Neutron];//As for neutrons
rFromP[Lambda] = rhs.rFromP[Lambda];
rFromP[DeltaPlusPlus] = rhs.rFromP[DeltaPlusPlus];
rFromP[DeltaPlus] = rhs.rFromP[DeltaPlus];
rFromP[DeltaZero] = rhs.rFromP[DeltaZero];
@@ -128,7 +130,7 @@ namespace G4INCL {
std::fill(pFromR, pFromR + UnknownParticle, static_cast<InterpolationTable*>(NULL));
pFromR[Proton] = new InterpolationTable(*(rhs.pFromR[Proton]));
pFromR[Neutron] = new InterpolationTable(*(rhs.pFromR[Neutron]));
pFromR[Lambda] = new InterpolationTable(*(rhs.pFromR[Neutron]));//As for neutrons
pFromR[Lambda] = new InterpolationTable(*(rhs.pFromR[Lambda]));
pFromR[DeltaPlusPlus] = new InterpolationTable(*(rhs.pFromR[DeltaPlusPlus]));
pFromR[DeltaPlus] = new InterpolationTable(*(rhs.pFromR[DeltaPlus]));
pFromR[DeltaZero] = new InterpolationTable(*(rhs.pFromR[DeltaZero]));
@@ -145,12 +147,13 @@ namespace G4INCL {
void NuclearDensity::swap(NuclearDensity &rhs) {
std::swap(theA, rhs.theA);
std::swap(theZ, rhs.theZ);
std::swap(theS, rhs.theS);
std::swap(theMaximumRadius, rhs.theMaximumRadius);
std::swap(theProtonNuclearRadius, rhs.theProtonNuclearRadius);
std::swap_ranges(transmissionRadius, transmissionRadius+UnknownParticle, rhs.transmissionRadius);
std::swap(rFromP[Proton], rhs.rFromP[Proton]);
std::swap(rFromP[Neutron], rhs.rFromP[Neutron]);
std::swap(rFromP[Lambda], rhs.rFromP[Neutron]);//As for neutrons
std::swap(rFromP[Lambda], rhs.rFromP[Lambda]);
std::swap(rFromP[DeltaPlusPlus], rhs.rFromP[DeltaPlusPlus]);
std::swap(rFromP[DeltaPlus], rhs.rFromP[DeltaPlus]);
std::swap(rFromP[DeltaZero], rhs.rFromP[DeltaZero]);
@@ -56,7 +56,7 @@ namespace G4INCL {
}
NuclearDensity const *createDensity(const G4int A, const G4int Z) {
NuclearDensity const *createDensity(const G4int A, const G4int Z, const G4int S) {
if(!nuclearDensityCache)
nuclearDensityCache = new std::map<G4int,NuclearDensity const *>;
@@ -65,9 +65,10 @@ namespace G4INCL {
if(mapEntry == nuclearDensityCache->end()) {
InterpolationTable *rpCorrelationTableProton = createRPCorrelationTable(Proton, A, Z);
InterpolationTable *rpCorrelationTableNeutron = createRPCorrelationTable(Neutron, A, Z);
if(!rpCorrelationTableProton || !rpCorrelationTableNeutron)
InterpolationTable *rpCorrelationTableLambda = createRPCorrelationTable(Lambda, A, Z);
if(!rpCorrelationTableProton || !rpCorrelationTableNeutron || !rpCorrelationTableLambda)
return NULL;
NuclearDensity const *density = new NuclearDensity(A, Z, rpCorrelationTableProton, rpCorrelationTableNeutron);
NuclearDensity const *density = new NuclearDensity(A, Z, S, rpCorrelationTableProton, rpCorrelationTableNeutron, rpCorrelationTableLambda);
(*nuclearDensityCache)[nuclideID] = density;
return density;
} else {
@@ -76,7 +77,7 @@ namespace G4INCL {
}
InterpolationTable *createRPCorrelationTable(const ParticleType t, const G4int A, const G4int Z) {
// assert(t==Proton || t==Neutron);
// assert(t==Proton || t==Neutron || t==Lambda);
if(!rpCorrelationTableCache)
rpCorrelationTableCache = new std::map<G4int,InterpolationTable*>;
@@ -123,7 +124,7 @@ namespace G4INCL {
}
InterpolationTable *createRCDFTable(const ParticleType t, const G4int A, const G4int Z) {
// assert(t==Proton || t==Neutron);
// assert(t==Proton || t==Neutron || t==Lambda);
if(!rCDFTableCache)
rCDFTableCache = new std::map<G4int,InterpolationTable*>;
@@ -168,7 +169,7 @@ namespace G4INCL {
}
InterpolationTable *createPCDFTable(const ParticleType t, const G4int A, const G4int Z) {
// assert(t==Proton || t==Neutron);
// assert(t==Proton || t==Neutron || t==Lambda);
if(!pCDFTableCache)
pCDFTableCache = new std::map<G4int,InterpolationTable*>;
@@ -204,7 +205,7 @@ namespace G4INCL {
}
void addRPCorrelationToCache(const G4int A, const G4int Z, const ParticleType t, InterpolationTable * const table) {
// assert(t==Proton || t==Neutron);
// assert(t==Proton || t==Neutron || t==Lambda);
if(!rpCorrelationTableCache)
rpCorrelationTableCache = new std::map<G4int,InterpolationTable*>;
@@ -102,9 +102,14 @@ namespace G4INCL {
vDeltaMinus = std::max(separationEnergyDeltaMinus + tinyMargin, 2.*vDeltaZero - vDeltaPlus);
vSigmaMinus = -16.; // Repulsive potential, from Eur. Phys.J.A. (2016) 52:21
vSigmaZero = -16.; // hypothesis: same potential for each sigma
vSigmaZero = -16.; // hypothesis: same potential for each sigma
vSigmaPlus = -16.;
vLambda = 28.;
const G4double asy = (theA - 2.*theZ)/theA;
if(asy>0.11)vLambda = 56.549-678.73*asy+4905.35*std::pow(asy,2.)-9789.1*std::pow(asy,3.); // Jose Luis Rodriguez-Sanchez et al., Rapid Communication PRC
const G4double theLambdaSeparationEnergy = ParticleTable::getSeparationEnergy(Lambda,theA,theZ);
separationEnergy[PiPlus] = theProtonSeparationEnergy - theNeutronSeparationEnergy;
separationEnergy[PiZero] = 0.;
@@ -115,16 +120,18 @@ namespace G4INCL {
separationEnergy[EtaPrime] = 0.;
separationEnergy[Photon] = 0.;
separationEnergy[Lambda] = theNeutronSeparationEnergy;
separationEnergy[SigmaPlus] = theProtonSeparationEnergy;
separationEnergy[SigmaZero] = theNeutronSeparationEnergy;
separationEnergy[SigmaMinus] = 2*theNeutronSeparationEnergy - theProtonSeparationEnergy;
separationEnergy[KPlus] = theProtonSeparationEnergy - theNeutronSeparationEnergy;
separationEnergy[KZero] = 0.;
separationEnergy[KZeroBar] = 0.;
separationEnergy[KMinus] = theNeutronSeparationEnergy - theProtonSeparationEnergy;
separationEnergy[KShort] = 0.;
separationEnergy[KLong] = 0.;
separationEnergy[Lambda] = theLambdaSeparationEnergy;
separationEnergy[SigmaPlus] = theProtonSeparationEnergy + theLambdaSeparationEnergy - theNeutronSeparationEnergy;
separationEnergy[SigmaZero] = theLambdaSeparationEnergy;
separationEnergy[SigmaMinus] = theNeutronSeparationEnergy + theLambdaSeparationEnergy - theProtonSeparationEnergy;
separationEnergy[KPlus] = theProtonSeparationEnergy - theLambdaSeparationEnergy;
separationEnergy[KZero] = (theNeutronSeparationEnergy - theLambdaSeparationEnergy);
separationEnergy[KZeroBar] = (theLambdaSeparationEnergy - theNeutronSeparationEnergy);
separationEnergy[KMinus] = 2.*theNeutronSeparationEnergy - theProtonSeparationEnergy-theLambdaSeparationEnergy;
separationEnergy[KShort] = (theNeutronSeparationEnergy - theLambdaSeparationEnergy);
separationEnergy[KLong] = (theNeutronSeparationEnergy - theLambdaSeparationEnergy);
fermiEnergy[DeltaPlusPlus] = vDeltaPlusPlus - separationEnergy[DeltaPlusPlus];
fermiEnergy[DeltaPlus] = vDeltaPlus - separationEnergy[DeltaPlus];
@@ -132,7 +139,10 @@ namespace G4INCL {
fermiEnergy[DeltaMinus] = vDeltaMinus - separationEnergy[DeltaMinus];
fermiEnergy[Lambda] = vLambda - separationEnergy[Lambda];
fermiMomentum[Lambda]=std::sqrt(std::pow(fermiEnergy[Lambda]+ml,2.0)-ml*ml);
if (fermiEnergy[Lambda] <= 0.)
fermiMomentum[Lambda]=0.;
else
fermiMomentum[Lambda]=std::sqrt(std::pow(fermiEnergy[Lambda]+ml,2.0)-ml*ml);
fermiEnergy[SigmaPlus] = vSigmaPlus - separationEnergy[SigmaPlus];
fermiEnergy[SigmaZero] = vSigmaZero - separationEnergy[SigmaZero];
@@ -99,7 +99,7 @@ namespace G4INCL {
ParticleTable::setProtonSeparationEnergy(thePotential->getSeparationEnergy(Proton));
ParticleTable::setNeutronSeparationEnergy(thePotential->getSeparationEnergy(Neutron));
theDensity = NuclearDensityFactory::createDensity(theA, theZ);
theDensity = NuclearDensityFactory::createDensity(theA, theZ, theS);
theParticleSampler->setPotential(thePotential);
theParticleSampler->setDensity(theDensity);
@@ -223,8 +223,8 @@ namespace G4INCL {
totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
else if((*p)->isResonance())
totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::effectiveNucleonMass;
else if((*p)->isLambda())
totalEnergy += (*p)->getKineticEnergy() - (*p)->getPotentialEnergy();
else if((*p)->isHyperon())
totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy() - ParticleTable::getRealMass((*p)->getType());
else
totalEnergy += (*p)->getEnergy() - (*p)->getPotentialEnergy();
}
@@ -260,7 +260,7 @@ namespace G4INCL {
thePosition = computeCenterOfMass();
theSpin -= (thePosition-initialCenterOfMass).vector(theMomentum);
setMass(ParticleTable::getTableMass(theA,theZ) + theExcitationEnergy);
setMass(ParticleTable::getTableMass(theA,theZ,theS) + theExcitationEnergy);
adjustEnergyFromMomentum();
remnant=true;
}
@@ -654,8 +654,8 @@ namespace G4INCL {
}
G4bool Nucleus::decayMe() {
// Do the phase-space decay only if Z=0 or Z=A
if(theA<=1 || (theZ!=0 && theA!=theZ))
// Do the phase-space decay only if Z=0 or N=0
if(theA<=1 || (theZ!=0 && (theA+theS)!=theZ))
return false;
ParticleList decayProducts = ClusterDecay::decay(this);
@@ -687,7 +687,7 @@ namespace G4INCL {
<< thePion->print() << '\n');
thePion->setEmissionTime(theStore->getBook().getCurrentTime());
// Correction for real masses
const G4double theQValueCorrection = thePion->getEmissionQValueCorrection(theA,theZ);
const G4double theQValueCorrection = thePion->getEmissionQValueCorrection(theA,theZ,theS);
const G4double kineticEnergyOutside = thePion->getKineticEnergy() - thePion->getPotentialEnergy() + theQValueCorrection;
thePion->setTableMass();
if(kineticEnergyOutside > 0.0)
@@ -708,7 +708,7 @@ namespace G4INCL {
}
void Nucleus::emitInsideStrangeParticles() {
/* Forcing emissions of all strange particles exept Lambda particles in the nucleus.
/* Forcing emissions of Sigmas and antiKaons.
* This probably violates energy conservation
* (although the computation of the recoil kinematics
* might sweep this under the carpet).
@@ -728,7 +728,7 @@ namespace G4INCL {
<< theParticle->print() << '\n');
theParticle->setEmissionTime(theStore->getBook().getCurrentTime());
// Correction for real masses
const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(theA,theZ); // Does it work for strange particles? should be check
const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? should be check
const G4double kineticEnergyOutside = theParticle->getKineticEnergy() - theParticle->getPotentialEnergy() + theQValueCorrection;
theParticle->setTableMass();
if(kineticEnergyOutside > 0.0)
@@ -771,7 +771,7 @@ namespace G4INCL {
<< theLambda->print() << '\n');
theLambda->setEmissionTime(theStore->getBook().getCurrentTime());
// Correction for real masses
const G4double theQValueCorrection = theLambda->getEmissionQValueCorrection(theA,theZ); // Does it work for strange particles? Should be check
const G4double theQValueCorrection = theLambda->getEmissionQValueCorrection(theA,theZ,theS); // Does it work for strange particles? Should be check
const G4double kineticEnergyOutside = theLambda->getKineticEnergy() - theLambda->getPotentialEnergy() + theQValueCorrection;
theLambda->setTableMass();
if(kineticEnergyOutside > 0.0)
@@ -794,7 +794,7 @@ namespace G4INCL {
}
G4bool Nucleus::emitInsideKaon() {
/* Forcing emissions of all Kaon in the nucleus.
/* Forcing emissions of all Kaon (not antiKaons) in the nucleus.
* This probably violates energy conservation
* (although the computation of the recoil kinematics
* might sweep this under the carpet).
@@ -814,7 +814,7 @@ namespace G4INCL {
<< theKaon->print() << '\n');
theKaon->setEmissionTime(theStore->getBook().getCurrentTime());
// Correction for real masses
const G4double theQValueCorrection = theKaon->getEmissionQValueCorrection(theA,theZ);
const G4double theQValueCorrection = theKaon->getEmissionQValueCorrection(theA,theZ,theS);
const G4double kineticEnergyOutside = theKaon->getKineticEnergy() - theKaon->getPotentialEnergy() + theQValueCorrection;
theKaon->setTableMass();
if(kineticEnergyOutside > 0.0)
@@ -833,6 +833,7 @@ namespace G4INCL {
theStore->addToOutgoing(*i);
(*i)->setParticleBias(Particle::getTotalBias());
}
theNKaon -= 1;
return toEject.size() != 0;
}
@@ -1166,7 +1167,7 @@ namespace G4INCL {
for(ParticleIter i=outgoingParticles.begin(), e=outgoingParticles.end(); i!=e; ++i ) {
theBalance.Z -= (*i)->getZ();
theBalance.A -= (*i)->getA();
theBalance.S += (*i)->getS();
theBalance.S -= (*i)->getS();
// For outgoing clusters, the total energy automatically includes the
// excitation energy
theBalance.energy -= (*i)->getEnergy(); // Note that outgoing particles should have the real mass
@@ -1177,10 +1178,9 @@ namespace G4INCL {
if(theProjectileRemnant && theProjectileRemnant->getA()>0) {
theBalance.Z -= theProjectileRemnant->getZ();
theBalance.A -= theProjectileRemnant->getA();
theBalance.S += theProjectileRemnant->getS();
theBalance.energy -= ParticleTable::getTableMass(theProjectileRemnant->getA(),theProjectileRemnant->getZ()) +
theBalance.S -= theProjectileRemnant->getS();
theBalance.energy -= ParticleTable::getTableMass(theProjectileRemnant->getA(),theProjectileRemnant->getZ(),theProjectileRemnant->getS()) +
theProjectileRemnant->getExcitationEnergy();
if(theProjectileRemnant->getS() != 0) theBalance.energy -= theProjectileRemnant->getS()*(ParticleTable::effectiveNucleonMass - ParticleTable::effectiveLambdaMass); // Trick because hypernuclus mass unkown
theBalance.energy -= theProjectileRemnant->getKineticEnergy();
theBalance.momentum -= theProjectileRemnant->getMomentum();
}
@@ -1189,10 +1189,9 @@ namespace G4INCL {
if(hasRemnant()) {
theBalance.Z -= getZ();
theBalance.A -= getA();
theBalance.S += getS();
theBalance.energy -= ParticleTable::getTableMass(getA(),getZ()) +
theBalance.S -= getS();
theBalance.energy -= ParticleTable::getTableMass(getA(),getZ(),getS()) +
getExcitationEnergy();
if(getS() != 0) theBalance.energy -= getS()*(ParticleTable::effectiveNucleonMass - ParticleTable::effectiveLambdaMass); // Trick because hypernuclus mass unkown
if(afterRecoil)
theBalance.energy -= getKineticEnergy();
theBalance.momentum -= getMomentum();
@@ -1219,7 +1218,7 @@ namespace G4INCL {
// Compute the excitation energy from the invariant mass
const G4double anExcitationEnergy = aMass
- ParticleTable::getTableMass(prA, theProjectileRemnant->getZ());
- ParticleTable::getTableMass(prA, theProjectileRemnant->getZ(), theProjectileRemnant->getS());
// Set the excitation energy
theProjectileRemnant->setExcitationEnergy(anExcitationEnergy);
@@ -53,7 +53,7 @@ namespace G4INCL {
// Behaves slightly differency if a third body (the projectile) is present
G4bool isNN = theNucleus->isNucleusNucleusCollision();
/* Corrections to the energy of the entering nucleon
/* Corrections to the energy of the entering particle
*
* In particle-nucleus reactions, the goal of this correction is to satisfy
* energy conservation in particle-nucleus reactions using real particle
@@ -82,7 +82,7 @@ namespace G4INCL {
*/
G4double theCorrection;
if(isNN) {
// assert(theParticle->isNucleon());
// assert(theParticle->isNucleonorLambda()); // Possible hypernucleus projectile of inverse kinematic
ProjectileRemnant * const projectileRemnant = theNucleus->getProjectileRemnant();
// assert(projectileRemnant);
@@ -125,14 +125,15 @@ namespace G4INCL {
// const G4double theProjectileExcitationEnergy = 0.;
// The part that follows is common to model 3. and 4.
const G4double theProjectileEffectiveMass =
ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ())
ParticleTable::getTableMass(projectileRemnant->getA() - theParticle->getA(), projectileRemnant->getZ() - theParticle->getZ(), projectileRemnant->getS() - theParticle->getS())
+ theProjectileExcitationEnergy;
const ThreeVector &theProjectileMomentum = projectileRemnant->getMomentum() - theParticle->getMomentum();
const G4double theProjectileEnergy = std::sqrt(theProjectileMomentum.mag2() + theProjectileEffectiveMass*theProjectileEffectiveMass);
const G4double theProjectileCorrection = theProjectileEnergy - (projectileRemnant->getEnergy() - theParticle->getEnergy());
theCorrection = theParticle->getEmissionQValueCorrection(
theNucleus->getA() + theParticle->getA(),
theNucleus->getZ() + theParticle->getZ())
theNucleus->getZ() + theParticle->getZ(),
theNucleus->getS() + theParticle->getS())
+ theParticle->getTableMass() - theParticle->getINCLMass()
+ theProjectileCorrection;
// end of part common to model 3. and 4.
@@ -142,8 +143,10 @@ namespace G4INCL {
} else {
const G4int ACN = theNucleus->getA() + theParticle->getA();
const G4int ZCN = theNucleus->getZ() + theParticle->getZ();
const G4int SCN = theNucleus->getS() + theParticle->getS();
// Correction to the Q-value of the entering particle
theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN);
if(theParticle->isKaon()) theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN,theNucleus->getS());
else theCorrection = theParticle->getEmissionQValueCorrection(ACN,ZCN,SCN);
INCL_DEBUG("The following Particle enters with correction " << theCorrection << '\n'
<< theParticle->print() << '\n');
}
@@ -154,12 +157,12 @@ namespace G4INCL {
if(!success) {
fs->makeParticleBelowZero();
} else if(theParticle->isNucleon() &&
} else if(theParticle->isNucleonorLambda() &&
theParticle->getKineticEnergy()<theNucleus->getPotential()->getFermiEnergy(theParticle)) {
// If the participant is a nucleon entering below its Fermi energy, force a
// compound nucleus
fs->makeParticleBelowFermi();
}
} else if(theParticle->isKaon()) theNucleus->setNumberOfKaon(theNucleus->getNumberOfKaon()+1);
fs->setTotalEnergyBeforeInteraction(energyBefore);
}
@@ -57,6 +57,7 @@ namespace G4INCL {
const ThreeVector collisionAxis = pInVec/pIn;
const ThreeVector pMomVec = biasMe->getMomentum();
const G4double pMom = pMomVec.mag();
if(pMom ==0.) return;
const G4double pMomCosAng = pMomVec.dot(collisionAxis)/pMom;
const G4double pMomAng = Math::arcCos(pMomCosAng); // Angle between the original axis of the dominant particle and is new one after generate
@@ -101,7 +102,8 @@ namespace G4INCL {
biasMe = particles[index];
const ThreeVector pInVec = biasMe->getMomentum();
generate(sqrtS, particles);
bias(particles, pInVec, slope);
// Extremely rare event try to bias with vector null
if(pInVec.mag() != 0.) bias(particles, pInVec, slope);
}
void setPhaseSpaceGenerator(IPhaseSpaceGenerator *g) {
@@ -69,7 +69,7 @@ namespace G4INCL {
const size_t N = particles.size();
masses.resize(N);
sumMasses.resize(N);
std::transform(particles.begin(), particles.end(), masses.begin(), std::mem_fun(&Particle::getMass));
std::transform(particles.begin(), particles.end(), masses.begin(), std::mem_fn(&Particle::getMass));
std::partial_sum(masses.begin(), masses.end(), sumMasses.begin());
G4double PFragMagCM = 0.0;
@@ -240,7 +240,7 @@ namespace G4INCL {
// masses and sum of masses
masses.resize(nParticles);
sumMasses.resize(nParticles);
std::transform(particles.begin(), particles.end(), masses.begin(), std::mem_fun(&Particle::getMass));
std::transform(particles.begin(), particles.end(), masses.begin(), std::mem_fn(&Particle::getMass));
std::partial_sum(masses.begin(), masses.end(), sumMasses.begin());
// sanity check
@@ -269,7 +269,7 @@ namespace G4INCL {
}
}
std::random_shuffle(isosp,isosp+npion,Random::getAdapter()); // isospin randomly distributed
std::shuffle(isosp,isosp+npion,Random::getAdapter()); // isospin randomly distributed
}
}
@@ -147,17 +147,19 @@ namespace G4INCL {
G4double theNewEnergy = theEnergy;
G4int theNewA = theA;
G4int theNewZ = theZ;
G4int theNewS = theS;
for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
// assert((*p)->isNucleon());
// assert((*p)->isNucleonorLambda());
// Add the initial (off-shell) momentum and energy to the projectile remnant
theNewMomentum += getStoredMomentum(*p);
theNewEnergy += (*p)->getEnergy();
theNewA += (*p)->getA();
theNewZ += (*p)->getZ();
theNewS += (*p)->getS();
}
// Check that the excitation energy of the new projectile remnant is non-negative
const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ);
const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ,theNewS);
const G4double theNewExcitationEnergy = computeExcitationEnergyWith(pL);
const G4double theNewEffectiveMass = theNewMass + theNewExcitationEnergy;
@@ -182,6 +184,7 @@ namespace G4INCL {
theA = theNewA;
theZ = theNewZ;
theS = theNewS;
theMomentum = theNewMomentum * scalingFactor;
theEnergy = theNewEnergy;
@@ -199,17 +202,19 @@ namespace G4INCL {
G4double theNewEnergy = theEnergy;
G4int theNewA = theA;
G4int theNewZ = theZ;
G4int theNewS = theS;
for(ParticleIter p=pL.begin(), e=pL.end(); p!=e; ++p) {
// assert((*p)->isNucleon());
// assert((*p)->isNucleonorLambda());
// Add the initial (off-shell) momentum and energy to the projectile remnant
theNewMomentum += getStoredMomentum(*p);
theNewEnergy += (*p)->getEnergy();
theNewA += (*p)->getA();
theNewZ += (*p)->getZ();
theNewS += (*p)->getS();
}
// Check that the excitation energy of the new projectile remnant is non-negative
const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ);
const G4double theNewMass = ParticleTable::getTableMass(theNewA,theNewZ,theNewS);
const G4double theNewInvariantMassSquared = theNewEnergy*theNewEnergy-theNewMomentum.mag2();
G4bool positiveExcitationEnergy = false;
@@ -226,7 +231,7 @@ namespace G4INCL {
ParticleMutableIter best = pL.end();
ThreeVector bestMomentum;
G4double bestEnergy = -1.;
G4int bestA = -1, bestZ = -1;
G4int bestA = -1, bestZ = -1, bestS = 0;
for(ParticleList::iterator p=pL.begin(), e=pL.end(); p!=e; ++p) {
// Subtract the initial (off-shell) momentum and energy from the new
// projectile remnant
@@ -234,8 +239,9 @@ namespace G4INCL {
const G4double theNewerEnergy = theNewEnergy - (*p)->getEnergy();
const G4int theNewerA = theNewA - (*p)->getA();
const G4int theNewerZ = theNewZ - (*p)->getZ();
const G4int theNewerS = theNewS - (*p)->getS();
const G4double theNewerMass = ParticleTable::getTableMass(theNewerA,theNewerZ);
const G4double theNewerMass = ParticleTable::getTableMass(theNewerA,theNewerZ,theNewerS);
const G4double theNewerInvariantMassSquared = theNewerEnergy*theNewerEnergy-theNewerMomentum.mag2();
if(theNewerInvariantMassSquared>=-1.e-5) {
@@ -250,6 +256,7 @@ namespace G4INCL {
bestEnergy = theNewerEnergy;
bestA = theNewerA;
bestZ = theNewerZ;
bestS = theNewerS;
}
}
}
@@ -264,6 +271,7 @@ namespace G4INCL {
theNewEnergy = bestEnergy;
theNewA = bestA;
theNewZ = bestZ;
theNewS = bestS;
if(maxExcitationEnergy>0.) {
// Stop here
@@ -277,6 +285,7 @@ namespace G4INCL {
}
theA = theNewA;
theZ = theNewZ;
theS = theNewS;
theMomentum = theNewMomentum;
theEnergy = theNewEnergy;
@@ -293,7 +302,7 @@ namespace G4INCL {
const G4double theNewEnergy = theEnergy + oldEnergy;
// Check that the excitation energy of the new projectile remnant is non-negative
const G4double theNewMass = ParticleTable::getTableMass(theA+p->getA(),theZ+p->getZ());
const G4double theNewMass = ParticleTable::getTableMass(theA+p->getA(),theZ+p->getZ(),theS+p->getS());
const G4double theNewInvariantMassSquared = theNewEnergy*theNewEnergy-theNewMomentum.mag2();
if(theNewInvariantMassSquared<0.)
@@ -142,7 +142,7 @@ namespace G4INCL {
theNucleus->setIncomingAngularMomentum(p->getAngularMomentum());
theNucleus->setIncomingMomentum(p->getMomentum());
theNucleus->setInitialEnergy(p->getEnergy()
+ ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ()));
+ ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ(),theNucleus->getS()));
// Reset the particle kinematics to the INCL values
p->setINCLMass();
@@ -204,7 +204,7 @@ namespace G4INCL {
theNucleus->setIncomingAngularMomentum(pr->getAngularMomentum());
theNucleus->setIncomingMomentum(pr->getMomentum());
theNucleus->setInitialEnergy(pr->getEnergy()
+ ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ()));
+ ParticleTable::getTableMass(theNucleus->getA(),theNucleus->getZ(),theNucleus->getS()));
generateAllAvatars();
firstAvatar = false;
@@ -116,7 +116,7 @@ namespace G4INCL {
if(candidateCluster != 0 &&
Clustering::clusterCanEscape(theNucleus, candidateCluster)) {
INCL_DEBUG("Cluster algorithm succeded. Candidate cluster:" << '\n' << candidateCluster->print() << '\n');
INCL_DEBUG("Cluster algorithm succeeded. Candidate cluster:" << '\n' << candidateCluster->print() << '\n');
// Check if the cluster can penetrate the Coulomb barrier
const G4double clusterTransmissionProbability = getTransmissionProbability(candidateCluster);
@@ -152,6 +152,7 @@ namespace G4INCL {
if(x <= transmissionProbability) { // Transmission
INCL_DEBUG("Particle " << theParticle->getID() << " passes the Coulomb barrier, transmitting." << '\n');
if(theParticle->isKaon()) theNucleus->setNumberOfKaon(theNucleus->getNumberOfKaon()-1);
if(theNucleus->getStore()->getConfig()->getRefraction()) {
return new TransmissionChannel(theNucleus, theParticle, kOut, cosR);
} else {
@@ -207,7 +208,8 @@ namespace G4INCL {
// Correction to the particle kinetic energy if using real masses
const G4int theA = theNucleus->getA();
const G4int theZ = theNucleus->getZ();
const G4double correction = particle->getEmissionQValueCorrection(theA, theZ);
const G4int theS = theNucleus->getS();
const G4double correction = particle->getEmissionQValueCorrection(theA, theZ, theS);
particleTOut = particle->getKineticEnergy() + correction;
if (particleTOut <= V) // No transmission if total energy < 0
@@ -75,7 +75,8 @@ namespace G4INCL {
// Correction for real masses
const G4int AParent = theNucleus->getA();
const G4int ZParent = theNucleus->getZ();
const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(AParent,ZParent);
const G4int SParent = theNucleus->getS();
const G4double theQValueCorrection = theParticle->getEmissionQValueCorrection(AParent,ZParent,SParent);
TOut += theQValueCorrection;
return TOut;
}
@@ -112,15 +113,13 @@ namespace G4INCL {
void TransmissionChannel::fillFinalState(FinalState *fs) {
G4double initialEnergy = 0.0;
initialEnergy = theParticle->getEnergy() - theParticle->getPotentialEnergy();
// Correction for real masses
const G4int AParent = theNucleus->getA();
const G4int ZParent = theNucleus->getZ();
const G4int SParent = theNucleus->getS();
initialEnergy += theParticle->getTableMass() - theParticle->getMass()
+ theParticle->getEmissionQValueCorrection(AParent,ZParent);
+ theParticle->getEmissionQValueCorrection(AParent,ZParent,SParent);
particleLeaves();
fs->setTotalEnergyBeforeInteraction(initialEnergy);
fs->addOutgoingParticle(theParticle); // We write the particle down as outgoing
}