Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -70,15 +70,13 @@ public:
|
||||
|
||||
~G4ChargeExchangeXS() override = default;
|
||||
|
||||
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
|
||||
const G4Element*, const G4Material*) override;
|
||||
G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
|
||||
const G4Material*) final;
|
||||
|
||||
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
|
||||
const G4Isotope* iso,
|
||||
const G4Element* elm,
|
||||
const G4Material* mat) override;
|
||||
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
|
||||
const G4Material*) final;
|
||||
|
||||
void CrossSectionDescription(std::ostream&) const override;
|
||||
void CrossSectionDescription(std::ostream&) const final;
|
||||
|
||||
const G4ParticleDefinition*
|
||||
SampleSecondaryType(const G4ParticleDefinition*,
|
||||
@@ -88,11 +86,15 @@ public:
|
||||
|
||||
void SetCrossSectionFactor(G4double val) { fFactor = val; };
|
||||
|
||||
G4double GetCrossSectionFactor() const { return fFactor; };
|
||||
|
||||
G4ChargeExchangeXS & operator=(const G4ChargeExchangeXS &right) = delete;
|
||||
G4ChargeExchangeXS(const G4ChargeExchangeXS&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4double ComputeDeuteronFraction(const G4Material*);
|
||||
|
||||
G4Pow* g4calc;
|
||||
const G4ParticleDefinition* fPionSecPD[5];
|
||||
G4double fXSecPion[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
|
||||
|
||||
@@ -80,13 +80,11 @@ class G4EMDissociationCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
G4EMDissociationCrossSection ();
|
||||
~G4EMDissociationCrossSection ();
|
||||
~G4EMDissociationCrossSection () override;
|
||||
|
||||
virtual G4bool IsElementApplicable (const G4DynamicParticle*, G4int Z,
|
||||
const G4Material*);
|
||||
G4bool IsElementApplicable (const G4DynamicParticle*, G4int Z, const G4Material*) override;
|
||||
|
||||
virtual G4double GetElementCrossSection (const G4DynamicParticle *,
|
||||
G4int Z, const G4Material *);
|
||||
G4double GetElementCrossSection (const G4DynamicParticle*, G4int Z, const G4Material*) override;
|
||||
|
||||
G4PhysicsFreeVector * GetCrossSectionForProjectile
|
||||
(G4double, G4double, G4double, G4double, G4double, G4double);
|
||||
|
||||
@@ -55,6 +55,7 @@ class G4ParticleDefinition;
|
||||
class G4Element;
|
||||
class G4ElementData;
|
||||
class G4PhysicsVector;
|
||||
class G4PhotoNuclearCrossSection;
|
||||
|
||||
class G4GammaNuclearXS final : public G4VCrossSectionDataSet
|
||||
{
|
||||
@@ -86,9 +87,9 @@ public:
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) final;
|
||||
|
||||
G4double IsoCrossSection(G4double ekin, G4int Z, G4int A);
|
||||
G4double IsoCrossSection(const G4double ekin, const G4int Z, const G4int A);
|
||||
|
||||
G4double ElementCrossSection(G4double ekin, G4int Z);
|
||||
G4double ElementCrossSection(const G4double ekin, const G4int Z);
|
||||
|
||||
G4double LowEnergyCrossSection(G4double ekin, G4int Z);
|
||||
|
||||
@@ -105,7 +106,7 @@ private:
|
||||
|
||||
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn, G4int Z);
|
||||
|
||||
G4VCrossSectionDataSet* ggXsection = nullptr;
|
||||
G4PhotoNuclearCrossSection* ggXsection = nullptr;
|
||||
const G4ParticleDefinition* gamma;
|
||||
|
||||
// Cache
|
||||
@@ -116,8 +117,6 @@ private:
|
||||
static const G4int MAXZGAMMAXS = 95;
|
||||
static const G4int MAXNFREE = 11;
|
||||
static G4ElementData* data;
|
||||
// Upper limit of the linear transition between IAEA database and CHIPS model
|
||||
static const G4double eTransitionBound;
|
||||
// The list of elements with non-linear parametrisation for better precision
|
||||
static const G4int freeVectorException[MAXNFREE];
|
||||
// CHIPS photonuclear model had a problem with high energy parametrisation
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
|
||||
static G4HadronXSDataTable* sInstance;
|
||||
|
||||
std::vector<G4PiData*> fPiData;
|
||||
std::vector<std::vector<G4PiData*>* > fPiData;
|
||||
std::vector<G4PhysicsTable*> fTable;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
// File name: G4InterfaceToXS
|
||||
//
|
||||
// Author V.Ivantchenko, 12 July 2024
|
||||
//
|
||||
//
|
||||
// Class description:
|
||||
// Interface to G4PARTICLEXS cross sections for the de_excitation module
|
||||
//
|
||||
|
||||
#ifndef G4InterfaceToXS_h
|
||||
#define G4InterfaceToXS_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GammaNuclearXS;
|
||||
class G4NeutronInelasticXS;
|
||||
class G4ParticleInelasticXS;
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4InterfaceToXS
|
||||
{
|
||||
public:
|
||||
|
||||
G4InterfaceToXS(const G4ParticleDefinition*, G4int index);
|
||||
|
||||
~G4InterfaceToXS() = default;
|
||||
|
||||
void Initialise();
|
||||
|
||||
G4double GetElementCrossSection(const G4double ekin, const G4int Z);
|
||||
|
||||
G4double GetIsoCrossSection(const G4double ekin, const G4int Z, const G4int A);
|
||||
|
||||
G4InterfaceToXS(const G4InterfaceToXS& right) = delete;
|
||||
const G4InterfaceToXS& operator = (const G4InterfaceToXS& right) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4int index;
|
||||
const G4ParticleDefinition* fParticle;
|
||||
G4GammaNuclearXS* fGammaNuclear{nullptr};
|
||||
G4NeutronInelasticXS* fNeutronNuclear{nullptr};
|
||||
G4ParticleInelasticXS* fParticleNuclear{nullptr};
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -129,6 +129,7 @@ private:
|
||||
static const G4int MAXZINEL = 93;
|
||||
static G4ElementData* data;
|
||||
static G4double coeff[MAXZINEL];
|
||||
static G4double lowcoeff[MAXZINEL];
|
||||
static G4String gDataDirectory;
|
||||
};
|
||||
|
||||
|
||||
@@ -105,11 +105,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void Initialise(G4int Z, G4int idx);
|
||||
|
||||
void InitialiseOnFly(G4int Z);
|
||||
|
||||
void FindDirectoryPath();
|
||||
void Initialise(G4int Z);
|
||||
|
||||
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
|
||||
|
||||
@@ -122,20 +118,19 @@ private:
|
||||
G4double elimit;
|
||||
|
||||
G4int index{0};
|
||||
G4bool isInitializer{false};
|
||||
|
||||
static const G4int MAXZINELP = 93;
|
||||
static G4ElementData* data[5];
|
||||
static G4double coeff[MAXZINELP][5];
|
||||
static G4String gDataDirectory[5];
|
||||
static G4String gDataDirectory;
|
||||
};
|
||||
|
||||
inline
|
||||
const G4PhysicsVector* G4ParticleInelasticXS::GetPhysicsVector(G4int Z)
|
||||
{
|
||||
const G4PhysicsVector* pv = data[index]->GetElementData(Z);
|
||||
if (pv == nullptr) {
|
||||
InitialiseOnFly(Z);
|
||||
if (pv == nullptr) {
|
||||
Initialise(Z);
|
||||
pv = data[index]->GetElementData(Z);
|
||||
}
|
||||
return pv;
|
||||
|
||||
@@ -44,31 +44,36 @@ class G4PhotoNuclearCrossSection : public G4VCrossSectionDataSet
|
||||
public:
|
||||
|
||||
G4PhotoNuclearCrossSection();
|
||||
virtual ~G4PhotoNuclearCrossSection();
|
||||
~G4PhotoNuclearCrossSection() override;
|
||||
|
||||
static const char* Default_Name() {return "PhotoNuclearXS";}
|
||||
|
||||
virtual void CrossSectionDescription(std::ostream&) const;
|
||||
void CrossSectionDescription(std::ostream&) const override;
|
||||
|
||||
virtual G4bool
|
||||
IsIsoApplicable(const G4DynamicParticle* particle, G4int Z, G4int A,
|
||||
const G4Element* elm = 0, const G4Material* mat = 0);
|
||||
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
|
||||
const G4Element* elm = nullptr,
|
||||
const G4Material* mat = nullptr) override;
|
||||
|
||||
virtual G4bool
|
||||
IsElementApplicable(const G4DynamicParticle* particle, G4int Z,
|
||||
const G4Material*);
|
||||
G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
|
||||
const G4Material* mat = nullptr) override;
|
||||
|
||||
virtual G4double
|
||||
GetIsoCrossSection(const G4DynamicParticle* dynPart,
|
||||
G4int Z, G4int A,
|
||||
const G4Isotope*,
|
||||
const G4Element* elm,
|
||||
const G4Material* mat);
|
||||
|
||||
virtual G4double
|
||||
GetElementCrossSection(const G4DynamicParticle*, G4int Z,
|
||||
const G4Material*);
|
||||
G4double GetIsoCrossSection(const G4DynamicParticle*,
|
||||
G4int Z, G4int A,
|
||||
const G4Isotope* iso = nullptr,
|
||||
const G4Element* elm = nullptr,
|
||||
const G4Material* mat = nullptr) override;
|
||||
|
||||
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
|
||||
const G4Material*) override;
|
||||
|
||||
G4double ComputeElementXSection(G4double energy, G4int Z);
|
||||
|
||||
G4double ComputeIsoXSection(G4double energy, G4int Z, G4int A);
|
||||
|
||||
G4PhotoNuclearCrossSection& operator=
|
||||
(const G4PhotoNuclearCrossSection& right) = delete;
|
||||
G4PhotoNuclearCrossSection(const G4PhotoNuclearCrossSection&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4int GetFunctions(G4double a, G4double* y, G4double* z);
|
||||
@@ -76,9 +81,6 @@ private:
|
||||
const G4double XD, const G4double* Y);
|
||||
G4double ThresholdEnergy(G4int Z, G4int N);
|
||||
|
||||
// Body
|
||||
private:
|
||||
|
||||
G4int lastZ = 0; // The last Z of calculated nucleus
|
||||
G4double lastSig = 0.0; // Last value of the Cross Section
|
||||
G4double* lastGDR = nullptr; // Pointer to the last array of GDR cross sections
|
||||
|
||||
Reference in New Issue
Block a user