Import Geant4 10.7.0 source tree
This commit is contained in:
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+4
@@ -89,6 +89,10 @@ private:
|
||||
/** Initialize is a common function called by all constructors. */
|
||||
void Initialize( std::istringstream& dataStream );
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
static G4Mutex fissprodMutex;
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Functions
|
||||
/** Generates a fission event using default sampling and returns the pointer
|
||||
|
||||
@@ -23,11 +23,9 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// Hadronic Process: Very Low Energy Neutron X-Sections
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
// Builds and has the Cross-section data for one element and channel.
|
||||
// Hadronic Process: Very Low Energy Neutron X-Sections
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
// Builds and has the Cross-section data for one element and channel.
|
||||
//
|
||||
// Bug fixes and workarounds in the destructor, F.W.Jones 06-Jul-1999
|
||||
// 070612 Fix memory leaking by T. Koi
|
||||
@@ -38,29 +36,34 @@
|
||||
//
|
||||
#ifndef G4ParticleHPChannel_h
|
||||
#define G4ParticleHPChannel_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleHPIsoData.hh"
|
||||
#include "G4ParticleHPVector.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4HadProjectile.hh"
|
||||
//#include "G4NeutronInelasticProcess.hh"
|
||||
//#include "G4HadronFissionProcess.hh"
|
||||
//#include "G4HadronElasticProcess.hh"
|
||||
//#include "G4HadronCaptureProcess.hh"
|
||||
#include "G4StableIsotopes.hh"
|
||||
#include "G4ParticleHPCaptureFS.hh"
|
||||
#include "G4ParticleHPFinalState.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4WendtFissionFragmentGenerator.hh"
|
||||
#include "G4ParticleHPManager.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
|
||||
class G4ParticleHPChannel
|
||||
{
|
||||
public:
|
||||
|
||||
G4ParticleHPChannel(G4ParticleDefinition* projectile)
|
||||
: wendtFissionGenerator(std::getenv("G4NEUTRON_HP_USE_WENDT_FISSION_MODEL") == NULL ? NULL : G4WendtFissionFragmentGenerator::GetInstance())
|
||||
G4ParticleHPChannel(G4ParticleDefinition* projectile) :
|
||||
wendtFissionGenerator( G4ParticleHPManager::GetInstance()->GetUseWendtFissionModel() ?
|
||||
G4WendtFissionFragmentGenerator::GetInstance() : nullptr )
|
||||
{
|
||||
if ( G4ParticleHPManager::GetInstance()->GetUseWendtFissionModel() ) {
|
||||
// Make sure both fission fragment models are not active at same time
|
||||
G4ParticleHPManager::GetInstance()->SetProduceFissionFragments( false );
|
||||
}
|
||||
theProjectile = const_cast<G4ParticleDefinition*>(projectile);
|
||||
theChannelData = new G4ParticleHPVector;
|
||||
theBuffer = 0;
|
||||
@@ -72,9 +75,13 @@ public:
|
||||
theElement = NULL;
|
||||
}
|
||||
|
||||
G4ParticleHPChannel()
|
||||
: wendtFissionGenerator(std::getenv("G4NEUTRON_HP_USE_WENDT_FISSION_MODEL") == NULL ? NULL : G4WendtFissionFragmentGenerator::GetInstance())
|
||||
G4ParticleHPChannel() : wendtFissionGenerator( G4ParticleHPManager::GetInstance()->GetUseWendtFissionModel() ?
|
||||
G4WendtFissionFragmentGenerator::GetInstance() : nullptr )
|
||||
{
|
||||
if ( G4ParticleHPManager::GetInstance()->GetUseWendtFissionModel() ) {
|
||||
// Make sure both fission fragment models are not active at same time
|
||||
G4ParticleHPManager::GetInstance()->SetProduceFissionFragments( false );
|
||||
}
|
||||
theProjectile = G4Neutron::Neutron();
|
||||
theChannelData = new G4ParticleHPVector;
|
||||
theBuffer = 0;
|
||||
@@ -106,17 +113,16 @@ public:
|
||||
//}
|
||||
// FWJ experiment
|
||||
//if(active!=0) delete [] active;
|
||||
// T.K.
|
||||
if ( theFinalStates != 0 )
|
||||
{
|
||||
// T.K.
|
||||
if ( theFinalStates != 0 )
|
||||
{
|
||||
for ( G4int i = 0 ; i < niso ; i++ )
|
||||
{
|
||||
delete theFinalStates[i];
|
||||
}
|
||||
delete [] theFinalStates;
|
||||
}
|
||||
if ( active != 0 ) delete [] active;
|
||||
|
||||
}
|
||||
if ( active != 0 ) delete [] active;
|
||||
}
|
||||
|
||||
G4double GetXsec(G4double energy);
|
||||
|
||||
+2
-5
@@ -39,6 +39,7 @@
|
||||
#include "G4ParticleHPProduct.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
#include "G4Cache.hh"
|
||||
#include "G4ParticleHPManager.hh"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
|
||||
@@ -93,11 +94,7 @@ public:
|
||||
inline void Init(std::istream & aDataFile)
|
||||
{
|
||||
bAdjustFinalState = true;
|
||||
const char* ctmp = std::getenv("G4PHP_DO_NOT_ADJUST_FINAL_STATE");
|
||||
if( ctmp && G4String(ctmp) == "1" )
|
||||
{
|
||||
bAdjustFinalState = false;
|
||||
}
|
||||
if ( G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) bAdjustFinalState = false;
|
||||
|
||||
// T.K. Comment out following line to keep the condition at the
|
||||
// validation efforts comparing NeutronHP and PartileHP for neutrons (2015 Sep.)
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
theNDLDataM = 0;
|
||||
|
||||
adjustResult = true;
|
||||
if ( std::getenv( "G4PHP_DO_NOT_ADJUST_FINAL_STATE" ) ) adjustResult = false;
|
||||
|
||||
if ( G4ParticleHPManager::GetInstance()->GetDoNotAdjustFinalState() ) adjustResult = false;
|
||||
|
||||
theProjectile = G4Neutron::Neutron();
|
||||
|
||||
theResult.Put( 0 );
|
||||
|
||||
@@ -75,19 +75,27 @@ class G4ParticleHPManager
|
||||
void DumpDataSource();
|
||||
|
||||
G4bool GetUseOnlyPhotoEvaporation() { return USE_ONLY_PHOTONEVAPORATION; };
|
||||
void SetUseOnlyPhotoEvaporation( G4bool val ) { USE_ONLY_PHOTONEVAPORATION = val; };
|
||||
G4bool GetSkipMissingIsotopes() { return SKIP_MISSING_ISOTOPES; };
|
||||
G4bool GetNeglectDoppler() { return NEGLECT_DOPPLER; };
|
||||
G4bool GetDoNotAdjustFinalState() { return DO_NOT_ADJUST_FINAL_STATE; };
|
||||
G4bool GetProduceFissionFragments() { return PRODUCE_FISSION_FRAGMENTS; };
|
||||
G4bool GetUseWendtFissionModel() { return USE_WENDT_FISSION_MODEL; };
|
||||
G4bool GetUseNRESP71Model() { return USE_NRESP71_MODEL; };
|
||||
|
||||
void SetUseOnlyPhotoEvaporation( G4bool val ) { USE_ONLY_PHOTONEVAPORATION = val; };
|
||||
void SetSkipMissingIsotopes( G4bool val ) { SKIP_MISSING_ISOTOPES = val; };
|
||||
void SetNeglectDoppler( G4bool val ) { NEGLECT_DOPPLER = val; };
|
||||
void SetDoNotAdjustFinalState( G4bool val ) { DO_NOT_ADJUST_FINAL_STATE = val; };
|
||||
void SetProduceFissionFragments( G4bool val ) { PRODUCE_FISSION_FRAGMENTS = val; };
|
||||
void SetProduceFissionFragments( G4bool val ) {
|
||||
// Make sure both fission fragment models are not active at same time
|
||||
USE_WENDT_FISSION_MODEL ? PRODUCE_FISSION_FRAGMENTS = false : PRODUCE_FISSION_FRAGMENTS = val ; };
|
||||
void SetUseWendtFissionModel( G4bool val ) { USE_WENDT_FISSION_MODEL = val;
|
||||
// Make sure both fission fragment models are not active at same time
|
||||
if ( USE_WENDT_FISSION_MODEL ) PRODUCE_FISSION_FRAGMENTS = false; };
|
||||
void SetUseNRESP71Model( G4bool val ) { USE_NRESP71_MODEL = val; };
|
||||
|
||||
void DumpSetting(); // Needs to be called somewhere to print out information once per run.
|
||||
|
||||
void RegisterElasticCrossSections( G4PhysicsTable* val ){ theElasticCrossSections = val; };
|
||||
G4PhysicsTable* GetElasticCrossSections(){ return theElasticCrossSections; };
|
||||
void RegisterCaptureCrossSections( G4PhysicsTable* val ){ theCaptureCrossSections = val; };
|
||||
@@ -134,6 +142,7 @@ class G4ParticleHPManager
|
||||
G4bool NEGLECT_DOPPLER;
|
||||
G4bool DO_NOT_ADJUST_FINAL_STATE;
|
||||
G4bool PRODUCE_FISSION_FRAGMENTS;
|
||||
G4bool USE_WENDT_FISSION_MODEL;
|
||||
G4bool USE_NRESP71_MODEL;
|
||||
|
||||
G4PhysicsTable* theElasticCrossSections;
|
||||
|
||||
@@ -51,18 +51,9 @@ class G4ParticleHPMessenger: public G4UImessenger
|
||||
G4UIcmdWithAString* NeglectDopplerCmd;
|
||||
G4UIcmdWithAString* DoNotAdjustFSCmd;
|
||||
G4UIcmdWithAString* ProduceFissionFragementCmd;
|
||||
G4UIcmdWithAString* WendtFissionModelCmd;
|
||||
G4UIcmdWithAString* NRESP71Cmd;
|
||||
G4UIcmdWithAnInteger* VerboseCmd;
|
||||
//G4UIcmdWithAString* AllowHeavyElementCmd;
|
||||
/*
|
||||
* #setenv G4NEUTRONHP_USE_ONLY_PHOTONEVAPORATION 1
|
||||
* #setenv G4NEUTRONHP_SKIP_MISSING_ISOTOPES 1
|
||||
* #setenv G4NEUTRONHP_NEGLECT_DOPPLER 1
|
||||
* #setenv G4NEUTRONHP_DO_NOT_ADJUST_FINAL_STATE 1
|
||||
* #setenv G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS 1
|
||||
*
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user