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
@@ -46,8 +46,8 @@ G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics(G4int ver)
: G4IonPhysics(ver)
{}
G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics(const G4String& name, G4int)
: G4IonPhysics(name)
G4IonBinaryCascadePhysics::G4IonBinaryCascadePhysics(const G4String&, G4int ver)
: G4IonPhysics(ver)
{}
G4IonBinaryCascadePhysics::~G4IonBinaryCascadePhysics()
@@ -68,13 +68,6 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXDeuteron = nullptr;
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXTriton = nullptr;
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXHe3 = nullptr;
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXAlpha = nullptr;
G4ThreadLocal G4INCLXXInterface* G4IonINCLXXPhysics::theINCLXXIons = nullptr;
G4ThreadLocal G4FTFBuilder* G4IonINCLXXPhysics::theFTFPBuilder = nullptr;
G4IonINCLXXPhysics::G4IonINCLXXPhysics(G4int ver) :
G4IonINCLXXPhysics("IonINCLXX", ver)
{}
@@ -92,25 +85,15 @@ G4IonINCLXXPhysics::G4IonINCLXXPhysics(const G4String& nname, G4int ver)
}
G4IonINCLXXPhysics::~G4IonINCLXXPhysics()
{
//For MT need to explicitly set back pointers to zero:
//variables are static and if new threads are created we can have problems
//since variable is still pointing old value
delete theFTFPBuilder; theFTFPBuilder=nullptr;
delete theINCLXXDeuteron; theINCLXXDeuteron = nullptr;
delete theINCLXXTriton; theINCLXXTriton=nullptr;
delete theINCLXXHe3; theINCLXXHe3=nullptr;
delete theINCLXXAlpha; theINCLXXAlpha=nullptr;
delete theINCLXXIons; theINCLXXIons=nullptr;
}
{}
void G4IonINCLXXPhysics::ConstructProcess()
{
theINCLXXDeuteron= new G4INCLXXInterface();
theINCLXXTriton= new G4INCLXXInterface();
theINCLXXHe3= new G4INCLXXInterface();
theINCLXXAlpha= new G4INCLXXInterface();
theINCLXXIons= new G4INCLXXInterface();
G4INCLXXInterface* theINCLXXDeuteron= new G4INCLXXInterface();
G4INCLXXInterface* theINCLXXTriton= new G4INCLXXInterface();
G4INCLXXInterface* theINCLXXHe3= new G4INCLXXInterface();
G4INCLXXInterface* theINCLXXAlpha= new G4INCLXXInterface();
G4INCLXXInterface* theINCLXXIons= new G4INCLXXInterface();
G4HadronicInteraction* p =
G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
@@ -123,8 +106,8 @@ void G4IonINCLXXPhysics::ConstructProcess()
G4double emax = G4HadronicParameters::Instance()->GetMaxEnergy();
G4HadronicInteraction* theFTFP = nullptr;
if(emax > emaxINCLXX) {
theFTFPBuilder = new G4FTFBuilder("FTFP",thePreCompound);
theFTFP = theFTFPBuilder->GetModel();
G4FTFBuilder theFTFPBuilder("FTFP",thePreCompound);
theFTFP = theFTFPBuilder.GetModel();
theFTFP->SetMinEnergy(emaxINCLXX - deltaE);
theFTFP->SetMaxEnergy(emax);
}
@@ -67,20 +67,16 @@ using namespace std;
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonPhysics);
G4ThreadLocal G4FTFBuilder* G4IonPhysics::theBuilder=nullptr;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4IonPhysics::G4IonPhysics(G4int ver)
: G4IonPhysics("ionInelasticFTFP_BIC")
{
verbose = ver;
}
: G4IonPhysics("ionInelasticFTFP_BIC", ver)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4IonPhysics::G4IonPhysics(const G4String& nname)
: G4VPhysicsConstructor(nname),verbose(1)
G4IonPhysics::G4IonPhysics(const G4String& nname, G4int ver)
: G4VPhysicsConstructor(nname),verbose(ver)
{
SetPhysicsType(bIons);
if(verbose > 1) { G4cout << "### IonPhysics: " << nname << G4endl; }
@@ -89,13 +85,7 @@ G4IonPhysics::G4IonPhysics(const G4String& nname)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4IonPhysics::~G4IonPhysics()
{
// Explictly setting pointers to zero is actually needed.
// These are static variables, in case we restart threads
// we need to re-create objects
delete theBuilder;
theBuilder = nullptr;
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -126,8 +116,8 @@ void G4IonPhysics::ConstructProcess()
// FTFP
G4HadronicInteraction* theFTFP = nullptr;
if(emax > theIonBC->GetMaxEnergy()) {
theBuilder = new G4FTFBuilder("FTFP",thePreCompound);
theFTFP = theBuilder->GetModel();
G4FTFBuilder theBuilder("FTFP",thePreCompound);
theFTFP = theBuilder.GetModel();
theFTFP->SetMinEnergy( G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade() );
theFTFP->SetMaxEnergy( emax );
}
@@ -72,16 +72,12 @@ using namespace std;
G4_DECLARE_PHYSCONSTR_FACTORY( G4IonPhysicsPHP );
G4ThreadLocal G4FTFBuilder* G4IonPhysicsPHP::theBuilder = nullptr;
G4IonPhysicsPHP::G4IonPhysicsPHP( G4int ver )
: G4IonPhysicsPHP( "ionInelasticFTFP_BIC_PHP" )
{
verbose = ver;
}
: G4IonPhysicsPHP( "ionInelasticFTFP_BIC_PHP", ver)
{}
G4IonPhysicsPHP::G4IonPhysicsPHP( const G4String& nname )
: G4VPhysicsConstructor( nname ), verbose( 1 )
G4IonPhysicsPHP::G4IonPhysicsPHP( const G4String& nname, G4int ver )
: G4VPhysicsConstructor( nname ), verbose( ver )
{
SetPhysicsType( bIons );
G4DeexPrecoParameters* param = G4NuclearLevelData::GetInstance()->GetParameters();
@@ -89,21 +85,15 @@ G4IonPhysicsPHP::G4IonPhysicsPHP( const G4String& nname )
if ( verbose > 1 ) G4cout << "### G4IonPhysics: " << nname << G4endl;
}
G4IonPhysicsPHP::~G4IonPhysicsPHP() {
//Explictly setting pointers to zero is actually needed.
//These are static variables, in case we restart threads we need to re-create objects
delete theBuilder; theBuilder = nullptr;
}
void G4IonPhysicsPHP::ConstructParticle() {
// Construct ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void G4IonPhysicsPHP::ConstructProcess() {
const G4double maxPHP = 200.0*MeV;
@@ -129,8 +119,8 @@ void G4IonPhysicsPHP::ConstructProcess() {
// FTFP
G4HadronicInteraction* theFTFP = nullptr;
if(maxFTF > maxBIC) {
theBuilder = new G4FTFBuilder( "FTFP", thePreCompound );
theFTFP = theBuilder->GetModel();
G4FTFBuilder theBuilder( "FTFP", thePreCompound );
theFTFP = theBuilder.GetModel();
theFTFP->SetMinEnergy( minFTF );
theFTFP->SetMaxEnergy( maxFTF );
}
@@ -192,7 +182,6 @@ void G4IonPhysicsPHP::ConstructProcess() {
if ( verbose > 1 ) G4cout << "G4IonPhysicsPHP::ConstructProcess done! " << G4endl;
}
void G4IonPhysicsPHP::AddProcess( const G4String& name, G4ParticleDefinition* part,
G4ParticleHPInelasticData* xsecPHP, G4HadronicInteraction* aPHP,
G4HadronicInteraction* aBIC,
@@ -58,20 +58,14 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4IonPhysicsXS);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4IonPhysicsXS::G4IonPhysicsXS(G4int ver)
: G4IonPhysicsXS("ionPhysicsXS")
{
verbose = ver;
}
: G4IonPhysicsXS("ionPhysicsXS", ver)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4IonPhysicsXS::G4IonPhysicsXS(const G4String& nname)
: G4IonPhysics(nname)
{
G4DeexPrecoParameters* param = G4NuclearLevelData::GetInstance()->GetParameters();
param->SetDeexChannelsType(fCombined);
if(verbose > 1) { G4cout << "### IonPhysics: " << nname << G4endl; }
}
G4IonPhysicsXS::G4IonPhysicsXS(const G4String& nname, G4int ver)
: G4IonPhysics(nname, ver)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -79,8 +79,6 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
G4ThreadLocal G4FTFBuilder* G4IonQMDPhysics::theFTFPBuilder = nullptr;
G4IonQMDPhysics::G4IonQMDPhysics(G4int ver)
: G4IonQMDPhysics("IonQMD", ver)
{}
@@ -98,9 +96,7 @@ G4IonQMDPhysics::G4IonQMDPhysics(const G4String& nname, G4int ver)
}
G4IonQMDPhysics::~G4IonQMDPhysics()
{
delete theFTFPBuilder; theFTFPBuilder = nullptr;
}
{}
void G4IonQMDPhysics::ConstructProcess()
{
@@ -116,8 +112,8 @@ void G4IonQMDPhysics::ConstructProcess()
emaxQMD = G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade();
G4HadronicInteraction* theFTFP = nullptr;
if(emax > emaxQMD) {
theFTFPBuilder = new G4FTFBuilder("FTFP",thePreCompound);
theFTFP = theFTFPBuilder->GetModel();
G4FTFBuilder theFTFPBuilder("FTFP",thePreCompound);
theFTFP = theFTFPBuilder.GetModel();
theFTFP->SetMinEnergy(emaxQMD - overlap);
theFTFP->SetMaxEnergy(emax);
}