Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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 1.2.8.1 2001/06/28 19:12:55 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4EnergyRangeManager.hh,v 1.4 2001/08/01 17:03:23 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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. *
@@ -43,6 +43,7 @@
#include "G4HadronCrossSections.hh"
#include "G4CrossSectionDataStore.hh"
#include "G4HadronInelasticDataSet.hh"
#include "G4ParticleChange.hh"
class G4HadronInelasticProcess : public G4HadronicProcess
@@ -81,6 +82,17 @@
G4VParticleChange *PostStepDoIt(
const G4Track &aTrack, const G4Step &aStep )
{
if(0==theLastCrossSection)
{
G4cerr << "G4HadronInelasticProcess: called for final state, while cross-section was zero"<<G4endl;
G4cerr << " Returning empty particle change...."<<G4endl;
G4double dummy=0;
G4ForceCondition condition;
G4double it = GetMeanFreePath(aTrack, dummy, &condition);
G4cerr << " current MeanFreePath is "<<it<<G4endl;
theParticleChange.Initialize(aTrack);
return &theParticleChange;
}
SetDispatch( this );
return G4HadronicProcess::GeneralPostStepDoIt( aTrack, aStep );
}
@@ -104,6 +116,8 @@
private:
G4double aScaleFactor;
G4double theLastCrossSection;
G4ParticleChange theParticleChange;
};
#endif
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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 1.4.6.1 2001/06/28 19:12:55 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronicInteraction.hh,v 1.8 2001/11/26 16:28:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Hadronic Interaction abstract base class
// This class is the base class for the model classes.
@@ -58,8 +58,8 @@
public:
G4HadronicInteraction() :
verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV),
theBlockedCounter(0), theMinCounter(0), theMaxCounter(0),
verboseLevel(0), theMinEnergy(0.0*GeV), theMaxEnergy(25.0*GeV), isBlocked(false),
theMinCounter(0), theMaxCounter(0), theBlockedCounter(0),
theMinCounterElements(0), theMaxCounterElements(0),
theBlockedCounterElements(0)
{
@@ -139,8 +139,21 @@ public: // With description
public: // Without description
void DeActivateFor( G4Material *aMaterial );
void ActivateFor( G4Material *aMaterial )
{
Block();
SetMaxEnergy(GetMaxEnergy(), aMaterial);
SetMinEnergy(GetMinEnergy(), aMaterial);
}
void DeActivateFor( G4Element *anElement );
void ActivateFor( G4Element *anElement )
{
Block();
SetMaxEnergy(GetMaxEnergy(), anElement);
SetMinEnergy(GetMinEnergy(), anElement);
}
G4bool IsBlocked( const G4Material *aMaterial ) const;
@@ -168,6 +181,10 @@ public: // Without description
G4double theMinEnergy;
G4double theMaxEnergy;
G4bool IsBlocked() const { return isBlocked;}
void Block() { isBlocked = true; }
G4bool isBlocked;
private:
enum { MAX_LIST_SIZE = 500 };
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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. *
@@ -23,7 +23,7 @@
#ifndef G4HadronicInteractionRegistry_h
#define G4HadronicInteractionRegistry_h 1
#include "g4rw/tpvector.h"
#include "g4std/vector"
#include "globals.hh"
class G4HadronicInteraction;
@@ -55,7 +55,7 @@ class G4HadronicInteractionRegistry
void AddModel(G4HadronicInteraction * aModel);
G4int nModels;
G4RWTPtrVector<G4HadronicInteraction> allModels;
G4std::vector <G4HadronicInteraction *> allModels;
static G4HadronicInteractionRegistry theRegistry;
};
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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. *
@@ -48,7 +48,7 @@
#include "G4PhysicsVector.hh"
#include "G4Nucleus.hh"
#include "G4ReactionProduct.hh"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
#include "G4VIsotopeProduction.hh"
#include "G4IsoParticleChange.hh"
@@ -61,7 +61,7 @@
{ isoIsOnAnyway = 0; }
virtual ~G4HadronicProcess()
{ theProductionModels.clearAndDestroy(); }
{ unsigned int i; for(i=0; i<theProductionModels.size(); i++) delete theProductionModels[i]; }
inline void RegisterMe( G4HadronicInteraction *a )
{ GetManagerPointer()->RegisterMe( a ); }
@@ -111,7 +111,7 @@
void DisableIsotopeCounting() {isoIsOnAnyway = -1;}
void RegisterIsotopeProductionModel(G4VIsotopeProduction * aModel)
{ theProductionModels.insert(aModel); }
{ theProductionModels.push_back(aModel); }
static G4IsoParticleChange * GetIsotopeProductionInfo()
{
@@ -154,7 +154,7 @@
G4int isoIsOnAnyway; // true(1), false(-1) or default(0)
G4IsoParticleChange theIsoPC;
G4RWTPtrOrderedVector<G4VIsotopeProduction> theProductionModels;
G4std::vector<G4VIsotopeProduction *> theProductionModels;
static G4IsoParticleChange * theIsoResult;
static G4IsoParticleChange * theOldIsoResult;
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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 1.2.8.1 2001/06/28 19:12:56 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4InelasticInteraction.hh,v 1.6 2001/12/07 11:18:38 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Hadronic Process: Inelastic Interaction
// This class is an abstract base class, since the pure virtual
@@ -71,6 +71,8 @@
G4FastVector<G4ReactionProduct,128> &vec,
G4int &vecLen );
void Rotate(G4FastVector<G4ReactionProduct,128> &vec, G4int &vecLen);
void GetNormalizationConstant( const G4double availableEnergy,
G4double &n,
G4double &anpn );
@@ -92,6 +94,11 @@
G4ReactionProduct &currentParticle,
G4ReactionProduct &targetParticle,
G4bool &incidentHasChanged );
private:
G4double cache;
G4ThreeVector what;
};
#endif
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the 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. *