Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ExcitedString.hh,v 1.9 2001/10/06 08:17:01 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ExcitedString.hh,v 1.10 2002/12/12 19:17:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4ExcitedString_h
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ExcitedStringVector.hh,v 1.6 2001/10/04 20:00:32 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4ExcitedStringVector.hh,v 1.7 2002/12/12 19:17:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4ExcitedStringVector_h
#define G4ExcitedStringVector_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Fancy3DNucleus.hh,v 1.10 2002/04/24 13:10:50 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Fancy3DNucleus.hh,v 1.14 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4Fancy3DNucleus_h
#define G4Fancy3DNucleus_h 1
@@ -75,6 +75,7 @@ class G4Fancy3DNucleus : public G4V3DNucleus
G4double GetNuclearRadius();
G4double GetNuclearRadius(const G4double maxRelativeDensity);
G4double GetOuterRadius();
G4double CoulombBarrier();
void DoLorentzBoost(const G4LorentzVector & theBoost);
void DoLorentzBoost(const G4ThreeVector & theBeta);
void DoLorentzContraction(const G4LorentzVector & theBoost);
@@ -94,7 +95,6 @@ class G4Fancy3DNucleus : public G4V3DNucleus
G4VNuclearDensity * theDensity;
G4FermiMomentum theFermi;
const G4double nucleondistance;
};
inline G4int G4Fancy3DNucleus::GetCharge()
@@ -106,7 +106,6 @@ inline G4int G4Fancy3DNucleus::GetMassNumber()
{
return myA;
}
#endif
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4FermiMomentum.hh,v 1.5 2001/08/01 17:09:17 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4FermiMomentum.hh,v 1.6 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4FermiMomentum_h
#define G4FermiMomentum_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Fragment.hh,v 1.13 2002/06/07 15:30:55 jwellisc Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Fragment.hh,v 1.15 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -51,9 +51,6 @@ class G4ParticleDefinition;
class G4Fragment; // Forward deckaration
typedef G4std::vector<G4Fragment*> G4FragmentVector;
//#define pctest
class G4Fragment
{
public:
@@ -128,7 +125,7 @@ public:
inline G4double GetBindingEnergy(void) const;
#ifdef pctest
#ifdef PRECOMPOUND_TEST
G4String GetCreatorModel() const { return theCreatorModel; }
void SetCreatorModel(const G4String & aModel)
{ theCreatorModel = aModel; }
@@ -166,7 +163,7 @@ private:
G4double theCreationTime;
#ifdef pctest
#ifdef PRECOMPOUND_TEST
G4String theCreatorModel;
#endif
};
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4FragmentVector.hh,v 1.4 2001/08/01 17:09:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4FragmentVector.hh,v 1.5 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.5 2001/08/01 17:09:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.6 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
// ----------------------------------------------------------------
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -81,6 +81,8 @@ class G4KineticTrack : public G4VKineticNucleon
const G4LorentzVector& Get4Momentum() const;
void Set4Momentum(const G4LorentzVector& a4Momentum);
void Update4Momentum(G4double aEnergy); // update E and p, not changing mass
void Update4Momentum(const G4ThreeVector & aMomentum); // idem
const G4LorentzVector& GetInitialCoordinates() const;
@@ -92,17 +94,17 @@ class G4KineticTrack : public G4VKineticNucleon
G4double* GetActualWidth() const;
G4double GetActualMass() const;
G4int GetnChannels() const;
private:
G4int GetnChannels() const;
void SetnChannels(const G4int aChannel);
void SetActualWidth(G4double* anActualWidth);
G4double EvaluateTotalActualWidth();
G4double EvaluateCMMomentum (const G4double mass,
const G4double* m_ij) const;
@@ -140,7 +142,7 @@ public:
G4double theFormationTime;
G4ThreeVector thePosition;
G4LorentzVector the4Momentum;
G4LorentzVector theInitialCoordinates;
@@ -154,7 +156,7 @@ public:
private:
// Temporary storage for daughter masses and widths
// (needed because Integrand Function cannot take > 1 argument)
@@ -213,6 +215,25 @@ inline void G4KineticTrack::Set4Momentum(const G4LorentzVector& a4Momentum)
the4Momentum = a4Momentum;
}
inline void G4KineticTrack::Update4Momentum(G4double aEnergy)
{
G4double newP=0;
if ( aEnergy > GetActualMass() )
{
newP = sqrt(sqr(aEnergy) - the4Momentum.mag2());
} else
{
aEnergy=GetActualMass();
}
the4Momentum = G4LorentzVector(newP*the4Momentum.vect().unit(), aEnergy);
}
inline void G4KineticTrack::Update4Momentum(const G4ThreeVector & aMomentum)
{
G4double newE=sqrt(the4Momentum.mag2() + aMomentum.mag2());
the4Momentum = G4LorentzVector(aMomentum, newE);
}
inline const G4LorentzVector& G4KineticTrack::GetInitialCoordinates() const
@@ -275,7 +296,7 @@ inline G4double G4KineticTrack::SampleResidualLifetime()
G4double theTotalActualWidth = this->EvaluateTotalActualWidth();
G4double tau = hbar_Planck * (-1.0 / theTotalActualWidth);
G4double theResidualLifetime = tau * log(G4UniformRand());
return theResidualLifetime;
return theResidualLifetime*the4Momentum.gamma();
}
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4KineticTrackVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4KineticTrackVector.hh,v 1.7 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// Modified at 8-Oct-1998 by Maxim Komogorov. Methods BoostBeam,Boost,Shift
// were added.
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4NuclearFermiDensity.hh,v 1.6 2002/04/24 13:10:50 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4NuclearFermiDensity.hh,v 1.8 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4NuclearFermiDensity_h
#define G4NuclearFermiDensity_h 1
@@ -41,9 +41,21 @@ class G4NuclearFermiDensity : public G4VNuclearDensity
G4NuclearFermiDensity(G4double anA, G4double aZ);
~G4NuclearFermiDensity();
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const;
G4double GetRadius(const G4double maxRelativeDenisty) const;
G4double GetDeriv(const G4ThreeVector & aPosition) const;
G4double GetRelativeDensity(const G4ThreeVector & aPosition) const
{
return 1./(1.+exp((aPosition.mag()-theR)/a));
}
G4double GetRadius(const G4double maxRelativeDenisty) const
{
return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
(theR + a*log((1-maxRelativeDenisty+exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
}
G4double GetDeriv(const G4ThreeVector & aPosition) const
{
return -exp((aPosition.mag()-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
}
private:
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4NuclearShellModelDensity.hh,v 1.6 2002/04/24 13:10:50 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4NuclearShellModelDensity.hh,v 1.7 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4NuclearShellModelDensity_h
#define G4NuclearShellModelDensity_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Nucleon.hh,v 1.5 2001/08/01 17:09:20 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Nucleon.hh,v 1.6 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4Nucleon_h
#define G4Nucleon_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Parton.hh,v 1.13 2001/08/01 17:09:21 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Parton.hh,v 1.14 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4Parton_h
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PartonVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4PartonVector.hh,v 1.7 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4PartonVector_h
#define G4PartonVector_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4SampleResonance.hh,v 1.4 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4SampleResonance.hh,v 1.5 2002/12/12 19:17:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
#ifndef G4SampleResonance_h