Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
@@ -0,0 +1,68 @@
// This code implementation is the intellectual property of
// the RD44 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: G4EnergyRangeManager.hh,v 2.0 1998/07/02 16:22:08 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Last modified: 24-Mar-1997
#ifndef G4EnergyRangeManager_h
#define G4EnergyRangeManager_h 1
#include "G4HadronicInteraction.hh"
class G4EnergyRangeManager
{
public:
G4EnergyRangeManager()
{ theHadronicInteractionCounter = 0; }
~G4EnergyRangeManager()
{ }
G4EnergyRangeManager( const G4EnergyRangeManager &right );
G4EnergyRangeManager & operator=( const G4EnergyRangeManager &right );
public:
inline G4bool operator==( const G4EnergyRangeManager &right ) const
{ return ( this == (G4EnergyRangeManager *) &right ); }
inline G4bool operator!=( const G4EnergyRangeManager &right ) const
{ return ( this != (G4EnergyRangeManager *) &right ); }
void RegisterMe( G4HadronicInteraction *a );
G4HadronicInteraction *GetHadronicInteraction(
const G4double kineticEnergy,
const G4Material *aMaterial,
const G4Element *anElement ) const;
private:
inline G4int GetHadronicInteractionCounter() const
{ return theHadronicInteractionCounter; }
private:
enum { MAX_NUMBER_OF_MODELS = 100 };
G4HadronicInteraction *
theHadronicInteraction[ MAX_NUMBER_OF_MODELS ];
G4int theHadronicInteractionCounter;
};
#endif
@@ -0,0 +1,89 @@
// This code implementation is the intellectual property of
// the RD44 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: G4HadronInelasticProcess.hh,v 2.1 1998/07/13 19:02:45 jwellisc Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Inelastic Process class
// The specific particle inelastic processes derive from this class
// This is an abstract base class, since the pure virtual function
// PostStepDoIt has not been defined yet.
//
// J.L. Chuma, TRIUMF, 10-Mar-1997
// Last modified: 27-Mar-1997
//
// 14-APR-98 F.W.Jones: variant G4HadronInelastic process for
// G4CrossSectionDataSet/DataStore class design.
// 29-JUN-98 F.W.Jones: default data set G4HadronCrossSections
//
#ifndef G4HadronInelasticProcess_h
#define G4HadronInelasticProcess_h 1
#include "G4HadronicProcess.hh"
//#include "G4LPhysicsFreeVector.hh"
#include "G4HadronCrossSections.hh"
#include "G4CrossSectionDataStore.hh"
#include "G4HadronInelasticDataSet.hh"
class G4HadronInelasticProcess : public G4HadronicProcess
{
public:
G4HadronInelasticProcess(
const G4String &processName,
G4ParticleDefinition *aParticle ) :
G4HadronicProcess( processName ),
theCrossSectionDataStore(new G4CrossSectionDataStore)
{
theCrossSectionDataStore->AddDataSet(new G4HadronInelasticDataSet);
theParticle = aParticle;
// BuildThePhysicsTable();
}
virtual ~G4HadronInelasticProcess()
{ }
G4double GetMeanFreePath(
const G4Track &aTrack,
G4double previousStepSize,
G4ForceCondition *condition );
void BuildThePhysicsTable();
G4double GetMicroscopicCrossSection(
const G4DynamicParticle *aParticle,
const G4Element *anElement);
G4VParticleChange *PostStepDoIt(
const G4Track &aTrack, const G4Step &aStep )
{
SetDispatch( this );
return G4HadronicProcess::GeneralPostStepDoIt( aTrack, aStep );
}
void SetCrossSectionDataStore(G4CrossSectionDataStore* aDataStore)
{
theCrossSectionDataStore = aDataStore;
}
G4CrossSectionDataStore* GetCrossSectionDataStore()
{
return theCrossSectionDataStore;
}
protected:
// G4HadronicCrossSections theCrossSectionData;
G4CrossSectionDataStore* theCrossSectionDataStore;
G4ParticleDefinition *theParticle;
};
#endif
@@ -0,0 +1,172 @@
// This code implementation is the intellectual property of
// the RD44 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: G4HadronicInteraction.hh,v 2.3 1998/08/24 11:47:22 hpw Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Interaction abstract base class
// This class is the base class for the model classes.
// It sorts out the energy-range for the models and provides
// class utilities.
// original by H.P. Wellisch
// Modified by J.L.Chuma, TRIUMF, 21-Mar-1997
// Last modified: 3-Apr-1997
// Added units to energy initialization: J.L. Chuma 04-Apr-97
// Modified by J.L.Chuma, 05-May-97 to Initialize theBlockedCounter
// Modified by J.L.Chuma, 08-Jul-97 to implement the Nucleus changes
#ifndef G4HadronicInteraction_h
#define G4HadronicInteraction_h 1
#include "G4ParticleChange.hh"
#include "G4DynamicParticle.hh"
#include "G4ReactionDynamics.hh"
#include "G4Material.hh"
#include "G4Nucleus.hh"
#include "G4Track.hh"
class G4HadronicInteraction
{
public:
G4HadronicInteraction() :
verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV),
theBlockedCounter(0), theMinCounter(0), theMaxCounter(0),
theMinCounterElements(0), theMaxCounterElements(0),
theBlockedCounterElements(0)
{ }
virtual ~G4HadronicInteraction()
{ }
private:
inline G4HadronicInteraction(
const G4HadronicInteraction &right )
{ *this = right; }
inline const G4HadronicInteraction & operator=(
const G4HadronicInteraction &right )
{
if(this!=&right) G4Exception("unintended use of G4HadronicInteraction::operator=");
return right;
}
public:
inline G4bool operator==(
const G4HadronicInteraction &right ) const
{ return ( this == (G4HadronicInteraction *) &right ); }
inline G4bool operator!=(
const G4HadronicInteraction &right ) const
{ return ( this != (G4HadronicInteraction *) &right ); }
inline G4double GetMinEnergy() const
{ return theMinEnergy; }
G4double GetMinEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMinEnergy( const G4double anEnergy )
{ theMinEnergy = anEnergy; }
void SetMinEnergy( G4double anEnergy,
G4Element *anElement );
void SetMinEnergy( G4double anEnergy,
G4Material *aMaterial );
inline G4double GetMaxEnergy() const
{ return theMaxEnergy; }
G4double GetMaxEnergy( const G4Material *aMaterial,
const G4Element *anElement ) const;
inline void SetMaxEnergy( const G4double anEnergy )
{ theMaxEnergy = anEnergy; }
void SetMaxEnergy( G4double anEnergy,
G4Element *anElement );
void SetMaxEnergy( G4double anEnergy,
G4Material *aMaterial );
inline const G4HadronicInteraction *GetMyPointer() const
{ return this; }
inline G4int GetVerboseLevel() const
{ return verboseLevel; }
inline void SetVerboseLevel( G4int value )
{ verboseLevel = value; }
virtual G4VParticleChange *ApplyYourself(
const G4Track &aTrack, G4Nucleus & targetNucleus ) = 0;
void DeActivateFor( G4Material *aMaterial );
void DeActivateFor( G4Element *anElement );
G4bool IsBlocked( const G4Material *aMaterial ) const;
G4bool IsBlocked( const G4Element *anElement) const;
protected:
G4ParticleChange theParticleChange;
// the G4VParticleChange object which is modified and returned
// by address by the ApplyYourself method,
// (instead of aParticleChange as found in G4VProcess)
G4int verboseLevel;
// control flag for output messages
// 0: silent
// 1: warning messages
// 2: more
// (instead of verboseLevel as found in G4VProcess)
G4ReactionDynamics theReactionDynamics;
// these two have global validity
// units are assumed to be MeV
G4double theMinEnergy;
G4double theMaxEnergy;
private:
enum { MAX_LIST_SIZE = 500 };
// the following allow for restrictions/additions for specific materials
G4double theMinEnergyList[ MAX_LIST_SIZE ];
G4Material *theMinMaterials[ MAX_LIST_SIZE ];
G4int theMinCounter;
G4double theMaxEnergyList[ MAX_LIST_SIZE ];
G4Material *theMaxMaterials[ MAX_LIST_SIZE ];
G4int theMaxCounter;
G4Material *theBlockedList[ MAX_LIST_SIZE ];
G4int theBlockedCounter;
// the following allow for restrictions/additions for specific elements
G4double theMinEnergyListElements[ MAX_LIST_SIZE ];
G4Element *theMinElements[ MAX_LIST_SIZE ];
G4int theMinCounterElements;
G4double theMaxEnergyListElements[ MAX_LIST_SIZE ];
G4Element *theMaxElements[ MAX_LIST_SIZE ];
G4int theMaxCounterElements;
G4Element *theBlockedListElements[ MAX_LIST_SIZE ];
G4int theBlockedCounterElements;
};
#endif
@@ -0,0 +1,106 @@
// This code implementation is the intellectual property of
// the RD44 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: G4HadronicProcess.hh,v 2.0 1998/07/02 16:22:13 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// This is the top level Hadronic Process class
// The inelastic, elastic, capture, and fission processes
// should derive from this class
// This is an abstract base class, since the pure virtual function
// PostStepDoIt has not been defined yet.
// Note: there is no .cc file
//
// original by H.P.Wellisch
// J.L. Chuma, TRIUMF, 10-Mar-1997
// Last modified: 04-Apr-1997
#ifndef G4HadronicProcess_h
#define G4HadronicProcess_h 1
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4EnergyRangeManager.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4ElementTable.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsVector.hh"
#include "G4Nucleus.hh"
#include "G4ReactionProduct.hh"
class G4HadronicProcess : public G4VDiscreteProcess
{
public:
G4HadronicProcess( const G4String &processName = "Hadronic" ) :
G4VDiscreteProcess( processName )
{ }
virtual ~G4HadronicProcess()
{ }
inline void RegisterMe( G4HadronicInteraction *a )
{ GetManagerPointer()->RegisterMe( a ); }
inline G4HadronicInteraction *GetHadronicInteraction()
{ return theInteraction; }
inline G4HadronicInteraction *ChooseHadronicInteraction(
G4double kineticEnergy, G4Material *aMaterial, G4Element *anElement )
{ return GetManagerPointer()->
GetHadronicInteraction( kineticEnergy, aMaterial, anElement ); }
inline const G4EnergyRangeManager &GetEnergyRangeManager() const
{ return theEnergyRangeManager; }
inline void SetEnergyRangeManager( const G4EnergyRangeManager &value )
{ theEnergyRangeManager = value; }
G4Element * ChooseAandZ( const G4DynamicParticle *aParticle,
const G4Material *aMaterial );
virtual G4VParticleChange *PostStepDoIt( const G4Track &aTrack,
const G4Step &aStep ) = 0;
G4VParticleChange *GeneralPostStepDoIt( const G4Track &aTrack,
const G4Step &aStep );
void SetDispatch( G4HadronicProcess *value )
{ dispatch=value; }
virtual G4double GetMicroscopicCrossSection( const G4DynamicParticle *aParticle,
const G4Element *anElement ) = 0;
G4double GetCurrentZ()
{ return currentZ; }
G4double GetCurrentN()
{ return currentN; }
protected:
inline G4EnergyRangeManager *GetManagerPointer()
{ return &theEnergyRangeManager; }
G4EnergyRangeManager theEnergyRangeManager;
G4HadronicInteraction *theInteraction;
G4Nucleus targetNucleus;
private:
G4double currentZ;
G4double currentN;
G4HadronicProcess *dispatch;
};
#endif
@@ -0,0 +1,82 @@
// This code implementation is the intellectual property of
// the RD44 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: G4InelasticInteraction.hh,v 2.3 1998/07/13 19:03:32 jwellisc Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Hadronic Process: Inelastic Interaction
// This class is an abstract base class, since the pure virtual
// function ApplyYourself has not been defined yet.
// original by H.P. Wellisch
// Modified by J.L. Chuma, TRIUMF, 22-Nov-1996
// Modified by J.L. Chuma 27-Mar-1997
// Modified by J.L. Chuma 30-Apr-1997
// Modified by J.L. Chuma 05-Aug-1997 to pass the original incident particle to
// CalculateMomenta
// Modified by J.L. Chuma 05-Jun-1998 to include quasiElastic flag to allow for
// TwoBody to be called directly, bypassing
// TwoCluster, and allowing TwoCluster to be
// called with no secondaries
#ifndef G4InelasticInteraction_h
#define G4InelasticInteraction_h 1
#include "globals.hh"
#include "G4FastVector.hh"
#include "G4HadronicInteraction.hh"
#include "G4ReactionProduct.hh"
#include "G4ParticleTypes.hh"
#include "Randomize.hh"
class G4InelasticInteraction : public G4HadronicInteraction
{
public:
G4InelasticInteraction() : G4HadronicInteraction()
{ }
virtual ~G4InelasticInteraction()
{ }
protected:
G4double Pmltpc( G4int np, G4int nm, G4int nz, G4int n,
G4double b, G4double c );
G4bool MarkLeadingStrangeParticle( const G4ReactionProduct &currentParticle,
const G4ReactionProduct &targetParticle,
G4ReactionProduct &leadParticle );
void SetUpPions( const G4int np, const G4int nm, const G4int nz,
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen );
void GetNormalizationConstant( const G4double availableEnergy,
G4double &n,
G4double &anpn );
void CalculateMomenta( G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
const G4DynamicParticle *originalIncident,
const G4DynamicParticle *originalTarget,
G4ReactionProduct &modifiedOriginal,
G4Nucleus &targetNucleus,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged,
G4bool &targetHasChanged,
G4bool quasiElastic );
void SetUpChange( G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen,
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged );
};
#endif