Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -6,13 +6,44 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-10-29 Vladimir Ivanchenko (phys-ctor-em-V11-03-15)
- G4OpticalPhysics - instantiate a process only if it is activated,
added option to instantiate a new G4GeneralCerenkov.
## 2025-10-27 Mihaly Novak (phys-ctor-em-V11-03-14)
- G4EmStandardPhysicsGS - update according to the changes in the GS MSC model,
the standard GS EM constructor is expected to provide accurate e-/e+
simulations now (similar accuracy as in Livermove, Penelope and option 4)
## 2025-09-10 Vladimir Ivanchenko (phys-ctor-em-V11-03-13)
- G4EmDNABuilder - use upper energy limits from G4EmParameters.
## 2025-07-25 Vladimir Ivanchenko (phys-ctor-em-V11-03-12)
- G4EmDNABuilder - restore usage of Born model of ionisation in the energy
interval 0.5 - 100 MeV.
## 2025-07-19 Vladimir Ivanchenko (phys-ctor-em-V11-03-11)
- G4EmDNAPhysics_option4, G4EmDNAPhysics_option6, G4EmDNAPhysics_option8
used fast option - a significant speed-up of physics.
## 2025-07-16 Soon Yung Jun (phys-ctor-em-V11-03-10)
- G4OpticalPhoton - add G4QuasiOpticalPhoton to support offloading of optical
photon generation
## 2025-07-16 Vladimir Ivanchenko (phys-ctor-em-V11-03-09)
- G4EmDNABuilder - used Rudd extended model for light ions in all physics
configurations instead of old Rudd model, which should improve CPU
performance; in opt8 configuration use the same models as in opt2 for
electrons; increased low-energy limit to 11 eV for the CPA100 elastic
scattering model
## 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.
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,
@@ -21,7 +52,7 @@ It must **not** be used as a substitute for writing good git commit messages!
## 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
- 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)
@@ -29,7 +60,7 @@ It must **not** be used as a substitute for writing good git commit messages!
electromagnetic/utils
## 2025-05-22 Sebastien Incerti (phys-ctor-em-V11-03-03)
- G4EmDNABuilder - replaced G4DNABornIonisationModel by
- G4EmDNABuilder - replaced G4DNABornIonisationModel by
G4DNABornIonisationModel1 for proton ionisation
## 2025-05-21 Vladimir Ivanchenko (phys-ctor-em-V11-03-02)
@@ -89,7 +120,7 @@ It must **not** be used as a substitute for writing good git commit messages!
annihilation on fly with 3-gamma annihilation channel enabled.
## 2024-05-04 Vladimir Ivanchenko (phys-ctor-em-V11-02-05)
- G4GammaGeneralProcess - updated according to change in EM data tables
- G4GammaGeneralProcess - updated according to change in EM data tables
## 2024-04-05 Vladimir Ivanchenko (phys-ctor-em-V11-02-04)
- G4EmDNABuilder - added nuclear stopping process for G4GenericIon below 1 MeV/u.
@@ -134,7 +165,7 @@ It must **not** be used as a substitute for writing good git commit messages!
for protons in order to have under control results of various tests.
## 2023-07-19 Vladimir Ivanchenko (phys-ctor-em-V11-01-08)
- G4EmDNABuilder - for Opt2, 4, 6 use for protons and ions
- G4EmDNABuilder - for Opt2, 4, 6 use for protons and ions
G4DNARuddIonisationExtendedModel from zero to 100 MeV; ion capture
limit is set to 0.1 keV.
@@ -149,7 +180,7 @@ It must **not** be used as a substitute for writing good git commit messages!
- G4EmParticleList - added method EmChargedPartNames(), which returns a minimal
list of charged EM particles
- G4EmModelActivator - fix #2530 - single scattering per region is implemented
by addition of extra sngle scattering process, which is active inside this
by addition of extra sngle scattering process, which is active inside this
region, and not active outside; multiple scattering and single scattering
processes for a given charged particle are disabled to this region
@@ -160,7 +191,7 @@ It must **not** be used as a substitute for writing good git commit messages!
- G4GammaGeneralProcess - added method GetGammaNuclear() useful for testing
## 2023-02-21 Vladimir Ivanchenko (phys-ctor-em-V11-01-02)
- G4EmBuilder, G4EmStandardPhysicsSS - use new constructor for
- G4EmBuilder, G4EmStandardPhysicsSS - use new constructor for
the G4CoulombScattering process
- G4EmModelActivator - use new constructor for the G4CoulombScattering process,
allow add G4EmStandardPhysicsSS on top of G4EmStandardPhysics_option3
@@ -176,7 +207,7 @@ It must **not** be used as a substitute for writing good git commit messages!
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
## 2022-11-15 Vladimir Ivanchenko (phys-ctor-em-V11-00-34)
- G4EmBuilder - added G4AntiLambda and G4PionZero to the minimal
- G4EmBuilder - added G4AntiLambda and G4PionZero to the minimal
EM particle list to avoid warnings issued due to new hypernuclei
## 2022-11-08 Vladimir Ivanchenko (phys-ctor-em-V11-00-33)
@@ -187,7 +218,7 @@ It must **not** be used as a substitute for writing good git commit messages!
- G4EmBuilder - added e- and mu- neutrino and anti-neutrino to
the minimal EM particle list
- G4EmDNABuilder - added minimal list of EM standard particles
to all DNA physics variants, this allowing enable radioactive
to all DNA physics variants, this allowing enable radioactive
decay, provides correct printout of EM processes and models,
and fix problem #2412
@@ -200,7 +231,7 @@ It must **not** be used as a substitute for writing good git commit messages!
- G4EmDNABuilder - introduced const upper limit 1 MeV for DNA
models; introduced const upper limit 2 MeV for standard
low-energy ionisation; use the same upper limit for DNA
excitation and ionisation
excitation and ionisation
## 2022-09-05 Ben Morgan (phys-ctor-em-V11-00-29)
- Update public/private dependencies for consistency
@@ -214,21 +245,21 @@ It must **not** be used as a substitute for writing good git commit messages!
## 2022-07-06 Vladimir Ivanchenko (phys-ctor-em-V11-00-26)
- G4GammaGeneralProcess - fixed problem of Compton scattering selection
in the low energy interval < 150 keV identified in test67; apply
spline interpolation for tables at low energy (<150 keV) and at
high energy (> 100 MeV)
spline interpolation for tables at low energy (<150 keV) and at
high energy (> 100 MeV)
## 2022-06-17 Vladimir Ivanchenko (phys-ctor-em-V11-00-25)
- G4EmStandardPhysics_option4 - use Penelope ionisation model for e-
- G4EmStandardPhysics_option4 - use Penelope ionisation model for e-
below 100 keV
## 2022-06-05 Vladimir Ivanchenko (phys-ctor-em-V11-00-24)
- G4EmBuilder - use check on process sub-type, do not substitute
G4CoupledTransportation with G4TransportationWithMsc
G4CoupledTransportation with G4TransportationWithMsc
## 2022-05-27 Vladimir Ivanchenko (phys-ctor-em-V11-00-23)
- G4EmLivermorePhysics, G4EmPenelopePhysics, G4EmStandardPhysics_option4,
G4EmStandardPhysics_option3, G4EmStandardPhysics - selection of the
model of energy loss fluctuation is inside processes of ionisation
G4EmStandardPhysics_option3, G4EmStandardPhysics - selection of the
model of energy loss fluctuation is inside processes of ionisation
according to the type defined in G4EmParameters
## 2022-05-24 Vladimir Ivanchenko (phys-ctor-em-V11-00-22)
@@ -240,9 +271,9 @@ It must **not** be used as a substitute for writing good git commit messages!
- GNUmakefile, source.cmake - updated list of sub-libraries and includes
## 2022-05-16 Vladimir Ivanchenko (phys-ctor-em-V11-00-20)
- G4EmLivermorePhysics, G4EmPenelopePhysics, G4EmStandardPhysicsSS - use
- G4EmLivermorePhysics, G4EmPenelopePhysics, G4EmStandardPhysicsSS - use
G4LinhardSorensenIonModel for GenericIon
- G4EmStandardPhysics, G4EmStandardPhysics_option3,
- G4EmStandardPhysics, G4EmStandardPhysics_option3,
G4EmStandardPhysics_option4 - use G4GammaGeneralProcess by default
## 2022-05-11 Jonas Hahnfeld (phys-ctor-em-V11-00-19)
@@ -262,19 +293,19 @@ It must **not** be used as a substitute for writing good git commit messages!
- GNUmakefile, source.cmake - updated according to really used sub-libraries
## 2022-04-22 Vladimir Ivanchenko (phys-ctor-em-V11-00-14)
- G4EmDNABuilder, G4EmDNAPhysicsActivator, and DNA constructors - updated
configuration for Opt2
- G4EmDNABuilder, G4EmDNAPhysicsActivator, and DNA constructors - updated
configuration for Opt2
## 2022-04-19 Jonas Hahnfeld (phys-ctor-em-V11-00-13)
- Honor option to enable `G4TransportationWithMsc`
- Enable by default in `G4EmStandardPhysics_option1`
## 2022-04-05 Vladimir Ivanchenko (phys-ctor-em-V11-00-12)
- G4EmDNABuilder, G4EmDNAPhysicsActivator - fixed Opt4 and Opt5
- G4EmDNABuilder, G4EmDNAPhysicsActivator - fixed Opt4 and Opt5
configurations according to prescription
## 2022-04-05 Vladimir Ivanchenko (phys-ctor-em-V11-00-11)
- G4EmDNABuilder, G4EmDNAPhysicsActivator - fixed instantiation
- G4EmDNABuilder, G4EmDNAPhysicsActivator - fixed instantiation
of DNA elastic scattering and ionisation for e-
## 2022-03-28 Vladimir Ivanchenko (phys-ctor-em-V11-00-10)
@@ -282,13 +313,13 @@ It must **not** be used as a substitute for writing good git commit messages!
## 2022-03-24 Vladimir Ivanchenko (phys-ctor-em-V11-00-09)
- G4EmDNABuilder, G4EmDNAPhysicsActivator - make consistent
configuration of DNA physics on top of standard physics
configuration of DNA physics on top of standard physics
## 2022-03-15 Hoang Tran (phys-ctor-em-V11-00-08)
- add SBS and IRT_syn models in G4EmDNAChemistry_option3
## 2022-03-10 Vladimir Ivanchenko (phys-ctor-em-V11-00-07)
- G4EmDNABuilder - added extra utility methods to find or to build
- G4EmDNABuilder - added extra utility methods to find or to build
electron processes
- G4EmDNAPhysics_option6, G4EmDNAPhysics_option8 - use "fast" option
@@ -303,29 +334,29 @@ It must **not** be used as a substitute for writing good git commit messages!
G4EmDNAPhysics_option3, G4EmDNAPhysics_stationary_option2
maximally simplified
- G4EmDNAPhysicsActivator - fixed for light ions
- G4EmStandardPhysics_option4 - use G4UrbanFluctuation model
- G4EmStandardPhysics_option4 - use G4UrbanFluctuation model
for e+- to address problem #2466
## 2022-02-23 Vladimir Ivanchenko (phys-ctor-em-V11-00-04)
- G4EmDNABuilder - added option4 configuration
- G4EmDNAPhysics - address interface to G4EmDNABuilder
- G4EmDNAPhysics - address interface to G4EmDNABuilder
- G4EmDNAPhysics_option4 - use G4EmDNABuilder
- G4EmDNAPhysics_option5, G4EmDNAPhysics_stationary_option4
maximally simplified
## 2022-02-22 Vladimir Ivanchenko (phys-ctor-em-V11-00-03)
- G4EmDNABuilder - new utility class, which provides instantiation of
- G4EmDNABuilder - new utility class, which provides instantiation of
standard and DNA processes/models; this reduces code duplication
for DNA physics, energy intervals for DNA models are defined
in one place
- G4EmDNAPhysics is the base class for DNA physics constructors
- G4EmDNAPhysics_option1, G4EmDNAPhysics_stationary - maximally simplified
- G4EmDNAPhysics_option1, G4EmDNAPhysics_stationary - maximally simplified
## 2022-02-10 Vladimir Ivanchenko (phys-ctor-em-V11-00-02)
- G4EmModelActivator - fixed mechanism to define PAI model per region
## 2021-12-11 Vladimir Ivanchenko (phys-ctor-em-V11-00-01)
- G4EmStandardPhysics_option3 - use options providing more accurate
- G4EmStandardPhysics_option3 - use options providing more accurate
simulation without loss of CPU performance: RangeFactor=0.03,
and SafetyPlus step limitation instead of DistanceToBoundary,
which significantly improving fanoCavity results
@@ -338,17 +369,17 @@ It must **not** be used as a substitute for writing good git commit messages!
# History entries prior to 11.0
12 November 2021, V.Ivanchenko (phys-ctor-em-V10-07-23)
- G4EmStandardPhysicsWVI - making this experimantal configuration
- G4EmStandardPhysicsWVI - making this experimantal configuration
compatible for CPU performance with Opt3 (it was similar to SS)
10 November 2021, V.Ivanchenko (phys-ctor-em-V10-07-22)
- G4EmStandardPhysicsWVI - use similar options as in Opt3, for ions
use G4LinhardSorensenIonModel
- G4EmModelActivator - updated according to the current Opt3 and Opt4
- G4EmModelActivator - updated according to the current Opt3 and Opt4
configurations
29 October 2021, M. Novak (phys-ctor-em-V10-07-21)
- G4GammaGeneralProcess - make some methods/fields visible for
- G4GammaGeneralProcess - make some methods/fields visible for
derived classes
25 October 2021, V.Ivanchenko (phys-ctor-em-V10-07-20)
@@ -51,7 +51,7 @@ class G4OpticalPhysics : public G4VPhysicsConstructor
{
public:
G4OpticalPhysics(G4int verbose = 0, const G4String& name = "Optical");
~G4OpticalPhysics() override;
~G4OpticalPhysics() override = default;
void PrintStatistics() const;
G4OpticalPhysics(const G4OpticalPhysics& right) = delete;
@@ -319,10 +319,10 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
G4double emaxT = 7.4*CLHEP::eV;
// limit for CPA100 models
G4double emaxCPA100 = 250*CLHEP::keV;
if (4 == opt || 8 == opt) {
if (4 == opt) {
emaxE = 10.*CLHEP::keV;
emaxT = 10.*CLHEP::eV;
} else if(5 < opt) {
} else if(6 <= opt) {
emaxT = 11.*CLHEP::eV;
}
@@ -336,9 +336,9 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
auto pElasticProcess = FindOrBuildElastic(part, "e-_G4DNAElastic");
G4VEmModel* elast;
G4VEmModel* elast2 = nullptr;
if(4 == opt || 8 == opt) {
if(4 == opt) {
elast = new G4DNAUeharaScreenedRutherfordElasticModel();
} else if(5 < opt) {
} else if(6 <= opt) {
auto mod = new G4DNACPA100ElasticModel();
mod->SelectStationary(stationary);
elast = mod;
@@ -346,6 +346,7 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
} else {
elast = new G4DNAChampionElasticModel();
}
elast->SetLowEnergyLimit(emaxT);
elast->SetHighEnergyLimit(lowEnergyMSC);
pElasticProcess->AddEmModel(-2, elast, reg);
@@ -358,7 +359,7 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
// *** Excitation ***
auto theDNAExc = FindOrBuildExcitation(part, "e-_G4DNAExcitation");
if(emaxE > 0.0) {
if (emaxE > 0.0) {
auto modE = new G4DNAEmfietzoglouExcitationModel();
theDNAExc->AddEmModel(-1, modE, reg);
modE->SelectStationary(stationary);
@@ -446,8 +447,7 @@ 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);
G4double e2DNA = (8 == opt) ? std::min(lowEnergyRPWBA, emax) : e1DNA;
// *** Elastic scattering ***
auto pElasticProcess = FindOrBuildElastic(part, "proton_G4DNAElastic");
@@ -481,12 +481,10 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
// *** Ionisation ***
auto theDNAIoni = FindOrBuildIonisation(part, "proton_G4DNAIonisation");
G4VEmModel* modRI;
if (2 == opt) {
modRI = new G4DNARuddIonisationExtendedModel();
} else if (8 == opt) {
if (8 == opt) {
modRI = new G4DNARuddIonisationDynamicModel();
} else {
modRI = new G4DNARuddIonisationModel();
modRI = new G4DNARuddIonisationExtendedModel();
}
modRI->SetHighEnergyLimit(e2DNA);
theDNAIoni->AddEmModel(-1, modRI, reg);
@@ -580,12 +578,10 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
// *** Ionisation ***
auto theDNAIoni = FindOrBuildIonisation(part, name + "_G4DNAIonisation");
G4VEmModel* modRI;
if (2 == opt) {
modRI = new G4DNARuddIonisationExtendedModel();
} else if (8 == opt) {
if (8 == opt) {
modRI = new G4DNARuddIonisationDynamicModel();
} else {
modRI = new G4DNARuddIonisationModel();
modRI = new G4DNARuddIonisationExtendedModel();
}
modRI->SetHighEnergyLimit(elim2);
theDNAIoni->AddEmModel(-2, modRI, reg);
@@ -96,9 +96,8 @@ void G4EmDNAPhysics::ConstructProcess()
{
// parameters
G4EmParameters* param = G4EmParameters::Instance();
const G4double emaxDNA = 1.*CLHEP::MeV;
const G4double emaxIonDNA = 300.*CLHEP::MeV;
const G4double emaxLightIonDNA = 300.*CLHEP::MeV;
const G4double emaxDNA = param->MaxDNAElectronEnergy();
const G4double emaxIonDNA = param->MaxDNAIonEnergy();
const G4double eminBorn = 500.*CLHEP::keV;
const G4bool fast = param->DNAFast();
const G4bool st = param->DNAStationary();
@@ -125,13 +124,13 @@ void G4EmDNAPhysics::ConstructProcess()
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxIonDNA, fast, st);
part = G4Alpha::Alpha();
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 2, 0, emaxLightIonDNA, fast, st);
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 2, 0, emaxIonDNA, fast, st);
part = genericIonsManager->GetIon("alpha+");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 1, 0, emaxLightIonDNA, fast, st);
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 1, 0, emaxIonDNA, fast, st);
part = genericIonsManager->GetIon("helium");
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxLightIonDNA, fast, st);
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxIonDNA, fast, st);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,7 +49,10 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
G4EmDNAPhysics_option4::G4EmDNAPhysics_option4(G4int ver, const G4String& nam)
: G4EmDNAPhysics(ver, nam)
{}
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAFast(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -61,7 +61,7 @@ G4EmDNAPhysics_option6::G4EmDNAPhysics_option6(G4int ver, const G4String& nam)
: G4EmDNAPhysics(ver, nam)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDNAFast(false);
param->SetDNAFast(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -49,7 +49,10 @@ 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......
@@ -32,41 +32,57 @@
//
// Modified:
//
// 25.10.25 Changed the settings to the most accurate configuration of the
// Goudsmit-Saunderson MSC model for e-/e+ multiple Coulomb
// scattering. The class descrition has been changed to reflect the
// new configuration (Mihaly Novak).
//
// Class Description:
//
// Standard EM physics constructor for HEP applications with the Goudsmit
// -Saunderson MSC model for e-/e+ Coulomb scattering below 100 [MeV] (instead
// of the Urban model). Note, that the Goudsmit-Saunderson MSC model used here
// with its HEP settings (i.e. less accurate). The Goudsmit-Saunderson MSC
// model with its most accurate settings is used in the G4EmStandard_opt4
// physics constructor for e-/e+ Coulomb scattering.
// This EM physics constructor utilises the Goudsmit-Saunderson (GS) MSC model
// for e-/e+ multiple Coulomb scattering (below 1 GeV kinetic energies). The
// GS MSC model has been changed in version 11.4 keeping only its accurate
// stepping and boundary crossing algorithms while removeing the other, less
// accurate alternatives. All the corrections offered by the GS model, including
// the Mott, screening and scattering power corrections, are activated. This,
// together with the Penelope model for e-/e+ ionisations (below 1 GeV),
// offers an accurate an accurate e-/e+ simualtion down to few keV kinetic
// enegies independently form the target material and geometry.
//
// The same settings of the GS MSC model has already been used for e-/e+ below
// 100 MeV kinetic energies in the option4, Penelope and Livermore EM physics
// constructors since version 10.6.
//
//----------------------------------------------------------------------------
//
#include "G4EmStandardPhysicsGS.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4EmParameters.hh"
#include "G4EmBuilder.hh"
#include "G4LossTableManager.hh"
#include "G4EmParameters.hh"
#include "G4EmStandUtil.hh"
#include "G4EmBuilder.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4RayleighScattering.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4GoudsmitSaundersonMscModel.hh"
#include "G4eIonisation.hh"
#include "G4PenelopeIonisationModel.hh"
#include "G4eBremsstrahlung.hh"
#include "G4SeltzerBergerModel.hh"
#include "G4Generator2BS.hh"
#include "G4eplusAnnihilation.hh"
#include "G4hIonisation.hh"
@@ -80,6 +96,7 @@
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
#include "G4EmModelActivator.hh"
#include "G4GammaGeneralProcess.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -95,9 +112,23 @@ G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver, const G4String&)
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(ver);
param->SetMscRangeFactor(0.06);
// param->SetMscStepLimitType(fUseSafetyPlus); // corresponds to the error-free stepping
// param->SetFluo(true);
// use a denser discrete kinetic energy grid for more accurate interpolation
param->SetNumberOfBinsPerDecade(16);
// set the continuous step limit to: 0.2*Range that goes to Range below 10 um
param->SetStepFunction(0.2, 10*CLHEP::um);
// set the GS MSC model for e-/e+ to be used below 1.0 GeV with its (Mott,
// screening, scattering power) corrections activated and with the accurate
// stepping and boundary crossing algorithms (no other options since 11.4)
// with a skin of 3 elastic MFP near boundary
param->SetMscEnergyLimit(1.0*CLHEP::GeV);
param->SetUseMottCorrection(true);
param->SetMscStepLimitType(fUseSafetyPlus);
param->SetMscSkin(3);
param->SetMscRangeFactor(0.08);
// activate fluoresence, i.e. emission of characteristic X-ray
param->SetFluo(true);
// set the energy loss fluctuation type
param->SetFluctuationType(fUrbanFluctuation);
SetPhysicsType(bElectromagnetic);
}
@@ -129,63 +160,109 @@ void G4EmStandardPhysicsGS::ConstructProcess()
G4NuclearStopping* pnuc(nullptr);
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
G4double mscEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
// Add gamma EM processes
// gamma
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(pee, particle);
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
pe->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(new G4ComptonScattering(), particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
G4ComptonScattering* cs = new G4ComptonScattering;
G4GammaConversion* gc = new G4GammaConversion;
G4RayleighScattering* rs = new G4RayleighScattering;
if (G4EmParameters::Instance()->GeneralProcessActive()) {
G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
sp->AddEmProcess(pe);
sp->AddEmProcess(cs);
sp->AddEmProcess(gc);
sp->AddEmProcess(rs);
G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
ph->RegisterProcess(sp, particle);
} else {
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(gc, particle);
ph->RegisterProcess(rs, particle);
}
// e-
particle = G4Electron::Electron();
G4eMultipleScattering* msc = new G4eMultipleScattering;
// msc: GS[:100 MeV] + WentzelVI[100 MeV:]
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
msc1->SetHighEnergyLimit(mscEnergyLimit);
msc2->SetLowEnergyLimit(mscEnergyLimit);
G4EmBuilder::ConstructElectronMscProcess(msc1, msc2, particle);
// (WVI is a mixed model, i.e. needs single scattering)
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ss->SetMinKinEnergy(mscEnergyLimit);
ssm->SetLowEnergyLimit(mscEnergyLimit);
ssm->SetActivationLowEnergyLimit(mscEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
// ionisation: Penelope[:1.0 GeV] + Moller[1.0 GeV:]
G4eIonisation* eioni = new G4eIonisation();
eioni->SetFluctModel(G4EmStandUtil::ModelOfFluctuations());
G4VEmModel* theIoniMod = new G4PenelopeIonisationModel();
theIoniMod->SetHighEnergyLimit(1.0*CLHEP::GeV);
eioni->AddEmModel(0, theIoniMod);
// bremsstrahlung: Seltzer-Berger[:1.0 GeV] + extended BetheHeitler[1.0 GeV:]
G4eBremsstrahlung* brem = new G4eBremsstrahlung();
G4SeltzerBergerModel* br1 = new G4SeltzerBergerModel();
G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(1.0*CLHEP::GeV);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(brem, particle);
ph->RegisterProcess(ss, particle);
// e+
particle = G4Positron::Positron();
msc = new G4eMultipleScattering;
// msc: GS[:100 MeV] + WentzelVI[100 MeV:]
msc1 = new G4GoudsmitSaundersonMscModel();
msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
msc1->SetHighEnergyLimit(mscEnergyLimit);
msc2->SetLowEnergyLimit(mscEnergyLimit);
G4EmBuilder::ConstructElectronMscProcess(msc1, msc2, particle);
// (WVI is a mixed model, i.e. needs single scattering)
ssm = new G4eCoulombScatteringModel();
ss = new G4CoulombScattering();
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ss->SetMinKinEnergy(mscEnergyLimit);
ssm->SetLowEnergyLimit(mscEnergyLimit);
ssm->SetActivationLowEnergyLimit(mscEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
// ionisation: Penelope[:1.0 GeV] + Bhabha[1.0 GeV:]
eioni = new G4eIonisation();
eioni->SetFluctModel(G4EmStandUtil::ModelOfFluctuations());
G4VEmModel* pen = new G4PenelopeIonisationModel();
pen->SetHighEnergyLimit(1.0*CLHEP::GeV);
eioni->AddEmModel(0, pen);
// bremsstrahlung: Seltzer-Berger[:1.0 GeV] + extended BetheHeitler[1.0 GeV:]
brem = new G4eBremsstrahlung();
br1 = new G4SeltzerBergerModel();
br2 = new G4eBremsstrahlungRelModel();
br1->SetAngularDistribution(new G4Generator2BS());
br2->SetAngularDistribution(new G4Generator2BS());
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(1.0*CLHEP::GeV);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(brem, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
@@ -39,6 +39,7 @@
#include "G4OpticalPhysics.hh"
#include "G4Cerenkov.hh"
#include "G4GeneralCerenkov.hh"
#include "G4EmSaturation.hh"
#include "G4LossTableManager.hh"
#include "G4OpAbsorption.hh"
@@ -50,6 +51,7 @@
#include "G4OpWLS2.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4QuasiOpticalPhoton.hh"
#include "G4Scintillation.hh"
// factory
@@ -64,9 +66,6 @@ G4OpticalPhysics::G4OpticalPhysics(G4int verbose, const G4String& name)
G4OpticalParameters::Instance()->SetVerboseLevel(verboseLevel);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4OpticalPhysics::~G4OpticalPhysics() {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4OpticalPhysics::PrintStatistics() const
{
@@ -77,6 +76,8 @@ void G4OpticalPhysics::PrintStatistics() const
void G4OpticalPhysics::ConstructParticle()
{
G4OpticalPhoton::OpticalPhotonDefinition();
// Add G4QuasiOpticalPhoton to support offloading optical photon generation
G4QuasiOpticalPhoton::QuasiOpticalPhotonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -91,7 +92,7 @@ void G4OpticalPhysics::ConstructProcess()
G4ProcessManager* pManager =
G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
if(!pManager)
if (nullptr == pManager)
{
G4ExceptionDescription ed;
ed << "Optical Photon without a Process Manager";
@@ -99,71 +100,79 @@ void G4OpticalPhysics::ConstructProcess()
return;
}
G4OpAbsorption* absorption = new G4OpAbsorption();
if(params->GetProcessActivation("OpAbsorption"))
if (params->GetProcessActivation("OpAbsorption")) {
auto absorption = new G4OpAbsorption();
pManager->AddDiscreteProcess(absorption);
}
G4OpRayleigh* rayleigh = new G4OpRayleigh();
if(params->GetProcessActivation("OpRayleigh"))
if (params->GetProcessActivation("OpRayleigh")) {
auto rayleigh = new G4OpRayleigh();
pManager->AddDiscreteProcess(rayleigh);
}
G4OpMieHG* mie = new G4OpMieHG();
if(params->GetProcessActivation("OpMieHG"))
if (params->GetProcessActivation("OpMieHG")) {
auto mie = new G4OpMieHG();
pManager->AddDiscreteProcess(mie);
}
G4OpBoundaryProcess* boundary = new G4OpBoundaryProcess();
if(params->GetProcessActivation("OpBoundary"))
if (params->GetProcessActivation("OpBoundary")) {
auto boundary = new G4OpBoundaryProcess();
pManager->AddDiscreteProcess(boundary);
}
G4OpWLS* wls = new G4OpWLS();
if(params->GetProcessActivation("OpWLS"))
if (params->GetProcessActivation("OpWLS")) {
auto wls = new G4OpWLS();
pManager->AddDiscreteProcess(wls);
}
G4OpWLS2* wls2 = new G4OpWLS2();
if(params->GetProcessActivation("OpWLS2"))
if (params->GetProcessActivation("OpWLS2")) {
auto wls2 = new G4OpWLS2();
pManager->AddDiscreteProcess(wls2);
}
G4Scintillation* scint = new G4Scintillation();
G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
scint->AddSaturation(emSaturation);
G4VProcess* theCerenkov{nullptr};
if (params->CerenkovGeneral()) {
auto ptr = new G4GeneralCerenkov();
theCerenkov = ptr;
}
else if (params->GetProcessActivation("Cerenkov")) {
auto ptr = new G4Cerenkov();
theCerenkov = ptr;
}
G4Cerenkov* cerenkov = new G4Cerenkov();
G4VProcess* theScint{nullptr};
if (params->GetProcessActivation("Scintillation")) {
auto scint = new G4Scintillation();
G4EmSaturation* emSaturation = G4LossTableManager::Instance()->EmSaturation();
scint->AddSaturation(emSaturation);
theScint = scint;
}
auto myParticleIterator = GetParticleIterator();
myParticleIterator->reset();
while((*myParticleIterator)())
{
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
auto particle = myParticleIterator->value();
if (particle->IsShortLived()) { continue; }
pManager = particle->GetProcessManager();
if(!pManager)
{
if (nullptr == pManager) {
G4ExceptionDescription ed;
ed << "Particle " << particleName << "without a Process Manager";
ed << "Particle " << particle->GetParticleName() << "without a Process Manager";
G4Exception("G4OpticalPhysics::ConstructProcess()", "", FatalException,
ed);
return; // else coverity complains for pManager use below
}
if(cerenkov->IsApplicable(*particle) &&
params->GetProcessActivation("Cerenkov"))
{
pManager->AddProcess(cerenkov);
pManager->SetProcessOrdering(cerenkov, idxPostStep);
if (nullptr != theCerenkov && theCerenkov->IsApplicable(*particle)) {
pManager->AddDiscreteProcess(theCerenkov);
}
if(scint->IsApplicable(*particle) &&
params->GetProcessActivation("Scintillation"))
{
pManager->AddProcess(scint);
pManager->SetProcessOrderingToLast(scint, idxAtRest);
pManager->SetProcessOrderingToLast(scint, idxPostStep);
}
if(boundary->IsApplicable(*particle) &&
params->GetProcessActivation("OpBoundary"))
{
pManager->SetProcessOrderingToLast(boundary, idxPostStep);
if (nullptr != theScint && theScint->IsApplicable(*particle)) {
pManager->AddProcess(theScint);
pManager->SetProcessOrderingToLast(theScint, idxAtRest);
pManager->SetProcessOrderingToLast(theScint, idxPostStep);
}
}
@@ -1,8 +1,46 @@
# Category phys-ctor-hinelastic History
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!
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-11-19 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-06)
- G4HadronPhysicsQGSP_BERT. G4HadronInelasticQBBC - return back cross section
G4BGGNucleonInelasticXS for protons, as it was in 11.3. There are problems
with G4ParticleInelasticXS for light targets Li, Be, B.
## 2025-11-19 Gabriele Cosmo (phys-ctor-hinelastic-V11-03-05)
- Removed redundant private dependency to G4had_gamma_nuclear in sources.cmake.
## 2025-11-10 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-04)
- G4HadronPhysicsQGSP_BERT - restore class method as it was in 11.3 (problem
reported in CMSSW test build with candidate version).
- G4HadronPhysicsQGSP_BIC, G4HadronInelasticQBBC - enable usage of R-files for
neutron XS cross sections for more accurate simulation in neutron resonance
region.
- G4HadronPhysicsQGS_BIC - do not use QGS/Binary and FTF/Binary models for
pions and kaons.
## 2025-10-30 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-03)
- Clean-up the family of QGSP based physics configuration, which starts from the
base class G4HadronicPhysicsQGSP_BERT and substitutes only part of configuration,
which is different for a given Physics. G4HadronicPhysicsQGSP_BIC_HP and
G4HadronicPhysicsQGSP_BIC_AllHP inherits from G4HadronicPhysicsQGSP_BIC. The size of
the classes significantly reduced due to removal of the duplicate code. In local tests
physics seems to be in statistical agreement with the previous version of the code.
In all classes of this family except G4HadronicPhysicsQGSP_BIC_AllHP
the G4PARTICLEXSDATA proton cross section is used.
- G4HadronPhysicsShielding - technical clean-up: removed unused headers, fixed
constructors and destructors.
## 2025-08-02 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-02)
- G4HadronPhysicsQGSP_BERT_HP - minor code cleanup and format.
- G4Hadron_PhysicsQGS_BIC, G4Hadron_PhysicsQGSP_BIC_HP, G4Hadron_PhysicsQGSP_BIC_AllHP
uniform instantiation of neutron and proton physics, enable NuDEX via hadronic
parameters for neutron capture in QGSP_BIC_HP and QGSP_BIC_AllHP,
code cleanup and format.
## 2025-06-13 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-03-01)
- G4HadrocPhysicsQBBC - disable General Neutron Process, which address problem reports
@@ -50,7 +50,7 @@ class G4HadronPhysicsFTFP_BERT : public G4VPhysicsConstructor
public:
G4HadronPhysicsFTFP_BERT(G4int verbose =1);
G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFP_BERT();
~G4HadronPhysicsFTFP_BERT() override = default;
void ConstructParticle() override;
void ConstructProcess() override;
@@ -47,7 +47,7 @@ class G4HadronPhysicsFTFP_BERT_HP : public G4HadronPhysicsFTFP_BERT
public:
G4HadronPhysicsFTFP_BERT_HP(G4int verbose =1);
G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G4bool quasiElastic=false);
virtual ~G4HadronPhysicsFTFP_BERT_HP();
~G4HadronPhysicsFTFP_BERT_HP() override = default;
protected:
//Modify the minimum needed
@@ -38,6 +38,7 @@
// 31.10.2012 A.Ribon: Use G4MiscBuilder
// 19.03.2013 A.Ribon: Replace LEP with FTFP
// 25.08.2020 V.Ivanchenko change design using G4HadProcess utility
// 25.10.2025 V.Ivanchenko made this class to be base for QGSP family
//
//----------------------------------------------------------------------------
//
@@ -52,8 +53,8 @@ class G4HadronPhysicsQGSP_BERT : public G4VPhysicsConstructor
{
public:
G4HadronPhysicsQGSP_BERT(G4int verbose =1);
G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BERT();
G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool quasiElastic = true);
~G4HadronPhysicsQGSP_BERT() override = default;
void ConstructParticle() override;
void ConstructProcess() override;
@@ -67,7 +68,7 @@ class G4HadronPhysicsQGSP_BERT : public G4VPhysicsConstructor
void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void PiK();
virtual void Others();
virtual void DumpBanner();
@@ -80,15 +81,18 @@ class G4HadronPhysicsQGSP_BERT : public G4VPhysicsConstructor
G4double maxFTFP_proton;
G4double maxFTFP_neutron;
G4double maxFTFP_pik;
G4double minBERT_proton;
G4double minBERT_neutron;
G4double minBERT_pik;
G4double minBERT_proton{0.0};
G4double minBERT_neutron{0.0};
G4double minBERT_pik{0.0};
G4double maxBERT_proton;
G4double maxBERT_neutron;
G4double maxBERT_pik;
G4double maxBIC_proton{0.0};
G4double maxBIC_neutron{0.0};
G4double minBIC_neutron{0.0};
G4bool QuasiElasticFTF;
G4bool QuasiElasticQGS;
G4bool QuasiElasticFTF{false}; // Use built-in quasi-elastic (not add-on)
G4bool QuasiElasticQGS{true}; // For QGS, it must use it
};
#endif
@@ -45,48 +45,19 @@
#include "globals.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4HadronPhysicsQGSP_BERT.hh"
class G4HadronPhysicsQGSP_BIC : public G4VPhysicsConstructor
class G4HadronPhysicsQGSP_BIC : public G4HadronPhysicsQGSP_BERT
{
public:
G4HadronPhysicsQGSP_BIC(G4int verbose =1);
G4HadronPhysicsQGSP_BIC(const G4String& name,G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_BIC();
void ConstructParticle() override;
void ConstructProcess() override;
G4HadronPhysicsQGSP_BIC(G4int verbose = 1);
G4HadronPhysicsQGSP_BIC(const G4String& name, G4bool quasiElastic = true);
~G4HadronPhysicsQGSP_BIC() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsQGSP_BIC(G4HadronPhysicsQGSP_BIC &) = delete;
G4HadronPhysicsQGSP_BIC & operator =
(const G4HadronPhysicsQGSP_BIC &right) = delete;
protected:
void CreateModels();
virtual void Neutron();
virtual void Proton();
virtual void Pion();
virtual void Others();
virtual void DumpBanner() {}
G4double minQGSP_neutron;
G4double minQGSP_proton;
G4double minQGSP_pik;
G4double maxFTFP_proton;
G4double maxFTFP_neutron;
G4double maxFTFP_pik;
G4double minFTFP_proton;
G4double minFTFP_neutron;
G4double minFTFP_pik;
G4double maxBIC_proton;
G4double minBIC_neutron;
G4double minBIC_proton;
G4double maxBIC_neutron;
G4double maxBERT_pik;
G4bool QuasiElasticFTF;
G4bool QuasiElasticQGS;
};
#endif
@@ -33,10 +33,10 @@
class G4HadronPhysicsQGSP_BIC_AllHP : public G4HadronPhysicsQGSP_BIC_HP {
public:
public:
G4HadronPhysicsQGSP_BIC_AllHP( G4int verbose = 1 );
G4HadronPhysicsQGSP_BIC_AllHP( const G4String& name, G4bool quasiElastic = true );
virtual ~G4HadronPhysicsQGSP_BIC_AllHP() {}
~G4HadronPhysicsQGSP_BIC_AllHP() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsQGSP_BIC_AllHP(G4HadronPhysicsQGSP_BIC_AllHP &) = delete;
@@ -45,7 +45,9 @@ class G4HadronPhysicsQGSP_BIC_AllHP : public G4HadronPhysicsQGSP_BIC_HP {
protected:
void Proton() override;
private:
G4double maxHP_proton;
G4double minBIC_proton;
};
#endif
@@ -49,12 +49,11 @@
#include "G4HadronPhysicsQGSP_BIC.hh"
class G4HadronPhysicsQGSP_BIC_HP : public G4HadronPhysicsQGSP_BIC {
public:
G4HadronPhysicsQGSP_BIC_HP( G4int verbose = 1 );
G4HadronPhysicsQGSP_BIC_HP( const G4String& name, G4bool quasiElastic = true );
virtual ~G4HadronPhysicsQGSP_BIC_HP() {};
~G4HadronPhysicsQGSP_BIC_HP() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsQGSP_BIC_HP(G4HadronPhysicsQGSP_BIC_HP &) = delete;
@@ -39,16 +39,15 @@
#ifndef G4HadronPhysicsQGSP_FTFP_BERT_h
#define G4HadronPhysicsQGSP_FTFP_BERT_h 1
#include "globals.hh"
#include "G4HadronPhysicsQGSP_BERT.hh"
class G4HadronPhysicsQGSP_FTFP_BERT : public G4HadronPhysicsQGSP_BERT
{
public:
G4HadronPhysicsQGSP_FTFP_BERT(G4int verbose =1);
G4HadronPhysicsQGSP_FTFP_BERT(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGSP_FTFP_BERT();
G4HadronPhysicsQGSP_FTFP_BERT(G4int verbose = 1);
G4HadronPhysicsQGSP_FTFP_BERT(const G4String& name, G4bool quasiElastic = true);
~G4HadronPhysicsQGSP_FTFP_BERT() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsQGSP_FTFP_BERT(G4HadronPhysicsQGSP_FTFP_BERT &) = delete;
@@ -44,9 +44,9 @@
class G4HadronPhysicsQGS_BIC : public G4HadronPhysicsQGSP_BERT
{
public:
G4HadronPhysicsQGS_BIC(G4int verbose =1);
G4HadronPhysicsQGS_BIC(const G4String& name, G4bool quasiElastic=true);
virtual ~G4HadronPhysicsQGS_BIC();
G4HadronPhysicsQGS_BIC(G4int verbose = 1);
G4HadronPhysicsQGS_BIC(const G4String& name, G4bool quasiElastic = true);
~G4HadronPhysicsQGS_BIC() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsQGS_BIC(G4HadronPhysicsQGS_BIC &) = delete;
@@ -56,12 +56,6 @@ class G4HadronPhysicsQGS_BIC : public G4HadronPhysicsQGSP_BERT
protected:
void Neutron() override;
void Proton() override;
void Pion() override;
private:
G4double minBERT_pion;
G4double maxBIC_pion;
};
#endif
@@ -57,9 +57,7 @@ class G4HadronPhysicsShielding : public G4HadronPhysicsFTFP_BERT
G4double minFTFPEnergy,
G4double maxBertiniEnergy);
virtual ~G4HadronPhysicsShielding();
void ConstructProcess() override;
~G4HadronPhysicsShielding() override = default;
void UseLEND( const G4String& ss="" ){ useLEND_=true; evaluation_=ss; };
void UnuseLEND(){ useLEND_=false; };
@@ -73,7 +71,7 @@ class G4HadronPhysicsShielding : public G4HadronPhysicsFTFP_BERT
//Modify the minimum needed
void Neutron() override;
G4bool useLEND_;
G4bool useLEND_{false};
G4String evaluation_;
};
@@ -52,7 +52,7 @@ class G4HadronPhysicsShieldingLEND : public G4HadronPhysicsShielding
G4double minFTFPEnergy,
G4double maxBertiniEnergy);
virtual ~G4HadronPhysicsShieldingLEND();
~G4HadronPhysicsShieldingLEND() override = default;
// copy constructor and hide assignment operator
G4HadronPhysicsShieldingLEND(G4HadronPhysicsShieldingLEND &) = delete;
@@ -57,7 +57,6 @@ geant4_module_link_libraries(G4phys_ctor_hinelastic
G4run
PRIVATE
G4baryons
G4had_gamma_nuclear
G4phys_ctor_em
G4emutils
G4had_lend
@@ -87,6 +87,7 @@ G4HadronInelasticQBBC::G4HadronInelasticQBBC(G4int ver)
auto param = G4HadronicParameters::Instance();
param->SetEnableBCParticles(true);
param->SetEnableNeutronGeneralProcess(false);
param->SetUseRFilesForXS(true);
param->SetVerboseLevel(ver);
}
@@ -151,7 +152,7 @@ void G4HadronInelasticQBBC::ConstructProcess()
G4ParticleDefinition* particle = G4Proton::Proton();
G4HadronicProcess* hp =
new G4HadronInelasticProcess( particle->GetParticleName()+"Inelastic", particle );
hp->AddDataSet(new G4ParticleInelasticXS(particle));
hp->AddDataSet( new G4BGGNucleonInelasticXS(particle) );
hp->RegisterMe(theFTFP);
hp->RegisterMe(theBERT);
hp->RegisterMe(theBIC);
@@ -61,11 +61,6 @@
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4HyperonBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
@@ -109,9 +104,6 @@ G4HadronPhysicsFTFP_BERT::G4HadronPhysicsFTFP_BERT(const G4String& name, G4bool
param->SetEnableBCParticles(true);
}
G4HadronPhysicsFTFP_BERT::~G4HadronPhysicsFTFP_BERT()
{}
void G4HadronPhysicsFTFP_BERT::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
@@ -297,6 +289,7 @@ void G4HadronPhysicsFTFP_BERT::Others()
void G4HadronPhysicsFTFP_BERT::ConstructProcess()
{
// allow changing of parameters at PreInit
G4HadronicParameters* param = G4HadronicParameters::Instance();
minFTFP_pion = param->GetMinEnergyTransitionFTF_Cascade();
maxBERT_pion = param->GetMaxEnergyTransitionFTF_Cascade();
@@ -307,9 +300,8 @@ void G4HadronPhysicsFTFP_BERT::ConstructProcess()
minFTFP_neutron = param->GetMinEnergyTransitionFTF_Cascade();
maxBERT_neutron = param->GetMaxEnergyTransitionFTF_Cascade();
if(G4Threading::IsMasterThread() &&
G4HadronicParameters::Instance()->GetVerboseLevel() > 0) {
DumpBanner();
if (G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0) {
DumpBanner();
}
CreateModels();
}
@@ -70,34 +70,32 @@ G4HadronPhysicsFTFP_BERT_HP::G4HadronPhysicsFTFP_BERT_HP(const G4String& name, G
minBERT_neutron = 19.9*CLHEP::MeV;
}
G4HadronPhysicsFTFP_BERT_HP::~G4HadronPhysicsFTFP_BERT_HP()
{}
void G4HadronPhysicsFTFP_BERT_HP::Neutron()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neu);
auto ftfpneu = new G4FTFPNeutronBuilder(QuasiElastic);
AddBuilder(ftfpneu);
ftfpneu->SetMinEnergy(minFTFP_neutron);
neu->RegisterMe(ftfpneu);
auto bertneu = new G4BertiniNeutronBuilder;
AddBuilder(bertneu);
bertneu->SetMaxEnergy(maxBERT_neutron);
bertneu->SetMinEnergy(minBERT_neutron);
neu->RegisterMe(bertneu);
auto hpneu = new G4NeutronPHPBuilder;
AddBuilder(hpneu);
neu->RegisterMe(hpneu);
neu->Build();
G4NeutronBuilder neu( true ); // Fission on
G4FTFPNeutronBuilder ftfpneu(QuasiElastic);
ftfpneu.SetMinEnergy(minFTFP_neutron);
neu.RegisterMe(&ftfpneu);
G4BertiniNeutronBuilder bertneu;
bertneu.SetMaxEnergy(maxBERT_neutron);
bertneu.SetMinEnergy(minBERT_neutron);
neu.RegisterMe(&bertneu);
G4NeutronPHPBuilder hpneu;
neu.RegisterMe(&hpneu);
// build all models
neu.Build();
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
if(nullptr != inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
if ( nullptr != inel && useFactorXS ) {
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
@@ -40,8 +40,8 @@
#include "G4NeutronLENDBuilder.hh"
#include "G4PhysicsListHelper.hh"
#include "G4LENDorBERTModel.hh"
//#include "G4LENDCombinedModel.hh"
//#include "G4LENDorBERTModel.hh"
#include "G4LENDCombinedModel.hh"
#include "G4LENDCombinedCrossSection.hh"
#include "G4CrossSectionDataSetRegistry.hh"
@@ -113,10 +113,8 @@ void G4HadronPhysicsLEND::ConstructProcess()
}
//....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
//auto* theGammaReactionLowE = new G4LENDorBERTModel( G4Gamma::Gamma() );
auto* theGammaReactionLowE = new G4LENDCombinedModel( G4Gamma::Gamma() ); // use combined LEND models
theGammaReactionLowE->SetMaxEnergy(maxLEND_Energy);
theGammaReactionLowE->DumpLENDTargetInfo(true);
gamma_inelastic->RegisterMe(theGammaReactionLowE);
@@ -47,26 +47,26 @@
#include "G4HadronPhysicsQGSP_BERT.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProcessManager.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
@@ -76,6 +76,8 @@
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleInelasticXS.hh"
#include "G4BGGNucleonInelasticXS.hh"
#include "G4PhysListUtil.hh"
#include "G4HadParticles.hh"
@@ -88,7 +90,7 @@
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(G4int verb)
: G4HadronPhysicsQGSP_BERT("hInelastic QGSP_BERT",true)
: G4HadronPhysicsQGSP_BERT("hInelastic QGSP_BERT", true)
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
@@ -97,8 +99,6 @@ G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool)
: G4VPhysicsConstructor(name)
{
SetPhysicsType(bHadronInelastic);
QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
QuasiElasticQGS= true; // For QGS, it must use it.
G4HadronicParameters* param = G4HadronicParameters::Instance();
minQGSP_proton = minQGSP_neutron = minQGSP_pik =
param->GetMinEnergyTransitionQGS_FTF();
@@ -108,7 +108,6 @@ G4HadronPhysicsQGSP_BERT::G4HadronPhysicsQGSP_BERT(const G4String& name, G4bool)
param->GetMinEnergyTransitionFTF_Cascade();
maxBERT_proton = maxBERT_neutron = maxBERT_pik =
param->GetMaxEnergyTransitionFTF_Cascade();
minBERT_proton = minBERT_neutron = minBERT_pik = 0.0;
param->SetEnableBCParticles(true);
}
@@ -116,7 +115,7 @@ void G4HadronPhysicsQGSP_BERT::CreateModels()
{
Neutron();
Proton();
Pion();
PiK();
Others();
}
@@ -124,112 +123,124 @@ void G4HadronPhysicsQGSP_BERT::Neutron()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bert = new G4BertiniNeutronBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_neutron);
bert->SetMaxEnergy(maxBERT_neutron);
neu->RegisterMe(bert);
neu->Build();
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
if(nullptr != inel) {
inel->AddDataSet(new G4NeutronInelasticXS());
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
auto inel = new G4HadronInelasticProcess( "neutronInelastic", neutron );
neutron->GetProcessManager()->AddDiscreteProcess( inel );
G4QGSPNeutronBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_neutron );
qgs.Build( inel );
G4FTFPNeutronBuilder ftf( QuasiElasticFTF );
ftf.SetMinEnergy( minFTFP_neutron );
ftf.SetMaxEnergy( maxFTFP_neutron );
ftf.Build( inel );
if ( maxBERT_neutron > minBERT_neutron ) {
G4BertiniNeutronBuilder bert;
bert.SetMinEnergy( minBERT_neutron );
bert.SetMaxEnergy( maxBERT_neutron );
bert.Build( inel );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
if (nullptr != capture) {
capture->RegisterMe(new G4NeutronRadCapture());
if ( maxBIC_neutron > 0.0 ) {
G4BinaryNeutronBuilder bic;
bic.SetMinEnergy( minBIC_neutron );
bic.SetMaxEnergy( maxBIC_neutron );
bic.Build( inel );
}
}
inel->AddDataSet( new G4NeutronInelasticXS() );
if ( useFactorXS ) {
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
auto capture = new G4NeutronCaptureProcess( "nCaptureXS" );
neutron->GetProcessManager()->AddDiscreteProcess(capture);
capture->RegisterMe( new G4NeutronRadCapture() );
}
void G4HadronPhysicsQGSP_BERT::Proton()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bert = new G4BertiniProtonBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_proton);
bert->SetMaxEnergy(maxBERT_proton);
pro->RegisterMe(bert);
pro->Build();
const G4ParticleDefinition* proton = G4Proton::Proton();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton);
if(nullptr != inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
auto inel = new G4HadronInelasticProcess( "protonInelastic", proton );
proton->GetProcessManager()->AddDiscreteProcess( inel );
G4QGSPProtonBuilder qgs(QuasiElasticQGS);
qgs.SetMinEnergy(minQGSP_proton);
qgs.Build( inel );
G4FTFPProtonBuilder ftf(QuasiElasticFTF);
ftf.SetMinEnergy( minFTFP_proton );
ftf.SetMaxEnergy( maxFTFP_proton );
ftf.Build( inel );
if ( maxBERT_proton > minBERT_proton ) {
G4BertiniProtonBuilder bert;
bert.SetMinEnergy( minBERT_proton );
bert.SetMaxEnergy( maxBERT_proton );
bert.Build( inel );
}
if ( maxBIC_proton > 0.0 ) {
G4BinaryProtonBuilder bic;
bic.SetMaxEnergy( maxBIC_proton);
bic.Build( inel );
}
auto xsinel = new G4BGGNucleonInelasticXS( proton );
inel->AddDataSet( xsinel );
if ( useFactorXS ) {
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
}
void G4HadronPhysicsQGSP_BERT::Pion()
void G4HadronPhysicsQGSP_BERT::PiK()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pik = new G4PiKBuilder;
AddBuilder(pik);
auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_pik);
pik->RegisterMe(qgs);
auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_pik);
ftf->SetMaxEnergy(maxFTFP_pik);
pik->RegisterMe(ftf);
auto bert = new G4BertiniPiKBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_pik);
bert->SetMaxEnergy(maxBERT_pik);
pik->RegisterMe(bert);
pik->Build();
G4PiKBuilder pik;
G4QGSPPiKBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_pik );
pik.RegisterMe( &qgs );
G4FTFPPiKBuilder ftf( QuasiElasticFTF );
ftf.SetMaxEnergy( maxFTFP_pik );
ftf.SetMinEnergy( minFTFP_pik );
pik.RegisterMe( &ftf );
G4BertiniPiKBuilder bert;
bert.SetMaxEnergy( maxBERT_pik );
pik.RegisterMe( &bert );
// build all models
pik.Build();
// add cross section factor
if( useFactorXS ) {
if ( useFactorXS ) {
const G4ParticleDefinition* pion = G4PionPlus::PionPlus();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(pion);
if(nullptr != inel) {
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess( pion );
if ( nullptr != inel ) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
pion = G4PionMinus::PionMinus();
inel = G4PhysListUtil::FindInelasticProcess(pion);
if(inel) {
inel = G4PhysListUtil::FindInelasticProcess( pion );
if ( nullptr != inel ) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for( auto & pdg : G4HadParticles::GetKaons() ) {
for ( auto const & pdg : G4HadParticles::GetKaons() ) {
auto part = table->FindParticle( pdg );
if ( part == nullptr ) { continue; }
inel = G4PhysListUtil::FindInelasticProcess(part);
if(nullptr != inel) {
if ( nullptr != inel ) {
inel->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() );
}
}
@@ -256,9 +267,6 @@ void G4HadronPhysicsQGSP_BERT::Others()
}
}
G4HadronPhysicsQGSP_BERT::~G4HadronPhysicsQGSP_BERT()
{}
void G4HadronPhysicsQGSP_BERT::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
@@ -284,11 +292,13 @@ void G4HadronPhysicsQGSP_BERT::ConstructProcess()
param->GetMaxEnergyTransitionQGS_FTF();
minFTFP_proton = minFTFP_neutron = minFTFP_pik =
param->GetMinEnergyTransitionFTF_Cascade();
maxBERT_pik = param->GetMaxEnergyTransitionFTF_Cascade();
maxBERT_proton = maxBERT_neutron = maxBERT_pik =
param->GetMaxEnergyTransitionFTF_Cascade();
if(G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0) {
DumpBanner();
}
if ( G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0 )
DumpBanner();
// build models and x-sections
CreateModels();
}
@@ -296,10 +306,17 @@ void G4HadronPhysicsQGSP_BERT::DumpBanner()
{
G4cout << G4endl;
G4cout << " " << GetPhysicsName() << " Thresholds: " << G4endl;
if ( maxBIC_proton > 0.0 || maxBIC_neutron > 0.0) {
G4cout << " 0) between BIC and BERT for p, n over the interval "
<< minBERT_proton/CLHEP::GeV << " to "
<< maxBIC_proton/CLHEP::GeV << " GeV. " << G4endl;
}
G4cout << " 1) between BERT and FTF/P over the interval "
<< minFTFP_proton/GeV << " to " << maxBERT_proton/GeV << " GeV. " << G4endl;
<< minFTFP_proton/CLHEP::GeV << " to "
<< maxBERT_proton/CLHEP::GeV << " GeV. " << G4endl;
G4cout << " 2) between FTF/P and QGS/P over the interval "
<< minQGSP_proton/GeV << " to " << maxFTFP_proton/GeV << " GeV. " << G4endl;
<< minQGSP_proton/CLHEP::GeV << " to "
<< maxFTFP_proton/CLHEP::GeV << " GeV. " << G4endl;
G4cout << " -- quasiElastic: " << QuasiElasticQGS << " for QGS "
<< " and " << QuasiElasticFTF << " for FTF" << G4endl;
}
@@ -57,7 +57,6 @@
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HadronInelasticProcess.hh"
#include "G4NeutronCaptureProcess.hh"
@@ -69,9 +68,7 @@
#include "G4NeutronHPInelasticXS.hh"
#include "G4NeutronHPInelasticVI.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4ParticleHPInelastic.hh"
#include "G4NeutronFissionVI.hh"
#include "G4ProcessVector.hh"
#include "G4ProcessManager.hh"
#include "G4NuDEXNeutronCaptureModel.hh"
@@ -83,18 +80,16 @@
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
G4HadronPhysicsQGSP_BERT_HP::G4HadronPhysicsQGSP_BERT_HP(G4int verb)
: G4HadronPhysicsQGSP_BERT_HP("hInelastic QGSP_BERT_HP")
: G4HadronPhysicsQGSP_BERT_HP("hInelastic QGSP_BERT_HP")
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
G4HadronPhysicsQGSP_BERT_HP::G4HadronPhysicsQGSP_BERT_HP(const G4String& name, G4bool /*quasiElastic */ )
: G4HadronPhysicsQGSP_BERT(name)
G4HadronPhysicsQGSP_BERT_HP::G4HadronPhysicsQGSP_BERT_HP(const G4String& name, G4bool)
: G4HadronPhysicsQGSP_BERT(name)
{
minBERT_neutron = 19.9*MeV;
auto param = G4HadronicParameters::Instance();
// HP is inconsistent with the neutron general process
param->SetEnableNeutronGeneralProcess(false);
G4HadronicParameters::Instance();
}
void G4HadronPhysicsQGSP_BERT_HP::Neutron()
@@ -106,19 +101,19 @@ void G4HadronPhysicsQGSP_BERT_HP::Neutron()
auto inel = new G4HadronInelasticProcess( "neutronInelastic", neutron );
neutron->GetProcessManager()->AddDiscreteProcess(inel);
G4QGSPNeutronBuilder qgs(QuasiElasticQGS);
qgs.SetMinEnergy(minQGSP_neutron);
qgs.Build(inel);
G4QGSPNeutronBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_neutron );
qgs.Build( inel );
G4FTFPNeutronBuilder ftf(QuasiElasticFTF);
ftf.SetMinEnergy(minFTFP_neutron);
ftf.SetMaxEnergy(maxFTFP_neutron);
ftf.Build(inel);
G4FTFPNeutronBuilder ftf( QuasiElasticFTF );
ftf.SetMinEnergy( minFTFP_neutron );
ftf.SetMaxEnergy( maxFTFP_neutron );
ftf.Build( inel );
G4BertiniNeutronBuilder bert;
bert.SetMinEnergy(minBERT_neutron);
bert.SetMaxEnergy(maxBERT_neutron);
bert.Build(inel);
bert.SetMinEnergy( minBERT_neutron );
bert.SetMaxEnergy( maxBERT_neutron );
bert.Build( inel );
auto xsinel = new G4NeutronInelasticXS();
inel->AddDataSet( xsinel );
@@ -41,245 +41,25 @@
//
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsQGSP_BIC.hh"
#include "G4PiKBuilder.hh"
#include "G4FTFPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4PhysListUtil.hh"
#include "G4HadParticles.hh"
#include "G4HadronicParameters.hh"
#include "G4HadronicBuilder.hh"
#include "G4BuilderType.hh"
#include "G4PhysicsConstructorFactory.hh"
#include "G4HadronicParameters.hh"
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(G4int verb)
: G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC",true)
: G4HadronPhysicsQGSP_BIC("hInelastic QGSP_BIC", true)
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(const G4String& name, G4bool)
: G4VPhysicsConstructor(name)
G4HadronPhysicsQGSP_BIC::G4HadronPhysicsQGSP_BIC(const G4String& name, G4bool b)
: G4HadronPhysicsQGSP_BERT(name, b)
{
SetPhysicsType(bHadronInelastic);
QuasiElasticFTF= false; // Use built-in quasi-elastic (not add-on)
QuasiElasticQGS= true; // For QGS, it must use it.
G4HadronicParameters* param = G4HadronicParameters::Instance();
minQGSP_proton = minQGSP_neutron = minQGSP_pik =
param->GetMinEnergyTransitionQGS_FTF();
maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik =
param->GetMaxEnergyTransitionQGS_FTF();
minFTFP_proton = minFTFP_neutron = minFTFP_pik =
param->GetMinEnergyTransitionFTF_Cascade();
maxBIC_proton = maxBIC_neutron = maxBERT_pik =
param->GetMaxEnergyTransitionFTF_Cascade();
minBIC_proton = minBIC_neutron = 0.0;
maxBIC_proton = maxBIC_neutron = 1.5*CLHEP::GeV;
minBERT_proton = minBERT_neutron = 1.0*CLHEP::GeV;
G4HadronicParameters::Instance()->SetEnableBCParticles(false);
G4HadronicParameters::Instance()->SetUseRFilesForXS(true);
}
void G4HadronPhysicsQGSP_BIC::CreateModels()
{
Neutron();
Proton();
Pion();
Others();
}
void G4HadronPhysicsQGSP_BIC::Neutron()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgs = new G4QGSPNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFPNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bic = new G4BinaryNeutronBuilder;
AddBuilder(bic);
bic->SetMinEnergy(minBIC_neutron);
bic->SetMaxEnergy(maxBIC_neutron);
neu->RegisterMe(bic);
neu->Build();
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
if(inel) {
inel->AddDataSet(new G4NeutronInelasticXS());
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
if (capture) {
capture->RegisterMe(new G4NeutronRadCapture());
}
}
void G4HadronPhysicsQGSP_BIC::Proton()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSPProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFPProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bic = new G4BinaryProtonBuilder;
AddBuilder(bic);
bic->SetMinEnergy(minBIC_proton);
bic->SetMaxEnergy(maxBIC_proton);
pro->RegisterMe(bic);
pro->Build();
const G4ParticleDefinition* proton = G4Proton::Proton();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton);
if(inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
}
void G4HadronPhysicsQGSP_BIC::Pion()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pik = new G4PiKBuilder();
AddBuilder(pik);
auto qgs = new G4QGSPPiKBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_pik);
pik->RegisterMe(qgs);
auto ftf = new G4FTFPPiKBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMaxEnergy(maxFTFP_pik);
ftf->SetMinEnergy(minFTFP_pik);
pik->RegisterMe(ftf);
auto bert = new G4BertiniPiKBuilder();
AddBuilder(bert);
bert->SetMaxEnergy(maxBERT_pik);
pik->RegisterMe(bert);
pik->Build();
// add cross section factor
if( useFactorXS ) {
const G4ParticleDefinition* pion = G4PionPlus::PionPlus();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(pion);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
pion = G4PionMinus::PionMinus();
inel = G4PhysListUtil::FindInelasticProcess(pion);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for( auto & pdg : G4HadParticles::GetKaons() ) {
auto part = table->FindParticle( pdg );
if ( part == nullptr ) { continue; }
inel = G4PhysListUtil::FindInelasticProcess(part);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() );
}
}
}
}
void G4HadronPhysicsQGSP_BIC::Others()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
// high energy particles
if( param->GetMaxEnergy() > param->EnergyThresholdForHeavyHadrons() ) {
// anti light ions
G4HadronicBuilder::BuildAntiLightIonsFTFP();
// hyperons
G4HadronicBuilder::BuildHyperonsQGSP_FTFP_BERT(true);
// b-, c- baryons and mesons
if( param->EnableBCParticles() ) {
G4HadronicBuilder::BuildBCHadronsQGSP_FTFP_BERT(true);
}
}
}
G4HadronPhysicsQGSP_BIC::~G4HadronPhysicsQGSP_BIC()
{}
void G4HadronPhysicsQGSP_BIC::ConstructParticle()
{
G4MesonConstructor pMesonConstructor;
pMesonConstructor.ConstructParticle();
G4BaryonConstructor pBaryonConstructor;
pBaryonConstructor.ConstructParticle();
G4ShortLivedConstructor pShortLivedConstructor;
pShortLivedConstructor.ConstructParticle();
G4IonConstructor pIonConstructor;
pIonConstructor.ConstructParticle();
}
void G4HadronPhysicsQGSP_BIC::ConstructProcess()
{
// allow changing of parameters at PreInit
G4HadronicParameters* param = G4HadronicParameters::Instance();
minQGSP_proton = minQGSP_neutron = minQGSP_pik =
param->GetMinEnergyTransitionQGS_FTF();
maxFTFP_proton = maxFTFP_neutron = maxFTFP_pik =
param->GetMaxEnergyTransitionQGS_FTF();
minFTFP_proton = minFTFP_neutron = minFTFP_pik =
param->GetMinEnergyTransitionFTF_Cascade();
maxBIC_proton = maxBIC_neutron = maxBERT_pik =
param->GetMaxEnergyTransitionFTF_Cascade();
if(G4Threading::IsMasterThread() && param->GetVerboseLevel() > 0) {
DumpBanner();
}
CreateModels();
}
@@ -33,16 +33,17 @@
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ProtonBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4ProtonPHPBuilder.hh"
#include "G4ProcessVector.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4ProcessManager.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
#include "G4HadronicParameters.hh"
#include "G4HadronInelasticProcess.hh"
#include "G4Proton.hh"
#include "G4ParticleInelasticXS.hh"
#include "G4ParticleHPInelasticData.hh"
#include "G4ParticleHPInelastic.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
@@ -62,36 +63,45 @@ G4HadronPhysicsQGSP_BIC_AllHP::G4HadronPhysicsQGSP_BIC_AllHP( const G4String& na
maxHP_proton = 200.0*CLHEP::MeV;
}
void G4HadronPhysicsQGSP_BIC_AllHP::Proton() {
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pro = new G4ProtonBuilder;
AddBuilder( pro );
auto qgs = new G4QGSPProtonBuilder( QuasiElasticQGS );
AddBuilder( qgs );
qgs->SetMinEnergy( minQGSP_proton );
pro->RegisterMe( qgs );
auto ftf = new G4FTFPProtonBuilder( QuasiElasticFTF );
AddBuilder( ftf );
ftf->SetMinEnergy( minFTFP_proton );
ftf->SetMaxEnergy( maxFTFP_proton );
pro->RegisterMe( ftf );
auto bic = new G4BinaryProtonBuilder;
AddBuilder( bic );
bic->SetMinEnergy( minBIC_proton );
bic->SetMaxEnergy( maxBIC_proton );
pro->RegisterMe( bic );
auto hp = new G4ProtonPHPBuilder;
AddBuilder( hp );
hp->SetMaxEnergy( maxHP_proton );
pro->RegisterMe( hp );
pro->Build();
G4ParticleDefinition* proton = G4Proton::Proton();
auto inel = new G4HadronInelasticProcess( "protonInelastic", proton );
proton->GetProcessManager()->AddDiscreteProcess(inel);
const G4ParticleDefinition* proton = G4Proton::Proton();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton);
if(nullptr != inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
G4QGSPProtonBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_proton );
qgs.Build( inel );
G4FTFPProtonBuilder ftf( QuasiElasticFTF );
ftf.SetMinEnergy( minFTFP_proton );
ftf.SetMaxEnergy( maxFTFP_proton );
ftf.Build( inel );
if ( maxBERT_proton > minBERT_proton ) {
G4BertiniProtonBuilder bert;
bert.SetMinEnergy( minBERT_proton );
bert.SetMaxEnergy( maxBERT_proton );
bert.Build( inel );
}
if ( maxBIC_proton > 0.0 ) {
G4BinaryProtonBuilder bic;
bic.SetMinEnergy( minBIC_proton );
bic.SetMaxEnergy( maxBIC_proton );
bic.Build( inel );
}
auto xsinel = new G4ParticleInelasticXS( proton );
inel->AddDataSet( xsinel );
inel->AddDataSet( new G4ParticleHPInelasticData( proton ) );
auto mod = new G4ParticleHPInelastic( proton, "ProtonHPInelastic" );
mod->SetMaxEnergy( maxHP_proton );
inel->RegisterMe( mod );
if ( useFactorXS )
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
@@ -53,16 +53,19 @@
#include "G4FTFPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4NeutronRadCapture.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4NeutronRadCaptureHP.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4NeutronInelasticXS.hh"
#include "G4ParticleHPInelastic.hh"
#include "G4ParticleHPInelasticData.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
#include "G4ProcessVector.hh"
#include "G4NeutronHPFissionData.hh"
#include "G4NeutronHPFission.hh"
#include "G4ProcessManager.hh"
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
#include "G4HadronicParameters.hh"
#include "G4NuDEXNeutronCaptureModel.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
//
@@ -70,7 +73,7 @@ G4_DECLARE_PHYSCONSTR_FACTORY( G4HadronPhysicsQGSP_BIC_HP );
G4HadronPhysicsQGSP_BIC_HP::G4HadronPhysicsQGSP_BIC_HP(G4int verb)
: G4HadronPhysicsQGSP_BIC_HP( "hInelastic QGSP_BIC_HP" )
: G4HadronPhysicsQGSP_BIC_HP( "hInelastic QGSP_BIC_HP", true )
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
@@ -78,50 +81,63 @@ G4HadronPhysicsQGSP_BIC_HP::G4HadronPhysicsQGSP_BIC_HP(G4int verb)
G4HadronPhysicsQGSP_BIC_HP::G4HadronPhysicsQGSP_BIC_HP( const G4String& name, G4bool quasiElastic )
: G4HadronPhysicsQGSP_BIC( name, quasiElastic )
{
minBIC_neutron = 19.9*MeV;
minBIC_neutron = 19.9*CLHEP::MeV;
G4HadronicParameters::Instance()->SetUseRFilesForXS(false);
}
void G4HadronPhysicsQGSP_BIC_HP::Neutron() {
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder( neu );
auto qgs = new G4QGSPNeutronBuilder( QuasiElasticQGS );
AddBuilder( qgs );
qgs->SetMinEnergy( minQGSP_neutron );
neu->RegisterMe( qgs );
auto ftf = new G4FTFPNeutronBuilder( QuasiElasticFTF );
AddBuilder( ftf );
ftf->SetMinEnergy( minFTFP_neutron );
ftf->SetMaxEnergy( maxFTFP_neutron );
neu->RegisterMe( ftf );
auto bic = new G4BinaryNeutronBuilder;
AddBuilder( bic );
bic->SetMinEnergy( minBIC_neutron );
bic->SetMaxEnergy( maxBIC_neutron );
neu->RegisterMe( bic );
auto hp = new G4NeutronPHPBuilder;
AddBuilder( hp );
neu->RegisterMe( hp );
neu->Build();
G4ParticleDefinition* neutron = G4Neutron::Neutron();
auto inel = new G4HadronInelasticProcess( "neutronInelastic", neutron );
neutron->GetProcessManager()->AddDiscreteProcess( inel );
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess( neutron );
if(inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
G4QGSPNeutronBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_neutron );
qgs.Build( inel );
G4FTFPNeutronBuilder ftf( QuasiElasticFTF );
ftf.SetMinEnergy(minFTFP_neutron);
ftf.SetMaxEnergy(maxFTFP_neutron);
ftf.Build( inel );
if ( maxBERT_neutron > minBERT_neutron) {
G4BertiniNeutronBuilder bert;
bert.SetMinEnergy( minBERT_neutron );
bert.SetMaxEnergy( maxBERT_neutron );
bert.Build( inel );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess( neutron );
if ( capture ) {
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture;
theNeutronRadCapture->SetMinEnergy( minBIC_neutron );
capture->RegisterMe( theNeutronRadCapture );
if ( maxBIC_neutron > 0.0 ) {
G4BinaryNeutronBuilder bic;
bic.SetMinEnergy( minBIC_neutron );
bic.SetMaxEnergy( maxBIC_neutron );
bic.Build( inel );
}
G4HadronicProcess* fission = G4PhysListUtil::FindFissionProcess( neutron );
if ( fission ) {
G4LFission* theNeutronLEPFission = new G4LFission;
theNeutronLEPFission->SetMinEnergy( minBIC_neutron );
theNeutronLEPFission->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
fission->RegisterMe( theNeutronLEPFission );
auto xsinel = new G4NeutronInelasticXS();
inel->AddDataSet( xsinel );
inel->AddDataSet( new G4ParticleHPInelasticData( neutron ) );
auto mod = new G4ParticleHPInelastic( neutron, "NeutronHPInelastic" );
mod->SetMaxEnergy( 20*CLHEP::MeV );
inel->RegisterMe( mod );
if ( useFactorXS )
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
auto capture = new G4NeutronCaptureProcess( "nCaptureHP" );
neutron->GetProcessManager()->AddDiscreteProcess(capture);
capture->AddDataSet( new G4NeutronHPCaptureData() );
if (param->EnableNUDEX()) {
capture->RegisterMe( new G4NuDEXNeutronCaptureModel() );
} else {
capture->RegisterMe( new G4NeutronRadCaptureHP() );
}
auto fission = new G4NeutronFissionProcess( "nFissionHP" );
neutron->GetProcessManager()->AddDiscreteProcess(fission);
fission->RegisterMe( new G4NeutronHPFission() );
fission->AddDataSet( new G4ParticleHPFissionData() );
}
@@ -56,6 +56,3 @@ G4HadronPhysicsQGSP_FTFP_BERT::G4HadronPhysicsQGSP_FTFP_BERT(const G4String& nam
G4HadronicParameters::Instance()->SetEnableBCParticles(true);
}
G4HadronPhysicsQGSP_FTFP_BERT::~G4HadronPhysicsQGSP_FTFP_BERT()
{}
@@ -35,7 +35,6 @@
//
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsQGS_BIC.hh"
#include "G4PionBuilder.hh"
@@ -49,18 +48,17 @@
#include "G4FTFBinaryKaonBuilder.hh"
#include "G4QGSBinaryKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFBinaryProtonBuilder.hh"
#include "G4QGSBinaryProtonBuilder.hh"
#include "G4BinaryProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFBinaryNeutronBuilder.hh"
#include "G4QGSBinaryNeutronBuilder.hh"
#include "G4BinaryNeutronBuilder.hh"
#include "G4ParticleInelasticXS.hh"
#include "globals.hh"
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
@@ -72,6 +70,7 @@
#include "G4PhysListUtil.hh"
#include "G4HadParticles.hh"
#include "G4HadronicParameters.hh"
#include "G4ProcessManager.hh"
#include "G4PhysicsConstructorFactory.hh"
//
@@ -86,49 +85,47 @@ G4HadronPhysicsQGS_BIC::G4HadronPhysicsQGS_BIC(G4int verb)
G4HadronPhysicsQGS_BIC::G4HadronPhysicsQGS_BIC(const G4String& name, G4bool qe)
: G4HadronPhysicsQGSP_BERT(name, qe)
{
minBERT_pion = 1.0*GeV;
maxBIC_pion = 1.5*GeV;
maxBIC_proton = maxBIC_neutron = 1.5*CLHEP::GeV;
minBERT_proton = minBERT_neutron = 1.0*CLHEP::GeV;
}
G4HadronPhysicsQGS_BIC::~G4HadronPhysicsQGS_BIC()
{}
void G4HadronPhysicsQGS_BIC::Neutron()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
//General schema:
// 1) Create a builder
// 2) Call AddBuilder
// 3) Configure the builder, possibly with sub-builders
// 4) Call builder->Build()
auto neu = new G4NeutronBuilder;
AddBuilder(neu);
auto qgs = new G4QGSBinaryNeutronBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_neutron);
neu->RegisterMe(qgs);
auto ftf = new G4FTFBinaryNeutronBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_neutron);
ftf->SetMaxEnergy(maxFTFP_neutron);
neu->RegisterMe(ftf);
auto bicn = new G4BinaryNeutronBuilder;
AddBuilder(bicn);
bicn->SetMaxEnergy(maxBERT_neutron);
neu->RegisterMe(bicn);
neu->Build();
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
if(inel) {
inel->AddDataSet(new G4NeutronInelasticXS());
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
auto inel = new G4HadronInelasticProcess( "neutronInelastic", neutron );
neutron->GetProcessManager()->AddDiscreteProcess( inel );
G4QGSBinaryNeutronBuilder qgs( QuasiElasticQGS );
qgs.SetMinEnergy( minQGSP_neutron );
qgs.Build( inel );
G4FTFBinaryNeutronBuilder ftf( QuasiElasticFTF );
ftf.SetMinEnergy( minFTFP_neutron );
ftf.SetMaxEnergy( maxFTFP_neutron );
ftf.Build( inel );
G4BertiniNeutronBuilder bert;
bert.SetMinEnergy( minBERT_neutron );
bert.SetMaxEnergy( maxBERT_neutron );
bert.Build( inel );
if ( maxBIC_neutron > 0.0 ) {
G4BinaryNeutronBuilder bic;
bic.SetMaxEnergy( maxBIC_neutron );
bic.Build( inel );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
if (capture) {
capture->RegisterMe(new G4NeutronRadCapture());
inel->AddDataSet( new G4NeutronInelasticXS() );
if ( useFactorXS ) {
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
auto capture = new G4NeutronCaptureProcess( "nCaptureXS" );
neutron->GetProcessManager()->AddDiscreteProcess(capture);
capture->AddDataSet( new G4NeutronCaptureXS() );
capture->RegisterMe( new G4NeutronRadCapture() );
}
void G4HadronPhysicsQGS_BIC::Proton()
@@ -136,93 +133,34 @@ void G4HadronPhysicsQGS_BIC::Proton()
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pro = new G4ProtonBuilder;
AddBuilder(pro);
auto qgs = new G4QGSBinaryProtonBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_proton);
pro->RegisterMe(qgs);
auto ftf = new G4FTFBinaryProtonBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_proton);
ftf->SetMaxEnergy(maxFTFP_proton);
pro->RegisterMe(ftf);
auto bic = new G4BinaryProtonBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBERT_proton);
pro->RegisterMe(bic);
pro->Build();
const G4ParticleDefinition* proton = G4Proton::Proton();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(proton);
if(inel) {
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
}
void G4HadronPhysicsQGS_BIC::Pion()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto pi = new G4PionBuilder;
AddBuilder(pi);
auto qgs = new G4QGSBinaryPionBuilder(QuasiElasticQGS);
AddBuilder(qgs);
qgs->SetMinEnergy(minQGSP_pik);
pi->RegisterMe(qgs);
auto ftf = new G4FTFBinaryPionBuilder(QuasiElasticFTF);
AddBuilder(ftf);
ftf->SetMinEnergy(minFTFP_pik);
ftf->SetMaxEnergy(maxFTFP_pik);
pi->RegisterMe(ftf);
auto bert = new G4BertiniPionBuilder;
AddBuilder(bert);
bert->SetMinEnergy(minBERT_pion);
bert->SetMaxEnergy(maxBERT_pik);
pi->RegisterMe(bert);
auto bic = new G4BinaryPionBuilder;
AddBuilder(bic);
bic->SetMaxEnergy(maxBIC_pion);
pi->RegisterMe(bic);
pi->Build();
auto k = new G4KaonBuilder;
AddBuilder(k);
auto qgsk = new G4QGSBinaryKaonBuilder(QuasiElasticQGS);
AddBuilder(qgsk);
qgsk->SetMinEnergy(minQGSP_pik);
k->RegisterMe(qgsk);
auto ftfk = new G4FTFBinaryKaonBuilder(QuasiElasticFTF);
AddBuilder(ftfk);
ftfk->SetMaxEnergy(maxFTFP_pik);
k->RegisterMe(ftfk);
auto bertk = new G4BertiniKaonBuilder;
AddBuilder(bertk);
bertk->SetMaxEnergy(maxBERT_pik);
k->RegisterMe(bertk);
k->Build();
// add cross section factor
if( useFactorXS ) {
const G4ParticleDefinition* pion = G4PionPlus::PionPlus();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(pion);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
pion = G4PionMinus::PionMinus();
inel = G4PhysListUtil::FindInelasticProcess(pion);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorPionInelastic() );
}
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for( auto & pdg : G4HadParticles::GetKaons() ) {
auto part = table->FindParticle( pdg );
if ( part == nullptr ) { continue; }
inel = G4PhysListUtil::FindInelasticProcess(part);
if(inel) {
inel->MultiplyCrossSectionBy( param->XSFactorHadronInelastic() );
}
}
auto inel = new G4HadronInelasticProcess( "protonInelastic", proton );
proton->GetProcessManager()->AddDiscreteProcess( inel );
G4QGSBinaryProtonBuilder qgs(QuasiElasticQGS);
qgs.SetMinEnergy(minQGSP_proton);
qgs.Build( inel );
G4FTFBinaryProtonBuilder ftf(QuasiElasticFTF);
ftf.SetMinEnergy( minFTFP_proton );
ftf.SetMaxEnergy( maxFTFP_proton );
ftf.Build( inel );
G4BertiniProtonBuilder bert;
bert.SetMinEnergy( minBERT_proton );
bert.SetMaxEnergy( maxBERT_proton );
bert.Build( inel );
if ( maxBIC_proton > 0.0 ) {
G4BinaryProtonBuilder bic;
bic.SetMaxEnergy( maxBIC_proton);
bic.Build( inel );
}
auto xsinel = new G4ParticleInelasticXS( proton );
inel->AddDataSet( xsinel );
if ( useFactorXS ) {
inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
}
@@ -42,7 +42,6 @@
// is now done in G4HadronPhysicsLEND
//----------------------------------------------------------------------------
//
#include <iomanip>
#include "G4HadronPhysicsShielding.hh"
@@ -50,37 +49,12 @@
#include "G4ios.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4PionBuilder.hh"
#include "G4BertiniPionBuilder.hh"
#include "G4FTFPPionBuilder.hh"
#include "G4KaonBuilder.hh"
#include "G4BertiniKaonBuilder.hh"
#include "G4FTFPKaonBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4FTFPProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4FTFPNeutronBuilder.hh"
#include "G4NeutronPHPBuilder.hh"
#include "G4HyperonBuilder.hh"
#include "G4HyperonFTFPBuilder.hh"
#include "G4AntiBarionBuilder.hh"
#include "G4FTFPAntiBarionBuilder.hh"
#include "G4ParticleHPBGGNucleonInelasticXS.hh"
#include "G4ParticleHPJENDLHEInelasticData.hh"
#include "G4ParticleHPInelasticData.hh"
#include "G4HadronPhysicsLEND.hh" // used to access const maxLEND_Energy
@@ -89,10 +63,8 @@
#include "G4CrossSectionDataSetRegistry.hh"
#include "G4PhysListUtil.hh"
#include "G4ComponentGGHadronNucleusXsc.hh"
#include "G4CrossSectionInelastic.hh"
#include "G4NeutronRadCapture.hh"
#include "G4NeutronCaptureXS.hh"
#include "G4ParticleHPCaptureData.hh"
#include "G4LFission.hh"
@@ -106,86 +78,76 @@
//
G4_DECLARE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding);
G4HadronPhysicsShielding::G4HadronPhysicsShielding(G4int verb)
: G4HadronPhysicsShielding()
: G4HadronPhysicsShielding("hInelastic Shielding", false)
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name)
: G4HadronPhysicsShielding(name, false)
: G4HadronPhysicsShielding(name, false)
{}
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4bool qe)
: G4HadronPhysicsFTFP_BERT(name, qe), useLEND_(false), evaluation_("")
: G4HadronPhysicsFTFP_BERT(name, qe)
{
minBERT_neutron = maxLEND_Energy - overlapLEND_Energy;
minBERT_neutron = maxLEND_Energy - overlapLEND_Energy;
}
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4int verb)
: G4HadronPhysicsShielding(name, false)
: G4HadronPhysicsShielding(name, false)
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
}
G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4int verb,
G4double minFTFPEnergy, G4double maxBertiniEnergy)
: G4HadronPhysicsShielding(name, false)
: G4HadronPhysicsShielding(name, false)
{
G4HadronicParameters::Instance()->SetVerboseLevel(verb);
minFTFP_pion = minFTFPEnergy;
maxBERT_pion = maxBertiniEnergy;
minFTFP_kaon = minFTFPEnergy;
maxBERT_kaon = maxBertiniEnergy;
minFTFP_proton = minFTFPEnergy;
maxBERT_proton = maxBertiniEnergy;
minFTFP_neutron = minFTFPEnergy;
maxBERT_neutron = maxBertiniEnergy;
auto param = G4HadronicParameters::Instance();
param->SetVerboseLevel( verb );
param->SetMinEnergyTransitionFTF_Cascade( minFTFPEnergy );
param->SetMaxEnergyTransitionFTF_Cascade( maxBertiniEnergy );
}
G4HadronPhysicsShielding::~G4HadronPhysicsShielding()
{}
void G4HadronPhysicsShielding::Neutron()
{
G4HadronicParameters* param = G4HadronicParameters::Instance();
G4bool useFactorXS = param->ApplyFactorXS();
auto neu = new G4NeutronBuilder( true ); // Fission on
AddBuilder(neu);
auto ftfpneu = new G4FTFPNeutronBuilder(QuasiElastic);
AddBuilder(ftfpneu);
ftfpneu->SetMinEnergy(minFTFP_neutron);
neu->RegisterMe(ftfpneu);
auto bertneu = new G4BertiniNeutronBuilder;
AddBuilder(bertneu);
bertneu->SetMaxEnergy(maxBERT_neutron);
bertneu->SetMinEnergy(minBERT_neutron);
neu->RegisterMe(bertneu);
if( ! useLEND_) {
auto hpneu = new G4NeutronPHPBuilder;
AddBuilder(hpneu);
neu->RegisterMe(hpneu);
G4NeutronBuilder neu( true ); // Fission on
G4FTFPNeutronBuilder ftfpneu( QuasiElastic );
ftfpneu.SetMinEnergy( minFTFP_neutron );
neu.RegisterMe( &ftfpneu );
G4BertiniNeutronBuilder bertneu;
bertneu.SetMaxEnergy( maxBERT_neutron );
bertneu.SetMinEnergy( minBERT_neutron );
neu.RegisterMe( &bertneu );
if ( !useLEND_) {
G4NeutronPHPBuilder hpneu;
neu.RegisterMe( &hpneu );
}
neu->Build();
neu.Build();
const G4ParticleDefinition* neutron = G4Neutron::Neutron();
G4HadronicProcess* inel = G4PhysListUtil::FindInelasticProcess(neutron);
if(inel) {
if ( nullptr != inel ) {
// Register the G4ParticleHPJENDLHEInelasticData as the 2nd priority.
inel->GetCrossSectionDataStore()->AddDataSet( new G4ParticleHPJENDLHEInelasticData, 1 );
if( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
if ( useFactorXS ) inel->MultiplyCrossSectionBy( param->XSFactorNucleonInelastic() );
}
G4HadronicProcess* capture = G4PhysListUtil::FindCaptureProcess(neutron);
if (capture) {
if ( nullptr != capture ) {
G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
theNeutronRadCapture->SetMinEnergy( minBERT_neutron );
capture->RegisterMe( theNeutronRadCapture );
}
G4HadronicProcess* fission = G4PhysListUtil::FindFissionProcess(neutron);
if (fission) {
if ( nullptr != fission ) {
G4LFission* theNeutronLEPFission = new G4LFission();
theNeutronLEPFission->SetMinEnergy( minBERT_neutron );
theNeutronLEPFission->SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
@@ -193,13 +155,4 @@ void G4HadronPhysicsShielding::Neutron()
}
}
void G4HadronPhysicsShielding::ConstructProcess()
{
if ( G4Threading::IsMasterThread() &&
G4HadronicParameters::Instance()->GetVerboseLevel() > 0) {
DumpBanner();
}
CreateModels();
}
@@ -76,6 +76,3 @@ G4HadronPhysicsShieldingLEND::G4HadronPhysicsShieldingLEND(
useLEND_ = true;
}
G4HadronPhysicsShieldingLEND::~G4HadronPhysicsShieldingLEND()
{}