Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.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 //
28 //
29 //
30 // $Id: PhysicsList.cc 101216 2016-11-09 13:54:13Z gcosmo $
31 //
33 //
34 // PhysicsList
35 //
36 // Created: 31.04.2006 V.Ivanchenko
37 //
38 // Modified:
39 // 04.06.2006 Adoptation of Hadr01 (V.Ivanchenko)
40 // 26.04.2007 Physics according to 8.3 Physics List (V.Ivanchenko)
41 // 16.10.2012 Renamed used classes (A.Ribon)
42 //
44 //
45 
46 #include "PhysicsList.hh"
47 #include "PhysicsListMessenger.hh"
48 
49 #include "G4DecayPhysics.hh"
50 #include "G4EmStandardPhysics.hh"
55 #include "G4EmStandardPhysicsGS.hh"
56 #include "G4EmLivermorePhysics.hh"
57 #include "G4EmPenelopePhysics.hh"
63 #include "G4NeutronTrackingCut.hh"
65 #include "G4StoppingPhysics.hh"
67 #include "G4IonPhysics.hh"
68 #include "G4EmExtraPhysics.hh"
69 #include "G4EmParameters.hh"
70 
75 #include "G4HadronInelasticQBBC.hh"
82 
83 #include "G4ProcessManager.hh"
84 #include "G4ParticleTypes.hh"
85 #include "G4ParticleTable.hh"
86 #include "G4Gamma.hh"
87 #include "G4Electron.hh"
88 #include "G4Positron.hh"
89 #include "G4Proton.hh"
90 
91 #include "G4SystemOfUnits.hh"
92 
93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
94 
96 {
98 
99  verboseLevel = 1;
100 
101  fMessenger = new PhysicsListMessenger(this);
102 
103  // Particles
104  fParticleList = new G4DecayPhysics(verboseLevel);
105 
106  // EM physics
107  fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
111 
113 {
114  delete fMessenger;
115  delete fParticleList;
116  delete fEmPhysicsList;
117  for(size_t i=0; i<fHadronPhys.size(); i++) {
118  delete fHadronPhys[i];
119  }
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
123 
125 {
126  fParticleList->ConstructParticle();
127 }
128 
129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
130 
132 {
134  fEmPhysicsList->ConstructProcess();
135  fParticleList->ConstructProcess();
136  for(size_t i=0; i<fHadronPhys.size(); i++) {
137  fHadronPhys[i]->ConstructProcess();
138  }
139 }
140 
141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
142 
144 {
145  if (verboseLevel>0) {
146  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
147  }
148  if (name == "emstandard_opt0") {
149 
150  delete fEmPhysicsList;
151  fEmPhysicsList = new G4EmStandardPhysics(verboseLevel);
152 
153  } else if (name == "emstandard_opt1") {
154 
155  delete fEmPhysicsList;
156  fEmPhysicsList = new G4EmStandardPhysics_option1(verboseLevel);
157 
158  } else if (name == "emstandard_opt2") {
159 
160  delete fEmPhysicsList;
161  fEmPhysicsList = new G4EmStandardPhysics_option2(verboseLevel);
162 
163  } else if (name == "emstandard_opt3") {
164 
165  delete fEmPhysicsList;
166  fEmPhysicsList = new G4EmStandardPhysics_option3(verboseLevel);
167 
168  } else if (name == "emstandard_opt4") {
169 
170  delete fEmPhysicsList;
171  fEmPhysicsList = new G4EmStandardPhysics_option4(verboseLevel);
172 
173  } else if (name == "emstandardGS") {
174 
175  delete fEmPhysicsList;
176  fEmPhysicsList = new G4EmStandardPhysicsGS(verboseLevel);
177 
178  } else if (name == "FTFP_BERT_EMV") {
179 
180  AddPhysicsList("FTFP_BERT");
181  AddPhysicsList("emstandard_opt1");
182 
183  } else if (name == "FTFP_BERT_EMX") {
184 
185  AddPhysicsList("FTFP_BERT");
186  AddPhysicsList("emstandard_opt2");
187 
188  } else if (name == "FTFP_BERT_EMY") {
189 
190  AddPhysicsList("FTFP_BERT");
191  AddPhysicsList("emstandard_opt3");
192 
193  } else if (name == "FTFP_BERT_EMZ") {
194 
195  AddPhysicsList("FTFP_BERT");
196  AddPhysicsList("emstandard_opt4");
197 
198  } else if (name == "FTFP_BERT") {
199 
200  SetBuilderList0(false);
201  fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT(verboseLevel));
202 
203  } else if (name == "FTFP_BERT_TRV") {
204 
205  AddPhysicsList("emstandardGS");
207 
208  SetBuilderList1(false);
209  fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT_TRV(verboseLevel));
210 
211  } else if (name == "FTF_BIC") {
212 
213  SetBuilderList0(false);
214  fHadronPhys.push_back( new G4HadronPhysicsFTF_BIC(verboseLevel));
215 
216  } else if (name == "QBBC") {
217 
218  AddPhysicsList("emstandard_opt0");
219  SetBuilderList2();
220  fHadronPhys.push_back( new G4HadronInelasticQBBC(verboseLevel));
221 
222  } else if (name == "QGSP_BERT") {
223 
224  SetBuilderList0(false);
225  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT(verboseLevel));
226 
227  } else if (name == "QGSP_FTFP_BERT") {
228 
229  SetBuilderList0(false);
230  fHadronPhys.push_back( new G4HadronPhysicsQGSP_FTFP_BERT(verboseLevel));
231 
232  } else if (name == "QGSP_FTFP_BERT_EMV") {
233 
234  AddPhysicsList("QGSP_FTFP_BERT");
235  AddPhysicsList("emstandard_opt1");
236 
237  } else if (name == "QGSP_BERT_EMV") {
238 
239  AddPhysicsList("QGSP_BERT");
240  AddPhysicsList("emstandard_opt1");
241 
242  } else if (name == "QGSP_BERT_EMX") {
243 
244  AddPhysicsList("QGSP_BERT");
245  AddPhysicsList("emstandard_opt2");
246 
247  } else if (name == "QGSP_BERT_HP") {
248 
249  SetBuilderList0(true);
250  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP(verboseLevel));
251 
252  } else if (name == "QGSP_BIC") {
253 
254  SetBuilderList0(false);
255  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC(verboseLevel));
256 
257  } else if (name == "QGSP_BIC_EMY") {
258 
259  AddPhysicsList("QGSP_BIC");
260  AddPhysicsList("emstandard_opt3");
261 
262  } else if (name == "QGS_BIC") {
263 
264  SetBuilderList0(false);
265  fHadronPhys.push_back( new G4HadronPhysicsQGS_BIC(verboseLevel));
266 
267  } else if (name == "QGSP_BIC_HP") {
268 
269  SetBuilderList0(true);
270  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP(verboseLevel));
271 
272  } else {
273 
274  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
275  << " is not defined"
276  << G4endl;
277  }
278 }
279 
280 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
281 
282 void PhysicsList::SetBuilderList0(G4bool flagHP)
283 {
284  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
285  if(flagHP) {
286  fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
287  } else {
288  fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
289  }
290  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
291  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
292  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
293 }
294 
295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
296 
297 void PhysicsList::SetBuilderList1(G4bool flagHP)
298 {
299  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
300  if(flagHP) {
301  fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
302  } else {
303  fHadronPhys.push_back( new G4HadronHElasticPhysics(verboseLevel) );
304  }
305  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
306  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
307  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
308 }
309 
310 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
311 
312 void PhysicsList::SetBuilderList2()
313 {
314  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
315  fHadronPhys.push_back( new G4HadronElasticPhysicsXS(verboseLevel) );
316  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
317  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
318  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
319 }
320 
321 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
322 
324 {
325  G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
326  << "FTFP_BERT_EMX FTFP_BERT_EMZ FTFP_BERT_TRV"
327  << G4endl;
328  G4cout << " FTF_BIC QBBC QGSP_BERT "
329  << "QGSP_BERT_EMV QGSP_BERT_EMX"
330  << G4endl;
331  G4cout << " QGSP_BERT_HP QGSP_FTFP_BERT "
332  << "QGSP_FTFP_BERT_EMV"
333  << G4endl;
334  G4cout << " QGS_BIC QGSP_BIC QGSP_BIC_EMY "
335  << "QGSP_BIC_HP"
336  << G4endl;
337 }
338 
339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
340 
void SetDefaultCutValue(G4double newCutValue)
const XML_Char * name
Definition: expat.h:151
void ConstructParticle()
Definition: PhysicsList.cc:117
void SetMscStepLimitType(G4MscStepLimitType val)
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
virtual void ConstructParticle()=0
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static constexpr double mm
Definition: SystemOfUnits.h:95
static G4EmParameters * Instance()
virtual void ConstructProcess()=0
#define G4endl
Definition: G4ios.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170