Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2024-08-14 Gabriele Cosmo (radioactive_decay-V11-02-05)
- Fixed reported Coverity defects for use of std::move().
## 2024-05-30 Vladimir Ivanchenko (radioactive_decay-V11-02-04)
- Rename G4RadioactiveDecay -> G4VRadioactiveDecay,
G4Radioactivation -> G4RadioactiveDecay, the header G4Radioactivation.hh is preserved
@@ -65,6 +65,7 @@ typedef std::vector<G4RadioactiveDecayRatesToDaughter> G4RadioactiveDecayRates;
class G4RadioactiveDecayChainsFromParent
{
public:
G4RadioactiveDecayChainsFromParent();
virtual ~G4RadioactiveDecayChainsFromParent();
@@ -72,27 +73,24 @@ class G4RadioactiveDecayChainsFromParent
G4RadioactiveDecayChainsFromParent& operator=(const G4RadioactiveDecayChainsFromParent&);
// equality operators
G4bool operator==(const G4RadioactiveDecayChainsFromParent& right) const
{return (this == &right);}
G4bool operator!=(const G4RadioactiveDecayChainsFromParent& right) const
{return (this != &right);}
G4bool operator==(const G4RadioactiveDecayChainsFromParent& right) const {return (this == &right);}
G4bool operator!=(const G4RadioactiveDecayChainsFromParent& right) const {return (this != &right);}
public:
inline G4String GetIonName() const {return ionName;}
inline void SetIonName(G4String name) {ionName = name;}
inline const G4String& GetIonName() const {return ionName;}
inline void SetIonName(const G4String& name) {ionName = name;}
// Retrieve the coefficients and decays of all descendants along the
// decay chains
inline G4RadioactiveDecayRates GetItsRates() const {return itsRates;}
inline const G4RadioactiveDecayRates& GetItsRates() const {return itsRates;}
// Fill in the coefficients and decay times in the chains
inline void SetItsRates(G4RadioactiveDecayRates arate) {itsRates = arate;}
inline void SetItsRates(const G4RadioactiveDecayRates& arate) {itsRates = arate;}
protected:
protected:
G4String ionName;
G4RadioactiveDecayRates itsRates;
};
#endif
@@ -58,22 +58,21 @@
#include "G4ios.hh"
#include "globals.hh"
#include <vector>
#include <vector>
class G4RadioactiveDecayRatesToDaughter
{
public:
G4RadioactiveDecayRatesToDaughter();
virtual ~G4RadioactiveDecayRatesToDaughter();
G4RadioactiveDecayRatesToDaughter(const G4RadioactiveDecayRatesToDaughter&);
G4RadioactiveDecayRatesToDaughter& operator=(const G4RadioactiveDecayRatesToDaughter&);
G4bool operator==(const G4RadioactiveDecayRatesToDaughter& right) const
{return (this == &right);};
G4bool operator!=(const G4RadioactiveDecayRatesToDaughter& right) const
{return (this != &right);};
G4bool operator==(const G4RadioactiveDecayRatesToDaughter& right) const {return (this == &right);}
G4bool operator!=(const G4RadioactiveDecayRatesToDaughter& right) const {return (this != &right);}
public:
@@ -81,19 +80,22 @@ class G4RadioactiveDecayRatesToDaughter
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> 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 SetDecayRateC(std::vector<G4double> value) {decayRateC = std::move(value);}
inline void SetTaos(std::vector<G4double> value) {taos = std::move(value);}
inline void SetVerboseLevel(G4int value) {verboseLevel = value;}
inline G4int GetVerboseLevel() const {return verboseLevel;}
void DumpInfo();
protected:
G4int Z;
G4int A;
G4double E;
@@ -101,15 +103,8 @@ class G4RadioactiveDecayRatesToDaughter
std::vector<G4double> decayRateC;
std::vector<G4double> taos;
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;
@@ -77,14 +77,14 @@ class G4UIcmdWithNucleusLimits : public G4UIcommand
{
public: // With description
G4UIcmdWithNucleusLimits
(const char * theCommandPath,G4UImessenger * theMessenger);
(const char * theCommandPath, G4UImessenger * theMessenger);
// Constructor identifying the command path in the User Interface and the
// associated G4UImessenger which will use this G4UIcommand object.
//
~G4UIcmdWithNucleusLimits();
// Destructor
//
G4NucleusLimits GetNewNucleusLimitsValue(G4String paramString);
G4NucleusLimits GetNewNucleusLimitsValue(const G4String& paramString);
// Extracts the values aMin, aMax, zMin, zMax from paramString.
// Values returned have aMin, aMax, zMin, and zMax (within the
// G4NucleusLimits variable).
@@ -101,4 +101,3 @@ public: // With description
};
////////////////////////////////////////////////////////////////////////////////
#endif
@@ -80,8 +80,8 @@ G4BatemanParameters::SetParameters(G4int aZ, G4int anA, G4double anE, G4int aG,
A = anA;
E = anE;
generation = aG;
Acoeffs = theCoeffs;
taus = theTaus;
Acoeffs = std::move(theCoeffs);
taus = std::move(theTaus);
}
@@ -29,8 +29,8 @@
////////////////////////////////////////////////////////////////////////////////
//
G4UIcmdWithNucleusLimits::G4UIcmdWithNucleusLimits
(const char * theCommandPath,G4UImessenger * theMessenger)
:G4UIcommand(theCommandPath,theMessenger)
(const char * theCommandPath, G4UImessenger * theMessenger)
: G4UIcommand(theCommandPath, theMessenger)
{
G4UIparameter * intParamAMin = new G4UIparameter('i');
SetParameter(intParamAMin);
@@ -51,7 +51,7 @@ G4UIcmdWithNucleusLimits::~G4UIcmdWithNucleusLimits()
////////////////////////////////////////////////////////////////////////////////
//
G4NucleusLimits G4UIcmdWithNucleusLimits::
GetNewNucleusLimitsValue(G4String paramString)
GetNewNucleusLimitsValue(const G4String& paramString)
{
G4int aMin;
G4int aMax;
@@ -108,9 +108,3 @@ void G4UIcmdWithNucleusLimits::SetDefaultValue(G4NucleusLimits defLimits)
G4UIparameter * theParamZMax = GetParameter(3);
theParamZMax->SetDefaultValue(defLimits.GetZMax());
}