Geant4  10.02.p02
Shielding.icc
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 // $Id: Shielding.icc 83413 2014-08-21 15:21:43Z gcosmo $
27 //
28 //---------------------------------------------------------------------------
29 //
30 // ClassName:
31 //
32 // Author: 2010 Tatsumi Koi, Gunter Folger
33 //
34 // created from FTFP_BERT
35 //
36 // Modified:
37 // 05.08.2014 K.L.Genser: added provision for Hadronic Physics Variant M
38 // 16.08.2010 H.Kurashige: Remove inclusion of G4ParticleWithCuts
39 // 26.04.2011 T.Koi: Add G4RadioactiveDecayPhysics
40 // 16.10.2012 A.Ribon: Use new default stopping
41 // 07.11.2013 T.Koi: Add IonElasticPhysics, Set proton cut to 0 to generate
42 // low energy recoils and activate production of fission
43 // fragments
44 //
45 //----------------------------------------------------------------------------
46 //
47 
48 #include <iomanip>
49 
50 #include "globals.hh"
51 #include "G4ios.hh"
52 #include "G4ProcessManager.hh"
53 #include "G4ProcessVector.hh"
54 #include "G4ParticleTypes.hh"
55 #include "G4ParticleTable.hh"
56 
57 #include "G4Material.hh"
58 #include "G4MaterialTable.hh"
59 
60 #include "G4DecayPhysics.hh"
61 #include "G4RadioactiveDecayPhysics.hh"
62 #include "G4EmProcessOptions.hh"
63 #include "G4EmStandardPhysics.hh"
64 #include "G4EmExtraPhysics.hh"
65 #include "G4IonQMDPhysics.hh"
66 #include "G4IonElasticPhysics.hh"
67 #include "G4StoppingPhysics.hh"
68 #include "G4HadronElasticPhysicsHP.hh"
69 #include "G4HadronElasticPhysicsLEND.hh"
70 
71 #include "G4DataQuestionaire.hh"
72 #include "G4HadronPhysicsShielding.hh"
73 
74 //template<class T> TShielding<T>::TShielding(G4int ver): T()
75 template<class T> TShielding<T>::TShielding( G4int verbose, G4String LEN_model,
76  G4String HadrPhysVariant ): T()
77 {
78  // default cut value (1.0mm)
79  // defaultCutValue = 1.0*CLHEP::mm;
80  G4DataQuestionaire it(photon, neutron, radioactive);
81  G4cout << "<<< Geant4 Physics List simulation engine: Shielding"
82  << HadrPhysVariant<< " 2.1"<<G4endl;
83  G4cout <<G4endl;
84  this->defaultCutValue = 0.7*CLHEP::mm;
85  this->SetVerboseLevel(verbose);
86 
87  // EM Physics
88  this->RegisterPhysics( new G4EmStandardPhysics(verbose));
89  //G4EmProcessOptions emOptions;
90  //emOptions.SetFluo(true); // To activate deexcitation processes and fluorescence
91  //emOptions.SetAuger(true); // To activate Auger effect if deexcitation is activated
92  //emOptions.SetPIXE(true); // To activate Particle Induced X-Ray Emission (PIXE)
93 
94  // Synchroton Radiation & GN Physics
95  this->RegisterPhysics( new G4EmExtraPhysics(verbose) );
96 
97  // Decays
98  this->RegisterPhysics( new G4DecayPhysics(verbose) );
99  //if ( rad == true ) this->RegisterPhysics( new G4RadioactiveDecayPhysics(verbose) );
100  this->RegisterPhysics( new G4RadioactiveDecayPhysics(verbose) );
101 
102  size_t find = LEN_model.find("LEND__");
103  G4String evaluation;
104  if ( find != G4String::npos )
105  {
106  evaluation=LEN_model;
107  evaluation.erase(0,find+6);
108  LEN_model="LEND";
109  }
110 
111  // Hadron Elastic scattering
112  if ( LEN_model == "HP" )
113  {
114  this->RegisterPhysics( new G4HadronElasticPhysicsHP(verbose) );
115  }
116  else if ( LEN_model == "LEND" )
117  {
118  this->RegisterPhysics( new G4HadronElasticPhysicsLEND(verbose,evaluation) );
119  G4DataQuestionaire itt(lend);
120  }
121  else
122  {
123  G4cout << "Shielding Physics List: Warning!" <<G4endl;
124  G4cout << "\"" << LEN_model << "\" is not valid for the low energy neutorn model." <<G4endl;
125  G4cout << "Neutron HP package will be used." <<G4endl;
126  this->RegisterPhysics( new G4HadronElasticPhysicsHP(verbose) );
127  }
128 
129  G4HadronPhysicsShielding* hps;
130  // Hadron Physics
131  if (HadrPhysVariant == "M") {
132  hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 9.5*GeV, 9.9*GeV);
133  } else {
134  hps = new G4HadronPhysicsShielding("hInelastic Shielding", verbose, 4.0*GeV, 5.0*GeV);
135  }
136  if ( LEN_model == "HP" )
137  {
138  ;
139  }
140  else if ( LEN_model == "LEND" )
141  {
142  hps->UseLEND(evaluation);
143  }
144  else
145  {
146  //G4cout << "Shielding Physics List: Warning." <<G4endl;
147  //G4cout << "Name of Low Energy Neutron model " << LEN_model << " is invalid." <<G4endl;
148  //G4cout << "Will use neutron HP package." <<G4endl;
149  }
150  this->RegisterPhysics( hps );
151  //this->RegisterPhysics( new G4HadronPhysicsShielding(verbose,lend));
152 
153  if ( LEN_model == "HP" ) {
154  //Activate prodcuton of fission fragments in neutronHP
155  char env_ff[]="G4NEUTRONHP_PRODUCE_FISSION_FRAGMENTS=1";
156  putenv(env_ff);
157  }
158 
159  // Stopping Physics
160  this->RegisterPhysics( new G4StoppingPhysics(verbose) );
161 
162  // Ion Physics
163  this->RegisterPhysics( new G4IonQMDPhysics(verbose));
164 
165  this->RegisterPhysics( new G4IonElasticPhysics(verbose));
166 
167  // Neutron tracking cut --> not by default
168  // this->RegisterPhysics( new G4NeutronTrackingCut(verbose));
169 
170 }
171 
172 template<class T> TShielding<T>::~TShielding()
173 {
174 }
175 
176 template<class T> void TShielding<T>::SetCuts()
177 {
178  if (this->verboseLevel >1){
179  G4cout << "Shielding::SetCuts:";
180  }
181  // " G4VUserPhysicsList::SetCutsWithDefault" method sets
182  // the default cut value for all particle types
183 
184  this->SetCutsWithDefault();
185 
186  //Set proton cut value to 0 for producing low energy recoil nucleus
187  this->SetCutValue(0, "proton");
188 
189 // if (this->verboseLevel > 0)
190 // G4VUserPhysicsList::DumpCutValuesTable();
191 }