Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LCapture.cc,v 1.2.4.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LCapture.cc,v 1.2.4.1.2.1 1999/12/08 17:34:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// G4 Model: Low-energy Neutron Capture
@@ -61,22 +61,22 @@ G4LCapture::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
G4double Q = aParticle->GetDefinition()->GetPDGCharge();
G4double pv6 = aParticle->GetDefinition()->GetPDGCharge();
if (verboseLevel > 1) {
G4cout << "G4LCapture:ApplyYourself: incident particle:" << endl;
G4cout << "P " << P << " GeV/c" << endl;
G4cout << "Px " << Px << " GeV/c" << endl;
G4cout << "Py " << Py << " GeV/c" << endl;
G4cout << "Pz " << Pz << " GeV/c" << endl;
G4cout << "E " << E << " GeV" << endl;
G4cout << "mass " << E0 << " GeV" << endl;
G4cout << "charge " << Q << endl;
G4cout << "G4LCapture:ApplyYourself: incident particle:" << G4endl;
G4cout << "P " << P << " GeV/c" << G4endl;
G4cout << "Px " << Px << " GeV/c" << G4endl;
G4cout << "Py " << Py << " GeV/c" << G4endl;
G4cout << "Pz " << Pz << " GeV/c" << G4endl;
G4cout << "E " << E << " GeV" << G4endl;
G4cout << "mass " << E0 << " GeV" << G4endl;
G4cout << "charge " << Q << G4endl;
}
// GHEISHA ADD operation to get total energy, mass, charge:
if (verboseLevel > 1) {
G4cout << "G4LCapture:ApplyYourself: material:" << endl;
G4cout << "A " << N << endl;
G4cout << "Z " << Z << endl;
G4cout << "G4LCapture:ApplyYourself: material:" << G4endl;
G4cout << "A " << N << G4endl;
G4cout << "Z " << Z << G4endl;
G4cout << "atomic mass " <<
Atomas(N, Z) << "GeV" << endl;
Atomas(N, Z) << "GeV" << G4endl;
}
E = E + Atomas(N, Z);
G4double E02 = E*E - P*P;
@@ -84,10 +84,10 @@ G4LCapture::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
if (E02 < 0) E0 = -E0;
Q = Q + Z;
if (verboseLevel > 1) {
G4cout << "G4LCapture:ApplyYourself: total:" << endl;
G4cout << "E " << E << " GeV" << endl;
G4cout << "mass " << E0 << " GeV" << endl;
G4cout << "charge " << Q << endl;
G4cout << "G4LCapture:ApplyYourself: total:" << G4endl;
G4cout << "E " << E << " GeV" << G4endl;
G4cout << "mass " << E0 << " GeV" << G4endl;
G4cout << "charge " << Q << G4endl;
}
Px = -Px;
Py = -Py;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAlphaInelastic.cc,v 1.1.10.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAlphaInelastic.cc,v 1.1.10.1.2.1 1999/12/08 17:34:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Alpha Inelastic Process
// J.L. Chuma, TRIUMF, 25-Feb-1997
@@ -29,9 +29,9 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAlphaInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAlphaInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetc energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << endl;
G4cout << "target material = " << targetMaterial->GetName() << G4endl;
}
// Work-around for lack of model above 100 MeV
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiLambdaInelastic.cc,v 1.1.10.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiLambdaInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiLambda Inelastic Process
// J.L. Chuma, TRIUMF, 19-Feb-1997
@@ -31,11 +31,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiLambdaInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiLambdaInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -85,7 +85,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (originalIncident->GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
originalIncident, currentParticle, targetParticle,
@@ -156,7 +156,7 @@
G4int counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -177,7 +177,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+2); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -283,7 +283,7 @@
G4int counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -292,7 +292,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -311,7 +311,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 4, max( 1, np-nm+2 ) );
G4int ncht = G4std::min( 4, G4std::max( 1, np-nm+2 ) );
switch( ncht )
{
case 1:
@@ -388,7 +388,7 @@
G4int counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -397,7 +397,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -416,7 +416,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 4, max( 1, np-nm+3 ) );
G4int ncht = G4std::min( 4, G4std::max( 1, np-nm+3 ) );
switch( ncht )
{
case 1:
@@ -516,7 +516,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -542,7 +542,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiNeutronInelastic.cc,v 1.1.10.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiNeutronInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiNeutron Inelastic Process
// J.L. Chuma, TRIUMF, 18-Feb-1997
@@ -33,11 +33,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiNeutronInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiNeutronInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -87,7 +87,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1*MeV;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) ||
(G4UniformRand() > anni) )
@@ -162,7 +162,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -183,7 +183,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -289,7 +289,7 @@
np = nm = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( min( expxu, max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
if( G4UniformRand() < w0/(w0+wp) )
@@ -299,10 +299,10 @@
}
else // target is a neutron
{
test = exp( min( expxu, max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( min( expxu, max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -326,7 +326,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=np && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=np && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -335,7 +335,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -360,7 +360,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -369,7 +369,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -467,7 +467,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -493,7 +493,7 @@
nt = np+nm+nz;
if( (nt>1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiOmegaMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiOmegaMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:11 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiOmegaMinus Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -39,7 +39,7 @@
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -88,7 +88,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
@@ -161,7 +161,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -222,7 +222,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -231,7 +231,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -291,7 +291,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiProtonInelastic.cc,v 1.1.10.1 1999/12/07 20:52:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiProtonInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiProton Inelastic Process
// J.L. Chuma, TRIUMF, 13-Feb-1997
@@ -33,11 +33,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiProtonInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiProtonInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -86,7 +86,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*originalIncident->GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*originalIncident->GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) ||
(G4UniformRand() > anni) )
@@ -161,7 +161,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -290,10 +290,10 @@
np = nm = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( min( expxu, max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( min( expxu, max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -307,9 +307,9 @@
}
else // target is a neutron
{
test = exp( min( expxu, max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
test = exp( min( expxu, max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
wm = test;
G4double ran = G4UniformRand();
if( ran < w0/(w0+wm) )
@@ -329,7 +329,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -338,7 +338,7 @@
nt = np+nm+nz;
if( (nt>0) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -371,7 +371,7 @@
nt = np+nm+nz;
if( (nt>0) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -469,7 +469,7 @@
nt = np+nm+nz;
if( (nt>1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
if( abs(dum) < 1.0 )
{
@@ -495,7 +495,7 @@
nt = np+nm+nz;
if( (nt>1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiSigmaMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiSigmaMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiSigmaMinus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Feb-1997
@@ -33,11 +33,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiSigmaMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiSigmaMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -86,7 +86,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
originalIncident, currentParticle, targetParticle,
@@ -157,7 +157,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -178,7 +178,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -280,7 +280,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=np && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=np && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -289,7 +289,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -308,7 +308,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 3, max( 1, np-nm+1 ) );
G4int ncht = G4std::min( 3, G4std::max( 1, np-nm+1 ) );
switch( ncht )
{
case 1:
@@ -344,7 +344,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -353,7 +353,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -372,7 +372,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 3, max( 1, np-nm+2 ) );
G4int ncht = G4std::min( 3, G4std::max( 1, np-nm+2 ) );
switch( ncht )
{
case 1:
@@ -437,7 +437,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -469,7 +469,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiSigmaPlusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiSigmaPlusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiSigmaPlus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Feb-1997
@@ -32,11 +32,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiSigmaPlusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiSigmaPlusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -85,7 +85,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
originalIncident, currentParticle, targetParticle,
@@ -156,7 +156,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -280,7 +280,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -289,7 +289,7 @@
nt = np+nm+nz;
if( (nt>0) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -308,7 +308,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 3, max( 1, np-nm+2 ) );
G4int ncht = G4std::min( 3, G4std::max( 1, np-nm+2 ) );
switch( ncht )
{
case 1:
@@ -350,7 +350,7 @@
nt = np+nm+nz;
if( (nt>0) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -369,7 +369,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = min( 3, max( 1, np-nm+3 ) );
G4int ncht = G4std::min( 3, G4std::max( 1, np-nm+3 ) );
switch( ncht )
{
case 1:
@@ -438,7 +438,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -470,7 +470,7 @@
nt = np+nm+nz;
if( nt>1 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiXiMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiXiMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiXiMinus Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -36,11 +36,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiXiMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiXiMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -89,7 +89,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
originalIncident, currentParticle, targetParticle,
@@ -161,7 +161,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -224,7 +224,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -233,7 +233,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -310,7 +310,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEAntiXiZeroInelastic.cc,v 1.1.10.1 1999/12/07 20:52:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEAntiXiZeroInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: AntiXiZero Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -35,11 +35,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEAntiXiZeroInelastic::ApplyYourself called" << endl;
G4cout << "G4LEAntiXiZeroInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -88,7 +88,7 @@
vec.Initialize( 0 );
const G4double cutOff = 0.1;
const G4double anni = min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
const G4double anni = G4std::min( 1.3*currentParticle.GetTotalMomentum()/GeV, 0.4 );
if( (currentParticle.GetKineticEnergy()/MeV > cutOff) || (G4UniformRand() > anni) )
Cascade( vec, vecLen,
originalIncident, currentParticle, targetParticle,
@@ -160,7 +160,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -181,7 +181,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+2); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -223,7 +223,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -232,7 +232,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -300,7 +300,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -309,7 +309,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEDeuteronInelastic.cc,v 1.1.10.1 1999/12/07 20:52:22 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEDeuteronInelastic.cc,v 1.1.10.1.2.1 1999/12/08 17:34:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Deuteron Inelastic Process
// J.L. Chuma, TRIUMF, 25-Feb-1997
@@ -27,7 +27,7 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEDeuteronInelastic::ApplyYourself called" << endl;
G4cout << "G4LEDeuteronInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEKaonMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEKaonMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy KaonMinus Inelastic Process
// J.L. Chuma, TRIUMF, 12-Feb-1997
@@ -35,11 +35,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEKaonMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEKaonMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy() << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
G4ReactionProduct currentParticle( originalIncident->GetDefinition() );
currentParticle.SetMomentum( originalIncident->GetMomentum() );
@@ -155,7 +155,7 @@
G4int counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -214,11 +214,11 @@
G4ParticleDefinition *aSigmaMinus = G4SigmaMinus::SigmaMinus();
G4ParticleDefinition *aSigmaZero = G4SigmaZero::SigmaZero();
const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
G4int iplab = min( 9.0, pOriginal/GeV*5.0 );
G4int iplab = G4std::min( 9.0, pOriginal/GeV*5.0 );
if( (pOriginal <= 2.0*GeV) && (G4UniformRand() < cech[iplab]) )
{
np = nm = nz = nt = 0;
iplab = min( 19.0, pOriginal/GeV*10.0 );
iplab = G4std::min( 19.0, pOriginal/GeV*10.0 );
const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
if( G4UniformRand() <= cnk0[iplab] )
@@ -293,7 +293,7 @@
G4int counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -302,7 +302,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -356,7 +356,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEKaonPlusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEKaonPlusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy KaonPlus Inelastic Process
// J.L. Chuma, TRIUMF, 05-Feb-1997
@@ -34,11 +34,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEKaonPlusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEKaonPlusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy() << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
G4ReactionProduct currentParticle( originalIncident->GetDefinition() );
currentParticle.SetMomentum( originalIncident->GetMomentum() );
@@ -158,7 +158,7 @@
G4int counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -179,7 +179,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -219,7 +219,7 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( min( expxu, max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = test*2.0;
if( G4UniformRand() < w0/(w0+wp) )
@@ -229,10 +229,10 @@
}
else // target is a neutron
{
test = exp( min( expxu, max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( min( expxu, max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -256,7 +256,7 @@
G4int counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np )
{
for( nm=max(0,np-2); (nm<=np) && (ran>=excs); ++nm )
for( nm=G4std::max(0,np-2); (nm<=np) && (ran>=excs); ++nm )
{
for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
{
@@ -265,7 +265,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -286,7 +286,7 @@
G4int counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np )
{
for( nm=max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm )
for( nm=G4std::max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm )
{
for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
{
@@ -295,7 +295,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEKaonZeroLInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEKaonZeroLInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:12 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy KaonZeroLong Inelastic Process
// J.L. Chuma, TRIUMF, 11-Feb-1997
@@ -31,11 +31,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEKaonZeroLInelastic::ApplyYourself called" << endl;
G4cout << "G4LEKaonZeroLInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -150,7 +150,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -171,7 +171,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -210,11 +210,11 @@
G4ParticleDefinition *aSigmaMinus = G4SigmaMinus::SigmaMinus();
G4ParticleDefinition *aSigmaZero = G4SigmaZero::SigmaZero();
const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
G4int iplab = min( 9.0, 5.0*pOriginal*MeV/GeV );
G4int iplab = G4std::min( 9.0, 5.0*pOriginal*MeV/GeV );
if( (pOriginal*MeV/GeV <= 2.0) && (G4UniformRand() < cech[iplab]) )
{
np = nm = nz = nt = 0;
iplab = min( 19.0, pOriginal*MeV/GeV*10.0 );
iplab = G4std::min( 19.0, pOriginal*MeV/GeV*10.0 );
const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
if( G4UniformRand() > cnk0[iplab] )
@@ -289,7 +289,7 @@
counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np )
{
for( nm=max(0,np-2); nm<=np && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=np && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -298,7 +298,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -345,7 +345,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -354,7 +354,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEKaonZeroSInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEKaonZeroSInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy KaonZeroShort Inelastic Process
// J.L. Chuma, TRIUMF, 11-Feb-1997
@@ -31,11 +31,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEKaonZeroSInelastic::ApplyYourself called" << endl;
G4cout << "G4LEKaonZeroSInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -153,7 +153,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -174,7 +174,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -216,9 +216,9 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aNeutron )
{
test = exp( min( expxu, max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test/2.0;
test = exp( min( expxu, max( expxl, -(-1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
wm = test*1.5;
if( G4UniformRand() < w0/(w0+wm) )
nz = 1;
@@ -227,10 +227,10 @@
}
else // target is a proton
{
test = exp( min( expxu, max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( min( expxu, max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -254,7 +254,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -263,7 +263,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -288,7 +288,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=np && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=np && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -297,7 +297,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LELambdaInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LELambdaInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Lambda Inelastic Process
// J.L. Chuma, TRIUMF, 18-Feb-1997
@@ -31,11 +31,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LELambdaInelastic::ApplyYourself called" << endl;
G4cout << "G4LELambdaInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -153,7 +153,7 @@
for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
counter = -1;
for( np=0; np<(numSec/3); ++np ) {
for( nm=max(0,np-2); nm<=(np+1); ++nm ) {
for( nm=G4std::max(0,np-2); nm<=(np+1); ++nm ) {
for( nz=0; nz<numSec/3; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
@@ -169,7 +169,7 @@
for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
counter = -1;
for( np=0; np<numSec/3; ++np ) {
for( nm=max(0,np-1); nm<=(np+2); ++nm ) {
for( nm=G4std::max(0,np-1); nm<=(np+2); ++nm ) {
for( nz=0; nz<numSec/3; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
@@ -205,12 +205,12 @@
if( targetParticle.GetDefinition() == aProton ) {
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np ) {
for( nm=max(0,np-2); nm<=(np+1) && ran>=excs; ++nm ) {
for( nm=G4std::max(0,np-2); nm<=(np+1) && ran>=excs; ++nm ) {
for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
if( nt>0 && nt<=numSec ) {
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -228,7 +228,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = max( 1, np-nm );
G4int ncht = G4std::max( 1, np-nm );
switch( ncht ) {
case 1:
currentParticle.SetDefinitionAndUpdateE( aSigmaPlus );
@@ -272,12 +272,12 @@
{
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np ) {
for( nm=max(0,np-1); nm<=(np+2) && ran>=excs; ++nm ) {
for( nm=G4std::max(0,np-1); nm<=(np+2) && ran>=excs; ++nm ) {
for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
if( nt>0 && nt<=numSec ) {
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -295,7 +295,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = max( 1, np-nm+3 );
G4int ncht = G4std::max( 1, np-nm+3 );
switch( ncht ) {
case 1:
currentParticle.SetDefinitionAndUpdateE( aSigmaPlus );
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LENeutronInelastic.cc,v 1.2.8.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LENeutronInelastic.cc,v 1.2.8.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy Neutron Inelastic Process
// J.L. Chuma, TRIUMF, 04-Feb-1997
@@ -31,11 +31,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LENeutronInelastic::ApplyYourself called" << endl;
G4cout << "G4LENeutronInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
if( originalIncident->GetKineticEnergy()/MeV < 0.000001 )
G4Exception("G4LENeutronInelastic: should be capture process!");
@@ -155,7 +155,7 @@
cost1 = -1.0 + 2.0*G4UniformRand();
eka = 1.0 + 2.0*cost1*A + A*A;
}
G4double cost = min( 1.0, max( -1.0, (A*cost1+1.0)/sqrt(eka) ) );
G4double cost = G4std::min( 1.0, G4std::max( -1.0, (A*cost1+1.0)/sqrt(eka) ) );
eka /= (1.0+A)*(1.0+A);
G4double ek = currentKinetic*MeV/GeV;
G4double amas = currentMass*MeV/GeV;
@@ -292,7 +292,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -355,7 +355,7 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aNeutron )
{
test = exp( min( expxu, max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test/2.0;
wm = test;
if( G4UniformRand() < w0/(w0+wm) )
@@ -363,10 +363,10 @@
else
nm = 1;
} else { // target is a proton
test = exp( min( expxu, max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = test/2.0;
test = exp( min( expxu, max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
wm = test/2.0;
wt = w0+wp+wm;
wp += w0;
@@ -388,7 +388,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -397,7 +397,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -428,7 +428,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEOmegaMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:23 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEOmegaMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: OmegaMinus Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -34,11 +34,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEOmegaMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEOmegaMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy() << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
G4ReactionProduct currentParticle( originalIncident->GetDefinition() );
currentParticle.SetMomentum( originalIncident->GetMomentum() );
@@ -159,7 +159,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -223,7 +223,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -232,7 +232,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -266,7 +266,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEPionMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEPionMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: PionMinus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Nov-1996
@@ -34,11 +34,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4PionMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4PionMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy() << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
G4ReactionProduct currentParticle( originalIncident->GetDefinition() );
currentParticle.SetMomentum( originalIncident->GetMomentum() );
@@ -159,7 +159,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -219,7 +219,7 @@
// charge exchange reaction is included in inelastic cross section
const G4double cech[] = {1.,0.95,0.79,0.32,0.19,0.16,0.14,0.12,0.10,0.08};
G4int iplab = min( 9.0, pOriginal/GeV*5.0 );
G4int iplab = G4std::min( 9.0, pOriginal/GeV*5.0 );
if( G4UniformRand() <= cech[iplab] )
{
if( targetParticle.GetDefinition() == aProton )
@@ -235,10 +235,10 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( min( expxu, max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = 10.0*test;
test = exp( min( expxu, max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[0])*(-1.0+b[0])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp += w0;
@@ -252,9 +252,9 @@
}
else // target is a neutron
{
test = exp( min( expxu, max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
test = exp( min( expxu, max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
G4double ran = G4UniformRand();
if( ran < w0/(w0+wm) )
@@ -274,7 +274,7 @@
counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np )
{
for( nm=max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm )
for( nm=G4std::max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm )
{
for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
{
@@ -283,7 +283,7 @@
nt = np+nm+nz;
if( nt > 0 )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -317,7 +317,7 @@
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEPionPlusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEPionPlusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:13 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: PionPlus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Nov-1996
@@ -34,11 +34,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEPionPlusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEPionPlusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy() << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
G4ReactionProduct currentParticle( originalIncident->GetDefinition() );
currentParticle.SetMomentum( originalIncident->GetMomentum() );
@@ -156,7 +156,7 @@
for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
counter = -1;
for( np=0; np<(numSec/3); ++np ) {
for( nm=max(0,np-2); nm<=np; ++nm ) {
for( nm=G4std::max(0,np-2); nm<=np; ++nm ) {
for( nz=0; nz<numSec/3; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
@@ -172,7 +172,7 @@
for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
counter = -1;
for( np=0; np<numSec/3; ++np ) {
for( nm=max(0,np-1); nm<=(np+1); ++nm ) {
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm ) {
for( nz=0; nz<numSec/3; ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
@@ -205,7 +205,7 @@
nm = np = nz = 0;
if( targetParticle.GetDefinition() == aProton ) {
test = exp( min( expxu, max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
if( G4UniformRand() < w0/(w0+wp) )
@@ -213,10 +213,10 @@
else
np = 1;
} else { // target is a neutron
test = exp( min( expxu, max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test;
test = exp( min( expxu, max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -sqr(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test;
wt = w0+wp+wm;
wp = w0+wp;
@@ -236,12 +236,12 @@
if( targetParticle.GetDefinition() == aProton ) {
counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np ) {
for( nm=max(0,np-2); (nm<=np) && (ran>=excs); ++nm ) {
for( nm=G4std::max(0,np-2); (nm<=np) && (ran>=excs); ++nm ) {
for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
if( nt > 0 ) {
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -262,12 +262,12 @@
} else { // target must be a neutron
counter = -1;
for( np=0; (np<numSec/3) && (ran>=excs); ++np ) {
for( nm=max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm ) {
for( nm=G4std::max(0,np-1); (nm<=(np+1)) && (ran>=excs); ++nm ) {
for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
if( ++counter < numMul ) {
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) ) {
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 ) {
if( test >= 1.0e-10 )excs += dum*test;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEProtonInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEProtonInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Low Energy Proton Inelastic Process
// J.L. Chuma, TRIUMF, 19-Nov-1996
@@ -29,11 +29,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEProtonInelastic::ApplyYourself called" << endl;
G4cout << "G4LEProtonInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
if( originalIncident->GetKineticEnergy()/GeV < 0.01+2.*G4UniformRand()/9. )
{
@@ -209,7 +209,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=np; ++nm )
for( nm=G4std::max(0,np-2); nm<=np; ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -232,7 +232,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -272,7 +272,7 @@
np = nm = nz = 0;
if( targetParticle.GetDefinition() == aProton )
{
test = exp( min( expxu, max(
test = exp( G4std::min( expxu, G4std::max(
expxl, -(1.0+b[0])*(1.0+b[0])/(2.0*c*c) ) ) );
w0 = test/2.0;
wp = test;
@@ -283,11 +283,11 @@
}
else // target is a neutron
{
test = exp( min( expxu, max(
test = exp( G4std::min( expxu, G4std::max(
expxl, -(1.0+b[1])*(1.0+b[1])/(2.0*c*c) ) ) );
w0 = test;
wp = test/2.0;
test = exp( min( expxu, max(
test = exp( G4std::min( expxu, G4std::max(
expxl, -(-1.0+b[1])*(-1.0+b[1])/(2.0*c*c) ) ) );
wm = test/2.0;
wt = w0+wp+wm;
@@ -312,7 +312,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=np && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=np && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -321,7 +321,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -345,7 +345,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -354,7 +354,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LESigmaMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LESigmaMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: SigmaMinus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Feb-1997
@@ -32,11 +32,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LESigmaMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LESigmaMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -155,7 +155,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -217,7 +217,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -226,7 +226,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -245,7 +245,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = max( 1, np-nm+2 );
G4int ncht = G4std::max( 1, np-nm+2 );
switch( ncht )
{
case 1:
@@ -287,7 +287,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -306,7 +306,7 @@
return;
}
np--; nm--; nz--;
G4int ncht = max( 1, np-nm+3 );
G4int ncht = G4std::max( 1, np-nm+3 );
switch( ncht )
{
case 1:
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LESigmaPlusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LESigmaPlusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: SigmaPlus Inelastic Process
// J.L. Chuma, TRIUMF, 19-Feb-1997
@@ -32,11 +32,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LESigmaPlusInelastic::ApplyYourself called" << endl;
G4cout << "G4LESigmaPlusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -176,7 +176,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -226,7 +226,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -245,7 +245,7 @@
return;
}
np--; nm--; nz--;
switch( min( 3, max( 1, np-nm+3 ) ) )
switch( G4std::min( 3, G4std::max( 1, np-nm+3 ) ) )
{
case 1:
if( G4UniformRand() < 0.5 )
@@ -280,7 +280,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -289,7 +289,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -308,7 +308,7 @@
return;
}
np--; nm--; nz--;
switch( min( 3, max( 1, np-nm+2 ) ) )
switch( G4std::min( 3, G4std::max( 1, np-nm+2 ) ) )
{
case 1:
targetParticle.SetDefinitionAndUpdateE( aProton );
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LETritonInelastic.cc,v 1.1.10.1 1999/12/07 20:52:24 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LETritonInelastic.cc,v 1.1.10.1.2.1 1999/12/08 17:34:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: Triton Inelastic Process
// J.L. Chuma, TRIUMF, 25-Feb-1997
@@ -28,7 +28,7 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LETritonInelastic::ApplyYourself called" << endl;
G4cout << "G4LETritonInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
}
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEXiMinusInelastic.cc,v 1.1.10.1 1999/12/07 20:52:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEXiMinusInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: XiMinus Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -32,11 +32,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEXiMinusInelastic::ApplyYourself called" << endl;
G4cout << "G4LEXiMinusInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -155,7 +155,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-1); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -218,7 +218,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -227,7 +227,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -304,7 +304,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LEXiZeroInelastic.cc,v 1.1.10.1 1999/12/07 20:52:25 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LEXiZeroInelastic.cc,v 1.1.10.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Hadronic Process: XiZero Inelastic Process
// J.L. Chuma, TRIUMF, 20-Feb-1997
@@ -32,11 +32,11 @@
if( verboseLevel > 1 )
{
G4Material *targetMaterial = aTrack.GetMaterial();
G4cout << "G4LEXiZeroInelastic::ApplyYourself called" << endl;
G4cout << "G4LEXiZeroInelastic::ApplyYourself called" << G4endl;
G4cout << "kinetic energy = " << originalIncident->GetKineticEnergy()/MeV << "MeV, ";
G4cout << "target material = " << targetMaterial->GetName() << ", ";
G4cout << "target particle = " << originalTarget->GetDefinition()->GetParticleName()
<< endl;
<< G4endl;
}
//
// Fermi motion and evaporation
@@ -155,7 +155,7 @@
counter = -1;
for( np=0; np<(numSec/3); ++np )
{
for( nm=max(0,np-2); nm<=(np+1); ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -176,7 +176,7 @@
counter = -1;
for( np=0; np<numSec/3; ++np )
{
for( nm=max(0,np-1); nm<=(np+2); ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2); ++nm )
{
for( nz=0; nz<numSec/3; ++nz )
{
@@ -218,7 +218,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-2); nm<=(np+1) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -227,7 +227,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -295,7 +295,7 @@
counter = -1;
for( np=0; np<numSec/3 && ran>=excs; ++np )
{
for( nm=max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
for( nm=G4std::max(0,np-1); nm<=(np+2) && ran>=excs; ++nm )
{
for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
{
@@ -304,7 +304,7 @@
nt = np+nm+nz;
if( nt>0 && nt<=numSec )
{
test = exp( min( expxu, max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( G4std::min( expxu, G4std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
{
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LElastic.cc,v 1.2.4.1 1999/12/07 20:52:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LElastic.cc,v 1.2.4.1.2.2 1999/12/10 15:42:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
// Physics model class G4LElastic
//
@@ -96,7 +96,7 @@ G4LElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
G4double p = aParticle->GetTotalMomentum()/GeV;
if (verboseLevel > 1)
G4cout << "G4LElastic::DoIt: Incident particle p=" << p << " GeV" << endl;
G4cout << "G4LElastic::DoIt: Incident particle p=" << p << " GeV" << G4endl;
if (p < 0.01) return &theParticleChange;
@@ -122,17 +122,17 @@ G4LElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
cc = cc/dd;
rr = (aa + cc)*ran;
if (verboseLevel > 1) {
G4cout << "DoIt: aa,bb,cc,dd,rr" << endl;
G4cout << aa << " " << bb << " " << cc << " " << dd << " " << rr << endl;
G4cout << "DoIt: aa,bb,cc,dd,rr" << G4endl;
G4cout << aa << " " << bb << " " << cc << " " << dd << " " << rr << G4endl;
}
G4double t1 = -log(ran)/bb;
G4double t2 = -log(ran)/dd;
if (verboseLevel > 1) {
G4cout << "log(FLT_MAX)=" << log(FLT_MAX) << endl;
G4cout << "log(FLT_MAX)=" << log(FLT_MAX) << G4endl;
G4cout << "t1,Fctcos " << t1 << " " << Fctcos(t1, aa, bb, cc, dd, rr) <<
endl;
G4endl;
G4cout << "t2,Fctcos " << t2 << " " << Fctcos(t2, aa, bb, cc, dd, rr) <<
endl;
G4endl;
}
G4double eps = 0.001;
G4int ind1 = 10;
@@ -141,25 +141,25 @@ G4LElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
ier1 = Rtmi(&t, t1, t2, eps, ind1,
aa, bb, cc, dd, rr);
if (verboseLevel > 1) {
G4cout << "From Rtmi, ier1=" << ier1 << endl;
G4cout << "From Rtmi, ier1=" << ier1 << G4endl;
G4cout << "t, Fctcos " << t << " " << Fctcos(t, aa, bb, cc, dd, rr) <<
endl;
G4endl;
}
if (ier1 != 0) t = 0.25*(3.*t1 + t2);
if (verboseLevel > 1) {
G4cout << "t, Fctcos " << t << " " << Fctcos(t, aa, bb, cc, dd, rr) <<
endl;
G4endl;
}
G4double phi = G4UniformRand()*twopi;
rr = 0.5*t/(p*p);
if (rr > 1.) rr = 0.;
if (verboseLevel > 1)
G4cout << "rr=" << rr << endl;
G4cout << "rr=" << rr << G4endl;
G4double cost = 1. - rr;
G4double sint = sqrt(max(rr*(2. - rr), 0.));
G4double sint = sqrt(G4std::max(rr*(2. - rr), 0.));
if (sint == 0.) return &theParticleChange;
if (verboseLevel > 1)
G4cout << "cos(t)=" << cost << " sin(t)=" << sint << endl;
G4cout << "cos(t)=" << cost << " sin(t)=" << sint << G4endl;
// Scattered particle referred to axis of incident particle
G4double px = p*sint*sin(phi);
G4double py = p*sint*cos(phi);
@@ -169,8 +169,8 @@ G4LElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
G4double pyinc = p*(aParticle->GetMomentumDirection().y());
G4double pzinc = p*(aParticle->GetMomentumDirection().z());
if (verboseLevel > 1) {
G4cout << "NOM SCAT " << px << " " << py << " " << pz << endl;
G4cout << "INCIDENT " << pxinc << " " << pyinc << " " << pzinc << endl;
G4cout << "NOM SCAT " << px << " " << py << " " << pz << G4endl;
G4cout << "INCIDENT " << pxinc << " " << pyinc << " " << pzinc << G4endl;
}
// Transform scattered particle to reflect direction of incident particle
@@ -181,8 +181,8 @@ G4LElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& targetNucleus)
pynew = pynew/p;
pznew = pznew/p;
if (verboseLevel > 1) {
G4cout << "DoIt: returning new momentum vector" << endl;
G4cout << pxnew << " " << pynew << " " << pznew << endl;
G4cout << "DoIt: returning new momentum vector" << G4endl;
G4cout << pxnew << " " << pynew << " " << pznew << G4endl;
}
if (aSecondary)
@@ -348,8 +348,8 @@ G4LElastic::Defs1(G4double p, G4double px, G4double py, G4double pz,
G4double cosp = cos(ph);
G4double sinp = sin(ph);
if (verboseLevel > 1) {
G4cout << "cost sint " << cost << " " << sint << endl;
G4cout << "cosp sinp " << cosp << " " << sinp << endl;
G4cout << "cost sint " << cost << " " << sint << G4endl;
G4cout << "cosp sinp " << cosp << " " << sinp << G4endl;
}
*pxnew = cost*cosp*px - sinp*py + sint*cosp*pz;
*pynew = cost*sinp*px + cosp*py + sint*sinp*pz;
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4LFission.cc,v 1.2.4.1 1999/12/07 20:52:26 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4LFission.cc,v 1.2.4.1.2.1 1999/12/08 17:34:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
//
// G4 Model: Low Energy Fission
@@ -59,7 +59,7 @@ G4LFission::init()
for (i = 1; i <= 10; i++) {
spneut[i-1] = spneut[i-1]/spneut[9];
if (verboseLevel > 1) G4cout << "G4LFission::init: i=" << i <<
" spneut=" << spneut[i-1] << endl;
" spneut=" << spneut[i-1] << G4endl;
}
}
@@ -85,22 +85,22 @@ G4LFission::ApplyYourself(const G4Track & aTrack,G4Nucleus & targetNucleus)
G4double E0 = aParticle->GetDefinition()->GetPDGMass()/MeV;
G4double Q = aParticle->GetDefinition()->GetPDGCharge();
if (verboseLevel > 1) {
G4cout << "G4LFission:ApplyYourself: incident particle:" << endl;
G4cout << "P " << P << " MeV/c" << endl;
G4cout << "Px " << Px << " MeV/c" << endl;
G4cout << "Py " << Py << " MeV/c" << endl;
G4cout << "Pz " << Pz << " MeV/c" << endl;
G4cout << "E " << E << " MeV" << endl;
G4cout << "mass " << E0 << " MeV" << endl;
G4cout << "charge " << Q << endl;
G4cout << "G4LFission:ApplyYourself: incident particle:" << G4endl;
G4cout << "P " << P << " MeV/c" << G4endl;
G4cout << "Px " << Px << " MeV/c" << G4endl;
G4cout << "Py " << Py << " MeV/c" << G4endl;
G4cout << "Pz " << Pz << " MeV/c" << G4endl;
G4cout << "E " << E << " MeV" << G4endl;
G4cout << "mass " << E0 << " MeV" << G4endl;
G4cout << "charge " << Q << G4endl;
}
// GHEISHA ADD operation to get total energy, mass, charge:
if (verboseLevel > 1) {
G4cout << "G4LFission:ApplyYourself: material:" << endl;
G4cout << "A " << N << endl;
G4cout << "Z " << Z << endl;
G4cout << "G4LFission:ApplyYourself: material:" << G4endl;
G4cout << "A " << N << G4endl;
G4cout << "Z " << Z << G4endl;
G4cout << "atomic mass " <<
Atomas(N, Z) << "MeV" << endl;
Atomas(N, Z) << "MeV" << G4endl;
}
E = E + Atomas(N, Z);
G4double E02 = E*E - P*P;
@@ -108,10 +108,10 @@ G4LFission::ApplyYourself(const G4Track & aTrack,G4Nucleus & targetNucleus)
if (E02 < 0) E0 = -E0;
Q = Q + Z;
if (verboseLevel > 1) {
G4cout << "G4LFission:ApplyYourself: total:" << endl;
G4cout << "E " << E << " MeV" << endl;
G4cout << "mass " << E0 << " MeV" << endl;
G4cout << "charge " << Q << endl;
G4cout << "G4LFission:ApplyYourself: total:" << G4endl;
G4cout << "E " << E << " MeV" << G4endl;
G4cout << "mass " << E0 << " MeV" << G4endl;
G4cout << "charge " << Q << G4endl;
}
Px = -Px;
Py = -Py;
@@ -184,15 +184,15 @@ G4LFission::ApplyYourself(const G4Track & aTrack,G4Nucleus & targetNucleus)
G4double cost = -1. + 2.*ran1;
G4double sint = sqrt(abs(1. - cost*cost));
G4double phi = ran2*twopi;
// G4cout << ran1 << " " << ran2 << endl;
// G4cout << cost << " " << sint << " " << phi << endl;
// G4cout << ran1 << " " << ran2 << G4endl;
// G4cout << cost << " " << sint << " " << phi << G4endl;
theSecondary = theParticleChange.GetSecondary(i - 1);
G4double pp = theSecondary->GetDynamicParticle()->GetTotalMomentum()/MeV;
G4double px = pp*sint*sin(phi);
G4double py = pp*sint*cos(phi);
G4double pz = pp*cost;
// G4cout << pp << endl;
// G4cout << px << " " << py << " " << pz << endl;
// G4cout << pp << G4endl;
// G4cout << px << " " << py << " " << pz << G4endl;
G4double e = theSecondary->GetTotalEnergy()/MeV;
G4double e0 = theSecondary->GetDefinition()->GetPDGMass()/MeV;