Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -53,8 +53,6 @@
|
||||
#ifndef G4EmCorrections_h
|
||||
#define G4EmCorrections_h 1
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ionEffectiveCharge.hh"
|
||||
#include "G4Material.hh"
|
||||
@@ -72,68 +70,72 @@ class G4EmCorrections
|
||||
|
||||
public:
|
||||
|
||||
explicit G4EmCorrections(G4int verb, G4bool master);
|
||||
explicit G4EmCorrections(G4int verb);
|
||||
|
||||
~G4EmCorrections();
|
||||
|
||||
G4double HighOrderCorrections(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy);
|
||||
const G4double kineticEnergy,
|
||||
const G4double cutEnergy);
|
||||
|
||||
G4double IonHighOrderCorrections(const G4ParticleDefinition*,
|
||||
const G4MaterialCutsCouple*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double ComputeIonCorrections(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double IonBarkasCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double Bethe(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double SpinCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double KShellCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double LShellCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double ShellCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double ShellCorrectionSTD(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double DensityCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double BarkasCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy,
|
||||
const G4bool isInitialized = false);
|
||||
|
||||
G4double BlochCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy,
|
||||
const G4bool isInitialized = false);
|
||||
|
||||
G4double MottCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy,
|
||||
const G4bool isInitialized = false);
|
||||
|
||||
void AddStoppingData(G4int Z, G4int A, const G4String& materialName,
|
||||
void AddStoppingData(const G4int Z, const G4int A,
|
||||
const G4String& materialName,
|
||||
G4PhysicsVector* dVector);
|
||||
|
||||
void InitialiseForNewRun();
|
||||
@@ -141,17 +143,17 @@ public:
|
||||
// effective charge correction using stopping power data
|
||||
G4double EffectiveChargeCorrection(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
// effective charge of an ion
|
||||
inline G4double GetParticleCharge(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
inline
|
||||
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
// ionisation models for ions
|
||||
inline void SetIonisationModels(G4VEmModel* mod1 = nullptr,
|
||||
@@ -173,20 +175,22 @@ private:
|
||||
|
||||
void SetupKinematics(const G4ParticleDefinition*,
|
||||
const G4Material*,
|
||||
G4double kineticEnergy);
|
||||
const G4double kineticEnergy);
|
||||
|
||||
G4double KShell(G4double theta, G4double eta);
|
||||
G4double KShell(const G4double theta, const G4double eta);
|
||||
|
||||
G4double LShell(G4double theta, G4double eta);
|
||||
G4double LShell(const G4double theta, const G4double eta);
|
||||
|
||||
G4int Index(G4double x, const G4double* y, G4int n) const;
|
||||
G4int Index(const G4double x, const G4double* y, const G4int n) const;
|
||||
|
||||
G4double Value(G4double xv, G4double x1, G4double x2,
|
||||
G4double y1, G4double y2) const;
|
||||
G4double Value(const G4double xv, const G4double x1, const G4double x2,
|
||||
const G4double y1, const G4double y2) const;
|
||||
|
||||
G4double Value2(G4double xv, G4double yv, G4double x1, G4double x2,
|
||||
G4double y1, G4double y2, G4double z11, G4double z21,
|
||||
G4double z12, G4double z22) const;
|
||||
G4double Value2(const G4double xv, const G4double yv,
|
||||
const G4double x1, const G4double x2,
|
||||
const G4double y1, const G4double y2,
|
||||
const G4double z11, const G4double z21,
|
||||
const G4double z12, const G4double z22) const;
|
||||
|
||||
G4Pow* g4calc;
|
||||
G4IonTable* ionTable;
|
||||
@@ -220,6 +224,7 @@ private:
|
||||
G4double eCorrMax;
|
||||
|
||||
std::size_t ncouples = 0;
|
||||
std::size_t idxBarkas = 0;
|
||||
G4int nK = 20;
|
||||
G4int nL = 26;
|
||||
G4int nEtaK = 29;
|
||||
@@ -233,7 +238,7 @@ private:
|
||||
G4int currentZ = 0;
|
||||
|
||||
G4int verbose;
|
||||
G4bool isMaster;
|
||||
G4bool isInitializer = false;
|
||||
|
||||
std::vector<G4int> Zion;
|
||||
std::vector<G4int> Aion;
|
||||
@@ -258,13 +263,14 @@ private:
|
||||
static const G4double UL[26];
|
||||
static G4double VL[26];
|
||||
|
||||
static G4double sWmaxBarkas;
|
||||
static G4PhysicsFreeVector* sBarkasCorr;
|
||||
static G4PhysicsFreeVector* sThetaK;
|
||||
static G4PhysicsFreeVector* sThetaL;
|
||||
};
|
||||
|
||||
inline G4int
|
||||
G4EmCorrections::Index(G4double x, const G4double* y, G4int n) const
|
||||
G4EmCorrections::Index(const G4double x, const G4double* y, const G4int n) const
|
||||
{
|
||||
G4int iddd = n-1;
|
||||
// Loop checking, 03-Aug-2015, Vladimir Ivanchenko
|
||||
@@ -272,17 +278,18 @@ G4EmCorrections::Index(G4double x, const G4double* y, G4int n) const
|
||||
return iddd;
|
||||
}
|
||||
|
||||
inline G4double G4EmCorrections::Value(G4double xv, G4double x1, G4double x2,
|
||||
G4double y1, G4double y2) const
|
||||
inline G4double G4EmCorrections::Value(const G4double xv, const G4double x1,
|
||||
const G4double x2,
|
||||
const G4double y1, const G4double y2) const
|
||||
{
|
||||
return y1 + (y2 - y1)*(xv - x1)/(x2 - x1);
|
||||
}
|
||||
|
||||
inline G4double G4EmCorrections::Value2(G4double xv, G4double yv,
|
||||
G4double x1, G4double x2,
|
||||
G4double y1, G4double y2,
|
||||
G4double z11, G4double z21,
|
||||
G4double z12, G4double z22) const
|
||||
inline G4double G4EmCorrections::Value2(const G4double xv, const G4double yv,
|
||||
const G4double x1, const G4double x2,
|
||||
const G4double y1, const G4double y2,
|
||||
const G4double z11, const G4double z21,
|
||||
const G4double z12, const G4double z22) const
|
||||
{
|
||||
return ( z11*(x2-xv)*(y2-yv) + z22*(xv-x1)*(yv-y1) +
|
||||
z12*(x2-xv)*(yv-y1) + z21*(xv-x1)*(y2-yv) )
|
||||
@@ -304,7 +311,7 @@ inline G4int G4EmCorrections::GetNumberOfStoppingVectors() const
|
||||
inline G4double
|
||||
G4EmCorrections::GetParticleCharge(const G4ParticleDefinition* p,
|
||||
const G4Material* mat,
|
||||
G4double kineticEnergy)
|
||||
const G4double kineticEnergy)
|
||||
{
|
||||
return effCharge.EffectiveCharge(p,mat,kineticEnergy);
|
||||
}
|
||||
@@ -312,7 +319,7 @@ G4EmCorrections::GetParticleCharge(const G4ParticleDefinition* p,
|
||||
inline G4double
|
||||
G4EmCorrections::EffectiveChargeSquareRatio(const G4ParticleDefinition* p,
|
||||
const G4Material* mat,
|
||||
G4double kineticEnergy)
|
||||
const G4double kineticEnergy)
|
||||
{
|
||||
return effCharge.EffectiveChargeSquareRatio(p,mat,kineticEnergy);
|
||||
}
|
||||
|
||||
@@ -306,6 +306,9 @@ public:
|
||||
void SetWorkerVerbose(G4int val);
|
||||
G4int WorkerVerbose() const;
|
||||
|
||||
void SetNumberForFreeVector(G4int val);
|
||||
G4int NumberForFreeVector() const;
|
||||
|
||||
void SetTransportationWithMsc(G4TransportationWithMscType val);
|
||||
G4TransportationWithMscType TransportationWithMsc() const;
|
||||
|
||||
@@ -457,6 +460,7 @@ private:
|
||||
G4int nbinsPerDecade;
|
||||
G4int verbose;
|
||||
G4int workerVerbose;
|
||||
G4int nForFreeVector;
|
||||
G4int tripletConv; // 5d model triplet generation type
|
||||
|
||||
G4TransportationWithMscType fTransportationWithMsc;
|
||||
|
||||
@@ -133,6 +133,7 @@ private:
|
||||
G4UIcmdWithAnInteger* verCmd;
|
||||
G4UIcmdWithAnInteger* ver1Cmd;
|
||||
G4UIcmdWithAnInteger* ver2Cmd;
|
||||
G4UIcmdWithAnInteger* nFreeCmd;
|
||||
G4UIcmdWithAnInteger* tripletCmd;
|
||||
|
||||
G4UIcmdWithAString* transWithMscCmd;
|
||||
|
||||
@@ -67,6 +67,7 @@ enum G4EmProcessSubType
|
||||
fScintillation = 22,
|
||||
fSynchrotronRadiation = 23,
|
||||
fTransitionRadiation = 24,
|
||||
fGammaReflection = 26,
|
||||
|
||||
fSurfaceReflection = 25,
|
||||
fDarkBremsstrahlung = 40,
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include <vector>
|
||||
#include "globals.hh"
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4Threading.hh"
|
||||
|
||||
class G4VEmModel;
|
||||
class G4ParticleDefinition;
|
||||
@@ -103,8 +102,8 @@ public:
|
||||
|
||||
inline void SetBaseMaterialActive(G4bool flag);
|
||||
|
||||
G4LossTableBuilder & operator=(const G4LossTableBuilder &right) = delete;
|
||||
G4LossTableBuilder(const G4LossTableBuilder&) = delete;
|
||||
G4LossTableBuilder & operator=(const G4LossTableBuilder &right) = delete;
|
||||
G4LossTableBuilder(const G4LossTableBuilder&) = delete;
|
||||
|
||||
private:
|
||||
|
||||
@@ -114,14 +113,11 @@ private:
|
||||
G4bool isInitialized = false;
|
||||
G4bool baseMatFlag = false;
|
||||
G4bool isBaseMatActive = true;
|
||||
G4bool isMaster;
|
||||
G4bool isInitializer = false;
|
||||
|
||||
static std::vector<G4double>* theDensityFactor;
|
||||
static std::vector<G4int>* theDensityIdx;
|
||||
static std::vector<G4bool>* theFlag;
|
||||
#ifdef G4MULTITHREADED
|
||||
static G4Mutex ltbMutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
inline void G4LossTableBuilder::SetSplineFlag(G4bool flag)
|
||||
|
||||
@@ -146,8 +146,6 @@ class G4OpticalParameters
|
||||
G4bool GetScintStackPhotons() const;
|
||||
void SetScintVerboseLevel(G4int);
|
||||
G4int GetScintVerboseLevel() const;
|
||||
void SetScintEnhancedTimeConstants(G4bool);
|
||||
G4bool GetScintEnhancedTimeConstants() const;
|
||||
|
||||
// WLS
|
||||
void SetWLSTimeProfile(const G4String&);
|
||||
|
||||
@@ -39,58 +39,76 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4DataVector;
|
||||
class G4EmDataHandler;
|
||||
class G4EmModelManager;
|
||||
class G4LossTableManager;
|
||||
class G4ParticleChangeForGamma;
|
||||
class G4ParticleChangeForMSC;
|
||||
class G4ParticleDefinition;
|
||||
class G4PhysicsTable;
|
||||
class G4Region;
|
||||
class G4VEmModel;
|
||||
class G4VEnergyLossProcess;
|
||||
class G4VMscModel;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4TransportationWithMsc : public G4Transportation
|
||||
{
|
||||
public:
|
||||
enum class ScatteringType
|
||||
{
|
||||
MultipleScattering,
|
||||
};
|
||||
public:
|
||||
enum class ScatteringType
|
||||
{
|
||||
MultipleScattering,
|
||||
SingleScattering,
|
||||
};
|
||||
|
||||
explicit G4TransportationWithMsc(ScatteringType type, G4int verbosity = 0);
|
||||
explicit G4TransportationWithMsc(ScatteringType type, G4int verbosity = 0);
|
||||
|
||||
~G4TransportationWithMsc() override;
|
||||
~G4TransportationWithMsc() override;
|
||||
|
||||
inline void SetMultipleSteps(G4bool val);
|
||||
inline G4bool MultipleSteps() const;
|
||||
inline void SetMultipleSteps(G4bool val);
|
||||
inline G4bool MultipleSteps() const;
|
||||
|
||||
void AddMscModel(G4VMscModel* mscModel, G4int order = 0,
|
||||
const G4Region* region = nullptr);
|
||||
void AddMscModel(G4VMscModel* mscModel, G4int order = 0, const G4Region* region = nullptr);
|
||||
|
||||
public:
|
||||
void PreparePhysicsTable(const G4ParticleDefinition& part) override;
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& part) override;
|
||||
void AddSSModel(G4VEmModel* model, G4int order = 0, const G4Region* region = nullptr);
|
||||
|
||||
void StartTracking(G4Track* track) override;
|
||||
public:
|
||||
void PreparePhysicsTable(const G4ParticleDefinition& part) override;
|
||||
void BuildPhysicsTable(const G4ParticleDefinition& part) override;
|
||||
|
||||
G4double AlongStepGetPhysicalInteractionLength(
|
||||
const G4Track& track, G4double previousStepSize,
|
||||
G4double currentMinimumStep, G4double& proposedSafety,
|
||||
G4GPILSelection* selection) override;
|
||||
void StartTracking(G4Track* track) override;
|
||||
|
||||
private:
|
||||
const ScatteringType fType;
|
||||
G4bool fMultipleSteps = false;
|
||||
G4double AlongStepGetPhysicalInteractionLength(const G4Track& track, G4double previousStepSize,
|
||||
G4double currentMinimumStep,
|
||||
G4double& proposedSafety,
|
||||
G4GPILSelection* selection) override;
|
||||
|
||||
G4LossTableManager* fEmManager;
|
||||
G4EmModelManager* fModelManager;
|
||||
const G4ParticleDefinition* fFirstParticle = nullptr;
|
||||
private:
|
||||
const ScatteringType fType;
|
||||
G4bool fMultipleSteps = false;
|
||||
|
||||
// For ScatteringType::MultipleScattering
|
||||
G4ParticleChangeForMSC* fParticleChangeForMSC = nullptr;
|
||||
G4LossTableManager* fEmManager;
|
||||
G4EmModelManager* fModelManager;
|
||||
|
||||
G4DynamicParticle* fSubStepDynamicParticle;
|
||||
G4Track* fSubStepTrack;
|
||||
G4Step* fSubStep;
|
||||
// Not initialized in the constructor, but later in PreparePhysicsTable or StartTracking.
|
||||
const G4DataVector* fCuts = nullptr;
|
||||
const G4ParticleDefinition* fFirstParticle = nullptr;
|
||||
G4VEnergyLossProcess* fIonisation = nullptr;
|
||||
|
||||
// For ScatteringType::MultipleScattering
|
||||
G4ParticleChangeForMSC* fParticleChangeForMSC = nullptr;
|
||||
|
||||
// For ScatteringType::SingleScattering
|
||||
G4EmDataHandler* fEmData = nullptr;
|
||||
G4PhysicsTable* fLambdaTable = nullptr;
|
||||
G4ParticleChangeForGamma* fParticleChangeForSS = nullptr;
|
||||
std::vector<G4DynamicParticle*>* fSecondariesSS = nullptr;
|
||||
|
||||
G4DynamicParticle* fSubStepDynamicParticle;
|
||||
G4Track* fSubStepTrack;
|
||||
G4Step* fSubStep;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -317,10 +317,6 @@ public:
|
||||
|
||||
void SetCrossSectionTable(G4PhysicsTable*, G4bool isLocal);
|
||||
|
||||
G4bool LPMFlag() const;
|
||||
|
||||
void SetLPMFlag(G4bool val);
|
||||
|
||||
inline G4ElementData* GetElementData();
|
||||
|
||||
inline G4PhysicsTable* GetCrossSectionTable();
|
||||
@@ -393,6 +389,10 @@ public:
|
||||
|
||||
inline void SetLocked(G4bool);
|
||||
|
||||
// obsolete method
|
||||
[[deprecated("Use G4EmParameters::Instance()->SetLPM instead")]]
|
||||
void SetLPMFlag(G4bool);
|
||||
|
||||
// hide assignment operator
|
||||
G4VEmModel & operator=(const G4VEmModel &right) = delete;
|
||||
G4VEmModel(const G4VEmModel&) = delete;
|
||||
@@ -441,8 +441,8 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
size_t currentCoupleIndex = 0;
|
||||
size_t basedCoupleIndex = 0;
|
||||
std::size_t currentCoupleIndex = 0;
|
||||
std::size_t basedCoupleIndex = 0;
|
||||
G4bool lossFlucFlag = true;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user