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
@@ -40,7 +40,7 @@ target_link_libraries(TestEm5 ${Geant4_LIBRARIES} ${HBOOK_LIBRARIES})
# relies on these scripts being in the current working directory.
#
set(TestEm5_SCRIPTS
acosta.mac anthony.mac berger.mac bichsel.mac dedx1.mac dedx2.mac dna.mac fluo.mac gammaSpectrum.mac gottsch.mac hanson.mac hunger.mac ion.mac kulchi.mac mumsc.mac mutev.mac pixe.mac shen1.mac shen2.mac tavora.mac TestEm5.in TestEm5.out tramu.mac vincour.mac vis.mac
acosta.mac anthony.mac atima.mac berger.mac bichsel.mac dedx1.mac dedx2.mac dna.mac fluo.mac gammaSpectrum.mac gottsch.mac hanson.mac hunger.mac ion.mac kulchi.mac mumsc.mac mutev.mac pixe.mac shen1.mac shen2.mac tavora.mac TestEm5.in TestEm5.out tramu.mac vincour.mac vis.mac
)
foreach(_script ${TestEm5_SCRIPTS})
@@ -1,4 +1,4 @@
$Id: History 107435 2017-11-13 07:34:58Z gcosmo $
$Id: History 110387 2018-05-22 07:52:43Z gcosmo $
----------------------------------------------------
=========================================================
@@ -14,6 +14,37 @@ track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
18-05-18 V.Ivant (testem5-V10-04-06)
18-05-18 V.Ivant (testem5-V10-04-05)
- added test of the new ion ionisation model, which is included in
the new physics constructor PhysListEm19DStandard, atima.mac
macro file is also added to compare with known data
09-05-18 B.Morgan (testem5-V10-04-04)
- TestEm5.cc : include G4Types before use of G4MULTITHREADED. For forward
compatibility with move to #defines over -D for G4 preprocessor
symbols.
08-04-18 mma (testem5-V10-04-03)
- TestEm5.cc : purely cosmetic
20-03-18 V.Ivant (testem5-V10-04-02)
- StepMax - use thread safe instantiation, mesenger merged with
PhysicsListMessenger
- DetectorConstruction - improved method names
- PhysicsList - make Opt4 default, removed local instantiation of G4Decay
- Use MixMax default random number generator
- removed G4VIS_USE and G4UI_USE
08-03-18 V.Ivant (testem5-V10-04-01)
- PhysListEm5DStandard - experimental PhysList with the new
5D gamma conversion model
- PhysListEm5DStandard - clean-up for 10.4
- PhysListEmStandardSSM - removed as obsolete
14-12-17 V.Ivant (testem5-V10-04-00)
- corrected TestEm5.in to optimise output
11-11-17 mma (testem5-V10-03-08)
- Updated README .README.txt
@@ -27,10 +27,11 @@
/// \brief Main program of the electromagnetic/TestEm5 example
//
//
// $Id: TestEm5.cc 91972 2015-08-12 13:48:40Z gcosmo $
// $Id: TestEm5.cc 109864 2018-05-09 12:20:54Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
@@ -46,20 +47,18 @@
#include "ActionInitialization.hh"
#include "SteppingVerbose.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv) {
//choose the Random engine
G4Random::setTheEngine(new CLHEP::RanecuEngine);
//detect interactive mode (if no arguments) and define UI session
G4UIExecutive* ui = nullptr;
if (argc == 1) ui = new G4UIExecutive(argc,argv);
//choose the local stepping verbose
G4VSteppingVerbose::SetInstance(new SteppingVerbose);
// Construct the default run manager
@@ -68,54 +67,43 @@ int main(int argc,char** argv) {
G4int nThreads = std::min(G4Threading::G4GetNumberOfCores(),4);
if (argc==3) nThreads = G4UIcommand::ConvertToInt(argv[2]);
runManager->SetNumberOfThreads(nThreads);
G4cout << "===== TestEm5 is started with "
G4cout << "===== TestEm5 is started with "
<< runManager->GetNumberOfThreads() << " threads =====" << G4endl;
#else
G4RunManager* runManager = new G4RunManager;
#endif
// set mandatory initialization classes
//set mandatory initialization classes
DetectorConstruction* detector = new DetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new PhysicsList());
// set user action classes
//
runManager->SetUserInitialization(new ActionInitialization(detector));
// 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;
visManager->Initialize();
#endif
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
ui->SessionStart();
delete ui;
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
}
// job termination
//
delete runManager;
//set user action classes
runManager->SetUserInitialization(new ActionInitialization(detector));
return 0;
//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();
ui->SessionStart();
delete ui;
}
else {
//batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
//job termination
delete visManager;
delete runManager;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,4 +1,4 @@
# $Id: TestEm5.in 85279 2014-10-27 09:19:21Z gcosmo $
# $Id: TestEm5.in 107964 2017-12-14 13:11:17Z gcosmo $
#
# macro file for TestEm5.cc
#
@@ -15,9 +15,11 @@
#
/run/setCut 7 um
#
/run/initialize
#/process/em/verbose 1
/process/em/workerVerbose 0
#/process/eLoss/fluct false
#
/run/initialize
#
/testem/gun/setDefault
/gun/particle pi+
@@ -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
@@ -27,12 +27,17 @@ PhysicsList::AddPhysicsList: <emstandard_opt3>
#
/run/setCut 7 um
#
#/process/em/verbose 1
/process/em/workerVerbose 0
/run/physicsModified
#/process/eLoss/fluct false
#
/run/initialize
Material: Galactic density: 0.000 kg/m3 RadL: 204727512.315 pc Nucl.Int.Length: 113427275.267 pc
Imean: 19.200 eV temperature: 2.73 K pressure: 0.00 atm
Material: G4_Galactic density: 0.000 kg/m3 RadL: 204310101.835 pc Nucl.Int.Length: 113427275.267 pc
Imean: 21.800 eV temperature: 2.73 K pressure: 0.00 atm
---> Element: H (H) Z = 1.0 N = 1 A = 1.010 g/mole
---> Element: H (H) Z = 1.0 N = 1 A = 1.008 g/mole
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.989 %
---> Isotope: H2 Z = 1 N = 2 A = 2.01 g/mole abundance: 0.011 %
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
@@ -48,12 +53,9 @@ PhysicsList::AddPhysicsList: <emstandard_opt3>
ElmMassFraction: 100.00 % ElmAbundance 100.00 %
The WORLD is made of 30 um of Galactic. The transverse size (YZ) of the world is 60 um
The WORLD is made of 30 um of G4_Galactic. The transverse size (YZ) of the world is 60 um
The ABSORBER is made of 20 um of Silicon. The transverse size (YZ) is 50 um
X position of the middle of the absorber 0 fm
#/process/em/verbose 1
/process/em/workerVerbose 0
/run/physicsModified
#
/testem/gun/setDefault
/gun/particle pi+
@@ -81,8 +83,8 @@ compt: for gamma SubType= 13 BuildTable= 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 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
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
@@ -115,7 +117,7 @@ ePairProd: for e- SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
@@ -142,7 +144,7 @@ ePairProd: for e+ SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -402,7 +404,7 @@ hPairProd: for pi- SubType= 4
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Galactic
Material : G4_Galactic
Range cuts : gamma 7 um e- 7 um e+ 7 um proton 7 um
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 700 eV
Region(s) which use this couple :
@@ -419,10 +421,11 @@ Index : 1 used in the geometry : Yes
### Run 0 starts.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 9876, 54321
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={906770732717044781, 629165745432651234, 1235682547346241386, 68420008233404568, 2262190991329242458, 2266470399991071809, 1976726662926872232, 245458862506414172, 1955974201201518530, 2155248512522080758, 604170912935414061, 1116171330120743511, 1861018313684488333, 1296715403254578286, 1549011045957234151, 370819759640195970, 2230139271784837643} counter= 17sumtot= 1977567618660788324
---------------------------------------
--> Event 0 starts.
--> Event 10000 starts.
--> Event 20000 starts.
@@ -436,30 +439,30 @@ Index : 1 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 100000
User=1.15s Real=1.16s Sys=0s
User=1.250000s Real=1.258952s Sys=0.010000s
======================== run summary ======================
The run was 100000 pi+ of 5 GeV through 20 um of Silicon (density: 2.33 g/cm3 )
Total energy deposit in absorber per event = 6.344 keV +- 16.28 eV
Total energy deposit in absorber per event = 6.341 keV +- 16.11 eV
-----> Mean dE/dx = 3.172 MeV/cm (1.361 MeV*cm2/g)
-----> Mean dE/dx = 3.17 MeV/cm (1.361 MeV*cm2/g)
From formulas :
restricted dEdx = 2.963 MeV/cm (1.272 MeV*cm2/g)
full dEdx = 4.725 MeV/cm (2.028 MeV*cm2/g)
full dEdx = 4.616 MeV/cm (1.981 MeV*cm2/g)
Leakage : primary = 5 GeV +- 472.7 eV secondaries = 2.699 keV +- 471.8 eV
Leakage : primary = 5 GeV +- 1.056 keV secondaries = 3.906 keV +- 1.055 keV
Energy balance : edep + eleak = 5 GeV
Total track length (charged) in absorber per event = 20.27 um +- 8.075 nm
Total track length (neutral) in absorber per event = 5.985 Ang +- 3.474 Ang
Total track length (charged) in absorber per event = 20.25 um +- 7.503 nm
Total track length (neutral) in absorber per event = 2.511 Ang +- 1.813 Ang
Number of steps (charged) in absorber per event = 1.21 +- 0.006194
Number of steps (neutral) in absorber per event = 6e-05 +- 2.449e-05
Number of steps (charged) in absorber per event = 1.2 +- 0.005953
Number of steps (neutral) in absorber per event = 4e-05 +- 2e-05
Number of secondaries per event : Gammas = 6e-05 electrons = 0.0168 positrons = 0
Number of secondaries per event : Gammas = 4e-05 electrons = 0.01658 positrons = 0
Number of events with the primary particle transmitted = 100 %
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
@@ -468,14 +471,15 @@ Run Summary
Number of events with at least 1 particle reflected (same charge as primary) = 0 %
MultipleScattering:
rms proj angle of transmit primary particle = 0.02504 mrad (central part only)
rms proj angle of transmit primary particle = 0.02497 mrad (central part only)
computed theta0 (Highland formula) = 0.02627 mrad
central part defined as +- 0.0788 mrad Tail ratio = 2.088 %
central part defined as +- 0.0788 mrad Tail ratio = 1.978 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2035054492, 1302606875
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={292541915229937655, 857435058567080924, 1203325321301254691, 725694794401864709, 1577350760504444531, 1497669965698521762, 884808083625733874, 10557671707874180, 195014277589277103, 1171645293334958261, 1610170139000971262, 382078102153658139, 303101192575010804, 1820332079888212573, 295965239837707391, 1290278895094406443, 291333479422289393} counter= 6sumtot= 574244214651039989
---------------------------------------
#
/testem/det/setAbsMat Gold
/testem/det/setAbsThick 9.658 um
@@ -505,8 +509,8 @@ compt: for gamma SubType= 13 BuildTable= 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 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
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
@@ -539,7 +543,7 @@ ePairProd: for e- SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
@@ -566,7 +570,7 @@ ePairProd: for e+ SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -826,7 +830,7 @@ hPairProd: for pi- SubType= 4
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Galactic
Material : G4_Galactic
Range cuts : gamma 7 um e- 7 um e+ 7 um proton 7 um
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 700 eV
Region(s) which use this couple :
@@ -848,10 +852,11 @@ Index : 2 used in the geometry : Yes
### Run 1 starts.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 2035054492, 1302606875
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={292541915229937655, 857435058567080924, 1203325321301254691, 725694794401864709, 1577350760504444531, 1497669965698521762, 884808083625733874, 10557671707874180, 195014277589277103, 1171645293334958261, 1610170139000971262, 382078102153658139, 303101192575010804, 1820332079888212573, 295965239837707391, 1290278895094406443, 291333479422289393} counter= 6sumtot= 574244214651039989
---------------------------------------
--> Event 0 starts.
--> Event 10000 starts.
--> Event 20000 starts.
@@ -860,46 +865,47 @@ Index : 2 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 50000
User=1.48s Real=1.48s Sys=0s
User=1.100000s Real=1.103483s Sys=0.000000s
======================== run summary ======================
The run was 50000 e- of 15.7 MeV through 9.66 um of Gold (density: 19.3 g/cm3 )
Total energy deposit in absorber per event = 18.47 keV +- 62.74 eV
Total energy deposit in absorber per event = 18.49 keV +- 65.79 eV
-----> Mean dE/dx = 19.12 MeV/cm (0.9898 MeV*cm2/g)
-----> Mean dE/dx = 19.14 MeV/cm (0.9908 MeV*cm2/g)
From formulas :
restricted dEdx = 17.91 MeV/cm (0.9269 MeV*cm2/g)
full dEdx = 61.41 MeV/cm (3.179 MeV*cm2/g)
Leakage : primary = 15.64 MeV +- 2.094 keV secondaries = 39.05 keV +- 2.092 keV
Leakage : primary = 15.64 MeV +- 2.075 keV secondaries = 40.02 keV +- 2.07 keV
Energy balance : edep + eleak = 15.7 MeV
Total track length (charged) in absorber per event = 9.91 um +- 10.84 nm
Total track length (neutral) in absorber per event = 128.6 nm +- 5.141 nm
Total track length (charged) in absorber per event = 9.929 um +- 12.57 nm
Total track length (neutral) in absorber per event = 130 nm +- 4.195 nm
Number of steps (charged) in absorber per event = 4.992 +- 0.008928
Number of steps (neutral) in absorber per event = 0.02852 +- 0.0007806
Number of steps (charged) in absorber per event = 5.003 +- 0.009234
Number of steps (neutral) in absorber per event = 0.02926 +- 0.000789
Number of secondaries per event : Gammas = 0.0284 electrons = 0.02242 positrons = 0
Number of secondaries per event : Gammas = 0.02908 electrons = 0.02218 positrons = 0
Number of events with the primary particle transmitted = 99.98 %
Number of events with at least 1 particle transmitted (same charge as primary) = 99.98 %
Number of events with the primary particle reflected = 0.016 %
Number of events with at least 1 particle reflected (same charge as primary) = 0.326 %
Number of events with at least 1 particle reflected (same charge as primary) = 0.328 %
MultipleScattering:
rms proj angle of transmit primary particle = 35.51 mrad (central part only)
rms proj angle of transmit primary particle = 35.44 mrad (central part only)
computed theta0 (Highland formula) = 35.1 mrad
central part defined as +- 105.3 mrad Tail ratio = 2.923 %
central part defined as +- 105.3 mrad Tail ratio = 2.829 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1686257384, 2124144530
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={1002840699750186162, 1604440821496985927, 1006862125764534971, 1538402071674279194, 604259051351292405, 751711831589857833, 2064394726053020181, 1903136878495196334, 140927486784553761, 1796832821200821166, 1198904334738537594, 2305578757168714080, 1081356478082426484, 1408286580802514185, 1038597055170911617, 362002386555071532, 829643818160197478} counter= 9sumtot= 2191433851129549296
---------------------------------------
#
/run/setCut 10 um
#
@@ -929,8 +935,8 @@ compt: for gamma SubType= 13 BuildTable= 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 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
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
@@ -963,7 +969,7 @@ ePairProd: for e- SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
@@ -990,7 +996,7 @@ ePairProd: for e+ SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -1250,7 +1256,7 @@ hPairProd: for pi- SubType= 4
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Galactic
Material : G4_Galactic
Range cuts : gamma 10 um e- 10 um e+ 10 um proton 10 um
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 1 keV
Region(s) which use this couple :
@@ -1277,10 +1283,11 @@ Index : 3 used in the geometry : Yes
### Run 2 starts.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1686257384, 2124144530
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={1002840699750186162, 1604440821496985927, 1006862125764534971, 1538402071674279194, 604259051351292405, 751711831589857833, 2064394726053020181, 1903136878495196334, 140927486784553761, 1796832821200821166, 1198904334738537594, 2305578757168714080, 1081356478082426484, 1408286580802514185, 1038597055170911617, 362002386555071532, 829643818160197478} counter= 9sumtot= 2191433851129549296
---------------------------------------
--> Event 0 starts.
--> Event 10000 starts.
--> Event 20000 starts.
@@ -1289,46 +1296,47 @@ Index : 3 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 50000
User=2.84s Real=2.85s Sys=0s
User=2.300000s Real=2.303335s Sys=0.000000s
======================== run summary ======================
The run was 50000 mu+ of 96.2 MeV through 4.74 mm of G4_POLYETHYLENE (density: 940 mg/cm3)
Total energy deposit in absorber per event = 1.047 MeV +- 997.2 eV
Total energy deposit in absorber per event = 1.049 MeV +- 1.021 keV
-----> Mean dE/dx = 2.209 MeV/cm (2.35 MeV*cm2/g)
-----> Mean dE/dx = 2.213 MeV/cm (2.354 MeV*cm2/g)
From formulas :
restricted dEdx = 1.753 MeV/cm (1.865 MeV*cm2/g)
full dEdx = 2.265 MeV/cm (2.409 MeV*cm2/g)
Leakage : primary = 95.12 MeV +- 2.327 keV secondaries = 30.57 keV +- 3.007 keV
Leakage : primary = 95.12 MeV +- 1.365 keV secondaries = 26.06 keV +- 704.2 eV
Energy balance : edep + eleak = 96.2 MeV
Total track length (charged) in absorber per event = 5.17 mm +- 3.793 um
Total track length (neutral) in absorber per event = 22.9 um +- 2.41 um
Total track length (charged) in absorber per event = 5.176 mm +- 3.916 um
Total track length (neutral) in absorber per event = 23.88 um +- 2.383 um
Number of steps (charged) in absorber per event = 12.38 +- 0.04046
Number of steps (neutral) in absorber per event = 0.00926 +- 0.000452
Number of steps (charged) in absorber per event = 12.45 +- 0.04107
Number of steps (neutral) in absorber per event = 0.0093 +- 0.0004633
Number of secondaries per event : Gammas = 0.0088 electrons = 4.038 positrons = 2e-05
Number of secondaries per event : Gammas = 0.00882 electrons = 4.047 positrons = 0
Number of events with the primary particle transmitted = 100 %
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
Number of events with the primary particle reflected = 0 %
Number of events with at least 1 particle reflected (same charge as primary) = 0 %
Number of events with the primary particle reflected = 0.002 %
Number of events with at least 1 particle reflected (same charge as primary) = 0.002 %
MultipleScattering:
rms proj angle of transmit primary particle = 7.36 mrad (central part only)
rms proj angle of transmit primary particle = 7.377 mrad (central part only)
computed theta0 (Highland formula) = 7.636 mrad
central part defined as +- 22.91 mrad Tail ratio = 1.269 %
central part defined as +- 22.91 mrad Tail ratio = 1.319 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 87365084, 1745820432
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={1689373335428253750, 864919798880638885, 667139936286347295, 985255077683025082, 1085913768731609397, 2275267359997406925, 2216967755432541594, 1149363102127625053, 1661930935682568489, 884083890607210708, 518411817345455092, 1473759779131034274, 1455026328743851857, 1051102847094732313, 2247949430190963895, 1319829473726506417, 460978456031509792} counter= 7sumtot= 1254686010198035259
---------------------------------------
#
/run/setCut 1 mm
#
@@ -1359,8 +1367,8 @@ compt: for gamma SubType= 13 BuildTable= 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 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
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
@@ -1393,7 +1401,7 @@ ePairProd: for e- SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
@@ -1420,7 +1428,7 @@ ePairProd: for e+ SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -1680,7 +1688,7 @@ hPairProd: for pi- SubType= 4
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Galactic
Material : G4_Galactic
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
@@ -1712,10 +1720,11 @@ Index : 4 used in the geometry : Yes
### Run 3 starts.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 87365084, 1745820432
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={1689373335428253750, 864919798880638885, 667139936286347295, 985255077683025082, 1085913768731609397, 2275267359997406925, 2216967755432541594, 1149363102127625053, 1661930935682568489, 884083890607210708, 518411817345455092, 1473759779131034274, 1455026328743851857, 1051102847094732313, 2247949430190963895, 1319829473726506417, 460978456031509792} counter= 7sumtot= 1254686010198035259
---------------------------------------
--> Event 0 starts.
--> Event 10000 starts.
--> Event 20000 starts.
@@ -1724,30 +1733,30 @@ Index : 4 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 50000
User=0.62s Real=0.62s Sys=0s
User=0.540000s Real=0.541251s Sys=0.000000s
======================== run summary ======================
The run was 50000 proton of 175 GeV through 8 mm of Aluminium (density: 2.7 g/cm3 )
Total energy deposit in absorber per event = 5.529 MeV +- 401.2 keV
Total energy deposit in absorber per event = 4.172 MeV +- 29.13 keV
-----> Mean dE/dx = 6.908 MeV/cm (2.558 MeV*cm2/g)
-----> Mean dE/dx = 5.213 MeV/cm (1.931 MeV*cm2/g)
From formulas :
restricted dEdx = 4.024 MeV/cm (1.49 MeV*cm2/g)
full dEdx = 6.049 MeV/cm (2.24 MeV*cm2/g)
full dEdx = 5.238 MeV/cm (1.94 MeV*cm2/g)
Leakage : primary = 174.7 GeV +- 401.2 keV secondaries = 0 eV +- 0 eV
Leakage : primary = 174.7 GeV +- 29.15 keV secondaries = 0 eV +- 0 eV
Energy balance : edep + eleak = 174.7 GeV
Total track length (charged) in absorber per event = 8.004 mm +- 0 fm
Total track length (neutral) in absorber per event = 0 fm +- 0 fm
Number of steps (charged) in absorber per event = 1.266 +- 0.002307
Number of steps (charged) in absorber per event = 1.266 +- 0.002306
Number of steps (neutral) in absorber per event = 0 +- 0
Number of secondaries per event : Gammas = 0 electrons = 0.2659 positrons = 0.00064
Number of secondaries per event : Gammas = 0 electrons = 0.2661 positrons = 0.00058
Number of events with the primary particle transmitted = 100 %
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
@@ -1756,14 +1765,15 @@ Run Summary
Number of events with at least 1 particle reflected (same charge as primary) = 0 %
MultipleScattering:
rms proj angle of transmit primary particle = 0.02055 mrad (central part only)
rms proj angle of transmit primary particle = 0.02052 mrad (central part only)
computed theta0 (Highland formula) = 0.02111 mrad
central part defined as +- 0.06333 mrad Tail ratio = 1.375 %
central part defined as +- 0.06333 mrad Tail ratio = 1.275 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1973571615, 2103057534
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={378970095544771651, 1283356342772463473, 1979264439748422500, 1872775720020704880, 1073331630519405763, 1578211183944539789, 376059452978583191, 268400228511004939, 1455665780804927934, 259519933531318441, 1655333924223503834, 462080165397830663, 144656715727946560, 1992028355258094367, 290573270078480091, 853760772656660515, 902873884128659466} counter= 2sumtot= 685960831351460400
---------------------------------------
#
/testem/det/setAbsMat Iron
/testem/det/setAbsThick 1 m
@@ -1790,8 +1800,8 @@ compt: for gamma SubType= 13 BuildTable= 1
conv: for gamma SubType= 14 BuildTable= 1
Lambda table from 1.022 MeV to 100 TeV, 20 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
BetheHeitler : Emin= 0 eV Emax= 80 GeV AngularGenUrban
BetheHeitlerLPM : Emin= 80 GeV Emax= 100 TeV AngularGenUrban
Rayl: for gamma SubType= 11 BuildTable= 1
Lambda table from 10 eV to 100 keV, 20 bins per decade, spline: 0
@@ -1824,7 +1834,7 @@ ePairProd: for e- SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
msc: for e+ SubType= 10
RangeFactor= 0.04, stepLimitType: 3, latDisplacement: 1, skin= 1, geomFactor= 2.5
@@ -1851,7 +1861,7 @@ ePairProd: for e+ SubType= 4
Lambda tables from threshold to 100 TeV, 20 bins per decade, spline: 1
Sampling table 25x1001 from 0.1 GeV to 100 TeV
===== EM models for the G4Region DefaultRegionForTheWorld ======
muPairProd : Emin= 0 eV Emax= 100 TeV
ePairProd : Emin= 0 eV Emax= 100 TeV
annihil: for e+, integral: 1 SubType= 5 BuildTable= 0
===== EM models for the G4Region DefaultRegionForTheWorld ======
@@ -2111,7 +2121,7 @@ hPairProd: for pi- SubType= 4
========= Table of registered couples ==============================
Index : 0 used in the geometry : Yes
Material : Galactic
Material : G4_Galactic
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
@@ -2148,10 +2158,11 @@ Index : 5 used in the geometry : Yes
### Run 4 starts.
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1973571615, 2103057534
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={378970095544771651, 1283356342772463473, 1979264439748422500, 1872775720020704880, 1073331630519405763, 1578211183944539789, 376059452978583191, 268400228511004939, 1455665780804927934, 259519933531318441, 1655333924223503834, 462080165397830663, 144656715727946560, 1992028355258094367, 290573270078480091, 853760772656660515, 902873884128659466} counter= 2sumtot= 685960831351460400
---------------------------------------
--> Event 0 starts.
--> Event 10000 starts.
--> Event 20000 starts.
@@ -2160,30 +2171,30 @@ Index : 5 used in the geometry : Yes
Run terminated.
Run Summary
Number of events processed : 50000
User=13.74s Real=14.07s Sys=0s
User=9.440000s Real=9.454295s Sys=0.000000s
======================== run summary ======================
The run was 50000 mu+ of 100 GeV through 1 m of Iron (density: 7.87 g/cm3 )
Total energy deposit in absorber per event = 2.134 GeV +- 14.11 MeV
Total energy deposit in absorber per event = 2.149 GeV +- 14.49 MeV
-----> Mean dE/dx = 21.34 MeV/cm (2.711 MeV*cm2/g)
-----> Mean dE/dx = 21.49 MeV/cm (2.731 MeV*cm2/g)
From formulas :
restricted dEdx = 11.22 MeV/cm (1.425 MeV*cm2/g)
full dEdx = 21.6 MeV/cm (2.745 MeV*cm2/g)
Leakage : primary = 97.87 GeV +- 14.11 MeV secondaries = 0 eV +- 0 eV
Leakage : primary = 97.85 GeV +- 14.49 MeV secondaries = 0 eV +- 0 eV
Energy balance : edep + eleak = 100 GeV
Total track length (charged) in absorber per event = 1 m +- 6.809 nm
Total track length (charged) in absorber per event = 100 cm +- 1.726 um
Total track length (neutral) in absorber per event = 0 fm +- 0 fm
Number of steps (charged) in absorber per event = 47.32 +- 0.03045
Number of steps (charged) in absorber per event = 47.31 +- 0.03043
Number of steps (neutral) in absorber per event = 0 +- 0
Number of secondaries per event : Gammas = 0.04928 electrons = 46.27 positrons = 1.251
Number of secondaries per event : Gammas = 0.05038 electrons = 46.26 positrons = 1.26
Number of events with the primary particle transmitted = 100 %
Number of events with at least 1 particle transmitted (same charge as primary) = 100 %
@@ -2194,16 +2205,17 @@ Run Summary
MultipleScattering:
rms proj angle of transmit primary particle = 1.177 mrad (central part only)
computed theta0 (Highland formula) = 1.182 mrad
central part defined as +- 3.545 mrad Tail ratio = 0.617 %
central part defined as +- 3.545 mrad Tail ratio = 0.554 %
--------- Ranecu engine status ---------
Initial seed (index) = 0
Current couple of seeds = 1613027800, 886249695
----------------------------------------
------- MixMaxRng engine status -------
Current state vector is:
mixmax state, file version 1.0
N=17 V[N]={567891537273337730, 506277740908172049, 950001121162851880, 1607442057596810291, 665022541697253928, 589175747331222720, 583095089651541754, 1856482291894088322, 523911363937865884, 1076681156032199127, 581058532941691188, 1376894372755315273, 946880004048713169, 675446884778775113, 116387514134227396, 507075470381429548, 1173597309351146593} counter= 8sumtot= 468262680594478259
---------------------------------------
#
G4 kernel has come to Quit state.
================== Deleting memory pools ===================
Number of memory pools allocated: 9 of which, static: 0
Dynamic pools deleted: 9 / Total memory freed: 0.054 MB
Dynamic pools deleted: 9 / Total memory freed: 0.053 MB
============================================================
RunManagerKernel is deleted. Good bye :)
@@ -0,0 +1,170 @@
#
# macro file for TestEm5
#
/control/cout/ignoreThreadsExcept 0
/control/verbose 2
/run/verbose 2
#
/testem/det/setAbsMat G4_Be
#
/testem/det/setAbsThick 0.1 mm
/testem/det/setAbsYZ 1 m
#
#/testem/phys/addPhysics emstandard
/testem/phys/addPhysics emstandardATIMA
#
/run/setCut 1 km
#
/run/initialize
#
#/testem/gun/setDefault
#Bi209 at 879.6 MeV/u
#/gun/particle ion
#/gun/ion 83 209
#/gun/energy 183836.4 MeV
/gun/particle ion
/gun/ion 83 209
/gun/energy 183.8364 GeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#/analysis/setFileName ion
#/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
#
/tracking/verbose 0
#
/run/beamOn 10000
#Bi209 at 525.1 MeV/u
/gun/particle ion
/gun/ion 83 209
/gun/energy 109745.9 MeV
#
/run/beamOn 1000
#Bi209 at 264 MeV/u
/gun/particle ion
/gun/ion 83 209
/gun/energy 55176.0 MeV
#
/run/beamOn 1000
/testem/det/setAbsThick 2.170 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 54 136 54
/gun/energy 108664 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionxe3
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsThick 1.088 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 54 136 54
/gun/energy 108664 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionxe2
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsThick 0.5444 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 54 136 54
/gun/energy 108664 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionxe1
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsMat G4_Pb
/testem/det/setAbsThick 0.698 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 8 18 8
/gun/energy 12564 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionox
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsMat G4_Au
/testem/det/setAbsThick 0.098 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 92 238 92
/gun/energy 224434 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionU1
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsMat G4_Au
/testem/det/setAbsThick 0.2418 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 92 238 92
/gun/energy 224434 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionU2
/analysis/h1/set 10 60000 1. 882. MeV #energy in absorber
/run/beamOn 10000
/testem/det/setAbsMat G4_Ti
/testem/det/setAbsThick 0.2211 cm
/testem/det/setAbsYZ 1 m
#Xe136 at 799 MeV/u
/gun/particle ion
/gun/ion 79 197 79
/gun/energy 194636 MeV
/gun/position -6 0 0 cm
/gun/direction 1 0 0
#
/analysis/setFileName ionAu
/analysis/h1/set 10 60000 1. 1000. MeV #energy in absorber
/run/beamOn 10000
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/DetectorConstruction.hh
/// \brief Definition of the DetectorConstruction class
//
// $Id: DetectorConstruction.hh 98752 2016-08-09 13:44:40Z gcosmo $
// $Id: DetectorConstruction.hh 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -51,79 +51,70 @@ class G4GlobalMagFieldMessenger;
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
public:
DetectorConstruction();
~DetectorConstruction();
DetectorConstruction();
~DetectorConstruction();
public:
void SetAbsorberMaterial (const G4String&);
void SetAbsorberThickness(G4double);
void SetAbsorberSizeYZ (G4double);
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetAbsorberSizeYZ (G4double);
void SetAbsorberXpos(G4double);
void SetAbsorberXpos(G4double);
void SetWorldMaterial(const G4String&);
void SetWorldSizeX (G4double);
void SetWorldSizeYZ (G4double);
void SetWorldMaterial(G4String);
void SetWorldSizeX (G4double);
void SetWorldSizeYZ (G4double);
void SetMagField(G4double);
void SetMagField(G4double);
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
void PrintGeomParameters();
public:
const G4Material* GetAbsorberMaterial() const {return fAbsorberMaterial;};
G4double GetAbsorberThickness() const {return fAbsorberThickness;};
G4double GetAbsorberSizeYZ() const {return fAbsorberSizeYZ;};
void PrintCalorParameters();
G4double GetAbsorberXpos() const {return fXposAbs;};
G4double GetxstartAbs() const {return fXstartAbs;};
G4double GetxendAbs() const {return fXendAbs;};
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;};
G4double GetAbsorberThickness() {return fAbsorberThickness;};
G4double GetAbsorberSizeYZ() {return fAbsorberSizeYZ;};
const G4Material* GetWorldMaterial() const {return fWorldMaterial;};
G4double GetWorldSizeX() const {return fWorldSizeX;};
G4double GetAbsorberXpos() {return fXposAbs;};
G4double GetxstartAbs() {return fXstartAbs;};
G4double GetxendAbs() {return fXendAbs;};
const G4VPhysicalVolume* GetAbsorber() const {return fPhysiAbsorber;};
G4Material* GetWorldMaterial() {return fWorldMaterial;};
G4double GetWorldSizeX() {return fWorldSizeX;};
private:
const G4VPhysicalVolume* GetAbsorber() {return fPhysiAbsorber;};
void DefineMaterials();
void ComputeGeomParameters();
void ChangeGeometry();
private:
G4Material* fAbsorberMaterial;
G4double fAbsorberThickness;
G4double fAbsorberSizeYZ;
void ChangeGeometry();
G4double fXposAbs;
G4double fXstartAbs, fXendAbs;
G4Material* fAbsorberMaterial;
G4double fAbsorberThickness;
G4double fAbsorberSizeYZ;
G4Material* fWorldMaterial;
G4double fWorldSizeX;
G4double fWorldSizeYZ;
G4double fXposAbs;
G4double fXstartAbs, fXendAbs;
G4bool fDefaultWorld;
G4Material* fWorldMaterial;
G4double fWorldSizeX;
G4double fWorldSizeYZ;
G4Box* fSolidWorld;
G4LogicalVolume* fLogicWorld;
G4VPhysicalVolume* fPhysiWorld;
G4bool fDefaultWorld;
G4Box* fSolidWorld;
G4LogicalVolume* fLogicWorld;
G4VPhysicalVolume* fPhysiWorld;
G4Box* fSolidAbsorber;
G4LogicalVolume* fLogicAbsorber;
G4VPhysicalVolume* fPhysiAbsorber;
G4Box* fSolidAbsorber;
G4LogicalVolume* fLogicAbsorber;
G4VPhysicalVolume* fPhysiAbsorber;
DetectorMessenger* fDetectorMessenger;
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
DetectorMessenger* fDetectorMessenger;
G4Cache<G4GlobalMagFieldMessenger*> fFieldMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,39 +23,46 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/PhysListEmStandardSSM.hh
/// \brief Definition of the PhysListEmStandardSSM class
//
// $Id: PhysListEmStandardSSM.hh 98752 2016-08-09 13:44:40Z gcosmo $
// $Id: $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysListEm19DStandard
//
// Author: Jose Luis Rodriguez 18.04.2018
//
// Modified:
// 18.04.2018 Created from PhysListEm19DStandard
//----------------------------------------------------------------------------
//
// This class provides construction of default EM standard physics which
// 5D generator model for gamma conversion
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListEmStandardSSM_h
#define PhysListEmStandardSSM_h 1
#ifndef PhysListEm19DStandard_h
#define PhysListEm19DStandard_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysListEmStandardSSM : public G4VPhysicsConstructor
class PhysListEm19DStandard : public G4VPhysicsConstructor
{
public:
PhysListEmStandardSSM(const G4String& name = "standardSSM");
~PhysListEmStandardSSM();
public:
public:
// This method is dummy for physics
virtual void ConstructParticle() {};
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
explicit PhysListEm19DStandard(G4int ver=0, const G4String& name="");
virtual ~PhysListEm19DStandard();
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
G4int verbose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,36 +23,44 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/StepMaxMessenger.hh
/// \brief Definition of the StepMaxMessenger class
//
// $Id: StepMaxMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
// $Id: $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysListEm5DStandard
//
// Author: IgS 07.11.2017
//
// Modified:
// 17.11.2017 Created using PhysListEmStandard from V.Ivanchenko
//----------------------------------------------------------------------------
//
// This class provides construction of default EM standard physics which
// 5D generator model for gamma conversion
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef StepMaxMessenger_h
#define StepMaxMessenger_h 1
#ifndef PhysListEm5DStandard_h
#define PhysListEm5DStandard_h 1
#include "G4UImessenger.hh"
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
class StepMax;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class StepMaxMessenger: public G4UImessenger
class PhysListEm5DStandard : public G4VPhysicsConstructor
{
public:
StepMaxMessenger(StepMax*);
~StepMaxMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
private:
StepMax* fStepMax;
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
public:
explicit PhysListEm5DStandard(G4int ver=0, const G4String& name="");
virtual ~PhysListEm5DStandard();
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
G4int verbose;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysicsList.hh
/// \brief Definition of the PhysicsList class
//
// $Id: PhysicsList.hh 94973 2016-01-12 10:13:56Z gcosmo $
// $Id: PhysicsList.hh 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -53,7 +53,6 @@ public:
void AddPhysicsList(const G4String& name);
virtual void ConstructProcess();
void AddDecay();
void AddStepMax();
private:
@@ -62,6 +61,7 @@ private:
G4String fEmName;
G4VPhysicsConstructor* fEmPhysicsList;
G4VPhysicsConstructor* fDecayPhysics;
G4VPhysicsConstructor* fHadPhysicsList;
};
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/include/PhysicsListMessenger.hh
/// \brief Definition of the PhysicsListMessenger class
//
// $Id: PhysicsListMessenger.hh 81528 2014-06-02 16:21:24Z vnivanch $
// $Id: PhysicsListMessenger.hh 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -52,6 +52,8 @@ public:
~PhysicsListMessenger();
virtual void SetNewValue(G4UIcommand*, G4String);
inline G4double GetMaxChargedStep() const { return fMaxChargedStep; }
private:
@@ -59,6 +61,8 @@ private:
G4UIdirectory* fPhysDir;
G4UIcmdWithAString* fListCmd;
G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
G4double fMaxChargedStep;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,10 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/include/StepMax.hh
/// \brief Definition of the StepMax class
//
// $Id: StepMax.hh 66241 2012-12-13 18:34:42Z gunter $
// $Id: StepMax.hh 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,38 +32,41 @@
#define StepMax_h 1
#include "globals.hh"
#include "G4VDiscreteProcess.hh"
#include "G4VEmProcess.hh"
#include "G4ParticleDefinition.hh"
#include "G4Step.hh"
class StepMaxMessenger;
class PhysicsListMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class StepMax : public G4VDiscreteProcess
class StepMax : public G4VEmProcess
{
public:
public:
StepMax(const G4String& processName ="UserStepMax");
~StepMax();
StepMax(PhysicsListMessenger* mess);
virtual ~StepMax();
virtual G4bool IsApplicable(const G4ParticleDefinition&);
void SetMaxStep(G4double);
G4double GetMaxStep() {return fMaxChargedStep;};
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
virtual G4bool IsApplicable(const G4ParticleDefinition&);
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
virtual G4double GetMeanFreePath(const G4Track&,G4double,G4ForceCondition*)
{return 0.;}; // it is not needed here !
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
private:
virtual void InitialiseProcess(const G4ParticleDefinition*);
G4double fMaxChargedStep;
StepMaxMessenger* fMess;
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
G4double previousStep,
G4ForceCondition* cond);
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
private:
PhysicsListMessenger* fMessenger;
G4double fMaxChargedStep;
G4bool isInitialised;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/src/DetectorConstruction.cc
/// \brief Implementation of the DetectorConstruction class
//
// $Id: DetectorConstruction.cc 103050 2017-03-10 15:50:39Z gcosmo $
// $Id: DetectorConstruction.cc 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -58,22 +58,22 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
DetectorConstruction::DetectorConstruction()
:G4VUserDetectorConstruction(),
fAbsorberMaterial(0),fWorldMaterial(0),fDefaultWorld(true),
fSolidWorld(0),fLogicWorld(0),fPhysiWorld(0),
fSolidAbsorber(0),fLogicAbsorber(0),fPhysiAbsorber(0),
fDetectorMessenger(0)
: G4VUserDetectorConstruction(),
fAbsorberMaterial(nullptr),fWorldMaterial(nullptr),fDefaultWorld(true),
fSolidWorld(nullptr),fLogicWorld(nullptr),fPhysiWorld(nullptr),
fSolidAbsorber(nullptr),fLogicAbsorber(nullptr),fPhysiAbsorber(nullptr),
fDetectorMessenger(nullptr)
{
// default parameter values of the calorimeter
fAbsorberThickness = 1.*cm;
fAbsorberSizeYZ = 2.*cm;
fXposAbs = 0.*cm;
ComputeCalorParameters();
ComputeGeomParameters();
// materials
DefineMaterials();
SetWorldMaterial ("Galactic");
SetAbsorberMaterial("Silicon");
SetWorldMaterial ("G4_Galactic");
SetAbsorberMaterial("G4_Si");
// create commands for interactive definition of the calorimeter
fDetectorMessenger = new DetectorMessenger(this);
@@ -88,13 +88,6 @@ DetectorConstruction::~DetectorConstruction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* DetectorConstruction::Construct()
{
return ConstructCalorimeter();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::DefineMaterials()
{
//This function illustrates the possible ways to define materials
@@ -254,7 +247,7 @@ void DetectorConstruction::DefineMaterials()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::ComputeCalorParameters()
void DetectorConstruction::ComputeGeomParameters()
{
// Compute derived parameters of the calorimeter
fXstartAbs = fXposAbs-0.5*fAbsorberThickness;
@@ -273,8 +266,9 @@ void DetectorConstruction::ComputeCalorParameters()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
G4VPhysicalVolume* DetectorConstruction::Construct()
{
if(fPhysiWorld) { return fPhysiWorld; }
// World
//
fSolidWorld = new G4Box("World", //its name
@@ -309,7 +303,7 @@ G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
false, //no boulean operat
0); //copy number
PrintCalorParameters();
PrintGeomParameters();
//always return the physical World
//
@@ -318,7 +312,7 @@ G4VPhysicalVolume* DetectorConstruction::ConstructCalorimeter()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::PrintCalorParameters()
void DetectorConstruction::PrintGeomParameters()
{
G4cout << "\n" << fWorldMaterial << G4endl;
G4cout << "\n" << fAbsorberMaterial << G4endl;
@@ -339,7 +333,7 @@ void DetectorConstruction::PrintCalorParameters()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
void DetectorConstruction::SetAbsorberMaterial(const G4String& materialChoice)
{
// search the material by its name
G4Material* pttoMaterial =
@@ -354,7 +348,7 @@ void DetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DetectorConstruction::SetWorldMaterial(G4String materialChoice)
void DetectorConstruction::SetWorldMaterial(const G4String& materialChoice)
{
// search the material by its name
G4Material* pttoMaterial =
@@ -372,7 +366,7 @@ void DetectorConstruction::SetWorldMaterial(G4String materialChoice)
void DetectorConstruction::SetAbsorberThickness(G4double val)
{
fAbsorberThickness = val;
ComputeCalorParameters();
ComputeGeomParameters();
if(fPhysiWorld) { ChangeGeometry(); }
}
@@ -381,7 +375,7 @@ void DetectorConstruction::SetAbsorberThickness(G4double val)
void DetectorConstruction::SetAbsorberSizeYZ(G4double val)
{
fAbsorberSizeYZ = val;
ComputeCalorParameters();
ComputeGeomParameters();
if(fPhysiWorld) { ChangeGeometry(); }
}
@@ -391,7 +385,7 @@ void DetectorConstruction::SetWorldSizeX(G4double val)
{
fWorldSizeX = val;
fDefaultWorld = false;
ComputeCalorParameters();
ComputeGeomParameters();
if(fPhysiWorld) { ChangeGeometry(); }
}
@@ -401,7 +395,7 @@ void DetectorConstruction::SetWorldSizeYZ(G4double val)
{
fWorldSizeYZ = val;
fDefaultWorld = false;
ComputeCalorParameters();
ComputeGeomParameters();
if(fPhysiWorld) { ChangeGeometry(); }
}
@@ -0,0 +1,357 @@
//
// ********************************************************************
// * 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: $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysListEm19DStandard
//
// Author: Jose Luis Rodriguez 18.04.2018
//
// Modified:
// 18.04.2018 Created from PhysListEm5DStandard
//
//----------------------------------------------------------------------------
//
#include "PhysListEm19DStandard.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4EmParameters.hh"
#include "G4LossTableManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4BraggIonModel.hh"
#include "G4MuBremsstrahlungModel.hh"
#include "G4MuPairProductionModel.hh"
#include "G4hBremsstrahlungModel.hh"
#include "G4hPairProductionModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4AtimaEnergyLossModel.hh"
#include "G4AtimaFluctuations.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEm19DStandard::PhysListEm19DStandard(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandard_ATIMA"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetNumberOfBinsPerDecade(10);
param->SetMscStepLimitType(fUseSafetyPlus);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEm19DStandard::~PhysListEm19DStandard()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEm19DStandard::ConstructParticle()
{
// gamma
G4Gamma::Gamma();
// leptons
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
// barions
G4Proton::Proton();
G4AntiProton::AntiProton();
// ions
G4Deuteron::Deuteron();
G4Triton::Triton();
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEm19DStandard::ConstructProcess()
{
if(verbose > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// muon & hadron bremsstrahlung and pair production
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
G4MuPairProduction* mup = new G4MuPairProduction();
G4hBremsstrahlung* pib = new G4hBremsstrahlung();
G4hPairProduction* pip = new G4hPairProduction();
G4hBremsstrahlung* kb = new G4hBremsstrahlung();
G4hPairProduction* kp = new G4hPairProduction();
G4hBremsstrahlung* pb = new G4hBremsstrahlung();
G4hPairProduction* pp = new G4hPairProduction();
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// photo-effect and Compton
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* theGC5DModel = new G4BetheHeitler5DModel();
gc->SetEmModel(theGC5DModel);
ph->RegisterProcess(gc, particle);
// Rayleigh scattering
ph->RegisterProcess(new G4RayleighScattering(), particle);
} else if (particleName == "e-") {
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "e+") {
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
ph->RegisterProcess(mumsc, particle);
ph->RegisterProcess(new G4MuIonisation(), particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
ph->RegisterProcess(muss, particle);
} else if (particleName == "alpha" ||
particleName == "He3") {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
} else if (particleName == "GenericIon") {
G4ionIonisation* ionIoni = new G4ionIonisation();
ionIoni->SetEmModel(new G4BraggIonModel(),0);
ionIoni->SetEmModel(new G4AtimaEnergyLossModel(),1);
ionIoni->SetFluctModel(new G4AtimaFluctuations());
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
ph->RegisterProcess(pip, particle);
ph->RegisterProcess(piss, particle);
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
ph->RegisterProcess(kp, particle);
ph->RegisterProcess(kss, particle);
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.1, 10*um);
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(hIoni, particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
particleName == "D+" ||
particleName == "D-" ||
particleName == "Ds+" ||
particleName == "Ds-" ||
particleName == "anti_He3" ||
particleName == "anti_alpha" ||
particleName == "anti_deuteron" ||
particleName == "anti_lambda_c+" ||
particleName == "anti_omega-" ||
particleName == "anti_sigma_c+" ||
particleName == "anti_sigma_c++" ||
particleName == "anti_sigma+" ||
particleName == "anti_sigma-" ||
particleName == "anti_triton" ||
particleName == "anti_xi_c+" ||
particleName == "anti_xi-" ||
particleName == "deuteron" ||
particleName == "lambda_c+" ||
particleName == "omega-" ||
particleName == "sigma_c+" ||
particleName == "sigma_c++" ||
particleName == "sigma+" ||
particleName == "sigma-" ||
particleName == "tau+" ||
particleName == "tau-" ||
particleName == "triton" ||
particleName == "xi_c+" ||
particleName == "xi-" ) {
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,349 @@
//
// ********************************************************************
// * 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: $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysListEm5DStandard
//
// Author: IgS 07.11.2017
//
// Modified:
// 17.11.2017 Created using PhysListEm5DStandard from V.Ivanchenko
//
//----------------------------------------------------------------------------
//
#include "PhysListEm5DStandard.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh"
#include "G4EmParameters.hh"
#include "G4LossTableManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4MuBremsstrahlungModel.hh"
#include "G4MuPairProductionModel.hh"
#include "G4hBremsstrahlungModel.hh"
#include "G4hPairProductionModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEm5DStandard::PhysListEm5DStandard(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandard_5D"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetNumberOfBinsPerDecade(10);
param->SetMscStepLimitType(fUseSafetyPlus);
param->SetLateralDisplacementAlg96(false);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEm5DStandard::~PhysListEm5DStandard()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEm5DStandard::ConstructParticle()
{
// gamma
G4Gamma::Gamma();
// leptons
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4KaonPlus::KaonPlusDefinition();
G4KaonMinus::KaonMinusDefinition();
// barions
G4Proton::Proton();
G4AntiProton::AntiProton();
// ions
G4Deuteron::Deuteron();
G4Triton::Triton();
G4He3::He3();
G4Alpha::Alpha();
G4GenericIon::GenericIonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEm5DStandard::ConstructProcess()
{
if(verbose > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
// muon & hadron bremsstrahlung and pair production
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
G4MuPairProduction* mup = new G4MuPairProduction();
G4hBremsstrahlung* pib = new G4hBremsstrahlung();
G4hPairProduction* pip = new G4hPairProduction();
G4hBremsstrahlung* kb = new G4hBremsstrahlung();
G4hPairProduction* kp = new G4hPairProduction();
G4hBremsstrahlung* pb = new G4hBremsstrahlung();
G4hPairProduction* pp = new G4hPairProduction();
// muon & hadron multiple scattering
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering();
mumsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* muss = new G4CoulombScattering();
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering();
pimsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* piss = new G4CoulombScattering();
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering();
kmsc->AddEmModel(0, new G4WentzelVIModel());
G4CoulombScattering* kss = new G4CoulombScattering();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit = 100*MeV;
// Add standard EM Processes
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// photo-effect and Compton
ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* theGC5DModel = new G4BetheHeitler5DModel();
gc->SetEmModel(theGC5DModel);
ph->RegisterProcess(gc, particle);
// Rayleigh scattering
ph->RegisterProcess(new G4RayleighScattering(), particle);
} else if (particleName == "e-") {
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "e+") {
G4eMultipleScattering* msc = new G4eMultipleScattering;
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->AddEmModel(0, msc1);
msc->AddEmModel(0, msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm, 1);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
ph->RegisterProcess(mumsc, particle);
ph->RegisterProcess(new G4MuIonisation(), particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
ph->RegisterProcess(muss, particle);
} else if (particleName == "alpha" ||
particleName == "He3") {
ph->RegisterProcess(new G4hMultipleScattering(), particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
} else if (particleName == "GenericIon") {
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4ionIonisation(), particle);
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
ph->RegisterProcess(pimsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
ph->RegisterProcess(pip, particle);
ph->RegisterProcess(piss, particle);
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
ph->RegisterProcess(kmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
ph->RegisterProcess(kp, particle);
ph->RegisterProcess(kss, particle);
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
G4hIonisation* hIoni = new G4hIonisation();
hIoni->SetStepFunction(0.1, 10*um);
ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(hIoni, particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
particleName == "D+" ||
particleName == "D-" ||
particleName == "Ds+" ||
particleName == "Ds-" ||
particleName == "anti_He3" ||
particleName == "anti_alpha" ||
particleName == "anti_deuteron" ||
particleName == "anti_lambda_c+" ||
particleName == "anti_omega-" ||
particleName == "anti_sigma_c+" ||
particleName == "anti_sigma_c++" ||
particleName == "anti_sigma+" ||
particleName == "anti_sigma-" ||
particleName == "anti_triton" ||
particleName == "anti_xi_c+" ||
particleName == "anti_xi-" ||
particleName == "deuteron" ||
particleName == "lambda_c+" ||
particleName == "omega-" ||
particleName == "sigma_c+" ||
particleName == "sigma_c++" ||
particleName == "sigma+" ||
particleName == "sigma-" ||
particleName == "tau+" ||
particleName == "tau-" ||
particleName == "triton" ||
particleName == "xi_c+" ||
particleName == "xi-" ) {
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: PhysListEmStandard.cc 100286 2016-10-17 08:43:45Z gcosmo $
// $Id: PhysListEmStandard.cc 110387 2018-05-22 07:52:43Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -62,6 +62,8 @@
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4LindhardSorensenIonModel.hh"
#include "G4BraggIonModel.hh"
#include "G4BuilderType.hh"
#include "G4SystemOfUnits.hh"
@@ -77,6 +79,7 @@ PhysListEmStandard::PhysListEmStandard(const G4String& name)
param->SetMaxEnergy(10*TeV);
param->SetNumberOfBinsPerDecade(10);
param->SetMscStepLimitType(fUseSafetyPlus);
param->SetFluo(true);
SetPhysicsType(bElectromagnetic);
}
@@ -101,12 +104,12 @@ void PhysListEmStandard::ConstructProcess()
if (particleName == "gamma") {
////ph->RegisterProcess(new G4RayleighScattering, particle);
ph->RegisterProcess(new G4PhotoElectricEffect, particle);
G4ComptonScattering* cs = new G4ComptonScattering;
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(new G4GammaConversion, particle);
ph->RegisterProcess(new G4RayleighScattering, particle);
} else if (particleName == "e-") {
@@ -178,14 +181,10 @@ void PhysListEmStandard::ConstructProcess()
ph->RegisterProcess(new G4hIonisation(), particle);
}
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
de->SetFluo(true);
de->SetAuger(false);
de->SetPIXE(false);
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
}
@@ -1,157 +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. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/src/PhysListEmStandardSSM.cc
/// \brief Implementation of the PhysListEmStandardSSM class
//
// $Id: PhysListEmStandardSSM.cc 100286 2016-10-17 08:43:45Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListEmStandardSSM.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4hCoulombScatteringModel.hh"
#include "G4eSingleCoulombScatteringModel.hh"
#include "G4IonCoulombScatteringModel.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardSSM::PhysListEmStandardSSM(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListEmStandardSSM::~PhysListEmStandardSSM()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListEmStandardSSM::ConstructProcess()
{
// 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 G4PhotoElectricEffect);
pmanager->AddDiscreteProcess(new G4ComptonScattering);
pmanager->AddDiscreteProcess(new G4GammaConversion);
} else if (particleName == "e-") {
//electron
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
G4CoulombScattering* cs = new G4CoulombScattering();
G4eSingleCoulombScatteringModel* model =
new G4eSingleCoulombScatteringModel();
//model->SetLowEnergyThreshold(10*eV);
model->SetPolarAngleLimit(0.0);
cs->AddEmModel(0, model);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "e+") {
//positron
pmanager->AddProcess(new G4eIonisation, -1, 1, 1);
pmanager->AddProcess(new G4eBremsstrahlung, -1, 2, 2);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 3);
G4CoulombScattering* cs = new G4CoulombScattering();
G4eSingleCoulombScatteringModel* model =
new G4eSingleCoulombScatteringModel();
model->SetPolarAngleLimit(0.0);
cs->AddEmModel(0, model);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
//muon
pmanager->AddProcess(new G4MuIonisation, -1, 1, 1);
pmanager->AddProcess(new G4MuBremsstrahlung, -1, 2, 2);
pmanager->AddProcess(new G4MuPairProduction, -1, 3, 3);
G4CoulombScattering* cs = new G4CoulombScattering();
G4hCoulombScatteringModel* model = new G4hCoulombScatteringModel();
model->SetPolarAngleLimit(0.0);
cs->AddEmModel(0, model);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "alpha" || particleName == "He3") {
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->AddEmModel(0, new G4IonCoulombScatteringModel());
cs->SetBuildTableFlag(false);
pmanager->AddDiscreteProcess(cs);
} else if (particleName == "GenericIon" ) {
pmanager->AddProcess(new G4ionIonisation, -1, 1, 1);
G4CoulombScattering* cs = new G4CoulombScattering();
cs->AddEmModel(0, new G4IonCoulombScatteringModel());
cs->SetBuildTableFlag(false);
pmanager->AddDiscreteProcess(cs);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
//all others charged particles except geantino
pmanager->AddProcess(new G4hIonisation, -1, 1, 1);
pmanager->AddDiscreteProcess(new G4CoulombScattering);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/src/PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
// $Id: PhysicsList.cc 104417 2017-05-30 08:30:48Z gcosmo $
// $Id: PhysicsList.cc 110387 2018-05-22 07:52:43Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -35,7 +35,8 @@
#include "PhysicsListMessenger.hh"
#include "PhysListEmStandard.hh"
#include "PhysListEmStandardSSM.hh"
#include "PhysListEm5DStandard.hh"
#include "PhysListEm19DStandard.hh"
#include "G4EmStandardPhysics.hh"
#include "G4EmStandardPhysics_option1.hh"
@@ -57,11 +58,9 @@
#include "G4HadronElasticPhysics.hh"
#include "G4Decay.hh"
#include "G4DecayPhysics.hh"
#include "StepMax.hh"
#include "G4LossTableManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
@@ -88,10 +87,12 @@ PhysicsList::PhysicsList() : G4VModularPhysicsList(),
SetVerboseLevel(1);
// EM physics
fEmName = G4String("local");
fEmPhysicsList = new PhysListEmStandard(fEmName);
fEmName = G4String("emstandard_opt4");
fEmPhysicsList = new G4EmStandardPhysics_option4();
// Decay physics
fDecayPhysics = new G4DecayPhysics(1);
G4LossTableManager::Instance();
SetDefaultCutValue(1*mm);
}
@@ -141,43 +142,17 @@ void PhysicsList::ConstructProcess()
{
AddTransportation();
fEmPhysicsList->ConstructProcess();
fDecayPhysics->ConstructProcess();
if(fHadPhysicsList) { fHadPhysicsList->ConstructProcess(); }
AddDecay();
AddStepMax();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::AddDecay()
{
// Add Decay Process
G4Decay* fDecayProcess = new G4Decay();
auto particleIterator=GetParticleIterator();
particleIterator->reset();
while( (*particleIterator)() ){
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) {
pmanager ->AddProcess(fDecayProcess);
// set ordering for PostStepDoIt and AtRestDoIt
pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::AddStepMax()
{
// Step limitation seen as a process
StepMax* stepMaxProcess = new StepMax();
StepMax* stepMaxProcess = new StepMax(fMessenger);
auto particleIterator=GetParticleIterator();
particleIterator->reset();
@@ -185,7 +160,7 @@ void PhysicsList::AddStepMax()
G4ParticleDefinition* particle = particleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
if (stepMaxProcess->IsApplicable(*particle))
{
pmanager ->AddDiscreteProcess(stepMaxProcess);
}
@@ -237,6 +212,12 @@ void PhysicsList::AddPhysicsList(const G4String& name)
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysics_option4();
} else if (name == "emstandardATIMA") {
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEm19DStandard();
} else if (name == "emstandardSS") {
@@ -244,11 +225,11 @@ void PhysicsList::AddPhysicsList(const G4String& name)
delete fEmPhysicsList;
fEmPhysicsList = new G4EmStandardPhysicsSS();
} else if (name == "emstandardSSM") {
} else if (name == "emstandard5D") {
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEmStandardSSM();
fEmPhysicsList = new PhysListEm5DStandard();
} else if (name == "emstandardWVI") {
@@ -26,7 +26,7 @@
/// \file electromagnetic/TestEm5/src/PhysicsListMessenger.cc
/// \brief Implementation of the PhysicsListMessenger class
//
// $Id: PhysicsListMessenger.cc 81528 2014-06-02 16:21:24Z vnivanch $
// $Id: PhysicsListMessenger.cc 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,7 +41,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
:G4UImessenger(),fPhysicsList(pPhys)
:G4UImessenger(),fPhysicsList(pPhys),fMaxChargedStep(DBL_MAX)
{
fPhysDir = new G4UIdirectory("/testem/phys/");
fPhysDir->SetGuidance("physics list commands");
@@ -51,6 +51,13 @@ PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
fListCmd->SetParameterName("PList",false);
fListCmd->AvailableForStates(G4State_PreInit);
fListCmd->SetToBeBroadcasted(false);
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
fStepMaxCmd->SetGuidance("Set max allowed step length");
fStepMaxCmd->SetParameterName("mxStep",false);
fStepMaxCmd->SetRange("mxStep>0.");
fStepMaxCmd->SetUnitCategory("Length");
fStepMaxCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -59,6 +66,7 @@ PhysicsListMessenger::~PhysicsListMessenger()
{
delete fListCmd;
delete fPhysDir;
delete fStepMaxCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -66,7 +74,9 @@ PhysicsListMessenger::~PhysicsListMessenger()
void PhysicsListMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if( command == fListCmd )
{ fPhysicsList->AddPhysicsList(newValue);}
{ fPhysicsList->AddPhysicsList(newValue); }
if (command == fStepMaxCmd)
{ fMaxChargedStep = fStepMaxCmd->GetNewDoubleValue(newValue); }
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -201,7 +201,7 @@ void Run::EndOfRun()
//Stopping Power from input Table.
//
G4Material* material = fDetector->GetAbsorberMaterial();
const G4Material* material = fDetector->GetAbsorberMaterial();
G4double length = fDetector->GetAbsorberThickness();
G4double density = material->GetDensity();
G4String partName = fParticle->GetParticleName();
@@ -23,66 +23,84 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/src/StepMax.cc
/// \brief Implementation of the StepMax class
//
// $Id: StepMax.cc 98752 2016-08-09 13:44:40Z gcosmo $
// $Id: StepMax.cc 109000 2018-03-21 09:25:56Z gcosmo $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "StepMax.hh"
#include "StepMaxMessenger.hh"
#include "PhysicsListMessenger.hh"
#include "G4VPhysicalVolume.hh"
#include "G4TransportationProcessType.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMax::StepMax(const G4String& processName)
: G4VDiscreteProcess(processName),fMaxChargedStep(DBL_MAX),fMess(0)
StepMax::StepMax(PhysicsListMessenger* mess)
: G4VEmProcess("UserMaxStep", fGeneral),fMessenger(mess),
fMaxChargedStep(DBL_MAX),isInitialised(false)
{
fMess = new StepMaxMessenger(this);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMax::~StepMax() { delete fMess; }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4bool StepMax::IsApplicable(const G4ParticleDefinition& particle)
{
return (particle.GetPDGCharge() != 0.);
SetProcessSubType(static_cast<G4int>(STEP_LIMITER));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMax::SetMaxStep(G4double step) { fMaxChargedStep = step;}
StepMax::~StepMax()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double StepMax::PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double,
G4ForceCondition* condition )
G4bool StepMax::IsApplicable(const G4ParticleDefinition& part)
{
return (part.GetPDGCharge() != 0. && !part.IsShortLived());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMax::PreparePhysicsTable(const G4ParticleDefinition&)
{
if(isInitialised) {
isInitialised = false;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMax::BuildPhysicsTable(const G4ParticleDefinition&)
{
if(!isInitialised) {
fMaxChargedStep = fMessenger->GetMaxChargedStep();
isInitialised = true;
if(fMaxChargedStep < DBL_MAX) {
G4cout << GetProcessName() << ": SubType= " << GetProcessSubType()
<< " Step limit(mm)= " << fMaxChargedStep << G4endl;
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMax::InitialiseProcess(const G4ParticleDefinition*)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double
StepMax::PostStepGetPhysicalInteractionLength(const G4Track&,
G4double,
G4ForceCondition* condition)
{
// condition is set to "Not Forced"
*condition = NotForced;
G4double ProposedStep = DBL_MAX;
if((fMaxChargedStep > 0.) &&
(aTrack.GetVolume() != 0) &&
(aTrack.GetVolume()->GetName() == "Absorber"))
ProposedStep = fMaxChargedStep;
return ProposedStep;
return fMaxChargedStep;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VParticleChange* StepMax::PostStepDoIt(const G4Track& aTrack, const G4Step&)
{
// do nothing
aParticleChange.Initialize(aTrack);
return &aParticleChange;
// do nothing
aParticleChange.Initialize(aTrack);
return &aParticleChange;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,66 +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. *
// ********************************************************************
//
/// \file electromagnetic/TestEm5/src/StepMaxMessenger.cc
/// \brief Implementation of the StepMaxMessenger class
//
// $Id: StepMaxMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "StepMaxMessenger.hh"
#include "StepMax.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
:G4UImessenger(),fStepMax(stepM),fStepMaxCmd(0)
{
fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepMax",this);
fStepMaxCmd->SetGuidance("Set max allowed step length");
fStepMaxCmd->SetParameterName("mxStep",false);
fStepMaxCmd->SetRange("mxStep>0.");
fStepMaxCmd->SetUnitCategory("Length");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
StepMaxMessenger::~StepMaxMessenger()
{
delete fStepMaxCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void StepMaxMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{
if (command == fStepMaxCmd)
{ fStepMax->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......