Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -14,6 +14,15 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
02 March 2020 - Vladimir Ivanchenko (hadr-modman-V10-06-00)
-----------------------------------------------------------
- G4HadronicInteractionRegistry - try to delete HP and PHP end of run
- G4HadronicInteraction - provide default implementation for all
virtual methods
- G4VHighEnergyGenerator, G4VIntraNuclearTransportModel,
G4VPreCompoundModel - cleaned up: removed old commented lines,
code format, C++11 keywords
19 November 2019 - Vladimir Ivanchenko (hadr-modman-V10-05-02)
-----------------------------------------------------------
- G4VHighEnergyGenerator - use inheritance from G4HadronicInteraction
@@ -69,7 +69,7 @@ public: // With description
virtual ~G4HadronicInteraction();
virtual G4HadFinalState *ApplyYourself(const G4HadProjectile &aTrack,
G4Nucleus & targetNucleus ) = 0;
G4Nucleus & targetNucleus );
// The interface to implement for final state production code.
virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
@@ -156,6 +156,11 @@ public: // With description
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
virtual void InitialiseModel();
G4HadronicInteraction(const G4HadronicInteraction &right ) = delete;
const G4HadronicInteraction& operator=(const G4HadronicInteraction &right) = delete;
G4bool operator==(const G4HadronicInteraction &right ) const = delete;
G4bool operator!=(const G4HadronicInteraction &right ) const = delete;
protected:
inline void SetModelName(const G4String& nam)
@@ -183,11 +188,6 @@ protected:
G4bool isBlocked;
private:
G4HadronicInteraction(const G4HadronicInteraction &right ) = delete;
const G4HadronicInteraction& operator=(const G4HadronicInteraction &right) = delete;
G4bool operator==(const G4HadronicInteraction &right ) const = delete;
G4bool operator!=(const G4HadronicInteraction &right ) const = delete;
G4HadronicInteractionRegistry* registry;
@@ -25,14 +25,15 @@
//
//
// V. Uzhinsky Nov. 2012
// Added method GetProjectileNucleus for simulation of nucleus-nucleus inter.
// Added method GetProjectileNucleus for simulation of nucleus-nucleus inter.
//
#ifndef G4VHighEnergyGenerator_h
#define G4VHighEnergyGenerator_h 1
// Class Description
// Base class for high energy interaction models in geant4. By merit of inheriting
// from this class a high energy interaction model can be used in conjunction with
// Base class for high energy interaction models in geant4.
// By merit of inheriting from this class a high energy
// interaction model can be used in conjunction with
// any cascade, precompound model and evaporation phase in the
// generation of complete final states for inelastic scattering.
// Class Description - End
@@ -48,20 +49,16 @@ class G4KineticTrackVector;
class G4VHighEnergyGenerator : public G4HadronicInteraction
{
public:
G4VHighEnergyGenerator(const G4String& modelName = "High Energy Generator");
G4VHighEnergyGenerator(const G4String& modelName = "HighEnergyGenerator");
~G4VHighEnergyGenerator() override;
G4HadFinalState *ApplyYourself(const G4HadProjectile&, G4Nucleus&) final;
G4VHighEnergyGenerator(const G4VHighEnergyGenerator &right) = delete;
const G4VHighEnergyGenerator & operator=(const G4VHighEnergyGenerator &right) = delete;
G4bool operator==(const G4VHighEnergyGenerator &right) const = delete;
G4bool operator!=(const G4VHighEnergyGenerator &right) const = delete;
private:
G4VHighEnergyGenerator(const G4VHighEnergyGenerator &right);
const G4VHighEnergyGenerator & operator=(const G4VHighEnergyGenerator &right);
G4bool operator==(const G4VHighEnergyGenerator &right) const;
G4bool operator!=(const G4VHighEnergyGenerator &right) const;
public:
virtual G4V3DNucleus * GetWoundedNucleus() const = 0;
virtual G4V3DNucleus * GetProjectileNucleus() const; // Uzhi Nov. 2012
virtual G4V3DNucleus * GetProjectileNucleus() const;
virtual G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus,
const G4DynamicParticle &thePrimary) = 0;
void ModelDescription(std::ostream&) const override;
@@ -89,8 +89,6 @@ public:
virtual void ModelDescription(std::ostream& outFile) const ;
virtual void PropagateModelDescription(std::ostream& outFile) const ;
private:
G4VIntraNuclearTransportModel(const G4VIntraNuclearTransportModel& right) = delete;
const G4VIntraNuclearTransportModel& operator=(const G4VIntraNuclearTransportModel &right) = delete;
G4bool operator==(const G4VIntraNuclearTransportModel& right) const = delete;
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
#ifndef G4VPreCompoundModel_h
#define G4VPreCompoundModel_h 1
@@ -64,8 +62,6 @@ public:
virtual ~G4VPreCompoundModel();
public:
virtual G4ReactionProductVector* DeExcite(G4Fragment& aFragment) = 0;
virtual void DeExciteModelDescription(std::ostream& outFile) const = 0;
@@ -74,13 +70,13 @@ public:
inline G4ExcitationHandler* GetExcitationHandler() const;
private:
G4VPreCompoundModel(const G4VPreCompoundModel &) = delete;
const G4VPreCompoundModel& operator=(const G4VPreCompoundModel &right) = delete;
G4bool operator==(const G4VPreCompoundModel &right) const = delete;
G4bool operator!=(const G4VPreCompoundModel &right) const = delete;
private:
G4ExcitationHandler* theExcitationHandler;
};
@@ -59,6 +59,12 @@ void G4HadronicInteraction::BuildPhysicsTable(const G4ParticleDefinition&)
void G4HadronicInteraction::InitialiseModel()
{}
G4HadFinalState*
G4HadronicInteraction::ApplyYourself(const G4HadProjectile&, G4Nucleus&)
{
return nullptr;
}
G4double
G4HadronicInteraction::SampleInvariantT(const G4ParticleDefinition*,
G4double, G4int, G4int)
@@ -57,16 +57,15 @@ void G4HadronicInteractionRegistry::Clean()
// << " " << this << G4endl;
for (size_t i=0; i<nModels; ++i) {
if( allModels[i] ) {
const char* xxx = (allModels[i]->GetModelName()).c_str();
G4int len = (allModels[i]->GetModelName()).length();
len = std::min(len, 9);
const G4String mname = G4String(xxx, len);
//const char* xxx = (allModels[i]->GetModelName()).c_str();
//G4int len = (allModels[i]->GetModelName()).length();
//len = std::min(len, 9);
//const G4String mname = G4String(xxx, len);
//G4cout << "G4HadronicInteractionRegistry: delete " << i << " "
// << allModels[i] << " " << mname
// << " " << this << G4endl;
if(mname != "NeutronHP" && mname != "ParticleH") {
delete allModels[i];
}
//if(mname != "NeutronHP" && mname != "ParticleH")
delete allModels[i];
// G4cout << "done " << this << G4endl;
}
}
@@ -25,36 +25,29 @@
//
//
// V. Uzhinsky Nov. 2012
// Added method GetProjectileNucleus for simulation of nucleus-nucleus inter.
// Added method GetProjectileNucleus for simulation of nucleus-nucleus inter.
//
// G4VHighEnergyGenerator
#include "G4VHighEnergyGenerator.hh"
G4VHighEnergyGenerator::G4VHighEnergyGenerator(const G4String& modelName)
: G4HadronicInteraction(modelName)
{
}
{}
G4VHighEnergyGenerator::~G4VHighEnergyGenerator()
{
}
G4HadFinalState*
G4VHighEnergyGenerator::ApplyYourself(const G4HadProjectile&, G4Nucleus&)
{
return nullptr;
}
{}
void G4VHighEnergyGenerator::ModelDescription(std::ostream& outFile) const
{
outFile << " Parton-string models description not written yet \n";
}
G4V3DNucleus * G4VHighEnergyGenerator::GetProjectileNucleus() const // Uzhi Nov. 2012
{ // Uzhi Nov. 2012
G4V3DNucleus * G4VHighEnergyGenerator::GetProjectileNucleus() const
{
G4ExceptionDescription ed;
ed << "The used HighEnergyGenerator "<<GetModelName()<<" cannot manage with a residual projectile nucleus";
ed << "The used HighEnergyGenerator "<<GetModelName()
<<" cannot manage with a residual projectile nucleus";
G4Exception("G4VHighEnergyGenerator::GetProjectileNucleus ", "G4had_mod_man",
FatalException, ed);
return 0;
} // Uzhi Nov. 2012
}
@@ -41,34 +41,31 @@
G4VIntraNuclearTransportModel::G4VIntraNuclearTransportModel(
const G4String& modName, G4VPreCompoundModel* ptr)
: G4HadronicInteraction(modName),theTransportModelName(modName),
the3DNucleus(0),theDeExcitation(ptr),thePrimaryProjectile(0)
the3DNucleus(nullptr),theDeExcitation(ptr),thePrimaryProjectile(nullptr)
{}
G4VIntraNuclearTransportModel::~G4VIntraNuclearTransportModel()
{
// if(the3DNucleus!=NULL) delete the3DNucleus;
// This is deleted by ~G4HadronicInteractionRegistry
// if(theDeExcitation!=NULL) delete theDeExcitation;
}
{}
void G4VIntraNuclearTransportModel::ModelDescription(std::ostream& outFile) const
{
outFile << "G4VIntraNuclearTransportModel is abstract class" << G4endl;
G4Exception("G4VIntraNuclearTransportModel::ModelDescription()","G4VINT01",FatalException,
"G4VIntraNuclearTransportModel is abstract class, no description available");
outFile << "G4VIntraNuclearTransportModel is abstract class.\n";
G4Exception("G4VIntraNuclearTransportModel::ModelDescription()","G4VINT01",
FatalException,
"G4VIntraNuclearTransportModel is abstract class, no description available");
}
void G4VIntraNuclearTransportModel::PropagateModelDescription(std::ostream& outFile) const
{
outFile << "G4VIntraNuclearTransportModel is abstract class, missing description" << G4endl;
// G4Exception("G4VIntraNuclearTransportModel::ModelDescription()","G4VINT01",FatalException,
// "G4VIntraNuclearTransportModel is abstract class, no description available");
outFile << "G4VIntraNuclearTransportModel is abstract class, missing description.\n";
}
G4ReactionProductVector* G4VIntraNuclearTransportModel::PropagateNuclNucl(G4KineticTrackVector* ,
G4ReactionProductVector*
G4VIntraNuclearTransportModel::PropagateNuclNucl(G4KineticTrackVector* ,
G4V3DNucleus* , G4V3DNucleus* )
{
G4Exception("G4VIntraNuclearTransportModel::Propagate()","G4VINT02",FatalException,
"Propagate method for nucleus-nucleus interactions not implemented");
return 0;
G4Exception("G4VIntraNuclearTransportModel::Propagate()","G4VINT02",
FatalException,
"Propagate method for nucleus-nucleus interactions not implemented");
return nullptr;
}
@@ -47,7 +47,5 @@ G4VPreCompoundModel::~G4VPreCompoundModel()
void G4VPreCompoundModel::DeExciteModelDescription(std::ostream& outFile) const
{
outFile << "description of DeExcite() for model derived from G4VPrecompoundModel missing"
<< "\n";
outFile << "description of DeExcite() for model derived from G4VPrecompoundModel missing.\n";
}