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
@@ -51,7 +51,6 @@
// 1. S.M. Seltzer and M.J. Berger Nucl. Instr. Meth. B12 (1985) 95
// 2. S.M. Seltzer and M.J. Berger Atomic data and Nuclear Data
// Tables 35 (1986) 345
// Cross section computation in the base class G4eBremsstrahlungRelModel
// -------------------------------------------------------------------
//
@@ -59,13 +58,15 @@
#ifndef G4SeltzerBergerModel_h
#define G4SeltzerBergerModel_h 1
#include "G4VEmModel.hh"
#include "G4eBremsstrahlungRelModel.hh"
#include "globals.hh"
class G4Physics2DVector;
class G4SBBremTable;
class G4ParticleChangeForLoss;
class G4SeltzerBergerModel : public G4eBremsstrahlungRelModel
class G4SeltzerBergerModel : public G4VEmModel
{
public:
@@ -77,6 +78,21 @@ public:
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
void InitialiseLocal(const G4ParticleDefinition*,
G4VEmModel* masterModel) override;
G4double ComputeDEDXPerVolume(const G4Material*,
const G4ParticleDefinition*,
G4double ekin,
G4double cutEnergy) override;
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
G4double ekin,
G4double zet,
G4double,
G4double cutEnergy,
G4double maxEnergy = DBL_MAX) override;
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
@@ -86,6 +102,10 @@ public:
void SetupForMaterial(const G4ParticleDefinition*,
const G4Material*, G4double) override;
G4double MinPrimaryEnergy(const G4Material*,
const G4ParticleDefinition*,
G4double cutEnergy) override;
inline void SetBicubicInterpolationFlag(G4bool val)
{ fIsUseBicubicInterpolation = val; };
@@ -93,33 +113,58 @@ public:
G4SeltzerBergerModel & operator=(const G4SeltzerBergerModel &right) = delete;
G4SeltzerBergerModel(const G4SeltzerBergerModel&) = delete;
protected:
G4double ComputeDXSectionPerAtom(G4double gammaEnergy) override;
private:
void SetParticle(const G4ParticleDefinition* p);
void ReadData(G4int Z);
G4double ComputeBremLoss(G4double cutEnergy);
G4double ComputeXSectionPerAtom(G4double cutEnergy);
G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
G4double SampleEnergyTransfer(const G4double kineticEnergy,
const G4double logKineticEnergy,
const G4double cut,
const G4double emax);
static constexpr G4int gMaxZet = 101;
static constexpr G4double gExpNumLimit = -12.;
static G4double gYLimitData[gMaxZet];
protected:
G4ParticleChangeForLoss* fParticleChange{nullptr};
private:
static constexpr G4int gMaxZet{101};
static constexpr G4double gExpNumLimit{-12.};
static G4double gYLimitData[gMaxZet];
static G4Physics2DVector* gSBDCSData[gMaxZet];
static G4SBBremTable* gSBSamplingTable;
static G4SBBremTable* gSBSamplingTable;
static const G4double gBremFactor;
static const G4double gMigdalConstant;
G4bool fIsUseBicubicInterpolation;
G4bool fIsUseSamplingTables;
G4bool fIsUseBicubicInterpolation{false};
G4bool fIsUseSamplingTables{true};
G4bool fIsElectron{true};
G4bool fIsScatOffElectron{false};
G4bool isInitializer{false};
//
G4int fCurrentIZ{0};
G4int fNumWarnings{0};
G4int fNumWarnings;
const G4ParticleDefinition* fPrimaryParticle{nullptr};
G4ParticleDefinition* fGammaParticle;
size_t fIndx;
size_t fIndy;
G4bool isFirstInstance{false};
// cash
G4double fPrimaryKinEnergy{0.};
G4double fPrimaryTotalEnergy{0.};
G4double fDensityFactor{0.};
G4double fDensityCorr{0.};
G4double fLowestKinEnergy;
std::size_t fIndx{0};
std::size_t fIndy{0};
};
#endif
@@ -179,7 +179,7 @@ private:
G4double rndmarray[2];
struct mscData {
G4double Z23, sqrtZ;
G4double Z23, sqrtZ, factmin;
G4double coeffth1, coeffth2;
G4double coeffc1, coeffc2, coeffc3, coeffc4;
G4double stepmina, stepminb;
@@ -233,8 +233,8 @@ inline G4double G4UrbanMscModel::SimpleScattering()
{
// 'large angle scattering'
// 2 model functions with correct xmean and x2mean
G4double a = (2.*xmeanth+9.*x2meanth-3.)/(2.*xmeanth-3.*x2meanth+1.);
G4double prob = (a+2.)*xmeanth/a;
const G4double a = (2.*xmeanth+9.*x2meanth-3.)/(2.*xmeanth-3.*x2meanth+1.);
const G4double prob = (a+2.)*xmeanth/a;
// sampling
rndmEngineMod->flatArray(2, rndmarray);
@@ -248,8 +248,9 @@ inline G4double G4UrbanMscModel::ComputeStepmin()
{
// define stepmin using estimation of the ratio
// of lambda_elastic/lambda_transport
G4double rat = currentKinEnergy*invmev;
return lambda0*1.e-3/(2.e-3+rat*(msc[idx]->stepmina+msc[idx]->stepminb*rat));
const G4double rat = currentKinEnergy*invmev;
return lambda0*msc[idx]->factmin/
(0.002 + rat*(msc[idx]->stepmina + msc[idx]->stepminb*rat));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -143,7 +143,7 @@ private:
private:
G4bool fIsUseCompleteScreening = false;
G4bool fIsFirstInstance = false;
G4bool fIsInitializer = false;
G4bool fUseLPM = true;
protected: