Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
@@ -75,6 +75,7 @@ class G4VAtomDeexcitation;
class G4VSubCutProducer;
class G4EmBiasingManager;
class G4LossTableManager;
class G4EmDataHandler;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -99,20 +100,12 @@ protected:
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) = 0;
//------------------------------------------------------------------------
// Methods with standard implementation; may be overwritten if needed
//------------------------------------------------------------------------
public:
// used as low energy limit LambdaTable
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
const G4Material*, G4double cut);
//------------------------------------------------------------------------
// Virtual methods implementation common to all EM ContinuousDiscrete
// processes. Further inheritance is not assumed
//------------------------------------------------------------------------
public:
// print documentation in html format
void ProcessDescription(std::ostream& outFile) const override;
@@ -170,19 +163,6 @@ private:
void StreamInfo(std::ostream& out, const G4ParticleDefinition& part,
G4bool rst=false) const;
// store a table
G4bool StoreTable(const G4ParticleDefinition* p,
G4PhysicsTable*, G4bool ascii,
const G4String& directory,
const G4String& tname);
// retrieve a table
G4bool RetrieveTable(const G4ParticleDefinition* p,
G4PhysicsTable*, G4bool ascii,
const G4String& directory,
const G4String& tname,
G4bool mandatory);
//------------------------------------------------------------------------
// Public interface to cross section, mfp and sampling of fluctuations
// These methods are not used in run time
@@ -328,16 +308,17 @@ public:
void SetDEDXTable(G4PhysicsTable* p, G4EmTableType tType);
void SetCSDARangeTable(G4PhysicsTable* pRange);
void SetRangeTableForLoss(G4PhysicsTable* p);
void SetSecondaryRangeTable(G4PhysicsTable* p);
void SetInverseRangeTable(G4PhysicsTable* p);
void SetLambdaTable(G4PhysicsTable* p);
void SetTwoPeaksXS(std::vector<G4TwoPeaksXS*>* p);
void SetTwoPeaksXS(std::vector<G4TwoPeaksXS*>*);
void SetEnergyOfCrossSectionMax(std::vector<G4double>*);
//------------------------------------------------------------------------
// Specific methods to define custom Physics Tables to the process
//------------------------------------------------------------------------
// Binning for dEdx, range, inverse range and labda tables
// Binning for dEdx, range, inverse range and lambda tables
void SetDEDXBinning(G4int nbins);
// Min kinetic energy for tables
@@ -375,11 +356,11 @@ public:
inline G4PhysicsTable* DEDXunRestrictedTable() const;
inline G4PhysicsTable* IonisationTable() const;
inline G4PhysicsTable* CSDARangeTable() const;
inline G4PhysicsTable* SecondaryRangeTable() const;
inline G4PhysicsTable* RangeTableForLoss() const;
inline G4PhysicsTable* InverseRangeTable() const;
inline G4PhysicsTable* LambdaTable() const;
inline std::vector<G4TwoPeaksXS*>* TwoPeaksXS() const;
inline std::vector<G4double>* EnergyOfCrossSectionMax() const;
inline G4bool UseBaseMaterial() const;
@@ -448,18 +429,13 @@ private:
const G4ParticleDefinition* particle = nullptr;
const G4ParticleDefinition* baseParticle = nullptr;
const G4ParticleDefinition* secondaryParticle = nullptr;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* thePositron;
const G4ParticleDefinition* theGamma;
const G4ParticleDefinition* theGenericIon = nullptr;
G4EmDataHandler* theData = nullptr;
G4PhysicsTable* theDEDXTable = nullptr;
G4PhysicsTable* theDEDXunRestrictedTable = nullptr;
G4PhysicsTable* theIonisationTable = nullptr;
G4PhysicsTable* theIonisationSubTable = nullptr;
G4PhysicsTable* theRangeTableForLoss = nullptr;
G4PhysicsTable* theCSDARangeTable = nullptr;
G4PhysicsTable* theSecondaryRangeTable = nullptr;
G4PhysicsTable* theInverseRangeTable = nullptr;
G4PhysicsTable* theLambdaTable = nullptr;
@@ -469,6 +445,7 @@ private:
const std::vector<G4double>* theDensityFactor = nullptr;
const G4DataVector* theCuts = nullptr;
std::vector<G4double>* theEnergyOfCrossSectionMax = nullptr;
std::vector<G4TwoPeaksXS*>* fXSpeaks = nullptr;
G4double lowestKinEnergy;
@@ -479,8 +456,8 @@ private:
G4double linLossLimit = 0.01;
G4double dRoverRange = 0.2;
G4double finalRange;
G4double lambdaFactor = 1.0;
G4double logLambdafactor = 0.0;
G4double lambdaFactor = 0.8;
G4double invLambdaFactor;
G4double biasFactor = 1.0;
G4double massRatio = 1.0;
@@ -488,8 +465,6 @@ private:
G4double fFactor = 1.0;
G4double reduceFactor = 1.0;
G4double chargeSqRatio = 1.0;
G4double fLambda = 0.0;
G4double fLambdaEnergy = 0.0;
G4double fRange = 0.0;
G4double fRangeEnergy = 0.0;
@@ -517,7 +492,6 @@ private:
size_t basedCoupleIndex = 0;
size_t coupleIdxRange = 0;
size_t coupleIdxLambda = 0;
size_t idxDEDX = 0;
size_t idxDEDXunRestricted = 0;
size_t idxIonisation = 0;
@@ -528,7 +502,7 @@ private:
size_t idxLambda = 0;
G4GPILSelection aGPILSelection;
G4CrossSectionType fXSType = fEmIncreasing;
G4CrossSectionType fXSType = fEmOnePeak;
G4bool lossFluctuationFlag = true;
G4bool rndmStepFlag = false;
@@ -548,8 +522,7 @@ private:
G4bool actMaxKinEnergy = false;
std::vector<G4DynamicParticle*> secParticles;
std::vector<G4Track*> scTracks;
std::vector<G4Track*> scTracks;
};
// ======== Run time inline methods ================
@@ -581,7 +554,7 @@ inline void
G4VEnergyLossProcess::DefineMaterial(const G4MaterialCutsCouple* couple)
{
if(couple != currentCouple) {
currentCouple = couple;
currentCouple = couple;
currentMaterial = couple->GetMaterial();
basedCoupleIndex = currentCoupleIndex = couple->GetIndex();
fFactor = chargeSqRatio*biasFactor;
@@ -712,12 +685,7 @@ inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r)
inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
{
if(currentCoupleIndex != coupleIdxLambda || fLambdaEnergy != e) {
coupleIdxLambda = currentCoupleIndex;
fLambdaEnergy = e;
fLambda = fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda);
}
return fLambda;
return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -725,13 +693,7 @@ inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
inline G4double
G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e, G4double loge)
{
if(currentCoupleIndex != coupleIdxLambda || fLambdaEnergy != e) {
coupleIdxLambda = currentCoupleIndex;
fLambdaEnergy = e;
fLambda = fFactor*
((*theLambdaTable)[basedCoupleIndex])->LogVectorValue(e, loge);
}
return fLambda;
return fFactor*((*theLambdaTable)[basedCoupleIndex])->LogVectorValue(e, loge);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -981,13 +943,6 @@ inline G4PhysicsTable* G4VEnergyLossProcess::CSDARangeTable() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4PhysicsTable* G4VEnergyLossProcess::SecondaryRangeTable() const
{
return theSecondaryRangeTable;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4PhysicsTable* G4VEnergyLossProcess::RangeTableForLoss() const
{
return theRangeTableForLoss;
@@ -1016,6 +971,14 @@ inline G4bool G4VEnergyLossProcess::UseBaseMaterial() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline std::vector<G4double>*
G4VEnergyLossProcess::EnergyOfCrossSectionMax() const
{
return theEnergyOfCrossSectionMax;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline std::vector<G4TwoPeaksXS*>* G4VEnergyLossProcess::TwoPeaksXS() const
{
return fXSpeaks;
@@ -1032,8 +995,7 @@ inline size_t G4VEnergyLossProcess::NumberOfModels() const
inline G4VEmModel* G4VEnergyLossProcess::EmModel(size_t index) const
{
return (nullptr != emModels && index < emModels->size())
? (*emModels)[index] : nullptr;
return (index < emModels->size()) ? (*emModels)[index] : nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....