Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
@@ -36,6 +36,7 @@
#include "G4ParticleHPThreadLocalManager.hh"
#include "G4ParticleHPMessenger.hh"
#include "G4HadronicException.hh"
#include "G4Exception.hh"
G4ParticleHPManager* G4ParticleHPManager::instance = 0;
@@ -46,6 +47,7 @@ G4ParticleHPManager::G4ParticleHPManager()
,NEGLECT_DOPPLER(false)
,DO_NOT_ADJUST_FINAL_STATE(false)
,PRODUCE_FISSION_FRAGMENTS(false)
,USE_WENDT_FISSION_MODEL(false)
,USE_NRESP71_MODEL(false)
,theElasticCrossSections(0)
,theCaptureCrossSections(0)
@@ -61,12 +63,73 @@ G4ParticleHPManager::G4ParticleHPManager()
,theTSInelasticFinalStates(0)
{
messenger = new G4ParticleHPMessenger( this );
if ( std::getenv( "G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE" ) || std::getenv("G4PHP_DO_NOT_ADJUST_FINAL_STATE") ) DO_NOT_ADJUST_FINAL_STATE = true;
if ( std::getenv( "G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION" ) ) USE_ONLY_PHOTONEVAPORATION = true;
if ( std::getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) || std::getenv("G4PHP_NEGLECT_DOPPLER") ) NEGLECT_DOPPLER = true;
if ( std::getenv( "G4NEUTRONHP_SKIP_MISSING_ISOTOPES" ) ) SKIP_MISSING_ISOTOPES = true;
if ( std::getenv( "G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS" ) ) PRODUCE_FISSION_FRAGMENTS = true;
if ( std::getenv( "G4PHP_USE_NRESP71_MODEL" ) ) USE_NRESP71_MODEL = true;
// The rest of this method will be removed in G4 11.0
if ( std::getenv( "G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE" ) ||
std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) {
DO_NOT_ADJUST_FINAL_STATE = true;
G4ExceptionDescription ed;
ed << "Environmental variables G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE and \n"
<< "G4PHP_DO_NOT_ADJUST_FINAL_STATE are valid but deprecated and will be replaced \n"
<< "with the UI command: /process/had/particle_hp/do_not_adjust_final_state \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_165", JustWarning, ed );
}
if ( std::getenv( "G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION" ) ) {
USE_ONLY_PHOTONEVAPORATION = true;
G4ExceptionDescription ed;
ed << "Environmental variable G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION \n"
<< "is valid but deprecated and will be replaced with the UI command: \n"
<< "/process/had/particle_hp/use_photo_evaporation \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_166", JustWarning, ed );
}
if ( std::getenv( "G4NEUTRONHP_NEGLECT_DOPPLER" ) ||
std::getenv( "G4PHP_NEGLECT_DOPPLER" ) ) {
NEGLECT_DOPPLER = true;
G4ExceptionDescription ed;
ed << "Environmental variables G4NEUTRONHP_NEGLECT_DOPPLER and G4PHP_NEGLECT_DOPPLER \n"
<< "are valid but deprecated and will be replaced with the UI command: \n"
<< "/process/had/particle_hp/neglect_Doppler_broadening \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_167", JustWarning, ed );
}
if ( std::getenv( "G4NEUTRONHP_SKIP_MISSING_ISOTOPES" ) ) {
SKIP_MISSING_ISOTOPES = true;
G4ExceptionDescription ed;
ed << "Environmental variable G4NEUTRONHP_SKIP_MISSING_ISOTOPES \n"
<< "is valid but deprecated and will be replaced with the UI command: \n"
<< "/process/had/particle_hp/skip_missing_isotopes \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_168", JustWarning, ed );
}
if ( std::getenv( "G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS" ) ) {
PRODUCE_FISSION_FRAGMENTS = true;
G4ExceptionDescription ed;
ed << "Environmental variable G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS \n"
<< "is valid but deprecated and will be replaced with the UI command: \n"
<< "/process/had/particle_hp/produce_fission_fragment \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_169", JustWarning, ed );
}
if ( std::getenv( "G4NEUTRON_HP_USE_WENDT_FISSION_MODEL" ) ) {
USE_WENDT_FISSION_MODEL = true;
// Make sure both fission fragment models are not active at same time
PRODUCE_FISSION_FRAGMENTS = false;
G4ExceptionDescription ed;
ed << "Environmental variable G4NEUTRON_HP_USE_WENDT_FISSION_MODEL \n"
<< "is valid but deprecated and will be replaced with the UI command: \n"
<< "/process/had/particle_hp/use_Wendt_fission_model \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_170", JustWarning, ed );
}
if ( std::getenv( "G4PHP_USE_NRESP71_MODEL" ) ) {
USE_NRESP71_MODEL = true;
G4ExceptionDescription ed;
ed << "Environmental variable G4PHP_USE_NRESP71_MODEL is valid but deprecated and \n"
<< "will be replaced with the UI command: /process/had/particle_hp/use_NRESP71_model \n"
<< "in the next major release, Geant4 version 11.0";
G4Exception( "G4ParticleHPManager ", "HP_MAN_171", JustWarning, ed );
}
}
G4ParticleHPManager::~G4ParticleHPManager()
@@ -255,3 +318,20 @@ void G4ParticleHPManager::RegisterInelasticFinalStates( const G4ParticleDefiniti
{
theInelasticFSs.insert ( std::pair<const G4ParticleDefinition*,std::vector<G4ParticleHPChannelList*>*>( particle , val ) );
}
void G4ParticleHPManager::DumpSetting() {
G4cout << G4endl
<< "=======================================================" << G4endl
<< "====== ParticleHP Physics Parameters ========" << G4endl
<< "=======================================================" << G4endl
<< " UseOnlyPhotoEvaporation ? " << USE_ONLY_PHOTONEVAPORATION << G4endl
<< " SkipMissingIsotopes ? " << SKIP_MISSING_ISOTOPES << G4endl
<< " NeglectDoppler ? " << NEGLECT_DOPPLER << G4endl
<< " DoNotAdjustFinalState ? " << DO_NOT_ADJUST_FINAL_STATE << G4endl
<< " ProduceFissionFragments ? " << PRODUCE_FISSION_FRAGMENTS << G4endl
<< " UseWendtFissionModel ? " << USE_WENDT_FISSION_MODEL << G4endl
<< " UseNRESP71Model ? " << USE_NRESP71_MODEL << G4endl
<< "=======================================================" << G4endl
<< G4endl;
}