Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -64,17 +64,17 @@ public:
|
||||
|
||||
G4CrossSectionDataStore();
|
||||
|
||||
~G4CrossSectionDataStore();
|
||||
~G4CrossSectionDataStore() = default;
|
||||
|
||||
// Cross section per unit volume is computed (inverse mean free path)
|
||||
G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
|
||||
// Run time cross section per unit volume
|
||||
inline G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
|
||||
G4double ComputeCrossSection(const G4DynamicParticle*, const G4Material*);
|
||||
|
||||
// Cross section per element is computed
|
||||
// Cross section per element
|
||||
G4double GetCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*, const G4Material*);
|
||||
|
||||
// Cross section per isotope is computed
|
||||
// Cross section per isotope
|
||||
G4double GetCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
|
||||
const G4Isotope*,
|
||||
const G4Element*, const G4Material*);
|
||||
@@ -94,35 +94,34 @@ public:
|
||||
void PrintCrossSectionHtml(const G4VCrossSectionDataSet *cs) const;
|
||||
|
||||
void AddDataSet(G4VCrossSectionDataSet*);
|
||||
void AddDataSet(G4VCrossSectionDataSet*,size_t);
|
||||
void AddDataSet(G4VCrossSectionDataSet*, size_t);
|
||||
|
||||
inline void SetVerboseLevel(G4int value);
|
||||
|
||||
G4CrossSectionDataStore & operator=
|
||||
(const G4CrossSectionDataStore &right) = delete;
|
||||
G4CrossSectionDataStore(const G4CrossSectionDataStore&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
|
||||
const G4Isotope*,
|
||||
const G4Element*, const G4Material* aMaterial,
|
||||
G4int index);
|
||||
|
||||
G4CrossSectionDataStore & operator=(const G4CrossSectionDataStore &right);
|
||||
G4CrossSectionDataStore(const G4CrossSectionDataStore&);
|
||||
const G4Isotope*, const G4Element*,
|
||||
const G4Material*, const G4int index);
|
||||
|
||||
G4String HtmlFileName(const G4String & in) const;
|
||||
|
||||
G4NistManager* nist;
|
||||
const G4Material* currentMaterial = nullptr;
|
||||
const G4ParticleDefinition* matParticle = nullptr;
|
||||
G4double matKinEnergy = 0.0;
|
||||
G4double matCrossSection = 0.0;
|
||||
|
||||
G4int nDataSetList = 0;
|
||||
G4int verboseLevel = 1;
|
||||
|
||||
std::vector<G4VCrossSectionDataSet*> dataSetList;
|
||||
std::vector<G4double> xsecelm;
|
||||
std::vector<G4double> xseciso;
|
||||
|
||||
const G4Material* currentMaterial;
|
||||
const G4ParticleDefinition* matParticle;
|
||||
G4double matKinEnergy;
|
||||
G4double matCrossSection;
|
||||
|
||||
G4int nDataSetList;
|
||||
G4int verboseLevel;
|
||||
};
|
||||
|
||||
inline void G4CrossSectionDataStore::SetVerboseLevel(G4int value)
|
||||
@@ -130,4 +129,15 @@ inline void G4CrossSectionDataStore::SetVerboseLevel(G4int value)
|
||||
verboseLevel = value;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* dp,
|
||||
const G4Material* mat)
|
||||
{
|
||||
if(dp->GetKineticEnergy() != matKinEnergy || mat != currentMaterial ||
|
||||
dp->GetDefinition() != matParticle) {
|
||||
ComputeCrossSection(dp, mat);
|
||||
}
|
||||
return matCrossSection;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -96,18 +96,14 @@ public: //with description
|
||||
// This is a generic method to access cross section per element
|
||||
// This method should not be overwritten in a derived class
|
||||
inline G4double GetCrossSection(const G4DynamicParticle*, const G4Element*,
|
||||
const G4Material* mat = nullptr);
|
||||
const G4Material* mat = nullptr);
|
||||
|
||||
// This is a generic method to compute cross section per element
|
||||
// If the DataSet is not applicable the method returns zero
|
||||
// This method should not be overwritten in a derived class
|
||||
G4double ComputeCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*,
|
||||
const G4Material* mat = nullptr);
|
||||
|
||||
// The following two methods have default implementations which throw
|
||||
// G4Exception. Derived classes should implement only needed
|
||||
// methods, which are assumed to be called at run time.
|
||||
const G4Element*,
|
||||
const G4Material* mat = nullptr);
|
||||
|
||||
// Implement this method for element-wise cross section
|
||||
virtual
|
||||
@@ -143,8 +139,6 @@ public: //with description
|
||||
|
||||
virtual void CrossSectionDescription(std::ostream&) const;
|
||||
|
||||
virtual G4int GetVerboseLevel() const;
|
||||
|
||||
virtual void SetVerboseLevel(G4int value);
|
||||
|
||||
inline G4double GetMinKinEnergy() const;
|
||||
@@ -163,6 +157,10 @@ public: //with description
|
||||
|
||||
inline void SetName(const G4String& nam);
|
||||
|
||||
G4VCrossSectionDataSet & operator=
|
||||
(const G4VCrossSectionDataSet &right) = delete;
|
||||
G4VCrossSectionDataSet(const G4VCrossSectionDataSet&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
G4int verboseLevel;
|
||||
@@ -171,9 +169,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
G4VCrossSectionDataSet & operator=(const G4VCrossSectionDataSet &right);
|
||||
G4VCrossSectionDataSet(const G4VCrossSectionDataSet&);
|
||||
|
||||
G4CrossSectionDataSetRegistry* registry;
|
||||
|
||||
G4double minKinEnergy;
|
||||
@@ -185,18 +180,12 @@ private:
|
||||
|
||||
inline G4double
|
||||
G4VCrossSectionDataSet::GetCrossSection(const G4DynamicParticle* dp,
|
||||
const G4Element* elm,
|
||||
const G4Material* mat)
|
||||
const G4Element* elm,
|
||||
const G4Material* mat)
|
||||
{
|
||||
return ComputeCrossSection(dp, elm, mat);
|
||||
}
|
||||
|
||||
|
||||
inline G4int G4VCrossSectionDataSet::GetVerboseLevel() const
|
||||
{
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
inline void G4VCrossSectionDataSet::SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
|
||||
Reference in New Issue
Block a user