Import Geant4 10.7.0 source tree
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ class G4AdjointProcessEquivalentToDirectProcess : public G4VProcess
|
||||
// (return true if the Physics Table can be build by using file)
|
||||
// (return false if the process has no functionality or in case of failure)
|
||||
// File name should be defined by each process
|
||||
// and the file should be placed under the directory specifed by the argument.
|
||||
// and the file should be placed under the directory specified by the argument.
|
||||
////////////////////////////
|
||||
virtual void StartTracking(G4Track*);
|
||||
virtual void EndTracking();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emadjoint
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,37 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/adjoint/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emadjoint
|
||||
HEADERS
|
||||
G4AdjointAlongStepWeightCorrection.hh
|
||||
|
||||
@@ -14,6 +14,23 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------*
|
||||
|
||||
29-10-2020, G.Cosmo, tag emdna-V10-06-12
|
||||
- Fix thread contention on mutable data in G4DNAMolecularMaterial; might
|
||||
help resolving observed crashes in MT runs.
|
||||
Some code cleanup.
|
||||
|
||||
27-10-2020, V.Ivanchenko, tag emdna-V10-06-11
|
||||
- G4DNAMolecularMaterial - removed commented lines
|
||||
- History file fixed
|
||||
|
||||
25-10-2020, V.Ivanchenko, tag emdna-V10-06-10
|
||||
- G4DNAMolecularMaterial - attempt to fix nightly problems
|
||||
in chem6 example - do not delete instance of the singleton
|
||||
|
||||
24-10-2020, I. Hrivnacova, tag emdna-V10-06-09
|
||||
- Added dependency on analysis/g4tools in GNUmakefile,
|
||||
required after analysis update (analysis-V10-06-05)
|
||||
|
||||
12-06-2020, S.Incerti, W.G.Shin, tag emdna-V10-06-08
|
||||
- Fixed coverity warning
|
||||
|
||||
@@ -1052,7 +1069,7 @@ when the asked item is not found
|
||||
* G4KDMap added
|
||||
* G4DNASmoluchowskiReactionModel : exception description enhanced
|
||||
* G4ITTrackingInteractivity : "Initialize()" method added for simplify
|
||||
intialization of daughter classes
|
||||
initialization of daughter classes
|
||||
* G4DNAChemistryManager : AddEmptyLineInOuputFile method added
|
||||
|
||||
12-11-2012 M.K tag emdna-V09-05-35
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
// If both parents are not killed therefore
|
||||
// we can used the particle change
|
||||
// you will have to give the pointers
|
||||
// of your particleChange while intializing
|
||||
// of your particleChange while initializing
|
||||
// but it might tell you that energy is not
|
||||
// conserved for instance
|
||||
G4VParticleChange* GetParticleChange(const G4Track*);
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ G4ITTransportationManager::GetActiveNavigatorsIterator()
|
||||
// ----------------------------------------------------------------------------
|
||||
// GetNoWorlds()
|
||||
//
|
||||
// Return the number of registerd worlds.
|
||||
// Return the number of registered worlds.
|
||||
//
|
||||
inline
|
||||
size_t G4ITTransportationManager::GetNoWorlds() const
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,29 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-man
|
||||
HEADERS
|
||||
AddClone_def.hh
|
||||
|
||||
@@ -254,7 +254,7 @@ fVerbose
|
||||
" current global time."
|
||||
<< " This may cause synchronization problem. If the process you"
|
||||
" are using required "
|
||||
<< "such feature please contact the developpers." << G4endl
|
||||
<< "such feature please contact the developers." << G4endl
|
||||
<< "The global time in the step manager : "
|
||||
<< G4BestUnit(fGlobalTime, "Time")
|
||||
<< G4endl
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,38 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/types/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-models
|
||||
HEADERS
|
||||
G4DNABornAngle.hh
|
||||
@@ -84,7 +55,7 @@ GEANT4_DEFINE_MODULE(NAME G4emdna-models
|
||||
G4DNAPTBIonisationModel.hh
|
||||
G4DNAPTBElasticModel.hh
|
||||
G4DNAPTBExcitationModel.hh
|
||||
G4DNAPTBAugerModel.hh
|
||||
G4DNAPTBAugerModel.hh
|
||||
G4DNAScreenedRutherfordElasticModel.hh
|
||||
G4DNATransformElectronModel.hh
|
||||
G4DNAUeharaScreenedRutherfordElasticModel.hh
|
||||
|
||||
@@ -1174,7 +1174,7 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
nrjTransf21,
|
||||
nrjTransf22);
|
||||
|
||||
// zeros are explicitely set
|
||||
// zeros are explicitly set
|
||||
|
||||
G4double value = Interpolate(valueK1, valueK2, k, 0., interpolatedvalue2);
|
||||
|
||||
@@ -1289,7 +1289,7 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
nrjTransf21,
|
||||
nrjTransf22);
|
||||
|
||||
// zeros are explicitely set
|
||||
// zeros are explicitly set
|
||||
|
||||
G4double value = Interpolate(valueK1, valueK2, k, 0., interpolatedvalue2);
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ void G4DNABornIonisationModel2::Initialise(const G4ParticleDefinition* particle,
|
||||
"for particle "
|
||||
<< particle->GetParticleName()
|
||||
<< G4endl;
|
||||
description << "G4DNABornIonisationModel2 was already initiliased "
|
||||
description << "G4DNABornIonisationModel2 was already initialised "
|
||||
"for particle:" << fParticleDef->GetParticleName() << G4endl;
|
||||
G4Exception("G4DNABornIonisationModel2::Initialise","bornIonInit",
|
||||
FatalException,description);
|
||||
|
||||
@@ -979,7 +979,7 @@ G4double G4DNACPA100IonisationModel::RandomTransferedEnergy
|
||||
|
||||
G4double interpolatedvalue2 = Interpolate(valuePROB21, valuePROB22, random, nrjTransf21, nrjTransf22);
|
||||
|
||||
// zero is explicitely set
|
||||
// zero is explicitly set
|
||||
|
||||
G4double value = Interpolate(valueK1, valueK2, k, 0., interpolatedvalue2);
|
||||
|
||||
|
||||
Executable → Regular
@@ -934,7 +934,7 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
|
||||
G4double interpolatedvalue2 = Interpolate(valuePROB21, valuePROB22, random, nrjTransf21, nrjTransf22);
|
||||
|
||||
// zeros are explicitely set
|
||||
// zeros are explicitly set
|
||||
|
||||
G4double value = Interpolate(valueK1, valueK2, k, 0., interpolatedvalue2);
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
+1
-1
@@ -239,7 +239,7 @@ public:
|
||||
* For the time being, we will consider only one diffusion
|
||||
* coefficient for the all simulation => diffusion in one medium only
|
||||
* If the user needs to use the diffusion in different materials,
|
||||
* she/he should contact the developpers/mainteners of this package
|
||||
* she/he should contact the developers/maintainers of this package
|
||||
*/
|
||||
inline void SetDiffusionCoefficient(G4double);
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,24 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-molman
|
||||
HEADERS
|
||||
G4FakeParticleID.hh
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,23 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/management/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-moltypes
|
||||
HEADERS
|
||||
G4Electron_aq.hh
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,41 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/models/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/types/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-processes
|
||||
HEADERS
|
||||
G4DNAAttachment.hh
|
||||
|
||||
@@ -93,7 +93,7 @@ void G4DNAElastic::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
AddEmModel(1, EmModel());
|
||||
}
|
||||
|
||||
// "alpha" must be explicitely used, not alpha++
|
||||
// "alpha" must be explicitly used, not alpha++
|
||||
else if(name == "helium" || name == "alpha" || name == "alpha+")
|
||||
{
|
||||
if(!EmModel())
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -33,6 +33,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/dna/molecules/management/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/dna/molecules/types/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/dna/management/include \
|
||||
-I$(G4BASE)/analysis/g4tools/include \
|
||||
-I$(G4BASE)/analysis/management/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -65,7 +65,7 @@ struct CompareMaterial
|
||||
bool operator()(const G4Material* mat1, const G4Material* mat2) const;
|
||||
};
|
||||
|
||||
typedef std::map<const G4Material*, double, CompareMaterial> ComponentMap;
|
||||
typedef std::map<const G4Material*, G4double, CompareMaterial> ComponentMap;
|
||||
|
||||
/**
|
||||
* \class G4DNAMolecularMaterial
|
||||
@@ -96,7 +96,6 @@ class G4DNAMolecularMaterial: public G4VStateDependent
|
||||
{
|
||||
public:
|
||||
static G4DNAMolecularMaterial* Instance();
|
||||
static void DeleteInstance();
|
||||
void Initialize();
|
||||
void Clear();
|
||||
|
||||
@@ -105,7 +104,7 @@ public:
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* \fn const std::vector<double>* \
|
||||
* \fn const std::vector<G4double>* \
|
||||
* GetDensityTableFor(const G4Material* searchedMaterial) const
|
||||
* \brief Retrieve a table of volumetric mass densities (mass per unit volume)
|
||||
* in the G4 unit system for chosen material.
|
||||
@@ -120,10 +119,10 @@ public:
|
||||
* indexed on the (parent) material index.
|
||||
*
|
||||
*/
|
||||
const std::vector<double>* GetDensityTableFor(const G4Material*) const;
|
||||
const std::vector<G4double>* GetDensityTableFor(const G4Material*) const;
|
||||
|
||||
/**
|
||||
* \fn const std::vector<double>* \
|
||||
* \fn const std::vector<G4double>* \
|
||||
* GetNumMolPerVolTableFor(const G4Material* searchedMaterial) const
|
||||
* \brief Retrieve a table of molecular densities (number of molecules per
|
||||
* unit volume) in the G4 unit system for chosen material.
|
||||
@@ -137,7 +136,7 @@ public:
|
||||
* Pointer to a table of molecular densities for the \p searchedMaterial
|
||||
* indexed on the (parent) material index.
|
||||
*/
|
||||
const std::vector<double>* GetNumMolPerVolTableFor(const G4Material*) const;
|
||||
const std::vector<G4double>* GetNumMolPerVolTableFor(const G4Material*) const;
|
||||
|
||||
inline const std::vector<ComponentMap>* GetMassFractionTable() const{
|
||||
return fpCompFractionTable;
|
||||
@@ -233,9 +232,9 @@ protected:
|
||||
G4double fraction);
|
||||
void SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* material,
|
||||
double currentFraction);
|
||||
G4double currentFraction);
|
||||
|
||||
void AddMaterial(const G4Material*, double fraction);
|
||||
void AddMaterial(const G4Material*, G4double fraction);
|
||||
|
||||
void PrintNotAMolecularMaterial(const char* methodName,
|
||||
const G4Material* lookForMaterial) const;
|
||||
@@ -245,9 +244,9 @@ protected:
|
||||
std::vector<ComponentMap>* fpCompDensityTable;
|
||||
std::vector<ComponentMap>* fpCompNumMolPerVolTable;
|
||||
|
||||
mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
|
||||
mutable std::map<const G4Material*, std::vector<G4double>*, CompareMaterial>
|
||||
fAskedDensityTable;
|
||||
mutable std::map<const G4Material*, std::vector<double>*, CompareMaterial>
|
||||
mutable std::map<const G4Material*, std::vector<G4double>*, CompareMaterial>
|
||||
fAskedNumPerVolTable;
|
||||
mutable std::map<const G4Material*, bool, CompareMaterial> fWarningPrinted;
|
||||
|
||||
|
||||
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,39 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/types/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include) # for physchemIO
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emdna-utils
|
||||
HEADERS
|
||||
G4DNAChemistryManager.hh
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
// Author: Mathieu Karamitros
|
||||
//
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "G4DNAMolecularMaterial.hh"
|
||||
#include "G4Material.hh"
|
||||
#include <utility>
|
||||
#include "G4StateManager.hh"
|
||||
#include "G4Threading.hh"
|
||||
#include "G4AutoLock.hh"
|
||||
@@ -38,35 +39,39 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4DNAMolecularMaterial* G4DNAMolecularMaterial::fInstance(0);
|
||||
G4Mutex aMutex = G4MUTEX_INITIALIZER;
|
||||
G4DNAMolecularMaterial* G4DNAMolecularMaterial::fInstance(nullptr);
|
||||
|
||||
namespace
|
||||
{
|
||||
G4Mutex aMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
bool CompareMaterial::operator()(const G4Material* mat1,
|
||||
const G4Material* mat2) const
|
||||
{
|
||||
if (mat1 == 0 && mat2 == 0) return false; //(mat1 == mat2)
|
||||
if (mat1 == 0) return true; // mat1 < mat2
|
||||
if (mat2 == 0) return false; //mat2 < mat1
|
||||
if (mat1 == nullptr && mat2 == nullptr) return false; //(mat1 == mat2)
|
||||
if (mat1 == nullptr) return true; // mat1 < mat2
|
||||
if (mat2 == nullptr) return false; //mat2 < mat1
|
||||
|
||||
const G4Material* baseMat1 = mat1->GetBaseMaterial();
|
||||
const G4Material* baseMat2 = mat2->GetBaseMaterial();
|
||||
|
||||
if ((baseMat1 || baseMat2) == 0){
|
||||
if (((baseMat1 != nullptr) || (baseMat2 != nullptr)) == false){
|
||||
// None of the materials derives from a base material
|
||||
return mat1 < mat2;
|
||||
}
|
||||
else if (baseMat1 && baseMat2){
|
||||
else if ((baseMat1 != nullptr) && (baseMat2 != nullptr)){
|
||||
// Both materials derive from a base material
|
||||
return baseMat1 < baseMat2;
|
||||
}
|
||||
|
||||
else if (baseMat1 && (baseMat2 == 0)){
|
||||
else if ((baseMat1 != nullptr) && (baseMat2 == nullptr)){
|
||||
// Only the material 1 derives from a base material
|
||||
return baseMat1 < mat2;
|
||||
}
|
||||
// only case baseMat1==0 && baseMat2 remains
|
||||
// only case baseMat1==nullptr && baseMat2 remains
|
||||
return mat1 < baseMat2;
|
||||
}
|
||||
|
||||
@@ -74,77 +79,67 @@ bool CompareMaterial::operator()(const G4Material* mat1,
|
||||
|
||||
G4DNAMolecularMaterial* G4DNAMolecularMaterial::Instance()
|
||||
{
|
||||
if (!fInstance) new G4DNAMolecularMaterial();
|
||||
if (!fInstance) fInstance = new G4DNAMolecularMaterial();
|
||||
return fInstance;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAMolecularMaterial::DeleteInstance()
|
||||
{
|
||||
if (fInstance){
|
||||
delete fInstance;
|
||||
fInstance = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAMolecularMaterial::Create()
|
||||
{
|
||||
fpCompFractionTable = 0;
|
||||
fpCompDensityTable = 0;
|
||||
fpCompNumMolPerVolTable = 0;
|
||||
fpCompFractionTable = nullptr;
|
||||
fpCompDensityTable = nullptr;
|
||||
fpCompNumMolPerVolTable = nullptr;
|
||||
fIsInitialized = false;
|
||||
fNMaterials = 0;
|
||||
fInstance = this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAMolecularMaterial::Clear()
|
||||
{
|
||||
if (fpCompFractionTable){
|
||||
G4AutoLock l2(&aMutex);
|
||||
if (fpCompFractionTable != nullptr){
|
||||
fpCompFractionTable->clear();
|
||||
delete fpCompFractionTable;
|
||||
fpCompFractionTable = 0;
|
||||
fpCompFractionTable = nullptr;
|
||||
}
|
||||
if (fpCompDensityTable){
|
||||
if (fpCompDensityTable != nullptr){
|
||||
fpCompDensityTable->clear();
|
||||
delete fpCompDensityTable;
|
||||
fpCompDensityTable = 0;
|
||||
fpCompDensityTable = nullptr;
|
||||
}
|
||||
if (fpCompNumMolPerVolTable){
|
||||
if (fpCompNumMolPerVolTable != nullptr){
|
||||
fpCompNumMolPerVolTable->clear();
|
||||
delete fpCompNumMolPerVolTable;
|
||||
fpCompNumMolPerVolTable = 0;
|
||||
fpCompNumMolPerVolTable = nullptr;
|
||||
}
|
||||
|
||||
map<const G4Material*, std::vector<double>*, CompareMaterial>::iterator it;
|
||||
std::map<const G4Material*, std::vector<G4double>*, CompareMaterial>::iterator it;
|
||||
|
||||
for (it = fAskedDensityTable.begin(); it != fAskedDensityTable.end(); it++){
|
||||
if (it->second){
|
||||
for (it = fAskedDensityTable.begin(); it != fAskedDensityTable.end(); ++it){
|
||||
if (it->second != nullptr){
|
||||
delete it->second;
|
||||
it->second = 0;
|
||||
it->second = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
for (it = fAskedNumPerVolTable.begin(); it != fAskedNumPerVolTable.end();
|
||||
it++){
|
||||
if (it->second){
|
||||
for (it = fAskedNumPerVolTable.begin(); it != fAskedNumPerVolTable.end(); ++it){
|
||||
if (it->second != nullptr){
|
||||
delete it->second;
|
||||
it->second = 0;
|
||||
it->second = nullptr;
|
||||
}
|
||||
}
|
||||
l2.unlock();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
G4DNAMolecularMaterial::G4DNAMolecularMaterial() :
|
||||
G4VStateDependent()
|
||||
{
|
||||
Create();
|
||||
fInstance = this;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -155,12 +150,6 @@ G4bool G4DNAMolecularMaterial::Notify(G4ApplicationState requestedState)
|
||||
->GetPreviousState() == G4State_PreInit){
|
||||
Initialize();
|
||||
}
|
||||
else if (requestedState == G4State_Quit){
|
||||
// G4cout << "G4DNAMolecularMaterial::Notify ---> received G4State_Quit"
|
||||
// << G4endl;
|
||||
Clear();
|
||||
//DeleteInstance();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -187,17 +176,13 @@ G4DNAMolecularMaterial::operator=(const G4DNAMolecularMaterial& rhs)
|
||||
|
||||
G4DNAMolecularMaterial::~G4DNAMolecularMaterial()
|
||||
{
|
||||
// G4cout << "Deleting G4DNAMolecularMaterial" << G4endl;
|
||||
Clear();
|
||||
fInstance = 0;
|
||||
//assert(G4StateManager::GetStateManager()->DeregisterDependent(this) == true);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void G4DNAMolecularMaterial::Initialize()
|
||||
{
|
||||
G4AutoLock l(&aMutex);
|
||||
if (fIsInitialized){
|
||||
return;
|
||||
}
|
||||
@@ -208,21 +193,21 @@ void G4DNAMolecularMaterial::Initialize()
|
||||
// This is to prevent segment fault if materials are created later on
|
||||
// Actually this creation should not be done
|
||||
|
||||
if (fpCompFractionTable == 0){
|
||||
G4AutoLock l1(&aMutex);
|
||||
if (fpCompFractionTable == nullptr){
|
||||
fpCompFractionTable = new vector<ComponentMap>(materialTable->size());
|
||||
}
|
||||
|
||||
G4Material* mat(0);
|
||||
G4Material* mat(nullptr);
|
||||
|
||||
for (size_t i = 0; i < fNMaterials; i++){
|
||||
for (std::size_t i = 0; i < fNMaterials; ++i){
|
||||
mat = materialTable->at(i);
|
||||
SearchMolecularMaterial(mat, mat, 1);
|
||||
|
||||
mat = 0;
|
||||
}
|
||||
|
||||
InitializeDensity();
|
||||
InitializeNumMolPerVol();
|
||||
l1.unlock();
|
||||
|
||||
fIsInitialized = true;
|
||||
}
|
||||
@@ -237,23 +222,23 @@ void G4DNAMolecularMaterial::InitializeDensity()
|
||||
G4Material::GetMaterialTable()->size());
|
||||
|
||||
G4Material* parentMat;
|
||||
const G4Material* compMat(0);
|
||||
double massFraction = -1;
|
||||
double parentDensity = -1;
|
||||
const G4Material* compMat(nullptr);
|
||||
G4double massFraction = -1;
|
||||
G4double parentDensity = -1;
|
||||
|
||||
for (size_t i = 0; i < fNMaterials; i++){
|
||||
for (std::size_t i = 0; i < fNMaterials; ++i){
|
||||
parentMat = materialTable->at(i);
|
||||
ComponentMap& massFractionComp = (*fpCompFractionTable)[i];
|
||||
ComponentMap& densityComp = (*fpCompDensityTable)[i];
|
||||
|
||||
parentDensity = parentMat->GetDensity();
|
||||
|
||||
for (ComponentMap::iterator it = massFractionComp.begin();
|
||||
it != massFractionComp.end(); it++){
|
||||
for (auto it = massFractionComp.cbegin();
|
||||
it != massFractionComp.cend(); ++it){
|
||||
compMat = it->first;
|
||||
massFraction = it->second;
|
||||
densityComp[compMat] = massFraction * parentDensity;
|
||||
compMat = 0;
|
||||
compMat = nullptr;
|
||||
massFraction = -1;
|
||||
}
|
||||
}
|
||||
@@ -275,19 +260,19 @@ void G4DNAMolecularMaterial::InitializeNumMolPerVol()
|
||||
if (fpCompDensityTable){
|
||||
fpCompNumMolPerVolTable = new vector<ComponentMap>(fNMaterials);
|
||||
|
||||
const G4Material* compMat(0);
|
||||
const G4Material* compMat(nullptr);
|
||||
|
||||
for (size_t i = 0; i < fNMaterials; i++){
|
||||
for (std::size_t i = 0; i < fNMaterials; ++i){
|
||||
ComponentMap& massFractionComp = (*fpCompFractionTable)[i];
|
||||
ComponentMap& densityComp = (*fpCompDensityTable)[i];
|
||||
ComponentMap& numMolPerVol = (*fpCompNumMolPerVolTable)[i];
|
||||
|
||||
for (ComponentMap::iterator it = massFractionComp.begin();
|
||||
it != massFractionComp.end(); it++){
|
||||
for (auto it = massFractionComp.cbegin();
|
||||
it != massFractionComp.cend(); ++it){
|
||||
compMat = it->first;
|
||||
numMolPerVol[compMat] = densityComp[compMat]
|
||||
/ compMat->GetMassOfMolecule();
|
||||
compMat = 0;
|
||||
compMat = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,9 +301,9 @@ G4DNAMolecularMaterial::RecordMolecularMaterial(G4Material* parentMaterial,
|
||||
return;
|
||||
}
|
||||
|
||||
ComponentMap::iterator it = matComponent.find(molecularMaterial);
|
||||
auto it = matComponent.find(molecularMaterial);
|
||||
|
||||
if (it == matComponent.end()){
|
||||
if (it == matComponent.cend()){
|
||||
matComponent[molecularMaterial] = fraction;
|
||||
}
|
||||
else{
|
||||
@@ -331,7 +316,7 @@ G4DNAMolecularMaterial::RecordMolecularMaterial(G4Material* parentMaterial,
|
||||
|
||||
void G4DNAMolecularMaterial::SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* material,
|
||||
double currentFraction)
|
||||
G4double currentFraction)
|
||||
{
|
||||
if (material->GetMassOfMolecule() != 0.0){ // is a molecular material
|
||||
RecordMolecularMaterial(parentMaterial, material, currentFraction);
|
||||
@@ -341,9 +326,9 @@ void G4DNAMolecularMaterial::SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
G4Material* compMat(nullptr);
|
||||
G4double fraction = -1.;
|
||||
std::map<G4Material*, G4double> matComponent = material->GetMatComponents();
|
||||
std::map<G4Material*, G4double>::iterator it = matComponent.begin();
|
||||
auto it = matComponent.cbegin();
|
||||
|
||||
for (; it != matComponent.end(); it++){
|
||||
for (; it != matComponent.cend(); ++it){
|
||||
compMat = it->first;
|
||||
fraction = it->second;
|
||||
if (compMat->GetMassOfMolecule() == 0.0){ // is not a molecular material
|
||||
@@ -359,7 +344,7 @@ void G4DNAMolecularMaterial::SearchMolecularMaterial(G4Material* parentMaterial,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const std::vector<double>*
|
||||
const std::vector<G4double>*
|
||||
G4DNAMolecularMaterial::
|
||||
GetDensityTableFor(const G4Material* lookForMaterial) const
|
||||
{
|
||||
@@ -390,28 +375,26 @@ GetDensityTableFor(const G4Material* lookForMaterial) const
|
||||
}
|
||||
}
|
||||
|
||||
std::map<const G4Material*, std::vector<double>*, CompareMaterial>::
|
||||
const_iterator it_askedDensityTable =
|
||||
fAskedDensityTable.find(lookForMaterial);
|
||||
auto it_askedDensityTable = fAskedDensityTable.find(lookForMaterial);
|
||||
|
||||
if (it_askedDensityTable != fAskedDensityTable.end()){
|
||||
if (it_askedDensityTable != fAskedDensityTable.cend()){
|
||||
return it_askedDensityTable->second;
|
||||
}
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
|
||||
std::vector<double>* output = new std::vector<double>(materialTable->size());
|
||||
std::vector<G4double>* output = new std::vector<G4double>(materialTable->size());
|
||||
|
||||
ComponentMap::const_iterator it;
|
||||
|
||||
G4bool materialWasNotFound = true;
|
||||
|
||||
for (size_t i = 0; i < fNMaterials; i++){
|
||||
for (std::size_t i = 0; i < fNMaterials; ++i){
|
||||
ComponentMap& densityTable = (*fpCompDensityTable)[i];
|
||||
|
||||
it = densityTable.find(lookForMaterial);
|
||||
|
||||
if (it == densityTable.end()){
|
||||
if (it == densityTable.cend()){
|
||||
(*output)[i] = 0.0;
|
||||
}
|
||||
else{
|
||||
@@ -432,10 +415,10 @@ GetDensityTableFor(const G4Material* lookForMaterial) const
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const std::vector<double>* G4DNAMolecularMaterial::GetNumMolPerVolTableFor(
|
||||
const std::vector<G4double>* G4DNAMolecularMaterial::GetNumMolPerVolTableFor(
|
||||
const G4Material* lookForMaterial) const
|
||||
{
|
||||
if(lookForMaterial==0) return nullptr;
|
||||
if(lookForMaterial==nullptr) return nullptr;
|
||||
|
||||
if (!fpCompNumMolPerVolTable){
|
||||
if (fIsInitialized){
|
||||
@@ -464,27 +447,25 @@ const std::vector<double>* G4DNAMolecularMaterial::GetNumMolPerVolTableFor(
|
||||
}
|
||||
}
|
||||
|
||||
std::map<const G4Material*, std::vector<double>*, CompareMaterial>::
|
||||
const_iterator it_askedNumMolPerVolTable =
|
||||
fAskedNumPerVolTable.find(lookForMaterial);
|
||||
if (it_askedNumMolPerVolTable != fAskedNumPerVolTable.end()){
|
||||
auto it_askedNumMolPerVolTable = fAskedNumPerVolTable.find(lookForMaterial);
|
||||
if (it_askedNumMolPerVolTable != fAskedNumPerVolTable.cend()){
|
||||
return it_askedNumMolPerVolTable->second;
|
||||
}
|
||||
|
||||
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
|
||||
|
||||
std::vector<double>* output = new std::vector<double>(materialTable->size());
|
||||
std::vector<G4double>* output = new std::vector<G4double>(materialTable->size());
|
||||
|
||||
ComponentMap::const_iterator it;
|
||||
|
||||
G4bool materialWasNotFound = true;
|
||||
|
||||
for (size_t i = 0; i < fNMaterials; i++){
|
||||
for (std::size_t i = 0; i < fNMaterials; ++i){
|
||||
ComponentMap& densityTable = (*fpCompNumMolPerVolTable)[i];
|
||||
|
||||
it = densityTable.find(lookForMaterial);
|
||||
|
||||
if (it == densityTable.end()){
|
||||
if (it == densityTable.cend()){
|
||||
(*output)[i] = 0.0;
|
||||
}
|
||||
else{
|
||||
@@ -509,10 +490,9 @@ void G4DNAMolecularMaterial::
|
||||
PrintNotAMolecularMaterial(const char* methodName,
|
||||
const G4Material* lookForMaterial) const
|
||||
{
|
||||
std::map<const G4Material*, bool, CompareMaterial>::iterator it =
|
||||
fWarningPrinted.find(lookForMaterial);
|
||||
auto it = fWarningPrinted.find(lookForMaterial);
|
||||
|
||||
if (it == fWarningPrinted.end()){
|
||||
if (it == fWarningPrinted.cend()){
|
||||
G4ExceptionDescription exceptionDescription;
|
||||
exceptionDescription << "The material " << lookForMaterial->GetName()
|
||||
<< " is not defined as a molecular material."
|
||||
@@ -544,7 +524,7 @@ GetMolecularConfiguration(const G4Material* material) const
|
||||
{
|
||||
int material_id = material->GetIndex();
|
||||
auto it = fMaterialToMolecularConf.find(material_id);
|
||||
if(it == fMaterialToMolecularConf.end()) return 0;
|
||||
if(it == fMaterialToMolecularConf.cend()) return nullptr;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
@@ -555,7 +535,7 @@ G4DNAMolecularMaterial::
|
||||
SetMolecularConfiguration(const G4Material* material,
|
||||
G4MolecularConfiguration* molConf)
|
||||
{
|
||||
assert(material != 0);
|
||||
assert(material != nullptr);
|
||||
int material_id = material->GetIndex();
|
||||
fMaterialToMolecularConf[material_id] = molConf;
|
||||
}
|
||||
@@ -566,7 +546,7 @@ void
|
||||
G4DNAMolecularMaterial::SetMolecularConfiguration(const G4Material* material,
|
||||
const G4String& molUserID)
|
||||
{
|
||||
assert(material != 0);
|
||||
assert(material != nullptr);
|
||||
int material_id = material->GetIndex();
|
||||
fMaterialToMolecularConf[material_id] =
|
||||
G4MoleculeTable::Instance()->GetConfiguration(molUserID, true);
|
||||
@@ -580,7 +560,7 @@ G4DNAMolecularMaterial::SetMolecularConfiguration(const G4String& materialName,
|
||||
{
|
||||
G4Material* material = G4Material::GetMaterial(materialName);
|
||||
|
||||
if(material == 0){
|
||||
if(material == nullptr){
|
||||
G4cout<< "Material " << materialName
|
||||
<< " was not found and therefore won't be linked to "
|
||||
<< molUserID << G4endl;
|
||||
@@ -600,7 +580,7 @@ GetNumMoleculePerVolumeUnitForMaterial(const G4Material*)
|
||||
FatalException,"Use standard method: GetNumMolPerVolTableFor"
|
||||
" at the run initialization to retrieve a read-only table used"
|
||||
" during stepping. The method is thread-safe.");
|
||||
return 0;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -616,5 +596,5 @@ GetNumMolPerVolForComponentInComposite(const G4Material*,
|
||||
FatalException,"Use standard method: GetNumMolPerVolTableFor"
|
||||
" at the run initialization to retrieve a read-only table used"
|
||||
" during stepping. The method is thread-safe.");
|
||||
return 0;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
Executable → Regular
@@ -16,6 +16,16 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
29 October 2020: V.Ivantchenko (emhighenergy-V10-06-02)
|
||||
- G4hPairProductionModel, G4hBremsstrahlungModel, G4hPairProduction,
|
||||
G4hBremsstrahlung - added definition of the energy threshold
|
||||
for creation of a vertex, when energy transfer is above the
|
||||
threshold (CMS request)
|
||||
|
||||
01 September 2020: G.Amadio (emhighenergy-V10-06-01)
|
||||
- G4hPairProductionModel - inherit ComputeDMicroscopicCrossSection
|
||||
from G4MuPairProductionModel to avoid code duplication
|
||||
|
||||
30 October 2019: I.Semeniouk (emhighenergy-V10-05-06)
|
||||
- G4GammaConversionToMuons - initialisation of the 5D model cuts size
|
||||
|
||||
|
||||
@@ -64,23 +64,21 @@ public:
|
||||
|
||||
explicit G4hBremsstrahlung(const G4String& processName = "hBrems");
|
||||
|
||||
virtual ~G4hBremsstrahlung();
|
||||
~G4hBremsstrahlung() override;
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*) override;
|
||||
|
||||
private:
|
||||
void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
G4hBremsstrahlung & operator=(const G4hBremsstrahlung &right) = delete;
|
||||
G4hBremsstrahlung(const G4hBremsstrahlung&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*) override;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
// Creation date: 28.02.2008
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -58,22 +55,19 @@ class G4hBremsstrahlungModel : public G4MuBremsstrahlungModel
|
||||
public:
|
||||
|
||||
explicit G4hBremsstrahlungModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "hBrem");
|
||||
const G4String& nam = "hBrem");
|
||||
|
||||
virtual ~G4hBremsstrahlungModel();
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double gammaEnergy) override;
|
||||
private:
|
||||
~G4hBremsstrahlungModel() override;
|
||||
|
||||
// hide assignment operator
|
||||
G4hBremsstrahlungModel &
|
||||
operator=(const G4hBremsstrahlungModel &right) = delete;
|
||||
G4hBremsstrahlungModel(const G4hBremsstrahlungModel&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
G4double ComputeDMicroscopicCrossSection(G4double tkin, G4double Z,
|
||||
G4double gammaEnergy) override;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -61,23 +61,21 @@ public:
|
||||
|
||||
explicit G4hPairProduction(const G4String& processName = "hPairProd");
|
||||
|
||||
virtual ~G4hPairProduction();
|
||||
~G4hPairProduction() override;
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
G4hPairProduction & operator=(const G4hPairProduction &right) = delete;
|
||||
G4hPairProduction(const G4hPairProduction&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*) override;
|
||||
|
||||
private:
|
||||
|
||||
G4hPairProduction & operator=(const G4hPairProduction &right) = delete;
|
||||
G4hPairProduction(const G4hPairProduction&) = delete;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -60,14 +60,7 @@ public:
|
||||
explicit G4hPairProductionModel(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& nam = "hPairProd");
|
||||
|
||||
virtual ~G4hPairProductionModel();
|
||||
|
||||
protected:
|
||||
|
||||
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
|
||||
G4double Z,
|
||||
G4double pairEnergy) override;
|
||||
private:
|
||||
~G4hPairProductionModel() override;
|
||||
|
||||
// hide assignment operator
|
||||
G4hPairProductionModel &
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emhighenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,35 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emhighenergy
|
||||
HEADERS
|
||||
G4AnnihiToMuPair.hh
|
||||
|
||||
@@ -83,6 +83,7 @@ void G4hBremsstrahlung::InitialiseEnergyLossProcess(
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
EmModel()->SetSecondaryThreshold(param->MuHadBremsstrahlungTh());
|
||||
AddEmModel(1, EmModel(), fm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,28 +74,26 @@ G4double G4hBremsstrahlungModel::ComputeDMicroscopicCrossSection(
|
||||
{
|
||||
G4double dxsection = 0.;
|
||||
|
||||
if( gammaEnergy > tkin) return dxsection ;
|
||||
if(gammaEnergy > tkin) return dxsection;
|
||||
// G4cout << "G4hBremsstrahlungModel m= " << mass
|
||||
// << " " << particle->GetParticleName() << G4endl;
|
||||
G4double E = tkin + mass ;
|
||||
G4double v = gammaEnergy/E ;
|
||||
G4double delta = 0.5*mass*mass*v/(E-gammaEnergy) ;
|
||||
G4double delta = 0.5*mass*mass*v/(E-gammaEnergy);
|
||||
G4double rab0=delta*sqrte ;
|
||||
|
||||
G4int iz = G4int(Z);
|
||||
if(iz < 1) { iz = 1; }
|
||||
G4int iz = std::max(G4lrint(Z), 1);
|
||||
|
||||
G4double z13 = 1.0/nist->GetZ13(iz);
|
||||
G4double dn = mass*nist->GetA27(iz)/(70.*MeV);
|
||||
|
||||
G4double b = btf;
|
||||
if(1 == iz) b = bh;
|
||||
G4double b = (1 == iz) ? bh : btf;
|
||||
|
||||
// nucleus contribution logarithm
|
||||
G4double rab1=b*z13;
|
||||
G4double fn=G4Log(rab1/(dn*(electron_mass_c2+rab0*rab1))*
|
||||
(mass+delta*(dn*sqrte-2.))) ;
|
||||
if(fn <0.) fn = 0. ;
|
||||
fn = std::max(fn, 0.0);
|
||||
|
||||
G4double x = 1.0 - v;
|
||||
if(particle->GetPDGSpin() != 0) { x += 0.75*v*v; }
|
||||
|
||||
@@ -87,6 +87,7 @@ void G4hPairProduction::InitialiseEnergyLossProcess(
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
EmModel()->SetSecondaryThreshold(param->MuHadBremsstrahlungTh());
|
||||
AddEmModel(1, EmModel(), fm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,6 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4hPairProductionModel.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4Log.hh"
|
||||
#include "G4Exp.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4hPairProductionModel::G4hPairProductionModel(const G4ParticleDefinition* p,
|
||||
const G4String& nam)
|
||||
@@ -65,114 +60,3 @@ G4hPairProductionModel::~G4hPairProductionModel()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4hPairProductionModel::ComputeDMicroscopicCrossSection(
|
||||
G4double tkin,
|
||||
G4double Z,
|
||||
G4double pairEnergy)
|
||||
// differential cross section
|
||||
{
|
||||
static const G4double bbbtf= 183. ;
|
||||
static const G4double bbbh = 202.4 ;
|
||||
static const G4double g1tf = 1.95e-5 ;
|
||||
static const G4double g2tf = 5.3e-5 ;
|
||||
static const G4double g1h = 4.4e-5 ;
|
||||
static const G4double g2h = 4.8e-5 ;
|
||||
|
||||
G4double totalEnergy = tkin + particleMass;
|
||||
G4double residEnergy = totalEnergy - pairEnergy;
|
||||
G4double massratio = particleMass/electron_mass_c2 ;
|
||||
G4double massratio2 = massratio*massratio ;
|
||||
G4double cross = 0.;
|
||||
|
||||
G4double c3 = 0.75*sqrte*particleMass;
|
||||
if (residEnergy <= c3*z13) { return cross; }
|
||||
|
||||
G4double c7 = 4.*CLHEP::electron_mass_c2;
|
||||
G4double c8 = 6.*particleMass*particleMass;
|
||||
G4double alf = c7/pairEnergy;
|
||||
G4double a3 = 1. - alf;
|
||||
if (a3 <= 0.) { return cross; }
|
||||
|
||||
// zeta calculation
|
||||
G4double bbb,g1,g2;
|
||||
if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
|
||||
else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
|
||||
|
||||
G4double zeta = 0.;
|
||||
G4double zeta1 =
|
||||
0.073*G4Log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26;
|
||||
if ( zeta1 > 0.)
|
||||
{
|
||||
G4double zeta2 =
|
||||
0.058*G4Log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
|
||||
zeta = zeta1/zeta2 ;
|
||||
}
|
||||
|
||||
G4double z2 = Z*(Z+zeta);
|
||||
G4double screen0 = 2.*electron_mass_c2*sqrte*bbb/(z13*pairEnergy);
|
||||
G4double a0 = totalEnergy*residEnergy;
|
||||
G4double a1 = pairEnergy*pairEnergy/a0;
|
||||
G4double bet = 0.5*a1;
|
||||
G4double xi0 = 0.25*massratio2*a1;
|
||||
G4double del = c8/a0;
|
||||
|
||||
G4double rta3 = sqrt(a3);
|
||||
G4double tmnexp = alf/(1. + rta3) + del*rta3;
|
||||
if(tmnexp >= 1.0) { return cross; }
|
||||
|
||||
G4double tmn = G4Log(tmnexp);
|
||||
G4double sum = 0.;
|
||||
|
||||
// Gaussian integration in ln(1-ro) ( with 8 points)
|
||||
for (G4int i=0; i<8; i++)
|
||||
{
|
||||
G4double a4 = G4Exp(tmn*xgi[i]); // a4 = (1.-asymmetry)
|
||||
G4double a5 = a4*(2.-a4) ;
|
||||
G4double a6 = 1.-a5 ;
|
||||
G4double a7 = 1.+a6 ;
|
||||
G4double a9 = 3.+a6 ;
|
||||
G4double xi = xi0*a5 ;
|
||||
G4double xii = 1./xi ;
|
||||
G4double xi1 = 1.+xi ;
|
||||
G4double screen = screen0*xi1/a5 ;
|
||||
G4double yeu = 5.-a6+4.*bet*a7 ;
|
||||
G4double yed = 2.*(1.+3.*bet)*G4Log(3.+xii)-a6-a1*(2.-a6) ;
|
||||
G4double ye1 = 1.+yeu/yed ;
|
||||
G4double ale=G4Log(bbb/z13*sqrt(xi1*ye1)/(1.+screen*ye1)) ;
|
||||
G4double cre = 0.5*G4Log(1.+2.25*z23*xi1*ye1/massratio2) ;
|
||||
G4double be;
|
||||
|
||||
if (xi <= 1.e3) {
|
||||
be = ((2.+a6)*(1.+bet)+xi*a9)*G4Log(1.+xii)+(a5-bet)/xi1-a9;
|
||||
} else {
|
||||
be = (3.-a6+a1*a7)/(2.*xi);
|
||||
}
|
||||
G4double fe = (ale-cre)*be;
|
||||
if ( fe < 0.) { fe = 0.; }
|
||||
|
||||
G4double ymu = 4.+a6 +3.*bet*a7 ;
|
||||
G4double ymd = a7*(1.5+a1)*G4Log(3.+xi)+1.-1.5*a6 ;
|
||||
G4double ym1 = 1.+ymu/ymd ;
|
||||
G4double alm_crm = G4Log(bbb*massratio/(1.5*z23*(1.+screen*ym1)));
|
||||
G4double a10,bm;
|
||||
if ( xi >= 1.e-3)
|
||||
{
|
||||
a10 = (1.+a1)*a5 ;
|
||||
bm = (a7*(1.+1.5*bet)-a10*xii)*G4Log(xi1)+xi*(a5-bet)/xi1+a10;
|
||||
} else {
|
||||
bm = (5.-a6+bet*a9)*(xi/2.);
|
||||
}
|
||||
|
||||
G4double fm = alm_crm*bm;
|
||||
if ( fm < 0.) { fm = 0.; }
|
||||
|
||||
sum += wgi[i]*a4*(fe+fm/massratio2);
|
||||
}
|
||||
|
||||
cross = -tmn*sum*factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
|
||||
|
||||
return cross;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -15,6 +15,46 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
17.11.2020 V.Ivanchenko, emlowen-V10-06-13
|
||||
- G4MicroElecInelasticModel_new, G4MicroElecInelastic_new,
|
||||
G4MicroElecSurface - fixed Coverity warnings (non-initialized
|
||||
class members or dereferences)
|
||||
|
||||
26.10.2020 V.Ivanchenko, emlowen-V10-06-12
|
||||
- removed obsolete G4MuElec* classes
|
||||
- Added new classes developed by ONERA and CEA group and provided
|
||||
by D. Lambert: G4MicroElecElasticModel_new,
|
||||
G4MicroElecInelasticModel_new, G4MicroElecInelastic_new,
|
||||
G4MicroElecLOPhononModel, G4MicroElecLOPhononModel.
|
||||
G4MicroElecSiStructure is moved to material category
|
||||
- G4MicroElecSurface - new boundary process for e- The code is
|
||||
updated compared with the original: instead of name comparisons
|
||||
pointers are compared; condition on surface is defined by kCarTolerance;
|
||||
initialisation is done in the new BuildPhysicsTable(..) method
|
||||
instead of Initialise(); no dependence on G4Electron; changed
|
||||
process type and sub-types from optical to electromagnetic.
|
||||
15.10.2020 L. Pandola, emlowen-V10-06-11
|
||||
- Fix Coverity defects and material list in G4PenelopeRayleighModelMI
|
||||
|
||||
12.10.2020 L. Pandola, emlowen-V10-06-10
|
||||
- replace std::log with G4Log in Penelope and Livermore models
|
||||
- use GetZasInt() in Penelope models, when applicable
|
||||
- fix typo in material name in G4PenelopeRayleighModelMI
|
||||
|
||||
07.10.2020 L. Pandola, emlowen-V10-06-09
|
||||
- finalize G4PenelopeRayleighModelMI model of emlowen-V10-06-08:
|
||||
make it compatible with Unit Tests, revise verbosity
|
||||
|
||||
24.09.2020 G. Paternò, L. Pandola, emlowen-V10-06-08
|
||||
- added G4PenelopeRayleighModelMI model and ancillary class G4MIData
|
||||
(provided by G. Paternò, INFN Ferrara)
|
||||
- create tests/CMakeLists.txt for Unit Tests and reshape Unit Test
|
||||
G4PenelopeRayleighTest.cc
|
||||
|
||||
04.09.2020 M. Omer, R. Hajima, L. Pandola, emlowen-V10-06-07
|
||||
- Added protections in G4JAEAPolarizedElasticScatteringModel.cc
|
||||
|
||||
11.06.2020 Z. Li, emlowen-V10-06-06
|
||||
- Add InitialiseForElement() in G4LivermoreGammaConversionModel
|
||||
and G4LivermoreGammaConversion5DModel, which was missing before
|
||||
@@ -1608,7 +1648,7 @@ M. Omer and R. Hajima
|
||||
|
||||
25.06.2009, A. Mantero, tag emlowen-V09-02-40
|
||||
Design update, Bug Fixes and models update for
|
||||
atomic shell hadronic CS calulation.
|
||||
atomic shell hadronic CS calculation.
|
||||
|
||||
02.06.2009, A.Lechner, tag emlowen-V09-02-39
|
||||
Bug fix in class G4IonDEDXScalingICRU73: Compilation
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
|
||||
|
||||
// Given the atomic number and the vacancy intial shell index returns
|
||||
// Given the atomic number and the vacancy initial shell index returns
|
||||
// the AugerTransition object related to that shell
|
||||
|
||||
G4AugerTransition* GetAugerTransition(G4int Z, G4int vacancyShellIndex);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
// 30 October 2008
|
||||
// on base of G4LowEnergyPhotoElectric developed by A.Forti and M.G.Pia
|
||||
//
|
||||
// 15 Mar 2010 L. Pandola, removed methods to set explicitely fluorescence cuts.
|
||||
// 15 Mar 2010 L. Pandola, removed methods to set explicitly fluorescence cuts.
|
||||
// Main cuts from G4ProductionCutsTable are always used
|
||||
// 30 May 2011 A Mantero & V Ivanchenko Migration to model design for deexcitation
|
||||
// 22 Oct 2012 A & V Ivanchenko Migration data structure to G4PhysicsVector
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
// 30 October 2008
|
||||
// on base of G4LowEnergyPhotoElectric developed by A.Forti and M.G.Pia
|
||||
//
|
||||
// 15 Mar 2010 L. Pandola, removed methods to set explicitely fluorescence cuts.
|
||||
// 15 Mar 2010 L. Pandola, removed methods to set explicitly fluorescence cuts.
|
||||
// Main cuts from G4ProductionCutsTable are always used
|
||||
// 30 May 2011 A Mantero & V Ivanchenko Migration to model design for deexcitation
|
||||
// 22 Oct 2012 A & V Ivanchenko Migration data structure to G4PhysicsVector
|
||||
|
||||
Executable → Regular
+36
-35
@@ -23,50 +23,51 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// gpaterno, March 2019
|
||||
//
|
||||
// G4MuElecElastic.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
//
|
||||
// Based on the following publications
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66 - 73, 2012.
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4MuElecElastic_h
|
||||
#define G4MuElecElastic_h 1
|
||||
#ifndef G4MIData_h
|
||||
#define G4MIData_h 1
|
||||
|
||||
#include "G4VEmProcess.hh"
|
||||
#include "G4Electron.hh"
|
||||
|
||||
// Available models
|
||||
#include "G4MuElecElasticModel.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4VMaterialExtension.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4MuElecElastic : public G4VEmProcess
|
||||
class G4MIData : public G4VMaterialExtension {
|
||||
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuElecElastic(const G4String& processName ="MuElecElastic",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
|
||||
virtual ~G4MuElecElastic();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
public:
|
||||
G4MIData(const G4String&);
|
||||
virtual ~G4MIData();
|
||||
|
||||
public:
|
||||
void Print() const override
|
||||
{G4cout << "Molecular Interference data for Rayleigh scattering" << G4endl;};
|
||||
|
||||
void SetFilenameFF(const G4String& filenameff) {fFilenameFF = filenameff;};
|
||||
void SetFilenameCS(const G4String& filenamecs) {fFilenameCS = filenamecs;};
|
||||
void SetMolWeight(const G4double mw) {fMolWeight = mw;};
|
||||
|
||||
public:
|
||||
const G4String& GetFilenameFF() {return fFilenameFF;};
|
||||
const G4String& GetFilenameCS() {return fFilenameCS;};
|
||||
const G4double& GetMolWeight() {return fMolWeight;};
|
||||
|
||||
virtual void PrintInfo();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*);
|
||||
|
||||
private:
|
||||
|
||||
G4bool isInitialised;
|
||||
G4String fFilenameFF;
|
||||
G4String fFilenameCS;
|
||||
G4double fMolWeight;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+42
-67
@@ -27,90 +27,65 @@
|
||||
// Based on G4DNACrossSectionDataSet
|
||||
//
|
||||
|
||||
#ifndef G4MUELECCROSSSECTIONDATASET_HH
|
||||
#define G4MUELECCROSSSECTIONDATASET_HH 1
|
||||
#ifndef G4MICROELECCROSSSECTIONDATASET_HH
|
||||
#define G4MICROELECCROSSSECTIONDATASET_HH 1
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "G4ShellEMDataSet.hh"
|
||||
|
||||
class G4MuElecCrossSectionDataSet : public G4VEMDataSet
|
||||
class G4MicroElecCrossSectionDataSet_new : public G4VEMDataSet
|
||||
{
|
||||
|
||||
public:
|
||||
G4MuElecCrossSectionDataSet(G4VDataSetAlgorithm* algo,
|
||||
G4MicroElecCrossSectionDataSet_new(G4VDataSetAlgorithm* algo,
|
||||
G4double xUnit=CLHEP::MeV,
|
||||
G4double dataUnit=CLHEP::barn);
|
||||
~G4MicroElecCrossSectionDataSet_new() override;
|
||||
|
||||
virtual ~G4MuElecCrossSectionDataSet();
|
||||
|
||||
virtual G4double FindValue(G4double e, G4int componentId=0) const;
|
||||
|
||||
virtual void PrintData(void) const;
|
||||
|
||||
virtual const G4VEMDataSet* GetComponent(G4int componentId) const
|
||||
{ return components[componentId]; }
|
||||
|
||||
virtual void AddComponent(G4VEMDataSet* dataSet)
|
||||
{ components.push_back(dataSet); }
|
||||
|
||||
virtual size_t NumberOfComponents(void) const
|
||||
{ return components.size(); }
|
||||
|
||||
virtual const G4DataVector& GetEnergies(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetEnergies(0); }
|
||||
|
||||
virtual const G4DataVector& GetData(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetData(0); }
|
||||
|
||||
virtual const G4DataVector& GetLogEnergies(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetLogEnergies(0); }
|
||||
|
||||
virtual const G4DataVector& GetLogData(G4int componentId) const
|
||||
{ return GetComponent(componentId)->GetLogData(0); }
|
||||
|
||||
virtual void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId);
|
||||
|
||||
virtual void SetLogEnergiesData(G4DataVector* x,
|
||||
G4DataVector* values,
|
||||
G4DataVector* log_x,
|
||||
G4DataVector* log_values,
|
||||
G4int componentId);
|
||||
|
||||
virtual G4bool LoadData(const G4String & argFileName);
|
||||
virtual G4bool LoadNonLogData(const G4String & argFileName);
|
||||
|
||||
virtual G4bool SaveData(const G4String & argFileName) const;
|
||||
|
||||
virtual G4double RandomSelect(G4int /*componentId */) const { return -1.; };
|
||||
|
||||
|
||||
// void CleanUpComponents();
|
||||
G4double FindValue(G4double e, G4int componentId=0) const override;
|
||||
G4double FindShellValue(G4double argEnergy, G4int shell) const;
|
||||
void PrintData(void) const override;
|
||||
const G4VEMDataSet* GetComponent(G4int componentId) const override
|
||||
{ return components[componentId]; }
|
||||
void AddComponent(G4VEMDataSet* dataSet) override
|
||||
{ components.push_back(dataSet); }
|
||||
size_t NumberOfComponents(void) const override
|
||||
{ return components.size(); }
|
||||
const G4DataVector& GetEnergies(G4int componentId) const override
|
||||
{ return GetComponent(componentId)->GetEnergies(0); }
|
||||
const G4DataVector& GetData(G4int componentId) const override
|
||||
{ return GetComponent(componentId)->GetData(0); }
|
||||
const G4DataVector& GetLogEnergies(G4int componentId) const override
|
||||
{ return GetComponent(componentId)->GetLogEnergies(0); }
|
||||
const G4DataVector& GetLogData(G4int componentId) const override
|
||||
{ return GetComponent(componentId)->GetLogData(0); }
|
||||
void SetEnergiesData(G4DataVector* x, G4DataVector* values, G4int componentId) override;
|
||||
void SetLogEnergiesData(G4DataVector* x,
|
||||
G4DataVector* values,
|
||||
G4DataVector* log_x,
|
||||
G4DataVector* log_values,
|
||||
G4int componentId) override;
|
||||
G4bool LoadData(const G4String & argFileName) override;
|
||||
G4bool LoadNonLogData(const G4String & argFileName) override;
|
||||
G4bool SaveData(const G4String & argFileName) const override;
|
||||
G4double RandomSelect(G4int /*componentId */) const override
|
||||
{ return -1.; };
|
||||
|
||||
private:
|
||||
G4MicroElecCrossSectionDataSet_new();
|
||||
G4MicroElecCrossSectionDataSet_new(const G4MicroElecCrossSectionDataSet_new & copy);
|
||||
G4MicroElecCrossSectionDataSet_new& operator=(const G4MicroElecCrossSectionDataSet_new & right);
|
||||
|
||||
G4String FullFileName(const G4String & argFileName) const;
|
||||
|
||||
// Hide copy constructor and assignment operator
|
||||
G4MuElecCrossSectionDataSet();
|
||||
G4MuElecCrossSectionDataSet(const G4MuElecCrossSectionDataSet & copy);
|
||||
G4MuElecCrossSectionDataSet& operator=(const G4MuElecCrossSectionDataSet & right);
|
||||
|
||||
std::vector<G4VEMDataSet*> components; // Owned pointers
|
||||
|
||||
G4int z;
|
||||
|
||||
G4VDataSetAlgorithm* algorithm; // Owned pointer
|
||||
|
||||
G4double unitEnergies;
|
||||
G4double unitData;
|
||||
|
||||
G4double GetUnitEnergies() const { return unitEnergies; }
|
||||
G4double GetUnitData() const { return unitData; }
|
||||
const G4VDataSetAlgorithm* GetAlgorithm() const { return algorithm; }
|
||||
|
||||
void CleanUpComponents(void);
|
||||
|
||||
std::vector<G4VEMDataSet*> components; // Owned pointers
|
||||
G4int z;
|
||||
G4VDataSetAlgorithm* algorithm; // Owned pointer
|
||||
G4double unitEnergies;
|
||||
G4double unitData;
|
||||
|
||||
};
|
||||
#endif /* G4MuElecCrossSectionDataSet_HH */
|
||||
#endif
|
||||
@@ -0,0 +1,190 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecElasticModel_new.hh, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
// - A.Valentin, M. Raine,
|
||||
// Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// https://doi.org/10.1109/NSSMIC.2010.5873720
|
||||
//
|
||||
// - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
|
||||
// Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Silicon,
|
||||
// https://doi.org/10.1016/j.nimb.2012.06.007
|
||||
// NIM B, vol. 288, pp. 66-73, 2012, part A
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
|
||||
// https://doi.org/10.1016/j.nimb.2012.07.028
|
||||
//
|
||||
// - M. Raine, M. Gaillardin, P. Paillet
|
||||
// Geant4 physics processes for silicon microdosimetry simulation:
|
||||
// Improvements and extension of the energy-range validity up to 10 GeV/nucleon
|
||||
// NIM B, vol. 325, pp. 97-100, 2014
|
||||
// https://doi.org/10.1016/j.nimb.2014.01.014
|
||||
//
|
||||
// - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
|
||||
// Electron emission yield for low energy electrons:
|
||||
// Monte Carlo simulation and experimental comparison for Al, Ag, and Si
|
||||
// Journal of Applied Physics 121 (2017) 215107.
|
||||
// https://doi.org/10.1063/1.4984761
|
||||
//
|
||||
// - P. Caron,
|
||||
// Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
|
||||
// PHD, 16th October 2019
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MICROELECELASTICMODEL_HH
|
||||
#define G4MICROELECELASTICMODEL_HH 1
|
||||
|
||||
#include <map>
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "G4MicroElecMaterialStructure.hh"
|
||||
#include "G4MicroElecCrossSectionDataSet_new.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
class G4MicroElecElasticModel_new : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
G4MicroElecElasticModel_new(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "MicroElecElasticModel");
|
||||
~G4MicroElecElasticModel_new() override;
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax) override;
|
||||
|
||||
G4double AcousticCrossSectionPerVolume(G4double ekin, G4double kbz, G4double rho,
|
||||
G4double cs, G4double Aac, G4double Eac,
|
||||
G4double prefactor);
|
||||
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy) override;
|
||||
|
||||
void SetKillBelowThreshold (G4double threshold);
|
||||
|
||||
G4double GetKillBelowThreshold () { return killBelowEnergy; }
|
||||
|
||||
G4double DamageEnergy(G4double T,G4double A, G4double Z);
|
||||
|
||||
protected:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
private:
|
||||
|
||||
G4MicroElecElasticModel_new & operator=(const G4MicroElecElasticModel_new &right);
|
||||
G4MicroElecElasticModel_new(const G4MicroElecElasticModel_new&);
|
||||
|
||||
// Final state
|
||||
G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff);
|
||||
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22,
|
||||
G4double x11, G4double x12, G4double x21, G4double x22,
|
||||
G4double t1, G4double t2, G4double t, G4double e);
|
||||
|
||||
G4double RandomizeCosTheta(G4double k);
|
||||
|
||||
G4Material* nistSi = nullptr;
|
||||
G4double killBelowEnergy;
|
||||
G4double lowEnergyLimit;
|
||||
G4double lowEnergyLimitOfModel;
|
||||
G4double highEnergyLimit;
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
// Cross section
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
|
||||
//MapData tableData;
|
||||
|
||||
typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
|
||||
TCSMap tableTCS;
|
||||
|
||||
//Maps for multilayers
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
|
||||
typedef std::map<G4String, TriDimensionMap* > ThetaMap;
|
||||
ThetaMap thetaDataStorage; //Storage of angles (cumulated)
|
||||
|
||||
typedef std::map<G4String, std::vector<double>* > energyMap;
|
||||
energyMap eIncidentEnergyStorage;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
|
||||
typedef std::map<G4String, VecMap* > ProbaMap;
|
||||
ProbaMap eProbaStorage; //Storage of probabilities for cumulated sections
|
||||
|
||||
typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
|
||||
|
||||
MapStructure tableMaterialsStructures; //Structures of all materials simulated
|
||||
|
||||
G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
|
||||
typedef std::map<G4String, G4double, std::less<G4String> > MapEnergy;
|
||||
MapEnergy lowEnergyLimitTable;
|
||||
MapEnergy highEnergyLimitTable;
|
||||
MapEnergy workFunctionTable;
|
||||
|
||||
G4bool killElectron, acousticModelEnabled;
|
||||
G4String currentMaterialName;
|
||||
G4bool isOkToBeInitialised;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecInelasticModel_new.hh, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
// - A.Valentin, M. Raine,
|
||||
// Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// https://doi.org/10.1109/NSSMIC.2010.5873720
|
||||
//
|
||||
// - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
|
||||
// Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Silicon,
|
||||
// https://doi.org/10.1016/j.nimb.2012.06.007
|
||||
// NIM B, vol. 288, pp. 66-73, 2012, part A
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
|
||||
// https://doi.org/10.1016/j.nimb.2012.07.028
|
||||
//
|
||||
// - M. Raine, M. Gaillardin, P. Paillet
|
||||
// Geant4 physics processes for silicon microdosimetry simulation:
|
||||
// Improvements and extension of the energy-range validity up to 10 GeV/nucleon
|
||||
// NIM B, vol. 325, pp. 97-100, 2014
|
||||
// https://doi.org/10.1016/j.nimb.2014.01.014
|
||||
//
|
||||
// - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
|
||||
// Electron emission yield for low energy electrons:
|
||||
// Monte Carlo simulation and experimental comparison for Al, Ag, and Si
|
||||
// Journal of Applied Physics 121 (2017) 215107.
|
||||
// https://doi.org/10.1063/1.4984761
|
||||
//
|
||||
// - P. Caron,
|
||||
// Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
|
||||
// PHD, 16th October 2019
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MICROELECINELASTICMODEL_NEW_HH
|
||||
#define G4MICROELECINELASTICMODEL_NEW_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4MicroElecMaterialStructure.hh"
|
||||
#include "G4MicroElecCrossSectionDataSet_new.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
|
||||
class G4MicroElecInelasticModel_new : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MicroElecInelasticModel_new(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "MicroElecInelasticModel");
|
||||
~G4MicroElecInelasticModel_new() override;
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax) override;
|
||||
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy) override;
|
||||
|
||||
G4double DifferentialCrossSection(const G4ParticleDefinition * aParticleDefinition,
|
||||
G4double k, G4double energyTransfer, G4int shell);
|
||||
|
||||
G4double ComputeRelativistVelocity(G4double E, G4double mass);
|
||||
|
||||
G4double ComputeElasticQmax(G4double T1i, G4double T2i, G4double m1, G4double m2);
|
||||
|
||||
G4double BKZ(G4double Ep, G4double mp, G4int Zp, G4double EF);
|
||||
// compute the effective charge according Brandt et Kitagawa theory
|
||||
|
||||
G4double stepFunc(G4double x);
|
||||
|
||||
G4double vrkreussler(G4double v, G4double vF);
|
||||
|
||||
protected:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma = nullptr;
|
||||
|
||||
private:
|
||||
//
|
||||
// private methods
|
||||
//
|
||||
G4MicroElecInelasticModel_new & operator=(const G4MicroElecInelasticModel_new &right);
|
||||
G4MicroElecInelasticModel_new(const G4MicroElecInelasticModel_new&);
|
||||
|
||||
G4int RandomSelect(G4double energy,const G4String& particle, G4double originalMass, G4int originalZ );
|
||||
|
||||
G4double RandomizeCreatedElectronEnergy(G4double secondaryKinetic);
|
||||
|
||||
G4double RandomizeEjectedElectronEnergy(const G4ParticleDefinition * aParticleDefinition,
|
||||
G4double incomingParticleEnergy, G4int shell,
|
||||
G4double originalMass, G4int originalZ) ;
|
||||
|
||||
G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(const G4ParticleDefinition*,
|
||||
G4double k, G4int shell);
|
||||
|
||||
G4double TransferedEnergy(const G4ParticleDefinition*, G4double k,
|
||||
G4int ionizationLevelIndex, G4double random);
|
||||
|
||||
G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double QuadInterpolator( G4double e11, G4double e12, G4double e21, G4double e22,
|
||||
G4double x11, G4double x12, G4double x21, G4double x22,
|
||||
G4double t1, G4double t2, G4double t, G4double e);
|
||||
//
|
||||
// private elements
|
||||
//
|
||||
G4String currentMaterial = "";
|
||||
G4bool fasterCode = false;
|
||||
//deexcitation manager to produce fluo photns and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation = nullptr;
|
||||
G4Material* nistSi = nullptr;
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
G4bool isInitialised = false;
|
||||
G4int verboseLevel = 0;
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
typedef std::map<G4String,G4MicroElecCrossSectionDataSet_new*,std::less<G4String> > MapData;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
//Tables for multilayers
|
||||
typedef std::map<G4String, MapData*, std::less<G4String> > TCSMap;
|
||||
TCSMap tableTCS; //TCS tables by particle
|
||||
typedef std::map<G4String, std::vector<TriDimensionMap>* > dataDiffCSMap;
|
||||
dataDiffCSMap eDiffDatatable, pDiffDatatable; //Transfer probabilities (for slower code)
|
||||
dataDiffCSMap eNrjTransStorage, pNrjTransStorage; //Transfered energies and corresponding probability (faster code)
|
||||
typedef std::map<G4String, std::vector<VecMap>* > dataProbaShellMap;
|
||||
dataProbaShellMap eProbaShellStorage, pProbaShellStorage; //Cumulated Transfer probabilities (faster code)
|
||||
typedef std::map<G4String, std::vector<G4double>* > incidentEnergyMap;
|
||||
incidentEnergyMap eIncidentEnergyStorage, pIncidentEnergyStorage; //Incident energies for interpolation (faster code)
|
||||
typedef std::map<G4String, VecMap* > TranfEnergyMap;
|
||||
TranfEnergyMap eVecmStorage, pVecmStorage; //Transfered energy for interpolation (slower code)
|
||||
typedef std::map<G4String, G4MicroElecMaterialStructure*, std::less<G4String> > MapStructure;
|
||||
MapStructure tableMaterialsStructures; //Structures of all materials simulated
|
||||
G4MicroElecMaterialStructure* currentMaterialStructure = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecInelastic_new.hh, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
// - A.Valentin, M. Raine,
|
||||
// Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// https://doi.org/10.1109/NSSMIC.2010.5873720
|
||||
//
|
||||
// - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
|
||||
// Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Silicon,
|
||||
// https://doi.org/10.1016/j.nimb.2012.06.007
|
||||
// NIM B, vol. 288, pp. 66-73, 2012, part A
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
|
||||
// https://doi.org/10.1016/j.nimb.2012.07.028
|
||||
//
|
||||
// - M. Raine, M. Gaillardin, P. Paillet
|
||||
// Geant4 physics processes for silicon microdosimetry simulation:
|
||||
// Improvements and extension of the energy-range validity up to 10 GeV/nucleon
|
||||
// NIM B, vol. 325, pp. 97-100, 2014
|
||||
// https://doi.org/10.1016/j.nimb.2014.01.014
|
||||
//
|
||||
// - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
|
||||
// Electron emission yield for low energy electrons:
|
||||
// Monte Carlo simulation and experimental comparison for Al, Ag, and Si
|
||||
// Journal of Applied Physics 121 (2017) 215107.
|
||||
// https://doi.org/10.1063/1.4984761
|
||||
//
|
||||
// - P. Caron,
|
||||
// Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
|
||||
// PHD, 16th October 2019
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MICROELEINELASTIC_HH
|
||||
#define G4MICROELEINELASTIC_HH 1
|
||||
|
||||
#include "G4VEmProcess.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4MicroElecInelastic_new : public G4VEmProcess
|
||||
{
|
||||
public:
|
||||
G4MicroElecInelastic_new(const G4String& processName ="MicroElecIonisation",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
~G4MicroElecInelastic_new() override;
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
void PrintInfo() override;
|
||||
|
||||
protected:
|
||||
void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
private:
|
||||
G4bool isInitialised = false;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecLOPhononModel.hh,
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MICROELECLOPHONONMODEL_HH
|
||||
#define G4MICROELECLOPHONONMODEL_HH 1
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
|
||||
class G4MicroElecLOPhononModel : public G4VEmModel
|
||||
{
|
||||
public:
|
||||
G4MicroElecLOPhononModel(const G4ParticleDefinition*p = 0,
|
||||
const G4String& nam = "G4MicroElecLOPhononModel");
|
||||
~G4MicroElecLOPhononModel() override;
|
||||
|
||||
void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
|
||||
G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax) override;
|
||||
|
||||
void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy) override;
|
||||
|
||||
protected:
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
private:
|
||||
G4bool Interband;
|
||||
G4MicroElecLOPhononModel & operator=(const G4MicroElecLOPhononModel &right);
|
||||
G4MicroElecLOPhononModel(const G4MicroElecLOPhononModel&);
|
||||
|
||||
G4bool isOkToBeInitialised;
|
||||
G4bool isInitialised;
|
||||
G4bool abs = false;
|
||||
G4double Eprim = 0, signe = -1,phononEnergy=0;
|
||||
};
|
||||
|
||||
#endif
|
||||
Executable → Regular
+31
-36
@@ -24,58 +24,53 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MuElecInelastic.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
// G4MicroElecLOPhononModel.hh,
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// M. Raine and D. Lambert are with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with theGeant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66-73, 2012.
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for protons and
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012.
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MuElecInelastic_h
|
||||
#define G4MuElecInelastic_h 1
|
||||
|
||||
#ifndef G4MICROELECLOPHONONSCATTERING_HH
|
||||
#define G4MICROELECLOPHONONSCATTERING_HH 1
|
||||
|
||||
#include "G4VEmProcess.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
// Available models
|
||||
#include "G4MuElecInelasticModel.hh"
|
||||
#include "G4MicroElecLOPhononModel.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class G4MuElecInelastic : public G4VEmProcess
|
||||
|
||||
class G4MicroElecLOPhononScattering : public G4VEmProcess
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuElecInelastic(const G4String& processName ="MuElecIonisation",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
|
||||
virtual ~G4MuElecInelastic();
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
public:
|
||||
G4MicroElecLOPhononScattering(const G4String& processName = "LOPhononScattering",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
~G4MicroElecLOPhononScattering() override;
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
void PrintInfo() override;
|
||||
|
||||
virtual void PrintInfo();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*);
|
||||
|
||||
void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
private:
|
||||
|
||||
G4bool isInitialised;
|
||||
G4bool isInitialised;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,143 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MicroElecSurface.hh,
|
||||
// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
|
||||
// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
|
||||
// D. Lambert is with CEA [a]
|
||||
//
|
||||
// A part of this work has been funded by the French space agency(CNES[c])
|
||||
// [a] CEA, DAM, DIF - 91297 ARPAJON, France
|
||||
// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
|
||||
// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
|
||||
// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
|
||||
// Extension of MicroElec to very low energies and new materials
|
||||
// NIM B, 2020, in review.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MicroElecSurface_h
|
||||
#define G4MicroElecSurface_h 1
|
||||
|
||||
/////////////
|
||||
// Includes
|
||||
/////////////
|
||||
|
||||
#include "globals.hh"
|
||||
#include "templates.hh"
|
||||
#include "geomdefs.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4RandomTools.hh"
|
||||
#include "G4RandomDirection.hh"
|
||||
#include "G4MicroElecMaterialStructure.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VDiscreteProcess.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4LogicalBorderSurface.hh"
|
||||
#include "G4LogicalSkinSurface.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
|
||||
// Class Description:
|
||||
// Discrete Process -- reflection/refraction at interfaces for electrons.
|
||||
// Class inherits publicly from G4VDiscreteProcess.
|
||||
// Class Description - End:
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
enum G4MicroElecSurfaceStatus { UndefinedSurf,
|
||||
NotAtBoundarySurf,
|
||||
SameMaterialSurf,
|
||||
StepTooSmallSurf };
|
||||
|
||||
|
||||
class G4MicroElecSurface : public G4VDiscreteProcess
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MicroElecSurface(const G4String& processName = "MicroElecSurface",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
|
||||
~G4MicroElecSurface() override;
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
|
||||
// Returns true -> 'is applicable' only for an electron.
|
||||
|
||||
void SetFlagFranchissement();
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& ,
|
||||
G4double ,
|
||||
G4ForceCondition* condition) override;
|
||||
// Returns infinity; i. e. the process does not limit the step,
|
||||
// but sets the 'Forced' condition for the DoIt to be invoked at
|
||||
// every step. However, only at a boundary will any action be
|
||||
// taken.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
// This is the method implementing boundary processes.
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) override;
|
||||
// Initialisation
|
||||
|
||||
G4MicroElecSurfaceStatus GetStatus() const;
|
||||
// Returns the current status.
|
||||
|
||||
G4MicroElecSurface(const G4MicroElecSurface &right) = delete;
|
||||
G4MicroElecSurface& operator=(const G4MicroElecSurface &right) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4double GetIncidentAngle();
|
||||
|
||||
G4ThreeVector Reflexion(const G4StepPoint* PostStepPoint);
|
||||
|
||||
// private elements
|
||||
typedef std::map<G4String, G4double, std::less<G4String> > WorkFunctionTable;
|
||||
WorkFunctionTable tableWF; //Table of all materials simulated
|
||||
G4double theParticleMomentum;
|
||||
G4ThreeVector oldMomentum, previousMomentum;
|
||||
G4ThreeVector theGlobalNormal;
|
||||
G4ThreeVector theFacetNormal;
|
||||
G4Material* material1;
|
||||
G4Material* material2;
|
||||
G4MicroElecSurfaceStatus theStatus;
|
||||
G4double kCarTolerance;
|
||||
G4double ekint, thetat, thetaft, energyThreshold, crossingProbability;
|
||||
G4bool flag_franchissement_surface, flag_reflexion,flag_normal, teleportToDo, teleportDone, isInitialised;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,153 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MuElecElasticModel.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
//
|
||||
// Based on the following publications
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66 - 73, 2012.
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MuElecElasticModel_h
|
||||
#define G4MuElecElasticModel_h 1
|
||||
|
||||
#include <map>
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "G4MuElecCrossSectionDataSet.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
class G4MuElecElasticModel : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MuElecElasticModel(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "MuElecElasticModel");
|
||||
|
||||
virtual ~G4MuElecElasticModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
inline void SetKillBelowThreshold (G4double threshold);
|
||||
G4double GetKillBelowThreshold () { return killBelowEnergy; }
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
private:
|
||||
|
||||
G4Material* nistSi;
|
||||
G4double killBelowEnergy;
|
||||
G4double lowEnergyLimit;
|
||||
G4double lowEnergyLimitOfModel;
|
||||
G4double highEnergyLimit;
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
|
||||
typedef std::map<G4String,G4MuElecCrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Final state
|
||||
|
||||
G4double Theta(G4ParticleDefinition * aParticleDefinition, G4double k, G4double integrDiff);
|
||||
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double QuadInterpolator(G4double e11,
|
||||
G4double e12,
|
||||
G4double e21,
|
||||
G4double e22,
|
||||
G4double x11,
|
||||
G4double x12,
|
||||
G4double x21,
|
||||
G4double x22,
|
||||
G4double t1,
|
||||
G4double t2,
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData;
|
||||
std::vector<double> eTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
VecMap eVecm;
|
||||
|
||||
G4double RandomizeCosTheta(G4double k);
|
||||
|
||||
//
|
||||
|
||||
G4MuElecElasticModel & operator=(const G4MuElecElasticModel &right);
|
||||
G4MuElecElasticModel(const G4MuElecElasticModel&);
|
||||
|
||||
};
|
||||
|
||||
inline void G4MuElecElasticModel::SetKillBelowThreshold (G4double threshold)
|
||||
{
|
||||
killBelowEnergy = threshold;
|
||||
|
||||
if (threshold < 5*CLHEP::eV)
|
||||
{
|
||||
G4Exception ("*** WARNING : the G4MuElecElasticModel class is not validated below 5 eV !","",JustWarning,"") ;
|
||||
threshold = 0.025*CLHEP::eV;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
@@ -1,162 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4MuElecInelasticModel.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with theGeant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66-73, 2012.
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for protons and
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012.
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef G4MuElecInelasticModel_h
|
||||
#define G4MuElecInelasticModel_h 1
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4MuElecCrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
|
||||
#include "G4MuElecSiStructure.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
class G4MuElecInelasticModel : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4MuElecInelasticModel(const G4ParticleDefinition* p = 0,
|
||||
const G4String& nam = "MuElecInelasticModel");
|
||||
|
||||
virtual ~G4MuElecInelasticModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
virtual G4double CrossSectionPerVolume( const G4Material* material,
|
||||
const G4ParticleDefinition* p,
|
||||
G4double ekin,
|
||||
G4double emin,
|
||||
G4double emax);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChangeForGamma;
|
||||
|
||||
private:
|
||||
|
||||
//deexcitation manager to produce fluo photns and e-
|
||||
G4VAtomDeexcitation* fAtomDeexcitation;
|
||||
|
||||
G4Material* nistSi;
|
||||
|
||||
std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
// Cross section
|
||||
|
||||
typedef std::map<G4String,G4String,std::less<G4String> > MapFile;
|
||||
MapFile tableFile;
|
||||
|
||||
typedef std::map<G4String,G4MuElecCrossSectionDataSet*,std::less<G4String> > MapData;
|
||||
MapData tableData;
|
||||
|
||||
// Final state
|
||||
|
||||
G4MuElecSiStructure SiStructure;
|
||||
|
||||
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell) ;
|
||||
|
||||
void RandomizeEjectedElectronDirection(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4double
|
||||
outgoingParticleEnergy, G4double & cosTheta, G4double & phi );
|
||||
|
||||
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2);
|
||||
|
||||
G4double QuadInterpolator( G4double e11,
|
||||
G4double e12,
|
||||
G4double e21,
|
||||
G4double e22,
|
||||
G4double x11,
|
||||
G4double x12,
|
||||
G4double x21,
|
||||
G4double x22,
|
||||
G4double t1,
|
||||
G4double t2,
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
TriDimensionMap eDiffCrossSectionData[7];
|
||||
TriDimensionMap pDiffCrossSectionData[7];
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<double> pTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
VecMap eVecm;
|
||||
VecMap pVecm;
|
||||
|
||||
// Partial cross section
|
||||
|
||||
G4int RandomSelect(G4double energy,const G4String& particle );
|
||||
|
||||
//
|
||||
|
||||
G4MuElecInelasticModel & operator=(const G4MuElecInelasticModel &right);
|
||||
G4MuElecInelasticModel(const G4MuElecInelasticModel&);
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,168 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PenelopeRayleighModelMI.hh 75573 2013-11-04 11:48:15Z gcosmo $
|
||||
//
|
||||
// Author: Luciano Pandola and Gianfranco Paternò
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// History:
|
||||
// 03 Dec 2009 L. Pandola 1st implementation
|
||||
// 25 May 2011 L. Pandola Renamed (make v2008 as default Penelope)
|
||||
// 27 Sep 2013 L. Pandola Migration to MT paradigm
|
||||
// 20 Aug 2017 G. Paternò Molecular Interference implementation
|
||||
// 24 Mar 2019 G. Paternò Improved Molecular Interference implementation
|
||||
// 20 Jun 2020 G. Paternò Read qext separately and leave original atomic form factors
|
||||
// 27 Aug 2020 G. Paternò Further improvement of MI implementation
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// Class description:
|
||||
// Low Energy Electromagnetic Physics, Rayleigh Scattering
|
||||
// with the model from Penelope, version 2008
|
||||
// extended for Molecular Interference Effects
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4PenelopeRayleighModelMI_HH
|
||||
#define G4PenelopeRayleighModelMI_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4DataVector.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
|
||||
#include "G4ExtendedMaterial.hh"
|
||||
#include "G4MIData.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4DynamicParticle;
|
||||
class G4MaterialCutsCouple;
|
||||
class G4Material;
|
||||
class G4PhysicsFreeVector;
|
||||
class G4PenelopeSamplingData;
|
||||
|
||||
class G4PenelopeRayleighModelMI : public G4VEmModel
|
||||
{
|
||||
|
||||
public:
|
||||
G4PenelopeRayleighModelMI(const G4ParticleDefinition* p = nullptr,
|
||||
const G4String& processName = "PenRayleighMI");
|
||||
|
||||
virtual ~G4PenelopeRayleighModelMI();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
|
||||
virtual void InitialiseLocal(const G4ParticleDefinition*,
|
||||
G4VEmModel *masterModel) override;
|
||||
|
||||
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
|
||||
G4double kinEnergy,
|
||||
G4double Z,
|
||||
G4double A = 0,
|
||||
G4double cut = 0,
|
||||
G4double emax = DBL_MAX) override;
|
||||
|
||||
//Overriding of parent's (G4VEmModel) method
|
||||
virtual G4double CrossSectionPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy = 0.,
|
||||
G4double maxEnergy = DBL_MAX) override;
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy) override;
|
||||
|
||||
void SetVerbosityLevel(G4int lev) {verboseLevel = lev;};
|
||||
G4int GetVerbosityLevel() {return verboseLevel;};
|
||||
|
||||
//Testing purposes
|
||||
void DumpFormFactorTable(const G4Material*);
|
||||
|
||||
//Settings
|
||||
void SetMIActive(G4bool val){fIsMIActive = val;};
|
||||
G4bool IsMIActive(){return fIsMIActive;};
|
||||
|
||||
private:
|
||||
G4PenelopeRayleighModelMI& operator=(const G4PenelopeRayleighModelMI &right);
|
||||
G4PenelopeRayleighModelMI(const G4PenelopeRayleighModelMI&);
|
||||
void SetParticle(const G4ParticleDefinition*);
|
||||
|
||||
//Helper methods
|
||||
void ReadDataFile(G4int);
|
||||
void ClearTables();
|
||||
void BuildFormFactorTable(const G4Material*);
|
||||
void GetPMaxTable(const G4Material*);
|
||||
G4double GetFSquared(const G4Material*,const G4double);
|
||||
void InitializeSamplingAlgorithm(const G4Material*);
|
||||
void ReadMolInterferenceData(const G4String&,const G4String& filename="NULL");
|
||||
G4MIData* GetMIData(const G4Material*);
|
||||
void CalculateThetaAndAngFun();
|
||||
G4double CalculateQSquared(G4double angle, G4double energy);
|
||||
G4double IntegrateFun(G4double y[], G4int n, G4double dTheta);
|
||||
void LoadKnownMIFFMaterials();
|
||||
|
||||
|
||||
/// Data members
|
||||
G4ParticleChangeForGamma* fParticleChange;
|
||||
const G4ParticleDefinition* fParticle;
|
||||
|
||||
//Intrinsic energy limits of the model: cannot be extended by the parent process
|
||||
G4double fIntrinsicLowEnergyLimit;
|
||||
G4double fIntrinsicHighEnergyLimit;
|
||||
|
||||
G4int verboseLevel;
|
||||
G4bool isInitialised;
|
||||
|
||||
//Internal tables and manager methods
|
||||
std::map<G4int,G4PhysicsFreeVector*> *logAtomicCrossSection;
|
||||
std::map<G4int,G4PhysicsFreeVector*> *atomicFormFactor;
|
||||
std::map<G4String,G4PhysicsFreeVector*> *MolInterferenceData; //G. Paternò
|
||||
|
||||
G4DataVector logQSquareGrid; //log(Q^2) grid for interpolation
|
||||
std::map<const G4Material*,G4PhysicsFreeVector*> *logFormFactorTable; //log(Q^2) vs. log(F^2)
|
||||
|
||||
G4DataVector logEnergyGridPMax; //energy grid for PMax (and originally for the x-section)
|
||||
std::map<const G4Material*,G4PhysicsFreeVector*> *pMaxTable; //E vs. Pmax
|
||||
std::map<const G4Material*,G4PenelopeSamplingData*> *samplingTable;
|
||||
|
||||
//Used only for G4EmCalculator and Unit Tests
|
||||
G4bool fLocalTable;
|
||||
static const G4int Ntheta = 31415;
|
||||
G4double fDTheta = {0.0001};
|
||||
G4bool fIsMIActive;
|
||||
G4PhysicsFreeVector* angularFunction;
|
||||
std::map<G4String,G4String> *fKnownMaterials;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
G4double zParticle) const;
|
||||
// returns the energy loss via the quantal harmonic oscillator model
|
||||
|
||||
// get number of shell, energy and oscillator strenghts for material
|
||||
// get number of shell, energy and oscillator strengths for material
|
||||
G4int GetNumberOfShell(const G4Material* material) const;
|
||||
|
||||
G4double GetShellEnergy(const G4Material* material,G4int nbOfTheShell) const;
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
// Z of element at now avaliable for the model
|
||||
static const G4int materialAvailable[6];
|
||||
|
||||
// number, energy and oscillator strenghts
|
||||
// number, energy and oscillator strengths
|
||||
// for an harmonic oscillator model of material
|
||||
static const G4int nbofShellForMaterial[6];
|
||||
static const G4double alShellEnergy[3];
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -4,7 +4,7 @@
|
||||
# Package: Geant4.src.G4processes.G4electromagnetic.G4emlowenergy
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists the sources and headers of the code explicitly.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
@@ -14,35 +14,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
HEADERS
|
||||
G4AtomicDeexcitation.hh
|
||||
@@ -97,7 +71,7 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4LivermoreBremsstrahlungModel.hh
|
||||
G4LivermoreComptonModel.hh
|
||||
G4LivermoreComptonModifiedModel.hh
|
||||
G4LivermoreGammaConversion5DModel.hh
|
||||
G4LivermoreGammaConversion5DModel.hh
|
||||
G4LivermoreGammaConversionModel.hh
|
||||
G4LivermoreGammaConversionModelRC.hh
|
||||
G4LivermoreIonisationCrossSection.hh
|
||||
@@ -115,18 +89,19 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4LowEPComptonModel.hh
|
||||
G4LowEPPolarizedComptonModel.hh
|
||||
G4LowEWentzelVIModel.hh
|
||||
G4MIData.hh
|
||||
G4MicroElecCrossSectionDataSet.hh
|
||||
G4MicroElecElastic.hh
|
||||
G4MicroElecElasticModel.hh
|
||||
G4MicroElecInelastic.hh
|
||||
G4MicroElecInelasticModel.hh
|
||||
G4MicroElecSiStructure.hh
|
||||
G4MuElecCrossSectionDataSet.hh
|
||||
G4MuElecElastic.hh
|
||||
G4MuElecElasticModel.hh
|
||||
G4MuElecInelastic.hh
|
||||
G4MuElecInelasticModel.hh
|
||||
G4MuElecSiStructure.hh
|
||||
G4MicroElecCrossSectionDataSet_new.hh
|
||||
G4MicroElecElasticModel_new.hh
|
||||
G4MicroElecInelastic_new.hh
|
||||
G4MicroElecInelasticModel_new.hh
|
||||
G4MicroElecLOPhononModel.hh
|
||||
G4MicroElecLOPhononScattering.hh
|
||||
G4MicroElecSurface.hh
|
||||
G4OrlicLiXsModel.hh
|
||||
G4PaulKxsModel.hh
|
||||
G4PenelopeAnnihilationModel.hh
|
||||
@@ -138,11 +113,12 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4PenelopeGammaConversionModel.hh
|
||||
G4PenelopeIonisationCrossSection.hh
|
||||
G4PenelopeIonisationModel.hh
|
||||
G4PenelopeIonisationXSHandler.hh
|
||||
G4PenelopeIonisationXSHandler.hh
|
||||
G4PenelopeOscillator.hh
|
||||
G4PenelopeOscillatorManager.hh
|
||||
G4PenelopePhotoElectricModel.hh
|
||||
G4PenelopeRayleighModel.hh
|
||||
G4PenelopeRayleighModelMI.hh
|
||||
G4PenelopeSamplingData.hh
|
||||
G4PhotoElectricAngularGeneratorPolarized.hh
|
||||
G4PhotoElectricAngularGeneratorSauterGavrila.hh
|
||||
@@ -220,7 +196,7 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4LivermoreBremsstrahlungModel.cc
|
||||
G4LivermoreComptonModel.cc
|
||||
G4LivermoreComptonModifiedModel.cc
|
||||
G4LivermoreGammaConversion5DModel.cc
|
||||
G4LivermoreGammaConversion5DModel.cc
|
||||
G4LivermoreGammaConversionModel.cc
|
||||
G4LivermoreGammaConversionModelRC.cc
|
||||
G4LivermoreIonisationCrossSection.cc
|
||||
@@ -238,20 +214,21 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4LowEPComptonModel.cc
|
||||
G4LowEPPolarizedComptonModel.cc
|
||||
G4LowEWentzelVIModel.cc
|
||||
G4MIData.cc
|
||||
G4MicroElecCrossSectionDataSet.cc
|
||||
G4MicroElecElastic.cc
|
||||
G4MicroElecElasticModel.cc
|
||||
G4MicroElecInelastic.cc
|
||||
G4MicroElecInelasticModel.cc
|
||||
G4MicroElecSiStructure.cc
|
||||
G4MuElecCrossSectionDataSet.cc
|
||||
G4MuElecElastic.cc
|
||||
G4MuElecElasticModel.cc
|
||||
G4MuElecInelastic.cc
|
||||
G4MuElecInelasticModel.cc
|
||||
G4MuElecSiStructure.cc
|
||||
G4MicroElecCrossSectionDataSet_new.cc
|
||||
G4MicroElecElasticModel_new.cc
|
||||
G4MicroElecInelastic_new.cc
|
||||
G4MicroElecInelasticModel_new.cc
|
||||
G4MicroElecLOPhononModel.cc
|
||||
G4MicroElecLOPhononScattering.cc
|
||||
G4MicroElecSurface.cc
|
||||
G4OrlicLiXsModel.cc
|
||||
G4PaulKxsModel.cc
|
||||
G4PaulKxsModel.cc
|
||||
G4PenelopeAnnihilationModel.cc
|
||||
G4PenelopeBremsstrahlungAngular.cc
|
||||
G4PenelopeBremsstrahlungFS.cc
|
||||
@@ -266,6 +243,7 @@ GEANT4_DEFINE_MODULE(NAME G4emlowenergy
|
||||
G4PenelopeOscillatorManager.cc
|
||||
G4PenelopePhotoElectricModel.cc
|
||||
G4PenelopeRayleighModel.cc
|
||||
G4PenelopeRayleighModelMI.cc
|
||||
G4PenelopeSamplingData.cc
|
||||
G4PhotoElectricAngularGeneratorPolarized.cc
|
||||
G4PhotoElectricAngularGeneratorSauterGavrila.cc
|
||||
|
||||
@@ -330,7 +330,7 @@ void G4FluoData::PrintData()
|
||||
{
|
||||
G4int id = StartShellId(k,i);
|
||||
// let's start from 1 because the first (index = 0) element of the vector
|
||||
// is the id of the intial vacancy
|
||||
// is the id of the initial vacancy
|
||||
G4double e = StartShellEnergy(k,i) /MeV;
|
||||
G4double p = StartShellProb(k,i);
|
||||
G4cout << k <<") Shell id: " << id <<G4endl;
|
||||
|
||||
@@ -74,7 +74,7 @@ G4bool G4JAEAElasticScattering::IsApplicable(const G4ParticleDefinition& p)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//intialize the process
|
||||
//initialize the process
|
||||
void G4JAEAElasticScattering::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
if(!isInitialised) {
|
||||
|
||||
+17
-14
@@ -203,7 +203,7 @@ if( !ES_Data_Buffer.is_open() )
|
||||
}
|
||||
|
||||
dataCS[Z] = new G4LPhysicsFreeVector(300,0.01,3.);
|
||||
|
||||
|
||||
for (G4int i=0;i<300;++i)
|
||||
dataCS[Z]->PutValue(i,10.*i*1e-3,Polarized_ES_Data[Z]->at(i)*1e-22);
|
||||
|
||||
@@ -326,7 +326,7 @@ G4int energyindex=round(100*photonEnergy0)-1;
|
||||
//G4double theta =45.*CLHEP::pi/180.;
|
||||
//Theta is in degree to call scattering amplitudes
|
||||
G4int theta_in_degree =round(theta*180./CLHEP::pi);
|
||||
|
||||
|
||||
//theta_in_degree=45;
|
||||
|
||||
G4double am1=0,am2=0,am3=0,am4=0,aparaSquare=0,aperpSquare=0,apara_aper_Asterisk=0,img_apara_aper_Asterisk=0;
|
||||
@@ -347,7 +347,7 @@ G4int energyindex=round(100*photonEnergy0)-1;
|
||||
G4ThreeVector Polarization_Linear1(0.,0.,0.);
|
||||
G4ThreeVector Polarization_Linear2(0.,0.,0.);
|
||||
G4ThreeVector Polarization_Circular(0.,0.,0.);
|
||||
|
||||
|
||||
|
||||
//Stokes parameters for the incoming and outgoing photon
|
||||
G4double Xi1=0, Xi2=0, Xi3=0, Xi1_Prime=0,Xi2_Prime=0,Xi3_Prime=0;
|
||||
@@ -358,13 +358,14 @@ Xi1=gammaPolarization0.x();
|
||||
Xi2=gammaPolarization0.y();
|
||||
Xi3=gammaPolarization0.z();
|
||||
|
||||
//Polarization vector must be unit vector
|
||||
G4double polarization_magnitude=Xi1*Xi1+Xi2*Xi2+Xi3*Xi3;
|
||||
if ((polarization_magnitude)>1 || (Xi1*Xi1>1) || (Xi2*Xi2>1) || (Xi3*Xi3>1))
|
||||
{
|
||||
G4cout<<"WARNING: G4JAEAPolarizedElasticScatteringModel is only compatible with a unit polarization vector."<<G4endl;
|
||||
G4cout<<"The event is ignored."<<G4endl;
|
||||
return;
|
||||
//Polarization vector must be unit vector (5% tolerance)
|
||||
|
||||
if ((gammaPolarization0.mag())>1.05 || (Xi1*Xi1>1.05) || (Xi2*Xi2>1.05) || (Xi3*Xi3>1.05))
|
||||
{
|
||||
G4Exception("G4JAEAPolarizedElasticScatteringModel::SampleSecondaries()","em1006",
|
||||
JustWarning,
|
||||
"WARNING: G4JAEAPolarizedElasticScatteringModel is only compatible with a unit polarization vector.");
|
||||
return;
|
||||
}
|
||||
//Unpolarized gamma rays
|
||||
if (Xi1==0 && Xi2==0 && Xi3==0)
|
||||
@@ -509,10 +510,12 @@ G4double prob2=dsigmaL2/totalSigma;
|
||||
G4double probc=1-(prob1+prob2);
|
||||
|
||||
//Check the Probability of polarization mixing
|
||||
if (abs(probc - dsigmaC)>=0.0001)
|
||||
{
|
||||
G4cout<<"WARNING: Polarization mixing might be incorrect."<<G4endl;
|
||||
}
|
||||
if (abs(probc - dsigmaC/totalSigma)>=0.0001)
|
||||
{
|
||||
G4Exception("G4JAEAPolarizedElasticScatteringModel::SampleSecondaries()","em1007",
|
||||
JustWarning,
|
||||
"WARNING: Polarization mixing might be incorrect.");
|
||||
}
|
||||
|
||||
// Generate outgoing photon direction
|
||||
G4ThreeVector finaldirection(0.0,0.0,0.0);
|
||||
|
||||
@@ -206,7 +206,7 @@ void G4LivermoreComptonModifiedModel::SampleSecondaries(std::vector<G4DynamicPar
|
||||
|
||||
G4double epsilon0Local = 1. / (1. + 2. * e0m);
|
||||
G4double epsilon0Sq = epsilon0Local * epsilon0Local;
|
||||
G4double alpha1 = -std::log(epsilon0Local);
|
||||
G4double alpha1 = -G4Log(epsilon0Local);
|
||||
G4double alpha2 = 0.5 * (1. - epsilon0Sq);
|
||||
|
||||
G4double wlPhoton = h_Planck*c_light/photonEnergy0;
|
||||
|
||||
@@ -353,7 +353,7 @@ void G4LivermorePolarizedComptonModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
|
||||
G4double epsilon0Local = 1./(1. + 2*E0_m);
|
||||
G4double epsilon0Sq = epsilon0Local*epsilon0Local;
|
||||
G4double alpha1 = - std::log(epsilon0Local);
|
||||
G4double alpha1 = - G4Log(epsilon0Local);
|
||||
G4double alpha2 = 0.5*(1.- epsilon0Sq);
|
||||
|
||||
G4double wlGamma = h_Planck*c_light/gammaEnergy0;
|
||||
|
||||
Executable → Regular
+16
-41
@@ -23,51 +23,26 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// gpaterno, March 2019
|
||||
//
|
||||
// G4MuElecSiStructure.hh, 2011/08/29 A.Valentin, M. Raine
|
||||
//
|
||||
// Based on the following publications
|
||||
//
|
||||
// - Inelastic cross-sections of low energy electrons in silicon
|
||||
// for the simulation of heavy ion tracks with theGeant4-DNA toolkit,
|
||||
// NSS Conf. Record 2010, pp. 80-85
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for electrons in Si,
|
||||
// NIM B, vol. 288, pp. 66-73, 2012.
|
||||
// - Geant4 physics processes for microdosimetry simulation:
|
||||
// very low energy electromagnetic models for protons and
|
||||
// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012.
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4MIData.hh"
|
||||
|
||||
#ifndef G4MUELECSISTRUCTURE_HH
|
||||
#define G4MUELECSISTRUCTURE_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
|
||||
class G4MuElecSiStructure
|
||||
{
|
||||
public:
|
||||
|
||||
G4MuElecSiStructure();
|
||||
|
||||
virtual ~G4MuElecSiStructure();
|
||||
|
||||
G4double Energy(G4int level);
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4int NumberOfLevels() { return nLevels; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Number of levels of silicon
|
||||
G4int nLevels;
|
||||
G4MIData::G4MIData(const G4String& name):
|
||||
G4VMaterialExtension(name),
|
||||
fFilenameFF(""),
|
||||
fFilenameCS(""),
|
||||
fMolWeight(0.)
|
||||
{;}
|
||||
|
||||
std::vector<G4double> energyConstant;
|
||||
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#endif
|
||||
G4MIData::~G4MIData() {;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
+145
-95
@@ -27,14 +27,17 @@
|
||||
// Based on G4DNACrossSectionDataSet
|
||||
//
|
||||
|
||||
#include "G4MuElecCrossSectionDataSet.hh"
|
||||
#include "G4MicroElecCrossSectionDataSet_new.hh"
|
||||
#include "G4VDataSetAlgorithm.hh"
|
||||
#include "G4EMDataSet.hh"
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
G4MuElecCrossSectionDataSet::G4MuElecCrossSectionDataSet(G4VDataSetAlgorithm* argAlgorithm,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
G4MicroElecCrossSectionDataSet_new::G4MicroElecCrossSectionDataSet_new(G4VDataSetAlgorithm* argAlgorithm,
|
||||
G4double argUnitEnergies,
|
||||
G4double argUnitData)
|
||||
:
|
||||
@@ -43,7 +46,9 @@ G4MuElecCrossSectionDataSet::G4MuElecCrossSectionDataSet(G4VDataSetAlgorithm* ar
|
||||
z = 0;
|
||||
}
|
||||
|
||||
G4MuElecCrossSectionDataSet::~G4MuElecCrossSectionDataSet()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4MicroElecCrossSectionDataSet_new::~G4MicroElecCrossSectionDataSet_new()
|
||||
{
|
||||
CleanUpComponents();
|
||||
|
||||
@@ -51,38 +56,41 @@ G4MuElecCrossSectionDataSet::~G4MuElecCrossSectionDataSet()
|
||||
delete algorithm;
|
||||
}
|
||||
|
||||
G4bool G4MuElecCrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
G4bool G4MicroElecCrossSectionDataSet_new::LoadData(const G4String & argFileName)
|
||||
{
|
||||
CleanUpComponents();
|
||||
|
||||
G4cout << "loaddata : " << argFileName << G4endl;
|
||||
G4String fullFileName(FullFileName(argFileName));
|
||||
std::ifstream in(fullFileName, std::ifstream::binary|std::ifstream::in);
|
||||
|
||||
|
||||
if (!in.is_open())
|
||||
{
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" not found";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0003",
|
||||
FatalException,message);
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0003",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::vector<G4DataVector *> columns;
|
||||
std::vector<G4DataVector *> log_columns;
|
||||
|
||||
|
||||
std::stringstream *stream(new std::stringstream);
|
||||
char c;
|
||||
G4bool comment(false);
|
||||
G4bool space(true);
|
||||
G4bool first(true);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
while (!in.eof())
|
||||
{
|
||||
in.get(c);
|
||||
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\r':
|
||||
@@ -91,62 +99,74 @@ G4bool G4MuElecCrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
{
|
||||
unsigned long i(0);
|
||||
G4double value;
|
||||
|
||||
|
||||
while (!stream->eof())
|
||||
{
|
||||
(*stream) >> value;
|
||||
|
||||
|
||||
while (i>=columns.size())
|
||||
{
|
||||
columns.push_back(new G4DataVector);
|
||||
log_columns.push_back(new G4DataVector);
|
||||
columns.push_back(new G4DataVector);
|
||||
log_columns.push_back(new G4DataVector);
|
||||
}
|
||||
|
||||
|
||||
columns[i]->push_back(value);
|
||||
|
||||
// N. A. Karakatsanis
|
||||
// A condition is applied to check if negative or zero values are present in the dataset.
|
||||
// If yes, then a near-zero value is applied to allow the computation of the logarithmic value
|
||||
// If a value is zero, this simplification is acceptable
|
||||
// If a value is negative, then it is not acceptable and the data of the particular column of
|
||||
// logarithmic values should not be used by interpolation methods.
|
||||
//
|
||||
// Therefore, G4LogLogInterpolation and G4LinLogLogInterpolation should not be used if negative values are present.
|
||||
// Instead, G4LinInterpolation is safe in every case
|
||||
// SemiLogInterpolation is safe only if the energy columns are non-negative
|
||||
// G4LinLogInterpolation is safe only if the cross section data columns are non-negative
|
||||
|
||||
|
||||
// N. A. Karakatsanis
|
||||
// A condition is applied to check if negative or zero values are present in the dataset.
|
||||
// If yes, then a near-zero value is applied to allow the computation of the logarithmic value
|
||||
// If a value is zero, this simplification is acceptable
|
||||
// If a value is negative, then it is not acceptable and the data of the particular column of
|
||||
// logarithmic values should not be used by interpolation methods.
|
||||
//
|
||||
// Therefore, G4LogLogInterpolation and G4LinLogLogInterpolation should not be used if negative values are present.
|
||||
// Instead, G4LinInterpolation is safe in every case
|
||||
// SemiLogInterpolation is safe only if the energy columns are non-negative
|
||||
// G4LinLogInterpolation is safe only if the cross section data columns are non-negative
|
||||
|
||||
if (value <=0.) value = 1e-300;
|
||||
log_columns[i]->push_back(std::log10(value));
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
delete stream;
|
||||
stream=new std::stringstream;
|
||||
}
|
||||
|
||||
|
||||
first=true;
|
||||
comment=false;
|
||||
space=true;
|
||||
break;
|
||||
|
||||
|
||||
case '#':
|
||||
comment=true;
|
||||
break;
|
||||
|
||||
|
||||
case '\t':
|
||||
case ' ':
|
||||
space = true;
|
||||
break;
|
||||
|
||||
c=' ';
|
||||
break;
|
||||
//case ' ':
|
||||
// if (space)
|
||||
// break;
|
||||
default:
|
||||
if (comment) { break; }
|
||||
if (space && (!first)) { (*stream) << ' '; }
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
if ((c==' ') && space)
|
||||
break;
|
||||
|
||||
if (comment)
|
||||
break;
|
||||
|
||||
if (c==' ')
|
||||
space=true;
|
||||
else
|
||||
{
|
||||
if (space && (!first))
|
||||
(*stream) << ' ';
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,43 +175,43 @@ G4bool G4MuElecCrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
// some implementations of STL could throw a "failture" exception
|
||||
// when read wants read characters after end of file
|
||||
}
|
||||
|
||||
|
||||
delete stream;
|
||||
|
||||
|
||||
std::vector<G4DataVector *>::size_type maxI(columns.size());
|
||||
|
||||
|
||||
if (maxI<2)
|
||||
{
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" should have at least two columns";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0005",
|
||||
FatalException,message);
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0005",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
std::vector<G4DataVector*>::size_type i(1);
|
||||
while (i<maxI)
|
||||
{
|
||||
G4DataVector::size_type maxJ(columns[i]->size());
|
||||
|
||||
|
||||
if (maxJ!=columns[0]->size())
|
||||
{
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" has lines with a different number of columns";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0005",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
G4DataVector::size_type j(0);
|
||||
|
||||
|
||||
G4DataVector *argEnergies=new G4DataVector;
|
||||
G4DataVector *argData=new G4DataVector;
|
||||
G4DataVector *argLogEnergies=new G4DataVector;
|
||||
G4DataVector *argLogData=new G4DataVector;
|
||||
|
||||
|
||||
while(j<maxJ)
|
||||
{
|
||||
argEnergies->push_back(columns[0]->operator[] (j)*GetUnitEnergies());
|
||||
@@ -200,12 +220,12 @@ G4bool G4MuElecCrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
argLogData->push_back(log_columns[i]->operator[] (j) + std::log10(GetUnitData()));
|
||||
j++;
|
||||
}
|
||||
|
||||
|
||||
AddComponent(new G4EMDataSet(i-1, argEnergies, argData, argLogEnergies, argLogData, GetAlgorithm()->Clone(), GetUnitEnergies(), GetUnitData()));
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
i=maxI;
|
||||
while (i>0)
|
||||
{
|
||||
@@ -217,8 +237,11 @@ G4bool G4MuElecCrossSectionDataSet::LoadData(const G4String & argFileName)
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
|
||||
|
||||
G4bool G4MicroElecCrossSectionDataSet_new::LoadNonLogData(const G4String & argFileName)
|
||||
{
|
||||
CleanUpComponents();
|
||||
|
||||
@@ -230,7 +253,7 @@ G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" not found";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0003",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0003",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
@@ -284,19 +307,27 @@ G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
case '#':
|
||||
comment=true;
|
||||
break;
|
||||
|
||||
case '\t':
|
||||
case ' ':
|
||||
space = true;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (comment) { break; }
|
||||
if (space && (!first)) { (*stream) << ' '; }
|
||||
if( c=='\t')
|
||||
c=' ';
|
||||
if( c==' ' && space)
|
||||
break;
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
if (comment)
|
||||
break;
|
||||
|
||||
if (c==' ')
|
||||
space=true;
|
||||
else
|
||||
{
|
||||
if (space && (!first))
|
||||
(*stream) << ' ';
|
||||
|
||||
first=false;
|
||||
(*stream) << c;
|
||||
space=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,7 +346,7 @@ G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" should have at least two columns";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0005",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
@@ -325,12 +356,13 @@ G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
{
|
||||
G4DataVector::size_type maxJ(columns[i]->size());
|
||||
|
||||
|
||||
if (maxJ!=columns[0]->size())
|
||||
{
|
||||
G4String message("Data file \"");
|
||||
message+=fullFileName;
|
||||
message+="\" has lines with a different number of columns.";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::LoadData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::LoadData","em0005",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
@@ -362,14 +394,16 @@ G4bool G4MuElecCrossSectionDataSet::LoadNonLogData(const G4String & argFileName)
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4MuElecCrossSectionDataSet::SaveData(const G4String & argFileName) const
|
||||
|
||||
G4bool G4MicroElecCrossSectionDataSet_new::SaveData(const G4String & argFileName) const
|
||||
{
|
||||
const size_t n(NumberOfComponents());
|
||||
|
||||
if (n==0)
|
||||
{
|
||||
G4Exception("G4MuElecCrossSectionDataSet::SaveData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::SaveData","em0005",
|
||||
FatalException,"Expected at least one component");
|
||||
|
||||
return false;
|
||||
@@ -383,7 +417,7 @@ G4bool G4MuElecCrossSectionDataSet::SaveData(const G4String & argFileName) const
|
||||
G4String message("Cannot open \"");
|
||||
message+=fullFileName;
|
||||
message+="\"";
|
||||
G4Exception("G4MuElecCrossSectionDataSet::SaveData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::SaveData","em0005",
|
||||
FatalException,message);
|
||||
return false;
|
||||
}
|
||||
@@ -431,27 +465,29 @@ G4bool G4MuElecCrossSectionDataSet::SaveData(const G4String & argFileName) const
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4String G4MuElecCrossSectionDataSet::FullFileName(const G4String& argFileName) const
|
||||
G4String G4MicroElecCrossSectionDataSet_new::FullFileName(const G4String& argFileName) const
|
||||
{
|
||||
char* path = std::getenv("G4LEDATA");
|
||||
|
||||
char *path = std::getenv("G4LEDATA");
|
||||
if (!path)
|
||||
{
|
||||
G4Exception("G4MuElecCrossSectionDataSet::FullFileName","em0006",
|
||||
FatalException,"G4LEDATA environment variable not set.");
|
||||
|
||||
return "";
|
||||
}
|
||||
{
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::Initialise","em0006",FatalException,"G4LEDATA environment variable not set.");
|
||||
return "";
|
||||
}
|
||||
|
||||
//Reading DCS file
|
||||
|
||||
std::ostringstream fullFileName;
|
||||
|
||||
fullFileName << path << "/" << argFileName << ".dat";
|
||||
|
||||
fullFileName << path << "/microelec/" << argFileName << ".dat";
|
||||
return G4String(fullFileName.str().c_str());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4MuElecCrossSectionDataSet::FindValue(G4double argEnergy, G4int /* argComponentId */) const
|
||||
|
||||
G4double G4MicroElecCrossSectionDataSet_new::FindValue(G4double argEnergy, G4int /* argComponentId */) const
|
||||
{
|
||||
// Returns the sum over the shells corresponding to e
|
||||
G4double value = 0.;
|
||||
@@ -468,8 +504,17 @@ G4double G4MuElecCrossSectionDataSet::FindValue(G4double argEnergy, G4int /* arg
|
||||
return value;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuElecCrossSectionDataSet::PrintData(void) const
|
||||
G4double G4MicroElecCrossSectionDataSet_new::FindShellValue(G4double argEnergy, G4int shell) const
|
||||
{
|
||||
return components.at(shell)->FindValue(argEnergy);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
void G4MicroElecCrossSectionDataSet_new::PrintData(void) const
|
||||
{
|
||||
const size_t n(NumberOfComponents());
|
||||
|
||||
@@ -486,8 +531,10 @@ void G4MuElecCrossSectionDataSet::PrintData(void) const
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuElecCrossSectionDataSet::SetEnergiesData(G4DataVector* argEnergies,
|
||||
|
||||
void G4MicroElecCrossSectionDataSet_new::SetEnergiesData(G4DataVector* argEnergies,
|
||||
G4DataVector* argData,
|
||||
G4int argComponentId)
|
||||
{
|
||||
@@ -502,13 +549,14 @@ void G4MuElecCrossSectionDataSet::SetEnergiesData(G4DataVector* argEnergies,
|
||||
std::ostringstream message;
|
||||
message << "Component " << argComponentId << " not found";
|
||||
|
||||
G4Exception("G4MuElecCrossSectionDataSet::SetEnergiesData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::SetEnergiesData","em0005",
|
||||
FatalException,message.str().c_str());
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuElecCrossSectionDataSet::SetLogEnergiesData(G4DataVector* argEnergies,
|
||||
void G4MicroElecCrossSectionDataSet_new::SetLogEnergiesData(G4DataVector* argEnergies,
|
||||
G4DataVector* argData,
|
||||
G4DataVector* argLogEnergies,
|
||||
G4DataVector* argLogData,
|
||||
@@ -525,13 +573,14 @@ void G4MuElecCrossSectionDataSet::SetLogEnergiesData(G4DataVector* argEnergies,
|
||||
std::ostringstream message;
|
||||
message << "Component " << argComponentId << " not found";
|
||||
|
||||
G4Exception("G4MuElecCrossSectionDataSet::SetLogEnergiesData","em0005",
|
||||
G4Exception("G4MicroElecCrossSectionDataSet_new::SetLogEnergiesData","em0005",
|
||||
FatalException,message.str().c_str());
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuElecCrossSectionDataSet::CleanUpComponents()
|
||||
void G4MicroElecCrossSectionDataSet_new::CleanUpComponents()
|
||||
{
|
||||
while (!components.empty())
|
||||
{
|
||||
@@ -540,4 +589,5 @@ void G4MuElecCrossSectionDataSet::CleanUpComponents()
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user