Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.12 2004/12/10 22:04:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -202,7 +202,7 @@ G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -369,7 +369,7 @@ G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -379,9 +379,9 @@ G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -403,9 +403,9 @@ G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -434,9 +434,9 @@ G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiLambdaInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiLambdaInelastic.cc,v 1.12 2004/12/10 22:04:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -203,7 +203,7 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -341,7 +341,7 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -422,7 +422,7 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -432,9 +432,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -456,9 +456,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -487,9 +487,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -601,7 +601,7 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -611,9 +611,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -634,9 +634,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -662,9 +662,9 @@ G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiNeutronInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiNeutronInelastic.cc,v 1.12 2004/12/10 22:04:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -203,7 +203,7 @@ void
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -343,7 +343,7 @@ void
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
pv[0] = AntiProton;
|
||||
pv[1] = Proton;
|
||||
@@ -381,7 +381,7 @@ void
|
||||
if( targetCode == protonCode ) // target is a proton
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
w0 = wp = exp(w0);
|
||||
w0 = wp = std::exp(w0);
|
||||
if( G4UniformRand() < w0/(w0+wp) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
else
|
||||
@@ -390,9 +390,9 @@ void
|
||||
else
|
||||
{ // target is a neutron
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
w0 = wp = exp(w0);
|
||||
w0 = wp = std::exp(w0);
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -408,7 +408,7 @@ void
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -418,9 +418,9 @@ void
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -442,9 +442,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -473,9 +473,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -543,7 +543,7 @@ void
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -553,9 +553,9 @@ void
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -576,9 +576,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -604,9 +604,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.12 2004/12/10 22:04:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -199,7 +199,7 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
// on the whole performance of the program. Take AntiLambda instaed.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -337,7 +337,7 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5 ));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -418,7 +418,7 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -428,9 +428,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -452,9 +452,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -483,9 +483,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -597,7 +597,7 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -607,9 +607,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -630,9 +630,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -658,9 +658,9 @@ G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiProtonInelastic.cc,v 1.9 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiProtonInelastic.cc,v 1.11 2004/12/10 22:04:29 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -94,7 +94,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
G4HEVector targetParticle;
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -203,7 +203,7 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -346,7 +346,7 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
|
||||
G4int iplab = G4int( incidentTotalMomentum*10.);
|
||||
if (iplab > 9) iplab = Imin(19, G4int( incidentTotalMomentum) + 9);
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange pi+ n -> pi0 p
|
||||
pv[0] = AntiNeutron;
|
||||
pv[1] = Neutron;
|
||||
@@ -383,9 +383,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
if( targetCode == neutronCode ) // target is a neutron
|
||||
{
|
||||
w0 = - sqr(1.+neutb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
w0 = std::exp(w0);
|
||||
wm = - sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
if( G4UniformRand() < w0/(w0+wm) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
else
|
||||
@@ -394,10 +394,10 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a proton
|
||||
w0 = -sqr(1.+protb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
w0 = std::exp(w0);
|
||||
wp = w0;
|
||||
wm = -sqr(-1.+protb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -413,7 +413,7 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -423,9 +423,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -447,9 +447,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -478,9 +478,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -548,7 +548,7 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -558,9 +558,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -581,9 +581,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -609,9 +609,9 @@ G4HEAntiProtonInelastic::FirstIntInCasAntiProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.12 2004/12/10 22:04:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
G4HEVector targetParticle;
|
||||
@@ -107,7 +107,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -202,7 +202,7 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -340,7 +340,7 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5 ));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -400,7 +400,7 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -410,9 +410,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -434,9 +434,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -465,9 +465,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -561,7 +561,7 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -571,9 +571,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -594,9 +594,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -622,9 +622,9 @@ G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.12 2004/12/10 22:04:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -93,7 +93,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -203,7 +203,7 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -341,7 +341,7 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -401,7 +401,7 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -411,9 +411,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -435,9 +435,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -466,9 +466,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -561,7 +561,7 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -571,9 +571,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -594,9 +594,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -622,9 +622,9 @@ G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.8 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiXiMinusInelastic.cc,v 1.10 2003/07/01 15:42:23 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiXiMinusInelastic.cc,v 1.12 2004/12/10 22:04:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -202,7 +202,7 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
// on the whole performance of the program. Take AntiLambda instaed.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -340,7 +340,7 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -421,7 +421,7 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -431,9 +431,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -455,9 +455,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -486,9 +486,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -600,7 +600,7 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -610,9 +610,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -633,9 +633,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -661,9 +661,9 @@ G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEAntiXiZeroInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEAntiXiZeroInelastic.cc,v 1.12 2004/12/10 22:04:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -203,7 +203,7 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
// on the whole performance of the program. Take AntiLambda instaed.
|
||||
// ( decay Xi0 -> L Pi > 99 % )
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -341,7 +341,7 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
|
||||
G4int iplab = std::min(9, G4int( incidentTotalMomentum*2.5 ));
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
|
||||
@@ -422,7 +422,7 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -432,9 +432,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -456,9 +456,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -487,9 +487,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -601,7 +601,7 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
if ( availableEnergy > 2. * PionPlus.getMass() )
|
||||
{
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -611,9 +611,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
|
||||
for( nt=2; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -634,9 +634,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmulAn[counter]*protnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -662,9 +662,9 @@ G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmulAn[counter]*neutnormAn[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEKaonMinusInelastic.cc,v 1.9 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEKaonMinusInelastic.cc,v 1.11 2004/12/10 22:04:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ void
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -375,7 +375,7 @@ void
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -385,9 +385,9 @@ void
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -409,9 +409,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -440,9 +440,9 @@ void
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEKaonPlusInelastic.cc,v 1.9 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEKaonPlusInelastic.cc,v 1.11 2004/12/10 22:04:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -208,7 +208,7 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -302,7 +302,7 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
{
|
||||
G4double cech[] = {0.33,0.27,0.29,0.31,0.27,0.18,0.13,0.10,0.09,0.07};
|
||||
G4int iplab = G4int( Amin( 9.0, incidentTotalMomentum*5. ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange K+ n -> K0 p
|
||||
pv[0] = KaonZero;
|
||||
pv[1] = Proton;
|
||||
@@ -328,7 +328,7 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
if( targetCode == protonCode ) // target is a proton
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
wp *= 2.;
|
||||
if( G4UniformRand() < w0/(w0+wp) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
@@ -338,9 +338,9 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a neutron
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -356,7 +356,7 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -366,9 +366,9 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -390,9 +390,9 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -421,9 +421,9 @@ G4HEKaonPlusInelastic::FirstIntInCasKaonPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEKaonZeroInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEKaonZeroInelastic.cc,v 1.12 2004/12/10 22:04:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -300,7 +300,7 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
{
|
||||
G4double cech[] = {0.33,0.27,0.29,0.31,0.27,0.18,0.13,0.10,0.09,0.07};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*5. ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange K+ n -> K0 p
|
||||
pv[0] = KaonPlus;
|
||||
pv[1] = Neutron;
|
||||
@@ -326,9 +326,9 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
if( targetCode == neutronCode ) // target is a neutron
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
w0 = std::exp(w0);
|
||||
wm = - sqr(-1.+protb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
w0 = w0/2.;
|
||||
wm = wm*1.5;
|
||||
if( G4UniformRand() < w0/(w0+wm) ) { np = 0; nm = 0; nz = 1; }
|
||||
@@ -338,9 +338,9 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a proton
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -356,7 +356,7 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -366,9 +366,9 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -390,9 +390,9 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -421,9 +421,9 @@ G4HEKaonZeroInelastic::FirstIntInCasKaonZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEKaonZeroLongInelastic.cc,v 1.8 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEKaonZeroShortInelastic.cc,v 1.8 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HELambdaInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HELambdaInelastic.cc,v 1.12 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == protonCode)
|
||||
@@ -365,7 +365,7 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -375,9 +375,9 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -399,9 +399,9 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -430,9 +430,9 @@ G4HELambdaInelastic::FirstIntInCasLambda( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HENeutronInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HENeutronInelastic.cc,v 1.12 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.35;
|
||||
@@ -300,7 +300,7 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
{
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange n p -> p n
|
||||
pv[0] = Proton;
|
||||
pv[1] = Neutron;
|
||||
@@ -326,7 +326,7 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
if( targetCode == neutronCode ) // target is a neutron
|
||||
{
|
||||
w0 = - sqr(1.+neutb)/(2.*c*c);
|
||||
wm = w0 = exp(w0);
|
||||
wm = w0 = std::exp(w0);
|
||||
w0 = w0/2.;
|
||||
if( G4UniformRand() < w0/(w0+wm) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
@@ -336,10 +336,10 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a proton
|
||||
w0 = -sqr(1.+protb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
w0 = std::exp(w0);
|
||||
wp = w0/2.;
|
||||
wm = -sqr(-1.+protb)/(2.*c*c);
|
||||
wm = exp(wm)/2.;
|
||||
wm = std::exp(wm)/2.;
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -355,7 +355,7 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -365,9 +365,9 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -389,9 +389,9 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -420,9 +420,9 @@ G4HENeutronInelastic::FirstIntInCasNeutron( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEOmegaMinusInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEOmegaMinusInelastic.cc,v 1.12 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == protonCode)
|
||||
@@ -367,7 +367,7 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -377,9 +377,9 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -401,9 +401,9 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -432,9 +432,9 @@ G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPionMinusInelastic.cc,v 1.9 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEPionMinusInelastic.cc,v 1.11 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
G4HEVector targetParticle;
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -205,7 +205,7 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -328,9 +328,9 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
if( targetCode == protonCode ) // target is a proton
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
wm = - sqr(-1.+protb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wp *= 10.;
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
@@ -346,8 +346,8 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
{ // target is a neutron
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
wm = exp(wm);
|
||||
w0 = std::exp(w0);
|
||||
wm = std::exp(wm);
|
||||
if( G4UniformRand() < w0/(w0+wm) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
else
|
||||
@@ -358,7 +358,7 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -368,9 +368,9 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -392,9 +392,9 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -423,9 +423,9 @@ G4HEPionMinusInelastic::FirstIntInCasPionMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPionPlusInelastic.cc,v 1.10 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEPionPlusInelastic.cc,v 1.12 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -207,7 +207,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -302,7 +302,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
{
|
||||
G4double cech[] = {0.33,0.27,0.29,0.31,0.27,0.18,0.13,0.10,0.09,0.07};
|
||||
G4int iplab = G4int( Amin( 9.0, incidentTotalMomentum*5. ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange pi+ n -> pi0 p
|
||||
pv[0] = PionZero;
|
||||
pv[1] = Proton;
|
||||
@@ -328,7 +328,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
if( targetCode == protonCode ) // target is a proton
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
if( G4UniformRand() < w0/(w0+wp) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
else
|
||||
@@ -337,9 +337,9 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a neutron
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm);
|
||||
wm = std::exp(wm);
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -355,7 +355,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -365,9 +365,9 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -389,9 +389,9 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -420,9 +420,9 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPlot.cc,v 1.8 2002/12/12 19:18:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4HEPlot.cc,v 1.9 2004/12/07 13:48:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -228,18 +228,18 @@ G4HEPlot::Log( G4double s, const G4HEPlot & p)
|
||||
for(G4int i=0; i<Nbin; i++)
|
||||
{
|
||||
if(s*p.Yvalue[i] <= 0.) Yvalue[i] = 0.;
|
||||
else Yvalue[i] = log10(s*p.Yvalue[i]);
|
||||
else Yvalue[i] = std::log10(s*p.Yvalue[i]);
|
||||
}
|
||||
|
||||
Entries = p.Entries ;
|
||||
EntriesOverflow = p.EntriesOverflow;
|
||||
EntriesUnderflow = p.EntriesUnderflow;
|
||||
if(p.Weight > 0)
|
||||
Weight = log10(s*p.Weight);
|
||||
Weight = std::log10(s*p.Weight);
|
||||
if(p.WeightUnderflow > 0)
|
||||
WeightUnderflow = log10(s*p.WeightUnderflow);
|
||||
WeightUnderflow = std::log10(s*p.WeightUnderflow);
|
||||
if(p.WeightOverflow > 0)
|
||||
WeightOverflow = log10(s*p.WeightOverflow);
|
||||
WeightOverflow = std::log10(s*p.WeightOverflow);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -254,14 +254,14 @@ G4HEPlot::Sqrt(G4double s, const G4HEPlot & p)
|
||||
for (G4int i=0; i<Nbin; i++)
|
||||
{
|
||||
if(s*p.Yvalue[i] <= 0.) Yvalue[i] = 0.;
|
||||
else Yvalue[i] = sqrt(s*p.Yvalue[i]);
|
||||
else Yvalue[i] = std::sqrt(s*p.Yvalue[i]);
|
||||
}
|
||||
Entries = p.Entries;
|
||||
EntriesOverflow = p.EntriesOverflow;
|
||||
EntriesUnderflow = p.EntriesUnderflow;
|
||||
if(s*p.Weight > 0.) Weight = sqrt(s*p.Weight);
|
||||
if(s*p.WeightUnderflow > 0.) WeightUnderflow = sqrt(s*p.WeightUnderflow);
|
||||
if(s*p.WeightOverflow > 0.) WeightOverflow = sqrt(s*p.WeightOverflow);
|
||||
if(s*p.Weight > 0.) Weight = std::sqrt(s*p.Weight);
|
||||
if(s*p.WeightUnderflow > 0.) WeightUnderflow = std::sqrt(s*p.WeightUnderflow);
|
||||
if(s*p.WeightOverflow > 0.) WeightOverflow = std::sqrt(s*p.WeightOverflow);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEProtonInelastic.cc,v 1.9 2003/07/01 15:42:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEProtonInelastic.cc,v 1.11 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -100,7 +100,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -210,7 +210,7 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -305,7 +305,7 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
{
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( Amin( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{ // charge exchange pi+ n -> pi0 p
|
||||
pv[0] = PionZero;
|
||||
pv[1] = Proton;
|
||||
@@ -331,7 +331,7 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
if( targetCode == protonCode ) // target is a proton
|
||||
{
|
||||
w0 = - sqr(1.+protb)/(2.*c*c);
|
||||
wp = w0 = exp(w0);
|
||||
wp = w0 = std::exp(w0);
|
||||
if( G4UniformRand() < w0/(w0+wp) )
|
||||
{ np = 0; nm = 0; nz = 1; }
|
||||
else
|
||||
@@ -340,10 +340,10 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
else
|
||||
{ // target is a neutron
|
||||
w0 = -sqr(1.+neutb)/(2.*c*c);
|
||||
w0 = exp(w0);
|
||||
w0 = std::exp(w0);
|
||||
wp = w0/2.;
|
||||
wm = -sqr(-1.+neutb)/(2.*c*c);
|
||||
wm = exp(wm)/2.;
|
||||
wm = std::exp(wm)/2.;
|
||||
wt = w0+wp+wm;
|
||||
wp = w0+wp;
|
||||
ran = G4UniformRand();
|
||||
@@ -359,7 +359,7 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
{
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -369,9 +369,9 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -393,9 +393,9 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -424,9 +424,9 @@ G4HEProtonInelastic::FirstIntInCasProton( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( Amin( expxu, Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HESigmaMinusInelastic.cc,v 1.10 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HESigmaMinusInelastic.cc,v 1.12 2004/12/10 22:04:33 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == neutronCode)
|
||||
@@ -344,7 +344,7 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -354,9 +354,9 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -378,9 +378,9 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -409,9 +409,9 @@ G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HESigmaPlusInelastic.cc,v 1.10 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HESigmaPlusInelastic.cc,v 1.12 2004/12/10 22:04:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == protonCode)
|
||||
@@ -344,7 +344,7 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -354,9 +354,9 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -378,9 +378,9 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -409,9 +409,9 @@ G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HESigmaZeroInelastic.cc,v 1.9 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEVector.cc,v 1.14 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEVector.cc,v 1.17 2004/12/10 22:04:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -134,7 +134,7 @@ G4HEVector::setMomentumAndUpdate( const G4ParticleMomentum mom )
|
||||
px = mom.x();
|
||||
py = mom.y();
|
||||
pz = mom.z();
|
||||
energy = sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
kineticEnergy = Amax(0.,energy - mass);
|
||||
return;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ G4HEVector::setMomentumAndUpdate( const G4ParticleMomentum * mom )
|
||||
px = mom->x();
|
||||
py = mom->y();
|
||||
pz = mom->z();
|
||||
energy = sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
kineticEnergy = Amax(0.,energy - mass);
|
||||
return;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ G4HEVector::getMomentum() const
|
||||
G4double
|
||||
G4HEVector::getTotalMomentum()
|
||||
{
|
||||
return sqrt(px*px + py*py + pz*pz);
|
||||
return std::sqrt(px*px + py*py + pz*pz);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -181,7 +181,7 @@ G4HEVector::setMomentumAndUpdate( G4double x, G4double y, G4double z )
|
||||
px = x;
|
||||
py = y;
|
||||
pz = z;
|
||||
energy = sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
kineticEnergy = Amax(0.,energy-mass);
|
||||
return;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ G4HEVector::setMomentumAndUpdate( G4double x, G4double y )
|
||||
{
|
||||
px = x;
|
||||
py = y;
|
||||
energy = sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
kineticEnergy = Amax(0.,energy-mass);
|
||||
return;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void
|
||||
G4HEVector::setMomentumAndUpdate( G4double z )
|
||||
{
|
||||
pz = z;
|
||||
energy = sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
|
||||
kineticEnergy = Amax(0.,energy-mass);
|
||||
return;
|
||||
}
|
||||
@@ -242,15 +242,15 @@ G4HEVector::setEnergyAndUpdate( G4double e )
|
||||
{
|
||||
energy = e;
|
||||
kineticEnergy = energy - mass;
|
||||
G4double momold = sqrt(px*px + py*py + pz*pz);
|
||||
G4double momnew = sqrt(energy*energy - mass*mass);
|
||||
G4double momold = std::sqrt(px*px + py*py + pz*pz);
|
||||
G4double momnew = std::sqrt(energy*energy - mass*mass);
|
||||
if (momold == 0.)
|
||||
{
|
||||
G4double cost = 1.0- 2.0*G4UniformRand();
|
||||
G4double sint = sqrt(1. - cost*cost);
|
||||
G4double phi = M_2PI* G4UniformRand();
|
||||
px = momnew * sint * cos(phi);
|
||||
py = momnew * sint * sin(phi);
|
||||
G4double sint = std::sqrt(1. - cost*cost);
|
||||
G4double phi = twopi* G4UniformRand();
|
||||
px = momnew * sint * std::cos(phi);
|
||||
py = momnew * sint * std::sin(phi);
|
||||
pz = momnew * cost;
|
||||
}
|
||||
else
|
||||
@@ -286,15 +286,15 @@ G4HEVector::setKineticEnergyAndUpdate(G4double ekin)
|
||||
{
|
||||
energy = ekin + mass;
|
||||
kineticEnergy = ekin;
|
||||
G4double momold = sqrt(px*px + py*py + pz*pz);
|
||||
G4double momnew = sqrt(energy*energy - mass*mass);
|
||||
G4double momold = std::sqrt(px*px + py*py + pz*pz);
|
||||
G4double momnew = std::sqrt(energy*energy - mass*mass);
|
||||
if (momold == 0.)
|
||||
{
|
||||
G4double cost = 1.0-2.0*G4UniformRand();
|
||||
G4double sint = sqrt(1. - cost*cost);
|
||||
G4double phi = M_2PI* G4UniformRand();
|
||||
px = momnew * sint * cos(phi);
|
||||
py = momnew * sint * sin(phi);
|
||||
G4double sint = std::sqrt(1. - cost*cost);
|
||||
G4double phi = twopi* G4UniformRand();
|
||||
px = momnew * sint * std::cos(phi);
|
||||
py = momnew * sint * std::sin(phi);
|
||||
pz = momnew * cost;
|
||||
}
|
||||
else
|
||||
@@ -333,7 +333,7 @@ G4HEVector::setMassAndUpdate( G4double m )
|
||||
kineticEnergy = Amax(0., energy - mass);
|
||||
mass = m;
|
||||
energy = kineticEnergy + mass;
|
||||
G4double momnew = sqrt(Amax(0., energy*energy - mass*mass));
|
||||
G4double momnew = std::sqrt(Amax(0., energy*energy - mass*mass));
|
||||
if ( momnew == 0.0)
|
||||
{
|
||||
px = 0.;
|
||||
@@ -342,14 +342,14 @@ G4HEVector::setMassAndUpdate( G4double m )
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double momold = sqrt(px*px + py*py + pz*pz);
|
||||
G4double momold = std::sqrt(px*px + py*py + pz*pz);
|
||||
if (momold == 0.)
|
||||
{
|
||||
G4double cost = 1.-2.*G4UniformRand();
|
||||
G4double sint = sqrt(1.-cost*cost);
|
||||
G4double phi = M_2PI*G4UniformRand();
|
||||
px = momnew*sint*cos(phi);
|
||||
py = momnew*sint*sin(phi);
|
||||
G4double sint = std::sqrt(1.-cost*cost);
|
||||
G4double phi = twopi*G4UniformRand();
|
||||
px = momnew*sint*std::cos(phi);
|
||||
py = momnew*sint*std::sin(phi);
|
||||
pz = momnew*cost;
|
||||
}
|
||||
else
|
||||
@@ -531,9 +531,9 @@ G4HEVector::Add( const G4HEVector & p1, const G4HEVector & p2 )
|
||||
energy = p1.energy + p2.energy;
|
||||
G4double b = energy*energy - px*px - py*py - pz*pz;
|
||||
if( b < 0 )
|
||||
mass = -1. * sqrt( -b );
|
||||
mass = -1. * std::sqrt( -b );
|
||||
else
|
||||
mass = sqrt( b );
|
||||
mass = std::sqrt( b );
|
||||
kineticEnergy = Amax(0.,energy - mass);
|
||||
charge = p1.charge + p2.charge;
|
||||
code = 0;
|
||||
@@ -552,9 +552,9 @@ G4HEVector::Sub( const G4HEVector & p1, const G4HEVector & p2 )
|
||||
energy = p1.energy - p2.energy;
|
||||
G4double b = energy*energy - px*px - py*py - pz*pz;
|
||||
if( b < 0 )
|
||||
mass = -1. * sqrt( -b );
|
||||
mass = -1. * std::sqrt( -b );
|
||||
else
|
||||
mass = sqrt( b );
|
||||
mass = std::sqrt( b );
|
||||
kineticEnergy = Amax(0.,energy - mass);
|
||||
charge = p1.charge - p2.charge;
|
||||
code = 0;
|
||||
@@ -572,7 +572,7 @@ G4HEVector::Lor( const G4HEVector & p1, const G4HEVector & p2 )
|
||||
px = p1.px + a*p2.px;
|
||||
py = p1.py + a*p2.py;
|
||||
pz = p1.pz + a*p2.pz;
|
||||
energy = sqrt( sqr(p1.mass) + px*px + py*py + pz*pz);
|
||||
energy = std::sqrt( sqr(p1.mass) + px*px + py*py + pz*pz);
|
||||
mass = p1.mass;
|
||||
kineticEnergy = Amax(0.,energy - mass);
|
||||
timeOfFlight = p1.timeOfFlight;
|
||||
@@ -588,11 +588,11 @@ G4HEVector::Lor( const G4HEVector & p1, const G4HEVector & p2 )
|
||||
G4double
|
||||
G4HEVector::CosAng( const G4HEVector & p )
|
||||
{
|
||||
G4double a = sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
|
||||
G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
|
||||
if( a != 0.0 )
|
||||
{
|
||||
a = (px*p.px + py*p.py + pz*p.pz)/a;
|
||||
if( fabs(a) > 1.0 )
|
||||
if( std::fabs(a) > 1.0 )
|
||||
{
|
||||
if(a<0.0) a=-1.0;
|
||||
else a=1.0;
|
||||
@@ -604,17 +604,17 @@ G4HEVector::CosAng( const G4HEVector & p )
|
||||
G4double
|
||||
G4HEVector::Ang(const G4HEVector & p )
|
||||
{
|
||||
G4double a = sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
|
||||
G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
|
||||
if( a != 0.0 )
|
||||
{
|
||||
a = (px*p.px + py*p.py + pz*p.pz)/a;
|
||||
if( fabs(a) > 1.0 )
|
||||
if( std::fabs(a) > 1.0 )
|
||||
{
|
||||
if(a<0.0) a=-1.0;
|
||||
else a=1.0;
|
||||
}
|
||||
}
|
||||
return acos(a);
|
||||
return std::acos(a);
|
||||
}
|
||||
|
||||
G4double
|
||||
@@ -684,7 +684,7 @@ G4HEVector::SmulAndUpdate( const G4HEVector & p, G4double h)
|
||||
py = h * p.py;
|
||||
pz = h * p.pz;
|
||||
mass = p.mass;
|
||||
energy = sqrt(px*px + py*py + pz*pz + mass*mass);
|
||||
energy = std::sqrt(px*px + py*py + pz*pz + mass*mass);
|
||||
kineticEnergy = energy - mass;
|
||||
charge = p.charge;
|
||||
timeOfFlight = p.timeOfFlight;
|
||||
@@ -702,12 +702,12 @@ void
|
||||
G4HEVector::Norz( const G4HEVector & p )
|
||||
{
|
||||
G4double a = p.px*p.px + p.py*p.py + p.pz*p.pz;
|
||||
if (a > 0.0) a = 1./sqrt(a);
|
||||
if (a > 0.0) a = 1./std::sqrt(a);
|
||||
px = a * p.px;
|
||||
py = a * p.py;
|
||||
pz = a * p.pz;
|
||||
mass = p.mass;
|
||||
energy = sqrt(px*px + py*py + pz*pz + mass*mass);
|
||||
energy = std::sqrt(px*px + py*py + pz*pz + mass*mass);
|
||||
kineticEnergy = energy - mass;
|
||||
charge = p.charge;
|
||||
timeOfFlight = p.timeOfFlight;
|
||||
@@ -724,7 +724,7 @@ G4HEVector::Norz( const G4HEVector & p )
|
||||
G4double
|
||||
G4HEVector::Length()
|
||||
{
|
||||
return sqrt(px*px + py*py + pz*pz);
|
||||
return std::sqrt(px*px + py*py + pz*pz);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -743,17 +743,17 @@ G4HEVector::Defs1( const G4HEVector & p1, const G4HEVector & p2)
|
||||
if (pt2 > 0.0)
|
||||
{
|
||||
G4double ph, qx, qy, qz;
|
||||
G4double a = sqrt(p2.px*p2.px + p2.py*p2.py + p2.pz*p2.pz);
|
||||
G4double a = std::sqrt(p2.px*p2.px + p2.py*p2.py + p2.pz*p2.pz);
|
||||
G4double cost = p2.pz/a;
|
||||
G4double sint = 0.5 * (sqrt(fabs((1.-cost)*(1.+cost))) + sqrt(pt2)/a);
|
||||
if(p2.py < 0.) ph = 1.5*M_PI;
|
||||
else ph = 0.5*M_PI;
|
||||
G4double sint = 0.5 * (std::sqrt(std::fabs((1.-cost)*(1.+cost))) + std::sqrt(pt2)/a);
|
||||
if(p2.py < 0.) ph = 1.5*pi;
|
||||
else ph = halfpi;
|
||||
if( p2.px != 0.0)
|
||||
ph = atan2(p2.py,p2.px);
|
||||
qx = cost*cos(ph)*p1.px - sin(ph)*p1.py
|
||||
+ sint*cos(ph)*p1.pz;
|
||||
qy = cost*sin(ph)*p1.px + cos(ph)*p1.py
|
||||
+ sint*sin(ph)*p1.pz;
|
||||
ph = std::atan2(p2.py,p2.px);
|
||||
qx = cost*std::cos(ph)*p1.px - std::sin(ph)*p1.py
|
||||
+ sint*std::cos(ph)*p1.pz;
|
||||
qy = cost*std::sin(ph)*p1.px + std::cos(ph)*p1.py
|
||||
+ sint*std::sin(ph)*p1.pz;
|
||||
qz = - sint *p1.px
|
||||
+ cost *p1.pz;
|
||||
px = qx;
|
||||
@@ -781,7 +781,7 @@ G4HEVector::Defs( const G4HEVector & p1, const G4HEVector & p2,
|
||||
my.py = mz.pz*px - mz.px*pz;
|
||||
my.pz = mz.px*py - mz.py*px;
|
||||
G4double pp;
|
||||
pp = sqrt(px*px + py*py + pz*pz);
|
||||
pp = std::sqrt(px*px + py*py + pz*pz);
|
||||
if (pp > 0.)
|
||||
{
|
||||
pp = 1./pp;
|
||||
@@ -789,7 +789,7 @@ G4HEVector::Defs( const G4HEVector & p1, const G4HEVector & p2,
|
||||
py = py*pp ;
|
||||
pz = pz*pp ;
|
||||
}
|
||||
pp = sqrt(my.px*my.px + my.py*my.py + my.pz*my.pz);
|
||||
pp = std::sqrt(my.px*my.px + my.py*my.py + my.pz*my.pz);
|
||||
if (pp > 0.)
|
||||
{
|
||||
pp = 1./pp;
|
||||
@@ -797,7 +797,7 @@ G4HEVector::Defs( const G4HEVector & p1, const G4HEVector & p2,
|
||||
my.py = my.py*pp ;
|
||||
my.pz = my.pz*pp ;
|
||||
}
|
||||
pp = sqrt(mz.px*mz.px + mz.py*mz.py + mz.pz*mz.pz);
|
||||
pp = std::sqrt(mz.px*mz.px + mz.py*mz.py + mz.pz*mz.pz);
|
||||
if (pp > 0.)
|
||||
{
|
||||
pp = 1./pp;
|
||||
@@ -1165,7 +1165,7 @@ G4int G4HEVector::FillQuarkContent()
|
||||
theAntiQuarkContent[flavor] =0;
|
||||
}
|
||||
|
||||
G4int temp = abs(tempPDGcode);
|
||||
G4int temp = std::abs(tempPDGcode);
|
||||
G4int multiplet = temp/10000;
|
||||
temp -= G4int(multiplet*10000);
|
||||
G4int quark1 = temp/1000;
|
||||
@@ -1245,7 +1245,7 @@ G4int G4HEVector::FillQuarkContent()
|
||||
totalCharge += 2./3.*eplus*theQuarkContent[flavor+1];
|
||||
totalCharge += (-2./3.)*eplus*theAntiQuarkContent[flavor+1];
|
||||
}
|
||||
if (abs(totalCharge-charge)>0.1*eplus) {
|
||||
if (std::abs(totalCharge-charge)>0.1*eplus) {
|
||||
tempPDGcode = 0;
|
||||
}
|
||||
} else if (particleType == "baryon"){
|
||||
@@ -1254,10 +1254,10 @@ G4int G4HEVector::FillQuarkContent()
|
||||
tempPDGcode = 0;
|
||||
}
|
||||
//exceptions
|
||||
if (abs(tempPDGcode) == 3122) {
|
||||
if (std::abs(tempPDGcode) == 3122) {
|
||||
// Lambda
|
||||
quark2=2; quark3 = 1; spin = 1;
|
||||
} else if (abs(tempPDGcode) == 4122) {
|
||||
} else if (std::abs(tempPDGcode) == 4122) {
|
||||
// Lambda_c
|
||||
quark2=2; quark3 = 1; spin = 1;
|
||||
}
|
||||
@@ -1285,7 +1285,7 @@ G4int G4HEVector::FillQuarkContent()
|
||||
totalCharge += 2./3.*eplus*theQuarkContent[flavor+1];
|
||||
totalCharge += (-2./3.)*eplus*theAntiQuarkContent[flavor+1];
|
||||
}
|
||||
if (abs(totalCharge-charge)>0.1*eplus) {
|
||||
if (std::abs(totalCharge-charge)>0.1*eplus) {
|
||||
tempPDGcode = 0;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEXiMinusInelastic.cc,v 1.10 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEXiMinusInelastic.cc,v 1.12 2004/12/10 22:04:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == neutronCode)
|
||||
@@ -377,7 +377,7 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -387,9 +387,9 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -411,9 +411,9 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -442,9 +442,9 @@ G4HEXiMinusInelastic::FirstIntInCasXiMinus( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HEXiZeroInelastic.cc,v 1.10 2003/07/01 15:42:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4HEXiZeroInelastic.cc,v 1.12 2004/12/10 22:04:35 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -96,7 +96,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
|
||||
incidentKineticEnergy -= excitation;
|
||||
incidentTotalEnergy = incidentKineticEnergy + incidentMass;
|
||||
incidentTotalMomentum = sqrt( (incidentTotalEnergy-incidentMass)
|
||||
incidentTotalMomentum = std::sqrt( (incidentTotalEnergy-incidentMass)
|
||||
*(incidentTotalEnergy+incidentMass));
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ ApplyYourself( const G4HadProjectile &aTrack, G4Nucleus &targetNucleus )
|
||||
}
|
||||
|
||||
G4double targetMass = targetParticle.getMass();
|
||||
G4double centerOfMassEnergy = sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
G4double centerOfMassEnergy = std::sqrt( incidentMass*incidentMass + targetMass*targetMass
|
||||
+ 2.0*targetMass*incidentTotalEnergy);
|
||||
G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
|
||||
|
||||
@@ -206,7 +206,7 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
// multiplicity per inelastic reaction.
|
||||
|
||||
{
|
||||
static const G4double expxu = log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxu = std::log(MAXFLOAT); // upper bound for arg. of exp
|
||||
static const G4double expxl = -expxu; // lower bound for arg. of exp
|
||||
|
||||
static const G4double protb = 0.7;
|
||||
@@ -296,7 +296,7 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
{ // quasi-elastic scattering, no pions produced
|
||||
G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
|
||||
G4int iplab = G4int( std::min( 9.0, incidentTotalMomentum*2.5 ) );
|
||||
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
|
||||
if( G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
|
||||
{
|
||||
G4double ran = G4UniformRand();
|
||||
if( targetCode == protonCode)
|
||||
@@ -387,7 +387,7 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
|
||||
// number of total particles vs. centre of mass Energy - 2*proton mass
|
||||
|
||||
G4double aleab = log(availableEnergy);
|
||||
G4double aleab = std::log(availableEnergy);
|
||||
G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
|
||||
+ aleab*(0.117712+0.0136912*aleab))) - 2.0;
|
||||
|
||||
@@ -397,9 +397,9 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
|
||||
for( nt=1; nt<=numSec; nt++ )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = M_PI*nt/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = pi*nt/(2.0*n*n);
|
||||
if( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )anpn += dum*test;
|
||||
else
|
||||
anpn += dum*test;
|
||||
@@ -421,9 +421,9 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>0) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
@@ -452,9 +452,9 @@ G4HEXiZeroInelastic::FirstIntInCasXiZero( G4bool &inElastic,
|
||||
nt = np+nm+nz;
|
||||
if( (nt>=1) && (nt<=numSec) )
|
||||
{
|
||||
test = exp( std::min( expxu, std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
|
||||
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
|
||||
if( fabs(dum) < 1.0 )
|
||||
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( std::fabs(dum) < 1.0 )
|
||||
if( test >= 1.0e-10 )excs += dum*test;
|
||||
else
|
||||
excs += dum*test;
|
||||
|
||||
Reference in New Issue
Block a user