Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -48,10 +48,13 @@
|
||||
#ifndef G4EmDataHandler_h
|
||||
#define G4EmDataHandler_h 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsVector.hh"
|
||||
#include <vector>
|
||||
#include "G4EmTableType.hh"
|
||||
#include "G4EmElementSelector.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -63,31 +66,34 @@ class G4EmDataHandler
|
||||
{
|
||||
public:
|
||||
|
||||
explicit G4EmDataHandler(size_t nTable);
|
||||
explicit G4EmDataHandler(std::size_t nTable, const G4String& nam="");
|
||||
|
||||
~G4EmDataHandler();
|
||||
|
||||
// add table
|
||||
size_t SetTable(G4PhysicsTable*);
|
||||
std::size_t SetTable(G4PhysicsTable*);
|
||||
|
||||
// update existing table
|
||||
void UpdateTable(G4PhysicsTable*, size_t idx);
|
||||
void UpdateTable(G4PhysicsTable*, std::size_t idx);
|
||||
|
||||
// save table pointer
|
||||
void SaveTable(G4PhysicsTable*, std::size_t idx);
|
||||
|
||||
// assuming that the table is already defined
|
||||
G4PhysicsTable* MakeTable(size_t idx);
|
||||
G4PhysicsTable* MakeTable(std::size_t idx);
|
||||
|
||||
// existing table may be substituted
|
||||
G4PhysicsTable* MakeTable(G4PhysicsTable*, size_t idx);
|
||||
G4PhysicsTable* MakeTable(G4PhysicsTable*, std::size_t idx);
|
||||
|
||||
// clean existing table
|
||||
void CleanTable(size_t idx);
|
||||
void CleanTable(std::size_t idx);
|
||||
|
||||
G4bool StorePhysicsTable(size_t idx,
|
||||
G4bool StorePhysicsTable(std::size_t idx,
|
||||
const G4ParticleDefinition* part,
|
||||
const G4String& fname,
|
||||
G4bool ascii);
|
||||
|
||||
G4bool RetrievePhysicsTable(size_t idx,
|
||||
G4bool RetrievePhysicsTable(std::size_t idx,
|
||||
const G4ParticleDefinition* part,
|
||||
const G4String& fname,
|
||||
G4bool ascii, G4bool spline);
|
||||
@@ -96,19 +102,66 @@ public:
|
||||
|
||||
const G4VEmProcess* GetMasterProcess(size_t idx) const;
|
||||
|
||||
inline const G4PhysicsTable* GetTable(size_t idx) const {
|
||||
const G4PhysicsTable* GetTable(std::size_t idx) const {
|
||||
return (idx < tLength) ? data[idx] : nullptr;
|
||||
}
|
||||
|
||||
inline G4PhysicsTable* Table(size_t idx) const {
|
||||
G4PhysicsTable* Table(std::size_t idx) const {
|
||||
return (idx < tLength) ? data[idx] : nullptr;
|
||||
}
|
||||
|
||||
inline const G4PhysicsVector* GetVector(size_t itable, size_t ivec) const
|
||||
{ return (*(data[itable]))[ivec]; }
|
||||
const G4PhysicsVector* GetVector(std::size_t itable, std::size_t ivec) const {
|
||||
return (*(data[itable]))[ivec];
|
||||
}
|
||||
|
||||
inline const std::vector<G4PhysicsTable*>& GetTables() const { return data; }
|
||||
const std::vector<G4PhysicsTable*>& GetTables() const {
|
||||
return data;
|
||||
}
|
||||
|
||||
std::vector<G4double>* EnergyOfCrossSectionMax() const {
|
||||
return fMaxXS;
|
||||
}
|
||||
|
||||
void SetEnergyOfCrossSectionMax(std::vector<G4double>* p) {
|
||||
if (p != fMaxXS) {
|
||||
delete fMaxXS;
|
||||
fMaxXS = p;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<G4TwoPeaksXS*>* TwoPeaksXS() const {
|
||||
return fXSpeaks;
|
||||
}
|
||||
|
||||
void SetTwoPeaksXS(std::vector<G4TwoPeaksXS*>* p) {
|
||||
if (p != fXSpeaks) {
|
||||
delete fXSpeaks;
|
||||
fXSpeaks = p;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<G4EmElementSelector*>* GetElementSelectors(std::size_t i) {
|
||||
return (i < eLength) ? fElemSelectors[i] : nullptr;
|
||||
}
|
||||
|
||||
void SetElementSelectors(std::vector<G4EmElementSelector*>*, std::size_t);
|
||||
|
||||
G4CrossSectionType CrossSectionType() const {
|
||||
return fXSType;
|
||||
}
|
||||
|
||||
void SetCrossSectionType(G4CrossSectionType val) {
|
||||
fXSType = val;
|
||||
}
|
||||
|
||||
const G4String& GetName() const {
|
||||
return fName;
|
||||
}
|
||||
|
||||
void SetUseBaseParticleTable(G4bool val) {
|
||||
fUseBaseParticleTable = val;
|
||||
}
|
||||
|
||||
// hide assignment operator
|
||||
G4EmDataHandler & operator=(const G4EmDataHandler &right) = delete;
|
||||
G4EmDataHandler(const G4EmDataHandler&) = delete;
|
||||
@@ -116,8 +169,15 @@ public:
|
||||
private:
|
||||
|
||||
std::vector<G4PhysicsTable*> data;
|
||||
size_t tLength;
|
||||
std::vector<G4double>* fMaxXS;
|
||||
std::vector<G4TwoPeaksXS*>* fXSpeaks;
|
||||
std::vector<std::vector<G4EmElementSelector*>* > fElemSelectors;
|
||||
std::vector<const G4VEmProcess*> masterProcess;
|
||||
std::size_t tLength{0};
|
||||
std::size_t eLength{0};
|
||||
G4CrossSectionType fXSType{fEmNoIntegral};
|
||||
G4String fName;
|
||||
G4bool fUseBaseParticleTable{false};
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user