Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -22,65 +22,40 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4HtmlPPReporter_h
#define G4HtmlPPReporter_h 1
#include "G4VParticlePropertyReporter.hh"
#include "globals.hh"
#include "G4ios.hh"
#include <fstream>
#include "G4VParticlePropertyReporter.hh"
class G4HtmlPPReporter: public G4VParticlePropertyReporter
class G4HtmlPPReporter : public G4VParticlePropertyReporter
{
public:
void Print(const G4String& option="") override;
private:
void SparseOption(const G4String& option);
void GenerateIndex();
void GeneratePropertyTable(const G4ParticleDefinition* );
void PrintHeader(std::ofstream& );
void PrintFooter(std::ofstream& );
private:
static const char *sTABLE, *eTABLE;
static const char *sTR, *eTR;
static const char *sTD, *eTD;
static const char *sB, *eB;
static const char *sLFONT, *eLFONT;
static const char *sSYMBOL, *eSYMBOL;
static const char *sSUP, *eSUP;
static const char *sSUB, *eSUB;
private:
G4String baseDir;
G4String comment;
public:
void Print(const G4String& option = "") override;
private:
void SparseOption(const G4String& option);
void GenerateIndex();
void GeneratePropertyTable(const G4ParticleDefinition*);
void PrintHeader(std::ofstream&);
void PrintFooter(std::ofstream&);
private:
static const char *sTABLE, *eTABLE;
static const char *sTR, *eTR;
static const char *sTD, *eTD;
static const char *sB, *eB;
static const char *sLFONT, *eLFONT;
static const char *sSYMBOL, *eSYMBOL;
static const char *sSUP, *eSUP;
static const char *sSUB, *eSUB;
G4String baseDir;
G4String comment;
};
#endif
@@ -35,93 +35,75 @@
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// HISTORY
////////////////////////////////////////////////////////////////////////////////// IsomerLevel is added 30 Apr. 2013 H.Kurashige
////////////////////////////////////////////////////////////////////////////////// IsomerLevel is
/// added 30 Apr. 2013 H.Kurashige
//
#include "globals.hh"
#include "G4IsotopeProperty.hh"
#include "G4VIsotopeTable.hh"
#include "G4Ions.hh"
#include "G4IsotopeProperty.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
#include "G4DecayTable.hh"
#include "G4VIsotopeTable.hh"
#include "globals.hh"
#include <vector>
////////////////////////////////////////////////////////////////////////////////
//
class G4IsotopeMagneticMomentTable : public G4VIsotopeTable
{
// class description
// G4IsotopeMagneticMomentTable is the table of pointers to G4IsotopeProperty,
// which has magnetic moment and spin.
// Data File name is given by G4IONMAGNETICMOMENT
//
public:
//
using G4IsotopeList = std::vector<G4IsotopeProperty *>;
using G4IsotopeNameList = std::vector<G4String>;
// class description
// G4IsotopeMagneticMomentTable is the table of pointers to G4IsotopeProperty,
// which has magnetic moment and spin.
// Data File name is given by G4IONMAGNETICMOMENT
//
public:
using G4IsotopeList = std::vector<G4IsotopeProperty*>;
using G4IsotopeNameList = std::vector<G4String>;
public:
// constructor
//
G4IsotopeMagneticMomentTable();
public:
// constructor
G4IsotopeMagneticMomentTable();
protected:
// hide copy construictor and assignment operator as protected
G4IsotopeMagneticMomentTable(const G4IsotopeMagneticMomentTable &right);
G4IsotopeMagneticMomentTable & operator= (const G4IsotopeMagneticMomentTable &right);
// destructor
~G4IsotopeMagneticMomentTable() override;
public:
// destructor
~G4IsotopeMagneticMomentTable() override;
// The FindIsotope function will replace the pure virtual one defined in the
// abstract base class G4VIstopeTable. We don't use this fuction in this
// implementation, instead we use the next function.
virtual G4bool FindIsotope(G4IsotopeProperty* property);
public:
// with description
//
virtual G4bool FindIsotope(G4IsotopeProperty* property);
// The FindIsotope function will replace the pure virtual one defined in the
// abstract base class G4VIstopeTable. We don't use this fuction in this
// implementation, instead we use the next function.
//
G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::no_Float) override;
G4IsotopeProperty* GetIsotopeByIsoLvl(G4int Z, G4int A, G4int lvl=0) override;
//
// again it will replace the pure virtual one in the abstract base class.
//
// Z: Atomic Number
// A: Atomic Mass
// E: Excitaion energy
// flb: floating level base (enum defined in G4Ions.hh)
// -- currently ignored
// or
// G4int level: isomer level
//
//
// again it will replace the pure virtual one in the abstract base class.
//
// Z: Atomic Number
// A: Atomic Mass
// E: Excitaion energy
// flb: floating level base (enum defined in G4Ions.hh)
// -- currently ignored
// or
// G4int level: isomer level
//
G4IsotopeProperty*
GetIsotope(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb = G4Ions::G4FloatLevelBase::no_Float) override;
G4IsotopeProperty* GetIsotopeByIsoLvl(G4int Z, G4int A, G4int lvl = 0) override;
private:
G4int GetVerboseLevel() const;
// get Verbose Level defined in G4ParticleTable
protected:
// hide copy construictor and assignment operator as protected
G4IsotopeMagneticMomentTable(const G4IsotopeMagneticMomentTable& right);
G4IsotopeMagneticMomentTable& operator=(const G4IsotopeMagneticMomentTable& right);
private:
private:
// get Verbose Level defined in G4ParticleTable
G4int GetVerboseLevel() const;
G4IsotopeList fIsotopeList;
private:
G4IsotopeList fIsotopeList;
static const G4double levelTolerance;
static const G4double nuclearMagneton;
static const G4double levelTolerance;
static const G4double nuclearMagneton;
};
inline
G4int G4IsotopeMagneticMomentTable::GetVerboseLevel() const
inline G4int G4IsotopeMagneticMomentTable::GetVerboseLevel() const
{
return G4ParticleTable::GetParticleTable()->GetVerboseLevel();
}
#endif
@@ -22,29 +22,17 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4SimplePPReporter_h
#define G4SimplePPReporter_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VParticlePropertyReporter.hh"
#include "globals.hh"
class G4SimplePPReporter: public G4VParticlePropertyReporter
class G4SimplePPReporter : public G4VParticlePropertyReporter
{
public:
void Print(const G4String& option="") override;
public:
void Print(const G4String& option = "") override;
};
#endif
@@ -22,37 +22,24 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4TextPPReporter_h
#define G4TextPPReporter_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VParticlePropertyReporter.hh"
#include "globals.hh"
class G4TextPPReporter: public G4VParticlePropertyReporter
class G4TextPPReporter : public G4VParticlePropertyReporter
{
public:
void Print(const G4String& option="") override;
public:
void Print(const G4String& option = "") override;
protected:
void SparseOption(const G4String& option);
void GeneratePropertyTable(const G4ParticleDefinition* );
protected:
G4String baseDir;
protected:
void SparseOption(const G4String& option);
void GeneratePropertyTable(const G4ParticleDefinition*);
protected:
G4String baseDir;
};
#endif
@@ -22,39 +22,24 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4TextPPRetriever_h
#define G4TextPPRetriever_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <iomanip>
#include <fstream>
#include "G4VParticlePropertyRetriever.hh"
#include "globals.hh"
class G4TextPPRetriever: public G4VParticlePropertyRetriever
class G4TextPPRetriever : public G4VParticlePropertyRetriever
{
public:
void Retrieve(const G4String& option="") override;
public:
void Retrieve(const G4String& option = "") override;
protected:
void SparseOption(const G4String& option);
G4bool ModifyPropertyTable(const G4ParticleDefinition* );
protected:
G4String baseDir;
protected:
void SparseOption(const G4String& option);
G4bool ModifyPropertyTable(const G4ParticleDefinition*);
protected:
G4String baseDir;
};
#endif
@@ -22,64 +22,48 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4VParticlePropertyReporter_h
#define G4VParticlePropertyReporter_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticlePropertyData.hh"
#include "G4ParticlePropertyTable.hh"
#include "globals.hh"
#include <vector>
class G4VParticlePropertyReporter
{
public:
//constructors
G4VParticlePropertyReporter();
//destructor
virtual ~G4VParticlePropertyReporter();
public:
// equality operators
G4bool operator==(const G4VParticlePropertyReporter &right) const
{ return (this == &right); }
G4bool operator!=(const G4VParticlePropertyReporter &right) const
{ return (this != &right); }
public:
using G4PPDContainer = std::vector<G4ParticlePropertyData *>;
public:
using G4PPDContainer = std::vector<G4ParticlePropertyData*>;
public:
virtual G4bool FillList(G4String name);
// fill out properties for specified particle type/name
// (return false if specified name/type does not exist)
public:
// constructors
G4VParticlePropertyReporter();
virtual void Clear();
// clear the list
// destructor
virtual ~G4VParticlePropertyReporter();
virtual void Print(const G4String& option) = 0;
// print out particle properties in the list
// equality operators
G4bool operator==(const G4VParticlePropertyReporter& right) const { return (this == &right); }
const G4PPDContainer& GetList() const {return pList;}
protected:
G4PPDContainer pList;
G4ParticlePropertyTable* pPropertyTable;
G4bool operator!=(const G4VParticlePropertyReporter& right) const { return (this != &right); }
// fill out properties for specified particle type/name
// (return false if specified name/type does not exist)
virtual G4bool FillList(G4String name);
// clear the list
virtual void Clear();
// print out particle properties in the list
virtual void Print(const G4String& option) = 0;
const G4PPDContainer& GetList() const { return pList; }
protected:
G4PPDContainer pList;
G4ParticlePropertyTable* pPropertyTable;
};
#endif
@@ -22,65 +22,47 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
//
//
// ---------------------------------------------------------------
#ifndef G4VParticlePropertyRetriever_h
#define G4VParticlePropertyRetriever_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticlePropertyData.hh"
#include "G4ParticlePropertyTable.hh"
#include "G4ios.hh"
#include "globals.hh"
#include <vector>
class G4VParticlePropertyRetriever
{
public:
//constructors
G4VParticlePropertyRetriever();
//destructor
virtual ~G4VParticlePropertyRetriever();
public:
// equality operators
G4bool operator==(const G4VParticlePropertyRetriever &right) const
{ return (this == &right); }
G4bool operator!=(const G4VParticlePropertyRetriever &right) const
{ return (this != &right); }
public:
virtual void Retrieve(const G4String& option) = 0;
// print out particle properties in the list
public:
// constructors
G4VParticlePropertyRetriever();
protected:
G4ParticlePropertyTable* pPropertyTable;
// destructor
virtual ~G4VParticlePropertyRetriever();
// equality operators
G4bool operator==(const G4VParticlePropertyRetriever& right) const { return (this == &right); }
G4bool operator!=(const G4VParticlePropertyRetriever& right) const { return (this != &right); }
// print out particle properties in the list
virtual void Retrieve(const G4String& option) = 0;
protected:
G4ParticlePropertyTable* pPropertyTable;
};
inline
G4VParticlePropertyRetriever::G4VParticlePropertyRetriever()
inline G4VParticlePropertyRetriever::G4VParticlePropertyRetriever()
{
pPropertyTable = G4ParticlePropertyTable::GetParticlePropertyTable();
pPropertyTable = G4ParticlePropertyTable::GetParticlePropertyTable();
}
/////////////////////////////
inline
G4VParticlePropertyRetriever::~G4VParticlePropertyRetriever()
inline G4VParticlePropertyRetriever::~G4VParticlePropertyRetriever()
{
pPropertyTable->Clear();
}
}
#endif