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
View File
View File
@@ -79,6 +79,11 @@
using CLHEP::pi;
#ifdef G4MULTITHREADED
#include "G4AutoLock.hh"
G4Mutex G4FissionProductYieldDist::fissprodMutex = G4MUTEX_INITIALIZER;
#endif
G4FissionProductYieldDist::
G4FissionProductYieldDist( G4int WhichIsotope,
G4FFGEnumerations::MetaState WhichMetaState,
@@ -107,42 +112,39 @@ G4FissionProductYieldDist( G4int WhichIsotope,
}
G4FissionProductYieldDist::
G4FissionProductYieldDist( G4int WhichIsotope,
G4FFGEnumerations::MetaState WhichMetaState,
G4FFGEnumerations::FissionCause WhichCause,
G4FFGEnumerations::YieldType WhichYieldType,
G4int Verbosity,
std::istringstream& dataStream)
: Isotope_(WhichIsotope),
MetaState_(WhichMetaState),
Cause_(WhichCause),
YieldType_(WhichYieldType),
Verbosity_(Verbosity)
G4FissionProductYieldDist(G4int WhichIsotope,
G4FFGEnumerations::MetaState WhichMetaState,
G4FFGEnumerations::FissionCause WhichCause,
G4FFGEnumerations::YieldType WhichYieldType,
G4int Verbosity,
std::istringstream& dataStream)
: Isotope_(WhichIsotope), MetaState_(WhichMetaState), Cause_(WhichCause),
YieldType_(WhichYieldType), Verbosity_(Verbosity)
{
G4FFG_FUNCTIONENTER__
try
{
// Initialize the class
Initialize(dataStream);
} catch (std::exception& e)
{
G4FFG_FUNCTIONLEAVE__
throw e;
}
G4FFG_FUNCTIONENTER__
try
{
// Initialize the class
Initialize(dataStream);
} catch (std::exception& e)
{
G4FFG_FUNCTIONLEAVE__
throw e;
}
G4FFG_FUNCTIONLEAVE__
}
void G4FissionProductYieldDist::
Initialize( std::istringstream& dataStream )
void G4FissionProductYieldDist::Initialize(std::istringstream& dataStream)
{
G4FFG_FUNCTIONENTER__
IncidentEnergy_ = 0.0;
TernaryProbability_ = 0;
AlphaProduction_ = 0;
SetNubar();
IncidentEnergy_ = 0.0;
TernaryProbability_ = 0;
AlphaProduction_ = 0;
SetNubar();
// Set miscellaneous variables
AlphaDefinition_ = reinterpret_cast<G4Ions*>(G4Alpha::Definition());
@@ -188,99 +190,98 @@ G4FFG_FUNCTIONENTER__
G4FFG_FUNCTIONLEAVE__
}
G4DynamicParticleVector* G4FissionProductYieldDist::
G4GetFission( void )
G4DynamicParticleVector* G4FissionProductYieldDist::G4GetFission(void)
{
G4FFG_FUNCTIONENTER__
// Check to see if the user has set the alpha production to a somewhat
// reasonable level
CheckAlphaSanity();
#ifdef G4MULTITHREADED
G4AutoLock lk(&G4FissionProductYieldDist::fissprodMutex);
#endif
// Generate the new G4DynamicParticle pointers to identify key locations in
// the G4DynamicParticle chain that will be passed to the G4FissionEvent
G4ReactionProduct* FirstDaughter = NULL;
G4ReactionProduct* SecondDaughter = NULL;
std::vector< G4ReactionProduct* >* Alphas = new std::vector< G4ReactionProduct* >;
std::vector< G4ReactionProduct* >* Neutrons = new std::vector< G4ReactionProduct* >;
std::vector< G4ReactionProduct* >* Gammas = new std::vector< G4ReactionProduct* >;
// Check to see if the user has set the alpha production to a somewhat
// reasonable level
CheckAlphaSanity();
// Generate all the nucleonic fission products
// How many nucleons do we have to work with?
//TK modified 131108
//const G4int ParentA = Isotope_ % 1000;
//const G4int ParentZ = (Isotope_ - ParentA) / 1000;
const G4int ParentA = (Isotope_/10) % 1000;
const G4int ParentZ = ((Isotope_/10) - ParentA) / 1000;
RemainingA_ = ParentA;
RemainingZ_ = ParentZ;
// Generate the new G4DynamicParticle pointers to identify key locations in
// the G4DynamicParticle chain that will be passed to the G4FissionEvent
G4ReactionProduct* FirstDaughter = NULL;
G4ReactionProduct* SecondDaughter = NULL;
std::vector< G4ReactionProduct* >* Alphas = new std::vector< G4ReactionProduct* >;
std::vector< G4ReactionProduct* >* Neutrons = new std::vector< G4ReactionProduct* >;
std::vector< G4ReactionProduct* >* Gammas = new std::vector< G4ReactionProduct* >;
// Don't forget the extra nucleons depending on the fission cause
switch(Cause_)
{
case G4FFGEnumerations::NEUTRON_INDUCED:
++RemainingA_;
break;
// Generate all the nucleonic fission products
// How many nucleons do we have to work with?
//TK modified 131108
const G4int ParentA = (Isotope_/10) % 1000;
const G4int ParentZ = ((Isotope_/10) - ParentA) / 1000;
RemainingA_ = ParentA;
RemainingZ_ = ParentZ;
case G4FFGEnumerations::PROTON_INDUCED:
++RemainingZ_;
break;
// Don't forget the extra nucleons depending on the fission cause
switch(Cause_)
{
case G4FFGEnumerations::NEUTRON_INDUCED:
++RemainingA_;
break;
case G4FFGEnumerations::GAMMA_INDUCED:
case G4FFGEnumerations::SPONTANEOUS:
default:
// Nothing to do here
break;
}
case G4FFGEnumerations::PROTON_INDUCED:
++RemainingZ_;
break;
// Ternary fission can be set by the user. Thus, it is necessary to
// sample the alpha particle first and the first daughter product
// second. See the discussion in
// G4FissionProductYieldDist::G4GetFissionProduct() for more information
// as to why the fission events are sampled this way.
GenerateAlphas(Alphas);
case G4FFGEnumerations::GAMMA_INDUCED:
case G4FFGEnumerations::SPONTANEOUS:
default:
// Nothing to do here
break;
}
// Generate the first daughter product
FirstDaughter = new G4ReactionProduct(GetFissionProduct());
RemainingA_ -= FirstDaughter->GetDefinition()->GetAtomicMass();
RemainingZ_ -= FirstDaughter->GetDefinition()->GetAtomicNumber();
if(Verbosity_ & G4FFGEnumerations::DAUGHTER_INFO)
{
G4FFG_SPACING__
G4FFG_LOCATION__
// Ternary fission can be set by the user. Thus, it is necessary to
// sample the alpha particle first and the first daughter product
// second. See the discussion in
// G4FissionProductYieldDist::G4GetFissionProduct() for more information
// as to why the fission events are sampled this way.
GenerateAlphas(Alphas);
// Generate the first daughter product
FirstDaughter = new G4ReactionProduct(GetFissionProduct());
RemainingA_ -= FirstDaughter->GetDefinition()->GetAtomicMass();
RemainingZ_ -= FirstDaughter->GetDefinition()->GetAtomicNumber();
if (Verbosity_ & G4FFGEnumerations::DAUGHTER_INFO) {
G4FFG_SPACING__
G4FFG_LOCATION__
G4cout << " -- First daughter product sampled" << G4endl;
G4FFG_SPACING__
G4cout << " Name: " << FirstDaughter->GetDefinition()->GetParticleName() << G4endl;
G4FFG_SPACING__
G4cout << " Z: " << FirstDaughter->GetDefinition()->GetAtomicNumber() << G4endl;
G4FFG_SPACING__
G4cout << " A: " << FirstDaughter->GetDefinition()->GetAtomicMass() << G4endl;
G4FFG_SPACING__
G4cout << " Meta State: " << (FirstDaughter->GetDefinition()->GetPDGEncoding() % 10) << G4endl;
}
G4cout << " -- First daughter product sampled" << G4endl;
G4FFG_SPACING__
G4cout << " Name: " << FirstDaughter->GetDefinition()->GetParticleName() << G4endl;
G4FFG_SPACING__
G4cout << " Z: " << FirstDaughter->GetDefinition()->GetAtomicNumber() << G4endl;
G4FFG_SPACING__
G4cout << " A: " << FirstDaughter->GetDefinition()->GetAtomicMass() << G4endl;
G4FFG_SPACING__
G4cout << " Meta State: " << (FirstDaughter->GetDefinition()->GetPDGEncoding() % 10) << G4endl;
}
GenerateNeutrons(Neutrons);
GenerateNeutrons(Neutrons);
// Now that all the nucleonic particles have been generated, we can
// calculate the composition of the second daughter product.
G4int NewIsotope = RemainingZ_ * 1000 + RemainingA_;
SecondDaughter = new G4ReactionProduct(GetParticleDefinition(NewIsotope, G4FFGEnumerations::GROUND_STATE));
if(Verbosity_ & G4FFGEnumerations::DAUGHTER_INFO)
{
G4FFG_SPACING__
G4FFG_LOCATION__
// Now that all the nucleonic particles have been generated, we can
// calculate the composition of the second daughter product.
G4int NewIsotope = RemainingZ_ * 1000 + RemainingA_;
SecondDaughter = new G4ReactionProduct(GetParticleDefinition(NewIsotope, G4FFGEnumerations::GROUND_STATE));
if (Verbosity_ & G4FFGEnumerations::DAUGHTER_INFO) {
G4FFG_SPACING__
G4FFG_LOCATION__
G4cout << " -- Second daughter product sampled" << G4endl;
G4FFG_SPACING__
G4cout << " Name: " << SecondDaughter->GetDefinition()->GetParticleName() << G4endl;
G4FFG_SPACING__
G4cout << " Z: " << SecondDaughter->GetDefinition()->GetAtomicNumber() << G4endl;
G4FFG_SPACING__
G4cout << " A: " << SecondDaughter->GetDefinition()->GetAtomicMass() << G4endl;
G4FFG_SPACING__
G4cout << " Meta State: " << (SecondDaughter->GetDefinition()->GetPDGEncoding() % 10) << G4endl;
}
G4cout << " -- Second daughter product sampled" << G4endl;
G4FFG_SPACING__
G4cout << " Name: " << SecondDaughter->GetDefinition()->GetParticleName() << G4endl;
G4FFG_SPACING__
G4cout << " Z: " << SecondDaughter->GetDefinition()->GetAtomicNumber() << G4endl;
G4FFG_SPACING__
G4cout << " A: " << SecondDaughter->GetDefinition()->GetAtomicMass() << G4endl;
G4FFG_SPACING__
G4cout << " Meta State: " << (SecondDaughter->GetDefinition()->GetPDGEncoding() % 10) << G4endl;
}
// Calculate how much kinetic energy will be available
// 195 to 205 MeV are available in a fission reaction, but about 20 MeV
@@ -33,7 +33,9 @@
//
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
//
// June-2019 - E. Mendoza --> Modification to allow using an incomplete data library if the G4NEUTRONHP_SKIP_MISSING_ISOTOPES environmental flag is defined. The missing XS are set to 0.
// June-2019 - E. Mendoza --> Modification to allow using an incomplete
// data library if the G4NEUTRONHP_SKIP_MISSING_ISOTOPES environmental
// flag is defined. The missing XS are set to 0.
#include <stdlib.h>
@@ -44,23 +46,22 @@
#include "G4ParticleHPFinalState.hh"
#include "G4HadTmpUtil.hh"
#include "G4ParticleHPManager.hh"
#include "G4ParticleHPReactionWhiteBoard.hh"
G4double G4ParticleHPChannel::GetXsec(G4double energy)
{
return std::max(0., theChannelData->GetXsec(energy));
}
G4double G4ParticleHPChannel::GetXsec(G4double energy)
{
return std::max(0., theChannelData->GetXsec(energy));
}
G4double G4ParticleHPChannel::GetWeightedXsec(G4double energy, G4int isoNumber)
{
return theIsotopeWiseData[isoNumber].GetXsec(energy);
}
G4double G4ParticleHPChannel::GetWeightedXsec(G4double energy, G4int isoNumber)
{
return theIsotopeWiseData[isoNumber].GetXsec(energy);
}
G4double G4ParticleHPChannel::GetFSCrossSection(G4double energy, G4int isoNumber)
{
return theFinalStates[isoNumber]->GetXsec(energy);
}
G4double G4ParticleHPChannel::GetFSCrossSection(G4double energy, G4int isoNumber)
{
return theFinalStates[isoNumber]->GetXsec(energy);
}
void G4ParticleHPChannel::
Init(G4Element * anElement, const G4String dirName, const G4String aFSType)
@@ -57,6 +57,7 @@
#include "G4NucleiProperties.hh"
#include "G4ParticleHPKallbachMannSyst.hh"
#include "G4IonTable.hh"
#include "G4ParticleHPManager.hh"
#include <set>
G4ParticleHPContAngularPar::G4ParticleHPContAngularPar( G4ParticleDefinition* projectile )
@@ -66,8 +67,8 @@ G4ParticleHPContAngularPar::G4ParticleHPContAngularPar( G4ParticleDefinition* pr
fCache.Get()->currentMeanEnergy = -2;
fCache.Get()->fresh = true;
adjustResult = true;
if ( std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) adjustResult = false;
if ( G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) adjustResult = false;
theMinEner = DBL_MAX;
theMaxEner = -DBL_MAX;
theProjectile = projectile;
@@ -81,7 +82,7 @@ G4ParticleHPContAngularPar::G4ParticleHPContAngularPar( G4ParticleDefinition* pr
void G4ParticleHPContAngularPar::Init(std::istream & aDataFile, G4ParticleDefinition* projectile)
{
adjustResult = true;
if ( std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) adjustResult = false;
if ( G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) adjustResult = false;
theProjectile = projectile;
@@ -151,7 +151,7 @@
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
if(Prompt==0&&delayed==0) Prompt=all;
theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
// take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
// take 'U' into account explicitly (see 5.4) in the sampling of energy @@@@
break;
case 1:
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
@@ -83,7 +83,8 @@ G4ParticleHPInelastic::G4ParticleHPInelastic(G4ParticleDefinition* projectile, c
//G4cout << " entering G4ParticleHPInelastic constructor"<<G4endl;
if ( !std::getenv("G4PARTICLEHPDATA") && !std::getenv(dataDirVariable) ) {
G4String message( "Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files." );
G4String message("Please setenv G4PARTICLEHPDATA (recommended) or, at least setenv " +
G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files." );
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
if ( std::getenv(dataDirVariable) ) {
@@ -345,9 +346,7 @@ throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do w
const std::pair<G4double, G4double> G4ParticleHPInelastic::GetFatalEnergyCheckLevels() const
{
// max energy non-conservation is mass of heavy nucleus
// if ( getenv("G4PHP_DO_NOT_ADJUST_FINAL_STATE") ) return std::pair<G4double, G4double>(5*perCent,250*GeV);
// This should be same to the hadron default value
// return std::pair<G4double, G4double>(10*perCent,10*GeV);
return std::pair<G4double, G4double>(10*perCent,DBL_MAX);
}
@@ -501,7 +500,7 @@ void G4ParticleHPInelastic::BuildPhysicsTable(const G4ParticleDefinition& projec
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
if(!std::getenv(dataDirVariable)){
G4String message("Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + projectile.GetParticleName() + " cross-section files.");
G4String message("Please set the environment variable " + G4String(dataDirVariable) + " to point to the " + projectile.GetParticleName() + " cross-section files.");
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
dirName = std::getenv(dataDirVariable);
@@ -512,8 +511,10 @@ void G4ParticleHPInelastic::BuildPhysicsTable(const G4ParticleDefinition& projec
*/
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
hpmanager->DumpSetting();
G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << projectile.GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
}
#endif
for (G4int i = numEle ; i < (G4int)G4Element::GetNumberOfElements(); i++)
{
@@ -327,7 +327,7 @@ void G4ParticleHPInelasticBaseFS::BaseApply(const G4HadProjectile & theTrack,
{
tmpHadrons = theEnergyAngData->Sample(eKinetic);
if ( !std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) {
if ( ! G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) {
//141017 Fix BEGIN
//Adjust A and Z in the case of miss much between selected data and target nucleus
if ( tmpHadrons != NULL ) {
@@ -492,7 +492,7 @@ void G4ParticleHPInelasticBaseFS::BaseApply(const G4HadProjectile & theTrack,
#ifdef PHP_AS_HP
bAdjustPhotons = true;
#else
if ( std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) bAdjustPhotons = false;
if ( G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) bAdjustPhotons = false;
#endif
if( bAdjustPhotons ) {
@@ -32,7 +32,7 @@
// 080603 bug fix for Hadron Hyper News #932 by T. Koi
// 080612 bug fix contribution from Benoit Pirard and Laurent Desorgher (Univ. Bern) #4,6
// 080717 bug fix of calculation of residual momentum by T. Koi
// 080801 protect negative avalable energy by T. Koi
// 080801 protect negative available energy by T. Koi
// introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
// 081024 G4NucleiPropertiesTable:: to G4NucleiProperties::
// 090514 Fix bug in IC electron emission case
@@ -76,7 +76,8 @@ G4ParticleHPInelasticData::G4ParticleHPInelasticData(G4ParticleDefinition* proje
SetName( dataName );
if ( !std::getenv(dataDirVariable) && !std::getenv( "G4PARTICLEHPDATA" ) ){
G4String message("Please setenv " + G4String(dataDirVariable) + " to point to the " + projectile->GetParticleName() + " cross-section files.");
G4String message("Please setenv G4PARTICLEHPDATA (recommended) or, at least setenv " +
G4String(dataDirVariable) + " to point to the " + projectile->GetParticleName() + " cross-section files.");
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
@@ -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;
}
@@ -68,6 +68,12 @@ G4ParticleHPMessenger::G4ParticleHPMessenger( G4ParticleHPManager* man )
ProduceFissionFragementCmd->SetCandidates("true false");
ProduceFissionFragementCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
WendtFissionModelCmd = new G4UIcmdWithAString("/process/had/particle_hp/use_Wendt_fission_model",this);
WendtFissionModelCmd->SetGuidance("Enable use of Wendt fission model.");
WendtFissionModelCmd->SetParameterName("choice",false);
WendtFissionModelCmd->SetCandidates("true false");
WendtFissionModelCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
NRESP71Cmd = new G4UIcmdWithAString("/process/had/particle_hp/use_NRESP71_model",this);
NRESP71Cmd->SetGuidance("Enable to use NRESP71 model for n on C reaction");
NRESP71Cmd->SetParameterName("choice",false);
@@ -90,6 +96,8 @@ G4ParticleHPMessenger::~G4ParticleHPMessenger()
delete NeglectDopplerCmd;
delete DoNotAdjustFSCmd;
delete ProduceFissionFragementCmd;
delete WendtFissionModelCmd;
delete NRESP71Cmd;
delete VerboseCmd;
}
@@ -113,6 +121,11 @@ void G4ParticleHPMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
if ( command == ProduceFissionFragementCmd ) {
manager->SetProduceFissionFragments( bValue );
}
if ( command == WendtFissionModelCmd ) {
manager->SetUseWendtFissionModel( bValue );
// Make sure both fission fragment models are not active at same time
if ( bValue ) manager->SetProduceFissionFragments( false );
}
if ( command == NRESP71Cmd ) {
manager->SetUseNRESP71Model( bValue );
}
@@ -369,7 +369,7 @@ G4ReactionProductVector * G4ParticleHPPhotonDist::GetPhotons(G4double anEnergy)
thePhotons->operator[](count)->SetKineticEnergy(energy[i]);
}
count++;
if (count > nSecondaries) throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPPhotonDist::GetPhotons inconsistancy");
if (count > nSecondaries) throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPPhotonDist::GetPhotons inconsistency");
}
} else { // nDiscrete != 1 or nPartials != 1
@@ -400,7 +400,7 @@ G4ReactionProductVector * G4ParticleHPPhotonDist::GetPhotons(G4double anEnergy)
thePhotons->operator[](count)->SetKineticEnergy(energy[i]);
}
count++;
if (count > nSecondaries) throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPPhotonDist::GetPhotons inconsistancy");
if (count > nSecondaries) throw G4HadronicException(__FILE__, __LINE__, "G4ParticleHPPhotonDist::GetPhotons inconsistency");
}
}
}
@@ -428,7 +428,7 @@ G4ReactionProductVector * G4ParticleHPPhotonDist::GetPhotons(G4double anEnergy)
{
if (std::abs(currentEnergy-theGammas[ii])<0.1*keV) break;
}
if(ii==nDiscrete2) ii--; // fix for what seems an (file12 vs file 14) inconsistancy found in the ENDF 7N14 data. @@
if(ii==nDiscrete2) ii--; // fix for what seems an (file12 vs file 14) inconsistency found in the ENDF 7N14 data. @@
if(ii<nIso)
{
// isotropic distribution
@@ -543,7 +543,7 @@ G4ReactionProductVector * G4ParticleHPPhotonDist::GetPhotons(G4double anEnergy)
{
if (std::abs(currentEnergy-theGammas[ii])<0.1*keV) break;
}
if(ii==nDiscrete2) ii--; // fix for what seems an (file12 vs file 14) inconsistancy found in the ENDF 7N14 data. @@
if(ii==nDiscrete2) ii--; // fix for what seems an (file12 vs file 14) inconsistency found in the ENDF 7N14 data. @@
if(ii<nIso)
{
//Bug reported Chao Zhang (Chao.Zhang@usd.edu), Dongming Mei(Dongming.Mei@usd.edu) Feb. 25, 2009
View File