Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AngleDirect.hh 73844 2013-09-13 14:16:30Z vnivanch $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AtomicShell.hh 96626 2016-04-27 08:36:27Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAtomDeexcitation.hh,v 1.9 2011-01-03 19:34:03 vnivanch Exp $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DNAModelSubType.hh 66241 2012-12-13 18:34:42Z gunter $
//
//---------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4DummyModel.hh 96139 2016-03-17 14:10:31Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ElectronIonPair.hh 95657 2016-02-17 13:03:36Z gcosmo $
//
//
#ifndef G4ElectronIonPair_h
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmBiasingManager.hh 95657 2016-02-17 13:03:36Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -96,9 +95,9 @@ public:
const G4Track& track,
G4VEmModel* currentModel,
G4ParticleChangeForGamma* pParticleChange,
G4double& eloss,
G4int coupleIdx,
G4double tcut,
G4double& eloss,
G4int coupleIdx,
G4double tcut,
G4double safety = 0.0);
// for G4VEnergyLossProcess
@@ -107,7 +106,7 @@ public:
G4VEmModel* currentModel,
G4ParticleChangeForLoss* pParticleChange,
G4double& eloss,
G4int coupleIdx,
G4int coupleIdx,
G4double tcut,
G4double safety = 0.0);
@@ -121,6 +120,17 @@ public:
inline void ResetForcedInteraction();
G4bool CheckDirection(G4ThreeVector pos, G4ThreeVector momdir) const;
G4bool GetDirectionalSplitting() { return fDirectionalSplitting; }
void SetDirectionalSplitting(G4bool v) { fDirectionalSplitting = v; }
void SetDirectionalSplittingTarget(G4ThreeVector v)
{ fDirectionalSplittingTarget = v; }
void SetDirectionalSplittingRadius(G4double r)
{ fDirectionalSplittingRadius = r; }
G4double GetWeight(G4int i);
private:
void ApplyRangeCut(std::vector<G4DynamicParticle*>& vd,
@@ -134,6 +144,19 @@ private:
G4int index,
G4double tcut);
void ApplyDirectionalSplitting(std::vector<G4DynamicParticle*>& vd,
const G4Track& track,
G4VEmModel* currentModel,
G4int index,
G4double tcut,
G4ParticleChangeForGamma* partChange);
void ApplyDirectionalSplitting(std::vector<G4DynamicParticle*>& vd,
const G4Track& track,
G4VEmModel* currentModel,
G4int index,
G4double tcut);
inline G4double ApplyRussianRoulette(std::vector<G4DynamicParticle*>& vd,
G4int index);
@@ -158,10 +181,18 @@ private:
G4VEnergyLossProcess* eIonisation;
const G4ParticleDefinition* theElectron;
const G4ParticleDefinition* theGamma;
G4double fSafetyMin;
G4double currentStepLimit;
G4bool startTracking;
G4double fWeight;
G4bool fDirectionalSplitting;
G4ThreeVector fDirectionalSplittingTarget;
G4double fDirectionalSplittingRadius;
std::vector<G4double> fDirectionalSplittingWeights;
};
inline G4bool
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCalculator.hh 108306 2018-02-02 13:10:06Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmConfigurator.hh 95657 2016-02-17 13:03:36Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCorrections.hh 108386 2018-02-09 15:38:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmDataHandler.hh 73844 2013-09-13 14:16:30Z vnivanch $
//
// -------------------------------------------------------------------
//
@@ -51,11 +50,13 @@
#include "globals.hh"
#include "G4PhysicsTable.hh"
#include "G4PhysicsVector.hh"
#include <vector>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4ParticleDefinition;
class G4VEmProcess;
class G4EmDataHandler
{
@@ -67,23 +68,36 @@ public:
size_t SetTable(G4PhysicsTable*);
G4PhysicsTable* MakeTable();
G4PhysicsTable* MakeTable(size_t idx);
void CleanTable(size_t idx);
G4bool StorePhysicsTable(size_t idx,
const G4ParticleDefinition* part,
const G4String& namet,
const G4String& procname,
const G4String& fname,
G4bool ascii);
G4bool RetrievePhysicsTable(size_t idx,
const G4ParticleDefinition* part,
const G4String& namet,
const G4String& procname,
const G4String& fname,
G4bool ascii);
inline G4PhysicsTable* GetTable(size_t idx) { return data[idx]; }
void SetMasterProcess(const G4VEmProcess*);
inline std::vector<G4PhysicsTable*>& GetTables() { return data; }
const G4VEmProcess* GetMasterProcess(size_t idx) const;
inline const G4PhysicsTable* GetTable(size_t idx) const {
return (idx < tLength) ? data[idx] : nullptr;
}
inline G4PhysicsTable* Table(size_t idx) const {
return (idx < tLength) ? data[idx] : nullptr;
}
inline const G4PhysicsVector* GetVector(size_t itable, size_t ivec) const
{ return (*(data[itable]))[ivec]; }
inline const std::vector<G4PhysicsTable*>& GetTables() const { return data; }
// hide assignment operator
G4EmDataHandler & operator=(const G4EmDataHandler &right) = delete;
@@ -93,6 +107,7 @@ private:
std::vector<G4PhysicsTable*> data;
size_t tLength;
std::vector<const G4VEmProcess*> masterProcess;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmElementSelector.hh 95657 2016-02-17 13:03:36Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -108,8 +107,9 @@ inline const G4Element* G4EmElementSelector::SelectRandomAtom(G4double e) const
const G4Element* element = (*theElementVector)[nElmMinusOne];
if (nElmMinusOne > 0) {
G4double x = G4UniformRand();
size_t idx(0);
for(G4int i=0; i<nElmMinusOne; ++i) {
if (x <= (xSections[i])->Value(e)) {
if (x <= (xSections[i])->Value(e, idx)) {
element = (*theElementVector)[i];
break;
}
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmModelManager.hh 106714 2017-10-20 09:38:06Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -178,7 +177,6 @@ public:
// Automatic documentation
void DumpModelList(std::ostream& out, G4int verb);
void DumpModelList(std::ostream& out, G4int verb, G4String endOfLine);
// Select model for given material cuts couple index
inline G4VEmModel* SelectModel(G4double& energy, size_t& index);
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmMultiModel.hh 95681 2016-02-18 09:44:18Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmParameters.hh 66885 2013-01-16 17:37:13Z gunter $
//
// -------------------------------------------------------------------
//
@@ -113,6 +112,7 @@ public:
void SetAuger(G4bool val);
G4bool Auger() const;
// obsolete methods
void SetAugerCascade(G4bool val);
G4bool AugerCascade() const;
@@ -146,6 +146,9 @@ public:
void SetBirksActive(G4bool val);
G4bool BirksActive() const;
void SetUseICRU90Data(G4bool val);
G4bool UseICRU90Data() const;
void SetDNAFast(G4bool val);
G4bool DNAFast() const;
@@ -155,8 +158,11 @@ public:
void SetDNAElectronMsc(G4bool val);
G4bool DNAElectronMsc() const;
void SetGammaSharkActive(G4bool val);
G4bool GammaSharkActive() const;
void SetGeneralProcessActive(G4bool val);
G4bool GeneralProcessActive() const;
void SetEnableSamplingTable(G4bool val);
G4bool EnableSamplingTable() const;
void SetEmSaturation(G4EmSaturation*);
G4EmSaturation* GetEmSaturation();
@@ -275,6 +281,7 @@ public:
const std::vector<G4String>& RegionsDNA() const;
const std::vector<G4String>& TypesDNA() const;
// obsolete methods
void AddMsc(const G4String& region, const G4String& type);
const std::vector<G4String>& RegionsMsc() const;
const std::vector<G4String>& TypesMsc() const;
@@ -301,6 +308,18 @@ public:
G4double factor,
G4double energyLimit);
G4bool GetDirectionalSplitting() { return directionalSplitting; }
void SetDirectionalSplitting(G4int v) { directionalSplitting = v; }
void SetDirectionalSplittingTarget(G4ThreeVector v)
{ directionalSplittingTarget = v; }
G4ThreeVector GetDirectionalSplittingTarget()
{ return directionalSplittingTarget; }
void SetDirectionalSplittingRadius(G4double r)
{ directionalSplittingRadius = r; }
G4double GetDirectionalSplittingRadius()
{ return directionalSplittingRadius; }
// initialisation methods
void DefineRegParamForLoss(G4VEnergyLossProcess*,
G4bool isElectron) const;
@@ -350,12 +369,15 @@ private:
G4bool useMottCorrection;
G4bool integral;
G4bool birks;
G4bool fICRU90;
G4bool dnaFast;
G4bool dnaStationary;
G4bool dnaMsc;
G4bool gammaShark;
G4bool gener;
G4bool enableSamplingTable;
G4bool onIsolated; // 5d model conversion on free ions
G4bool directionalSplitting;
G4double minSubRange;
G4double minKinEnergy;
G4double maxKinEnergy;
@@ -378,6 +400,7 @@ private:
G4double dRoverRangeMuHad;
G4double finalRangeMuHad;
G4double factorScreen;
G4double directionalSplittingRadius;
G4int nbins;
G4int nbinsPerDecade;
@@ -385,6 +408,8 @@ private:
G4int workerVerbose;
G4int tripletConv; // 5d model triplet generation type
G4ThreeVector directionalSplittingTarget;
G4MscStepLimitType mscStepLimit;
G4MscStepLimitType mscStepLimitMuHad;
G4NuclearFormfactorType nucFormfactor;
@@ -402,8 +427,8 @@ private:
std::vector<G4String> m_regnamesDNA;
std::vector<G4String> m_typesDNA;
std::vector<G4String> m_regnamesMsc;
std::vector<G4String> m_typesMsc;
std::vector<G4String> m_regnamesPhys;
std::vector<G4String> m_typesPhys;
std::vector<G4String> m_regnamesSubCut;
std::vector<G4bool> m_subCuts;
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmParametersMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
//
// -------------------------------------------------------------------
//
@@ -61,6 +60,7 @@ class G4UIcmdWithAnInteger;
class G4UIcmdWithADouble;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
class G4UIcmdWith3VectorAndUnit;
class G4EmParameters;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -109,6 +109,9 @@ private:
G4UIcmdWithABool* dnamscCmd;
G4UIcmdWithABool* sharkCmd;
G4UIcmdWithABool* onIsolatedCmd;
G4UIcmdWithABool* sampleTCmd;
G4UIcmdWithABool* icru90Cmd;
G4UIcmdWithABool* dirSplitCmd;
G4UIcmdWithADouble* minSubSecCmd;
G4UIcmdWithADoubleAndUnit* minEnCmd;
@@ -128,6 +131,7 @@ private:
G4UIcmdWithADouble* fgCmd;
G4UIcmdWithADouble* skinCmd;
G4UIcmdWithADouble* screCmd;
G4UIcmdWithADoubleAndUnit* dirSplitRadiusCmd;
G4UIcmdWithAnInteger* dedxCmd;
G4UIcmdWithAnInteger* lamCmd;
@@ -159,6 +163,7 @@ private:
G4UIcommand* bsCmd;
G4UIcmdWithAString* nffCmd;
G4UIcmdWith3VectorAndUnit* dirSplitTargetCmd;
};
#endif
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmProcessOptions.hh 96088 2016-03-14 16:03:38Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmProcessSubType.hh 66241 2012-12-13 18:34:42Z gunter $
//
//---------------------------------------------------------------
//
@@ -51,6 +50,7 @@ enum G4EmProcessSubType
fAnnihilationToMuMu = 6,
fAnnihilationToHadrons = 7,
fNuclearStopping = 8,
fElectronGeneralProcess = 9,
fMultipleScattering = 10,
@@ -59,6 +59,7 @@ enum G4EmProcessSubType
fComptonScattering = 13,
fGammaConversion = 14,
fGammaConversionToMuMu = 15,
fGammaGeneralProcess = 16,
fCerenkov = 21,
fScintillation = 22,
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmSaturation.hh 100346 2016-10-18 15:30:36Z gcosmo $
//
//
#ifndef G4EmSaturation_h
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4EmTableType.hh 66241 2012-12-13 18:34:42Z gunter $
//
//---------------------------------------------------------------
//
@@ -24,9 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EnergyLossTables.hh 77290 2013-11-22 10:57:50Z gcosmo $
//
// $Id:
//
// -----------------------------------------------------------------------------
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4LossTableBuilder.hh 96088 2016-03-14 16:03:38Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4LossTableManager.hh 110572 2018-05-30 13:08:12Z gcosmo $
//
//
// -------------------------------------------------------------------
@@ -96,7 +95,6 @@ class G4EmConfigurator;
class G4ElectronIonPair;
class G4VMultipleScattering;
class G4VEmProcess;
class G4GammaShark;
class G4LossTableManager
{
@@ -239,9 +237,13 @@ public:
inline G4LossTableBuilder* GetTableBuilder();
inline void SetGammaShark(G4GammaShark*);
inline void SetGammaGeneralProcess(G4VEmProcess*);
inline G4GammaShark* GetGammaShark();
inline G4VEmProcess* GetGammaGeneralProcess();
inline void SetElectronGeneralProcess(G4VEnergyLossProcess*);
inline G4VEnergyLossProcess* GetElectronGeneralProcess();
private:
@@ -306,11 +308,11 @@ private:
G4VAtomDeexcitation* atomDeexcitation;
G4VSubCutProducer* subcutProducer;
G4EmParameters* theParameters;
G4GammaShark* gammaShark;
G4EmParameters* theParameters;
G4VEmProcess* gGeneral;
G4VEnergyLossProcess* eGeneral;
G4int verbose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -429,15 +431,36 @@ inline G4LossTableBuilder* G4LossTableManager::GetTableBuilder()
return tableBuilder;
}
inline void G4LossTableManager::SetGammaShark(G4GammaShark* ptr)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4LossTableManager::SetGammaGeneralProcess(G4VEmProcess* ptr)
{
gammaShark = ptr;
gGeneral = ptr;
}
inline G4GammaShark* G4LossTableManager::GetGammaShark()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VEmProcess* G4LossTableManager::GetGammaGeneralProcess()
{
return gammaShark;
return gGeneral;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
void G4LossTableManager::SetElectronGeneralProcess(G4VEnergyLossProcess* ptr)
{
eGeneral = ptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4VEnergyLossProcess* G4LossTableManager::GetElectronGeneralProcess()
{
return eGeneral;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4MscStepLimitType.hh 84204 2014-10-10 14:40:56Z gcosmo $
//
//---------------------------------------------------------------
//
@@ -24,7 +24,6 @@
// ********************************************************************
//
//
// $Id: G4NuclearFormfactorType.hh 84082 2014-10-06 14:33:09Z urban $
//
//---------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAtomDeexcitation.hh 108386 2018-02-09 15:38:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmAngularDistribution.hh 110416 2018-05-23 06:45:42Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmFluctuationModel.hh 106208 2017-09-20 01:53:57Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmModel.hh 108386 2018-02-09 15:38:32Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -223,9 +222,6 @@ public:
// for automatic documentation
virtual void ModelDescription(std::ostream& outFile) const;
virtual void ModelDescription(std::ostream& outFile,
G4String endOfLine) const;
protected:
@@ -529,7 +525,7 @@ G4double G4VEmModel::ComputeMeanFreePath(const G4ParticleDefinition* part,
G4double emax)
{
G4double cross = CrossSectionPerVolume(material,part,ekin,emin,emax);
return cross > 0.0 ? 1./cross : DBL_MAX;
return (cross > 0.0) ? 1./cross : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -827,4 +823,3 @@ inline void G4VEmModel::SetLocked(G4bool val)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
#endif
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEmProcess.hh 109178 2018-04-03 07:13:58Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -36,29 +35,11 @@
//
// Creation date: 01.10.2003
//
// Modifications:
// 30-06-04 make destructor virtual (V.Ivanchenko)
// 09-08-04 optimise integral option (V.Ivanchenko)
// 11-08-04 add protected methods to access cuts (V.Ivanchenko)
// 09-09-04 Bug fix for the integral mode with 2 peaks (V.Ivanchneko)
// 16-09-04 Add flag for LambdaTable and method RecalculateLambda (VI)
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
// 18-04-05 Use G4ParticleChangeForGamma (V.Ivantchenko)
// 09-05-05 Fix problem in logic when path boundary between materials (VI)
// 11-01-06 add A to parameters of ComputeCrossSectionPerAtom (VI)
// 01-02-06 put default value A=0. to keep compatibility with v5.2 (mma)
// 13-05-06 Add method to access model by index (V.Ivanchenko)
// 12-09-06 add SetModel() (mma)
// 25-09-07 More accurate handling zero xsect in
// PostStepGetPhysicalInteractionLength (V.Ivanchenko)
// 27-10-07 Virtual functions moved to source (V.Ivanchenko)
// 15-07-08 Reorder class members for further multi-thread development (VI)
// 17-02-10 Added pointer currentParticle (VI)
// Modifications: Vladimir Ivanchenko
//
// Class Description:
//
// It is the unified Discrete process
// It is the base class - EM discrete and rest/discrete process
// -------------------------------------------------------------------
//
@@ -77,6 +58,7 @@
#include "G4UnitsTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleChangeForGamma.hh"
#include "G4EmDataHandler.hh"
#include "G4EmParameters.hh"
class G4Step;
@@ -112,7 +94,7 @@ public:
protected:
virtual void StreamProcessInfo(std::ostream&, G4String) const {};
virtual void StreamProcessInfo(std::ostream&) const {};
virtual void InitialiseProcess(const G4ParticleDefinition*) = 0;
@@ -169,17 +151,17 @@ public:
// It returns the cross section per volume for energy/ material
G4double CrossSectionPerVolume(G4double kineticEnergy,
const G4MaterialCutsCouple* couple);
const G4MaterialCutsCouple* couple);
// It returns the cross section of the process per atom
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy,
G4double Z, G4double A=0.,
G4double cut=0.0);
G4double Z, G4double A=0.,
G4double cut=0.0);
G4double MeanFreePath(const G4Track& track);
// It returns cross section per volume
inline G4double GetLambda(G4double& kinEnergy,
inline G4double GetLambda(G4double kinEnergy,
const G4MaterialCutsCouple* couple);
//------------------------------------------------------------------------
@@ -215,12 +197,12 @@ public:
protected:
// Select model in run time
inline G4VEmModel* SelectModel(G4double& kinEnergy, size_t index);
inline G4VEmModel* SelectModel(G4double kinEnergy, size_t index);
public:
// Select model by energy and region index
inline G4VEmModel* SelectModelForMaterial(G4double kinEnergy,
size_t& idxRegion) const;
size_t idxRegion) const;
// Add model for region, smaller value of order defines which
// model will be selected for a given energy interval
@@ -259,11 +241,15 @@ public:
void ActivateSecondaryBiasing(const G4String& region, G4double factor,
G4double energyLimit);
inline void SetEmMasterProcess(const G4VEmProcess*);
inline void SetIntegral(G4bool val);
inline void SetBuildTableFlag(G4bool val);
inline void CurrentSetup(const G4MaterialCutsCouple*, G4double energy);
//------------------------------------------------------------------------
// Other generic methods
//------------------------------------------------------------------------
@@ -321,15 +307,15 @@ private:
void BuildLambdaTable();
void StreamInfo(std::ostream& outFile, const G4ParticleDefinition&,
G4String endOfLine=G4String("\n")) const;
G4bool rst=false) const;
void FindLambdaMax();
void PrintWarning(G4String tit, G4double val);
inline void DefineMaterial(const G4MaterialCutsCouple* couple);
void ComputeIntegralLambda(G4double kinEnergy);
inline void ComputeIntegralLambda(G4double kinEnergy);
inline void DefineMaterial(const G4MaterialCutsCouple* couple);
inline G4double GetLambdaFromTable(G4double kinEnergy);
@@ -345,8 +331,6 @@ private:
// ======== Parameters of the class fixed at construction =========
G4LossTableManager* lManager;
G4EmParameters* theParameters;
G4EmModelManager* modelManager;
const G4ParticleDefinition* thePositron;
const G4ParticleDefinition* secondaryParticle;
@@ -397,12 +381,17 @@ private:
protected:
G4LossTableManager* lManager;
G4EmParameters* theParameters;
G4EmBiasingManager* biasManager;
const G4ParticleDefinition* theGamma;
const G4ParticleDefinition* theElectron;
G4ParticleChangeForGamma fParticleChange;
std::vector<G4DynamicParticle*> secParticles;
const G4MaterialCutsCouple* currentCouple;
const G4Material* currentMaterial;
size_t currentCoupleIndex;
G4int mainSecondaries;
G4int secID;
@@ -410,8 +399,16 @@ protected:
G4int augerID;
G4int biasID;
G4bool isTheMaster;
G4double mfpKinEnergy;
G4double preStepKinEnergy;
G4double preStepLambda;
private:
const G4VEmProcess* masterProc;
G4EmDataHandler* theData;
G4VEmModel* currentModel;
const G4ParticleDefinition* particle;
@@ -419,13 +416,8 @@ private:
// cache
const G4Material* baseMaterial;
const G4Material* currentMaterial;
size_t currentCoupleIndex;
size_t basedCoupleIndex;
G4double mfpKinEnergy;
G4double preStepKinEnergy;
G4double preStepLambda;
G4double fFactor;
G4bool biasFlag;
G4bool weightFlag;
@@ -473,12 +465,13 @@ inline void G4VEmProcess::DefineMaterial(const G4MaterialCutsCouple* couple)
if(couple != currentCouple) {
currentCouple = couple;
currentMaterial = couple->GetMaterial();
baseMaterial = currentMaterial->GetBaseMaterial();
baseMaterial = (currentMaterial->GetBaseMaterial())
? currentMaterial->GetBaseMaterial() : currentMaterial;
currentCoupleIndex = couple->GetIndex();
basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
fFactor = biasFactor*(*theDensityFactor)[currentCoupleIndex];
if(!baseMaterial) { baseMaterial = currentMaterial; }
mfpKinEnergy = DBL_MAX;
preStepKinEnergy = 0.0;
idxLambda = idxLambdaPrim = 0;
}
}
@@ -486,7 +479,7 @@ inline void G4VEmProcess::DefineMaterial(const G4MaterialCutsCouple* couple)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline
G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy, size_t index)
G4VEmModel* G4VEmProcess::SelectModel(G4double kinEnergy, size_t index)
{
if(1 < numberOfModels) {
currentModel = modelManager->SelectModel(kinEnergy, index);
@@ -499,7 +492,7 @@ G4VEmModel* G4VEmProcess::SelectModel(G4double& kinEnergy, size_t index)
inline
G4VEmModel* G4VEmProcess::SelectModelForMaterial(G4double kinEnergy,
size_t& idxRegion) const
size_t idxRegion) const
{
return modelManager->SelectModel(kinEnergy, idxRegion);
}
@@ -530,21 +523,29 @@ inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e)
inline G4double G4VEmProcess::GetCurrentLambda(G4double e)
{
G4double x;
G4double x(0.0);
if(e >= minKinEnergyPrim) { x = GetLambdaFromTablePrim(e); }
else if(theLambdaTable) { x = GetLambdaFromTable(e); }
else { x = ComputeCurrentLambda(e); }
else if(currentModel) { x = ComputeCurrentLambda(e); }
return fFactor*x;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEmProcess::GetLambda(G4double& kinEnergy,
const G4MaterialCutsCouple* couple)
inline void
G4VEmProcess::CurrentSetup(const G4MaterialCutsCouple* couple, G4double energy)
{
DefineMaterial(couple);
SelectModel(kinEnergy, currentCoupleIndex);
SelectModel(energy, currentCoupleIndex);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEmProcess::GetLambda(G4double kinEnergy,
const G4MaterialCutsCouple* couple)
{
CurrentSetup(couple, kinEnergy);
return GetCurrentLambda(kinEnergy);
}
@@ -553,34 +554,10 @@ G4VEmProcess::GetLambda(G4double& kinEnergy,
inline G4double
G4VEmProcess::RecalculateLambda(G4double e, const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
SelectModel(e, currentCoupleIndex);
CurrentSetup(couple, e);
return fFactor*ComputeCurrentLambda(e);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmProcess::ComputeIntegralLambda(G4double e)
{
mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex];
if (e <= mfpKinEnergy) {
preStepLambda = GetCurrentLambda(e);
} else {
G4double e1 = e*lambdaFactor;
if(e1 > mfpKinEnergy) {
preStepLambda = GetCurrentLambda(e);
G4double preStepLambda1 = GetCurrentLambda(e1);
if(preStepLambda1 > preStepLambda) {
mfpKinEnergy = e1;
preStepLambda = preStepLambda1;
}
} else {
preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex];
}
}
}
// ======== Get/Set inline methods used at initialisation ================
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -727,4 +704,11 @@ inline const G4VEmModel* G4VEmProcess::GetCurrentModel() const
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEmProcess::SetEmMasterProcess(const G4VEmProcess* ptr)
{
masterProc = ptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -23,8 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VEnergyLossProcess.hh 106714 2017-10-20 09:38:06Z gcosmo $
// GEANT4 tag $Name:
//
// -------------------------------------------------------------------
//
@@ -37,48 +35,7 @@
//
// Creation date: 03.01.2002
//
// Modifications:
//
// 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
// 20-01-03 Migrade to cut per region (V.Ivanchenko)
// 24-01-03 Make models region aware (V.Ivanchenko)
// 05-02-03 Fix compilation warnings (V.Ivanchenko)
// 13-02-03 SubCutoffProcessors defined for regions (V.Ivanchenko)
// 17-02-03 Fix problem of store/restore tables (V.Ivanchenko)
// 26-02-03 Region dependent step limit (V.Ivanchenko)
// 26-03-03 Add GetDEDXDispersion (V.Ivanchenko)
// 09-04-03 Fix problem of negative range limit for non integral (V.Ivanchenko)
// 13-05-03 Add calculation of precise range (V.Ivanchenko)
// 21-07-03 Add UpdateEmModel method (V.Ivanchenko)
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
// 14-01-04 Activate precise range calculation (V.Ivanchenko)
// 10-03-04 Fix problem of step limit calculation (V.Ivanchenko)
// 30-06-04 make destructor virtual (V.Ivanchenko)
// 05-07-04 fix problem of GenericIons seen at small cuts (V.Ivanchenko)
// 03-08-04 Add DEDX table to all processes for control on integral range(VI)
// 06-08-04 Clear up names of member functions (V.Ivanchenko)
// 27-08-04 Add NeedBuildTables method (V.Ivanchneko)
// 09-09-04 Bug fix for the integral mode with 2 peaks (V.Ivanchneko)
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivanchenko)
// 08-04-05 Major optimisation of internal interfaces (V.Ivanchenko)
// 11-04-05 Use MaxSecondaryEnergy from a model (V.Ivanchenko)
// 10-01-05 Remove SetStepLimits (V.Ivanchenko)
// 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
// 13-01-06 Remove AddSubCutSecondaries and cleanup (V.Ivantchenko)
// 20-01-06 Introduce G4EmTableType and reducing number of methods (VI)
// 26-01-06 Add public method GetCSDARange (V.Ivanchenko)
// 22-03-06 Add SetDynamicMassCharge (V.Ivanchenko)
// 23-03-06 Use isIonisation flag (V.Ivanchenko)
// 13-05-06 Add method to access model by index (V.Ivanchenko)
// 14-01-07 add SetEmModel(index) and SetFluctModel() (mma)
// 15-01-07 Add separate ionisation tables and reorganise get/set methods for
// dedx tables (V.Ivanchenko)
// 13-03-07 use SafetyHelper instead of navigator (V.Ivanchenko)
// 27-07-07 use stl vector for emModels instead of C-array (V.Ivanchenko)
// 25-09-07 More accurate handling zero xsect in
// PostStepGetPhysicalInteractionLength (V.Ivanchenko)
// 27-10-07 Virtual functions moved to source (V.Ivanchenko)
// 15-07-08 Reorder class members for further multi-thread development (VI)
// Modifications: Vladimir Ivanchenko
//
// Class Description:
//
@@ -148,7 +105,7 @@ public:
protected:
virtual void StreamProcessInfo(std::ostream&, G4String) const {};
virtual void StreamProcessInfo(std::ostream&) const {};
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
const G4ParticleDefinition*) = 0;
@@ -226,7 +183,7 @@ private:
// summary printout after initialisation
void StreamInfo(std::ostream& out, const G4ParticleDefinition& part,
G4String endOfLine=G4String("\n")) const;
G4bool rst=false) const;
// store a table
G4bool StoreTable(const G4ParticleDefinition* p,
@@ -408,19 +365,19 @@ public:
inline G4double CrossSectionBiasingFactor() const;
// Return values for given G4MaterialCutsCouple
inline G4double GetDEDX(G4double& kineticEnergy,
inline G4double GetDEDX(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4double GetDEDXForSubsec(G4double& kineticEnergy,
inline G4double GetDEDXForSubsec(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4double GetRange(G4double& kineticEnergy,
inline G4double GetRange(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4double GetCSDARange(G4double& kineticEnergy,
inline G4double GetCSDARange(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4double GetRangeForLoss(G4double& kineticEnergy,
inline G4double GetRangeForLoss(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4double GetKineticEnergy(G4double& range,
inline G4double GetKineticEnergy(G4double range,
const G4MaterialCutsCouple*);
inline G4double GetLambda(G4double& kineticEnergy,
inline G4double GetLambda(G4double kineticEnergy,
const G4MaterialCutsCouple*);
inline G4bool TablesAreBuilt() const;
@@ -469,7 +426,7 @@ private:
inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy);
inline G4double ScaledKinEnergyForLoss(G4double range);
inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy);
inline void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy);
void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy);
// hide assignment operator
G4VEnergyLossProcess(G4VEnergyLossProcess &) = delete;
@@ -575,7 +532,18 @@ private:
protected:
G4ParticleChangeForLoss fParticleChange;
G4ParticleChangeForLoss fParticleChange;
const G4Material* currentMaterial;
const G4MaterialCutsCouple* currentCouple;
size_t currentCoupleIndex;
G4double preStepLambda;
G4double fRange;
G4double computedRange;
G4double preStepKinEnergy;
G4double preStepScaledEnergy;
G4double preStepRangeEnergy;
G4double mfpKinEnergy;
// ======== Cached values - may be state dependent ================
@@ -587,9 +555,6 @@ private:
const G4ParticleDefinition* particle;
G4VEmModel* currentModel;
const G4Material* currentMaterial;
const G4MaterialCutsCouple* currentCouple;
size_t currentCoupleIndex;
size_t basedCoupleIndex;
size_t lastIdx;
@@ -598,14 +563,6 @@ private:
G4double reduceFactor;
G4double chargeSqRatio;
G4double preStepLambda;
G4double fRange;
G4double computedRange;
G4double preStepKinEnergy;
G4double preStepScaledEnergy;
G4double preStepRangeEnergy;
G4double mfpKinEnergy;
G4GPILSelection aGPILSelection;
G4int secID;
@@ -774,7 +731,7 @@ inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy,
G4VEnergyLossProcess::GetDEDX(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
@@ -784,7 +741,7 @@ G4VEnergyLossProcess::GetDEDX(G4double& kineticEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy,
G4VEnergyLossProcess::GetDEDXForSubsec(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
@@ -794,7 +751,7 @@ G4VEnergyLossProcess::GetDEDXForSubsec(G4double& kineticEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetRange(G4double& kineticEnergy,
G4VEnergyLossProcess::GetRange(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
G4double x = fRange;
@@ -811,7 +768,7 @@ G4VEnergyLossProcess::GetRange(G4double& kineticEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy,
G4VEnergyLossProcess::GetCSDARange(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
@@ -823,7 +780,7 @@ G4VEnergyLossProcess::GetCSDARange(G4double& kineticEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy,
G4VEnergyLossProcess::GetRangeForLoss(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
// G4cout << "GetRangeForLoss: Range from " << GetProcessName() << G4endl;
@@ -834,7 +791,7 @@ G4VEnergyLossProcess::GetRangeForLoss(G4double& kineticEnergy,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetKineticEnergy(G4double& range,
G4VEnergyLossProcess::GetKineticEnergy(G4double range,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
@@ -844,36 +801,13 @@ G4VEnergyLossProcess::GetKineticEnergy(G4double& range,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline G4double
G4VEnergyLossProcess::GetLambda(G4double& kineticEnergy,
G4VEnergyLossProcess::GetLambda(G4double kineticEnergy,
const G4MaterialCutsCouple* couple)
{
DefineMaterial(couple);
return theLambdaTable ? GetLambdaForScaledEnergy(kineticEnergy*massRatio) : 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
inline void G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(G4double e)
{
mfpKinEnergy = theEnergyOfCrossSectionMax[currentCoupleIndex];
if (e <= mfpKinEnergy) {
preStepLambda = GetLambdaForScaledEnergy(e);
} else {
G4double e1 = e*lambdaFactor;
if(e1 > mfpKinEnergy) {
preStepLambda = GetLambdaForScaledEnergy(e);
G4double preStepLambda1 = GetLambdaForScaledEnergy(e1);
if(preStepLambda1 > preStepLambda) {
mfpKinEnergy = e1;
preStepLambda = preStepLambda1;
}
} else {
preStepLambda = fFactor*theCrossSectionMax[currentCoupleIndex];
}
}
}
// ======== Get/Set inline methods used at initialisation ================
inline void G4VEnergyLossProcess::SetFluctModel(G4VEmFluctuationModel* p)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VMscModel.hh 110572 2018-05-30 13:08:12Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VMultipleScattering.hh 106714 2017-10-20 09:38:06Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -113,7 +112,7 @@ protected:
virtual void InitialiseProcess(const G4ParticleDefinition*) = 0;
virtual void StreamProcessInfo(std::ostream&, G4String) const {};
virtual void StreamProcessInfo(std::ostream&) const {};
public:
@@ -253,7 +252,7 @@ private:
// Print out of generic class parameters
void StreamInfo(std::ostream& outFile, const G4ParticleDefinition&,
G4String endOfLine=G4String("\n")) const;
G4bool rst=false) const;
// ======== Parameters of the class fixed at construction =========
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VSubCutProducer.hh 73844 2013-09-13 14:16:30Z vnivanch $
//
// -------------------------------------------------------------------
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ionEffectiveCharge.hh 108386 2018-02-09 15:38:32Z gcosmo $
//
// -------------------------------------------------------------------
//