Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -96,7 +96,7 @@ public:
|
||||
if (ip < 3 && izone < number_of_zones) {
|
||||
G4double pf = fermi_momenta[ip - 1][izone];
|
||||
G4double mass = ip == 1 ? 0.93827 : 0.93957;
|
||||
ekin = sqrt(pf * pf + mass * mass) - mass;
|
||||
ekin = std::sqrt(pf * pf + mass * mass) - mass;
|
||||
};
|
||||
|
||||
return ekin;
|
||||
|
||||
+3
-3
@@ -62,7 +62,7 @@ public:
|
||||
particleType(type) {
|
||||
|
||||
particleMass = getParticleMass(type);
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[0] = std::sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + particleMass * particleMass);
|
||||
valid_particle = true;
|
||||
};
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
particleMass = getParticleMass(type);
|
||||
momentum.resize(4);
|
||||
momentum[0] = ekin + particleMass;
|
||||
momentum[3] = sqrt(momentum[0] * momentum[0] - particleMass * particleMass);
|
||||
momentum[3] = std::sqrt(momentum[0] * momentum[0] - particleMass * particleMass);
|
||||
momentum[1] = momentum[2] = 0.0;
|
||||
valid_particle = true;
|
||||
};
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
void setMomentum(const std::vector<G4double>& mom) {
|
||||
|
||||
momentum = mom;
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[0] = std::sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + particleMass * particleMass);
|
||||
valid_particle = true;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
setNucleiMass();
|
||||
std::vector<G4double> mom(4, 0.0);
|
||||
mom[0] = ekin + nucleiMass;
|
||||
mom[3] = sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass);
|
||||
mom[3] = std::sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass);
|
||||
G4InuclParticle::setMomentum(mom);
|
||||
exitationEnergy = 0.0;
|
||||
};
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
|
||||
void setEnergy() {
|
||||
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[0] = std::sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3] + nucleiMass * nucleiMass);
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
G4double getMomModule() const {
|
||||
|
||||
return sqrt(momentum[1] * momentum[1] +
|
||||
return std::sqrt(momentum[1] * momentum[1] +
|
||||
momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3]);
|
||||
};
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
G4cout << " px " << momentum[1] << " py " << momentum[2] <<
|
||||
" pz " << momentum[3] <<
|
||||
" pmod " << sqrt(momentum[1] * momentum[1] +
|
||||
" pmod " << std::sqrt(momentum[1] * momentum[1] +
|
||||
momentum[2] * momentum[2] +
|
||||
momentum[3] * momentum[3])
|
||||
<< " E " << momentum[0] << G4endl;
|
||||
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
const G4double small = 0.001;
|
||||
|
||||
if(fabs(z - nuclz) < small) {
|
||||
if(std::fabs(z - nuclz) < small) {
|
||||
G4bool here = false;
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize; i++) {
|
||||
|
||||
if(fabs(simulated_as[i] - a) < small) {
|
||||
if(std::fabs(simulated_as[i] - a) < small) {
|
||||
simulated_cs[i] += 1.0;
|
||||
here = true;
|
||||
break;
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
G4int nev) {
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize ; i++) {
|
||||
double err = sqrt(simulated_cs[i]) / simulated_cs[i];
|
||||
double err = std::sqrt(simulated_cs[i]) / simulated_cs[i];
|
||||
|
||||
simulated_prob.push_back(simulated_cs[i] / nev);
|
||||
simulated_cs[i] *= csec / nev;
|
||||
@@ -162,12 +162,12 @@ public:
|
||||
G4int simulatedAsSize = simulated_as.size();
|
||||
for(G4int i = 0; i < simulatedAsSize; i++) {
|
||||
|
||||
if(fabs(simulated_as[i] - a) < small) {
|
||||
if(std::fabs(simulated_as[i] - a) < small) {
|
||||
G4double rat = simulated_cs[i] / exper_cs[iz];
|
||||
|
||||
lhood += log10(rat) * log10(rat);
|
||||
lhood += std::log10(rat) * std::log10(rat);
|
||||
|
||||
G4double rat_err = sqrt(simulated_errors[i] * simulated_errors[i] +
|
||||
G4double rat_err = std::sqrt(simulated_errors[i] * simulated_errors[i] +
|
||||
exper_err[iz] * exper_err[iz] * rat * rat) / exper_cs[iz];
|
||||
average_ratio += rat;
|
||||
aver_rat_err += rat_err;
|
||||
@@ -211,9 +211,9 @@ public:
|
||||
if(matched > 0) {
|
||||
aver_lhood = lhood;
|
||||
aver_matched = matched;
|
||||
lhood = pow(10.0, sqrt(lhood / matched));
|
||||
lhood = std::pow(10.0, std::sqrt(lhood / matched));
|
||||
|
||||
G4cout << " matched " << matched << " CHSQ " << sqrt(izotop_chsq) / matched
|
||||
G4cout << " matched " << matched << " CHSQ " << std::sqrt(izotop_chsq) / matched
|
||||
<< G4endl
|
||||
<< " raw chsq " << izotop_chsq << G4endl
|
||||
<< " average ratio " << average_ratio / matched
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
G4double pf = fermi_momenta[ip - 1][izone];
|
||||
G4double mass = ip == 1 ? 0.93827 : 0.93957;
|
||||
|
||||
ekin = sqrt(pf * pf + mass * mass) - mass;
|
||||
ekin = std::sqrt(pf * pf + mass * mass) - mass;
|
||||
};
|
||||
|
||||
return ekin;
|
||||
|
||||
@@ -49,7 +49,7 @@ G4Analyser::G4Analyser()
|
||||
|
||||
withNuclei = false;
|
||||
fissy_prob = 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
void G4Analyser::setInelCsec(G4double csec,
|
||||
G4bool withn) {
|
||||
@@ -76,7 +76,7 @@ void G4Analyser::setWatchers(const std::vector<G4NuclWatcher>& watchers) {
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " watchers set " << watchers.size() << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void G4Analyser::try_watchers(G4double a,
|
||||
G4double z,
|
||||
@@ -95,9 +95,9 @@ void G4Analyser::try_watchers(G4double a,
|
||||
} else {
|
||||
|
||||
if (!ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
@@ -193,15 +193,15 @@ void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
} else {
|
||||
averageNeutronNumber += 1.0;
|
||||
averageNeutronKinEnergy += particles[i].getKineticEnergy();
|
||||
};
|
||||
}
|
||||
|
||||
} else if (particles[i].pion()) {
|
||||
averagePionKinEnergy += particles[i].getKineticEnergy();
|
||||
averagePionNumber += 1.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::printResultsSimple() {
|
||||
|
||||
@@ -229,8 +229,8 @@ void G4Analyser::printResultsSimple() {
|
||||
<< " average num of fragments " << averageNucleiFragments / eventNumber << G4endl;
|
||||
G4cout << " fission prob. " << fissy_prob / eventNumber << " c.sec " <<
|
||||
inel_csec * fissy_prob / eventNumber << G4endl;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::printResults() {
|
||||
|
||||
@@ -265,8 +265,8 @@ void G4Analyser::printResults() {
|
||||
G4cout << " fission prob. " << fissy_prob / eventNumber << " c.sec " <<
|
||||
inel_csec * fissy_prob / eventNumber << G4endl;
|
||||
handleWatcherStatistics();
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::handleWatcherStatistics() {
|
||||
|
||||
@@ -315,10 +315,10 @@ void G4Analyser::handleWatcherStatistics() {
|
||||
};
|
||||
|
||||
if (checked > 0.0) {
|
||||
gl_chsq = sqrt(gl_chsq) / checked;
|
||||
gl_chsq = std::sqrt(gl_chsq) / checked;
|
||||
averat /= checked;
|
||||
ave_err /= checked;
|
||||
fgr = pow(10.0, sqrt(fgr / checked));
|
||||
fgr = std::pow(10.0, std::sqrt(fgr / checked));
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -347,6 +347,4 @@ void G4Analyser::printResultsNtuple() {
|
||||
averageNeutronKinEnergy / (averageNeutronNumber + 1.0e-10) << " " <<
|
||||
averagePionNumber / eventNumber << " " <<
|
||||
averagePionKinEnergy / (averagePionNumber + 1.0e-10) << G4endl;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ G4BertiniNucleiModel::G4BertiniNucleiModel()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BertiniNucleiModel::G4BertiniNucleiModel" << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
G4double z) {
|
||||
@@ -66,12 +66,12 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
/// set binding energies
|
||||
|
||||
G4double dm = bindingEnergy(a, z);
|
||||
binding_energies.push_back(0.001 * fabs(bindingEnergy(a - 1, z - 1) - dm)); /// for P
|
||||
binding_energies.push_back(0.001 * fabs(bindingEnergy(a - 1, z) - dm)); /// for N
|
||||
binding_energies.push_back(0.001 * std::fabs(bindingEnergy(a - 1, z - 1) - dm)); /// for P
|
||||
binding_energies.push_back(0.001 * std::fabs(bindingEnergy(a - 1, z) - dm)); /// for N
|
||||
|
||||
G4double CU = cuu * pow(a, one_third);
|
||||
G4double CU = cuu * std::pow(a, one_third);
|
||||
G4double D1 = CU / AU;
|
||||
G4double D = exp(-D1);
|
||||
G4double D = std::exp(-D1);
|
||||
G4double CU2 = 0.0;
|
||||
|
||||
if (a > 3.5) { /// a > 3
|
||||
@@ -84,8 +84,8 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
ur.push_back(-D1);
|
||||
|
||||
for (G4int i = 0; i < number_of_zones; i++) {
|
||||
/// G4double y = log((1.0 + D) / alfa6[i] - 1.0);
|
||||
G4double y = log((1.0 + D)/alfa3[i] - 1.0);
|
||||
/// G4double y = std::log((1.0 + D) / alfa6[i] - 1.0);
|
||||
G4double y = std::log((1.0 + D)/alfa3[i] - 1.0);
|
||||
zone_radii.push_back(CU + AU * y);
|
||||
ur.push_back(y);
|
||||
};
|
||||
@@ -95,10 +95,10 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
icase = 1;
|
||||
ur.push_back(0.0);
|
||||
G4double CU1 = CU * CU;
|
||||
CU2 = sqrt(CU1 * (1.0 - 1.0 / a) + 6.4);
|
||||
CU2 = std::sqrt(CU1 * (1.0 - 1.0 / a) + 6.4);
|
||||
|
||||
for (G4int i = 0; i < number_of_zones; i++) {
|
||||
G4double y = sqrt(-log(alfa3[i]));
|
||||
G4double y = std::sqrt(-std::log(alfa3[i]));
|
||||
zone_radii.push_back(CU2 * y);
|
||||
ur.push_back(y);
|
||||
};
|
||||
@@ -121,8 +121,8 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
|
||||
v.push_back(v0);
|
||||
tot_vol += v0;
|
||||
v0 = (i == 0 ? pow(zone_radii[i], G4double(3)) : pow(zone_radii[i], G4double(3)) -
|
||||
pow(zone_radii[i - 1], G4double(3)));
|
||||
v0 = (i == 0 ? std::pow(zone_radii[i], G4double(3)) : std::pow(zone_radii[i], G4double(3)) -
|
||||
std::pow(zone_radii[i - 1], G4double(3)));
|
||||
v1.push_back(v0);
|
||||
};
|
||||
|
||||
@@ -135,7 +135,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mproton + binding_energies[0]);
|
||||
};
|
||||
@@ -153,7 +153,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mneutron + binding_energies[1]);
|
||||
};
|
||||
@@ -168,7 +168,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
} else { /// a < 4
|
||||
number_of_zones = 1;
|
||||
zone_radii.push_back(radForSmall);
|
||||
G4double vol = 1.0 / piTimes4thirds / pow(zone_radii[0], G4double(3));
|
||||
G4double vol = 1.0 / piTimes4thirds / std::pow(zone_radii[0], G4double(3));
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
@@ -177,7 +177,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = vol;
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mproton + binding_energies[0]);
|
||||
};
|
||||
@@ -194,7 +194,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = vol;
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mneutron + binding_energies[1]);
|
||||
};
|
||||
@@ -225,7 +225,7 @@ G4double G4BertiniNucleiModel::volNumInt(G4double r1,
|
||||
const G4int itry_max = 1000;
|
||||
G4double d2 = 2.0 * d1;
|
||||
G4double dr = r2 - r1;
|
||||
G4double fi = 0.5 * (r1 * (r1 + d2) / (1.0 + exp(r1)) + r2 * (r2 + d2) / (1.0 + exp(r2)));
|
||||
G4double fi = 0.5 * (r1 * (r1 + d2) / (1.0 + std::exp(r1)) + r2 * (r2 + d2) / (1.0 + std::exp(r2)));
|
||||
G4double fun1 = fi * dr;
|
||||
G4double fun;
|
||||
G4double jc = 1;
|
||||
@@ -237,16 +237,16 @@ G4double G4BertiniNucleiModel::volNumInt(G4double r1,
|
||||
itry++;
|
||||
G4double r = r1 - dr;
|
||||
fi = 0.0;
|
||||
G4int jc1 = G4int(pow(G4double(2.0), jc - 1) + 0.1);
|
||||
G4int jc1 = G4int(std::pow(G4double(2.0), jc - 1) + 0.1);
|
||||
|
||||
for (G4int i = 0; i < jc1; i++) {
|
||||
r += dr1;
|
||||
fi += r * (r + d2) / (1.0 + exp(r));
|
||||
fi += r * (r + d2) / (1.0 + std::exp(r));
|
||||
};
|
||||
|
||||
fun = 0.5 * fun1 + fi * dr;
|
||||
|
||||
if (fabs((fun - fun1) / fun) > epsilon) {
|
||||
if (std::fabs((fun - fun1) / fun) > epsilon) {
|
||||
jc++;
|
||||
dr1 = dr;
|
||||
fun1 = fun;
|
||||
@@ -264,7 +264,7 @@ G4double G4BertiniNucleiModel::volNumInt(G4double r1,
|
||||
|
||||
}
|
||||
|
||||
return au3 * (fun + d1 * d1 * log((1.0 + exp(-r1)) / (1.0 + exp(-r2))));
|
||||
return au3 * (fun + d1 * d1 * std::log((1.0 + std::exp(-r1)) / (1.0 + std::exp(-r2))));
|
||||
}
|
||||
|
||||
G4double G4BertiniNucleiModel::volNumInt1(G4double r1,
|
||||
@@ -278,7 +278,7 @@ G4double G4BertiniNucleiModel::volNumInt1(G4double r1,
|
||||
const G4double epsilon = 1.0e-3;
|
||||
const G4int itry_max = 1000;
|
||||
G4double dr = r2 - r1;
|
||||
G4double fi = 0.5 * (r1 * r1 * exp(-r1 * r1) + r2 * r2 * exp(-r2 * r2));
|
||||
G4double fi = 0.5 * (r1 * r1 * std::exp(-r1 * r1) + r2 * r2 * std::exp(-r2 * r2));
|
||||
G4double fun1 = fi * dr;
|
||||
G4double fun;
|
||||
G4double jc = 1;
|
||||
@@ -290,16 +290,16 @@ G4double G4BertiniNucleiModel::volNumInt1(G4double r1,
|
||||
itry++;
|
||||
G4double r = r1 - dr;
|
||||
fi = 0.0;
|
||||
G4int jc1 = G4int(pow(2.0, jc - 1) + 0.1);
|
||||
G4int jc1 = G4int(std::pow(2.0, jc - 1) + 0.1);
|
||||
|
||||
for (G4int i = 0; i < jc1; i++) {
|
||||
r += dr1;
|
||||
fi += r * r * exp(-r * r);
|
||||
fi += r * r * std::exp(-r * r);
|
||||
};
|
||||
|
||||
fun = 0.5 * fun1 + fi * dr;
|
||||
|
||||
if (fabs((fun - fun1) / fun) > epsilon) {
|
||||
if (std::fabs((fun - fun1) / fun) > epsilon) {
|
||||
jc++;
|
||||
dr1 = dr;
|
||||
fun1 = fun;
|
||||
@@ -315,7 +315,7 @@ G4double G4BertiniNucleiModel::volNumInt1(G4double r1,
|
||||
|
||||
}
|
||||
|
||||
return pow(cu2, G4double(3)) * fun;
|
||||
return std::pow(cu2, G4double(3)) * fun;
|
||||
}
|
||||
|
||||
void G4BertiniNucleiModel::printModel() const {
|
||||
@@ -339,7 +339,7 @@ void G4BertiniNucleiModel::printModel() const {
|
||||
getFermiMomentum(2,i) << " VP " << getPotential(2,i) << G4endl
|
||||
<< " pions: VP " << getPotential(3,i) << G4endl;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
G4InuclElementaryParticle G4BertiniNucleiModel::generateNucleon(G4int type,
|
||||
G4int zone) const {
|
||||
@@ -349,14 +349,14 @@ G4InuclElementaryParticle G4BertiniNucleiModel::generateNucleon(G4int type,
|
||||
}
|
||||
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
///G4double pmod = getFermiMomentum(type, zone) * pow(inuclRndm(), one_third);
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * pow(inuclRndm(), one_third);
|
||||
///G4double pmod = getFermiMomentum(type, zone) * std::pow(inuclRndm(), one_third);
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * std::pow(inuclRndm(), one_third);
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double pt = pmod * COS_SIN.second;
|
||||
mom[1] = pt * cos(FI);
|
||||
mom[2] = pt * sin(FI);
|
||||
mom[1] = pt * std::cos(FI);
|
||||
mom[2] = pt * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
|
||||
return G4InuclElementaryParticle(mom, type);
|
||||
@@ -406,11 +406,11 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
const G4double huge_num = 50.0;
|
||||
const G4double pn_spec = 1.0;
|
||||
///const G4double pn_spec = 0.5;
|
||||
///const G4double young_cut = sqrt(10.0) * 0.1;
|
||||
///const G4double young_cut = sqrt(10.0) * 0.5;
|
||||
///const G4double young_cut = sqrt(10.0) * 0.45;
|
||||
const G4double young_cut = sqrt(10.0) * 0.25;
|
||||
///const G4double young_cut = sqrt(10.0) * 0.2;
|
||||
///const G4double young_cut = std::sqrt(10.0) * 0.1;
|
||||
///const G4double young_cut = std::sqrt(10.0) * 0.5;
|
||||
///const G4double young_cut = std::sqrt(10.0) * 0.45;
|
||||
const G4double young_cut = std::sqrt(10.0) * 0.25;
|
||||
///const G4double young_cut = std::sqrt(10.0) * 0.2;
|
||||
///const G4double young_cut = 0.0;
|
||||
|
||||
partners thePartners;
|
||||
@@ -444,7 +444,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
if (path < -small) { /// something wrong
|
||||
return thePartners;
|
||||
|
||||
} else if(fabs(path) < small) { /// just on the bounday
|
||||
} else if(std::fabs(path) < small) { /// just on the bounday
|
||||
path = 0.0;
|
||||
|
||||
G4InuclElementaryParticle particle;
|
||||
@@ -476,7 +476,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
G4double pw = -path * dens * csec * rat;
|
||||
|
||||
if (pw < -huge_num) pw = -huge_num;
|
||||
pw = 1.0 - exp(pw);
|
||||
pw = 1.0 - std::exp(pw);
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " pw " << pw << " rat " << rat << G4endl;
|
||||
@@ -485,7 +485,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
G4double spath = path;
|
||||
|
||||
if (inuclRndm() < pw) {
|
||||
spath = -1.0 / dens / csec / rat * log(1.0 - pw * inuclRndm());
|
||||
spath = -1.0 / dens / csec / rat * std::log(1.0 - pw * inuclRndm());
|
||||
if (cparticle.young(young_cut, spath)) spath = path;
|
||||
|
||||
if (verboseLevel > 2){
|
||||
@@ -505,9 +505,9 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
std::vector<G4double> acsecs;
|
||||
G4double tot_abs_csec = 0.0;
|
||||
G4double abs_sec;
|
||||
G4double vol = pow(zone_radii[zone], G4double(3) );
|
||||
G4double vol = std::pow(zone_radii[zone], G4double(3) );
|
||||
|
||||
if(zone > 0) vol -= pow(zone_radii[zone - 1], 3);
|
||||
if(zone > 0) vol -= std::pow(zone_radii[zone - 1], 3);
|
||||
vol *= pi4by3;
|
||||
G4double rat = getRatio(1);
|
||||
G4double rat1 = getRatio(2);
|
||||
@@ -576,7 +576,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
|
||||
if (pw < -huge_num) pw = -huge_num;
|
||||
|
||||
pw = 1.0 - exp(pw);
|
||||
pw = 1.0 - std::exp(pw);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " pw " << pw << G4endl;
|
||||
@@ -584,7 +584,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
|
||||
G4double apath = path;
|
||||
|
||||
if (inuclRndm() < pw) apath = -1.0 / tot_abs_csec * log(1.0 - pw * inuclRndm());
|
||||
if (inuclRndm() < pw) apath = -1.0 / tot_abs_csec * std::log(1.0 - pw * inuclRndm());
|
||||
|
||||
if (cparticle.young(young_cut, apath)) apath = path;
|
||||
|
||||
@@ -824,7 +824,7 @@ void G4BertiniNucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
r += pos[i] * pos[i];
|
||||
};
|
||||
|
||||
r = sqrt(r);
|
||||
r = std::sqrt(r);
|
||||
pr /= r;
|
||||
|
||||
G4int next_zone = cparticle.movingInsideNuclei() ? zone - 1 : zone + 1;
|
||||
@@ -843,7 +843,7 @@ void G4BertiniNucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
cparticle.incrementReflectionCounter();
|
||||
|
||||
} else { /// transition
|
||||
p1r = sqrt(qv);
|
||||
p1r = std::sqrt(qv);
|
||||
if(pr < 0.0) p1r = -p1r;
|
||||
cparticle.updateZone(next_zone);
|
||||
cparticle.resetReflection();
|
||||
@@ -909,13 +909,13 @@ G4CascadParticle G4BertiniNucleiModel::initializeCascad(G4InuclElementaryParticl
|
||||
}
|
||||
|
||||
const G4double large = 1000.0;
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double s1 = std::sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = nuclei_radius * s1;
|
||||
std::vector<G4double> pos(3);
|
||||
pos[0] = rz * cos(phi);
|
||||
pos[1] = rz * sin(phi);
|
||||
pos[2] = -nuclei_radius * sqrt(1.0 - s1 * s1);
|
||||
pos[0] = rz * std::cos(phi);
|
||||
pos[1] = rz * std::sin(phi);
|
||||
pos[2] = -nuclei_radius * std::sqrt(1.0 - s1 * s1);
|
||||
|
||||
G4CascadParticle cpart(*particle, pos, number_of_zones, large);
|
||||
|
||||
@@ -973,13 +973,13 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
std::vector<std::vector<G4double> > momentums;
|
||||
|
||||
if (ab < 3.0) { /// deutron, simplest case
|
||||
G4double r = 2.214 - 3.4208 * log(1.0 - 0.981 * inuclRndm());
|
||||
G4double r = 2.214 - 3.4208 * std::log(1.0 - 0.981 * inuclRndm());
|
||||
G4double s = 2.0 * inuclRndm() - 1.0;
|
||||
G4double r1 = r * sqrt(1.0 - s * s);
|
||||
G4double r1 = r * std::sqrt(1.0 - s * s);
|
||||
std::vector<G4double> coord1(3);
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = r1 * cos(phi);
|
||||
coord1[1] = r1 * sin(phi);
|
||||
coord1[0] = r1 * std::cos(phi);
|
||||
coord1[1] = r1 * std::sin(phi);
|
||||
coord1[2] = r * s;
|
||||
|
||||
coordinates.push_back(coord1);
|
||||
@@ -1016,8 +1016,8 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = p * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = p * COS_SIN.first;
|
||||
|
||||
momentums.push_back(mom);
|
||||
@@ -1043,26 +1043,26 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double s;
|
||||
G4double u;
|
||||
G4double rho;
|
||||
G4double fmax = exp(-0.5) / sqrt(0.5);
|
||||
G4double fmax = std::exp(-0.5) / std::sqrt(0.5);
|
||||
|
||||
while (itry1 < itry_max) {
|
||||
itry1++;
|
||||
s = -log(inuclRndm());
|
||||
s = -std::log(inuclRndm());
|
||||
u = fmax * inuclRndm();
|
||||
rho = sqrt(s) * exp(-s);
|
||||
rho = std::sqrt(s) * std::exp(-s);
|
||||
|
||||
if (sqrt(s) * exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * sqrt(s);
|
||||
if (std::sqrt(s) * std::exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * std::sqrt(s);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
coord1[1] = u * sin(phi);
|
||||
coord1[0] = u * std::cos(phi);
|
||||
coord1[1] = u * std::sin(phi);
|
||||
coord1[2] = s * COS_SIN.first;
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " i " << i << " r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " i " << i << " r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
coordinates[1][i];
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " 3 r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " 3 r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1094,9 +1094,9 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (G4int j = i+1; j < 3; j++) {
|
||||
G4double r2 = pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
pow(coordinates[i][1] - coordinates[j][1], G4double(2)) +
|
||||
pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
G4double r2 = std::pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
std::pow(coordinates[i][1] - coordinates[j][1], G4double(2)) +
|
||||
std::pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " j " << j << " r2 " << r2 << G4endl;
|
||||
@@ -1118,9 +1118,9 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
} else { /// a >= 4
|
||||
G4double b = 3.0/(ab - 2.0);
|
||||
G4double b1 = 1.0 - b / 2.0;
|
||||
G4double u = b1 + sqrt(b1 * b1 + b);
|
||||
G4double u = b1 + std::sqrt(b1 * b1 + b);
|
||||
b = 1.0 / b;
|
||||
G4double fmax = (1.0 + u * b) * u * exp(-u);
|
||||
G4double fmax = (1.0 + u * b) * u * std::exp(-u);
|
||||
|
||||
while (badco && itry < itry_max) {
|
||||
|
||||
@@ -1135,21 +1135,21 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
while (itry1 < itry_max) {
|
||||
itry1++;
|
||||
s = -log(inuclRndm());
|
||||
s = -std::log(inuclRndm());
|
||||
u = fmax * inuclRndm();
|
||||
|
||||
if (sqrt(s) * exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * sqrt(s);
|
||||
if (std::sqrt(s) * std::exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * std::sqrt(s);
|
||||
std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
coord1[1] = u * sin(phi);
|
||||
coord1[0] = u * std::cos(phi);
|
||||
coord1[1] = u * std::sin(phi);
|
||||
coord1[2] = s * COS_SIN.first;
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " i " << i << " r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1174,7 +1174,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " last r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " last r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1184,9 +1184,9 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
for (i = 0; i < ia-1; i++) {
|
||||
|
||||
for (G4int j = i+1; j < ia; j++) {
|
||||
G4double r2 = pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
pow(coordinates[i][1]-coordinates[j][1], G4double(2)) +
|
||||
pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
G4double r2 = std::pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
std::pow(coordinates[i][1]-coordinates[j][1], G4double(2)) +
|
||||
std::pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " i " << i << " j " << j << " r2 " << r2 << G4endl;
|
||||
@@ -1226,16 +1226,16 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
while (itry < itry_max) {
|
||||
itry++;
|
||||
u = -log(0.879853 - 0.8798502 * inuclRndm());
|
||||
x = u * exp(-u);
|
||||
u = -std::log(0.879853 - 0.8798502 * inuclRndm());
|
||||
x = u * std::exp(-u);
|
||||
|
||||
if (x > inuclRndm()) {
|
||||
p = sqrt(0.01953 * u);
|
||||
p = std::sqrt(0.01953 * u);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double pt = p * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
mom[1] = pt * std::cos(phi);
|
||||
mom[2] = pt * std::sin(phi);
|
||||
mom[3] = p * COS_SIN.first;
|
||||
momentums.push_back(mom);
|
||||
|
||||
@@ -1266,19 +1266,19 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4int i(0);
|
||||
|
||||
for (i = 0; i < G4int(coordinates.size()); i++) {
|
||||
G4double rp = sqrt(coordinates[i][0] * coordinates[i][0] +
|
||||
G4double rp = std::sqrt(coordinates[i][0] * coordinates[i][0] +
|
||||
coordinates[i][1] * coordinates[i][1] +
|
||||
coordinates[i][2] * coordinates[i][2]);
|
||||
if (rp > rb) rb = rp;
|
||||
};
|
||||
/// nuclei i.p. as a whole
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double s1 = std::sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = (nuclei_radius + rb) * s1;
|
||||
std::vector<double> global_pos(3);
|
||||
global_pos[0] = rz * cos(phi);
|
||||
global_pos[1] = rz * sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * sqrt(1.0 - s1 * s1);
|
||||
global_pos[0] = rz * std::cos(phi);
|
||||
global_pos[1] = rz * std::sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * std::sqrt(1.0 - s1 * s1);
|
||||
|
||||
for (i = 0; i < G4int(coordinates.size()); i++) {
|
||||
coordinates[i][0] += global_pos[0];
|
||||
@@ -1317,7 +1317,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
/// fill cascad particles and outgoing particles
|
||||
for (G4int ip = 0; ip < G4int(raw_particles.size()); ip++) {
|
||||
std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
G4double pmod = sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double pmod = std::sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double t0 = -(mom[1] * coordinates[ip][0] + mom[2] * coordinates[ip][1] +
|
||||
mom[3] * coordinates[ip][2]) / pmod;
|
||||
G4double det = t0 * t0 + nuclei_radius * nuclei_radius -
|
||||
@@ -1327,10 +1327,10 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double tr = -1.0;
|
||||
|
||||
if (det > 0.0) {
|
||||
G4double t1 = t0 + sqrt(det);
|
||||
G4double t2 = t0 - sqrt(det);
|
||||
G4double t1 = t0 + std::sqrt(det);
|
||||
G4double t2 = t0 - std::sqrt(det);
|
||||
|
||||
if (fabs(t1) <= fabs(t2)) {
|
||||
if (std::fabs(t1) <= std::fabs(t2)) {
|
||||
|
||||
if (t1 > 0.0) {
|
||||
|
||||
|
||||
@@ -30,18 +30,18 @@ G4BertiniRegionModel::G4BertiniRegionModel(const G4int numberOfLayers, const G4i
|
||||
{
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double oneThird = 1.0/3.0;
|
||||
G4double r = radius0*pow(G4double(A), G4double(oneThird) );
|
||||
G4double r = radius0*std::pow(G4double(A), G4double(oneThird) );
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = G4double(A) / (4.0/3.0*pi*pow(r,3));
|
||||
G4double rho = G4double(A) / (4.0/3.0*pi*std::pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass();
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double protonDensity = G4double(Z) / (4.0/3.0*pi*pow(r,3));
|
||||
G4double neutronDensity = G4double(A-Z) / (4.0/3.0*pi*pow(r,3));
|
||||
G4double protonDensity = G4double(Z) / (4.0/3.0*pi*std::pow(r,3));
|
||||
G4double neutronDensity = G4double(A-Z) / (4.0/3.0*pi*std::pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
@@ -120,13 +120,13 @@ G4double G4BertiniRegionModel::GetMaximumNucleonMomentum(G4double r,
|
||||
G4double G4BertiniRegionModel::GetFermiMomentum(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
return sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
return std::sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
}
|
||||
|
||||
G4double G4BertiniRegionModel::GetFermiEnergy(G4double aDensity,
|
||||
G4double aMass){
|
||||
G4double twoThirds = 2.0/3.0;
|
||||
return (pow(hbar_Planck,2)/(2.0*aMass)*pow((3.0*pi2*aDensity), twoThirds));
|
||||
return (std::pow(hbar_Planck,2)/(2.0*aMass)*std::pow((3.0*pi2*aDensity), twoThirds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,14 +148,14 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
if(ia == 1) {
|
||||
// abnormal situation
|
||||
G4double m = iz > 0 ? mp : mn;
|
||||
G4double pmod = sqrt((etot + 2.0 * m) * etot);
|
||||
G4double pmod = std::sqrt((etot + 2.0 * m) * etot);
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[1] = Pt * std::cos(FI);
|
||||
mom[2] = Pt * std::sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
G4int knd = iz > 0 ? 1 : 2;
|
||||
@@ -180,8 +180,8 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
double FI = randomPHI();
|
||||
double Pt = pmod[0] * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[1] = Pt * std::cos(FI);
|
||||
mom[2] = Pt * std::sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
for(G4int j = 1; j < 4; j++) tot_mom[j] += mom[j];
|
||||
@@ -202,8 +202,8 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod[i] * COS_SIN.second;
|
||||
|
||||
mom[1] = Pt * cos(FI);
|
||||
mom[2] = Pt * sin(FI);
|
||||
mom[1] = Pt * std::cos(FI);
|
||||
mom[2] = Pt * std::sin(FI);
|
||||
mom[3] = Pt * COS_SIN.first;
|
||||
|
||||
for(G4int j = 1; j < 4; j++) tot_mom[j] += mom[j];
|
||||
@@ -212,7 +212,7 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
};
|
||||
|
||||
// handle last two
|
||||
G4double tot_mod = sqrt(tot_mom[1] * tot_mom[1] +
|
||||
G4double tot_mod = std::sqrt(tot_mom[1] * tot_mom[1] +
|
||||
tot_mom[2] * tot_mom[2] +
|
||||
tot_mom[3] * tot_mom[3]);
|
||||
G4double ct = -0.5 * (tot_mod * tot_mod + pmod[ia - 2] * pmod[ia - 2] -
|
||||
@@ -222,13 +222,13 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
G4cout << " ct last " << ct << G4endl;
|
||||
}
|
||||
|
||||
if(fabs(ct) < ang_cut) {
|
||||
if(std::fabs(ct) < ang_cut) {
|
||||
std::vector<G4double> mom2 = generateWithFixedTheta(ct, pmod[ia - 2]);
|
||||
// rotate to the normal system
|
||||
std::vector<G4double> apr = tot_mom;
|
||||
G4int i;
|
||||
for(i = 1; i < 4; i++) apr[i] /= tot_mod;
|
||||
G4double a_tr = sqrt(apr[1] * apr[1] + apr[2] * apr[2]);
|
||||
G4double a_tr = std::sqrt(apr[1] * apr[1] + apr[2] * apr[2]);
|
||||
std::vector<G4double> mom(4);
|
||||
mom[1] = mom2[3] * apr[1] + ( mom2[1] * apr[2] + mom2[2] * apr[3] * apr[1]) / a_tr; // ::: replace with clhep tools?
|
||||
mom[2] = mom2[3] * apr[2] + (-mom2[1] * apr[1] + mom2[2] * apr[3] * apr[2]) / a_tr;
|
||||
@@ -288,7 +288,7 @@ std::vector<G4double> G4BigBanger::generateMomentumModules(G4double etot,
|
||||
G4double m = i < iz ? mp : mn;
|
||||
|
||||
pmod[i] = pmod[i] * etot / xtot;
|
||||
pmod[i] = sqrt(pmod[i] * (pmod[i] + 2.0 * m));
|
||||
pmod[i] = std::sqrt(pmod[i] * (pmod[i] + 2.0 * m));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " pmod " << pmod[i] << G4endl;
|
||||
@@ -313,10 +313,10 @@ G4double G4BigBanger::xProbability(G4double x,
|
||||
ekpr = x * x;
|
||||
|
||||
if(2 * ihalf == ia) { // even A
|
||||
ekpr *= sqrt(1.0 - x) * pow((1.0 - x), G4int(G4double(3 * ia - 6) / 2.0));
|
||||
ekpr *= std::sqrt(1.0 - x) * std::pow((1.0 - x), G4int(G4double(3 * ia - 6) / 2.0));
|
||||
}
|
||||
else {
|
||||
ekpr *= pow((1.0 - x), G4int(G4double(3 * ia - 5) / 2.0));
|
||||
ekpr *= std::pow((1.0 - x), G4int(G4double(3 * ia - 5) / 2.0));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ G4double G4CascadParticle::getPathToTheNextZone(G4double rz_in,
|
||||
};
|
||||
|
||||
G4double ra = rr - rp * rp / pp;
|
||||
pp = sqrt(pp);
|
||||
pp = std::sqrt(pp);
|
||||
G4double ds;
|
||||
G4double d2;
|
||||
|
||||
@@ -76,7 +76,7 @@ G4double G4CascadParticle::getPathToTheNextZone(G4double rz_in,
|
||||
};
|
||||
};
|
||||
|
||||
path = ds * sqrt(d2) - rp / pp;
|
||||
path = ds * std::sqrt(d2) - rp / pp;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ G4double G4CascadSpecialFunctions::absorptionCrosSection(G4double e,
|
||||
G4double csec = 0.0;
|
||||
|
||||
if (e < 0.3) {
|
||||
csec = 0.1106 / sqrt(e) - 0.8 + 0.08 / ((e - 0.123) * (e - 0.123) + 0.0056);
|
||||
csec = 0.1106 / std::sqrt(e) - 0.8 + 0.08 / ((e - 0.123) * (e - 0.123) + 0.0056);
|
||||
|
||||
} else if (e < 1.0) {
|
||||
csec = 3.6735 * (1.0 - e) * (1.0 - e);
|
||||
|
||||
@@ -51,12 +51,12 @@ G4CascadeInterface::G4CascadeInterface()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CascadeInterface::G4CascadeInterface" << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
G4ReactionProductVector* G4CascadeInterface::Propagate(G4KineticTrackVector* ,
|
||||
G4V3DNucleus* ) {
|
||||
return NULL;
|
||||
};
|
||||
}
|
||||
|
||||
// #define debug_G4CascadeInterface
|
||||
|
||||
@@ -110,7 +110,7 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
momentumBullet[0] =0.;
|
||||
momentumBullet[1] =0;
|
||||
momentumBullet[2] =0;
|
||||
momentumBullet[3] =sqrt(px*px+py*py+pz*pz);
|
||||
momentumBullet[3] =std::sqrt(px*px+py*py+pz*pz);
|
||||
|
||||
G4InuclElementaryParticle * bullet = new G4InuclElementaryParticle(momentumBullet, bulletType);
|
||||
|
||||
@@ -136,9 +136,9 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
target->setEnergy();
|
||||
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
eInit = std::sqrt(bmom[0] * bmom[0]);
|
||||
std::vector<G4double> tmom = target->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
eInit += std::sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
sumBaryon += theNucleusA;
|
||||
|
||||
@@ -199,9 +199,9 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
sumBaryon += 1;
|
||||
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
eInit = std::sqrt(bmom[0] * bmom[0]);
|
||||
std::vector<G4double> tmom = targetH->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
eInit += std::sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Target: " << G4endl;
|
||||
@@ -242,7 +242,7 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
outgoingParticle = ipart->type();
|
||||
std::vector<G4double> mom = ipart->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
eTot += std::sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4double ekin = ipart->getKineticEnergy() * GeV;
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
@@ -331,7 +331,7 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
{
|
||||
G4double eKin = ifrag->getKineticEnergy() * GeV;
|
||||
std::vector<G4double> mom = ifrag->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
eTot += std::sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
aMom = aMom.unit();
|
||||
@@ -388,8 +388,8 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
|
||||
|
||||
if(target != NULL) delete target;
|
||||
if(targetH != NULL) delete targetH;
|
||||
if(cascadeParticle != NULL) delete cascadeParticle;
|
||||
if(aFragment != NULL) delete aFragment;
|
||||
// if(cascadeParticle != NULL) delete cascadeParticle;
|
||||
// if(aFragment != NULL) delete aFragment;
|
||||
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
for(i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
|
||||
G4double pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
G4double pnc = std::sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
|
||||
@@ -75,7 +75,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
G4cout << " remaining exitation " << eex_rest << G4endl;
|
||||
}
|
||||
|
||||
if(fabs(mon_non_cons[0]) > accuracy || pnc > accuracy) { // renormalization
|
||||
if(std::fabs(mon_non_cons[0]) > accuracy || pnc > accuracy) { // renormalization
|
||||
G4int npart = outgoingParticles.size();
|
||||
|
||||
if(npart > 0) {
|
||||
@@ -100,7 +100,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
};
|
||||
out_mom = getTotalOutputMomentum();
|
||||
for(G4int i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
pnc = std::sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
|
||||
@@ -153,8 +153,8 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
if(DET > 0.0) {
|
||||
|
||||
G4double x1 = -(W + sqrt(DET));
|
||||
G4double x2 = -(W - sqrt(DET));
|
||||
G4double x1 = -(W + std::sqrt(DET));
|
||||
G4double x2 = -(W - std::sqrt(DET));
|
||||
// choose the appropriate solution
|
||||
G4bool xset = false;
|
||||
G4double x = 0.0;
|
||||
@@ -195,14 +195,14 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
out_mom = getTotalOutputMomentum();
|
||||
std::sort(outgoingParticles.begin(), outgoingParticles.end(), G4ParticleLargerEkin());
|
||||
for(G4int i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
pnc = std::sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
mon_non_cons[3] * mon_non_cons[3]);
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " momentum non conservation tuning: " << G4endl
|
||||
<< " e " << mon_non_cons[0] << " p " << pnc << G4endl;
|
||||
}
|
||||
if(fabs(mon_non_cons[0]) < accuracy || pnc < accuracy) on_shell = true;
|
||||
if(std::fabs(mon_non_cons[0]) < accuracy || pnc < accuracy) on_shell = true;
|
||||
}
|
||||
else {
|
||||
if(verboseLevel > 2){
|
||||
@@ -251,7 +251,7 @@ std::pair<std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTune(G4
|
||||
G4int ibest1 = -1;
|
||||
G4int ibest2 = -1;
|
||||
G4double pbest = 0.0;
|
||||
G4double pcut = 0.3 * sqrt(1.88 * fabs(de));
|
||||
G4double pcut = 0.3 * std::sqrt(1.88 * std::fabs(de));
|
||||
G4double p1 = 0.0;
|
||||
G4double p2;
|
||||
|
||||
@@ -265,9 +265,9 @@ std::pair<std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTune(G4
|
||||
|
||||
for(G4int l = 1; l < 4; l++) {
|
||||
if(mom1[l] * mom2[l] < 0.0) {
|
||||
if(fabs(mom1[l]) > pcut && fabs(mom2[l]) > pcut) {
|
||||
if(std::fabs(mom1[l]) > pcut && std::fabs(mom2[l]) > pcut) {
|
||||
|
||||
G4double psum = fabs(mom1[l]) + fabs(mom2[l]);
|
||||
G4double psum = std::fabs(mom1[l]) + std::fabs(mom2[l]);
|
||||
|
||||
if(psum > pbest) {
|
||||
ibest1 = i;
|
||||
|
||||
+50
-51
@@ -33,8 +33,7 @@ G4ElementaryParticleCollider::G4ElementaryParticleCollider()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4ElementaryParticleCollider::G4ElementaryParticleCollider" << G4endl;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet,
|
||||
G4InuclParticle* target) {
|
||||
@@ -365,7 +364,7 @@ G4int G4ElementaryParticleCollider::generateMultiplicity(G4int is,
|
||||
if (l == 7 || l == 14) { // pi0 P or pi0 N
|
||||
|
||||
for (G4int j = 0; j < 5; j++) {
|
||||
sigm[j] = fabs(0.5 * (asig[2][j][ik - 1] + asig[3][j][ik - 1] +
|
||||
sigm[j] = std::fabs(0.5 * (asig[2][j][ik - 1] + asig[3][j][ik - 1] +
|
||||
sk * (asig[2][j][ik] + asig[3][j][ik] -
|
||||
asig[2][j][ik - 1] - asig[3][j][ik - 1])));
|
||||
stot += sigm[j];
|
||||
@@ -374,7 +373,7 @@ G4int G4ElementaryParticleCollider::generateMultiplicity(G4int is,
|
||||
} else {
|
||||
|
||||
for (G4int j = 0; j < 5; j++) {
|
||||
sigm[j] = fabs(asig[l - 1][j][ik - 1] + sk * (asig[l - 1][j][ik]
|
||||
sigm[j] = std::fabs(asig[l - 1][j][ik - 1] + sk * (asig[l - 1][j][ik]
|
||||
- asig[l - 1][j][ik - 1]));
|
||||
stot += sigm[j];
|
||||
};
|
||||
@@ -495,7 +494,7 @@ generateSCMfinalState(G4double ekin,
|
||||
G4double m2 = dummy.getParticleMass(particle_kinds[1]);
|
||||
m2 *= m2;
|
||||
G4double a = 0.5 * (etot_scm * etot_scm - m1 - m2);
|
||||
G4double np = sqrt((a * a - m1 * m2) / (m1 + m2 + 2.0 * a));
|
||||
G4double np = std::sqrt((a * a - m1 * m2) / (m1 + m2 + 2.0 * a));
|
||||
mom = particleSCMmomentumFor2to2(is, kw, ekin, np);
|
||||
|
||||
} else {
|
||||
@@ -559,7 +558,7 @@ generateSCMfinalState(G4double ekin,
|
||||
modules[1] * modules[1]) /
|
||||
modules[2] / modules[0];
|
||||
|
||||
if(fabs(ct) < ang_cut) {
|
||||
if(std::fabs(ct) < ang_cut) {
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " ok for mult " << multiplicity << G4endl;
|
||||
@@ -590,21 +589,21 @@ generateSCMfinalState(G4double ekin,
|
||||
for (G4int i = 0; i < multiplicity - 2; i++) {
|
||||
G4double p0 = particle_kinds[i] < 3 ? 0.36 : 0.25;
|
||||
G4double alf = 1.0 / p0 / (p0 - (modules[i] + p0) *
|
||||
exp(-modules[i] / p0));
|
||||
std::exp(-modules[i] / p0));
|
||||
G4double st = 2.0;
|
||||
G4int itry1 = 0;
|
||||
|
||||
while (fabs(st) > ang_cut && itry1 < itry_max) {
|
||||
while (std::fabs(st) > ang_cut && itry1 < itry_max) {
|
||||
itry1++;
|
||||
G4double s1 = modules[i] * inuclRndm();
|
||||
G4double s2 = alf * difr_const * p0 * inuclRndm();
|
||||
|
||||
if(verboseLevel > 3){
|
||||
G4cout << " s1 * alf * exp(-s1 / p0) " << s1 * alf * exp(-s1 / p0)
|
||||
G4cout << " s1 * alf * std::exp(-s1 / p0) " << s1 * alf * std::exp(-s1 / p0)
|
||||
<< " s2 " << s2 << G4endl;
|
||||
}
|
||||
|
||||
if(s1 * alf * exp(-s1 / p0) > s2) st = s1 / modules[i];
|
||||
if(s1 * alf * std::exp(-s1 / p0) > s2) st = s1 / modules[i];
|
||||
|
||||
};
|
||||
|
||||
@@ -621,7 +620,7 @@ generateSCMfinalState(G4double ekin,
|
||||
st = 0.5 * inuclRndm();
|
||||
};
|
||||
|
||||
G4double ct = sqrt(1.0 - st * st);
|
||||
G4double ct = std::sqrt(1.0 - st * st);
|
||||
|
||||
if(inuclRndm() > 0.5) ct = -ct;
|
||||
|
||||
@@ -630,8 +629,8 @@ generateSCMfinalState(G4double ekin,
|
||||
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
mom[1] = pt * std::cos(phi);
|
||||
mom[2] = pt * std::sin(phi);
|
||||
mom[3] = modules[i] * ct;
|
||||
|
||||
for(G4int i = 1; i < 4; i++) tot_mom[i] += mom[i];
|
||||
@@ -640,7 +639,7 @@ generateSCMfinalState(G4double ekin,
|
||||
};
|
||||
|
||||
// handle last two
|
||||
G4double tot_mod = sqrt(tot_mom[1] * tot_mom[1] +
|
||||
G4double tot_mod = std::sqrt(tot_mom[1] * tot_mom[1] +
|
||||
tot_mom[2] * tot_mom[2] + tot_mom[3] * tot_mom[3]);
|
||||
G4double ct = -0.5 * (tot_mod * tot_mod +
|
||||
modules[multiplicity - 2] * modules[multiplicity - 2] -
|
||||
@@ -651,7 +650,7 @@ generateSCMfinalState(G4double ekin,
|
||||
G4cout << " ct last " << ct << G4endl;
|
||||
}
|
||||
|
||||
if (fabs(ct) < ang_cut) {
|
||||
if (std::fabs(ct) < ang_cut) {
|
||||
|
||||
G4int i(0);
|
||||
for (i = 0; i < multiplicity - 2; i++)
|
||||
@@ -735,7 +734,7 @@ generateMomModules(
|
||||
masses2[i] = mass * mass;
|
||||
};
|
||||
|
||||
G4double mass_last = sqrt(masses2[mult - 1]);
|
||||
G4double mass_last = std::sqrt(masses2[mult - 1]);
|
||||
|
||||
if (verboseLevel > 3){
|
||||
G4cout << " knd_last " << kinds[mult - 1] << " mlast " << mass_last << G4endl;
|
||||
@@ -756,7 +755,7 @@ generateMomModules(
|
||||
getMomModuleFor2toMany(is, mult, kinds[i], ekin);
|
||||
|
||||
if (pmod < small) break;
|
||||
eleft -= sqrt(pmod * pmod + masses2[i]);
|
||||
eleft -= std::sqrt(pmod * pmod + masses2[i]);
|
||||
|
||||
if (verboseLevel > 3){
|
||||
G4cout << " kp " << kinds[i] << " pmod " << pmod << " mass2 " << masses2[i] << G4endl;
|
||||
@@ -777,7 +776,7 @@ generateMomModules(
|
||||
}
|
||||
|
||||
if (plast > small) {
|
||||
plast = sqrt(plast);
|
||||
plast = std::sqrt(plast);
|
||||
modules[mult - 1] = plast;
|
||||
|
||||
if (mult == 3) {
|
||||
@@ -811,11 +810,11 @@ G4bool G4ElementaryParticleCollider::satisfyTriangle(
|
||||
|
||||
if(modules.size() == 3) {
|
||||
|
||||
if(fabs(modules[1] - modules[2]) > modules[0] ||
|
||||
if(std::fabs(modules[1] - modules[2]) > modules[0] ||
|
||||
modules[0] > modules[1] + modules[2] ||
|
||||
fabs(modules[0] - modules[2]) > modules[1] ||
|
||||
std::fabs(modules[0] - modules[2]) > modules[1] ||
|
||||
modules[1] > modules[0] + modules[2] ||
|
||||
fabs(modules[0] - modules[1]) > modules[2] ||
|
||||
std::fabs(modules[0] - modules[1]) > modules[2] ||
|
||||
modules[2] > modules[1] + modules[0]) good = false;
|
||||
|
||||
};
|
||||
@@ -1288,19 +1287,19 @@ G4double G4ElementaryParticleCollider::getMomModuleFor2toMany(
|
||||
for(G4int i = 0; i < 4; i++) {
|
||||
G4double V = 0.0;
|
||||
|
||||
for(G4int k = 0; k < 4; k++) V += rmn[k + JK][i + IL][KM - 1] * pow(ekin, k);
|
||||
for(G4int k = 0; k < 4; k++) V += rmn[k + JK][i + IL][KM - 1] * std::pow(ekin, k);
|
||||
|
||||
PR += V * pow(S, i);
|
||||
PR += V * std::pow(S, i);
|
||||
PQ += V;
|
||||
};
|
||||
|
||||
if(knd == 1 || knd == 2) JM = 1;
|
||||
|
||||
for(G4int m = 0; m < 3; m++) PS += rmn[8 + IM + m][7 + JM][KM - 1] * pow(ekin, m);
|
||||
for(G4int m = 0; m < 3; m++) PS += rmn[8 + IM + m][7 + JM][KM - 1] * std::pow(ekin, m);
|
||||
|
||||
G4double PRA = PS * sqrt(S) * (PR + (1 - PQ) * pow(S, 4));
|
||||
G4double PRA = PS * std::sqrt(S) * (PR + (1 - PQ) * std::pow(S, 4));
|
||||
|
||||
return fabs(PRA);
|
||||
return std::fabs(PRA);
|
||||
}
|
||||
|
||||
std::vector<G4double> G4ElementaryParticleCollider::
|
||||
@@ -1336,7 +1335,7 @@ particleSCMmomentumFor2to3(
|
||||
|
||||
G4int itry = 0;
|
||||
|
||||
while(fabs(ct) > 1.0 && itry < itry_max) {
|
||||
while(std::fabs(ct) > 1.0 && itry < itry_max) {
|
||||
itry++;
|
||||
G4double S = inuclRndm();
|
||||
G4double U = 0.0;
|
||||
@@ -1346,13 +1345,13 @@ particleSCMmomentumFor2to3(
|
||||
G4double V = 0.0;
|
||||
|
||||
for(G4int m = 0; m < 4; m++) {
|
||||
V += abn[m][l][K + J - 1] * pow(ekin, m);
|
||||
V += abn[m][l][K + J - 1] * std::pow(ekin, m);
|
||||
};
|
||||
|
||||
U += V;
|
||||
W += V * pow(S, l);
|
||||
W += V * std::pow(S, l);
|
||||
};
|
||||
ct = 2.0 * sqrt(S) * (W + (1.0 - U) * pow(S, 4)) - 1.0;
|
||||
ct = 2.0 * std::sqrt(S) * (W + (1.0 - U) * std::pow(S, 4)) - 1.0;
|
||||
};
|
||||
|
||||
if(itry == itry_max) {
|
||||
@@ -1364,13 +1363,13 @@ particleSCMmomentumFor2to3(
|
||||
ct = 2.0 * inuclRndm() - 1.0;
|
||||
};
|
||||
|
||||
G4double pt = pmod * sqrt(1.0 - ct * ct);
|
||||
G4double pt = pmod * std::sqrt(1.0 - ct * ct);
|
||||
G4double phi = randomPHI();
|
||||
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
mom[1] = pt * std::cos(phi);
|
||||
mom[2] = pt * std::sin(phi);
|
||||
mom[3] = pmod * ct;
|
||||
|
||||
return mom;
|
||||
@@ -1576,9 +1575,9 @@ adjustIntervalForElastic(
|
||||
s2_new = 0.5 * (s2_old + s1c);
|
||||
su = 0.0;
|
||||
|
||||
for(G4int i = 0; i < 4; i++) su += ssv[i] * pow(s2_new, i);
|
||||
for(G4int i = 0; i < 4; i++) su += ssv[i] * std::pow(s2_new, i);
|
||||
|
||||
ct = ak * sqrt(s2_new) * (su + (1.0 - st) * pow(s2_new, 4)) + ae;
|
||||
ct = ak * std::sqrt(s2_new) * (su + (1.0 - st) * std::pow(s2_new, 4)) + ae;
|
||||
|
||||
if(ct > 1.0) {
|
||||
s2_old = s2_new;
|
||||
@@ -1610,8 +1609,8 @@ adjustIntervalForElastic(
|
||||
s1_new = 0.5 * (s1_old + s2c);
|
||||
su = 0.0;
|
||||
|
||||
for (G4int i = 0; i < 4; i++) su += ssv[i] * pow(s1_new, i);
|
||||
ct = ak * sqrt(s1_new) * (su + (1.0 - st) * pow(s1_new, 4)) + ae;
|
||||
for (G4int i = 0; i < 4; i++) su += ssv[i] * std::pow(s1_new, i);
|
||||
ct = ak * std::sqrt(s1_new) * (su + (1.0 - st) * std::pow(s1_new, 4)) + ae;
|
||||
|
||||
if(ct < -1.0) {
|
||||
s1_old = s1_new;
|
||||
@@ -1707,16 +1706,16 @@ particleSCMmomentumFor2to2(
|
||||
ac = -2.0 * ab * pscm * pscm;
|
||||
ad = 2.0 * ac;
|
||||
if(ad < -huge_num) {
|
||||
ad = exp(ad);
|
||||
ad = std::exp(ad);
|
||||
|
||||
} else {
|
||||
|
||||
ad = exp(-huge_num);
|
||||
ad = std::exp(-huge_num);
|
||||
};
|
||||
|
||||
while(fabs(ct) > ct_cut && itry < itry_max) {
|
||||
while(std::fabs(ct) > ct_cut && itry < itry_max) {
|
||||
itry++;
|
||||
ct = 1.0 - log(inuclRndm() * (1.0 - ad) + ad) / ac;
|
||||
ct = 1.0 - std::log(inuclRndm() * (1.0 - ad) + ad) / ac;
|
||||
};
|
||||
|
||||
} else if(k == 0) {
|
||||
@@ -1733,7 +1732,7 @@ particleSCMmomentumFor2to2(
|
||||
for(G4int i = 0; i < 4; i++) {
|
||||
G4double ss = 0.0;
|
||||
|
||||
for(G4int m = 0; m < 4; m++) ss += ang[m][i][k1] * pow(ekin, m);
|
||||
for(G4int m = 0; m < 4; m++) ss += ang[m][i][k1] * std::pow(ekin, m);
|
||||
st += ss;
|
||||
ssv[i] = ss;
|
||||
};
|
||||
@@ -1748,15 +1747,15 @@ particleSCMmomentumFor2to2(
|
||||
b = ab.second;
|
||||
};
|
||||
|
||||
while(fabs(ct) > ct_cut && itry < itry_max) {
|
||||
while(std::fabs(ct) > ct_cut && itry < itry_max) {
|
||||
itry++;
|
||||
G4double mrand = a * inuclRndm() + b;
|
||||
|
||||
G4double su = 0.0;
|
||||
|
||||
for(G4int i = 0; i < 4; i++) su += ssv[i] * pow(mrand, i);
|
||||
for(G4int i = 0; i < 4; i++) su += ssv[i] * std::pow(mrand, i);
|
||||
|
||||
ct = ak * sqrt(mrand) * (su + (1.0 - st) * pow(mrand, 4)) + ae;
|
||||
ct = ak * std::sqrt(mrand) * (su + (1.0 - st) * std::pow(mrand, 4)) + ae;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1769,12 +1768,12 @@ particleSCMmomentumFor2to2(
|
||||
ct = 2.0 * inuclRndm() - 1.0;
|
||||
};
|
||||
|
||||
G4double pt = pscm * sqrt(1.0 - ct * ct);
|
||||
G4double pt = pscm * std::sqrt(1.0 - ct * ct);
|
||||
G4double phi = randomPHI();
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
mom[1] = pt * std::cos(phi);
|
||||
mom[2] = pt * std::sin(phi);
|
||||
mom[3] = pscm * ct;
|
||||
|
||||
return mom;
|
||||
@@ -1948,14 +1947,14 @@ generateSCMpionAbsorption(G4double etot_scm,
|
||||
|
||||
G4double a = 0.5 * (etot_scm * etot_scm - m1 - m2);
|
||||
|
||||
G4double pmod = sqrt((a * a - m1 * m2) / (m1 + m2 + 2.0 * a));
|
||||
G4double pmod = std::sqrt((a * a - m1 * m2) / (m1 + m2 + 2.0 * a));
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double pt = pmod * COS_SIN.second;
|
||||
|
||||
mom[1] = pt * cos(FI);
|
||||
mom[2] = pt * sin(FI);
|
||||
mom[1] = pt * std::cos(FI);
|
||||
mom[2] = pt * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
|
||||
std::vector<G4double> mom1 = mom;
|
||||
|
||||
@@ -125,7 +125,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
}
|
||||
|
||||
nuc_mass = dummy_nuc.getNucleiMass(A, Z);
|
||||
PEX[0] = sqrt(PEX[1] * PEX[1] +
|
||||
PEX[0] = std::sqrt(PEX[1] * PEX[1] +
|
||||
PEX[2] * PEX[2] +
|
||||
PEX[3] * PEX[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
@@ -170,18 +170,18 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
if (goodRemnant(A1[i], Z1[i])) {
|
||||
G4double QB = DM0 - bindingEnergy(A1[i], Z1[i]) - Q1[i];
|
||||
V[i] = coul_coeff * Z * Q[i] * AK[i] / (1.0 + EEXS / E0) /
|
||||
(pow(A1[i], one_third) + pow(AN[i], one_third));
|
||||
(std::pow(A1[i], one_third) + std::pow(AN[i], one_third));
|
||||
TM[i] = EEXS - QB - V[i] * A / A1[i];
|
||||
};
|
||||
};
|
||||
|
||||
G4double ue = 2.0 * sqrt(u1 * EEXS);
|
||||
G4double ue = 2.0 * std::sqrt(u1 * EEXS);
|
||||
G4double prob_sum = 0.0;
|
||||
|
||||
if (TM[0] > cut_off_energy) {
|
||||
G4double AL = getAL(A);
|
||||
W[0] = BE * pow(A1[0], two_thirds) * G[0] * AL;
|
||||
G4double TM1 = 2.0 * sqrt(u[0] * TM[0]) - ue;
|
||||
W[0] = BE * std::pow(A1[0], two_thirds) * G[0] * AL;
|
||||
G4double TM1 = 2.0 * std::sqrt(u[0] * TM[0]) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
@@ -189,7 +189,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[0] = W[0] * exp(TM1);
|
||||
W[0] = W[0] * std::exp(TM1);
|
||||
prob_sum += W[0];
|
||||
|
||||
} else {
|
||||
@@ -199,8 +199,8 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
for (i = 1; i < 6; i++) {
|
||||
|
||||
if (TM[i] > cut_off_energy) {
|
||||
W[i] = BE * pow(A1[i], two_thirds) * G[i] * (1.0 + CPA[i]);
|
||||
G4double TM1 = 2.0 * sqrt(u[i] * TM[i]) - ue;
|
||||
W[i] = BE * std::pow(A1[i], two_thirds) * G[i] * (1.0 + CPA[i]);
|
||||
G4double TM1 = 2.0 * std::sqrt(u[i] * TM[i]) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
@@ -208,7 +208,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[i] = W[i] * exp(TM1);
|
||||
W[i] = W[i] * std::exp(TM1);
|
||||
prob_sum += W[i];
|
||||
|
||||
} else {
|
||||
@@ -226,7 +226,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
|
||||
if (EF > 0.0) {
|
||||
G4double AF = u1 * getAF(X, A, Z, EEXS);
|
||||
G4double TM1 = 2.0 * sqrt(AF * EF) - ue;
|
||||
G4double TM1 = 2.0 * std::sqrt(AF * EF) - ue;
|
||||
|
||||
if (TM1 > huge_num) {
|
||||
TM1 = huge_num;
|
||||
@@ -234,7 +234,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
} else if (TM1 < small) {
|
||||
TM1 = small;
|
||||
};
|
||||
W[6] = BF * exp(TM1);
|
||||
W[6] = BF * std::exp(TM1);
|
||||
|
||||
if (W[6] > fisssion_cut * W[0]) W[6] = fisssion_cut * W[0];
|
||||
prob_sum += W[6];
|
||||
@@ -252,7 +252,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
|
||||
if (prob_sum < prob_cut_off) { // photon emission chain
|
||||
G4double UCR0 = 2.5 + 150.0 / A;
|
||||
G4double T00 = 1.0 / (sqrt(u1 / UCR0) - 1.25 / UCR0);
|
||||
G4double T00 = 1.0 / (std::sqrt(u1 / UCR0) - 1.25 / UCR0);
|
||||
G4int itry_gam = 0;
|
||||
|
||||
while (EEXS > cut_off_energy && try_again) {
|
||||
@@ -262,10 +262,10 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
G4double FMAX;
|
||||
|
||||
if (T04 < EEXS) {
|
||||
FMAX = pow(T04, 4) * exp((EEXS - T04) / T00);
|
||||
FMAX = std::pow(T04, 4) * std::exp((EEXS - T04) / T00);
|
||||
|
||||
} else {
|
||||
FMAX = pow(EEXS, 4);
|
||||
FMAX = std::pow(EEXS, 4);
|
||||
};
|
||||
|
||||
G4double S(0);
|
||||
@@ -273,7 +273,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
while (itry < itry_max) {
|
||||
itry++;
|
||||
S = EEXS * inuclRndm();
|
||||
G4double X1 = pow(S, 4) * exp((EEXS - S) / T00);
|
||||
G4double X1 = std::pow(S, 4) * std::exp((EEXS - S) / T00);
|
||||
|
||||
if (X1 > FMAX * inuclRndm()) break;
|
||||
};
|
||||
@@ -286,14 +286,14 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
mom[0] = pmod;
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[0] = std::sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
@@ -301,14 +301,14 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[0] = std::sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3]);
|
||||
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[0] = std::sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2]
|
||||
+ ex_mom[3] * ex_mom[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
@@ -349,8 +349,8 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
};
|
||||
|
||||
if (icase < 6) { // particle or light nuclei escape
|
||||
G4double uc = 2.0 * sqrt(u[icase] * TM[icase]);
|
||||
G4double ur = (uc > huge_num ? exp(huge_num) : exp(uc));
|
||||
G4double uc = 2.0 * std::sqrt(u[icase] * TM[icase]);
|
||||
G4double ur = (uc > huge_num ? std::exp(huge_num) : std::exp(uc));
|
||||
G4double d1 = 1.0 / ur;
|
||||
G4double d2 = 1.0 / (ur - 1.0);
|
||||
G4int itry1 = 0;
|
||||
@@ -364,7 +364,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
|
||||
while (itry < itry_max && EPR < 0.0) {
|
||||
itry++;
|
||||
G4double uu = uc + log((1.0 - d1) * inuclRndm() + d2);
|
||||
G4double uu = uc + std::log((1.0 - d1) * inuclRndm() + d2);
|
||||
S = 0.5 * (uc * uc - uu * uu) / u[icase];
|
||||
EPR = TM[icase] - S * A / (A - 1.0) + V[icase];
|
||||
};
|
||||
@@ -377,35 +377,35 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
G4InuclElementaryParticle particle(ptype);
|
||||
G4double mass = particle.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4double pmod = std::sqrt((2.0 * mass + S) * S);
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
Z1[icase]);
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[0] = std::sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
mom[0] = sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[0] = std::sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[3] * mom[3] + mass * mass);
|
||||
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[0] = std::sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[0] = std::sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
ex_mom[3] * ex_mom[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
@@ -428,36 +428,36 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
G4InuclNuclei nuclei(AN[icase], Q[icase]);
|
||||
G4double mass = nuclei.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4double pmod = std::sqrt((2.0 * mass + S) * S);
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
Z1[icase]);
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[0] = std::sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
mom[0] = sqrt(mom[1] * mom[1] +
|
||||
mom[0] = std::sqrt(mom[1] * mom[1] +
|
||||
mom[2] * mom[2] +
|
||||
mom[3] * mom[3] +
|
||||
mass * mass);
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[0] = std::sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[0] = std::sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
ex_mom[3] * ex_mom[3] +
|
||||
new_nuc_mass * new_nuc_mass);
|
||||
@@ -661,9 +661,9 @@ G4double G4EquilibriumEvaporator::getQF(G4double x,
|
||||
if (x < XMIN || x > XMAX) {
|
||||
|
||||
G4double X1 = 1.0 - 0.02 * x2;
|
||||
G4double FX = (0.73 + (3.33 * X1 - 0.66) * X1) * pow(X1, 3);
|
||||
G4double FX = (0.73 + (3.33 * X1 - 0.66) * X1) * std::pow(X1, 3);
|
||||
|
||||
QFF = G0 * FX * pow(a, 2.0 / 3.0);
|
||||
QFF = G0 * FX * std::pow(a, 2.0 / 3.0);
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ G4FissionConfiguration G4FissionStore::generateConfiguration(G4double amax,
|
||||
G4double pr = ez - amax;
|
||||
|
||||
if (pr < small) pr = small;
|
||||
pr = exp(pr);
|
||||
pr = std::exp(pr);
|
||||
// configurations[i].print();
|
||||
// G4cout << " probability " << pr << G4endl;
|
||||
totProb += pr;
|
||||
|
||||
@@ -58,11 +58,11 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* /*bullet*/,
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
G4double mass_in = nuclei_target->getMass();
|
||||
G4double e_in = mass_in + 0.001 * EEXS;
|
||||
G4double PARA = 0.055 * pow(A, two_thirds) * (pow(A - Z, one_third) + pow(Z, one_third));
|
||||
G4double TEM = sqrt(EEXS / PARA);
|
||||
G4double TETA = 0.494 * pow(A, one_third) * TEM;
|
||||
G4double PARA = 0.055 * std::pow(A, two_thirds) * (std::pow(A - Z, one_third) + std::pow(Z, one_third));
|
||||
G4double TEM = std::sqrt(EEXS / PARA);
|
||||
G4double TETA = 0.494 * std::pow(A, one_third) * TEM;
|
||||
|
||||
TETA = TETA / sinh(TETA);
|
||||
TETA = TETA / std::sinh(TETA);
|
||||
|
||||
if (A < 246.0) PARA += (nucleiLevelDensity(A) - PARA) * TETA;
|
||||
|
||||
@@ -80,13 +80,13 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* /*bullet*/,
|
||||
std::vector<G4double> AL1(2, -0.15);
|
||||
std::vector<G4double> BET1(2, 0.05);
|
||||
G4FissionStore fissionStore;
|
||||
G4double R12 = pow(A1, one_third) + pow(A2, one_third);
|
||||
G4double R12 = std::pow(A1, one_third) + std::pow(A2, one_third);
|
||||
|
||||
for (G4int i = 0; i < 50 && A1 > 30.0; i++) {
|
||||
A1 -= 1.0;
|
||||
A2 = A - A1;
|
||||
G4double X3 = 1.0 / pow(A1, one_third);
|
||||
G4double X4 = 1.0 / pow(A2, one_third);
|
||||
G4double X3 = 1.0 / std::pow(A1, one_third);
|
||||
G4double X4 = 1.0 / std::pow(A2, one_third);
|
||||
Z1 = G4int(getZopt(A1, A2, Z, X3, X4, R12)) - 1.0;
|
||||
std::vector<G4double> EDEF1(2);
|
||||
G4double Z2 = Z - Z1;
|
||||
@@ -104,10 +104,10 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* /*bullet*/,
|
||||
|
||||
if(EZL > 0.0) { // generate fluctuations
|
||||
// faster, using randomGauss
|
||||
G4double C1 = sqrt(getC2(A1, A2, X3, X4, R12) / TEM);
|
||||
G4double C1 = std::sqrt(getC2(A1, A2, X3, X4, R12) / TEM);
|
||||
G4double DZ = randomGauss(C1);
|
||||
|
||||
DZ = DZ > 0.0 ? G4int(DZ + 0.5) : -G4int(fabs(DZ - 0.5));
|
||||
DZ = DZ > 0.0 ? G4int(DZ + 0.5) : -G4int(std::fabs(DZ - 0.5));
|
||||
Z1 += DZ;
|
||||
Z2 -= DZ;
|
||||
|
||||
@@ -139,21 +139,21 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* /*bullet*/,
|
||||
G4double mass1 = nuclei1.getMass();
|
||||
G4double mass2 = nuclei2.getMass();
|
||||
G4double EK = config.ekin;
|
||||
G4double pmod = sqrt(0.001 * EK * mass1 * mass2 / mass_in);
|
||||
G4double pmod = std::sqrt(0.001 * EK * mass1 * mass2 / mass_in);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double Fi = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom2(4);
|
||||
|
||||
mom1[1] = P1 * cos(Fi);
|
||||
mom1[2] = P1 * sin(Fi);
|
||||
mom1[1] = P1 * std::cos(Fi);
|
||||
mom1[2] = P1 * std::sin(Fi);
|
||||
mom1[3] = pmod * COS_SIN.first;
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom2[i] = -mom1[i];
|
||||
|
||||
G4double e_out = sqrt(pmod * pmod + mass1 * mass1) +
|
||||
sqrt(pmod * pmod + mass2 * mass2);
|
||||
G4double e_out = std::sqrt(pmod * pmod + mass1 * mass1) +
|
||||
std::sqrt(pmod * pmod + mass2 * mass2);
|
||||
G4double EV = 1000.0 * (e_in - e_out) / A;
|
||||
|
||||
if (EV > 0.0) {
|
||||
@@ -196,7 +196,7 @@ G4double G4Fissioner::getC2(G4double A1,
|
||||
}
|
||||
|
||||
G4double C2 = 124.57 * (1.0 / A1 + 1.0 / A2) + 0.78 * (X3 + X4) - 176.9 *
|
||||
(pow(X3, 4) + pow(X4, 4)) + 219.36 * (1.0 / (A1 * A1) + 1.0 / (A2 * A2)) - 1.108 / R12;
|
||||
(std::pow(X3, 4) + std::pow(X4, 4)) + 219.36 * (1.0 / (A1 * A1) + 1.0 / (A2 * A2)) - 1.108 / R12;
|
||||
|
||||
return C2;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ G4double G4Fissioner::getZopt(G4double A1,
|
||||
}
|
||||
|
||||
G4double Zopt = (87.7 * (X4 - X3) * (1.0 - 1.25 * (X4 + X3)) +
|
||||
ZT * ((124.57 / A2 + 0.78 * X4 - 176.9 * pow(X4, 4) + 219.36 / (A2 * A2)) - 0.554 / R12)) /
|
||||
ZT * ((124.57 / A2 + 0.78 * X4 - 176.9 * std::pow(X4, 4) + 219.36 / (A2 * A2)) - 0.554 / R12)) /
|
||||
getC2(A1, A2, X3, X4, R12);
|
||||
|
||||
return Zopt;
|
||||
@@ -258,7 +258,7 @@ void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
G4int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
R[i] = pow(A1[i], one_third);
|
||||
R[i] = std::pow(A1[i], one_third);
|
||||
Y1 = R[i] * R[i];
|
||||
Y2 = Z1[i] * Z1[i] / R[i];
|
||||
C[i] = 6.8 * Y1 - 0.142 * Y2;
|
||||
@@ -318,15 +318,15 @@ void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
DX1 = 0.0;
|
||||
DX2 = 0.0;
|
||||
|
||||
if (fabs(AL1[i]) >= DS1) {
|
||||
if (std::fabs(AL1[i]) >= DS1) {
|
||||
G4double XXX = AL1[i] * AL1[i] * DS2;
|
||||
G4double DEX = XXX > 100.0 ? huge_num : exp(XXX);
|
||||
G4double DEX = XXX > 100.0 ? huge_num : std::exp(XXX);
|
||||
DX1 = 2.0 * (1.0 + 2.0 * AL1[i] * AL1[i] * DS2) * DEX * DS2;
|
||||
};
|
||||
|
||||
if (fabs(BET1[i]) >= DS1) {
|
||||
if (std::fabs(BET1[i]) >= DS1) {
|
||||
G4double XXX = BET1[i] * BET1[i] * DS2;
|
||||
G4double DEX = XXX > 100.0 ? huge_num : exp(XXX);
|
||||
G4double DEX = XXX > 100.0 ? huge_num : std::exp(XXX);
|
||||
DX2 = 2.0 * (1.+2.0 * BET1[i] * BET1[i] * DS2) * DEX * DS2;
|
||||
};
|
||||
|
||||
@@ -356,9 +356,9 @@ void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
DX1 = 0.0;
|
||||
DX2 = 0.0;
|
||||
|
||||
if (fabs(AL1[i]) >= DS1) DX1 = 2.0 * AL1[i] * DS2 * exp(AL1[i] * AL1[i] * DS2);
|
||||
if (std::fabs(AL1[i]) >= DS1) DX1 = 2.0 * AL1[i] * DS2 * std::exp(AL1[i] * AL1[i] * DS2);
|
||||
|
||||
if (fabs(BET1[i]) >= DS1) DX2 = 2.0 * BET1[i] * DS2 * exp(BET1[i] * BET1[i] * DS2);
|
||||
if (std::fabs(BET1[i]) >= DS1) DX2 = 2.0 * BET1[i] * DS2 * std::exp(BET1[i] * BET1[i] * DS2);
|
||||
B[i] = R2 * RAL[i] - 2.0e-3 * C[i] * AL1[i] + DX1;
|
||||
B[i + 2] = R2 * RBE[i] - 2.0e-3 * F[i] * BET1[i] + DX2;
|
||||
};
|
||||
@@ -380,7 +380,7 @@ void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
BET1[i] += B[i + 2] * STEP;
|
||||
DSOL += B[i] * B[i] + B[i + 2] * B[i + 2];
|
||||
};
|
||||
DSOL = sqrt(DSOL);
|
||||
DSOL = std::sqrt(DSOL);
|
||||
|
||||
if (DSOL < DSOL1) break;
|
||||
};
|
||||
|
||||
@@ -244,7 +244,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
G4double pnuc = momentum_out[1] * momentum_out[1] +
|
||||
momentum_out[2] * momentum_out[2] +
|
||||
momentum_out[3] * momentum_out[3];
|
||||
G4double ekin = sqrt(mass * mass + pnuc) - mass;
|
||||
G4double ekin = std::sqrt(mass * mass + pnuc) - mass;
|
||||
G4double Eex = 1000.0 * (momentum_out[0] - ekin);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
|
||||
@@ -313,7 +313,7 @@ G4bool G4InuclCollider::inelasticInteractionPossible(G4InuclParticle* bullet,
|
||||
};
|
||||
|
||||
// VCOL used for testing if elastic collision possible
|
||||
G4double VCOL = coeff * zt * zb / (pow(at, one_third) + pow(ab, one_third));
|
||||
G4double VCOL = coeff * zt * zb / (std::pow(at, one_third) + std::pow(ab, one_third));
|
||||
|
||||
// possible = VCOL < ekin; // NOTE: inelastic collision if not true
|
||||
possible = true; // we force elastic
|
||||
|
||||
@@ -30,7 +30,7 @@ G4double G4InuclSpecialFunctions::getAL(G4double A) {
|
||||
G4cout << " >>> G4InuclSpecialFunctions::getAL" << G4endl;
|
||||
}
|
||||
|
||||
return 0.76 + 2.2 / pow(A, 0.333333);
|
||||
return 0.76 + 2.2 / std::pow(A, 0.333333);
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::csNN(G4double e) {
|
||||
@@ -83,10 +83,10 @@ G4double G4InuclSpecialFunctions::FermiEnergy(G4double A, G4double Z, G4int ntyp
|
||||
G4double Ef;
|
||||
|
||||
if (ntype == 0) {
|
||||
Ef = C * pow((A - Z) / A, 0.666667);
|
||||
Ef = C * std::pow((A - Z) / A, 0.666667);
|
||||
|
||||
} else {
|
||||
Ef = C * pow(Z / A, 0.666667);
|
||||
Ef = C * std::pow(Z / A, 0.666667);
|
||||
};
|
||||
|
||||
return Ef;
|
||||
@@ -119,7 +119,7 @@ G4double G4InuclSpecialFunctions::randomGauss(G4double sigma) {
|
||||
r2 = r2 > eps ? r2 : eps;
|
||||
r2 = r2 < 1.0 - eps ? r2 : 1.0 - eps;
|
||||
|
||||
return sigma * sin(twopi * r1) * sqrt(-2.0 * log(r2));
|
||||
return sigma * std::sin(twopi * r1) * std::sqrt(-2.0 * std::log(r2));
|
||||
}
|
||||
|
||||
G4double G4InuclSpecialFunctions::randomPHI() {
|
||||
@@ -143,7 +143,7 @@ std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
|
||||
|
||||
G4double CT = 1.0 - 2.0 * inuclRndm();
|
||||
|
||||
return std::pair<G4double, G4double>(CT, sqrt(1.0 - CT * CT));
|
||||
return std::pair<G4double, G4double>(CT, std::sqrt(1.0 - CT * CT));
|
||||
}
|
||||
|
||||
std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct,
|
||||
@@ -156,10 +156,10 @@ std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double c
|
||||
|
||||
std::vector<G4double> momr(4);
|
||||
G4double phi = randomPHI();
|
||||
G4double pt = p * sqrt(fabs(1.0 - ct * ct));
|
||||
G4double pt = p * std::sqrt(std::fabs(1.0 - ct * ct));
|
||||
std::vector<G4double> mom1(4);
|
||||
momr[1] = pt * cos(phi);
|
||||
momr[2] = pt * sin(phi);
|
||||
momr[1] = pt * std::cos(phi);
|
||||
momr[2] = pt * std::sin(phi);
|
||||
momr[3] = p * ct;
|
||||
|
||||
return momr;
|
||||
|
||||
@@ -29,7 +29,7 @@ G4LorentzConvertor::G4LorentzConvertor()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::G4LorentzConvertor" << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
|
||||
@@ -53,7 +53,7 @@ void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
pv += target_mom[i] * velocity[i];
|
||||
};
|
||||
|
||||
gamma = 1.0 / sqrt(fabs(1.0 - v2));
|
||||
gamma = 1.0 / std::sqrt(std::fabs(1.0 - v2));
|
||||
ecm_tot = e_sum / gamma;
|
||||
|
||||
G4double pa = 0.0;
|
||||
@@ -84,7 +84,7 @@ void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
}
|
||||
|
||||
} else {
|
||||
ga = sqrt(ga);
|
||||
ga = std::sqrt(ga);
|
||||
};
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -92,7 +92,7 @@ void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
" pb * pb / pa " << pb * pb / pa << " pv " << pv << G4endl;
|
||||
}
|
||||
|
||||
pscm = sqrt(pa);
|
||||
pscm = std::sqrt(pa);
|
||||
gb = pb / pscm;
|
||||
gbpp = gb / pscm;
|
||||
gapp = ga * pscm;
|
||||
@@ -160,11 +160,11 @@ std::vector<G4double> G4LorentzConvertor::rotate(const std::vector<G4double> mom
|
||||
if(ga1 < small) {
|
||||
mom_rot = mom;
|
||||
} else {
|
||||
ga1 = sqrt(ga1);
|
||||
ga1 = std::sqrt(ga1);
|
||||
|
||||
G4double gb1 = pv / pp;
|
||||
|
||||
pp = sqrt(pp);
|
||||
pp = std::sqrt(pp);
|
||||
|
||||
G4double ga1pp = ga1 * pp;
|
||||
|
||||
@@ -229,9 +229,9 @@ void G4LorentzConvertor::toTheTargetRestFrame() {
|
||||
ga = small;
|
||||
degenerated = true;
|
||||
} else {
|
||||
ga = sqrt(ga);
|
||||
ga = std::sqrt(ga);
|
||||
};
|
||||
pscm = sqrt(pa);
|
||||
pscm = std::sqrt(pa);
|
||||
plab = pscm;
|
||||
gb = pb / pscm;
|
||||
gbpp = gb / pscm;
|
||||
|
||||
+23
-23
@@ -34,7 +34,7 @@ G4NonEquilibriumEvaporator::G4NonEquilibriumEvaporator()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4NonEquilibriumEvaporator::G4NonEquilibriumEvaporator" << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*/,
|
||||
G4InuclParticle* target) {
|
||||
@@ -105,7 +105,7 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
|
||||
// update exiton system
|
||||
G4double nuc_mass = dummy_nuc.getNucleiMass(A, Z);
|
||||
PEX[0] = sqrt(PEX[1] * PEX[1] + PEX[2] * PEX[2] + PEX[3] * PEX[3] +
|
||||
PEX[0] = std::sqrt(PEX[1] * PEX[1] + PEX[2] * PEX[2] + PEX[3] * PEX[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
toTheExitonSystemRestFrame.setTarget(PEX, nuc_mass);
|
||||
toTheExitonSystemRestFrame.toTheTargetRestFrame();
|
||||
@@ -115,13 +115,13 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double parlev = PL / A;
|
||||
G4double EG = PL * EEXS;
|
||||
|
||||
if (QEX < sqrt(2.0 * EG)) { // ok
|
||||
if (QEX < std::sqrt(2.0 * EG)) { // ok
|
||||
|
||||
std::pair<G4double, G4double> parms = paraMakerTruncated(Z);
|
||||
|
||||
G4double AK1 = parms.first;
|
||||
G4double CPA1 = parms.second;
|
||||
G4double VP = coul_coeff * Z * AK1 / (pow(A - 1.0, one_third) + 1.0) /
|
||||
G4double VP = coul_coeff * Z * AK1 / (std::pow(A - 1.0, one_third) + 1.0) /
|
||||
(1.0 + EEXS / E0);
|
||||
G4double DM1 = bindingEnergy(A, Z);
|
||||
G4double BN = DM1 - bindingEnergy(A - 1.0, Z);
|
||||
@@ -137,15 +137,15 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double APH = 0.25 * (QP * QP + QH * QH + QP - 3.0 * QH);
|
||||
G4double APH1 = APH + 0.5 * (QP + QH);
|
||||
ESP = EEXS / QEX;
|
||||
G4double MELE = MEL / ESP / pow(A, 3);
|
||||
G4double MELE = MEL / ESP / std::pow(A, 3);
|
||||
|
||||
if (ESP > 15.0) {
|
||||
MELE *= sqrt(15.0 / ESP);
|
||||
MELE *= std::sqrt(15.0 / ESP);
|
||||
|
||||
} else if(ESP < 7.0) {
|
||||
MELE *= sqrt(ESP / 7.0);
|
||||
MELE *= std::sqrt(ESP / 7.0);
|
||||
|
||||
if (ESP < 2.0) MELE *= sqrt(ESP / 2.0);
|
||||
if (ESP < 2.0) MELE *= std::sqrt(ESP / 2.0);
|
||||
};
|
||||
|
||||
G4double F1 = EG - APH;
|
||||
@@ -155,16 +155,16 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double F = F2 / F1;
|
||||
G4double M1 = 2.77 * MELE * PL;
|
||||
std::vector<G4double> D(3, 0.0);
|
||||
D[0] = M1 * F2 * F2 * pow(F, NEX - 1) / (QEX + 1.0);
|
||||
D[0] = M1 * F2 * F2 * std::pow(F, NEX - 1) / (QEX + 1.0);
|
||||
|
||||
if (D[0] > 0.0) {
|
||||
|
||||
if (NEX >= 2) {
|
||||
D[1] = 0.0462 / parlev / pow(A, one_third) * QP * EEXS / QEX;
|
||||
D[1] = 0.0462 / parlev / std::pow(A, one_third) * QP * EEXS / QEX;
|
||||
|
||||
if (EMP > eexs_cut)
|
||||
D[2] = D[1] * pow(EMP / EEXS, NEX) * (1.0 + CPA1);
|
||||
D[1] *= pow(EMN / EEXS, NEX) * getAL(A);
|
||||
D[2] = D[1] * std::pow(EMP / EEXS, NEX) * (1.0 + CPA1);
|
||||
D[1] *= std::pow(EMN / EEXS, NEX) * getAL(A);
|
||||
|
||||
if (QNP < 1.0) D[1] = 0.0;
|
||||
|
||||
@@ -258,19 +258,19 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double X;
|
||||
|
||||
if (NEX == 2) {
|
||||
X = 1.0 - sqrt(R);
|
||||
X = 1.0 - std::sqrt(R);
|
||||
|
||||
} else {
|
||||
G4double QEX2 = 1.0 / QEX;
|
||||
G4double QEX1 = 1.0 / (QEX - 1.0);
|
||||
X = pow(0.5 * R, QEX2);
|
||||
X = std::pow(0.5 * R, QEX2);
|
||||
|
||||
for (G4int i = 0; i < 1000; i++) {
|
||||
G4double DX = X * QEX1 *
|
||||
(1.0 + QEX2 * X * (1.0 - R / pow(X, NEX)) / (1.0 - X));
|
||||
(1.0 + QEX2 * X * (1.0 - R / std::pow(X, NEX)) / (1.0 - X));
|
||||
X -= DX;
|
||||
|
||||
if (fabs(DX / X) < 0.01) break;
|
||||
if (std::fabs(DX / X) < 0.01) break;
|
||||
|
||||
};
|
||||
};
|
||||
@@ -286,13 +286,13 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double mass = particle.getMass();
|
||||
EPART *= 0.001; // to the GeV
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt(EPART * (2.0 * mass + EPART));
|
||||
G4double pmod = std::sqrt(EPART * (2.0 * mass + EPART));
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
@@ -313,24 +313,24 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* /*bullet*
|
||||
G4double A_new = A - 1.0;
|
||||
G4double new_exiton_mass =
|
||||
dummy_nuc.getNucleiMass(A_new, Z_new);
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[0] = std::sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
mom_at_rest[2] * mom_at_rest[2] +
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
new_exiton_mass * new_exiton_mass);
|
||||
mom[0] = sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[0] = std::sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[3] * mom[3] + mass * mass);
|
||||
|
||||
std::vector<G4double> part_mom =
|
||||
toTheExitonSystemRestFrame.backToTheLab(mom);
|
||||
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[0] = std::sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] + part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheExitonSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] + ex_mom[2] * ex_mom[2]
|
||||
ex_mom[0] = std::sqrt(ex_mom[1] * ex_mom[1] + ex_mom[2] * ex_mom[2]
|
||||
+ ex_mom[3] * ex_mom[3] + new_exiton_mass * new_exiton_mass);
|
||||
// check energy conservation and set new exitation energy
|
||||
EEXS_new = 1000.0 * (PEX[0] + 0.001 * EEXS -
|
||||
|
||||
@@ -34,7 +34,7 @@ G4NucleiModel::G4NucleiModel()
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4NucleiModel::G4NucleiModel" << G4endl;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void G4NucleiModel::generateModel(G4double a,
|
||||
G4double z) {
|
||||
@@ -69,14 +69,14 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
// Set binding energies
|
||||
G4double dm = bindingEnergy(a, z);
|
||||
|
||||
binding_energies.push_back(0.001 * fabs(bindingEnergy(a - 1, z - 1) - dm)); // for P
|
||||
binding_energies.push_back(0.001 * fabs(bindingEnergy(a - 1, z ) - dm)); // for N
|
||||
binding_energies.push_back(0.001 * std::fabs(bindingEnergy(a - 1, z - 1) - dm)); // for P
|
||||
binding_energies.push_back(0.001 * std::fabs(bindingEnergy(a - 1, z ) - dm)); // for N
|
||||
|
||||
G4double CU = cuu * pow(a, one_third);
|
||||
G4double CU = cuu * std::pow(a, one_third);
|
||||
|
||||
G4double D1 = CU / AU;
|
||||
|
||||
G4double D = exp(-D1);
|
||||
G4double D = std::exp(-D1);
|
||||
|
||||
G4double CU2 = 0.0;
|
||||
|
||||
@@ -91,8 +91,8 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
ur.push_back(-D1);
|
||||
|
||||
for (G4int i = 0; i < number_of_zones; i++) {
|
||||
// G4double y = log((1.0 + D) / alfa6[i] - 1.0);
|
||||
G4double y = log((1.0 + D)/alfa3[i] - 1.0);
|
||||
// G4double y = std::log((1.0 + D) / alfa6[i] - 1.0);
|
||||
G4double y = std::log((1.0 + D)/alfa3[i] - 1.0);
|
||||
|
||||
zone_radii.push_back(CU + AU * y);
|
||||
ur.push_back(y);
|
||||
@@ -105,10 +105,10 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
|
||||
G4double CU1 = CU * CU;
|
||||
|
||||
CU2 = sqrt(CU1 * (1.0 - 1.0 / a) + 6.4);
|
||||
CU2 = std::sqrt(CU1 * (1.0 - 1.0 / a) + 6.4);
|
||||
|
||||
for (G4int i = 0; i < number_of_zones; i++) {
|
||||
G4double y = sqrt(-log(alfa3[i]));
|
||||
G4double y = std::sqrt(-std::log(alfa3[i]));
|
||||
zone_radii.push_back(CU2 * y);
|
||||
ur.push_back(y);
|
||||
};
|
||||
@@ -133,8 +133,8 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
|
||||
v.push_back(v0);
|
||||
tot_vol += v0;
|
||||
v0 = (i == 0 ? pow(zone_radii[i], G4double(3)) : pow(zone_radii[i], G4double(3)) -
|
||||
pow(zone_radii[i - 1], G4double(3)));
|
||||
v0 = (i == 0 ? std::pow(zone_radii[i], G4double(3)) : std::pow(zone_radii[i], G4double(3)) -
|
||||
std::pow(zone_radii[i - 1], G4double(3)));
|
||||
v1.push_back(v0);
|
||||
};
|
||||
|
||||
@@ -148,7 +148,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mproton + binding_energies[0]);
|
||||
};
|
||||
@@ -165,7 +165,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mneutron + binding_energies[1]);
|
||||
};
|
||||
@@ -181,7 +181,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
} else { // a < 4
|
||||
number_of_zones = 1;
|
||||
zone_radii.push_back(radForSmall);
|
||||
G4double vol = 1.0 / piTimes4thirds / pow(zone_radii[0], G4double(3));
|
||||
G4double vol = 1.0 / piTimes4thirds / std::pow(zone_radii[0], G4double(3));
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
@@ -191,7 +191,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = vol;
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mproton + binding_energies[0]);
|
||||
};
|
||||
@@ -208,7 +208,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = vol;
|
||||
rod.push_back(rd);
|
||||
G4double pff = pf_coeff * pow(rd, one_third);
|
||||
G4double pff = pf_coeff * std::pow(rd, one_third);
|
||||
pf.push_back(pff);
|
||||
vz.push_back(0.5 * pff * pff / mneutron + binding_energies[1]);
|
||||
};
|
||||
@@ -238,7 +238,7 @@ G4double G4NucleiModel::volNumInt(G4double r1,
|
||||
const G4int itry_max = 1000;
|
||||
G4double d2 = 2.0 * d1;
|
||||
G4double dr = r2 - r1;
|
||||
G4double fi = 0.5 * (r1 * (r1 + d2) / (1.0 + exp(r1)) + r2 * (r2 + d2) / (1.0 + exp(r2)));
|
||||
G4double fi = 0.5 * (r1 * (r1 + d2) / (1.0 + std::exp(r1)) + r2 * (r2 + d2) / (1.0 + std::exp(r2)));
|
||||
G4double fun1 = fi * dr;
|
||||
G4double fun;
|
||||
G4double jc = 1;
|
||||
@@ -251,16 +251,16 @@ G4double G4NucleiModel::volNumInt(G4double r1,
|
||||
|
||||
G4double r = r1 - dr;
|
||||
fi = 0.0;
|
||||
G4int jc1 = G4int(pow(2.0, jc - 1) + 0.1);
|
||||
G4int jc1 = G4int(std::pow(2.0, jc - 1) + 0.1);
|
||||
|
||||
for (G4int i = 0; i < jc1; i++) {
|
||||
r += dr1;
|
||||
fi += r * (r + d2) / (1.0 + exp(r));
|
||||
fi += r * (r + d2) / (1.0 + std::exp(r));
|
||||
};
|
||||
|
||||
fun = 0.5 * fun1 + fi * dr;
|
||||
|
||||
if (fabs((fun - fun1) / fun) > epsilon) {
|
||||
if (std::fabs((fun - fun1) / fun) > epsilon) {
|
||||
jc++;
|
||||
dr1 = dr;
|
||||
fun1 = fun;
|
||||
@@ -276,7 +276,7 @@ G4double G4NucleiModel::volNumInt(G4double r1,
|
||||
if(itry == itry_max) G4cout << " volNumInt-> n iter " << itry_max << G4endl;
|
||||
}
|
||||
|
||||
return au3 * (fun + d1 * d1 * log((1.0 + exp(-r1)) / (1.0 + exp(-r2))));
|
||||
return au3 * (fun + d1 * d1 * std::log((1.0 + std::exp(-r1)) / (1.0 + std::exp(-r2))));
|
||||
}
|
||||
|
||||
G4double G4NucleiModel::volNumInt1(G4double r1,
|
||||
@@ -290,7 +290,7 @@ G4double G4NucleiModel::volNumInt1(G4double r1,
|
||||
const G4int itry_max = 1000;
|
||||
|
||||
G4double dr = r2 - r1;
|
||||
G4double fi = 0.5 * (r1 * r1 * exp(-r1 * r1) + r2 * r2 * exp(-r2 * r2));
|
||||
G4double fi = 0.5 * (r1 * r1 * std::exp(-r1 * r1) + r2 * r2 * std::exp(-r2 * r2));
|
||||
G4double fun1 = fi * dr;
|
||||
G4double fun;
|
||||
G4double jc = 1;
|
||||
@@ -302,16 +302,16 @@ G4double G4NucleiModel::volNumInt1(G4double r1,
|
||||
itry++;
|
||||
G4double r = r1 - dr;
|
||||
fi = 0.0;
|
||||
G4int jc1 = int(pow(2.0, jc - 1) + 0.1);
|
||||
G4int jc1 = int(std::pow(2.0, jc - 1) + 0.1);
|
||||
|
||||
for (G4int i = 0; i < jc1; i++) {
|
||||
r += dr1;
|
||||
fi += r * r * exp(-r * r);
|
||||
fi += r * r * std::exp(-r * r);
|
||||
};
|
||||
|
||||
fun = 0.5 * fun1 + fi * dr;
|
||||
|
||||
if (fabs((fun - fun1) / fun) > epsilon) {
|
||||
if (std::fabs((fun - fun1) / fun) > epsilon) {
|
||||
jc++;
|
||||
dr1 = dr;
|
||||
fun1 = fun;
|
||||
@@ -327,7 +327,7 @@ G4double G4NucleiModel::volNumInt1(G4double r1,
|
||||
if (itry == itry_max) G4cout << " volNumInt1-> n iter " << itry_max << G4endl;
|
||||
}
|
||||
|
||||
return pow(cu2, G4double(3)) * fun;
|
||||
return std::pow(cu2, G4double(3)) * fun;
|
||||
}
|
||||
|
||||
void G4NucleiModel::printModel() const {
|
||||
@@ -350,8 +350,7 @@ void G4NucleiModel::printModel() const {
|
||||
<< " neutrons: density " << getDensity(2,i) << " PF " <<
|
||||
getFermiMomentum(2,i) << " VP " << getPotential(2,i) << G4endl
|
||||
<< " pions: VP " << getPotential(3,i) << G4endl;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
G4InuclElementaryParticle G4NucleiModel::generateNucleon(G4int type,
|
||||
G4int zone) const {
|
||||
@@ -362,9 +361,9 @@ G4InuclElementaryParticle G4NucleiModel::generateNucleon(G4int type,
|
||||
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
|
||||
//G4double pmod = getFermiMomentum(type, zone) * pow(inuclRndm(), one_third);
|
||||
//G4double pmod = getFermiMomentum(type, zone) * std::pow(inuclRndm(), one_third);
|
||||
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * pow(inuclRndm(), one_third);
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * std::pow(inuclRndm(), one_third);
|
||||
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
@@ -374,8 +373,8 @@ G4InuclElementaryParticle G4NucleiModel::generateNucleon(G4int type,
|
||||
|
||||
G4double pt = pmod * COS_SIN.second;
|
||||
|
||||
mom[1] = pt * cos(FI);
|
||||
mom[2] = pt * sin(FI);
|
||||
mom[1] = pt * std::cos(FI);
|
||||
mom[2] = pt * std::sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
|
||||
return G4InuclElementaryParticle(mom, type);
|
||||
@@ -423,11 +422,11 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
|
||||
//const G4double pn_spec = 0.5;
|
||||
|
||||
//const G4double young_cut = sqrt(10.0) * 0.5;
|
||||
//const G4double young_cut = sqrt(10.0) * 0.45;
|
||||
const G4double young_cut = sqrt(10.0) * 0.25;
|
||||
//const G4double young_cut = sqrt(10.0) * 0.2;
|
||||
//const G4double young_cut = sqrt(10.0) * 0.1;
|
||||
//const G4double young_cut = std::sqrt(10.0) * 0.5;
|
||||
//const G4double young_cut = std::sqrt(10.0) * 0.45;
|
||||
const G4double young_cut = std::sqrt(10.0) * 0.25;
|
||||
//const G4double young_cut = std::sqrt(10.0) * 0.2;
|
||||
//const G4double young_cut = std::sqrt(10.0) * 0.1;
|
||||
//const G4double young_cut = 0.0;
|
||||
|
||||
partners thePartners;
|
||||
@@ -461,7 +460,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
if (path < -small) { // something wrong
|
||||
return thePartners;
|
||||
|
||||
} else if (fabs(path) < small) { // just on the bounday
|
||||
} else if (std::fabs(path) < small) { // just on the bounday
|
||||
path = 0.0;
|
||||
|
||||
G4InuclElementaryParticle particle;
|
||||
@@ -492,7 +491,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
G4double pw = -path * dens * csec * rat;
|
||||
|
||||
if (pw < -huge_num) pw = -huge_num;
|
||||
pw = 1.0 - exp(pw);
|
||||
pw = 1.0 - std::exp(pw);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " pw " << pw << " rat " << rat << G4endl;
|
||||
@@ -501,7 +500,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
G4double spath = path;
|
||||
|
||||
if (inuclRndm() < pw) {
|
||||
spath = -1.0 / dens / csec / rat * log(1.0 - pw * inuclRndm());
|
||||
spath = -1.0 / dens / csec / rat * std::log(1.0 - pw * inuclRndm());
|
||||
if (cparticle.young(young_cut, spath)) spath = path;
|
||||
|
||||
if (verboseLevel > 2){
|
||||
@@ -523,9 +522,9 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
|
||||
G4double tot_abs_csec = 0.0;
|
||||
G4double abs_sec;
|
||||
G4double vol = pow(zone_radii[zone], G4double(3));
|
||||
G4double vol = std::pow(zone_radii[zone], G4double(3));
|
||||
|
||||
if (zone > 0) vol -= pow(zone_radii[zone - 1], G4double(3));
|
||||
if (zone > 0) vol -= std::pow(zone_radii[zone - 1], G4double(3));
|
||||
vol *= pi4by3;
|
||||
|
||||
G4double rat = getRatio(1);
|
||||
@@ -594,7 +593,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
G4double pw = -path * tot_abs_csec;
|
||||
|
||||
if (pw < -huge_num) pw = -huge_num;
|
||||
pw = 1.0 - exp(pw);
|
||||
pw = 1.0 - std::exp(pw);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " pw " << pw << G4endl;
|
||||
@@ -603,7 +602,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
G4double apath = path;
|
||||
|
||||
if (inuclRndm() < pw)
|
||||
apath = -1.0 / tot_abs_csec * log(1.0 - pw * inuclRndm());
|
||||
apath = -1.0 / tot_abs_csec * std::log(1.0 - pw * inuclRndm());
|
||||
|
||||
if (cparticle.young(young_cut, apath)) apath = path;
|
||||
|
||||
@@ -851,7 +850,7 @@ void G4NucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
r += pos[i] * pos[i];
|
||||
};
|
||||
|
||||
r = sqrt(r);
|
||||
r = std::sqrt(r);
|
||||
pr /= r;
|
||||
|
||||
G4int next_zone = cparticle.movingInsideNuclei() ? zone - 1 : zone + 1;
|
||||
@@ -873,7 +872,7 @@ void G4NucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
cparticle.incrementReflectionCounter();
|
||||
|
||||
} else { // transition
|
||||
p1r = sqrt(qv);
|
||||
p1r = std::sqrt(qv);
|
||||
if(pr < 0.0) p1r = -p1r;
|
||||
cparticle.updateZone(next_zone);
|
||||
cparticle.resetReflection();
|
||||
@@ -944,15 +943,15 @@ G4CascadParticle G4NucleiModel::initializeCascad(G4InuclElementaryParticle* part
|
||||
|
||||
const G4double large = 1000.0;
|
||||
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double s1 = std::sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = nuclei_radius * s1;
|
||||
|
||||
std::vector<G4double> pos(3);
|
||||
|
||||
pos[0] = rz * cos(phi);
|
||||
pos[1] = rz * sin(phi);
|
||||
pos[2] = -nuclei_radius * sqrt(1.0 - s1 * s1);
|
||||
pos[0] = rz * std::cos(phi);
|
||||
pos[1] = rz * std::sin(phi);
|
||||
pos[2] = -nuclei_radius * std::sqrt(1.0 - s1 * s1);
|
||||
|
||||
G4CascadParticle cpart(*particle, pos, number_of_zones, large);
|
||||
|
||||
@@ -1012,13 +1011,13 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
std::vector<std::vector<G4double> > momentums;
|
||||
|
||||
if (ab < 3.0) { // deutron, simplest case
|
||||
G4double r = 2.214 - 3.4208 * log(1.0 - 0.981 * inuclRndm());
|
||||
G4double r = 2.214 - 3.4208 * std::log(1.0 - 0.981 * inuclRndm());
|
||||
G4double s = 2.0 * inuclRndm() - 1.0;
|
||||
G4double r1 = r * sqrt(1.0 - s * s);
|
||||
G4double r1 = r * std::sqrt(1.0 - s * s);
|
||||
std::vector<G4double> coord1(3);
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = r1 * cos(phi);
|
||||
coord1[1] = r1 * sin(phi);
|
||||
coord1[0] = r1 * std::cos(phi);
|
||||
coord1[1] = r1 * std::sin(phi);
|
||||
coord1[2] = r * s;
|
||||
coordinates.push_back(coord1);
|
||||
G4int i(0);
|
||||
@@ -1051,8 +1050,8 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = p * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[1] = P1 * std::cos(FI);
|
||||
mom[2] = P1 * std::sin(FI);
|
||||
mom[3] = p * COS_SIN.first;
|
||||
momentums.push_back(mom);
|
||||
|
||||
@@ -1079,26 +1078,26 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double s;
|
||||
G4double u;
|
||||
G4double rho;
|
||||
G4double fmax = exp(-0.5) / sqrt(0.5);
|
||||
G4double fmax = std::exp(-0.5) / std::sqrt(0.5);
|
||||
|
||||
while (itry1 < itry_max) {
|
||||
itry1++;
|
||||
s = -log(inuclRndm());
|
||||
s = -std::log(inuclRndm());
|
||||
u = fmax * inuclRndm();
|
||||
rho = sqrt(s) * exp(-s);
|
||||
rho = std::sqrt(s) * std::exp(-s);
|
||||
|
||||
if (sqrt(s) * exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * sqrt(s);
|
||||
if (std::sqrt(s) * std::exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * std::sqrt(s);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
coord1[1] = u * sin(phi);
|
||||
coord1[0] = u * std::cos(phi);
|
||||
coord1[1] = u * std::sin(phi);
|
||||
coord1[2] = s * COS_SIN.first;
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " i " << i << " r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " i " << i << " r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1117,7 +1116,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
for (i = 0; i < 3; i++) coord1[i] = - coordinates[0][i] -
|
||||
coordinates[1][i];
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " 3 r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " 3 r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1128,9 +1127,9 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (G4int j = i+1; j < 3; j++) {
|
||||
G4double r2 = pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
pow(coordinates[i][1] - coordinates[j][1], G4double(2)) +
|
||||
pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
G4double r2 = std::pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
std::pow(coordinates[i][1] - coordinates[j][1], G4double(2)) +
|
||||
std::pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " j " << j << " r2 " << r2 << G4endl;
|
||||
@@ -1153,9 +1152,9 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
} else { // a >= 4
|
||||
G4double b = 3./(ab - 2.0);
|
||||
G4double b1 = 1.0 - b / 2.0;
|
||||
G4double u = b1 + sqrt(b1 * b1 + b);
|
||||
G4double u = b1 + std::sqrt(b1 * b1 + b);
|
||||
b = 1.0 / b;
|
||||
G4double fmax = (1.0 + u * b) * u * exp(-u);
|
||||
G4double fmax = (1.0 + u * b) * u * std::exp(-u);
|
||||
|
||||
while (badco && itry < itry_max) {
|
||||
|
||||
@@ -1170,21 +1169,21 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
while (itry1 < itry_max) {
|
||||
itry1++;
|
||||
s = -log(inuclRndm());
|
||||
s = -std::log(inuclRndm());
|
||||
u = fmax * inuclRndm();
|
||||
|
||||
if (sqrt(s) * exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * sqrt(s);
|
||||
if (std::sqrt(s) * std::exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * std::sqrt(s);
|
||||
std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u*cos(phi);
|
||||
coord1[1] = u*sin(phi);
|
||||
coord1[0] = u*std::cos(phi);
|
||||
coord1[1] = u*std::sin(phi);
|
||||
coord1[2] = s*COS_SIN.first;
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " i " << i << " r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " i " << i << " r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1210,7 +1209,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
coordinates.push_back(coord1);
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " last r " << sqrt(coord1[0] * coord1[0] +
|
||||
G4cout << " last r " << std::sqrt(coord1[0] * coord1[0] +
|
||||
coord1[1] * coord1[1] +
|
||||
coord1[2] * coord1[2]) << G4endl;
|
||||
}
|
||||
@@ -1220,10 +1219,10 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
for (i = 0; i < ia-1; i++) {
|
||||
for (G4int j = i+1; j < ia; j++) {
|
||||
|
||||
G4double r2 = pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
G4double r2 = std::pow(coordinates[i][0] - coordinates[j][0], G4double(2)) +
|
||||
|
||||
pow(coordinates[i][1]-coordinates[j][1], G4double(2)) +
|
||||
pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
std::pow(coordinates[i][1]-coordinates[j][1], G4double(2)) +
|
||||
std::pow(coordinates[i][2] - coordinates[j][2], G4double(2));
|
||||
|
||||
if (verboseLevel > 2){
|
||||
G4cout << " i " << i << " j " << j << " r2 " << r2 << G4endl;
|
||||
@@ -1263,16 +1262,16 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
while(itry < itry_max) {
|
||||
itry++;
|
||||
u = -log(0.879853 - 0.8798502 * inuclRndm());
|
||||
x = u * exp(-u);
|
||||
u = -std::log(0.879853 - 0.8798502 * inuclRndm());
|
||||
x = u * std::exp(-u);
|
||||
|
||||
if(x > inuclRndm()) {
|
||||
p = sqrt(0.01953 * u);
|
||||
p = std::sqrt(0.01953 * u);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double pt = p * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
mom[1] = pt * std::cos(phi);
|
||||
mom[2] = pt * std::sin(phi);
|
||||
mom[3] = p * COS_SIN.first;
|
||||
momentums.push_back(mom);
|
||||
|
||||
@@ -1304,7 +1303,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4int i(0);
|
||||
|
||||
for(i = 0; i < G4int(coordinates.size()); i++) {
|
||||
G4double rp = sqrt(coordinates[i][0] * coordinates[i][0] +
|
||||
G4double rp = std::sqrt(coordinates[i][0] * coordinates[i][0] +
|
||||
coordinates[i][1] * coordinates[i][1] +
|
||||
coordinates[i][2] * coordinates[i][2]);
|
||||
|
||||
@@ -1312,13 +1311,13 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
};
|
||||
|
||||
// nuclei i.p. as a whole
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double s1 = std::sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = (nuclei_radius + rb) * s1;
|
||||
std::vector<double> global_pos(3);
|
||||
global_pos[0] = rz * cos(phi);
|
||||
global_pos[1] = rz * sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * sqrt(1.0 - s1 * s1);
|
||||
global_pos[0] = rz * std::cos(phi);
|
||||
global_pos[1] = rz * std::sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * std::sqrt(1.0 - s1 * s1);
|
||||
|
||||
for (i = 0; i < G4int(coordinates.size()); i++) {
|
||||
coordinates[i][0] += global_pos[0];
|
||||
@@ -1354,7 +1353,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
for(G4int ip = 0; ip < G4int(raw_particles.size()); ip++) {
|
||||
std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
G4double pmod = sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double pmod = std::sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double t0 = -(mom[1] * coordinates[ip][0] + mom[2] * coordinates[ip][1] +
|
||||
mom[3] * coordinates[ip][2]) / pmod;
|
||||
G4double det = t0 * t0 + nuclei_radius * nuclei_radius -
|
||||
@@ -1364,10 +1363,10 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double tr = -1.0;
|
||||
|
||||
if(det > 0.0) {
|
||||
G4double t1 = t0 + sqrt(det);
|
||||
G4double t2 = t0 - sqrt(det);
|
||||
G4double t1 = t0 + std::sqrt(det);
|
||||
G4double t2 = t0 - std::sqrt(det);
|
||||
|
||||
if(fabs(t1) <= fabs(t2)) {
|
||||
if(std::fabs(t1) <= std::fabs(t2)) {
|
||||
if(t1 > 0.0) {
|
||||
if(coordinates[ip][2] + mom[3] * t1 / pmod <= 0.0) tr = t1;
|
||||
};
|
||||
|
||||
@@ -30,18 +30,18 @@ G4RegionModel::G4RegionModel(const G4int numberOfLayers, const G4int A, const G4
|
||||
{
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double oneThird = 1.0/3.0;
|
||||
G4double r = radius0*pow(G4double(A), G4double(oneThird));
|
||||
G4double r = radius0*std::pow(G4double(A), G4double(oneThird));
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = G4double(A) / (4.0/3.0*pi*pow(r,G4double(3)));
|
||||
G4double rho = G4double(A) / (4.0/3.0*pi*std::pow(r,G4double(3)));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass();
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double protonDensity = G4double(Z) / (4.0/3.0*pi*pow(r,G4double(3)));
|
||||
G4double neutronDensity = G4double(A-Z) / (4.0/3.0*pi*pow(r,G4double(3)));
|
||||
G4double protonDensity = G4double(Z) / (4.0/3.0*pi*std::pow(r,G4double(3)));
|
||||
G4double neutronDensity = G4double(A-Z) / (4.0/3.0*pi*std::pow(r,G4double(3)));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
@@ -120,7 +120,7 @@ G4double G4RegionModel::GetMaximumNucleonMomentum(G4double r,
|
||||
G4double G4RegionModel::GetFermiMomentum(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
return sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
return std::sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ G4double G4RegionModel::GetFermiEnergy(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
G4double twoThirds = 2.0/3.0;
|
||||
return (pow(hbar_Planck,2)/(2.0*aMass)*pow((3.0*pi2*aDensity),twoThirds));
|
||||
return (std::pow(hbar_Planck,2)/(2.0*aMass)*std::pow((3.0*pi2*aDensity),twoThirds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ G4double G4InuclSpecialFunctions::bindingEnergyAsymptotic(G4double A,
|
||||
// calculates the nuclei binding energy
|
||||
// using smooth liquid high energy formula
|
||||
G4double X = (1.0 - 2.0 * Z / A) * (1.0 - 2.0 * Z / A);
|
||||
G4double X1 = pow(A, 0.3333333);
|
||||
G4double X1 = std::pow(A, 0.3333333);
|
||||
G4double X2 = X1 * X1;
|
||||
G4double X3 = 1.0 / X1;
|
||||
G4double X4 = 1.0 / X2;
|
||||
@@ -42,7 +42,7 @@ G4double G4InuclSpecialFunctions::bindingEnergyAsymptotic(G4double A,
|
||||
((1.0 -0.62025 * X4) * (1.0 - 0.62025 * X4)) -
|
||||
0.779 * Z * (Z - 1.0) * X3 *
|
||||
(1.0 - 1.5849 * X4 + 1.2273 / A + 1.5772 * X4 * X4) +
|
||||
0.4328 * pow(Z, 1.333333) * X3 *
|
||||
0.4328 * std::pow(Z, 1.333333) * X3 *
|
||||
(1.0 - 0.57811 * X3 - 0.14518 * X4 + 0.496 / A);
|
||||
|
||||
return DM;
|
||||
|
||||
@@ -230,7 +230,7 @@ G4double G4InuclSpecialFunctions::bindingEnergyKummel(G4double A,
|
||||
// deformation
|
||||
G4double TDEF = 0.0;
|
||||
G4double X = Z * Z / A;
|
||||
G4double X1 = pow(A, 0.3333333);
|
||||
G4double X1 = std::pow(A, 0.3333333);
|
||||
G4double X2 = X1 * X1;
|
||||
|
||||
if (IPS != INS && INS >= 3 && IPS >= 2) {
|
||||
@@ -243,11 +243,11 @@ G4double G4InuclSpecialFunctions::bindingEnergyKummel(G4double A,
|
||||
|
||||
if (DNZ > X4) {
|
||||
G4double X5 = USB + X * UCB;
|
||||
G4double X6 = log(DNZ / X4);
|
||||
G4double X7 = sqrt(X6);
|
||||
G4double X6 = std::log(DNZ / X4);
|
||||
G4double X7 = std::sqrt(X6);
|
||||
|
||||
// G4double ALM = AL0 * (X7 + 0.143 * AL0 * X5 / X3);
|
||||
TDEF = -X4 * (X6 + 1.0) + DNZ + 0.038 * X2 * pow(AL0 * X7, 3.0) * X5;
|
||||
TDEF = -X4 * (X6 + 1.0) + DNZ + 0.038 * X2 * std::pow(AL0 * X7, 3.0) * X5;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -58,15 +58,15 @@ void G4BEChargedChannel::calculateProbability()
|
||||
return;
|
||||
}
|
||||
|
||||
// In HETC88 s-s0 was used in exp( s ), in which s0 was either 50 or
|
||||
// In HETC88 s-s0 was used in std::exp( s ), in which s0 was either 50 or
|
||||
// max(s_i), where i goes over all channels.
|
||||
|
||||
G4double levelParam = getLevelDensityParameter();
|
||||
G4double s = 2 * sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
G4double s = 2 * std::sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
G4double constant = A / 2 * ( 2 * spin + 1 ) * ( 1 + coulombFactor() );
|
||||
G4double eye1 = ( pow( s, 2. ) - 3 * s + 3 ) / ( 4 * pow( levelParam, 2. ) ) * exp( s );
|
||||
G4double eye1 = ( std::pow( s, 2. ) - 3 * s + 3 ) / ( 4 * std::pow( levelParam, 2. ) ) * std::exp( s );
|
||||
|
||||
emissionProbability = constant * pow( G4double(residualA), 0.6666666 ) * eye1;
|
||||
emissionProbability = constant * std::pow( G4double(residualA), 0.6666666 ) * eye1;
|
||||
|
||||
if ( verboseLevel >= 6 )
|
||||
G4cout << "G4BEChargedChannel : calculateProbability for " << getName() << G4endl
|
||||
@@ -99,9 +99,9 @@ G4double G4BEChargedChannel::sampleKineticEnergy()
|
||||
// randExp1 = RandExponential::shoot( 1 );
|
||||
// randExp2 = RandExponential::shoot( 1 );
|
||||
// levelParam = getLevelDensityParameter();
|
||||
// s = 2 * sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// kineticEnergyAv = 2 * ( pow( s, 3. ) - 6.0 * pow( s, 2. ) + 15.0 * s - 15.0 ) /
|
||||
// ( ( 2.0 * pow( s, 2. ) - 6.0 * s + 6.0 ) * levelParam );
|
||||
// s = 2 * std::sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// kineticEnergyAv = 2 * ( std::pow( s, 3. ) - 6.0 * std::pow( s, 2. ) + 15.0 * s - 15.0 ) /
|
||||
// ( ( 2.0 * std::pow( s, 2. ) - 6.0 * s + 6.0 ) * levelParam );
|
||||
|
||||
// kineticEnergy = 0.5 * ( randExp1 + randExp2 ) * kineticEnergyAv + getThresh() - getQ();
|
||||
|
||||
@@ -118,8 +118,8 @@ G4double G4BEChargedChannel::sampleKineticEnergy()
|
||||
levelParam = getLevelDensityParameter();
|
||||
|
||||
const G4double xMax = excitationEnergy - getThresh() - correction; // maximum number
|
||||
const G4double xProb = ( - 1 + sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
|
||||
const G4double m = xProb * exp ( 2 * sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
|
||||
const G4double xProb = ( - 1 + std::sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
|
||||
const G4double m = xProb * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
|
||||
|
||||
// Sample x according to density function P(x) with rejection method
|
||||
G4double r1;
|
||||
@@ -131,7 +131,7 @@ G4double G4BEChargedChannel::sampleKineticEnergy()
|
||||
r2 = G4UniformRand() * m;
|
||||
koe++;
|
||||
}
|
||||
while ( r1 * exp ( 2 * sqrt ( levelParam * ( xMax - r1 ) ) ) < r2 );
|
||||
while ( r1 * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - r1 ) ) ) < r2 );
|
||||
|
||||
// G4cout << "Q ch " << koe << G4endl;
|
||||
G4double kineticEnergy = r1 + getCoulomb(); // add coulomb potential;
|
||||
|
||||
@@ -96,12 +96,12 @@ void G4BEGammaDeexcitation::isotropicCosines( G4double & u,
|
||||
{
|
||||
// Samples isotropic random direction cosines.
|
||||
G4double CosTheta = 1.0 - 2.0 * G4UniformRand();
|
||||
G4double SinTheta = sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double SinTheta = std::sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double Phi = twopi * G4UniformRand();
|
||||
|
||||
u = cos( Phi ) * SinTheta;
|
||||
v = cos( Phi ) * CosTheta,
|
||||
w = sin( Phi );
|
||||
u = std::cos( Phi ) * SinTheta;
|
||||
v = std::cos( Phi ) * CosTheta,
|
||||
w = std::sin( Phi );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,18 +69,18 @@ void G4BENeutronChannel::calculateProbability()
|
||||
return;
|
||||
}
|
||||
|
||||
// In HETC88 s-s0 was used in exp( s ), in which s0 was either 50 or
|
||||
// In HETC88 s-s0 was used in std::exp( s ), in which s0 was either 50 or
|
||||
// max(s_i), where i goes over all channels.
|
||||
|
||||
const G4double levelParam = getLevelDensityParameter();
|
||||
|
||||
const G4double s = 2 * sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// const G4double temp = ( pow( s, 2. ) - 3 * s + 3 ) / ( 4 * pow( levelParam, 2. ) )
|
||||
const G4double s = 2 * std::sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// const G4double temp = ( std::pow( s, 2. ) - 3 * s + 3 ) / ( 4 * std::pow( levelParam, 2. ) )
|
||||
// + beta() * ( s - 1 ) / ( 2 * levelParam );
|
||||
const G4double eye0 = exp( s ) * ( s - 1 ) / ( 2 * levelParam );
|
||||
const G4double eye1 = ( pow( s, 2. ) - 3*s +3 ) * exp( s ) / ( 4 * pow( levelParam, 2. ) ) ;
|
||||
const G4double eye0 = std::exp( s ) * ( s - 1 ) / ( 2 * levelParam );
|
||||
const G4double eye1 = ( std::pow( s, 2. ) - 3*s +3 ) * std::exp( s ) / ( 4 * std::pow( levelParam, 2. ) ) ;
|
||||
|
||||
emissionProbability = pow( G4double(residualA), 0.666666 ) * alpha() * ( eye1 + beta() * eye0 );
|
||||
emissionProbability = std::pow( G4double(residualA), 0.666666 ) * alpha() * ( eye1 + beta() * eye0 );
|
||||
|
||||
if ( verboseLevel >= 6 )
|
||||
G4cout << "G4BENeutronChannel : calculateProbability " << G4endl
|
||||
@@ -120,11 +120,11 @@ G4double G4BENeutronChannel::sampleKineticEnergy()
|
||||
// e2 = RandExponential::shoot( 1 );
|
||||
|
||||
// levelParam = getLevelDensityParameter();
|
||||
// s = 2 * sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// eye0 = 0.5 * ( s - 1 ) * exp( s ) / levelParam;
|
||||
// eye1 = ( pow( s, 2. ) - 3*s + 3 ) * exp( s ) / ( 4 * pow( levelParam, 2. ) );
|
||||
// kineticEnergyAv = 2 * ( pow( s, 3. ) - 6.0 * pow( s, 2. ) + 15.0 * s - 15.0 ) /
|
||||
// ( ( 2.0 * pow( s, 2. ) - 6.0 * s + 6.0 ) * levelParam );
|
||||
// s = 2 * std::sqrt( levelParam * ( excitationEnergy - getThresh() - correction ) );
|
||||
// eye0 = 0.5 * ( s - 1 ) * std::exp( s ) / levelParam;
|
||||
// eye1 = ( std::pow( s, 2. ) - 3*s + 3 ) * std::exp( s ) / ( 4 * std::pow( levelParam, 2. ) );
|
||||
// kineticEnergyAv = 2 * ( std::pow( s, 3. ) - 6.0 * std::pow( s, 2. ) + 15.0 * s - 15.0 ) /
|
||||
// ( ( 2.0 * std::pow( s, 2. ) - 6.0 * s + 6.0 ) * levelParam );
|
||||
// kineticEnergyAv = ( kineticEnergyAv + beta() ) / ( 1.0 + beta() * eye0
|
||||
// / eye1 );
|
||||
|
||||
@@ -132,7 +132,7 @@ G4double G4BENeutronChannel::sampleKineticEnergy()
|
||||
|
||||
////////////////
|
||||
// A random number is sampled from the density function
|
||||
// P(x) = x * exp ( 2 sqrt ( a ( xMax - x ) ) ) [not normalized],
|
||||
// P(x) = x * std::exp ( 2 std::sqrt ( a ( xMax - x ) ) ) [not normalized],
|
||||
// x belongs to [ 0, xMax ]
|
||||
// with the 'Hit or Miss' -method
|
||||
// Kinetic energy is this energy scaled properly
|
||||
@@ -141,8 +141,8 @@ G4double G4BENeutronChannel::sampleKineticEnergy()
|
||||
levelParam = getLevelDensityParameter();
|
||||
|
||||
const G4double xMax = excitationEnergy - getThresh() - correction + beta(); // maximum number
|
||||
const G4double xProb = ( - 1 + sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
|
||||
const G4double m = xProb * exp ( 2 * sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
|
||||
const G4double xProb = ( - 1 + std::sqrt ( 1 + 4 * levelParam * xMax ) ) / ( 2 * levelParam ); // most probable value
|
||||
const G4double m = xProb * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - xProb ) ) ); // maximum value of P(x)
|
||||
|
||||
// Sample x according to density function P(x) with rejection method
|
||||
G4double r1;
|
||||
@@ -154,7 +154,7 @@ G4double G4BENeutronChannel::sampleKineticEnergy()
|
||||
r2 = G4UniformRand() * m;
|
||||
koe++;
|
||||
}
|
||||
while ( r1 * exp ( 2 * sqrt ( levelParam * ( xMax - r1 ) ) ) < r2 );
|
||||
while ( r1 * std::exp ( 2 * std::sqrt ( levelParam * ( xMax - r1 ) ) ) < r2 );
|
||||
|
||||
// G4cout << koe << G4endl;
|
||||
G4double kineticEnergy = r1 - beta();
|
||||
@@ -189,13 +189,13 @@ G4DynamicParticle * G4BENeutronChannel::emit()
|
||||
G4double G4BENeutronChannel::alpha()
|
||||
{
|
||||
const G4double residualA = nucleusA - particleA;
|
||||
return 0.76 + 1.93 * pow( residualA, -0.33333 );
|
||||
return 0.76 + 1.93 * std::pow( residualA, -0.33333 );
|
||||
}
|
||||
|
||||
|
||||
G4double G4BENeutronChannel::beta()
|
||||
{
|
||||
G4double residualA = nucleusA - particleA;
|
||||
return ( 1.66 * pow ( residualA, -0.66666 ) - 0.05 )/alpha()*MeV;
|
||||
return ( 1.66 * std::pow ( residualA, -0.66666 ) - 0.05 )/alpha()*MeV;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ G4FragmentVector * G4BertiniEvaporation::BreakItUp( G4LayeredNucleus & nucleus )
|
||||
// vol. 35, 1957, p.1022
|
||||
|
||||
nucleusTotalMomentum = pEmittedParticle->GetTotalMomentum(); // CMS frame
|
||||
nucleusKineticEnergy = pow( nucleusTotalMomentum, 2 ) / ( 2 * mRes );
|
||||
nucleusKineticEnergy = std::pow( nucleusTotalMomentum, 2 ) / ( 2 * mRes );
|
||||
newExcitation = excE - pEmittedParticle->GetKineticEnergy() - nucleusKineticEnergy - pSelectedChannel->getQ();
|
||||
|
||||
if ( verboseLevel >= 10)
|
||||
@@ -402,12 +402,12 @@ void G4BertiniEvaporation::isotropicCosines( G4double & u, G4double & v, G4doubl
|
||||
{
|
||||
// Samples isotropic random direction cosines.
|
||||
G4double CosTheta = 1.0 - 2.0 * G4UniformRand();
|
||||
G4double SinTheta = sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double SinTheta = std::sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double Phi = twopi * G4UniformRand();
|
||||
|
||||
u = cos( Phi ) * SinTheta;
|
||||
v = cos( Phi ) * CosTheta,
|
||||
w = sin( Phi );
|
||||
u = std::cos( Phi ) * SinTheta;
|
||||
v = std::cos( Phi ) * CosTheta,
|
||||
w = std::sin( Phi );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+6
-6
@@ -159,7 +159,7 @@ G4double G4BertiniEvaporationChannel::getCoulomb()
|
||||
// In HETC88 this factor was 0.88235, perhaps due to different r0
|
||||
|
||||
G4double coulomb = factor * particleZ * qmFactor() * residualZ /
|
||||
( pow( G4double(residualA), 0.33333333 ) + rho ) * MeV;
|
||||
( std::pow( G4double(residualA), 0.33333333 ) + rho ) * MeV;
|
||||
|
||||
if ( verboseLevel >= 10 )
|
||||
G4cout << " G4BertiniEvaporationChannel::getThresh() " << G4endl
|
||||
@@ -192,7 +192,7 @@ G4double G4BertiniEvaporationChannel::getLevelDensityParameter()
|
||||
G4double y0 = 1.5;
|
||||
|
||||
G4double temp = ( residualA - 2.0 * residualZ ) / residualA;
|
||||
G4double smallA = residualA * ( 1.0 + y0 * pow( temp, 2. ) ) / b0 / MeV;
|
||||
G4double smallA = residualA * ( 1.0 + y0 * std::pow( temp, 2. ) ) / b0 / MeV;
|
||||
|
||||
// In HETC98 b0 = b0(E).
|
||||
|
||||
@@ -204,12 +204,12 @@ void G4BertiniEvaporationChannel::isotropicCosines( G4double & u, G4double & v,
|
||||
{
|
||||
// Samples isotropic random direction cosines.
|
||||
G4double CosTheta = 1.0 - 2.0 * G4UniformRand();
|
||||
G4double SinTheta = sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double SinTheta = std::sqrt( 1.0 - CosTheta * CosTheta );
|
||||
G4double Phi = twopi * G4UniformRand();
|
||||
|
||||
u = cos( Phi ) * SinTheta;
|
||||
v = cos( Phi ) * CosTheta,
|
||||
w = sin( Phi );
|
||||
u = std::cos( Phi ) * SinTheta;
|
||||
v = std::cos( Phi ) * CosTheta,
|
||||
w = std::sin( Phi );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// J.P.Wellisch: 23-Apr-97: minor simplifications
|
||||
// modified by J.L.Chuma 24-Jul-97 to set the total momentum in Cinema and
|
||||
// EvaporationEffects
|
||||
// modified by J.L.Chuma 21-Oct-97 put abs() around the totalE^2-mass^2
|
||||
// modified by J.L.Chuma 21-Oct-97 put std::abs() around the totalE^2-mass^2
|
||||
// in calculation of total momentum in
|
||||
// Cinema and EvaporationEffects
|
||||
// Chr. Volcker, 10-Nov-1997: new methods and class variables.
|
||||
|
||||
Reference in New Issue
Block a user