Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -0,0 +1,168 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4Radioactivation_h
#define G4Radioactivation_h 1
#include "G4RadioactiveDecayBase.hh"
#include <vector>
#include <map>
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4ios.hh"
#include "globals.hh"
#include "G4VRestDiscreteProcess.hh"
#include "G4ParticleChangeForRadDecay.hh"
#include "G4NucleusLimits.hh"
#include "G4RadioactiveDecayRatesToDaughter.hh"
#include "G4RadioactiveDecayChainsFromParent.hh"
#include "G4RadioactivityTable.hh"
#include "G4ThreeVector.hh"
#include "G4Threading.hh"
class G4Fragment;
class G4RadioactivationMessenger;
typedef std::vector<G4RadioactiveDecayChainsFromParent> G4RadioactiveDecayParentChainTable;
typedef std::vector<G4RadioactiveDecayRatesToDaughter> G4RadioactiveDecayRates;
typedef std::map<G4String, G4DecayTable*> DecayTableMap;
class G4Radioactivation : public G4RadioactiveDecayBase
{
public: // with description
G4Radioactivation(const G4String& processName="Radioactivation");
~G4Radioactivation();
virtual void ProcessDescription(std::ostream& outFile) const;
// Set the decay biasing scheme using the data in "filename"
void SetDecayBias(G4String filename);
// Set the half-life threshold for isomer production
void SetHLThreshold(G4double hl) {halflifethreshold = hl;}
void SetSourceTimeProfile(G4String filename);
// Set source exposure function using histograms in "filename"
G4bool IsRateTableReady(const G4ParticleDefinition &);
// Returns true if the coefficient and decay time table for all the
// descendants of the specified isotope are ready.
// used in VR decay mode only
void CalculateChainsFromParent(const G4ParticleDefinition&);
// Calculates the coefficient and decay time table for all the descendents
// of the specified isotope. Adds the calculated table to the private data
// member "theParentChainTable".
// used in VR decay mode only
void GetChainsFromParent(const G4ParticleDefinition&);
// Used to retrieve the coefficient and decay time table for all the
// descendants of the specified isotope from "theParentChainTable"
// and place it in "chainsFromParent".
// used in VR decay mode only
void SetDecayRate(G4int,G4int,G4double, G4int, std::vector<G4double>,
std::vector<G4double>);
// Sets "theDecayRate" with data supplied in the arguements.
// used in VR decay mode only
std::vector<G4RadioactivityTable*> GetTheRadioactivityTables()
{return theRadioactivityTables;}
// Return vector of G4Radioactivity map - should be used in VR mode only
inline void SetVerboseLevel(G4int value) {verboseLevel = value;}
// Sets the VerboseLevel which controls duggering display
inline G4int GetVerboseLevel() const {return verboseLevel;}
// Returns the VerboseLevel which controls level of debugging output
// Sets whether branching ration bias scheme applies.
inline void SetBRBias(G4bool r) {
BRBias = r;
}
// Sets the number of times a nucleus will decay when biased
inline void SetSplitNuclei(G4int r) {
NSplit = r;
}
// Returns the nuclear splitting number
inline G4int GetSplitNuclei () {return NSplit;}
G4VParticleChange* DecayIt(const G4Track& theTrack,
const G4Step& theStep);
protected:
G4double ConvolveSourceTimeProfile(const G4double, const G4double);
G4double GetDecayTime();
G4int GetDecayTimeBin(const G4double aDecayTime);
//Add gamma,Xray,conversion,and auger electrons for bias mode
void AddDeexcitationSpectrumForBiasMode(G4ParticleDefinition* apartDef,
G4double weight,
G4double currenTime,
std::vector<double>& weights_v,
std::vector<double>& times_v,
std::vector<G4DynamicParticle*>& secondaries_v);
G4RadioactivationMessenger* theRadioactivationMessenger;
private:
G4bool BRBias;
G4int NSplit;
G4double halflifethreshold;
G4int NSourceBin;
G4double SBin[100];
G4double SProfile[100];
G4int NDecayBin;
G4double DBin[100];
G4double DProfile[100];
G4RadioactiveDecayRatesToDaughter ratesToDaughter;
G4RadioactiveDecayRates theDecayRateVector;
G4RadioactiveDecayChainsFromParent chainsFromParent;
G4RadioactiveDecayParentChainTable theParentChainTable;
// for the radioactivity tables
std::vector<G4RadioactivityTable*> theRadioactivityTables;
G4int decayWindows[100];
// Remainder of life time at rest
// G4double fRemainderLifeTime;
G4int verboseLevel;
};
#endif
@@ -0,0 +1,91 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4RadioactivationMessenger_h
#define G4RadioactivationMessenger_h 1
////////////////////////////////////////////////////////////////////////////////
// //
// File: G4RadioactivationMessenger.hh //
// Author: D.H. Wright (SLAC) //
// Date: 29 August 2017 //
// Description: messenger class for biased version of G4RadioactiveDecay. //
// Based on the code of F. Lei and P.R. Truscott. //
// //
////////////////////////////////////////////////////////////////////////////////
#include "G4UImessenger.hh"
#include "G4UIdirectory.hh"
#include "G4UIcommand.hh"
// #include "G4UIcmdWith3VectorAndUnit.hh"
// #include "G4UIcmdWith3Vector.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
// #include "G4UIcmdWithoutParameter.hh"
#include "globals.hh"
#include "G4Radioactivation.hh"
#include "G4UIcmdWithNucleusLimits.hh"
class G4Radioactivation;
class G4RadioactivationMessenger: public G4UImessenger
{
public:
G4RadioactivationMessenger(G4Radioactivation* theRadioactivationContainer);
~G4RadioactivationMessenger();
void SetNewValue(G4UIcommand* command, G4String newValues);
private:
G4Radioactivation* theRadioactivationContainer;
G4UIdirectory* grdmDirectory;
// G4UIcmdWithNucleusLimits* nucleuslimitsCmd;
G4UIcmdWithAString* sourcetimeprofileCmd;
G4UIcmdWithAString* decaybiasprofileCmd;
// G4UIcmdWithABool* fbetaCmd;
G4UIcmdWithABool* brbiasCmd;
G4UIcmdWithAnInteger* splitnucleiCmd;
// G4UIcmdWithAnInteger* verboseCmd;
// G4UIcmdWithAString* avolumeCmd;
// G4UIcmdWithAString* deavolumeCmd;
// G4UIcmdWithoutParameter* allvolumesCmd;
// G4UIcmdWithoutParameter* deallvolumesCmd;
// G4UIcmdWithABool* icmCmd;
// G4UIcmdWithABool* armCmd;
G4UIcmdWithADoubleAndUnit* hlthCmd;
// G4UIcommand* userDecayDataCmd;
// G4UIcommand* userEvaporationDataCmd;
// G4UIcmdWith3Vector* colldirCmd;
// G4UIcmdWithADoubleAndUnit* collangleCmd;
};
#endif
@@ -64,8 +64,8 @@
#include "G4ParticleChangeForRadDecay.hh"
#include "G4NucleusLimits.hh"
#include "G4RadioactiveDecayRate.hh"
#include "G4RadioactiveDecayRateVector.hh"
#include "G4RadioactiveDecayRatesToDaughter.hh"
#include "G4RadioactiveDecayChainsFromParent.hh"
#include "G4RadioactivityTable.hh"
#include "G4ThreeVector.hh"
#include "G4Threading.hh"
@@ -74,8 +74,8 @@ class G4Fragment;
class G4RadioactiveDecaymessenger;
class G4PhotonEvaporation;
typedef std::vector<G4RadioactiveDecayRateVector> G4RadioactiveDecayRateTable;
typedef std::vector<G4RadioactiveDecayRate> G4RadioactiveDecayRates;
typedef std::vector<G4RadioactiveDecayChainsFromParent> G4RadioactiveDecayParentChainTable;
typedef std::vector<G4RadioactiveDecayRatesToDaughter> G4RadioactiveDecayRates;
typedef std::map<G4String, G4DecayTable*> DecayTableMap;
@@ -96,6 +96,8 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
G4RadioactiveDecay(const G4String& processName="RadioactiveDecay");
~G4RadioactiveDecay();
virtual void ProcessDescription(std::ostream& outFile) const;
// Return true if the specified isotope is
// 1) defined as "nucleus" and
// 2) it is within theNucleusLimit
@@ -136,16 +138,16 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
// descendants of the specified isotope are ready.
// used in VR decay mode only
void AddDecayRateTable(const G4ParticleDefinition&);
void CalculateChainsFromParent(const G4ParticleDefinition&);
// Calculates the coefficient and decay time table for all the descendents
// of the specified isotope. Adds the calculated table to the private data
// member "theDecayRateTableVector".
// member "theParentChainTable".
// used in VR decay mode only
void GetDecayRateTable(const G4ParticleDefinition&);
void GetChainsFromParent(const G4ParticleDefinition&);
// Used to retrieve the coefficient and decay time table for all the
// descendants of the specified isotope from "theDecayRateTableVector"
// and place it in "theDecayRateTable".
// descendants of the specified isotope from "theParentChainTable"
// and place it in "chainsFromParent".
// used in VR decay mode only
void SetDecayRate(G4int,G4int,G4double, G4int, std::vector<G4double>,
@@ -164,7 +166,6 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
// Allow the user to replace the radio-active decay data provided in Geant4
// by its own data file for a given isotope
inline void SetVerboseLevel(G4int value) {verboseLevel = value;}
// Sets the VerboseLevel which controls duggering display
@@ -181,34 +182,36 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
// Returns theNucleusLimits which specifies the range of isotopes
// the G4RadioactiveDecay applies
// Controls whether G4RadioactiveDecay runs in analogue mode or
// variance reduction mode. SetBRBias, SetSplitNuclei and
// SetSourceTimeProfile all turn off analogue mode and use VR mode
inline void SetAnalogueMonteCarlo (G4bool r ) {
AnalogueMC = r;
AnalogueMC = r;
if (!AnalogueMC) halflifethreshold = 1e-6*CLHEP::s;
}
// Controls whether G4RadioactiveDecay runs in analogue mode or
// variance reduction mode.
inline void SetFBeta (G4bool r ) { FBeta = r; }
// Controls whether G4RadioactiveDecay uses fast beta simulation mode
// Currently does nothing - kept for backward compatibility
inline void SetFBeta (G4bool r ) { FBeta = r; }
inline G4bool IsAnalogueMonteCarlo () {return AnalogueMC;}
// Returns true if the simulation is an analogue Monte Carlo, and false if
// any of the biassing schemes have been selected.
inline G4bool IsAnalogueMonteCarlo () {return AnalogueMC;}
inline void SetBRBias (G4bool r) {
// Sets whether branching ration bias scheme applies.
inline void SetBRBias(G4bool r) {
BRBias = r;
SetAnalogueMonteCarlo(0);
}
// Sets whether branching ration bias scheme applies.
inline void SetSplitNuclei (G4int r) {
// Sets the number of times a nucleus will decay when biased
inline void SetSplitNuclei(G4int r) {
NSplit = r;
SetAnalogueMonteCarlo(0);
}
// Sets the N number for the Nuclei spliting bias scheme
// Returns the nuclear splitting number
inline G4int GetSplitNuclei () {return NSplit;}
// Returns the N number used for the Nuclei spliting bias scheme
inline void SetDecayDirection(const G4ThreeVector& theDir) {
forceDecayDirection = theDir.unit();
@@ -224,15 +227,14 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
inline G4double GetDecayHalfAngle() const {return forceDecayHalfAngle;}
// Force direction (random within half-angle) for "visible" daughters
// (applies to electrons, positrons, gammas, neutrons, protons or alphas)
inline void SetDecayCollimation(const G4ThreeVector& theDir,
G4double halfAngle = 0.*CLHEP::deg) {
SetDecayDirection(theDir);
SetDecayHalfAngle(halfAngle);
}
// Force direction (random within half-angle) for "visible" daughters
// (applies to electrons, positrons, gammas, neutrons, protons or alphas)
void BuildPhysicsTable(const G4ParticleDefinition &);
G4VParticleChange* DecayIt(const G4Track& theTrack,
@@ -269,6 +271,8 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
private:
void StreamInfo(std::ostream& os, const G4String& endline);
G4RadioactiveDecay(const G4RadioactiveDecay &right);
G4RadioactiveDecay & operator=(const G4RadioactiveDecay &right);
@@ -302,10 +306,10 @@ class G4RadioactiveDecay : public G4VRestDiscreteProcess
std::vector<G4String> ValidVolumes;
bool isAllVolumesMode;
G4RadioactiveDecayRate theDecayRate;
G4RadioactiveDecayRatesToDaughter ratesToDaughter;
G4RadioactiveDecayRates theDecayRateVector;
G4RadioactiveDecayRateVector theDecayRateTable;
G4RadioactiveDecayRateTable theDecayRateTableVector;
G4RadioactiveDecayChainsFromParent chainsFromParent;
G4RadioactiveDecayParentChainTable theParentChainTable;
// for the radioactivity tables
std::vector<G4RadioactivityTable*> theRadioactivityTables;
@@ -0,0 +1,248 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
////////////////////////////////////////////////////////////////////////////////
// //
// File: G4RadioactiveDecayBase.hh //
// Author: D.H. Wright (SLAC) //
// Date: 9 August 2017 //
// Description: version the G4RadioactiveDecay process by F. Lei and //
// P.R. Truscott with biasing and activation calculations //
// removed to a derived class. It performs alpha, beta, //
// electron capture and isomeric transition decays of //
// radioactive nuclei. //
// //
////////////////////////////////////////////////////////////////////////////////
#ifndef G4RadioactiveDecayBase_h
#define G4RadioactiveDecayBase_h 1
#include <vector>
#include <map>
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4ios.hh"
#include "globals.hh"
#include "G4VRestDiscreteProcess.hh"
#include "G4ParticleChangeForRadDecay.hh"
#include "G4NucleusLimits.hh"
#include "G4ThreeVector.hh"
#include "G4Threading.hh"
class G4Fragment;
class G4RadioactiveDecayBaseMessenger;
class G4PhotonEvaporation;
typedef std::map<G4String, G4DecayTable*> DecayTableMap;
class G4RadioactiveDecayBase : public G4VRestDiscreteProcess
{
// class description
// Implementation of the radioactive decay process which simulates the
// decays of radioactive nuclei. These nuclei are submitted to RDM as
// G4Ions. The required half-lives and decay schemes are retrieved from
// the Radioactivity database which was derived from ENSDF.
// All decay products are submitted back to the particle tracking process
// through the G4ParticleChangeForRadDecay object.
// class description - end
public: // with description
G4RadioactiveDecayBase(const G4String& processName="RadioactiveDecayBase");
~G4RadioactiveDecayBase();
virtual void ProcessDescription(std::ostream& outFile) const;
G4bool IsApplicable(const G4ParticleDefinition&);
// Return true if the specified isotope is
// 1) defined as "nucleus" and
// 2) it is within theNucleusLimit
// Return decay table if it exists, if not, load it from file
G4DecayTable* GetDecayTable(const G4ParticleDefinition*);
// Select a logical volume in which RDM applies
void SelectAVolume(const G4String aVolume);
// Remove a logical volume from the RDM applied list
void DeselectAVolume(const G4String aVolume);
// Select all logical volumes for the application of RDM
void SelectAllVolumes();
// Remove all logical volumes from RDM applications
void DeselectAllVolumes();
// Enable/disable ICM
void SetICM(G4bool icm) {applyICM = icm;}
// Enable/disable ARM
void SetARM(G4bool arm) {applyARM = arm;}
G4DecayTable* LoadDecayTable(const G4ParticleDefinition& theParentNucleus);
// Load the decay data of isotope theParentNucleus
void AddUserDecayDataFile(G4int Z, G4int A,G4String filename);
// Allow the user to replace the radio-active decay data provided in Geant4
// by its own data file for a given isotope
inline void SetVerboseLevel(G4int value) {verboseLevel = value;}
// Sets the VerboseLevel which controls duggering display
inline G4int GetVerboseLevel() const {return verboseLevel;}
// Returns the VerboseLevel which controls level of debugging output
inline void SetNucleusLimits(G4NucleusLimits theNucleusLimits1)
{theNucleusLimits = theNucleusLimits1 ;}
// Sets theNucleusLimits which specifies the range of isotopes
// the G4RadioactiveDecay applies.
// Returns theNucleusLimits which specifies the range of isotopes used
// by G4RadioactiveDecay
inline G4NucleusLimits GetNucleusLimits() const {return theNucleusLimits;}
// Controls whether G4RadioactiveDecay uses fast beta simulation mode
// Currently does nothing - kept for backward compatibility
inline void SetFBeta (G4bool r ) { FBeta = r; }
inline void SetDecayDirection(const G4ThreeVector& theDir) {
forceDecayDirection = theDir.unit();
}
inline const G4ThreeVector& GetDecayDirection() const {
return forceDecayDirection;
}
inline void SetDecayHalfAngle(G4double halfAngle=0.*CLHEP::deg) {
forceDecayHalfAngle = std::min(std::max(0.*CLHEP::deg,halfAngle),180.*CLHEP::deg);
}
inline G4double GetDecayHalfAngle() const {return forceDecayHalfAngle;}
// Force direction (random within half-angle) for "visible" daughters
// (applies to electrons, positrons, gammas, neutrons, protons or alphas)
inline void SetDecayCollimation(const G4ThreeVector& theDir,
G4double halfAngle = 0.*CLHEP::deg) {
SetDecayDirection(theDir);
SetDecayHalfAngle(halfAngle);
}
void BuildPhysicsTable(const G4ParticleDefinition &);
G4VParticleChange* DecayIt(const G4Track& theTrack,
const G4Step& theStep);
protected:
G4DecayProducts* DoDecay(const G4ParticleDefinition& theParticleDef);
// Apply directional bias for "visible" daughters (e+-, gamma, n, p, alpha)
void CollimateDecay(G4DecayProducts* products);
void CollimateDecayProduct(G4DynamicParticle* product);
G4ThreeVector ChooseCollimationDirection() const;
G4double GetMeanFreePath(const G4Track& theTrack, G4double previousStepSize,
G4ForceCondition* condition);
G4double GetMeanLifeTime(const G4Track& theTrack,
G4ForceCondition* condition);
// G4double GetDecayTime();
// ParticleChange for decay process
G4ParticleChangeForRadDecay fParticleChangeForRadDecay;
G4RadioactiveDecayBaseMessenger* theRadioactiveDecayBaseMessenger;
G4PhotonEvaporation* photonEvaporation;
std::vector<G4String> ValidVolumes;
bool isAllVolumesMode;
static const G4double levelTolerance;
private:
G4RadioactiveDecayBase(const G4RadioactiveDecayBase &right);
G4RadioactiveDecayBase& operator=(const G4RadioactiveDecayBase &right);
G4NucleusLimits theNucleusLimits;
G4bool isInitialised;
G4bool FBeta;
G4bool applyICM;
G4bool applyARM;
// Parameters for pre-collimated (biased) decay products
G4ThreeVector forceDecayDirection;
G4double forceDecayHalfAngle;
static const G4ThreeVector origin; // (0,0,0) for convenience
//User define radioactive decay data files replacing some files in the G4RADECAY database
std::map<G4int, G4String> theUserRadioactiveDataFiles;
// Library of decay tables
DecayTableMap* dkmap;
#ifdef G4MULTITHREADED
static DecayTableMap* master_dkmap;
#endif
// Remainder of life time at rest
G4double fRemainderLifeTime;
G4int verboseLevel;
// inline implementations
inline
G4double AtRestGetPhysicalInteractionLength(const G4Track& track,
G4ForceCondition* condition)
{
fRemainderLifeTime =
G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(track, condition);
return fRemainderLifeTime;
}
inline
G4VParticleChange* AtRestDoIt(const G4Track& theTrack,
const G4Step& theStep)
{return DecayIt(theTrack, theStep);}
inline
G4VParticleChange* PostStepDoIt(const G4Track& theTrack,
const G4Step& theStep)
{return DecayIt(theTrack, theStep);}
#ifdef G4MULTITHREADED
public:
static G4Mutex radioactiveDecayMutex;
#endif
};
#endif
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4RadioactiveDecayBaseMessenger_h
#define G4RadioactiveDecayBaseMessenger_h 1
////////////////////////////////////////////////////////////////////////////////
// //
// File: G4RadioactiveDecayBaseMessenger.hh //
// Author: D.H. Wright (SLAC) //
// Date: 29 August 2017 //
// Description: messenger class for the non-biased version of //
// G4RadioactiveDecay. Based on the code of F. Lei and //
// P.R. Truscott. //
// //
////////////////////////////////////////////////////////////////////////////////
#include "G4UImessenger.hh"
#include "G4UIdirectory.hh"
#include "G4UIcommand.hh"
#include "G4UIcmdWith3VectorAndUnit.hh"
#include "G4UIcmdWith3Vector.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "globals.hh"
#include "G4RadioactiveDecayBase.hh"
#include "G4UIcmdWithNucleusLimits.hh"
class G4RadioactiveDecayBase;
class G4RadioactiveDecayBaseMessenger: public G4UImessenger
{
public: //with description
G4RadioactiveDecayBaseMessenger(G4RadioactiveDecayBase* theRadioactiveDecayContainer);
~G4RadioactiveDecayBaseMessenger();
void SetNewValue (G4UIcommand *command, G4String newValues);
private:
G4RadioactiveDecayBase* theRadioactiveDecayContainer;
G4UIdirectory* grdmDirectory;
G4UIcmdWithNucleusLimits* nucleuslimitsCmd;
G4UIcmdWithABool* fbetaCmd;
G4UIcmdWithAnInteger* verboseCmd;
G4UIcmdWithAString* avolumeCmd;
G4UIcmdWithAString* deavolumeCmd;
G4UIcmdWithoutParameter* allvolumesCmd;
G4UIcmdWithoutParameter* deallvolumesCmd;
G4UIcmdWithABool* icmCmd;
G4UIcmdWithABool* armCmd;
G4UIcommand* userDecayDataCmd;
G4UIcommand* userEvaporationDataCmd;
G4UIcmdWith3Vector* colldirCmd;
G4UIcmdWithADoubleAndUnit* collangleCmd;
};
#endif
@@ -23,12 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4RadioactiveDecayRateVector_h
#define G4RadioactiveDecayRateVector_h 1
#ifndef G4RadioactiveDecayChainsFromParent_h
#define G4RadioactiveDecayChainsFromParent_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: RadioactiveDecayRateVector.hh
//
// renamed as G4RadioactiveDecayChainsFromParent.hh (D.H. wright 6 Oct 2017)
// Version: 0.b.4
// Date: 14/04/00
// Author: F Lei & P R Truscott
@@ -47,66 +47,51 @@
// 13 April 2000, F Lei, DERA UK
// 0.b.4 release. No change to this file
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
// //
// This class contains the decay times and coefficients for calculating //
// all the descendants in the decay chains of the named isotope. These //
// data can be used to calculate their radioactivity at any given time. //
// //
////////////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "globals.hh"
#include "G4RadioactiveDecayRate.hh"
#include "G4RadioactiveDecayRatesToDaughter.hh"
#include <vector>
////////////////////////////////////////////////////////////////////////////////
//
class G4RadioactiveDecayRateVector
{
// class description
// This class contains the decay times and coefficients for calculating
// all the descendants of the named isotope. These data can be used to
// calculate their radioactivity at any given time
// class description - end
public:
typedef std::vector<G4RadioactiveDecayRate> G4RadioactiveDecayRates;
public:
//Constructors
G4RadioactiveDecayRateVector();
// Destructor
virtual ~G4RadioactiveDecayRateVector();
public:
// copy constructor and assignment operatotr
G4RadioactiveDecayRateVector(const G4RadioactiveDecayRateVector &);
G4RadioactiveDecayRateVector
& operator=(const G4RadioactiveDecayRateVector &);
public:
// equality operators
G4int operator==(const G4RadioactiveDecayRateVector &right) const
{return (this == &right);}
G4int operator!=(const G4RadioactiveDecayRateVector &right) const
{return (this != &right);}
public: // with description
inline G4String GetIonName() const {return ionName;}
//
// To retrieve the name of the isotope.
inline G4RadioactiveDecayRates GetItsRates() const {return itsRates; }
//
// To retrieve the coefficients and decays of all its descendants along the
// decay chain.
inline void SetIonName(G4String name) {ionName = name;}
//
// To set the name of the isotope.
inline void SetItsRates(G4RadioactiveDecayRates arate) {itsRates = arate;}
//
// To fill the coefficient and decay time table
typedef std::vector<G4RadioactiveDecayRatesToDaughter> G4RadioactiveDecayRates;
class G4RadioactiveDecayChainsFromParent
{
public:
G4RadioactiveDecayChainsFromParent();
virtual ~G4RadioactiveDecayChainsFromParent();
G4RadioactiveDecayChainsFromParent(const G4RadioactiveDecayChainsFromParent&);
G4RadioactiveDecayChainsFromParent& operator=(const G4RadioactiveDecayChainsFromParent&);
// equality operators
G4int operator==(const G4RadioactiveDecayChainsFromParent& right) const
{return (this == &right);}
G4int operator!=(const G4RadioactiveDecayChainsFromParent& right) const
{return (this != &right);}
public:
inline G4String GetIonName() const {return ionName;}
inline void SetIonName(G4String name) {ionName = name;}
// Retrieve the coefficients and decays of all descendants along the
// decay chains
inline G4RadioactiveDecayRates GetItsRates() const {return itsRates;}
// Fill in the coefficients and decay times in the chains
inline void SetItsRates(G4RadioactiveDecayRates arate) {itsRates = arate;}
protected:
G4String ionName;
G4RadioactiveDecayRates itsRates;
G4String ionName;
G4RadioactiveDecayRates itsRates;
};
#endif
@@ -23,12 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4RadioactiveDecayRate_h
#define G4RadioactiveDecayRate_h 1
#ifndef G4RadioactiveDecayRatesToDaughter_h
#define G4RadioactiveDecayRatesToDaughter_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: RadioactiveDecayRate.hh
//
// Renamed G4RadioactiveDecayRatesToDaughter.hh (D.H. Wright 5 October 2017)
// Version: 0.b.4
// Date: 14/04/00
// Author: F Lei & P R Truscott
@@ -47,88 +47,75 @@
// 13 April 2000, F Lei, DERA UK
// 0.b.4 release. No change to this file
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
//
// //
// This class contains the Z, A, E and generation number in a decay chain //
// of a given daughter nucleus. Decay rate coefficients and decay times of //
// all ancestor nuclides in decay chains which lead to this daughter are //
// also kept in this class. //
// //
////////////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include "globals.hh"
#include <vector>
////////////////////////////////////////////////////////////////////////////////
//
class G4RadioactiveDecayRate
class G4RadioactiveDecayRatesToDaughter
{
// class description
// This class contains the coefficient and decay times of the
// progeny of a give isotope (A,Z,E).
//
// class description - end
public:
// Constructors
G4RadioactiveDecayRate();
public:
G4RadioactiveDecayRatesToDaughter();
virtual ~G4RadioactiveDecayRatesToDaughter();
// Destructor
virtual ~G4RadioactiveDecayRate();
G4RadioactiveDecayRatesToDaughter(const G4RadioactiveDecayRatesToDaughter&);
G4RadioactiveDecayRatesToDaughter& operator=(const G4RadioactiveDecayRatesToDaughter&);
public:
// copy constructor and assignment operator
G4RadioactiveDecayRate(const G4RadioactiveDecayRate &);
G4RadioactiveDecayRate & operator=(const G4RadioactiveDecayRate &);
G4int operator==(const G4RadioactiveDecayRatesToDaughter& right) const
{return (this == &right);};
G4int operator!=(const G4RadioactiveDecayRatesToDaughter& right) const
{return (this != &right);};
public:
// equality operators
G4int operator==(const G4RadioactiveDecayRate &right) const
{return (this == &right);};
G4int operator!=(const G4RadioactiveDecayRate &right) const
{return (this != &right);};
public:
// less-than operator is defined for G4DecayTable
// G4int operator<(const G4RadioactiveDecayRate &right) const;
inline G4int GetZ() const {return Z;}
inline G4int GetA() const {return A;}
inline G4double GetE() const {return E;}
inline G4int GetGeneration() const {return generation;}
inline std::vector<G4double> GetDecayRateC() const
{return decayRateC;}
inline std::vector<G4double> GetTaos() const {return taos;}
public: // with description
//
// the inline member functions are self explanatory.
//
inline G4int GetZ() const {return Z;}
inline G4int GetA() const { return A;}
inline G4double GetE() const { return E;}
inline G4int GetGeneration() const { return generation;}
inline std::vector<G4double> GetDecayRateC() const
{ return decayRateC; }
inline std::vector<G4double> GetTaos() const { return taos; }
inline void SetZ(G4int value) {Z = value;}
inline void SetA(G4int value) {A = value;}
inline void SetE(G4double value) {E = value;}
inline void SetGeneration(G4int value) {generation = value;}
inline void SetDecayRateC(std::vector<G4double> value)
{decayRateC = value;}
inline void SetTaos(std::vector<G4double> value) {taos = value;}
inline void SetZ(G4int value) {Z = value;}
inline void SetA(G4int value) {A = value;}
inline void SetE(G4double value) {E = value;}
inline void SetGeneration(G4int value) {generation = value;}
inline void SetDecayRateC(std::vector<G4double> value)
{decayRateC = value;}
inline void SetTaos(std::vector<G4double> value) {taos = value;}
protected:
G4int Z;
G4int A;
G4double E;
G4int generation;
std::vector<G4double> decayRateC;
std::vector<G4double> taos;
protected:
public:
G4int Z;
G4int A;
G4double E;
G4int generation;
std::vector<G4double> decayRateC;
std::vector<G4double> taos;
inline void SetVerboseLevel(G4int value)
{verboseLevel = value;}
inline G4int GetVerboseLevel() const
{return verboseLevel;}
void DumpInfo();
public:
inline void SetVerboseLevel(G4int value)
{ verboseLevel = value; }
inline G4int GetVerboseLevel() const
{ return verboseLevel; }
void DumpInfo();
private:
G4int verboseLevel;
// control flag for output message
// G4int verboseLevel;
// 0: Silent
// 1: Warning message
// 2: More
private:
G4int verboseLevel;
// control flag for output message
// G4int verboseLevel;
// 0: Silent
// 1: Warning message
// 2: More
};
#endif