Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -14,6 +14,19 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
14 December 2017 Dennis Wright radioactive_decay-V10-03-22
|
||||
------------------------------------------------------------
|
||||
- re-tag
|
||||
|
||||
12 December 2017 Dennis Wright radioactive_decay-V10-03-21
|
||||
------------------------------------------------------------
|
||||
- G4RadioactiveDecay.hh, .cc: add check that environment variable
|
||||
G4RADIOACTIVEDATA is pointing to correct directory. Moved check from
|
||||
G4RadioactiveDecay::LoadDecayTable() to ctor. Fixes bug #1942.
|
||||
|
||||
- G4RadioactiveDecayBase.hh, .cc: same change as above
|
||||
|
||||
|
||||
15 November 2017 Dennis Wright radioactive_decay-V10-03-20
|
||||
------------------------------------------------------------
|
||||
- G4RadioactiveDecay::DecayIt in the variance reduction branch:
|
||||
|
||||
@@ -316,7 +316,10 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
|
||||
G4int decayWindows[100];
|
||||
static const G4double levelTolerance;
|
||||
|
||||
//User define radioactive decay data files replacing some files in the G4RADECAY database
|
||||
// Radioactive decay database directory path
|
||||
G4String dirPath;
|
||||
|
||||
// User-defined radioactive decay data files
|
||||
std::map<G4int, G4String> theUserRadioactiveDataFiles;
|
||||
|
||||
// Library of decay tables
|
||||
|
||||
@@ -204,6 +204,9 @@ class G4RadioactiveDecayBase : public G4VRestDiscreteProcess
|
||||
G4double forceDecayHalfAngle;
|
||||
static const G4ThreeVector origin; // (0,0,0) for convenience
|
||||
|
||||
// Radioactive decay database directory path
|
||||
G4String dirPath;
|
||||
|
||||
//User define radioactive decay data files replacing some files in the G4RADECAY database
|
||||
std::map<G4int, G4String> theUserRadioactiveDataFiles;
|
||||
|
||||
|
||||
@@ -157,7 +157,8 @@ DecayTableMap* G4RadioactiveDecay::master_dkmap = 0;
|
||||
|
||||
G4RadioactiveDecay::G4RadioactiveDecay(const G4String& processName)
|
||||
: G4VRestDiscreteProcess(processName, fDecay), isInitialised(false),
|
||||
forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), verboseLevel(0)
|
||||
forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), dirPath(""),
|
||||
verboseLevel(0)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
@@ -176,7 +177,23 @@ G4RadioactiveDecay::G4RadioactiveDecay(const G4String& processName)
|
||||
// photonEvaporation->SetVerboseLevel(2);
|
||||
photonEvaporation->RDMForced(true);
|
||||
photonEvaporation->SetICM(true);
|
||||
|
||||
|
||||
// Check data directory
|
||||
char* path_var = getenv("G4RADIOACTIVEDATA");
|
||||
if (!path_var) {
|
||||
G4Exception("G4RadioactiveDecay()","HAD_RDM_200",FatalException,
|
||||
"Environment variable G4RADIOACTIVEDATA is not set");
|
||||
} else {
|
||||
dirPath = path_var; // convert to string
|
||||
std::ostringstream os;
|
||||
os << dirPath << "/z1.a3"; // used as a dummy
|
||||
std::ifstream testFile;
|
||||
testFile.open(os.str() );
|
||||
if (!testFile.is_open() )
|
||||
G4Exception("G4RadioactiveDecay()","HAD_RDM_201",FatalException,
|
||||
"Environment variable G4RADIOACTIVEDATA is set, but does not point to correct directory");
|
||||
}
|
||||
|
||||
// Reset the list of user defined data files
|
||||
theUserRadioactiveDataFiles.clear();
|
||||
|
||||
@@ -816,15 +833,8 @@ G4RadioactiveDecay::LoadDecayTable(const G4ParticleDefinition& theParentNucleus)
|
||||
G4String file = theUserRadioactiveDataFiles[1000*A+Z];
|
||||
|
||||
if (file == "") {
|
||||
if (!getenv("G4RADIOACTIVEDATA") ) {
|
||||
G4cout << "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files."
|
||||
<< G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, " Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files.");
|
||||
}
|
||||
G4String dirName = getenv("G4RADIOACTIVEDATA");
|
||||
|
||||
std::ostringstream os;
|
||||
os << dirName << "/z" << Z << ".a" << A << '\0';
|
||||
os << dirPath << "/z" << Z << ".a" << A << '\0';
|
||||
file = os.str();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,8 @@ DecayTableMap* G4RadioactiveDecayBase::master_dkmap = 0;
|
||||
|
||||
G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
: G4VRestDiscreteProcess(processName, fDecay), isInitialised(false),
|
||||
forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), verboseLevel(0)
|
||||
forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), dirPath(""),
|
||||
verboseLevel(0)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
@@ -119,7 +120,23 @@ G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
|
||||
G4DeexPrecoParameters* deex = G4NuclearLevelData::GetInstance()->GetParameters();
|
||||
deex->SetCorrelatedGamma(true);
|
||||
|
||||
|
||||
// Check data directory
|
||||
char* path_var = getenv("G4RADIOACTIVEDATA");
|
||||
if (!path_var) {
|
||||
G4Exception("G4RadioactiveDecay()","HAD_RDM_200",FatalException,
|
||||
"Environment variable G4RADIOACTIVEDATA is not set");
|
||||
} else {
|
||||
dirPath = path_var; // convert to string
|
||||
std::ostringstream os;
|
||||
os << dirPath << "/z1.a3"; // used as a dummy
|
||||
std::ifstream testFile;
|
||||
testFile.open(os.str() );
|
||||
if (!testFile.is_open() )
|
||||
G4Exception("G4RadioactiveDecay()","HAD_RDM_201",FatalException,
|
||||
"Environment variable G4RADIOACTIVEDATA is set, but does not point to correct directory");
|
||||
}
|
||||
|
||||
// Reset the list of user defined data files
|
||||
theUserRadioactiveDataFiles.clear();
|
||||
|
||||
@@ -446,15 +463,16 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
G4String file = theUserRadioactiveDataFiles[1000*A+Z];
|
||||
|
||||
if (file == "") {
|
||||
/*
|
||||
if (!getenv("G4RADIOACTIVEDATA") ) {
|
||||
G4cout << "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files."
|
||||
<< G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, " Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files.");
|
||||
}
|
||||
G4String dirName = getenv("G4RADIOACTIVEDATA");
|
||||
|
||||
*/
|
||||
std::ostringstream os;
|
||||
os << dirName << "/z" << Z << ".a" << A << '\0';
|
||||
os << dirPath << "/z" << Z << ".a" << A << '\0';
|
||||
file = os.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user