Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -82,32 +82,36 @@ public:
SampleSecondaryType(const G4ParticleDefinition*, const G4Material*,
G4int Z, G4int A, G4double etot);
G4double GetPartialPionXS(G4int idx);
G4double GetPionTFactor(G4int idx, const G4ParticleDefinition* part,
G4double pEtot);
G4double GetPartialPionXS(G4int idx) const;
void SetEnergyLimit(G4double val) { fEnergyLimit = val; };
void SetCrossSectionFactor(G4double val) { fFactor = val; };
G4double GetCrossSectionFactor() const { return fFactor; };
G4bool isPion() const { return findex >= 0; };
G4double SampleTforPion(const G4double etot,
const G4double tmax) const;
G4ChargeExchangeXS & operator=(const G4ChargeExchangeXS &right) = delete;
G4ChargeExchangeXS(const G4ChargeExchangeXS&) = delete;
private:
G4double GetCrossSection(const G4ParticleDefinition*, const G4Material*,
G4int Z, G4double etot);
G4double ComputeDeuteronFraction(const G4Material*);
G4double ComputeDeuteronFraction(const G4Material*) const;
G4Pow* g4calc;
G4int findex{-1};
const G4ParticleDefinition* fPionSecPD[5];
G4double fXSecPion[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
G4double fEnergyLimit{0.0};
G4double fFactor{1.0};
G4double fMassPi;
};
#endif
@@ -114,6 +114,8 @@ private:
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVectorR(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4double emax;
@@ -123,8 +125,10 @@ private:
std::vector<G4double> temp;
G4bool isInitializer{false};
G4bool fRfilesEnabled{false};
static G4ElementData* data;
static G4ElementData* dataR;
static G4String gDataDirectory;
};
@@ -132,11 +136,22 @@ inline
const G4PhysicsVector* G4NeutronCaptureXS::GetPhysicsVector(G4int Z)
{
const G4PhysicsVector* pv = data->GetElementData(Z);
if(pv == nullptr) {
if (pv == nullptr) {
InitialiseOnFly(Z);
pv = data->GetElementData(Z);
}
return pv;
}
inline
const G4PhysicsVector* G4NeutronCaptureXS::GetPhysicsVectorR(G4int Z)
{
const G4PhysicsVector* pv = dataR->GetElementData(Z);
if (pv == nullptr) {
InitialiseOnFly(Z);
pv = dataR->GetElementData(Z);
}
return pv;
}
#endif
@@ -110,15 +110,19 @@ private:
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVectorR(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4VComponentCrossSection* ggXsection{nullptr};
const G4ParticleDefinition* neutron;
G4bool isInitializer{false};
G4bool fRfilesEnabled{false};
static const G4int MAXZEL = 93;
static G4ElementData* data;
static G4ElementData* dataR;
static G4double coeff[MAXZEL];
static G4String gDataDirectory;
};
@@ -134,4 +138,15 @@ G4PhysicsVector* G4NeutronElasticXS::GetPhysicsVector(G4int Z)
return pv;
}
inline
const G4PhysicsVector* G4NeutronElasticXS::GetPhysicsVectorR(G4int Z)
{
const G4PhysicsVector* pv = dataR->GetElementData(Z);
if (pv == nullptr) {
InitialiseOnFly(Z);
pv = dataR->GetElementData(Z);
}
return pv;
}
#endif
@@ -112,6 +112,8 @@ private:
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVectorR(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4VComponentCrossSection* ggXsection = nullptr;
@@ -120,14 +122,15 @@ private:
std::vector<G4double> temp;
G4double elimit;
G4double lowElimit;
G4double loglowElimit;
G4bool isInitializer{false};
G4bool fRfilesEnabled{false};
static const G4int MAXZINEL = 93;
static G4ElementData* data;
static G4ElementData* dataR;
static G4double coeff[MAXZINEL];
static G4double lowcoeff[MAXZINEL];
static G4String gDataDirectory;
@@ -144,4 +147,15 @@ const G4PhysicsVector* G4NeutronInelasticXS::GetPhysicsVector(G4int Z)
return pv;
}
inline
const G4PhysicsVector* G4NeutronInelasticXS::GetPhysicsVectorR(G4int Z)
{
const G4PhysicsVector* pv = dataR->GetElementData(Z);
if (pv == nullptr) {
InitialiseOnFly(Z);
pv = dataR->GetElementData(Z);
}
return pv;
}
#endif