Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
Shielding.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//---------------------------------------------------------------------------
28//
29// ClassName:
30//
31// Author: 2010 Tatsumi Koi, Gunter Folger
32//
33// created from FTFP_BERT
34//
35// Modified:
36// 05.08.2014 K.L.Genser: added provision for Hadronic Physics Variant M
37// 16.08.2010 H.Kurashige: Remove inclusion of G4ParticleWithCuts
38// 26.04.2011 T.Koi: Add G4RadioactiveDecayPhysics
39// 16.10.2012 A.Ribon: Use new default stopping
40// 07.11.2013 T.Koi: Add IonElasticPhysics, Set proton cut to 0 to generate
41// low energy recoils and activate production of fission
42// fragments
43// 06.08.2019 A.Ribon: Replacing explicit values for the energy transition
44// region with values from G4HadronicParameters
45// 19.11.2024 D.M.Wright: Simplify logic tree for inelastic models and
46// move LEND hadronic inelastic processes to G4HadronPhysicsLEND
47//
48//----------------------------------------------------------------------------
49//
50
51#include "Shielding.hh"
52#include "globals.hh"
53
54#include "G4DecayPhysics.hh"
58#include "G4EmExtraPhysics.hh"
59#include "G4IonQMDPhysics.hh"
62#include "G4StoppingPhysics.hh"
65
69
72
73Shielding::Shielding(G4int verbose, const G4String& n_model,
74 const G4String& HadrPhysVariant, G4bool useLightIonQMD)
75{
76 G4String LEN_model = n_model;
77 size_t find = LEN_model.find("LEND__");
78 G4String evaluation;
79 if ( find != G4String::npos )
80 {
81 evaluation=LEN_model;
82 evaluation.erase(0,find+6);
83 LEN_model="LEND";
84 }
85
86 if(verbose > 0) {
87 G4cout << "<<< Geant4 Physics List simulation engine: Shielding"
88 << HadrPhysVariant << G4endl;
89 if ( LEN_model=="LEND" ) {
90 G4cout << "<<< LEND will be used for low energy neutron and gamma projectiles" << G4endl;
91 } else {
92 G4cout << "<<< (Note that Shielding" << HadrPhysVariant << " and Shielding"
93 << HadrPhysVariant << "_HP are equivalent!)" << G4endl;
94 }
95 }
96 defaultCutValue = 0.7*CLHEP::mm;
97 SetCutValue(0, "proton");
98 SetVerboseLevel(verbose);
99
100 // EM Physics
102
103 // Synchroton Radiation & Gamma Nuclear Physics
104 G4EmExtraPhysics* emExtraPhysics = new G4EmExtraPhysics(verbose);
105
106 // Adjust energy bounds of gamma nuclear models from G4EmExtraPhysics
107 if ( LEN_model == "LEND" )
108 emExtraPhysics->LENDGammaNuclear(true);
109
110 RegisterPhysics( emExtraPhysics );
111
112 // Decays
113 RegisterPhysics( new G4DecayPhysics(verbose) );
115
116 // Hadron Elastic scattering
117 if ( LEN_model == "HP" ) {
119 } else if ( LEN_model == "LEND" ) {
120 RegisterPhysics( new G4HadronElasticPhysicsLEND(verbose,evaluation));
121 } else {
122 if(verbose > 0) {
123 G4cout << "Shielding Physics List: Warning!" <<G4endl;
124 G4cout << "\"" << LEN_model
125 << "\" is not valid for the low energy neutron model." <<G4endl;
126 G4cout << "Neutron HP package will be used." <<G4endl;
127 }
129 }
130
131 // Hadron Physics = Bertini and FTF with HP or LEND
133 G4String HadPhysName = "hInelastic Shielding";
134 if ( LEN_model == "LEND" ) HadPhysName += "LEND";
135
136 G4double HadPhysEmin, HadPhysEmax;
137 if (HadrPhysVariant == "M") {
138 // The variant "M" has a special, dedicated energy transition region
139 // between the string model and cascade model, therefore the recommended
140 // values from G4HadronicParameters are intentionally not used.
141 HadPhysEmin = 9.5*CLHEP::GeV;
142 HadPhysEmax = 9.9*CLHEP::GeV;
143 } else {
146 }
147
148 // N.B., G4HadronPhysicsShielding only builds neutron processes
149 hpc = new G4HadronPhysicsShielding(HadPhysName, verbose, HadPhysEmin, HadPhysEmax);
150
151 // Turn off HP low energy model defined by G4HadronPhysicsShielding
152 if ( LEN_model == "LEND" )
153 ((G4HadronPhysicsShielding*)hpc)->UseLEND();
154
155 RegisterPhysics( hpc );
156
157 // Activate production of fission fragments in NeutronHP
158 if ( LEN_model == "HP" )
160
161 // Add LEND processes (neutron and photon induced)
162 if ( LEN_model == "LEND" )
163 RegisterPhysics( new G4HadronPhysicsLEND(verbose, evaluation));
164
165 // Stopping Physics
166 RegisterPhysics( new G4StoppingPhysics(verbose) );
167
168 // Ion Physics
169 RegisterPhysics( new G4IonElasticPhysics(verbose) );
170 if (useLightIonQMD){
172 } else {
173 RegisterPhysics( new G4IonQMDPhysics(verbose) );
174 }
175}
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void LENDGammaNuclear(G4bool val)
static G4HadronicParameters * Instance()
G4double GetMinEnergyTransitionFTF_Cascade() const
G4double GetMaxEnergyTransitionFTF_Cascade() const
void SetProduceFissionFragments(G4bool val)
static G4ParticleHPManager * GetInstance()
void SetVerboseLevel(G4int value)
void RegisterPhysics(G4VPhysicsConstructor *)
void SetCutValue(G4double aCut, const G4String &pname)
Shielding(G4int verb=1, const G4String &n_model="HP", const G4String &HadrPhysVariant="", G4bool useLightIonQMD=false)
Definition Shielding.cc:73