Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -1,4 +1,4 @@
$Id: History 103623 2017-04-19 13:24:15Z gcosmo $
$Id: History 109861 2018-05-09 12:17:57Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,6 +14,19 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
09-05-18 B.Morgan (testem13-V10-04-03)
- Include G4Types before use of G4MULTITHREADED. For forward
compatibility with move to #defines over -D for G4 preprocessor
symbols.
09-04-18 mma (testem13-V10-04-02)
- testem13.cc : set visualisation only in interactive mode
19-03-18 mma (testem13-V10-04-01)
- testem13.cc : remove G4UI_USE and G4VIS_USE
21-12-17 mma (testem13-V10-04-00)
- update PhysListEmStandard, livermore, penelope
19-04-17 mma (testem13-V10-03-00)
- BeginOfRunAction() : remove SetRandomNumberStore(true)
@@ -26,10 +26,11 @@
/// \file electromagnetic/TestEm13/TestEm13.cc
/// \brief Main program of the electromagnetic/TestEm13 example
//
// $Id: TestEm13.cc 85259 2014-10-27 08:52:40Z gcosmo $
//
// $Id: TestEm13.cc 109861 2018-05-09 12:17:57Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
@@ -45,21 +46,20 @@
#include "ActionInitialization.hh"
#include "SteppingVerbose.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
#include "G4VisExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv) {
//detect interactive mode (if no arguments) and define UI session
G4UIExecutive* ui = nullptr;
if (argc == 1) ui = new G4UIExecutive(argc,argv);
//choose the Random engine
G4Random::setTheEngine(new CLHEP::RanecuEngine);
// Construct the default run manager
#ifdef G4MULTITHREADED
G4MTRunManager* runManager = new G4MTRunManager;
@@ -71,45 +71,35 @@ int main(int argc,char** argv) {
G4RunManager* runManager = new G4RunManager;
#endif
// set mandatory initialization classes
//set mandatory initialization classes
DetectorConstruction* det = new DetectorConstruction;
runManager->SetUserInitialization(det);
runManager->SetUserInitialization(new PhysicsList);
runManager->SetUserInitialization(new ActionInitialization(det));
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
else //define visualization and UI terminal for interactive mode
{
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
//initialize visualization
G4VisManager* visManager = nullptr;
//get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (ui) {
//interactive mode
visManager = new G4VisExecutive;
visManager->Initialize();
#endif
ui->SessionStart();
delete ui;
}
else {
//batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
ui->SessionStart();
delete ui;
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
}
// job termination
//
//job termination
delete visManager;
delete runManager;
return 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -4,7 +4,7 @@
############################################
**************************************************************
Geant4 version Name: geant4-10-04-patch-02 (25-May-2018)
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
@@ -190,6 +190,80 @@
=======================================================================
====== Electromagnetic Physics Parameters ========
=======================================================================
LPM effect enabled 1
Spline of EM tables enabled 1
Apply cuts on all EM processes 0
Use integral approach for tracking 1
X-section factor for integral approach 0.8
Min kinetic energy for tables 10 eV
Max kinetic energy for tables 10 TeV
Number of bins in tables 120
Number of bins per decade of a table 10
Verbose level 0
Verbose level for worker thread 0
Bremsstrahlung energy threshold above which
primary is added to the list of secondary 100 TeV
Lowest triplet kinetic energy 1 MeV
5D gamma conversion model type 0
5D gamma conversion model on isolated ion 0
=======================================================================
====== Ionisation Parameters ========
=======================================================================
Step function for e+- (0.2, 1 mm)
Step function for muons/hadrons (0.2, 0.1 mm)
Lowest e+e- kinetic energy 1 keV
Lowest muon/hadron kinetic energy 1 keV
Fluctuations of dE/dx are enabled 1
Use built-in Birks satuaration 0
Build CSDA range enabled 1
Use cut as a final range enabled 1
Enable angular generator interface 0
Factor of cut reduction for sub-cutoff method 1
Max kinetic energy for CSDA tables 10 TeV
Linear loss limit 0.01
=======================================================================
====== Multiple Scattering Parameters ========
=======================================================================
Type of msc step limit algorithm for e+- 1
Type of msc step limit algorithm for muons/hadrons 0
Msc lateral displacement for e+- enabled 1
Msc lateral displacement for muons and hadrons 0
Urban msc model lateral displacement alg96 1
Msc lateral displacement beyond geometry safety 0
Range factor for msc step limit for e+- 0.04
Range factor for msc step limit for muons/hadrons 0.2
Geometry factor for msc step limitation of e+- 2.5
Skin parameter for msc step limitation of e+- 1
Use Mott correction for e- scattering 0
Factor used for dynamic computation of angular
limit between single and multiple scattering 1
Fixed angular limit between single
and multiple scattering 3.1416 rad
Upper energy limit for e+- multiple scattering 100 MeV
Type of nuclear form-factor 1
Screening factor 1
=======================================================================
====== Atomic Deexcitation Parameters ========
=======================================================================
Fluorescence enabled 0
Fluorescence Bearden data files enabled 0
Auger electron production enabled 0
Auger cascade enabled 0
PIXE atomic de-excitation enabled 0
De-excitation module ignores cuts 0
Type of PIXE cross section for hadrons Empirical
Type of PIXE cross section for e+- Livermore
=======================================================================
====== DNA Physics Parameters ========
=======================================================================
Use fast sampling in DNA models 0
Use Stationary option in DNA models 0
Use DNA with multiple scattering of e- 0
Use DNA e- solvation model type 3
=======================================================================
/control/cout/ignoreThreadsExcept 0
/run/numberOfThreads 2
*** /run/numberOfThreads command is issued in sequential mode.
@@ -217,170 +291,6 @@ physicsList->setCut() start.
/gun/energy 100 keV
/run/beamOn 1000000
### === Deexcitation model UAtomDeexcitation is activated for 1 region:
DefaultRegionForTheWorld 1 0 0
### === Ignore cuts flag: 0
phot: for gamma SubType= 12 BuildTable= 0
LambdaPrime table from 200 keV to 100 TeV in 61 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
PhotoElectric : Emin= 0 eV Emax= 100 TeV AngularGenSauterGavrila FluoActive
compt: for gamma SubType= 13 BuildTable= 1
Lambda table from 100 eV to 1 MeV, 7 bins per decade, spline: 1
LambdaPrime table from 1 MeV to 100 TeV in 56 bins
===== EM models for the G4Region DefaultRegionForTheWorld ======
KleinNishina : Emin= 0 eV Emax= 100 TeV FluoActive
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 18 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
BetheHeitler : Emin= 0 eV Emax= 80 GeV
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV
eIoni: for e- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV
eBrem: for e- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 100 TeV DipBustGen
eIoni: for e+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV
eBrem: for e+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
===== EM models for the G4Region DefaultRegionForTheWorld ======
eBremSB : Emin= 0 eV Emax= 1 GeV DipBustGen
eBremLPM : Emin= 1 GeV Emax= 100 TeV DipBustGen
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
eplus2gg : Emin= 0 eV Emax= 100 TeV
hIoni: for proton SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
ionIoni: for GenericIon SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.02
Stopping Power data for 17 ion/material pairs
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
ionIoni: for alpha SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.02
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 7.9452 MeV
BetheBloch : Emin= 7.9452 MeV Emax= 100 TeV
hIoni: for anti_proton SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
hIoni: for kaon+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 1.05231 MeV
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV
hIoni: for kaon- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV
BetheBloch : Emin= 1.05231 MeV Emax= 100 TeV
muIoni: for mu+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu+ SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu+ SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
muIoni: for mu- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 200 keV
BetheBloch : Emin= 200 keV Emax= 1 GeV
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
muBrems: for mu- SubType= 3
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
===== EM models for the G4Region DefaultRegionForTheWorld ======
MuBrem : Emin= 0 eV Emax= 100 TeV
muPairProd: for mu- SubType= 4
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
Sampling table 21x1001 from 1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
hIoni: for pi+ SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 297.505 keV
BetheBloch : Emin= 297.505 keV Emax= 100 TeV
hIoni: for pi- SubType= 2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins per decade, spline: 1
finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 0, fluct: 1, linLossLimit= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
ICRU73QO : Emin= 0 eV Emax= 297.505 keV
BetheBloch : Emin= 297.505 keV Emax= 100 TeV
Region <DefaultRegionForTheWorld> -- -- appears in <Water> world volume
This region is in the mass world.
Root logical volume(s) : Water
@@ -429,16 +339,16 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 1000000
User=3.77s Real=3.84s Sys=0s
User=2.390000s Real=2.393938s Sys=0.000000s
======================== run summary ======================
The run is: 1000000 gamma of 100 keV through 1 cm of Water (density: 1 g/cm3 )
Process calls frequency ---> Transportation = 848108 compt = 149454 phot = 2438
Process calls frequency ---> Transportation = 848111 compt = 149451 phot = 2438
Nb of incident particles unaltered after 1 cm of Water : 848108 over 1000000 incident particles. Ratio = 84.811 %
---> CrossSection per volume: 0.16475 cm^-1 CrossSection per mass: 16.475 mm2/g
Nb of incident particles unaltered after 1 cm of Water : 848111 over 1000000 incident particles. Ratio = 84.811 %
---> CrossSection per volume: 0.16474 cm^-1 CrossSection per mass: 16.474 mm2/g
Verification from G4EmCalculator:
compt= 16.23 mm2/g phot= 268.53 um2/mg total= 16.499 mm2/g
@@ -446,7 +356,7 @@ Run Summary
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2057473516, 471837972
Current couple of seeds = 960058740, 713497341
----------------------------------------
#
/gun/particle e-
@@ -481,7 +391,7 @@ Index : 0 used in the geometry : Yes
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2057473516, 471837972
Current couple of seeds = 960058740, 713497341
----------------------------------------
--> Event 0 starts.
--> Event 100000 starts.
@@ -496,24 +406,24 @@ Index : 0 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 1000000
User=4.52s Real=4.57s Sys=0s
User=3.740000s Real=3.748299s Sys=0.000000s
======================== run summary ======================
The run is: 1000000 e- of 100 MeV through 1 cm of Water (density: 1 g/cm3 )
Process calls frequency ---> Transportation = 538607 eBrem = 280952 eIoni = 180441
Process calls frequency ---> Transportation = 538445 eBrem = 281621 eIoni = 179934
Nb of incident particles unaltered after 1 cm of Water : 538607 over 1000000 incident particles. Ratio = 53.861 %
---> CrossSection per volume: 0.61877 cm^-1 CrossSection per mass: 61.877 mm2/g
Nb of incident particles unaltered after 1 cm of Water : 538445 over 1000000 incident particles. Ratio = 53.844 %
---> CrossSection per volume: 0.61907 cm^-1 CrossSection per mass: 61.907 mm2/g
Verification from G4EmCalculator:
eBrem= 37.785 mm2/g eIoni= 24.166 mm2/g total= 61.951 mm2/g
Expected ratio of transmitted particles= 53.821 %
eBrem= 37.788 mm2/g eIoni= 24.166 mm2/g total= 61.954 mm2/g
Expected ratio of transmitted particles= 53.819 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1482891196, 389999874
Current couple of seeds = 465323437, 45964080
----------------------------------------
G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
@@ -23,18 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmLivermore.cc
/// \file electromagnetic/TestEm18/src/PhysListEmLivermore.cc
/// \brief Implementation of the PhysListEmLivermore class
//
//
// $Id: PhysListEmLivermore.cc 100279 2016-10-17 08:34:54Z gcosmo $
// $Id: PhysListEmLivermore.cc 108103 2017-12-22 12:38:12Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmLivermore.hh"
#include "G4BuilderType.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PhysicsListHelper.hh"
// gamma
@@ -74,13 +76,30 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
// deexcitation
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmLivermore::PhysListEmLivermore(const G4String& name)
: G4VPhysicsConstructor(name)
{ }
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetMinEnergy(10*eV);
param->SetMaxEnergy(10*TeV);
param->SetNumberOfBinsPerDecade(10);
param->SetBuildCSDARange(true);
param->SetMaxEnergyForCSDARange(10*TeV);
SetPhysicsType(bElectromagnetic);
param->SetVerbose(0);
param->Dump();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -91,13 +110,14 @@ PhysListEmLivermore::~PhysListEmLivermore()
void PhysListEmLivermore::ConstructProcess()
{
// Add standard EM Processes
G4PhysicsListHelper* list = G4PhysicsListHelper::GetPhysicsListHelper();
// Add Livermore EM Processes
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
//Applicability range for Livermore models
@@ -112,28 +132,28 @@ void PhysListEmLivermore::ConstructProcess()
photModel = new G4LivermorePhotoElectricModel();
photModel->SetHighEnergyLimit(highEnergyLimit);
phot->AddEmModel(0, photModel);
pmanager->AddDiscreteProcess(phot);
list->RegisterProcess(phot, particle);
G4ComptonScattering* compt = new G4ComptonScattering();
G4LivermoreComptonModel*
comptModel = new G4LivermoreComptonModel();
comptModel->SetHighEnergyLimit(highEnergyLimit);
compt->AddEmModel(0, comptModel);
pmanager->AddDiscreteProcess(compt);
list->RegisterProcess(compt, particle);
G4GammaConversion* conv = new G4GammaConversion();
G4LivermoreGammaConversionModel*
convModel = new G4LivermoreGammaConversionModel();
convModel->SetHighEnergyLimit(highEnergyLimit);
conv->AddEmModel(0, convModel);
pmanager->AddDiscreteProcess(conv);
list->RegisterProcess(conv, particle);
G4RayleighScattering* rayl = new G4RayleighScattering();
G4LivermoreRayleighModel*
raylModel = new G4LivermoreRayleighModel();
raylModel->SetHighEnergyLimit(highEnergyLimit);
rayl->AddEmModel(0, raylModel);
pmanager->AddDiscreteProcess(rayl);
list->RegisterProcess(rayl, particle);
} else if (particleName == "e-") {
//electron
@@ -143,38 +163,42 @@ void PhysListEmLivermore::ConstructProcess()
eIoniModel = new G4LivermoreIonisationModel();
eIoniModel->SetHighEnergyLimit(highEnergyLimit);
eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
pmanager->AddProcess(eIoni, -1,-1, 1);
list->RegisterProcess(eIoni, particle);
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4LivermoreBremsstrahlungModel*
eBremModel = new G4LivermoreBremsstrahlungModel();
eBremModel->SetHighEnergyLimit(highEnergyLimit);
eBrem->AddEmModel(0, eBremModel);
pmanager->AddProcess(eBrem, -1,-1, 2);
list->RegisterProcess(eBrem, particle);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4eIonisation, -1,-1, 1);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1, 2);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
list->RegisterProcess(new G4eIonisation, particle);
list->RegisterProcess(new G4eBremsstrahlung, particle);
list->RegisterProcess(new G4eplusAnnihilation, particle);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuIonisation, -1,-1, 1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1,-1, 2);
pmanager->AddProcess(new G4MuPairProduction, -1,-1, 3);
list->RegisterProcess(new G4MuIonisation, particle);
list->RegisterProcess(new G4MuBremsstrahlung, particle);
list->RegisterProcess(new G4MuPairProduction, particle);
} else if( particleName == "alpha" || particleName == "GenericIon" ) {
pmanager->AddProcess(new G4ionIonisation, -1,-1, 1);
list->RegisterProcess(new G4ionIonisation, particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4hIonisation, -1,-1, 1);
list->RegisterProcess(new G4hIonisation, particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* deex = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(deex);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,18 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmPenelope.cc
/// \file electromagnetic/TestEm18/src/PhysListEmPenelope.cc
/// \brief Implementation of the PhysListEmPenelope class
//
//
// $Id: PhysListEmPenelope.cc 100279 2016-10-17 08:34:54Z gcosmo $
// $Id: PhysListEmPenelope.cc 108103 2017-12-22 12:38:12Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmPenelope.hh"
#include "G4BuilderType.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PhysicsListHelper.hh"
// gamma
@@ -75,13 +77,30 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
// deexcitation
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmPenelope::PhysListEmPenelope(const G4String& name)
: G4VPhysicsConstructor(name)
{ }
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetMinEnergy(10*eV);
param->SetMaxEnergy(10*TeV);
param->SetNumberOfBinsPerDecade(10);
param->SetBuildCSDARange(true);
param->SetMaxEnergyForCSDARange(10*TeV);
SetPhysicsType(bElectromagnetic);
param->SetVerbose(0);
param->Dump();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -92,13 +111,14 @@ PhysListEmPenelope::~PhysListEmPenelope()
void PhysListEmPenelope::ConstructProcess()
{
G4PhysicsListHelper* list = G4PhysicsListHelper::GetPhysicsListHelper();
// Add standard EM Processes
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
//Applicability range for Penelope models
@@ -113,28 +133,28 @@ void PhysListEmPenelope::ConstructProcess()
photModel = new G4PenelopePhotoElectricModel();
photModel->SetHighEnergyLimit(highEnergyLimit);
phot->AddEmModel(0, photModel);
pmanager->AddDiscreteProcess(phot);
list->RegisterProcess(phot, particle);
G4ComptonScattering* compt = new G4ComptonScattering();
G4PenelopeComptonModel*
comptModel = new G4PenelopeComptonModel();
comptModel->SetHighEnergyLimit(highEnergyLimit);
compt->AddEmModel(0, comptModel);
pmanager->AddDiscreteProcess(compt);
list->RegisterProcess(compt, particle);
G4GammaConversion* conv = new G4GammaConversion();
G4PenelopeGammaConversionModel*
convModel = new G4PenelopeGammaConversionModel();
convModel->SetHighEnergyLimit(highEnergyLimit);
conv->AddEmModel(0, convModel);
pmanager->AddDiscreteProcess(conv);
list->RegisterProcess(conv, particle);
G4RayleighScattering* rayl = new G4RayleighScattering();
G4PenelopeRayleighModel*
raylModel = new G4PenelopeRayleighModel();
raylModel->SetHighEnergyLimit(highEnergyLimit);
rayl->AddEmModel(0, raylModel);
pmanager->AddDiscreteProcess(rayl);
list->RegisterProcess(rayl, particle);
} else if (particleName == "e-") {
//electron
@@ -144,14 +164,14 @@ void PhysListEmPenelope::ConstructProcess()
eIoniModel = new G4PenelopeIonisationModel();
eIoniModel->SetHighEnergyLimit(highEnergyLimit);
eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
pmanager->AddProcess(eIoni, -1,-1, 1);
list->RegisterProcess(eIoni, particle);
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4PenelopeBremsstrahlungModel*
eBremModel = new G4PenelopeBremsstrahlungModel();
eBremModel->SetHighEnergyLimit(highEnergyLimit);
eBrem->AddEmModel(0, eBremModel);
pmanager->AddProcess(eBrem, -1,-1, 2);
list->RegisterProcess(eBrem, particle);
} else if (particleName == "e+") {
//positron
@@ -160,39 +180,43 @@ void PhysListEmPenelope::ConstructProcess()
eIoniModel = new G4PenelopeIonisationModel();
eIoniModel->SetHighEnergyLimit(highEnergyLimit);
eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation() );
pmanager->AddProcess(eIoni, -1,-1, 1);
list->RegisterProcess(eIoni, particle);
G4eBremsstrahlung* eBrem = new G4eBremsstrahlung();
G4PenelopeBremsstrahlungModel*
eBremModel = new G4PenelopeBremsstrahlungModel();
eBremModel->SetHighEnergyLimit(highEnergyLimit);
eBrem->AddEmModel(0, eBremModel);
pmanager->AddProcess(eBrem, -1,-1, 2);
list->RegisterProcess(eBrem, particle);
G4eplusAnnihilation* eAnni = new G4eplusAnnihilation();
G4PenelopeAnnihilationModel*
eAnniModel = new G4PenelopeAnnihilationModel();
eAnniModel->SetHighEnergyLimit(highEnergyLimit);
eAnni->AddEmModel(0, eAnniModel);
pmanager->AddProcess(eAnni, 0,-1, 3);
list->RegisterProcess(eAnni, particle);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuIonisation, -1,-1, 1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1,-1, 2);
pmanager->AddProcess(new G4MuPairProduction, -1,-1, 3);
list->RegisterProcess(new G4MuIonisation, particle);
list->RegisterProcess(new G4MuBremsstrahlung, particle);
list->RegisterProcess(new G4MuPairProduction, particle);
} else if( particleName == "alpha" || particleName == "GenericIon" ) {
pmanager->AddProcess(new G4ionIonisation, -1,-1, 1);
list->RegisterProcess(new G4ionIonisation, particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4hIonisation, -1,-1, 1);
list->RegisterProcess(new G4hIonisation, particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* deex = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(deex);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,24 +23,26 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysListEmStandard.cc
/// \file electromagnetic/TestEm18/src/PhysListEmStandard.cc
/// \brief Implementation of the PhysListEmStandard class
//
//
// $Id: PhysListEmStandard.cc 100279 2016-10-17 08:34:54Z gcosmo $
// $Id: PhysListEmStandard.cc 108103 2017-12-22 12:38:12Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandard.hh"
#include "G4BuilderType.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4PhysicsListHelper.hh"
#include "G4RayleighScattering.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4ComptonScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
@@ -51,7 +53,12 @@
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4ionIonisation.hh"
#include "G4IonParametrisedLossModel.hh"
#include "G4NuclearStopping.hh"
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
@@ -61,72 +68,101 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandard::PhysListEmStandard(const G4String& name)
: G4VPhysicsConstructor(name)
{ }
: G4VPhysicsConstructor(name)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetMinEnergy(10*eV);
param->SetMaxEnergy(10*TeV);
param->SetNumberOfBinsPerDecade(10);
param->SetBuildCSDARange(true);
param->SetMaxEnergyForCSDARange(10*TeV);
SetPhysicsType(bElectromagnetic);
param->SetVerbose(0);
param->Dump();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandard::~PhysListEmStandard()
{ }
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEmStandard::ConstructProcess()
{
G4PhysicsListHelper* list = G4PhysicsListHelper::GetPhysicsListHelper();
// Add standard EM Processes
//
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
////pmanager->AddDiscreteProcess(new G4RayleighScattering);
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
pmanager->AddDiscreteProcess(cs);
pmanager->AddDiscreteProcess(new G4GammaConversion);
////list->RegisterProcess(new G4RayleighScattering, particle);
list->RegisterProcess(new G4PhotoElectricEffect, particle);
G4ComptonScattering* compt = new G4ComptonScattering;
compt->SetEmModel(new G4KleinNishinaModel());
list->RegisterProcess(compt, particle);
list->RegisterProcess(new G4GammaConversion, particle);
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4eIonisation, -1,-1,1);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,2);
list->RegisterProcess(new G4eIonisation(), particle);
list->RegisterProcess(new G4eBremsstrahlung(), particle);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4eIonisation, -1,-1,1);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,2);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,3);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuIonisation, -1,-1,1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1,-1,2);
pmanager->AddProcess(new G4MuPairProduction, -1,-1,3);
} else if( particleName == "alpha" || particleName == "GenericIon" ) {
pmanager->AddProcess(new G4ionIonisation, -1,-1,1);
list->RegisterProcess(new G4eIonisation(), particle);
list->RegisterProcess(new G4eBremsstrahlung(), particle);
list->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
list->RegisterProcess(new G4MuIonisation(), particle);
list->RegisterProcess(new G4MuBremsstrahlung(), particle);
list->RegisterProcess(new G4MuPairProduction(), particle);
} else if( particleName == "proton" ||
particleName == "pi-" ||
particleName == "pi+" ) {
list->RegisterProcess(new G4hIonisation(), particle);
list->RegisterProcess(new G4hBremsstrahlung(), particle);
list->RegisterProcess(new G4hPairProduction(), particle);
} else if( particleName == "alpha" ||
particleName == "He3" ) {
list->RegisterProcess(new G4ionIonisation(), particle);
list->RegisterProcess(new G4NuclearStopping(), particle);
} else if( particleName == "GenericIon" ) {
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
list->RegisterProcess(ionIoni, particle);
list->RegisterProcess(new G4NuclearStopping(), particle);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4hIonisation, -1,-1,1);
list->RegisterProcess(new G4hIonisation(), particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
de->SetFluo(true);
de->SetAuger(false);
de->SetPIXE(false);
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
G4VAtomDeexcitation* deex = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(deex);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......