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
+12
View File
@@ -14,6 +14,18 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
11 December 2006 Dennis Wright (hadr-util-V08-01-01)
----------------------------------------------------
- G4ReactionDynamics::AddBlackTrackParticles
protect variables local_npnb, local_ndta from divide by zero
24 November 2006 Dennis Wright (hadr-util-V08-01-00)
----------------------------------------------------
- G4HadronicWhiteBoard:
replace GHAD message with
"Geant4 Hadronic Reaction Information" and use
G4Exception to kill run.
15 May 2006 Dennis Wright (hadr-util-V08-00-05)
-----------------------------------------------
- G4Nucleus:
@@ -30,6 +30,7 @@
#include "G4Nucleus.hh"
#include "G4ParticleDefinition.hh"
class G4HadronicWhiteBoard
{
public:
@@ -41,6 +42,7 @@ class G4HadronicWhiteBoard
void SetTargetNucleus(const G4Nucleus & aTarget);
const G4HadProjectile * GetProjectile();
const G4Nucleus & GetTargetNucleus();
G4ParticleDefinition * GetPDef();
@@ -51,7 +53,7 @@ class G4HadronicWhiteBoard
G4double GetPz();
G4double GetA();
G4double GetZ();
void Dump();
@@ -68,6 +70,7 @@ class G4HadronicWhiteBoard
G4Nucleus theTarget;
G4double theA;
G4double theZ;
};
#endif
@@ -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 )
{