Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -91,7 +91,7 @@
|
||||
using namespace CLHEP;
|
||||
|
||||
G4Radioactivation::G4Radioactivation(const G4String& processName)
|
||||
: G4RadioactiveDecayBase(processName)
|
||||
: G4RadioactiveDecay(processName)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
@@ -317,7 +317,7 @@ G4double G4Radioactivation::GetMeanLifeTime(const G4Track& theTrack,
|
||||
// to decay immediately.
|
||||
// In analogue mode it returns the particle's mean-life.
|
||||
G4double meanlife = 0.;
|
||||
if (AnalogueMC) meanlife = G4RadioactiveDecayBase::GetMeanLifeTime(theTrack, 0);
|
||||
if (AnalogueMC) meanlife = G4RadioactiveDecay::GetMeanLifeTime(theTrack, 0);
|
||||
return meanlife;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ CalculateChainsFromParent(const G4ParticleDefinition& theParentNucleus)
|
||||
G4double TaoPlus;
|
||||
G4int nS = 0; // Running index of first decay in a given generation
|
||||
G4int nT = nEntry; // Total number of decays accumulated over entire history
|
||||
const G4int nMode = 12;
|
||||
const G4int nMode = G4RadioactiveDecayModeSize;
|
||||
G4double brs[nMode];
|
||||
//
|
||||
theIonTable =
|
||||
@@ -495,65 +495,90 @@ CalculateChainsFromParent(const G4ParticleDefinition& theParentNucleus)
|
||||
|
||||
} // Combine decay channels (loop i)
|
||||
|
||||
brs[2] = brs[2]+brs[3]+brs[4]+brs[5]+brs[6]; // Combine beta+ and EC
|
||||
brs[3] = brs[4] = brs[5] = brs[6] = 0.0;
|
||||
brs[BetaPlus] = brs[BetaPlus]+brs[KshellEC]+brs[LshellEC]+brs[MshellEC]+brs[NshellEC]; // Combine beta+ and EC
|
||||
brs[KshellEC] = brs[LshellEC] = brs[MshellEC] = brs[NshellEC] = 0.0;
|
||||
for (G4int i = 0; i < nMode; i++) { // loop over decay modes
|
||||
if (brs[i] > 0.) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
case IT:
|
||||
// Decay mode is isomeric transition
|
||||
theITChannel = new G4ITDecay(aParentNucleus, brs[0], 0.0, 0.0,
|
||||
theITChannel = new G4ITDecay(aParentNucleus, brs[IT], 0.0, 0.0,
|
||||
photonEvaporation);
|
||||
|
||||
summedDecayTable->Insert(theITChannel);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case BetaMinus:
|
||||
// Decay mode is beta-
|
||||
theBetaMinusChannel = new G4BetaMinusDecay(aParentNucleus, brs[1],
|
||||
theBetaMinusChannel = new G4BetaMinusDecay(aParentNucleus, brs[BetaMinus],
|
||||
0.*MeV, 0.*MeV,
|
||||
noFloat, allowed);
|
||||
summedDecayTable->Insert(theBetaMinusChannel);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case BetaPlus:
|
||||
// Decay mode is beta+ + EC.
|
||||
theBetaPlusChannel = new G4BetaPlusDecay(aParentNucleus, brs[2],
|
||||
theBetaPlusChannel = new G4BetaPlusDecay(aParentNucleus, brs[BetaPlus],
|
||||
0.*MeV, 0.*MeV,
|
||||
noFloat, allowed);
|
||||
summedDecayTable->Insert(theBetaPlusChannel);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
case Alpha:
|
||||
// Decay mode is alpha.
|
||||
theAlphaChannel = new G4AlphaDecay(aParentNucleus, brs[7], 0.*MeV,
|
||||
theAlphaChannel = new G4AlphaDecay(aParentNucleus, brs[Alpha], 0.*MeV,
|
||||
0.*MeV, noFloat);
|
||||
summedDecayTable->Insert(theAlphaChannel);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case Proton:
|
||||
// Decay mode is proton.
|
||||
theProtonChannel = new G4ProtonDecay(aParentNucleus, brs[8], 0.*MeV,
|
||||
theProtonChannel = new G4ProtonDecay(aParentNucleus, brs[Proton], 0.*MeV,
|
||||
0.*MeV, noFloat);
|
||||
summedDecayTable->Insert(theProtonChannel);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case Neutron:
|
||||
// Decay mode is neutron.
|
||||
theNeutronChannel = new G4NeutronDecay(aParentNucleus, brs[9], 0.*MeV,
|
||||
theNeutronChannel = new G4NeutronDecay(aParentNucleus, brs[Neutron], 0.*MeV,
|
||||
0.*MeV, noFloat);
|
||||
summedDecayTable->Insert(theNeutronChannel);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case SpFission:
|
||||
// Decay mode is spontaneous fission
|
||||
theFissionChannel = new G4SFDecay(aParentNucleus, brs[10], 0.*MeV,
|
||||
theFissionChannel = new G4SFDecay(aParentNucleus, brs[SpFission], 0.*MeV,
|
||||
0.*MeV, noFloat);
|
||||
summedDecayTable->Insert(theFissionChannel);
|
||||
break;
|
||||
case 11:
|
||||
|
||||
case BDProton:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case BDNeutron:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case Beta2Minus:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case Beta2Plus:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case Proton2:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case Neutron2:
|
||||
// Not yet implemented
|
||||
break;
|
||||
|
||||
case Triton:
|
||||
// Decay mode is Triton.
|
||||
theTritonChannel = new G4TritonDecay(aParentNucleus, brs[9], 0.*MeV,
|
||||
theTritonChannel = new G4TritonDecay(aParentNucleus, brs[Triton], 0.*MeV,
|
||||
0.*MeV, noFloat);
|
||||
summedDecayTable->Insert(theTritonChannel);
|
||||
break;
|
||||
@@ -861,7 +886,7 @@ G4Radioactivation::DecayIt(const G4Track& theTrack, const G4Step&)
|
||||
} else {
|
||||
// Data found. Try to decay nucleus
|
||||
if (AnalogueMC) {
|
||||
G4RadioactiveDecayBase::DecayAnalog(theTrack);
|
||||
G4RadioactiveDecay::DecayAnalog(theTrack);
|
||||
|
||||
} else {
|
||||
// Proceed with decay using variance reduction
|
||||
|
||||
+133
-117
@@ -25,7 +25,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// File: G4RadioactiveDecayBase.cc //
|
||||
// File: G4RadioactiveDecay.cc //
|
||||
// Author: D.H. Wright (SLAC) //
|
||||
// Date: 9 August 2017 //
|
||||
// Description: version the G4RadioactiveDecay process by F. Lei and //
|
||||
@@ -36,8 +36,8 @@
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "G4RadioactiveDecayBase.hh"
|
||||
#include "G4RadioactiveDecayBaseMessenger.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4RadioactiveDecayMessenger.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
@@ -89,24 +89,26 @@
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
const G4double G4RadioactiveDecayBase::levelTolerance = 10.0*eV;
|
||||
const G4ThreeVector G4RadioactiveDecayBase::origin(0.,0.,0.);
|
||||
const G4double G4RadioactiveDecay::levelTolerance = 10.0*eV;
|
||||
const G4ThreeVector G4RadioactiveDecay::origin(0.,0.,0.);
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4AutoLock.hh"
|
||||
G4Mutex G4RadioactiveDecayBase::radioactiveDecayMutex = G4MUTEX_INITIALIZER;
|
||||
DecayTableMap* G4RadioactiveDecayBase::master_dkmap = 0;
|
||||
G4Mutex G4RadioactiveDecay::radioactiveDecayMutex = G4MUTEX_INITIALIZER;
|
||||
DecayTableMap* G4RadioactiveDecay::master_dkmap = 0;
|
||||
|
||||
G4int& G4RadioactiveDecayBase::NumberOfInstances()
|
||||
G4int& G4RadioactiveDecay::NumberOfInstances()
|
||||
{
|
||||
static G4int numberOfInstances = 0;
|
||||
return numberOfInstances;
|
||||
}
|
||||
#endif
|
||||
|
||||
G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
G4RadioactiveDecay::G4RadioactiveDecay(const G4String& processName)
|
||||
: G4VRestDiscreteProcess(processName, fDecay), isInitialised(false),
|
||||
forceDecayDirection(0.,0.,0.), forceDecayHalfAngle(0.*deg), dirPath(""),
|
||||
verboseLevel(1),
|
||||
@@ -114,14 +116,14 @@ G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
G4cout << "G4RadioactiveDecayBase constructor: processName = " << processName
|
||||
G4cout << "G4RadioactiveDecay constructor: processName = " << processName
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
SetProcessSubType(fRadioactiveDecay);
|
||||
|
||||
theRadioactiveDecayBaseMessenger = new G4RadioactiveDecayBaseMessenger(this);
|
||||
theRadioactiveDecayMessenger = new G4RadioactiveDecayMessenger(this);
|
||||
pParticleChange = &fParticleChangeForRadDecay;
|
||||
|
||||
// Set up photon evaporation for use in G4ITDecay
|
||||
@@ -153,7 +155,7 @@ G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
|
||||
// Instantiate the map of decay tables
|
||||
#ifdef G4MULTITHREADED
|
||||
G4AutoLock lk(&G4RadioactiveDecayBase::radioactiveDecayMutex);
|
||||
G4AutoLock lk(&G4RadioactiveDecay::radioactiveDecayMutex);
|
||||
NumberOfInstances()++;
|
||||
if(!master_dkmap) master_dkmap = new DecayTableMap;
|
||||
#endif
|
||||
@@ -169,7 +171,7 @@ G4RadioactiveDecayBase::G4RadioactiveDecayBase(const G4String& processName)
|
||||
G4HadronicProcessStore::Instance()->RegisterExtraProcess(this);
|
||||
}
|
||||
|
||||
void G4RadioactiveDecayBase::ProcessDescription(std::ostream& outFile) const
|
||||
void G4RadioactiveDecay::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << "The radioactive decay process (G4RadioactiveDecay) handles the\n"
|
||||
<< "alpha, beta+, beta-, electron capture and isomeric transition\n"
|
||||
@@ -179,9 +181,9 @@ void G4RadioactiveDecayBase::ProcessDescription(std::ostream& outFile) const
|
||||
}
|
||||
|
||||
|
||||
G4RadioactiveDecayBase::~G4RadioactiveDecayBase()
|
||||
G4RadioactiveDecay::~G4RadioactiveDecay()
|
||||
{
|
||||
delete theRadioactiveDecayBaseMessenger;
|
||||
delete theRadioactiveDecayMessenger;
|
||||
delete photonEvaporation;
|
||||
for (DecayTableMap::iterator i = dkmap->begin(); i != dkmap->end(); i++) {
|
||||
delete i->second;
|
||||
@@ -189,7 +191,7 @@ G4RadioactiveDecayBase::~G4RadioactiveDecayBase()
|
||||
dkmap->clear();
|
||||
delete dkmap;
|
||||
#ifdef G4MULTITHREADED
|
||||
G4AutoLock lk(&G4RadioactiveDecayBase::radioactiveDecayMutex);
|
||||
G4AutoLock lk(&G4RadioactiveDecay::radioactiveDecayMutex);
|
||||
--NumberOfInstances();
|
||||
if(NumberOfInstances()==0)
|
||||
{
|
||||
@@ -203,7 +205,7 @@ G4RadioactiveDecayBase::~G4RadioactiveDecayBase()
|
||||
}
|
||||
|
||||
|
||||
G4bool G4RadioactiveDecayBase::IsApplicable(const G4ParticleDefinition& aParticle)
|
||||
G4bool G4RadioactiveDecay::IsApplicable(const G4ParticleDefinition& aParticle)
|
||||
{
|
||||
// All particles other than G4Ions, are rejected by default
|
||||
if (((const G4Ions*)(&aParticle))->GetExcitationEnergy() > 0.) {return true;}
|
||||
@@ -225,7 +227,7 @@ G4bool G4RadioactiveDecayBase::IsApplicable(const G4ParticleDefinition& aParticl
|
||||
return true;
|
||||
}
|
||||
|
||||
G4DecayTable* G4RadioactiveDecayBase::GetDecayTable(const G4ParticleDefinition* aNucleus)
|
||||
G4DecayTable* G4RadioactiveDecay::GetDecayTable(const G4ParticleDefinition* aNucleus)
|
||||
{
|
||||
G4String key = aNucleus->GetParticleName();
|
||||
DecayTableMap::iterator table_ptr = dkmap->find(key);
|
||||
@@ -241,7 +243,7 @@ G4DecayTable* G4RadioactiveDecayBase::GetDecayTable(const G4ParticleDefinition*
|
||||
}
|
||||
|
||||
|
||||
void G4RadioactiveDecayBase::SelectAVolume(const G4String& aVolume)
|
||||
void G4RadioactiveDecay::SelectAVolume(const G4String& aVolume)
|
||||
{
|
||||
G4LogicalVolumeStore* theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
|
||||
G4LogicalVolume* volume = nullptr;
|
||||
@@ -261,13 +263,13 @@ void G4RadioactiveDecayBase::SelectAVolume(const G4String& aVolume)
|
||||
ed << aVolume << " is not a valid logical volume name."
|
||||
<< " Decay not activated for it."
|
||||
<< G4endl;
|
||||
G4Exception("G4RadioactiveDecayBase::SelectAVolume()", "HAD_RDM_300",
|
||||
G4Exception("G4RadioactiveDecay::SelectAVolume()", "HAD_RDM_300",
|
||||
JustWarning, ed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4RadioactiveDecayBase::DeselectAVolume(const G4String& aVolume)
|
||||
void G4RadioactiveDecay::DeselectAVolume(const G4String& aVolume)
|
||||
{
|
||||
G4LogicalVolumeStore* theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
|
||||
G4LogicalVolume* volume = nullptr;
|
||||
@@ -288,7 +290,7 @@ void G4RadioactiveDecayBase::DeselectAVolume(const G4String& aVolume)
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << aVolume << " is not in the list. No action taken." << G4endl;
|
||||
G4Exception("G4RadioactiveDecayBase::DeselectAVolume()", "HAD_RDM_300",
|
||||
G4Exception("G4RadioactiveDecay::DeselectAVolume()", "HAD_RDM_300",
|
||||
JustWarning, ed);
|
||||
}
|
||||
}
|
||||
@@ -297,13 +299,13 @@ void G4RadioactiveDecayBase::DeselectAVolume(const G4String& aVolume)
|
||||
G4ExceptionDescription ed;
|
||||
ed << aVolume << " is not a valid logical volume name. No action taken."
|
||||
<< G4endl;
|
||||
G4Exception("G4RadioactiveDecayBase::DeselectAVolume()", "HAD_RDM_300",
|
||||
G4Exception("G4RadioactiveDecay::DeselectAVolume()", "HAD_RDM_300",
|
||||
JustWarning, ed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4RadioactiveDecayBase::SelectAllVolumes()
|
||||
void G4RadioactiveDecay::SelectAllVolumes()
|
||||
{
|
||||
G4LogicalVolumeStore* theLogicalVolumes = G4LogicalVolumeStore::GetInstance();
|
||||
G4LogicalVolume* volume = nullptr;
|
||||
@@ -326,7 +328,7 @@ void G4RadioactiveDecayBase::SelectAllVolumes()
|
||||
}
|
||||
|
||||
|
||||
void G4RadioactiveDecayBase::DeselectAllVolumes()
|
||||
void G4RadioactiveDecay::DeselectAllVolumes()
|
||||
{
|
||||
ValidVolumes.clear();
|
||||
isAllVolumesMode=false;
|
||||
@@ -342,7 +344,7 @@ void G4RadioactiveDecayBase::DeselectAllVolumes()
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4double G4RadioactiveDecayBase::GetMeanLifeTime(const G4Track& theTrack,
|
||||
G4double G4RadioactiveDecay::GetMeanLifeTime(const G4Track& theTrack,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
G4double meanlife = 0.;
|
||||
@@ -378,8 +380,8 @@ G4double G4RadioactiveDecayBase::GetMeanLifeTime(const G4Track& theTrack,
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4double G4RadioactiveDecayBase::GetMeanFreePath (const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*)
|
||||
G4double G4RadioactiveDecay::GetMeanFreePath(const G4Track& aTrack, G4double,
|
||||
G4ForceCondition*)
|
||||
{
|
||||
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
|
||||
const G4ParticleDefinition* aParticleDef = aParticle->GetDefinition();
|
||||
@@ -443,7 +445,7 @@ G4double G4RadioactiveDecayBase::GetMeanFreePath (const G4Track& aTrack, G4doubl
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void G4RadioactiveDecayBase::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
void G4RadioactiveDecay::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{
|
||||
if (!isInitialised) {
|
||||
isInitialised = true;
|
||||
@@ -463,7 +465,7 @@ void G4RadioactiveDecayBase::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void
|
||||
G4RadioactiveDecayBase::StreamInfo(std::ostream& os, const G4String& endline)
|
||||
G4RadioactiveDecay::StreamInfo(std::ostream& os, const G4String& endline)
|
||||
{
|
||||
G4DeexPrecoParameters* deex =
|
||||
G4NuclearLevelData::GetInstance()->GetParameters();
|
||||
@@ -490,12 +492,12 @@ G4RadioactiveDecayBase::StreamInfo(std::ostream& os, const G4String& endline)
|
||||
<< emparam->Fluo() << endline;
|
||||
os << "Auger electron emission enabled "
|
||||
<< emparam->Auger() << endline;
|
||||
os << "Auger cascade enabled "
|
||||
<< emparam->AugerCascade() << endline;
|
||||
os << "Check EM cuts disabled for atomic de-excitation "
|
||||
<< emparam->DeexcitationIgnoreCut() << endline;
|
||||
os << "Use Bearden atomic level energies "
|
||||
<< emparam->BeardenFluoDir() << endline;
|
||||
os << "Use ANSTO fluorescence model "
|
||||
<< emparam->ANSTOFluoDir() << endline;
|
||||
os << "Threshold for very long decay time at rest "
|
||||
<< fThresholdForVeryLongDecayTime/CLHEP::ns << " ns" << endline;
|
||||
os << "======================================================================"
|
||||
@@ -512,7 +514,7 @@ G4RadioactiveDecayBase::StreamInfo(std::ostream& os, const G4String& endline)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4DecayTable*
|
||||
G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucleus)
|
||||
G4RadioactiveDecay::LoadDecayTable(const G4ParticleDefinition& theParentNucleus)
|
||||
{
|
||||
// Generate input data file name using Z and A of the parent nucleus
|
||||
// file containing radioactive decay data.
|
||||
@@ -524,7 +526,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
((const G4Ions*)(&theParentNucleus))->GetFloatLevelBase();
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4AutoLock lk(&G4RadioactiveDecayBase::radioactiveDecayMutex);
|
||||
G4AutoLock lk(&G4RadioactiveDecay::radioactiveDecayMutex);
|
||||
|
||||
G4String key = theParentNucleus.GetParticleName();
|
||||
DecayTableMap::iterator master_table_ptr = master_dkmap->find(key);
|
||||
@@ -552,7 +554,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
if (DecaySchemeFile.good()) {
|
||||
// Initialize variables used for reading in radioactive decay data
|
||||
G4bool floatMatch(false);
|
||||
const G4int nMode = 12;
|
||||
const G4int nMode = G4RadioactiveDecayModeSize;
|
||||
G4double modeTotalBR[nMode] = {0.0};
|
||||
G4double modeSumBR[nMode];
|
||||
for (G4int i = 0; i < nMode; i++) {
|
||||
@@ -589,7 +591,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
}
|
||||
|
||||
inputLine = inputChars;
|
||||
inputLine = inputLine.strip(1);
|
||||
G4StrUtil::rstrip(inputLine);
|
||||
if (inputChars[0] != '#' && inputLine.length() != 0) {
|
||||
std::istringstream tmpStream(inputLine);
|
||||
|
||||
@@ -631,39 +633,39 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
}
|
||||
break;
|
||||
case BetaMinus:
|
||||
modeTotalBR[1] = decayModeTotal; break;
|
||||
modeTotalBR[BetaMinus] = decayModeTotal; break;
|
||||
case BetaPlus:
|
||||
modeTotalBR[2] = decayModeTotal; break;
|
||||
modeTotalBR[BetaPlus] = decayModeTotal; break;
|
||||
case KshellEC:
|
||||
modeTotalBR[3] = decayModeTotal; break;
|
||||
modeTotalBR[KshellEC] = decayModeTotal; break;
|
||||
case LshellEC:
|
||||
modeTotalBR[4] = decayModeTotal; break;
|
||||
modeTotalBR[LshellEC] = decayModeTotal; break;
|
||||
case MshellEC:
|
||||
modeTotalBR[5] = decayModeTotal; break;
|
||||
modeTotalBR[MshellEC] = decayModeTotal; break;
|
||||
case NshellEC:
|
||||
modeTotalBR[6] = decayModeTotal; break;
|
||||
modeTotalBR[NshellEC] = decayModeTotal; break;
|
||||
case Alpha:
|
||||
modeTotalBR[7] = decayModeTotal; break;
|
||||
modeTotalBR[Alpha] = decayModeTotal; break;
|
||||
case Proton:
|
||||
modeTotalBR[8] = decayModeTotal; break;
|
||||
modeTotalBR[Proton] = decayModeTotal; break;
|
||||
case Neutron:
|
||||
modeTotalBR[9] = decayModeTotal; break;
|
||||
case BDProton:
|
||||
break;
|
||||
case BDNeutron:
|
||||
break;
|
||||
case Beta2Minus:
|
||||
break;
|
||||
case Beta2Plus:
|
||||
break;
|
||||
case Proton2:
|
||||
break;
|
||||
case Neutron2:
|
||||
break;
|
||||
modeTotalBR[Neutron] = decayModeTotal; break;
|
||||
case SpFission:
|
||||
modeTotalBR[10] = decayModeTotal; break;
|
||||
modeTotalBR[SpFission] = decayModeTotal; break;
|
||||
case BDProton:
|
||||
/* Not yet implemented */ break;
|
||||
case BDNeutron:
|
||||
/* Not yet implemented */ break;
|
||||
case Beta2Minus:
|
||||
/* Not yet implemented */ break;
|
||||
case Beta2Plus:
|
||||
/* Not yet implemented */ break;
|
||||
case Proton2:
|
||||
/* Not yet implemented */ break;
|
||||
case Neutron2:
|
||||
/* Not yet implemented */ break;
|
||||
case Triton:
|
||||
modeTotalBR[11] = decayModeTotal; break;
|
||||
modeTotalBR[Triton] = decayModeTotal; break;
|
||||
case RDM_ERROR:
|
||||
|
||||
default:
|
||||
@@ -695,7 +697,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aBetaMinusChannel->DumpNuclearInfo();
|
||||
// aBetaMinusChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(aBetaMinusChannel);
|
||||
modeSumBR[1] += b;
|
||||
modeSumBR[BetaMinus] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -707,7 +709,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aBetaPlusChannel->DumpNuclearInfo();
|
||||
// aBetaPlusChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(aBetaPlusChannel);
|
||||
modeSumBR[2] += b;
|
||||
modeSumBR[BetaPlus] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -720,7 +722,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aKECChannel->SetHLThreshold(halflifethreshold);
|
||||
aKECChannel->SetARM(applyARM);
|
||||
theDecayTable->Insert(aKECChannel);
|
||||
modeSumBR[3] += b;
|
||||
modeSumBR[KshellEC] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -733,7 +735,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aLECChannel->SetHLThreshold(halflifethreshold);
|
||||
aLECChannel->SetARM(applyARM);
|
||||
theDecayTable->Insert(aLECChannel);
|
||||
modeSumBR[4] += b;
|
||||
modeSumBR[LshellEC] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -746,7 +748,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aMECChannel->SetHLThreshold(halflifethreshold);
|
||||
aMECChannel->SetARM(applyARM);
|
||||
theDecayTable->Insert(aMECChannel);
|
||||
modeSumBR[5] += b;
|
||||
modeSumBR[MshellEC] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -759,7 +761,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aNECChannel->SetHLThreshold(halflifethreshold);
|
||||
aNECChannel->SetARM(applyARM);
|
||||
theDecayTable->Insert(aNECChannel);
|
||||
modeSumBR[6] += b;
|
||||
modeSumBR[NshellEC] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -771,7 +773,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// anAlphaChannel->DumpNuclearInfo();
|
||||
// anAlphaChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(anAlphaChannel);
|
||||
modeSumBR[7] += b;
|
||||
modeSumBR[Alpha] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -783,7 +785,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aProtonChannel->DumpNuclearInfo();
|
||||
// aProtonChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(aProtonChannel);
|
||||
modeSumBR[8] += b;
|
||||
modeSumBR[Proton] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -795,34 +797,10 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// aNeutronChannel->DumpNuclearInfo();
|
||||
// aNeutronChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(aNeutronChannel);
|
||||
modeSumBR[9] += b;
|
||||
modeSumBR[Neutron] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
case BDProton:
|
||||
// Not yet implemented
|
||||
// G4cout << " beta-delayed proton decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case BDNeutron:
|
||||
// Not yet implemented
|
||||
// G4cout << " beta-delayed neutron decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case Beta2Minus:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta- decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case Beta2Plus:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta+ decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case Proton2:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double proton decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case Neutron2:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta- decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
case SpFission:
|
||||
{
|
||||
G4SFDecay* aSpontFissChannel =
|
||||
@@ -830,9 +808,40 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
new G4SFDecay(&theParentNucleus, b, c*MeV, a*MeV,
|
||||
daughterFloatLevel);
|
||||
theDecayTable->Insert(aSpontFissChannel);
|
||||
modeSumBR[10] += b;
|
||||
modeSumBR[SpFission] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
case BDProton:
|
||||
// Not yet implemented
|
||||
// G4cout << " beta-delayed proton decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case BDNeutron:
|
||||
// Not yet implemented
|
||||
// G4cout << " beta-delayed neutron decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case Beta2Minus:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta- decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case Beta2Plus:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta+ decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case Proton2:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double proton decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case Neutron2:
|
||||
// Not yet implemented
|
||||
// G4cout << " Double beta- decay, a = " << a << ", b = " << b << ", c = " << c << G4endl;
|
||||
break;
|
||||
|
||||
case Triton:
|
||||
{
|
||||
G4TritonDecay* aTritonChannel =
|
||||
@@ -841,7 +850,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
// anAlphaChannel->DumpNuclearInfo();
|
||||
// anAlphaChannel->SetHLThreshold(halflifethreshold);
|
||||
theDecayTable->Insert(aTritonChannel);
|
||||
modeSumBR[11] += b;
|
||||
modeSumBR[Triton] += b;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -899,7 +908,7 @@ G4RadioactiveDecayBase::LoadDecayTable(const G4ParticleDefinition& theParentNucl
|
||||
}
|
||||
|
||||
void
|
||||
G4RadioactiveDecayBase::AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
|
||||
G4RadioactiveDecay::AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
|
||||
{
|
||||
if (Z < 1 || A < 2) G4cout << "Z and A not valid!" << G4endl;
|
||||
|
||||
@@ -910,7 +919,7 @@ G4RadioactiveDecayBase::AddUserDecayDataFile(G4int Z, G4int A, G4String filename
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << filename << " does not exist! " << G4endl;
|
||||
G4Exception("G4RadioactiveDecayBase::AddUserDecayDataFile()", "HAD_RDM_001",
|
||||
G4Exception("G4RadioactiveDecay::AddUserDecayDataFile()", "HAD_RDM_001",
|
||||
FatalException, ed);
|
||||
}
|
||||
}
|
||||
@@ -922,7 +931,7 @@ G4RadioactiveDecayBase::AddUserDecayDataFile(G4int Z, G4int A, G4String filename
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4VParticleChange*
|
||||
G4RadioactiveDecayBase::DecayIt(const G4Track& theTrack, const G4Step&)
|
||||
G4RadioactiveDecay::DecayIt(const G4Track& theTrack, const G4Step&)
|
||||
{
|
||||
// Initialize G4ParticleChange object, get particle details and decay table
|
||||
fParticleChangeForRadDecay.Initialize(theTrack);
|
||||
@@ -1089,7 +1098,7 @@ G4RadioactiveDecayBase::DecayIt(const G4Track& theTrack, const G4Step&)
|
||||
}
|
||||
|
||||
|
||||
void G4RadioactiveDecayBase::DecayAnalog(const G4Track& theTrack)
|
||||
void G4RadioactiveDecay::DecayAnalog(const G4Track& theTrack)
|
||||
{
|
||||
const G4DynamicParticle* theParticle = theTrack.GetDynamicParticle();
|
||||
const G4ParticleDefinition* theParticleDef = theParticle->GetDefinition();
|
||||
@@ -1170,23 +1179,29 @@ void G4RadioactiveDecayBase::DecayAnalog(const G4Track& theTrack)
|
||||
products->IsChecked();
|
||||
}
|
||||
|
||||
for (G4int index = 0; index < numberOfSecondaries; index++) {
|
||||
G4Track* secondary = new G4Track(products->PopProducts(), finalGlobalTime,
|
||||
theTrack.GetPosition() );
|
||||
secondary->SetWeight(theTrack.GetWeight());
|
||||
secondary->SetCreatorModelIndex(theRadDecayMode);
|
||||
//Change for atomics relaxation
|
||||
if (theRadDecayMode == IT && index>0){
|
||||
if (index == numberOfSecondaries-1) secondary->SetCreatorModelIndex(IT);
|
||||
else secondary->SetCreatorModelIndex(30);
|
||||
}
|
||||
else if (theRadDecayMode >= KshellEC && theRadDecayMode <= NshellEC
|
||||
&& index <numberOfSecondaries-1){
|
||||
secondary->SetCreatorModelIndex(30);
|
||||
const G4int modelID_forIT = G4PhysicsModelCatalog::GetModelID( "model_RDM_IT" );
|
||||
G4int modelID = modelID_forIT + 10*theRadDecayMode;
|
||||
const G4int modelID_forAtomicRelaxation =
|
||||
G4PhysicsModelCatalog::GetModelID( "model_RDM_AtomicRelaxation" );
|
||||
for ( G4int index = 0; index < numberOfSecondaries; ++index ) {
|
||||
G4Track* secondary = new G4Track( products->PopProducts(), finalGlobalTime,
|
||||
theTrack.GetPosition() );
|
||||
secondary->SetWeight( theTrack.GetWeight() );
|
||||
secondary->SetCreatorModelID( modelID );
|
||||
// Change for atomics relaxation
|
||||
if ( theRadDecayMode == IT && index > 0 ) {
|
||||
if ( index == numberOfSecondaries-1 ) {
|
||||
secondary->SetCreatorModelID( modelID_forIT );
|
||||
} else {
|
||||
secondary->SetCreatorModelID( modelID_forAtomicRelaxation) ;
|
||||
}
|
||||
} else if ( theRadDecayMode >= KshellEC && theRadDecayMode <= NshellEC &&
|
||||
index < numberOfSecondaries-1 ) {
|
||||
secondary->SetCreatorModelID( modelID_forAtomicRelaxation );
|
||||
}
|
||||
secondary->SetGoodForTrackingFlag();
|
||||
secondary->SetTouchableHandle(theTrack.GetTouchableHandle());
|
||||
fParticleChangeForRadDecay.AddSecondary(secondary);
|
||||
secondary->SetTouchableHandle( theTrack.GetTouchableHandle() );
|
||||
fParticleChangeForRadDecay.AddSecondary( secondary );
|
||||
}
|
||||
|
||||
delete products;
|
||||
@@ -1202,7 +1217,7 @@ void G4RadioactiveDecayBase::DecayAnalog(const G4Track& theTrack)
|
||||
|
||||
|
||||
G4DecayProducts*
|
||||
G4RadioactiveDecayBase::DoDecay(const G4ParticleDefinition& theParticleDef)
|
||||
G4RadioactiveDecay::DoDecay(const G4ParticleDefinition& theParticleDef)
|
||||
{
|
||||
G4DecayProducts* products = 0;
|
||||
G4DecayTable* theDecayTable = GetDecayTable(&theParticleDef);
|
||||
@@ -1241,7 +1256,8 @@ G4RadioactiveDecayBase::DoDecay(const G4ParticleDefinition& theParticleDef)
|
||||
|
||||
// Apply directional bias for "visible" daughters (e+-, gamma, n, p, alpha)
|
||||
|
||||
void G4RadioactiveDecayBase::CollimateDecay(G4DecayProducts* products) {
|
||||
void G4RadioactiveDecay::CollimateDecay(G4DecayProducts* products) {
|
||||
|
||||
if (origin == forceDecayDirection) return; // No collimation requested
|
||||
if (180.*deg == forceDecayHalfAngle) return;
|
||||
if (0 == products || 0 == products->entries()) return;
|
||||
@@ -1270,7 +1286,7 @@ void G4RadioactiveDecayBase::CollimateDecay(G4DecayProducts* products) {
|
||||
}
|
||||
}
|
||||
|
||||
void G4RadioactiveDecayBase::CollimateDecayProduct(G4DynamicParticle* daughter) {
|
||||
void G4RadioactiveDecay::CollimateDecayProduct(G4DynamicParticle* daughter) {
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel() > 1) {
|
||||
G4cout << "CollimateDecayProduct for daughter "
|
||||
@@ -1285,7 +1301,7 @@ void G4RadioactiveDecayBase::CollimateDecayProduct(G4DynamicParticle* daughter)
|
||||
|
||||
// Choose random direction within collimation cone
|
||||
|
||||
G4ThreeVector G4RadioactiveDecayBase::ChooseCollimationDirection() const {
|
||||
G4ThreeVector G4RadioactiveDecay::ChooseCollimationDirection() const {
|
||||
if (origin == forceDecayDirection) return origin; // Don't do collimation
|
||||
if (forceDecayHalfAngle == 180.*deg) return origin;
|
||||
|
||||
+6
-6
@@ -26,7 +26,7 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// File: G4RadioactiveDecayBaseMessenger.cc //
|
||||
// File: G4RadioactiveDecayMessenger.cc //
|
||||
// Author: D.H. Wright (SLAC) //
|
||||
// Date: 29 August 2017 //
|
||||
// Description: messenger class for the non-biased version of //
|
||||
@@ -35,14 +35,14 @@
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "G4RadioactiveDecayBaseMessenger.hh"
|
||||
#include "G4RadioactiveDecayMessenger.hh"
|
||||
#include "G4NuclearLevelData.hh"
|
||||
#include <sstream>
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
|
||||
G4RadioactiveDecayBaseMessenger::G4RadioactiveDecayBaseMessenger
|
||||
(G4RadioactiveDecayBase* theRadioactiveDecayContainer1)
|
||||
G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger
|
||||
(G4RadioactiveDecay* theRadioactiveDecayContainer1)
|
||||
:theRadioactiveDecayContainer(theRadioactiveDecayContainer1)
|
||||
{
|
||||
rdmDirectory = new G4UIdirectory("/process/had/rdm/");
|
||||
@@ -144,7 +144,7 @@ G4RadioactiveDecayBaseMessenger::G4RadioactiveDecayBaseMessenger
|
||||
}
|
||||
|
||||
|
||||
G4RadioactiveDecayBaseMessenger::~G4RadioactiveDecayBaseMessenger ()
|
||||
G4RadioactiveDecayMessenger::~G4RadioactiveDecayMessenger ()
|
||||
{
|
||||
delete rdmDirectory;
|
||||
delete nucleuslimitsCmd;
|
||||
@@ -164,7 +164,7 @@ G4RadioactiveDecayBaseMessenger::~G4RadioactiveDecayBaseMessenger ()
|
||||
|
||||
|
||||
void
|
||||
G4RadioactiveDecayBaseMessenger::SetNewValue(G4UIcommand *command, G4String newValues)
|
||||
G4RadioactiveDecayMessenger::SetNewValue(G4UIcommand *command, G4String newValues)
|
||||
{
|
||||
if ( command == nucleuslimitsCmd ) {
|
||||
theRadioactiveDecayContainer->
|
||||
Reference in New Issue
Block a user