Import Geant4 11.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2025-06-26 09:17:29 +02:00
parent 20a218bbe1
commit a499fb82e9
1941 changed files with 203285 additions and 95593 deletions
+7
View File
@@ -6,6 +6,13 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-06-16 Vladimir Ivanchenko (phys-builders-V11-03-00)
- G4HadronPHPBuilder - G4ParticleHPCapture and G4ParticleHPCaptureData are
substituted by G4NeutronRadCaptureHP and G4NeutronHPCaptureData. The
first allows using full list of updated PhotonEvaporation data set, the
second is only change of the name, the data are the same. Fixed
problem report #2660.
## 2023-10-19 Jean-Christophe David (phys-builders-V11-01-03)
- G4HadronicBuilder: added two methods - BuildINCLXX and BuildAntiLightIonsINCLXX.
@@ -40,14 +40,14 @@
#include "G4ParticleHPInelasticData.hh"
#include "G4ParticleHPFission.hh"
#include "G4ParticleHPFissionData.hh"
#include "G4ParticleHPCapture.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4NeutronRadCaptureHP.hh"
#include "G4NeutronHPCaptureData.hh"
class G4NeutronPHPBuilder : public G4VNeutronBuilder
{
public:
G4NeutronPHPBuilder();
virtual ~G4NeutronPHPBuilder() {}
~G4NeutronPHPBuilder() override = default;
public:
virtual void Build(G4HadronElasticProcess * aP) final override;
@@ -89,8 +89,8 @@ class G4NeutronPHPBuilder : public G4VNeutronBuilder
G4ParticleHPInelasticData * theHPInelasticData;
G4ParticleHPFission * theHPFission;
G4ParticleHPFissionData * theHPFissionData;
G4ParticleHPCapture * theHPCapture;
G4ParticleHPCaptureData * theHPCaptureData;
G4NeutronRadCaptureHP* theHPCapture;
G4NeutronHPCaptureData* theHPCaptureData;
};
@@ -76,10 +76,10 @@ Build(G4NeutronFissionProcess * aP)
void G4NeutronPHPBuilder::
Build(G4NeutronCaptureProcess * aP)
{
if(theHPCapture==0) theHPCapture = new G4ParticleHPCapture;
if (theHPCapture==nullptr) theHPCapture = new G4NeutronRadCaptureHP;
theHPCapture->SetMinEnergy(theMin);
theHPCapture->SetMaxEnergy(theMax);
if(theHPCaptureData==0) theHPCaptureData = new G4ParticleHPCaptureData;
if(theHPCaptureData==0) theHPCaptureData = new G4NeutronHPCaptureData;
aP->AddDataSet(theHPCaptureData);
aP->RegisterMe(theHPCapture);
}
@@ -6,6 +6,48 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-06-22 Vladimir Ivanchenko (phys-ctor-em-V11-03-08)
- G4EmDNABuilder - fixed upper energy limit for ionisation of hydrogen.
## 2025-06-20 Vladimir Ivanchenko (phys-ctor-em-V11-03-07)
- G4EmDNABuilder - fixed enegy limits for excitation model for light ions,
for increase/decrease models. This modification provides a correct
printout and does not change any DNA physics result.
## 2025-06-13 Vladimir Ivanchenko (phys-ctor-em-V11-03-06)
- G4EmDNABuilder - fixed upper limit of energy increase/decrease processes,
they should the same as for ionisation and excitation processes
## 2025-06-05 Vladimir Ivanchenko (phys-ctor-em-V11-03-05)
- G4EmDNABuilder - for opt8 configuration use the same configuration of
models for e- and protons as in opt2.
- in all DNA constructors the upper limit for DNA models for ions is set
to 300 MeV instead of 400 MeV.
## 2025-05-25 Vladimir Ivanchenko (phys-ctor-em-V11-03-04)
- G4GeneralGammaProcess - updated destructor according to modification in
electromagnetic/utils
## 2025-05-22 Sebastien Incerti (phys-ctor-em-V11-03-03)
- G4EmDNABuilder - replaced G4DNABornIonisationModel by
G4DNABornIonisationModel1 for proton ionisation
## 2025-05-21 Vladimir Ivanchenko (phys-ctor-em-V11-03-02)
- G4EmDNAPhysics_option6 - disable "fast" flag in order to have comparisons
with Opt4 in the same set of general DNA parameters.
- G4EmDNAPhysics_stationary_X constructor - added disclaimer saying that
these constructors are obsolete.
## 2025-02-12 Vladimir Ivanchenko (phys-ctor-em-V11-03-01)
- G4EmDNABuilder - use new version of Born ionisation model.
## 2025-02-12 Vladimir Ivanchenko (phys-ctor-em-V11-03-00)
- G4EmDNABuilder, G4EmDNAPhysicsActivator - introduce usage of the new ion
ionisation model in DNA Opt8 physics configuration
- G4EmDNAPhysics, G4EmDNAPhysics_option2, G4EmDNAPhysics_option4,
G4EmDNAPhysics_option6, G4EmDNAPhysics_option8 - update interface to
G4EmDNABuilder.
## 2024-10-18 Vladimir Ivanchenko (phys-ctor-em-V11-02-12)
- G4EmStandardPhysics_option3 - return back positron annihilation lost in
previous MR.
@@ -83,7 +83,7 @@ public:
const G4Region* reg = nullptr);
static void ConstructDNAIonPhysics(const G4double emax,
const G4bool stationary,
const G4int opt,
const G4Region* reg = nullptr);
static void ConstructDNALightIonPhysics(G4ParticleDefinition* part,
@@ -91,6 +91,7 @@
#include "G4DNASancheExcitationModel.hh"
#include "G4DNAEmfietzoglouIonisationModel.hh"
#include "G4DNACPA100IonisationModel.hh"
#include "G4DNABornIonisationModel.hh"
#include "G4DNABornIonisationModel1.hh"
#include "G4DNAMeltonAttachmentModel.hh"
#include "G4DNAIonElasticModel.hh"
@@ -98,6 +99,8 @@
#include "G4DNABornExcitationModel.hh"
#include "G4DNARuddIonisationModel.hh"
#include "G4DNARuddIonisationExtendedModel.hh"
#include "G4DNARuddIonisationDynamicModel.hh"
#include "G4DNAGeneralIonIonisationModel.hh"
#include "G4DNADingfelderChargeDecreaseModel.hh"
#include "G4DNADingfelderChargeIncreaseModel.hh"
#include "G4DNARPWBAExcitationModel.hh"
@@ -106,6 +109,8 @@
static const G4double lowEnergyRPWBA = 100*CLHEP::MeV;
static const G4double lowEnergyMSC = 1*CLHEP::MeV;
static const G4double lowEnergyProtonIoni = 2*CLHEP::MeV;
static const G4double highEnergyMillerGrean = 0.5*CLHEP::MeV;
static const G4double highEnergyChargeExchange = 100*CLHEP::MeV;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -314,7 +319,7 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
G4double emaxT = 7.4*CLHEP::eV;
// limit for CPA100 models
G4double emaxCPA100 = 250*CLHEP::keV;
if(4 == opt) {
if (4 == opt || 8 == opt) {
emaxE = 10.*CLHEP::keV;
emaxT = 10.*CLHEP::eV;
} else if(5 < opt) {
@@ -329,9 +334,9 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
// *** Elastic scattering ***
auto pElasticProcess = FindOrBuildElastic(part, "e-_G4DNAElastic");
G4VEmModel* elast = nullptr;
G4VEmModel* elast;
G4VEmModel* elast2 = nullptr;
if(4 == opt) {
if(4 == opt || 8 == opt) {
elast = new G4DNAUeharaScreenedRutherfordElasticModel();
} else if(5 < opt) {
auto mod = new G4DNACPA100ElasticModel();
@@ -359,7 +364,7 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
modE->SelectStationary(stationary);
modE->SetHighEnergyLimit(emaxE);
}
G4VEmModel* modB = nullptr;
G4VEmModel* modB;
G4VEmModel* modB2 = nullptr;
if(6 == opt) {
auto mod = new G4DNACPA100ExcitationModel();
@@ -392,21 +397,16 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
modE->SelectStationary(stationary);
modE->SetHighEnergyLimit(emaxE);
}
G4VEmModel* modI = nullptr;
G4VEmModel* modI;
G4VEmModel* modI2 = nullptr;
if(6 == opt) {
if (6 == opt) {
auto mod = new G4DNACPA100IonisationModel();
mod->SelectStationary(stationary);
mod->SelectFasterComputation(fast);
modI = mod;
auto mod1 = new G4DNABornIonisationModel();
mod1->SelectStationary(stationary);
modI2 = mod1;
modI2 = new G4DNABornIonisationModel1();
} else {
auto mod = new G4DNABornIonisationModel1();
mod->SelectStationary(stationary);
mod->SelectFasterComputation(fast);
modI = mod;
modI = new G4DNABornIonisationModel1();
}
modI->SetLowEnergyLimit(emaxE);
modI->SetHighEnergyLimit(emaxDNA);
@@ -446,6 +446,8 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
G4EmParameters* param = G4EmParameters::Instance();
const G4double emax = param->MaxKinEnergy();
G4ParticleDefinition* part = G4Proton::Proton();
G4double e2DNA = (8 == opt) ?
std::min(lowEnergyRPWBA, emax) : std::min(e1DNA, lowEnergyRPWBA);
// *** Elastic scattering ***
auto pElasticProcess = FindOrBuildElastic(part, "proton_G4DNAElastic");
@@ -455,7 +457,6 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
pElasticProcess->AddEmModel(-1, modE, reg);
// *** Excitation ***
G4double e2DNA = std::min(e1DNA, lowEnergyRPWBA);
auto theDNAExc = FindOrBuildExcitation(part, "proton_G4DNAExcitation");
auto modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SetHighEnergyLimit(e2DNA);
@@ -479,28 +480,24 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
// *** Ionisation ***
auto theDNAIoni = FindOrBuildIonisation(part, "proton_G4DNAIonisation");
G4VEmModel* modRI = nullptr;
if(2 == opt) {
auto mod = new G4DNARuddIonisationExtendedModel();
mod->SelectStationary(stationary);
modRI = mod;
G4VEmModel* modRI;
if (2 == opt) {
modRI = new G4DNARuddIonisationExtendedModel();
} else if (8 == opt) {
modRI = new G4DNARuddIonisationDynamicModel();
} else {
auto mod = new G4DNARuddIonisationModel();
mod->SelectStationary(stationary);
modRI = mod;
modRI = new G4DNARuddIonisationModel();
}
modRI->SetHighEnergyLimit(e1DNA);
modRI->SetHighEnergyLimit(e2DNA);
theDNAIoni->AddEmModel(-1, modRI, reg);
if(e2DNA < lowEnergyRPWBA) {
auto modI = new G4DNABornIonisationModel1();
modI->SelectFasterComputation(fast);
modI->SelectStationary(stationary);
if (e2DNA < lowEnergyRPWBA) {
G4VEmModel* modI = new G4DNABornIonisationModel1();
modI->SetLowEnergyLimit(e2DNA);
modI->SetHighEnergyLimit(lowEnergyRPWBA);
theDNAIoni->AddEmModel(-2, modI, reg);
}
if(lowEnergyRPWBA < emaxIonDNA) {
if (lowEnergyRPWBA < emaxIonDNA) {
auto modJ = new G4DNARPWBAIonisationModel();
modJ->SelectFasterComputation(fast);
modJ->SelectStationary(stationary);
@@ -515,25 +512,26 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
auto modDCD = new G4DNADingfelderChargeDecreaseModel();
modDCD->SelectStationary(stationary);
modDCD->SetLowEnergyLimit(0.0);
modDCD->SetHighEnergyLimit(emax);
modDCD->SetHighEnergyLimit(highEnergyChargeExchange);
theDNAChargeDecreaseProcess->AddEmModel(-1, modDCD, reg);
FindOrBuildCapture(0.1*CLHEP::keV, part);
// *** Tracking cut ***
G4double cut = (8 == opt) ? 0.05*CLHEP::keV : 1*CLHEP::keV;
FindOrBuildCapture(cut, part);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void
G4EmDNABuilder::ConstructDNAIonPhysics(const G4double emaxIonDNA,
const G4bool stationary,
const G4int opt,
const G4Region* reg)
{
G4ParticleDefinition* part = G4GenericIon::GenericIon();
// *** Ionisation ***
auto theDNAIoni = FindOrBuildIonisation(part, "GenericIon_G4DNAIonisation");
auto mod = new G4DNARuddIonisationExtendedModel();
mod->SelectStationary(stationary);
G4VEmModel* mod = new G4DNAGeneralIonIonisationModel();
mod->SetHighEnergyLimit(emaxIonDNA);
theDNAIoni->AddEmModel(-1, mod, reg);
@@ -541,7 +539,8 @@ G4EmDNABuilder::ConstructDNAIonPhysics(const G4double emaxIonDNA,
FindOrBuildNuclearStopping(part, CLHEP::MeV);
// *** Tracking cut ***
FindOrBuildCapture(1*CLHEP::keV, part);
G4double cut = (8 == opt) ? 0.05*CLHEP::keV : 1*CLHEP::keV;
FindOrBuildCapture(cut, part);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -555,9 +554,13 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
const G4bool stationary,
const G4Region* reg)
{
G4EmParameters* param = G4EmParameters::Instance();
const G4double emax = param->MaxKinEnergy();
const G4String& name = part->GetParticleName();
G4double elim1 = emaxIonDNA;
G4double elim2 = emaxIonDNA;
if (part->GetParticleName() == "hydrogen") {
elim1 = highEnergyMillerGrean;
elim2 = highEnergyChargeExchange;
}
// *** Elastic ***
auto theDNAElastic = FindOrBuildElastic(part, name + "_G4DNAElastic");
@@ -571,23 +574,21 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
auto modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SelectStationary(stationary);
modMGE->SetLowEnergyLimit(0.0);
modMGE->SetHighEnergyLimit(emaxIonDNA);
modMGE->SetHighEnergyLimit(elim1);
theDNAExc->AddEmModel(-1, modMGE, reg);
// *** Ionisation ***
auto theDNAIoni = FindOrBuildIonisation(part, name + "_G4DNAIonisation");
G4VEmModel* modRI = nullptr;
if(2 == opt) {
auto mod = new G4DNARuddIonisationExtendedModel();
mod->SelectStationary(stationary);
modRI = mod;
G4VEmModel* modRI;
if (2 == opt) {
modRI = new G4DNARuddIonisationExtendedModel();
} else if (8 == opt) {
modRI = new G4DNARuddIonisationDynamicModel();
} else {
auto mod = new G4DNARuddIonisationModel();
mod->SelectStationary(stationary);
modRI = mod;
modRI = new G4DNARuddIonisationModel();
}
modRI->SetHighEnergyLimit(emaxIonDNA);
theDNAIoni->AddEmModel(-1, modRI, reg);
modRI->SetHighEnergyLimit(elim2);
theDNAIoni->AddEmModel(-2, modRI, reg);
// *** Charge increase ***
if(2 > charge) {
@@ -596,7 +597,7 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
auto modDCI = new G4DNADingfelderChargeIncreaseModel();
modDCI->SelectStationary(stationary);
modDCI->SetLowEnergyLimit(0.0);
modDCI->SetHighEnergyLimit(emax);
modDCI->SetHighEnergyLimit(elim2);
theDNAChargeIncrease->AddEmModel(-1, modDCI, reg);
}
@@ -607,12 +608,13 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
auto modDCD = new G4DNADingfelderChargeDecreaseModel();
modDCD->SelectStationary(stationary);
modDCD->SetLowEnergyLimit(0.0);
modDCD->SetHighEnergyLimit(emax);
modDCD->SetHighEnergyLimit(elim2);
theDNAChargeDecrease->AddEmModel(-1, modDCD, reg);
}
// *** Tracking cut ***
FindOrBuildCapture(1*CLHEP::keV, part);
G4double cut = (8 == opt) ? 0.05*CLHEP::keV : 1*CLHEP::keV;
FindOrBuildCapture(cut, part);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -98,7 +98,7 @@ void G4EmDNAPhysics::ConstructProcess()
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 400.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -119,7 +119,7 @@ void G4EmDNAPhysics::ConstructProcess()
// DNA physics
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 0, fast, st);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 0, fast, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, 0);
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxIonDNA, fast, st);
@@ -170,7 +170,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
DeactivateHadronProcesses(prot, emaxIonDNA, emax, reg);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, opt, fast, st, reg);
DeactivateIonProcesses(gion, emaxIonDNA, emax, reg);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st, reg);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, opt, reg);
DeactivateIonProcesses(alpha2, emaxLightIonDNA, emax, reg);
G4EmDNABuilder::ConstructDNALightIonPhysics(alpha2, 2, opt, emaxLightIonDNA, fast, st, reg);
DeactivateHadronProcesses(alpha1, emaxLightIonDNA, emax, reg);
@@ -62,7 +62,7 @@ void G4EmDNAPhysics_option2::ConstructProcess()
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 400.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -83,7 +83,7 @@ void G4EmDNAPhysics_option2::ConstructProcess()
// DNA physics
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 2, fast, st);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 2, fast, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, 2);
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 2, emaxIonDNA, fast, st);
@@ -59,7 +59,7 @@ void G4EmDNAPhysics_option4::ConstructProcess()
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 400.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -80,7 +80,7 @@ void G4EmDNAPhysics_option4::ConstructProcess()
// DNA physics
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 4, fast, st);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 4, fast, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, 4);
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 4, emaxIonDNA, fast, st);
@@ -61,7 +61,7 @@ G4EmDNAPhysics_option6::G4EmDNAPhysics_option6(G4int ver, const G4String& nam)
: G4EmDNAPhysics(ver, nam)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAFast(true);
param->SetDNAFast(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -72,7 +72,7 @@ void G4EmDNAPhysics_option6::ConstructProcess()
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 400.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -93,7 +93,7 @@ void G4EmDNAPhysics_option6::ConstructProcess()
// DNA physics
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 6, fast, st);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 6, fast, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, 6);
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 6, emaxIonDNA, fast, st);
@@ -49,10 +49,7 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option8);
G4EmDNAPhysics_option8::G4EmDNAPhysics_option8(G4int ver, const G4String& nam)
: G4EmDNAPhysics(ver, nam)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAFast(true);
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -62,7 +59,7 @@ void G4EmDNAPhysics_option8::ConstructProcess()
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 400.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -83,7 +80,7 @@ void G4EmDNAPhysics_option8::ConstructProcess()
// DNA physics
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 8, fast, st);
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 8, fast, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, 8);
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 8, emaxIonDNA, fast, st);
@@ -39,9 +39,11 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option2);
G4EmDNAPhysics_stationary_option2::G4EmDNAPhysics_stationary_option2(G4int ver, const G4String& nam)
: G4EmDNAPhysics_option2(ver, nam)
{
G4cout << "!!! G4EmDNAPhysics_stationary_option2 physics constructor is instantiated." << G4endl;
G4cout << " This constructor is obsolete and will be removed in the next major Geant4 release."
<< G4endl;
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAStationary(true);
param->SetDNAFast(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,6 +39,9 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option4);
G4EmDNAPhysics_stationary_option4::G4EmDNAPhysics_stationary_option4(G4int ver, const G4String& nam)
: G4EmDNAPhysics_option4(ver, nam)
{
G4cout << "!!! G4EmDNAPhysics_stationary_option4 physics constructor is instantiated." << G4endl;
G4cout << " This constructor is obsolete and will be removed in the next major Geant4 release."
<< G4endl;
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAStationary(true);
}
@@ -36,6 +36,9 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary_option6);
G4EmDNAPhysics_stationary_option6::G4EmDNAPhysics_stationary_option6(G4int ver, const G4String& nam)
: G4EmDNAPhysics_option6(ver, nam)
{
G4cout << "!!! G4EmDNAPhysics_stationary_option6 physics constructor is instantiated." << G4endl;
G4cout << " This constructor is obsolete and will be removed in the next major Geant4 release."
<< G4endl;
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAStationary(true);
}
@@ -100,12 +100,7 @@ G4GammaGeneralProcess::G4GammaGeneralProcess(const G4String& pname):
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4GammaGeneralProcess::~G4GammaGeneralProcess()
{
if(isTheMaster) {
delete theHandler;
theHandler = nullptr;
}
}
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-12-10 Douglas M Wright (phys-ctor-glnuclear-V11-03-00)
- G4EmExtraPhysics removed LEND photonuclear, is now done in G4HadronPhysicsLEND
## 2024-10-28 Alexei Sytov (phys-ctor-glnuclear-V11-02-01)
- Added new physics G4CoherentPairProductionPhysics related to the process
G4CoherentPairProduction of coherent pair production by
@@ -35,6 +35,8 @@
// 19.06.2006 V.Ivanchenko add mu-nuclear process
// 16.10.2012 A.Ribon: renamed G4EmExtraBertiniPhysics as G4EmExtraPhysics
// 31.01.2018 V. Grichine: add neutrino-electron process and xsc
// 19.11.2024 D.M.Wright: Removed function ConstructLENDGammaNuclear since
// its functionality was moved to G4HadronPhysicsLEND
//
//----------------------------------------------------------------------------
//
@@ -87,9 +89,6 @@ private:
void ConstructGammaElectroNuclear();
void ConstructLENDGammaNuclear(G4CascadeInterface* cascade,
G4HadronInelasticProcess* gnuc);
G4bool gnActivated{true};
G4bool eActivated{true};
G4bool gLENDActivated{false};
@@ -51,6 +51,7 @@ geant4_module_link_libraries(G4phys_ctor_glnuclear
G4phys_builders
G4phys_ctor_em
G4phys_ctor_factory
G4phys_ctor_hinelastic
G4procman
G4parameterisation
G4geometrymng
@@ -40,6 +40,10 @@
// 29.01.2018 V.Grichine, adding neutrinos
// 07.05.2019 V.Grichine, adding muon neutrino nucleus interactions
// 03.11.2022 V. Grichne update for tau-neutrino nucleus processes
// 19.11.2024 D.M.Wright: Removed function ConstructLENDGammaNuclear since
// its functionality was moved to G4HadronPhysicsLEND
// Also fiedx bug that prevented LEND photonuclear process
// when G4GammaGeneralProcess was present
//
///////////////////////////////////////////////////////////////
@@ -74,8 +78,7 @@
#include "G4CascadeInterface.hh"
#include "G4LowEGammaNuclearModel.hh"
#include "G4LENDorBERTModel.hh"
#include "G4LENDCombinedCrossSection.hh"
#include "G4HadronPhysicsLEND.hh" // used to access const maxLEND_Energy
#include "G4GammaConversionToMuons.hh"
#include "G4AnnihiToMuPair.hh"
@@ -333,13 +336,12 @@ void G4EmExtraPhysics::ConstructGammaElectroNuclear()
auto gproc =
dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
// LEND may be activated if the general process is not activated
if (gproc != nullptr) {
gproc->AddHadProcess(gnuc);
} else {
ph->RegisterProcess(gnuc, G4Gamma::Gamma());
if (gLENDActivated) { ConstructLENDGammaNuclear(cascade, gnuc); }
}
if (gLENDActivated) cascade->SetMinEnergy(maxLEND_Energy - overlapLEND_Energy);
if (eActivated) {
auto enuc = new G4ElectronNuclearProcess();
@@ -352,23 +354,3 @@ void G4EmExtraPhysics::ConstructGammaElectroNuclear()
ph->RegisterProcess(pnuc, G4Positron::Positron());
}
}
void G4EmExtraPhysics::ConstructLENDGammaNuclear(
G4CascadeInterface* cascade, G4HadronInelasticProcess* gnuc)
{
if (G4FindDataDir("G4LENDDATA") == nullptr ) {
G4String message = "\n Skipping activation of Low Energy Nuclear Data (LEND) model for gamma nuclear interactions.\n The LEND model needs data files and they are available from ftp://gdo-nuclear.ucllnl.org/GND_after2013/GND_v1.3.tar.gz.\n Please set the environment variable G4LENDDATA to point to the directory named v1.3 extracted from the archive file.\n";
G4Exception( "G4EmExtraPhysics::ConstructLENDGammaNuclear()"
, "G4LENDBertiniGammaElectroNuclearBuilder001"
, JustWarning , message);
return;
}
cascade->SetMinEnergy(19.9*MeV);
auto theLowE = new G4LENDorBERTModel( G4Gamma::Gamma() );
theLowE->DumpLENDTargetInfo(true);
theLowE->SetMaxEnergy(20*MeV);
gnuc->RegisterMe(theLowE);
auto theXSLowE = new G4LENDCombinedCrossSection( G4Gamma::Gamma() );
gnuc->AddDataSet(theXSLowE);
}
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-04-15 Vladimir Ivanchenko (phys-ctor-helastic-V11-03-00)
- G4ChargeExchangePhysics - fixed usage of the messenger
## 2024-07-03 Robert Hatcher (phys-ctor-helastic-V11-02-00)
- Add self registration of G4ThermalNeutrons with the constructor factory
@@ -41,11 +41,13 @@
#include "globals.hh"
#include "G4VPhysicsConstructor.hh"
class G4ChargeExchangeMessenger;
class G4ChargeExchangePhysics : public G4VPhysicsConstructor
{
public:
explicit G4ChargeExchangePhysics(G4int ver = 1);
~G4ChargeExchangePhysics() override = default;
~G4ChargeExchangePhysics() override;
void ConstructParticle() override;
@@ -61,6 +63,8 @@ public:
private:
G4ChargeExchangeMessenger* theMessenger;
G4double fLowEnergyLimit;
G4double fXSFactor{1.0};
};
@@ -54,6 +54,7 @@
#include "G4KaonZeroLong.hh"
#include "G4HadronicParameters.hh"
#include "G4HadronInelasticProcess.hh"
#include "G4ChargeExchangeMessenger.hh"
#include "G4SystemOfUnits.hh"
// factory
@@ -67,12 +68,18 @@ G4ChargeExchangePhysics::G4ChargeExchangePhysics(G4int ver)
{
// because it is an addition, the type of this constructor is 0
G4HadronicParameters::Instance()->SetVerboseLevel(ver);
theMessenger = new G4ChargeExchangeMessenger(this);
if (ver > 1) {
G4cout << "### ChargeExchangePhysics above "
<< fLowEnergyLimit/CLHEP::GeV << " GeV." << G4endl;
}
}
G4ChargeExchangePhysics::~G4ChargeExchangePhysics()
{
delete theMessenger;
}
void G4ChargeExchangePhysics::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
@@ -4,6 +4,14 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top). It must **not**
be used as a substitute for writing good git commit messages!
## 2025-06-13 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-01)
- G4HadrocPhysicsQBBC - disable General Neutron Process, which address problem reports
#2558 and #2559
## 2024-12-10 Douglas M Wright(phys-ctor-hinelastic-V11-03-00)
- Add G4HadronPhysicsLEND to define neutron and photon induced processes from LEND
- G4HadronPhysicsShielding remove LEND neutron process, now down in class above
## 2024-11-08 Alberto Ribon (phys-ctor-hinelastic-V11-02-02)
- README : updated information for the coming release 11.3.
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// Description: Create all hadronic (neutron and photon) processes using LEND which is valid up to 20 MeV
//
// Author: Douglas M Wright, LLNL 2022-04-25
//
//----------------------------------------------------------------------------
//
#ifndef G4HadronPhysicsLEND_h
#define G4HadronPhysicsLEND_h 1
#include "G4VPhysicsConstructor.hh"
const G4double maxLEND_Energy = 20*CLHEP::MeV;
const G4double overlapLEND_Energy = 0.1*CLHEP::MeV;
class G4HadronPhysicsLEND : public G4VPhysicsConstructor
{
public:
G4HadronPhysicsLEND(G4int verbose =1, const G4String& eval="");
~G4HadronPhysicsLEND() override = default;
void ConstructProcess() override;
void ConstructParticle() override;
// copy constructor and hide assignment operator
G4HadronPhysicsLEND(G4HadronPhysicsLEND &) = delete;
G4HadronPhysicsLEND & operator =
(const G4HadronPhysicsLEND &right) = delete;
private:
G4String evaluation;
G4int verbose;
};
#endif
@@ -12,6 +12,7 @@ geant4_add_module(G4phys_ctor_hinelastic
G4HadronPhysicsFTFP_BERT_TRV.hh
G4HadronPhysicsFTFQGSP_BERT.hh
G4HadronPhysicsINCLXX.hh
G4HadronPhysicsLEND.hh
G4HadronPhysicsNuBeam.hh
G4HadronPhysicsQGS_BIC.hh
G4HadronPhysicsQGSP_BERT.hh
@@ -34,6 +35,7 @@ geant4_add_module(G4phys_ctor_hinelastic
G4HadronPhysicsFTFP_BERT_TRV.cc
G4HadronPhysicsFTFQGSP_BERT.cc
G4HadronPhysicsINCLXX.cc
G4HadronPhysicsLEND.cc
G4HadronPhysicsNuBeam.cc
G4HadronPhysicsQGS_BIC.cc
G4HadronPhysicsQGSP_BERT.cc
@@ -55,6 +57,10 @@ geant4_module_link_libraries(G4phys_ctor_hinelastic
G4run
PRIVATE
G4baryons
G4had_gamma_nuclear
G4phys_ctor_em
G4emutils
G4had_lend
G4had_fission
G4had_par_hp
G4had_preequ_exciton
@@ -86,7 +86,7 @@ G4HadronInelasticQBBC::G4HadronInelasticQBBC(G4int ver)
SetPhysicsType(bHadronInelastic);
auto param = G4HadronicParameters::Instance();
param->SetEnableBCParticles(true);
param->SetEnableNeutronGeneralProcess(true);
param->SetEnableNeutronGeneralProcess(false);
param->SetVerboseLevel(ver);
}
@@ -0,0 +1,132 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// Description: Create all hadronic (neutron and photon) processes using LEND which is valid up to 20 MeV
//
// Author: Douglas M Wright, LLNL 2022-04-25
//
//----------------------------------------------------------------------------
//
#include "G4HadronPhysicsLEND.hh"
#include "G4PhysListUtil.hh"
#include "G4NeutronBuilder.hh"
#include "G4NeutronLENDBuilder.hh"
#include "G4PhysicsListHelper.hh"
#include "G4LENDorBERTModel.hh"
//#include "G4LENDCombinedModel.hh"
#include "G4LENDCombinedCrossSection.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4GammaNuclearXS.hh"
#include "G4LossTableManager.hh"
#include "G4GammaGeneralProcess.hh"
#include "G4PhysicsConstructorFactory.hh"
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsLEND);
G4HadronPhysicsLEND::G4HadronPhysicsLEND(G4int verb, const G4String& eva)
: G4VPhysicsConstructor("hadron inelastic LEND")
{
verbose = verb;
evaluation = eva;
}
void G4HadronPhysicsLEND::ConstructProcess()
{
//....neutron-induced reactions
//....create neutron processes if they do not exist
if( G4PhysListUtil::FindInelasticProcess(G4Neutron::Neutron()) == nullptr ){
auto neutron_processes = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neutron_processes);
neutron_processes->Build();
}
//....get pointers to neutron processes so can add LEND model
auto* neutron_inelastic = (G4HadronInelasticProcess*)G4PhysListUtil::FindInelasticProcess( G4Neutron::Neutron() );
auto* neutron_capture = (G4NeutronCaptureProcess*)G4PhysListUtil::FindCaptureProcess( G4Neutron::Neutron() );
auto* neutron_fission = (G4NeutronFissionProcess*)G4PhysListUtil::FindFissionProcess( G4Neutron::Neutron() );
auto* neutronLENDBuilder = new G4NeutronLENDBuilder(evaluation);
neutronLENDBuilder->Build(neutron_inelastic);
neutronLENDBuilder->Build(neutron_capture);
neutronLENDBuilder->Build(neutron_fission);
//....photon-induced reactions
//....use gamma hadronic process if it exists
// check Inelastic process using G4PhysListUtil
// then check for GammaNuclear in G4GammaGeneralProcess
auto* gamma_inelastic = (G4HadronInelasticProcess*)G4PhysListUtil::FindInelasticProcess( G4Gamma::Gamma() );
if( gamma_inelastic == nullptr){
G4LossTableManager* emManager = G4LossTableManager::Instance();
auto gproc = dynamic_cast<G4GammaGeneralProcess*>(emManager->GetGammaGeneralProcess());
if (gproc != nullptr) {
G4HadronicProcess* gnuc = gproc->GetGammaNuclear();
if (gnuc != nullptr )
gamma_inelastic = (G4HadronInelasticProcess*)gnuc;
}
}
//....did not find existing process, so create photonuclear process
if( gamma_inelastic == nullptr){
//std::cout << "DMW: HadPhysLEND = gamma inelastic pointer not found\n";
gamma_inelastic = new G4HadronInelasticProcess( "photonNuclear", G4Gamma::Gamma() );
G4PhysicsListHelper* plHelper = G4PhysicsListHelper::GetPhysicsListHelper();
plHelper->RegisterProcess(gamma_inelastic, G4Gamma::Gamma());
//....need these XS or LENDonly crashes
auto xsreg = G4CrossSectionDataSetRegistry::Instance();
G4VCrossSectionDataSet* xs = nullptr;
xs = xsreg->GetCrossSectionDataSet("GammaNuclearXS");
if(nullptr == xs) xs = new G4GammaNuclearXS();
gamma_inelastic->AddDataSet(xs);
}
//....add LEND photonuclear models
auto* theGammaReactionLowE = new G4LENDorBERTModel( G4Gamma::Gamma() ); // checks if LEND has data for specified reaction
// (note uses G4LENDCombinedModel)
// if not, uses Bertini cascade
//auto* theGammaReactionLowE = new G4LENDCombinedModel( G4Gamma::Gamma() ); // uses LEND only
theGammaReactionLowE->SetMaxEnergy(maxLEND_Energy);
theGammaReactionLowE->DumpLENDTargetInfo(true);
gamma_inelastic->RegisterMe(theGammaReactionLowE);
G4LENDCombinedCrossSection* theGammaCrossSectionLowE = new G4LENDCombinedCrossSection( G4Gamma::Gamma() );
gamma_inelastic->AddDataSet(theGammaCrossSectionLowE);
}
void G4HadronPhysicsLEND::ConstructParticle()
{
G4Neutron::Neutron();
G4Gamma::Gamma();
}
@@ -33,12 +33,13 @@
//
// Modified:
//
// 2020.05.07 A.Ribon used the newly introduced G4HyperonBuilder
// 2019.08.01 A.Ribon replaced explicit numbers for the energy transition
// region with values taken from G4HadronicParameters
// 2014.08.05 K.L.Genser added provisions for modifing the Bertini to
// FTF transition energy region
//
// 2020.05.07 A.Ribon: Used the newly introduced G4HyperonBuilder
// 2019.08.01 A.Ribon: Replaced explicit numbers for the energy transition
// region with values taken from G4HadronicParameters
// 2014.08.05 K.L.Genser: Added provisions for modifing the Bertini to
// FTF transition energy region
// 2024.11.19 D.M.Wright: Removed LEND inelastic neutron model,
// is now done in G4HadronPhysicsLEND
//----------------------------------------------------------------------------
//
#include <iomanip>
@@ -82,7 +83,7 @@
#include "G4ParticleHPBGGNucleonInelasticXS.hh"
#include "G4ParticleHPJENDLHEInelasticData.hh"
#include "G4ParticleHPInelasticData.hh"
#include "G4NeutronLENDBuilder.hh"
#include "G4HadronPhysicsLEND.hh" // used to access const maxLEND_Energy
#include "G4BGGNucleonInelasticXS.hh"
#include "G4CrossSectionDataSetRegistry.hh"
@@ -119,7 +120,7 @@ G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name)
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4bool qe)
: G4HadronPhysicsFTFP_BERT(name, qe), useLEND_(false), evaluation_("")
{
minBERT_neutron = 19.9*CLHEP::MeV;
minBERT_neutron = maxLEND_Energy - overlapLEND_Energy;
}
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4int verb)
@@ -162,11 +163,7 @@ void G4HadronPhysicsShielding::Neutron()
bertneu->SetMaxEnergy(maxBERT_neutron);
bertneu->SetMinEnergy(minBERT_neutron);
neu->RegisterMe(bertneu);
if(useLEND_) {
auto hpneu = new G4NeutronLENDBuilder(evaluation_);
AddBuilder(hpneu);
neu->RegisterMe(hpneu);
} else {
if( ! useLEND_) {
auto hpneu = new G4NeutronPHPBuilder;
AddBuilder(hpneu);
neu->RegisterMe(hpneu);
@@ -6,7 +6,7 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-01-24 Igor Semeniouk (phys-ctor-limiters-V11-02-01)
## 2025-01-24 Igor Semeniouk (phys-ctor-limiters-V11-03-00)
- Fix adding AddBiasingProcessLimiter when parallel word for all not use
- Ignore G4GenericBiasingPhysics::XXXAddPDGRange if PDGlow > PDGhigh.
+15 -1
View File
@@ -6,7 +6,7 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-04-23 Alberto Ribon (phys-list-V11-02-04)
## 2025-04-23 Alberto Ribon (phys-lists-V11-03-03)
- FTFP_BERT_ATL : removed the special FTF tune for ATLAS (introduced in
phys-lists-V11-01-05 to overcome the problem of too optimistic (i.e. narrow)
pion shower energy resolution).
@@ -18,6 +18,20 @@ It must **not** be used as a substitute for writing good git commit messages!
or the UI command (before run-initialization):
/process/had/models/ftf/selectTuneByIndex 4
## 2025-04-15 Vladimir Ivanchenko (phys-list-V11-03-02)
- QBBC - added G4ChargeExchangePhysics
## 2025-03-03 Dmitri Konstantinov (phys-list-V11-03-01)
- G4PhysListFactory: Prevent fallback to default physics list
when an invalid name is provided. Now, if a user specifies an unknown physics list,
Geant4 will throw a fatal error instead of silently using FTFP_BERT.
This ensures that users are aware of incorrect configurations and
helps prevent unintended simulation results.
## 2024-12-10 Douglas M Wright (phys-list-V11-03-00)
- Shielding: Simplify logic tree for inelastic models
and move all LEND hadronic inelastic processes to G4HadronPhysicsLEND
## 2024-11-04 Vladimir Ivantchenko (phys-list-V11-02-03)
- G4PhysListFactory - use std::size_t
@@ -206,11 +206,13 @@ G4PhysListFactory::GetReferencePhysList(const G4String& name)
else if(had_name == "ShieldingM_HPT") {p = new Shielding(verbose,"HP","M");
p->RegisterPhysics(new G4ThermalNeutrons);}
else {
p = new FTFP_BERT(verbose);
G4ExceptionDescription ed;
ed << "PhysicsList " << had_name << " is not known;"
<< " the default FTFP_BERT is created";
G4Exception("G4PhysListFactory: ","pl0003",JustWarning,ed,"");
ed << "ERROR: The requested physics list " << had_name
<< " is NOT available in the Physics List Factory.\n"
<< "Please choose a valid physics list.\n";
G4Exception("G4PhysListFactory", "pl0003", FatalException, ed);
return nullptr;
}
if(nullptr != p) {
if(0 < em_opt && had_name != "LBE") {
+2
View File
@@ -88,6 +88,8 @@ QBBC::QBBC( G4int ver, const G4String&)
RegisterPhysics( new G4HadronInelasticQBBC(ver));
RegisterPhysics( new G4ChargeExchangePhysics(ver) );
// Neutron tracking cut
RegisterPhysics( new G4NeutronTrackingCut(ver) );
}
+40 -47
View File
@@ -42,6 +42,8 @@
// fragments
// 06.08.2019 A.Ribon: Replacing explicit values for the energy transition
// region with values from G4HadronicParameters
// 19.11.2024 D.M.Wright: Simplify logic tree for inelastic models and
// move LEND hadronic inelastic processes to G4HadronPhysicsLEND
//
//----------------------------------------------------------------------------
//
@@ -59,11 +61,12 @@
#include "G4IonElasticPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "G4HadronElasticPhysicsHP.hh"
#include "G4HadronElasticPhysicsLEND.hh"
#include "G4ParticleHPManager.hh"
#include "G4HadronElasticPhysicsLEND.hh"
#include "G4HadronPhysicsLEND.hh"
#include "G4HadronPhysicsShielding.hh"
#include "G4HadronPhysicsShieldingLEND.hh"
#include "G4HadronicParameters.hh"
#include <CLHEP/Units/SystemOfUnits.h>
@@ -97,12 +100,13 @@ Shielding::Shielding(G4int verbose, const G4String& n_model,
// EM Physics
RegisterPhysics( new G4EmStandardPhysics(verbose));
// Synchroton Radiation & GN Physics
// Synchroton Radiation & Gamma Nuclear Physics
G4EmExtraPhysics* emExtraPhysics = new G4EmExtraPhysics(verbose);
if ( LEN_model == "LEND" ) {
// Use LEND model for Gamma Nuclear
// Adjust energy bounds of gamma nuclear models from G4EmExtraPhysics
if ( LEN_model == "LEND" )
emExtraPhysics->LENDGammaNuclear(true);
}
RegisterPhysics( emExtraPhysics );
// Decays
@@ -110,16 +114,11 @@ Shielding::Shielding(G4int verbose, const G4String& n_model,
RegisterPhysics( new G4RadioactiveDecayPhysics(verbose) );
// Hadron Elastic scattering
if ( LEN_model == "HP" )
{
if ( LEN_model == "HP" ) {
RegisterPhysics( new G4HadronElasticPhysicsHP(verbose) );
}
else if ( LEN_model == "LEND" )
{
} else if ( LEN_model == "LEND" ) {
RegisterPhysics( new G4HadronElasticPhysicsLEND(verbose,evaluation));
}
else
{
} else {
if(verbose > 0) {
G4cout << "Shielding Physics List: Warning!" <<G4endl;
G4cout << "\"" << LEN_model
@@ -129,46 +128,40 @@ Shielding::Shielding(G4int verbose, const G4String& n_model,
RegisterPhysics( new G4HadronElasticPhysicsHP(verbose) );
}
// Hadron Physics = Bertini and FTF with HP or LEND
G4VPhysicsConstructor* hpc;
// Hadron Physics HP or LEND
G4String HadPhysName = "hInelastic Shielding";
if ( LEN_model == "LEND" ) HadPhysName += "LEND";
G4double HadPhysEmin, HadPhysEmax;
if (HadrPhysVariant == "M") {
// The variant "M" has a special, dedicated energy transition region
// between the string model and cascade model, therefore the recommended
// values from G4HadronicParameters are intentionally not used.
hpc = new G4HadronPhysicsShielding("hInelastic Shielding", verbose,
9.5*CLHEP::GeV, 9.9*CLHEP::GeV);
// The variant "M" has a special, dedicated energy transition region
// between the string model and cascade model, therefore the recommended
// values from G4HadronicParameters are intentionally not used.
HadPhysEmin = 9.5*CLHEP::GeV;
HadPhysEmax = 9.9*CLHEP::GeV;
} else {
hpc = new G4HadronPhysicsShielding("hInelastic Shielding", verbose,
G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade(),
G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade());
HadPhysEmin = G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade();
HadPhysEmax = G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade();
}
if ( LEN_model == "LEND" ) {
delete hpc;
if (HadrPhysVariant == "M") {
// The variant "M" has a special, dedicated energy transition region
// between the string model and cascade model, therefore the recommended
// values from G4HadronicParameters are intentionally not used.
hpc = new G4HadronPhysicsShieldingLEND("hInelastic ShieldingLEND", verbose,
9.5*CLHEP::GeV, 9.9*CLHEP::GeV);
} else {
hpc = new G4HadronPhysicsShieldingLEND("hInelastic ShieldingLEND", verbose,
G4HadronicParameters::Instance()->GetMinEnergyTransitionFTF_Cascade(),
G4HadronicParameters::Instance()->GetMaxEnergyTransitionFTF_Cascade());
}
} else {
//G4cout << "Shielding Physics List: Warning." <<G4endl;
//G4cout << "Name of Low Energy Neutron model " << LEN_model
// << " is invalid." <<G4endl;
//G4cout << "Will use neutron HP package." <<G4endl;
}
// N.B., G4HadronPhysicsShielding only builds neutron processes
hpc = new G4HadronPhysicsShielding(HadPhysName, verbose, HadPhysEmin, HadPhysEmax);
// Turn off HP low energy model defined by G4HadronPhysicsShielding
if ( LEN_model == "LEND" )
((G4HadronPhysicsShielding*)hpc)->UseLEND();
RegisterPhysics( hpc );
if ( LEN_model == "HP" ) {
//Activate prodcuton of fission fragments in neutronHP
G4ParticleHPManager::GetInstance()->SetProduceFissionFragments( true );
}
// Activate production of fission fragments in NeutronHP
if ( LEN_model == "HP" )
G4ParticleHPManager::GetInstance()->SetProduceFissionFragments( true );
// Add LEND processes (neutron and photon induced)
if ( LEN_model == "LEND" )
RegisterPhysics( new G4HadronPhysicsLEND(verbose, evaluation));
// Stopping Physics
RegisterPhysics( new G4StoppingPhysics(verbose) );