Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -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!
## 2024-11-08 Alberto Ribon (phys-ctor-hinelastic-V11-02-02)
- README : updated information for the coming release 11.3.
## 2024-10-22 Alberto Ribon (phys-ctor-hinelastic-V11-02-01)
- Introduced new class G4URRNeutrons to enable the special treatment of the
Unresolved Resonance Region (URR) via Particle Tables (PT) for low-energy
neutrons. It can be used on top of any _HP or _HPT physics list.
## 2024-06-06 Vladimir Ivanchenko (phys-ctor-hinelastic-V11-02-00)
- G4HadrocPhysicsQGSP_BERT_HP - used alternative NUDEX model of gamma de-excitation
@@ -211,17 +211,25 @@ G4HadronPhysicsQGSP_FTFP_BERT
---------------------------
Similar to G4HadronPhysicsQGSP_BERT, but with a different treatment of
low-energy neutrons:
- neutron inelastic: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section;
final-state: BERT between 19.9 MeV and 6 GeV,
- neutron inelastic: for cross section, use G4NeutronHPInelasticXS
below 20 MeV, and G4NeutronInelasticXS above;
for final-state model, use G4NeutronHPInelasticVI
below 20 MeV, BERT between 19.9 MeV and 6 GeV,
FTFP between 3 and 25 GeV, QGSP above 12 GeV.
- neutron capture: use NeutronHP (for both cross section and final state)
below 20 MeV; above G4NeutronCaptureXS cross section
and G4NeutronRadCapture final-state.
- neutron fission: use NeutronHP (for both cross section and final state)
below 20 MeV; above Gheisha (cross section and final state).
Moreover, RadioactiveDecay is activated (as in all the physics lists that use HP).
- neutron capture: use G4NeutronHPCaptureXS cross section and
G4NeutronRadCaptureHP final-state model
(Note: if NuDEX is enabled (by default it is not),
then G4NuDEXNeutronCaptureModel final-state
model is used instead of G4NeutronRadCaptureHP).
- neutron fission: use G4NeutronHPFissionXS cross section and
G4NeutronFissionVI final-state model.
Moreover, RadioactiveDecay is activated (as in all the physics lists that use HP)
Important warning: since G4 11.2, this constructor is different than all
other HP-based constructors for the treatment of neutrons
below 20 MeV : new "experimental" cross sections and
final-state models - which are different from the HP ones -
are utilised for testing, and therefore we recommend to
not using them for physics studies.
G4HadronPhysicsQGSP_BIC
-----------------------
@@ -300,3 +308,17 @@ G4HadronPhysicsQGSP_FTFP_BERT
----------------
Utility class which provides useful methods.
G4URRNeutrons
-------------
Physics list constructor that can be applied on top of any _HP or _HPT based
physics list, to enable the special Unresolved Resonance Region (URR) treatment
of low-energy neutrons based on Particle Table (PT).
Notes:
- If this constructor is applied on top of a non-HP based physics list,
then nothing changes and a warning is printed out.
- If this constructor is applied on top of a HP-based physics list,
and the thermal scattering is applied after G4URRNeutrons, then
there will be a problem of full overlappings between models.
Therefore, if you need thermal scattering, activate it (e.g. by
using a HPT-based physics list) before applying G4URRNeutrons.
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// ClassName: G4URRNeutrons
//
// Author: Alberto Ribon - October 2024
//
// Description: Physics list constructor that can be applied on top of any
// _HP or _HPT based physics list.
// This class enables the special Unresolved Resonance Region
// (URR) treatment of low-energy neutrons based on Particle
// Table (PT).
// If this constructor is applied on top of a non-HP based
// physics list, then nothing is done (i.e. the physics list
// remains as it was originally, and a warning is printed out).
//
// Modified:
//
//----------------------------------------------------------------------------
//
// Addition of neutron thermal scattering on top of any PhysicsList
#ifndef G4URRNeutrons_h
#define G4URRNeutrons_h
#include "G4VHadronPhysics.hh"
#include "globals.hh"
class G4URRNeutrons : public G4VHadronPhysics {
public:
explicit G4URRNeutrons( G4int ver = 1 );
virtual ~G4URRNeutrons();
void ConstructProcess() override;
};
#endif
@@ -7,43 +7,45 @@ geant4_add_module(G4phys_ctor_hinelastic
G4HadronInelasticQBBC_ABLA.hh
G4HadronPhysicsFTF_BIC.hh
G4HadronPhysicsFTFP_BERT.hh
G4HadronPhysicsFTFP_BERT_ATL.hh
G4HadronPhysicsFTFP_BERT_HP.hh
G4HadronPhysicsFTFP_BERT_TRV.hh
G4HadronPhysicsFTFP_BERT_ATL.hh
G4HadronPhysicsFTFQGSP_BERT.hh
G4HadronPhysicsINCLXX.hh
G4HadronPhysicsNuBeam.hh
G4HadronPhysicsQGS_BIC.hh
G4HadronPhysicsQGSP_BERT.hh
G4HadronPhysicsQGSP_BERT_HP.hh
G4HadronPhysicsQGSP_BIC.hh
G4HadronPhysicsQGSP_BIC_AllHP.hh
G4HadronPhysicsQGSP_BIC_HP.hh
G4HadronPhysicsQGSP_FTFP_BERT.hh
G4HadronPhysicsINCLXX.hh
G4HadronPhysicsShielding.hh
G4HadronPhysicsShieldingLEND.hh
G4URRNeutrons.hh
G4VHadronPhysics.hh
G4HadronPhysicsQGSP_BIC_AllHP.hh
SOURCES
G4HadronInelasticQBBC.cc
G4HadronInelasticQBBC_ABLA.cc
G4HadronPhysicsFTF_BIC.cc
G4HadronPhysicsFTFP_BERT.cc
G4HadronPhysicsFTFP_BERT_ATL.cc
G4HadronPhysicsFTFP_BERT_HP.cc
G4HadronPhysicsFTFP_BERT_TRV.cc
G4HadronPhysicsFTFP_BERT_ATL.cc
G4HadronPhysicsFTFQGSP_BERT.cc
G4HadronPhysicsINCLXX.cc
G4HadronPhysicsNuBeam.cc
G4HadronPhysicsQGS_BIC.cc
G4HadronPhysicsQGSP_BERT.cc
G4HadronPhysicsQGSP_BERT_HP.cc
G4HadronPhysicsQGSP_BIC.cc
G4HadronPhysicsQGSP_BIC_AllHP.cc
G4HadronPhysicsQGSP_BIC_HP.cc
G4HadronPhysicsQGSP_FTFP_BERT.cc
G4HadronPhysicsINCLXX.cc
G4HadronPhysicsShielding.cc
G4HadronPhysicsShieldingLEND.cc
G4VHadronPhysics.cc
G4HadronPhysicsQGSP_BIC_AllHP.cc)
G4URRNeutrons.cc
G4VHadronPhysics.cc)
geant4_module_link_libraries(G4phys_ctor_hinelastic
PUBLIC
@@ -0,0 +1,222 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
//---------------------------------------------------------------------------
//
// ClassName: G4URRNeutrons
//
// Author: Alberto Ribon - October 2024
//
// Description: Physics list constructor that can be applied on top of any
// _HP or _HPT based physics list.
// This class enables the special Unresolved Resonance Region
// (URR) treatment of low-energy neutrons based on Particle
// Table (PT).
// If this constructor is applied on top of a non-HP based
// physics list, then nothing is done (i.e. the physics list
// remains as it was originally, and a warning is printed out).
//
// Modified:
//
//----------------------------------------------------------------------------
//
#include "G4URRNeutrons.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4HadronicProcess.hh"
#include "G4HadronicParameters.hh"
#include "G4ParticleHPElasticDataPT.hh"
#include "G4ParticleHPElasticURR.hh"
#include "G4ParticleHPCaptureDataPT.hh"
#include "G4ParticleHPCaptureURR.hh"
#include "G4ParticleHPFissionURR.hh"
#include "G4ParticleHPFissionDataPT.hh"
#include "G4ParticleHPInelasticDataPT.hh"
#include "G4ParticleHPInelasticURR.hh"
#include "G4BuilderType.hh"
#include "G4PhysListUtil.hh"
#include "G4SystemOfUnits.hh"
#include "G4PhysicsConstructorFactory.hh"
G4_DECLARE_PHYSCONSTR_FACTORY( G4URRNeutrons );
G4URRNeutrons::G4URRNeutrons( G4int ver ) : G4VHadronPhysics( "URRNeutrons", ver ) {}
G4URRNeutrons::~G4URRNeutrons() {}
void G4URRNeutrons::ConstructProcess() {
// Find elastic, capture, fission and inelastic processes of neutron
// (from the physics list on which this constructor is applied on top);
// then look at their hadronic final-state models in order to disable those that
// would otherwise fully overlap with the URR hadronic final-state models.
// Note that for disabling a hadronic model - not being defined the "DeRegister"
// method - it is enough to set to 0.0 the max energy of the model.
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 1 ) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4Neutron* part = G4Neutron::Neutron();
// Elastic (including, eventually, thermal scattering)
G4HadronicProcess* elasticProcess = G4PhysListUtil::FindElasticProcess( part );
if ( elasticProcess == nullptr ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron elastic treatment: "
<< "NOT found elastic process => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int niElastic = static_cast< G4int >( (elasticProcess->GetHadronicInteractionList()).size() );
if ( niElastic < 1 ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron elastic treatment: "
<< "NOT found any elastic model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int indexHPelastic = -1;
G4int indexHPthermalScattering = -1;
for ( G4int index = 0; index < niElastic; ++index ) {
if ( (elasticProcess->GetHadronicInteractionList())[index]->GetModelName() == "NeutronHPElastic" ) {
indexHPelastic = index;
} else if ( (elasticProcess->GetHadronicInteractionList())[index]->GetModelName() == "NeutronHPThermalScattering" ) {
indexHPthermalScattering = index;
}
}
if ( indexHPelastic >= 0 ) {
(elasticProcess->GetHadronicInteractionList())[indexHPelastic]->SetMaxEnergy( 0.0 ); // Disabled
G4cout << G4endl << " G4URRNeutrons::ConstructProcess() : found NeutronHPElastic => Disabled !" << G4endl;
} else {
G4cout << "### " << GetPhysicsName()
<< " WARNING: NOT found NeutronHPElastic => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4bool isThermalScatteringOn = false;
if ( indexHPthermalScattering > 0 ) isThermalScatteringOn = true;
elasticProcess->AddDataSet( new G4ParticleHPElasticDataPT );
elasticProcess->RegisterMe( new G4ParticleHPElasticURR( isThermalScatteringOn ) );
// Capture
G4HadronicProcess* captureProcess = G4PhysListUtil::FindCaptureProcess( part );
if ( captureProcess == nullptr ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron capture treatment: "
<< "NOT found capture process => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int niCapture = static_cast< G4int >( (captureProcess->GetHadronicInteractionList()).size() );
if ( niCapture < 1 ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron capture treatment: "
<< "NOT found any capture model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int indexHPcapture = -1;
for ( G4int index = 0; index < niCapture; ++index ) {
// For QGSP_BERT_HP, since G4 11.2, the neutron capture model is called either "nRadCaptureHP"
// or "nuDEX_neutronCapture" (the latter when NuDEX is used).
G4String nameNeutronCaptureModel = (captureProcess->GetHadronicInteractionList())[index]->GetModelName();
if ( nameNeutronCaptureModel == "NeutronHPCapture" ||
nameNeutronCaptureModel == "nRadCaptureHP" ||
nameNeutronCaptureModel == "nuDEX_neutronCapture" ) {
indexHPcapture = index;
}
}
if ( indexHPcapture >= 0 ) {
(captureProcess->GetHadronicInteractionList())[indexHPcapture]->SetMaxEnergy( 0.0 ); // Disabled
G4cout << G4endl << " G4URRNeutrons::ConstructProcess() : found "
<< (captureProcess->GetHadronicInteractionList())[indexHPcapture]->GetModelName()
<< " => Disabled !" << G4endl;
} else {
G4cout << "### " << GetPhysicsName()
<< " WARNING: NOT found any expected neutron capture model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
captureProcess->AddDataSet( new G4ParticleHPCaptureDataPT );
captureProcess->RegisterMe( new G4ParticleHPCaptureURR );
// Fission
G4HadronicProcess* fissionProcess = G4PhysListUtil::FindFissionProcess( part );
if ( fissionProcess == nullptr ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron fission treatment: "
<< "NOT found fission process => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int niFission = static_cast< G4int >( (fissionProcess->GetHadronicInteractionList()).size() );
if ( niFission < 1 ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron fission treatment: "
<< "NOT found any fission model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int indexHPfission = -1;
for ( G4int index = 0; index < niFission; ++index ) {
// For QGSP_BERT_HP, since G4 11.2, the neutron fission model is called "nFissionVI"
G4String nameNeutronFissionModel = (fissionProcess->GetHadronicInteractionList())[index]->GetModelName();
if ( nameNeutronFissionModel == "NeutronHPFission" || nameNeutronFissionModel == "nFissionVI" ) {
indexHPfission = index;
}
}
if ( indexHPfission >= 0 ) {
(fissionProcess->GetHadronicInteractionList())[indexHPfission]->SetMaxEnergy( 0.0 ); // Disabled
G4cout << G4endl << " G4URRNeutrons::ConstructProcess() : found "
<< (fissionProcess->GetHadronicInteractionList())[indexHPfission]->GetModelName() // Disabled
<< " => Disabled !" << G4endl;
} else {
G4cout << "### " << GetPhysicsName()
<< " WARNING: NOT found any expected neutron fission model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
fissionProcess->RegisterMe( new G4ParticleHPFissionURR );
fissionProcess->AddDataSet( new G4ParticleHPFissionDataPT );
// Inelastic
G4HadronicProcess* inelasticProcess = G4PhysListUtil::FindInelasticProcess( part );
if ( inelasticProcess == nullptr ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron inelastic treatment: "
<< "NOT found inelastic process => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int niInelastic = static_cast< G4int >( (inelasticProcess->GetHadronicInteractionList()).size() );
if ( niInelastic < 1 ) {
G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add URR neutron inelastic treatment: "
<< "NOT found any inelastic model => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
G4int indexHPinelastic = -1;
for ( G4int index = 0; index < niInelastic; ++index ) {
if ( (inelasticProcess->GetHadronicInteractionList())[index]->GetModelName() == "NeutronHPInelastic" ) {
indexHPinelastic = index;
}
}
if ( indexHPinelastic >= 0 ) {
(inelasticProcess->GetHadronicInteractionList())[indexHPinelastic]->SetMaxEnergy( 0.0 ); // Disabled
G4cout << G4endl << " G4URRNeutrons::ConstructProcess() : found NeutronHPInelastic => Disabled !" << G4endl;
} else {
G4cout << "### " << GetPhysicsName()
<< " WARNING: NOT found NeutronHPInelastic => G4URRNeutrons returns without doing anything !" << G4endl;
return;
}
inelasticProcess->AddDataSet( new G4ParticleHPInelasticDataPT );
inelasticProcess->RegisterMe( new G4ParticleHPInelasticURR );
}