Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
@@ -25,6 +25,7 @@
//
#include "G4HadronicWhiteBoard.hh"
G4HadronicWhiteBoard & G4HadronicWhiteBoard::Instance()
{
static G4HadronicWhiteBoard theInstance;
@@ -42,7 +43,6 @@ G4HadronicWhiteBoard & G4HadronicWhiteBoard::Instance()
G4double G4HadronicWhiteBoard::GetA(){return theA;}
G4double G4HadronicWhiteBoard::GetZ(){return theZ;}
void G4HadronicWhiteBoard::SetProjectile(const G4HadProjectile & aProjectile)
{
theProjectile = const_cast<G4HadProjectile*>(& aProjectile);
@@ -61,15 +61,21 @@ G4HadronicWhiteBoard & G4HadronicWhiteBoard::Instance()
theZ = theTarget.GetZ();
}
void G4HadronicWhiteBoard::Dump()
{
std::cerr << std::endl;
std::cerr << "GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD"<<std::endl;
std::cerr << "Dumping the registered hadronic state information "<<std::endl;
std::cerr << "Nucleus A, Z = "<<theA<<" "<<theZ<<std::endl;
std::cerr << "Projectile was a "<<theName<<std::endl;
std::cerr << "projectile momentum (px, py, pz) = ("<<thePx<<", "<<thePy<<", "<<thePz<<")"<<std::endl;
std::cerr << "Projectile energy = "<< theE<<std::endl;
std::cerr << "GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD_GHAD"<<std::endl;
std::cerr << std::endl;
std::cerr << "*** Geant4 Hadronic Reaction Information ***"
<< std::endl;
std::cerr << " Nucleus A, Z = " << theA << " " << theZ
<< std::endl;
std::cerr << " Projectile was a " << theName
<< std::endl;
std::cerr << " projectile momentum (px, py, pz) = (" << thePx << ", "
<< thePy << ", " << thePz << ")" << std::endl;
std::cerr << " Projectile energy = "<< theE
<< std::endl;
std::cerr << "*** End of Geant4 Hadronic Reaction Information ***"
<< std::endl;
G4Exception("G4HadronicProcess", "001", FatalException, "segmentation fault");
}
@@ -3125,7 +3125,7 @@
for( i=0; i<npnb; ++i ) if( G4UniformRand() < sprob ) local_npnb--;
G4double local_epnb = epnb;
if (ndta == 0) local_epnb += edta; // Retrieve unused kinetic energy
G4double ekin = local_epnb/local_npnb;
G4double ekin = local_epnb/std::max(1,local_npnb);
for( i=0; i<local_npnb; ++i )
{
@@ -3222,7 +3222,7 @@
for( i=0; i<ndta; ++i )if( G4UniformRand() < sprob )local_ndta--;
G4double local_edta = edta;
if (npnb == 0) local_edta += epnb; // Retrieve unused kinetic energy
G4double ekin = local_edta/local_ndta;
G4double ekin = local_edta/std::max(1,local_ndta);
for( i=0; i<local_ndta; ++i )
{