Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4LEKaonPlusInelastic.cc,v 1.10 2003/10/31 18:04:16 hpw Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4LEKaonPlusInelastic.cc,v 1.11 2004/12/07 13:49:17 gunter Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Hadronic Process: Low Energy KaonPlus Inelastic Process
// J.L. Chuma, TRIUMF, 05-Feb-1997
@@ -67,7 +67,7 @@
ek += tkin;
currentParticle.SetKineticEnergy( ek );
G4double et = ek + amas;
G4double p = sqrt( abs((et-amas)*(et+amas)) );
G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
G4double pp = currentParticle.GetMomentum().mag();
if( pp > 0.0 )
{
@@ -81,7 +81,7 @@
ek -= tkin;
currentParticle.SetKineticEnergy( ek );
et = ek + amas;
p = sqrt( abs((et-amas)*(et+amas)) );
p = std::sqrt( std::abs((et-amas)*(et+amas)) );
pp = currentParticle.GetMomentum().mag();
if( pp > 0.0 )
{
@@ -144,7 +144,7 @@
const G4double mOriginal = originalIncident->GetDefinition()->GetPDGMass();
const G4double etOriginal = originalIncident->GetTotalEnergy();
const G4double targetMass = targetParticle.GetMass();
G4double centerofmassEnergy = sqrt( mOriginal*mOriginal +
G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
targetMass*targetMass +
2.0*targetMass*etOriginal );
G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
@@ -232,7 +232,7 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( std::min( expxu, std::max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
test = std::exp( std::min( expxu, std::max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = test*2.0;
if( G4UniformRand() < w0/(w0+wp) )
@@ -242,10 +242,10 @@
}
else // target is a neutron
{
test = exp( std::min( expxu, std::max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
test = std::exp( std::min( expxu, std::max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( std::min( expxu, std::max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
test = std::exp( std::min( expxu, std::max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -278,9 +278,9 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
if( std::fabs(dum) < 1.0 )
{
if( test >= 1.0e-10 )excs += dum*test;
}
@@ -308,9 +308,9 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
if( std::fabs(dum) < 1.0 )
{
if( test >= 1.0e-10 )excs += dum*test;
}