Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -44,7 +44,9 @@ enum G4DNAModelSubType
fDNAUnknownModel = 0,
fRitchie1994eSolvation = 1,
fTerrisol1990eSolvation = 2,
fMeesungnoen2002eSolvation = 3
fMeesungnoen2002eSolvation = 3,
fKreipl2009eSolvation = 4,
fMeesungnoensolid2002eSolvation = 5
};
#endif
@@ -57,7 +57,7 @@ public:
explicit G4DummyModel(const G4String& nam = "DummyModel");
virtual ~G4DummyModel();
~G4DummyModel() override;
void Initialise(const G4ParticleDefinition*, const G4DataVector&) final;
@@ -67,6 +67,14 @@ public:
G4double tmin,
G4double tmax) final;
G4double ComputeTruePathLengthLimit(const G4Track&, G4double&) final;
G4double ComputeGeomPathLength(G4double) final;
G4double ComputeTrueStepLength(G4double) final;
G4ThreeVector& SampleScattering(const G4ThreeVector&, G4double) final;
private:
// hide assignment operator
@@ -76,8 +76,7 @@ public:
inline const G4Element* SelectRandomAtom(G4double kineticEnergy) const;
inline const G4Element* SelectRandomAtom(const G4double kineticEnergy,
const G4double logEKin,
size_t &lastIndx);
const G4double logEKin) const;
inline const G4Material* GetMaterial() const;
@@ -122,16 +121,32 @@ inline const G4Element* G4EmElementSelector::SelectRandomAtom(G4double e) const
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
inline const G4Element*
G4EmElementSelector::SelectRandomAtom(const G4double e, const G4double loge,
size_t &lastIndx)
G4EmElementSelector::SelectRandomAtom(const G4double e,const G4double loge)const
{
const G4Element* element = (*theElementVector)[nElmMinusOne];
if (nElmMinusOne > 0) {
const G4double x = G4UniformRand();
for (G4int i=0; i<nElmMinusOne; ++i) {
if (x <= (xSections[i])->Value(e, loge, lastIndx)) {
// 1. Determine energy index (only once)
const size_t nBins = (xSections[0])->GetVectorLength();
// handle cases below/above the enrgy grid (by ekin, idx that gives a=0/1)
// ekin = x[0] if e<=x[0] and idx will be 0 ^ a=0 => so y=y0
// ekin = x[N-1] if e>=x[N-1] and idx will be N-2 ^ a=1 => so y=y_{N-1}
const G4double ekin = std::max((xSections[0])->Energy(0),
std::min((xSections[0])->Energy(nBins-1),e));
// compute the lower index of the bin (idx \in [0,N-2] will be guaranted)
const size_t idx = (xSections[0])->ComputeLogVectorBin(loge);
// 2. Do the linear interp.(robust for corner cases through ekin, idx and a)
const G4double x1 = (xSections[0])->Energy(idx);
const G4double x2 = (xSections[0])->Energy(idx+1);
// note: all corner cases of the previous methods are covered and eventually
// gives a=0/1 that results in y=y0\y_{N-1} if e<=x[0]/e>=x[N-1] or
// y=y_i/y_{i+1} if e<x[i]/e>=x[i+1] due to small numerical errors
const G4double a = std::max(0., std::min(1., (ekin - x1)/(x2 - x1)));
const G4double urnd = G4UniformRand();
for (G4int i = 0; i < nElmMinusOne; ++i) {
const G4double y1 = (*xSections[i])[idx];
const G4double y2 = (*xSections[i])[idx+1];
if (urnd <= y1 + a*(y2-y1)) {
element = (*theElementVector)[i];
break;
}
@@ -229,6 +229,12 @@ public:
void SetMscGeomFactor(G4double val);
G4double MscGeomFactor() const;
void SetMscSafetyFactor(G4double val);
G4double MscSafetyFactor() const;
void SetMscLambdaLimit(G4double val);
G4double MscLambdaLimit() const;
void SetMscSkin(G4double val);
G4double MscSkin() const;
@@ -238,6 +244,9 @@ public:
void SetMaxNIELEnergy(G4double val);
G4double MaxNIELEnergy() const;
void SetMaxEnergyFor5DMuPair(G4double val);
G4double MaxEnergyFor5DMuPair() const;
void SetStepFunction(G4double v1, G4double v2);
void SetStepFunctionMuHad(G4double v1, G4double v2);
@@ -376,6 +385,7 @@ private:
G4double minKinEnergy;
G4double maxKinEnergy;
G4double maxKinEnergyCSDA;
G4double max5DEnergyForMuPair;
G4double lowestElectronEnergy;
G4double lowestMuHadEnergy;
G4double lowestTripletEnergy;
@@ -389,6 +399,8 @@ private:
G4double rangeFactor;
G4double rangeFactorMuHad;
G4double geomFactor;
G4double safetyFactor;
G4double lambdaLimit;
G4double skin;
G4double factorScreen;
@@ -103,6 +103,7 @@ private:
G4UIcmdWithADouble* minSubSecCmd;
G4UIcmdWithADoubleAndUnit* minEnCmd;
G4UIcmdWithADoubleAndUnit* maxEnCmd;
G4UIcmdWithADoubleAndUnit* max5DCmd;
G4UIcmdWithADoubleAndUnit* cenCmd;
G4UIcmdWithADoubleAndUnit* lowEnCmd;
G4UIcmdWithADoubleAndUnit* lowEn3Cmd;
@@ -117,6 +118,8 @@ private:
G4UIcmdWithADouble* frCmd;
G4UIcmdWithADouble* fr1Cmd;
G4UIcmdWithADouble* fgCmd;
G4UIcmdWithADouble* safCmd;
G4UIcmdWithADoubleAndUnit* llimCmd;
G4UIcmdWithADouble* skinCmd;
G4UIcmdWithADouble* screCmd;
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -53,6 +51,7 @@
#include <vector>
#include "globals.hh"
#include "G4PhysicsTable.hh"
#include "G4Threading.hh"
class G4VEmModel;
class G4ParticleDefinition;
@@ -63,7 +62,7 @@ class G4LossTableBuilder
public:
G4LossTableBuilder();
G4LossTableBuilder(G4bool master=true);
virtual ~G4LossTableBuilder();
@@ -74,12 +73,12 @@ public:
// build range
void BuildRangeTable(const G4PhysicsTable* dedxTable,
G4PhysicsTable* rangeTable,
G4bool isIonisation = false);
G4bool useBM = false);
// build inverse range
void BuildInverseRangeTable(const G4PhysicsTable* rangeTable,
G4PhysicsTable* invRangeTable,
G4bool isIonisation = false);
G4bool useBM = false);
// build a table requested by any model class
G4PhysicsTable* BuildTableForModel(G4PhysicsTable* table,
@@ -89,15 +88,14 @@ public:
G4bool spline);
// initialise base materials
void InitialiseBaseMaterials(G4PhysicsTable* table);
void InitialiseBaseMaterials(const G4PhysicsTable* table=nullptr);
// access methods
inline const std::vector<G4int>* GetCoupleIndexes();
const std::vector<G4int>* GetCoupleIndexes() const;
inline const std::vector<G4double>* GetDensityFactors();
const std::vector<G4double>* GetDensityFactors() const;
inline G4bool GetFlag(size_t idx) const;
G4bool GetFlag(size_t idx);
inline void SetSplineFlag(G4bool flag);
@@ -105,41 +103,23 @@ public:
private:
void InitialiseCouples();
G4LossTableBuilder & operator=(const G4LossTableBuilder &right);
G4LossTableBuilder(const G4LossTableBuilder&);
G4LossTableBuilder & operator=(const G4LossTableBuilder &right) = delete;
G4LossTableBuilder(const G4LossTableBuilder&) = delete;
G4EmParameters* theParameters;
G4EmParameters* theParameters;
G4bool splineFlag;
G4bool isInitialized;
G4bool isMaster;
std::vector<G4double>* theDensityFactor;
std::vector<G4int>* theDensityIdx;
std::vector<G4bool>* theFlag;
static std::vector<G4double>* theDensityFactor;
static std::vector<G4int>* theDensityIdx;
static std::vector<G4bool>* theFlag;
#ifdef G4MULTITHREADED
static G4Mutex ltbMutex;
#endif
};
inline const std::vector<G4int>*
G4LossTableBuilder::GetCoupleIndexes()
{
if(theDensityIdx->size() == 0) { InitialiseCouples(); }
return theDensityIdx;
}
inline const std::vector<G4double>*
G4LossTableBuilder::GetDensityFactors()
{
if(theDensityIdx->size() == 0) { InitialiseCouples(); }
return theDensityFactor;
}
inline G4bool G4LossTableBuilder::GetFlag(size_t idx) const
{
return (*theFlag)[idx];
}
inline void G4LossTableBuilder::SetSplineFlag(G4bool flag)
{
splineFlag = flag;
@@ -57,10 +57,6 @@
#include "globals.hh"
#include "G4ThreadLocalSingleton.hh"
#include "G4VEnergyLossProcess.hh"
#include "G4EmCorrections.hh"
#include "G4LossTableBuilder.hh"
#include "G4VAtomDeexcitation.hh"
#include "G4VSubCutProducer.hh"
class G4PhysicsTable;
class G4MaterialCutsCouple;
@@ -72,6 +68,10 @@ class G4ElectronIonPair;
class G4NIELCalculator;
class G4VMultipleScattering;
class G4VEmProcess;
class G4EmCorrections;
class G4LossTableBuilder;
class G4VAtomDeexcitation;
class G4VSubCutProducer;
class G4LossTableManager
{
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -251,13 +250,13 @@ public:
// should be called at initialisation to set element selectors
inline void SetElementSelectors(std::vector<G4EmElementSelector*>*);
// dEdx per unit length
// dEdx per unit length, base material approach may be used
virtual inline G4double ComputeDEDX(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy = DBL_MAX);
const G4ParticleDefinition*,
G4double kineticEnergy,
G4double cutEnergy = DBL_MAX);
// cross section per volume
// cross section per volume, base material approach may be used
inline G4double CrossSection(const G4MaterialCutsCouple*,
const G4ParticleDefinition*,
G4double kineticEnergy,
@@ -358,7 +357,7 @@ public:
inline void SetActivationLowEnergyLimit(G4double);
inline G4bool IsActive(G4double kinEnergy);
inline G4bool IsActive(G4double kinEnergy) const;
inline void SetPolarAngleLimit(G4double);
@@ -376,6 +375,10 @@ public:
inline G4bool IsMaster() const;
inline void SetUseBaseMaterials(G4bool val);
inline G4bool UseBaseMaterials() const;
inline G4double MaxSecondaryKinEnergy(const G4DynamicParticle* dynParticle);
inline const G4String& GetName() const;
@@ -399,14 +402,14 @@ protected:
private:
// hide assignment operator
G4VEmModel & operator=(const G4VEmModel &right) = delete;
G4VEmModel(const G4VEmModel&) = delete;
G4VEmModel & operator=(const G4VEmModel &right);
G4VEmModel(const G4VEmModel&);
// ======== Parameters of the class fixed at construction =========
G4VEmFluctuationModel* flucModel;
G4VEmAngularDistribution* anglModel;
const G4String name;
const G4String name;
// ======== Parameters of the class fixed at initialisation =======
@@ -424,6 +427,7 @@ private:
G4bool localTable;
G4bool localElmSelectors;
G4bool useAngularGenerator;
G4bool useBaseMaterials;
G4bool isLocked;
G4int nSelectors;
std::vector<G4EmElementSelector*>* elmSelectors;
@@ -434,12 +438,13 @@ protected:
G4ElementData* fElementData;
G4VParticleChange* pParticleChange;
G4PhysicsTable* xSectionTable;
const G4Material* pBaseMaterial;
const std::vector<G4double>* theDensityFactor;
const std::vector<G4int>* theDensityIdx;
size_t idxTable;
size_t fIdxTableElmSelector;
G4bool lossFlucFlag;
G4double inveplus;
G4double inveplus;
G4double pFactor;
// ======== Cached values - may be state dependent ================
@@ -457,9 +462,17 @@ private:
// ======== Run time inline methods ================
inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* p)
inline void G4VEmModel::SetCurrentCouple(const G4MaterialCutsCouple* ptr)
{
fCurrentCouple = p;
if(fCurrentCouple != ptr) {
fCurrentCouple = ptr;
pBaseMaterial = ptr->GetMaterial();
pFactor = 1.0;
if(useBaseMaterials && pBaseMaterial->GetBaseMaterial()) {
pBaseMaterial = pBaseMaterial->GetBaseMaterial();
pFactor = (*theDensityFactor)[(*theDensityIdx)[ptr->GetIndex()]];
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -508,7 +521,7 @@ inline G4double G4VEmModel::ComputeDEDX(const G4MaterialCutsCouple* couple,
G4double cutEnergy)
{
SetCurrentCouple(couple);
return ComputeDEDXPerVolume(couple->GetMaterial(),part,kinEnergy,cutEnergy);
return pFactor*ComputeDEDXPerVolume(pBaseMaterial,part,kinEnergy,cutEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -520,8 +533,8 @@ inline G4double G4VEmModel::CrossSection(const G4MaterialCutsCouple* couple,
G4double maxEnergy)
{
SetCurrentCouple(couple);
return CrossSectionPerVolume(couple->GetMaterial(),part,kinEnergy,
cutEnergy,maxEnergy);
return pFactor*CrossSectionPerVolume(pBaseMaterial,part,kinEnergy,
cutEnergy,maxEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -560,10 +573,10 @@ G4VEmModel::SelectRandomAtom(const G4MaterialCutsCouple* couple,
G4double cutEnergy,
G4double maxEnergy)
{
fCurrentCouple = couple;
SetCurrentCouple(couple);
fCurrentElement = (nSelectors > 0) ?
((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy) :
SelectRandomAtom(couple->GetMaterial(),part,kinEnergy,cutEnergy,maxEnergy);
SelectRandomAtom(pBaseMaterial,part,kinEnergy,cutEnergy,maxEnergy);
fCurrentIsotope = nullptr;
return fCurrentElement;
}
@@ -574,20 +587,18 @@ inline const G4Element*
G4VEmModel::SelectTargetAtom(const G4MaterialCutsCouple* couple,
const G4ParticleDefinition* part,
G4double kinEnergy,
G4double logKinEnergy,
G4double logKinE,
G4double cutEnergy,
G4double maxEnergy)
{
fCurrentCouple = couple;
SetCurrentCouple(couple);
fCurrentElement = (nSelectors > 0)
? ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy,
logKinEnergy, fIdxTableElmSelector)
: SelectRandomAtom(couple->GetMaterial(),part,kinEnergy,cutEnergy,maxEnergy);
? ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy,logKinE)
: SelectRandomAtom(pBaseMaterial,part,kinEnergy,cutEnergy,maxEnergy);
fCurrentIsotope = nullptr;
return fCurrentElement;
}
// ======== Get/Set inline methods used at initialisation ================
inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()
@@ -729,6 +740,20 @@ inline G4bool G4VEmModel::IsMaster() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmModel::SetUseBaseMaterials(G4bool val)
{
useBaseMaterials = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4VEmModel::UseBaseMaterials() const
{
return useBaseMaterials;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmModel::SetHighEnergyLimit(G4double val)
{
highLimit = val;
@@ -757,7 +782,7 @@ inline void G4VEmModel::SetActivationLowEnergyLimit(G4double val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4bool G4VEmModel::IsActive(G4double kinEnergy)
inline G4bool G4VEmModel::IsActive(G4double kinEnergy) const
{
return (kinEnergy >= eMinActive && kinEnergy <= eMaxActive);
}
@@ -816,9 +841,11 @@ inline std::vector<G4EmElementSelector*>* G4VEmModel::GetElementSelectors()
inline void
G4VEmModel::SetElementSelectors(std::vector<G4EmElementSelector*>* p)
{
elmSelectors = p;
nSelectors = (elmSelectors) ? elmSelectors->size() : 0;
localElmSelectors = false;
if(p != elmSelectors) {
elmSelectors = p;
nSelectors = (elmSelectors) ? G4int(elmSelectors->size()) : 0;
localElmSelectors = false;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -144,13 +143,16 @@ public:
const G4String& directory,
G4bool ascii) override;
// allowing check process name
virtual G4VEmProcess* GetEmProcess(const G4String& name);
//------------------------------------------------------------------------
// Specific methods for Discrete EM post step simulation
//------------------------------------------------------------------------
// It returns the cross section per volume for energy/ material
G4double CrossSectionPerVolume(G4double kineticEnergy,
const G4MaterialCutsCouple* couple);
G4double CrossSectionPerVolume(G4double kineticEnergy,
const G4MaterialCutsCouple* couple);
// It returns the cross section of the process per atom
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy,
@@ -315,7 +317,6 @@ private:
void PrintWarning(G4String tit, G4double val);
// void ComputeIntegralLambda(G4double kinEnergy);
void ComputeIntegralLambda(G4double kinEnergy, G4double logKinEnergy);
inline void DefineMaterial(const G4MaterialCutsCouple* couple);
@@ -362,8 +363,6 @@ private:
const std::vector<G4double>* theCutsGamma;
const std::vector<G4double>* theCutsElectron;
const std::vector<G4double>* theCutsPositron;
const std::vector<G4double>* theDensityFactor;
const std::vector<G4int>* theDensityIdx;
G4int nLambdaBins;
@@ -399,7 +398,11 @@ protected:
std::vector<G4DynamicParticle*> secParticles;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
const std::vector<G4double>* theDensityFactor;
const std::vector<G4int>* theDensityIdx;
size_t currentCoupleIndex;
size_t basedCoupleIndex;
G4int mainSecondaries;
G4int secID;
@@ -425,7 +428,6 @@ private:
// cache
const G4Material* baseMaterial;
size_t basedCoupleIndex;
G4double fFactor;
G4bool biasFlag;
@@ -515,7 +517,7 @@ inline G4double G4VEmProcess::GetLambdaFromTable(G4double e)
inline G4double G4VEmProcess::GetLambdaFromTable(G4double e, G4double loge)
{
return ((*theLambdaTable)[basedCoupleIndex])->Value(e, loge, idxLambda);
return ((*theLambdaTable)[basedCoupleIndex])->LogVectorValue(e, loge);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -527,8 +529,7 @@ inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e)
inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e, G4double loge)
{
return
((*theLambdaTablePrim)[basedCoupleIndex])->Value(e, loge, idxLambdaPrim)/e;
return ((*theLambdaTablePrim)[basedCoupleIndex])->LogVectorValue(e, loge)/e;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -665,7 +665,7 @@ G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e, G4double loge)
<< basedCoupleIndex << " E(MeV)= " << e
<< " Emin= " << minKinEnergy << " Factor= " << fFactor
<< " " << theDEDXTable << G4endl; */
G4double x = fFactor*(*theDEDXTable)[basedCoupleIndex]->Value(e,loge,idxDEDX);
G4double x = fFactor*(*theDEDXTable)[basedCoupleIndex]->LogVectorValue(e,loge);
if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
return x;
}
@@ -732,7 +732,7 @@ G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e, G4double loge)
lastIdx = basedCoupleIndex;
preStepRangeEnergy = e;
computedRange =
((*theRangeTableForLoss)[basedCoupleIndex])->Value(e, loge, idxRange);
((*theRangeTableForLoss)[basedCoupleIndex])->LogVectorValue(e, loge);
if(e < minKinEnergy) { computedRange *= std::sqrt(e/minKinEnergy); }
}
//G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= "
@@ -763,7 +763,7 @@ G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e,
{
G4double x;
if (e < maxKinEnergyCSDA) {
x = ((*theCSDARangeTable)[basedCoupleIndex])->Value(e, loge, idxCSDA);
x = ((*theCSDARangeTable)[basedCoupleIndex])->LogVectorValue(e, loge);
if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
} else {
x = theRangeAtMaxEnergy[basedCoupleIndex] +
@@ -800,7 +800,7 @@ inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
inline G4double
G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e, G4double loge)
{
return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e,loge,idxLambda);
return fFactor*((*theLambdaTable)[basedCoupleIndex])->LogVectorValue(e,loge);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
@@ -62,6 +61,7 @@
#include <vector>
class G4ParticleChangeForMSC;
class G4ParticleDefinition;
class G4VMscModel : public G4VEmModel
{
@@ -70,24 +70,25 @@ public:
explicit G4VMscModel(const G4String& nam);
virtual ~G4VMscModel();
~G4VMscModel() override;
virtual G4double ComputeTruePathLengthLimit(const G4Track& track,
G4double& stepLimit);
G4double& stepLimit) = 0;
virtual G4double ComputeGeomPathLength(G4double truePathLength);
virtual G4double ComputeGeomPathLength(G4double truePathLength) = 0;
virtual G4double ComputeTrueStepLength(G4double geomPathLength);
virtual G4double ComputeTrueStepLength(G4double geomPathLength) = 0;
virtual G4ThreeVector& SampleScattering(const G4ThreeVector&,
G4double safety);
G4double safety) = 0;
void InitialiseParameters(const G4ParticleDefinition*);
// empty method
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double tmin,
G4double tmax) override;
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
const G4MaterialCutsCouple*,
const G4DynamicParticle*,
G4double tmin, G4double tmax) override;
//================================================================
// Set parameters of multiple scattering models
@@ -103,6 +104,10 @@ public:
inline void SetSkin(G4double);
inline void SetLambdaLimit(G4double);
inline void SetSafetyFactor(G4double);
inline void SetSampleZ(G4bool);
//================================================================
@@ -231,6 +236,20 @@ inline void G4VMscModel::SetGeomFactor(G4double val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4VMscModel::SetLambdaLimit(G4double val)
{
if(!IsLocked()) { lambdalimit = val; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4VMscModel::SetSafetyFactor(G4double val)
{
if(!IsLocked()) { facsafety = val; }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void G4VMscModel::SetStepLimitType(G4MscStepLimitType val)
{
if(!IsLocked()) { steppingAlgorithm = val; }
@@ -387,8 +406,7 @@ G4VMscModel::GetTransportMeanFreePath(const G4ParticleDefinition* part,
G4double x;
if (xSectionTable) {
const G4int idx = CurrentCouple()->GetIndex();
x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin, idxTable)
*(*theDensityFactor)[idx]/(ekin*ekin);
x = (*xSectionTable)[idx]->Value(ekin, idxTable)/(ekin*ekin);
} else {
x = CrossSectionPerVolume(CurrentCouple()->GetMaterial(), part, ekin,
0.0, DBL_MAX);
@@ -403,8 +421,7 @@ G4VMscModel::GetTransportMeanFreePath(const G4ParticleDefinition* part,
G4double x;
if (xSectionTable) {
const G4int idx = CurrentCouple()->GetIndex();
x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin, logekin, idxTable)
*(*theDensityFactor)[idx]/(ekin*ekin);
x = (*xSectionTable)[idx]->LogVectorValue(ekin, logekin)/(ekin*ekin);
} else {
x = CrossSectionPerVolume(CurrentCouple()->GetMaterial(), part, ekin,
0.0, DBL_MAX);