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 105728 2017-08-16 12:48:46Z gcosmo $
$Id: History 109860 2018-05-09 12:17:06Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -14,7 +14,20 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
09-05-18 B.Morgan (testem14-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 (testem14-V10-04-02)
- testem14.cc : set visualisation only in interactive mode
20-03-18 mma (testem14-V10-04-01)
- testem14.cc : remove G4UI_USE and G4VIS_USE
18-12-17 mma (testem14-V10-04-00)
- update PhysListEmStandard, livermore, penelope
14-08-17 mma (testem14-V10-03-01)
- cosmetic in printout
@@ -26,10 +26,11 @@
/// \file electromagnetic/TestEm14/TestEm14.cc
/// \brief Main program of the electromagnetic/TestEm14 example
//
// $Id: TestEm14.cc 98280 2016-07-04 18:03:51Z gcosmo $
//
// $Id: TestEm14.cc 109860 2018-05-09 12:17:06Z 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;
@@ -76,40 +76,30 @@ int main(int argc,char** argv) {
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
@@ -226,6 +226,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.
@@ -253,173 +327,6 @@ physicsList->setCut() start.
/run/printProgress 100000
/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
GammaToMuPair: gamma->mu+mu- Bethe Heitler process, SubType= 15
good cross section parametrization from 422.633 MeV to 1e+12 GeV for all Z.
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
@@ -468,26 +375,26 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Run terminated.
Run Summary
Number of events processed : 1000000
User=5.69s Real=5.84s Sys=0.01s
User=3.760000s Real=3.784160s Sys=0.010000s
======================== run summary ======================
The run is: 1000000 gamma of 100 keV through 100 m of Water (density: 1 g/cm3 )
Process calls frequency ---> compt = 983651 phot = 16349
Process calls frequency ---> compt = 983591 phot = 16409
MeanFreePath: 6.0662 cm +- 6.0665 cm massic: 6.0662 g/cm2
CrossSection: 0.16485 cm^-1 massic: 16.485 mm2/g
MeanFreePath: 6.0654 cm +- 6.0668 cm massic: 6.0654 g/cm2
CrossSection: 0.16487 cm^-1 massic: 16.487 mm2/g
mean energy of charged secondaries: 15.197 keV
---> mass_energy_transfer coef: 2.5052 mm2/g
mean energy of charged secondaries: 15.185 keV
---> mass_energy_transfer coef: 2.5036 mm2/g
Verification : crossSections from G4EmCalculator
compt= 16.23 mm2/g phot= 268.53 um2/mg total= 16.499 mm2/g
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 237380458, 1009809370
Current couple of seeds = 497037790, 1230561399
----------------------------------------
#
/gun/particle e-
@@ -523,7 +430,7 @@ Index : 0 used in the geometry : Yes
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 237380458, 1009809370
Current couple of seeds = 497037790, 1230561399
----------------------------------------
--> Event 0 starts.
--> Event 100000 starts.
@@ -538,26 +445,26 @@ Index : 0 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 1000000
User=4.2s Real=4.32s Sys=0s
User=4.540000s Real=4.562938s Sys=0.000000s
======================== run summary ======================
The run is: 1000000 e- of 100 MeV through 100 m of Water (density: 1 g/cm3 )
Process calls frequency ---> eBrem = 610602 eIoni = 389398
Process calls frequency ---> eBrem = 609326 eIoni = 390674
MeanFreePath: 1.6125 cm +- 1.6124 cm massic: 1.6125 g/cm2
CrossSection: 0.62015 cm^-1 massic: 62.015 mm2/g
MeanFreePath: 1.6151 cm +- 1.6053 cm massic: 1.6151 g/cm2
CrossSection: 0.61917 cm^-1 massic: 61.917 mm2/g
mean energy of charged secondaries: 738.06 keV
---> mass_energy_transfer coef: 457.71 um2/mg
mean energy of charged secondaries: 735.66 keV
---> mass_energy_transfer coef: 455.5 um2/mg
Verification : crossSections from G4EmCalculator
eBrem= 37.785 mm2/g eIoni= 24.166 mm2/g total= 61.951 mm2/g
eBrem= 37.788 mm2/g eIoni= 24.166 mm2/g total= 61.954 mm2/g
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 878199311, 2008340283
Current couple of seeds = 436580471, 444518351
----------------------------------------
G4 kernel has come to Quit state.
UserDetectorConstruction deleted.
@@ -23,18 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm14/src/PhysListEmLivermore.cc
/// \file electromagnetic/TestEm18/src/PhysListEmLivermore.cc
/// \brief Implementation of the PhysListEmLivermore class
//
//
// $Id: PhysListEmLivermore.cc 100278 2016-10-17 08:34:03Z gcosmo $
// $Id: PhysListEmLivermore.cc 108013 2017-12-19 09:03:56Z gcosmo $
//
//....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,6 +76,8 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
// deexcitation
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
@@ -83,7 +87,19 @@
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......
@@ -94,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
@@ -115,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
@@ -146,46 +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* 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......
@@ -23,18 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm14/src/PhysListEmPenelope.cc
/// \file electromagnetic/TestEm18/src/PhysListEmPenelope.cc
/// \brief Implementation of the PhysListEmPenelope class
//
//
// $Id: PhysListEmPenelope.cc 100278 2016-10-17 08:34:03Z gcosmo $
// $Id: PhysListEmPenelope.cc 108013 2017-12-19 09:03:56Z gcosmo $
//
//....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,6 +77,8 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
// deexcitation
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
@@ -84,7 +88,19 @@
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......
@@ -95,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
@@ -116,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
@@ -147,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
@@ -163,47 +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* 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......
@@ -23,25 +23,26 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm14/src/PhysListEmStandard.cc
/// \file electromagnetic/TestEm18/src/PhysListEmStandard.cc
/// \brief Implementation of the PhysListEmStandard class
//
//
// $Id: PhysListEmStandard.cc 100278 2016-10-17 08:34:03Z gcosmo $
// $Id: PhysListEmStandard.cc 108013 2017-12-19 09:03:56Z 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 "G4GammaConversionToMuons.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
@@ -52,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"
@@ -62,73 +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);
pmanager->AddDiscreteProcess(new G4GammaConversionToMuons);
////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......