Geant4  9.6.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$
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 "G4EmLivermorePhysics.hh"
56 #include "G4EmPenelopePhysics.hh"
63 #include "G4NeutronTrackingCut.hh"
65 #include "G4QStoppingPhysics.hh"
66 #include "G4StoppingPhysics.hh"
67 #include "G4LHEPStoppingPhysics.hh"
69 #include "G4IonLHEPPhysics.hh"
70 #include "G4IonPhysics.hh"
71 #include "G4EmExtraPhysics.hh"
72 #include "G4EmProcessOptions.hh"
73 
75 #include "HadronPhysicsFTF_BIC.hh"
76 #include "HadronPhysicsLHEP.hh"
77 #include "HadronPhysicsLHEP_EMV.hh"
78 #include "G4HadronInelasticQBBC.hh"
80 #include "HadronPhysicsQGSP.hh"
83 #include "HadronPhysicsQGSP_BIC.hh"
86 #include "HadronPhysicsQGS_BIC.hh"
87 
88 #include "G4LossTableManager.hh"
89 
90 #include "G4ProcessManager.hh"
91 #include "G4ParticleTypes.hh"
92 #include "G4ParticleTable.hh"
93 #include "G4Gamma.hh"
94 #include "G4Electron.hh"
95 #include "G4Positron.hh"
96 #include "G4Proton.hh"
97 
98 #include "G4SystemOfUnits.hh"
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
101 
103 {
105  defaultCutValue = 0.7*mm;
106  fCutForGamma = defaultCutValue;
107  fCutForElectron = defaultCutValue;
108  fCutForPositron = defaultCutValue;
109  fCutForProton = defaultCutValue;
110  verboseLevel = 1;
111 
112  fMessenger = new PhysicsListMessenger(this);
113 
114  // Particles
115  fParticleList = new G4DecayPhysics("decays");
116 
117  // EM physics
118  fEmPhysicsList = new G4EmStandardPhysics();
119 }
120 
121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
122 
124 {
125  delete fMessenger;
126  delete fParticleList;
127  delete fEmPhysicsList;
128  for(size_t i=0; i<fHadronPhys.size(); i++) {
129  delete fHadronPhys[i];
130  }
131 }
132 
133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
134 
136 {
137  fParticleList->ConstructParticle();
138 }
139 
140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
141 
143 {
145  fEmPhysicsList->ConstructProcess();
146  fParticleList->ConstructProcess();
147  for(size_t i=0; i<fHadronPhys.size(); i++) {
148  fHadronPhys[i]->ConstructProcess();
149  }
150 }
151 
152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
153 
155 {
156  if (verboseLevel>0) {
157  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
158  }
159  if (name == "emstandard_opt0") {
160 
161  delete fEmPhysicsList;
162  fEmPhysicsList = new G4EmStandardPhysics();
163 
164  } else if (name == "emstandard_opt1") {
165 
166  delete fEmPhysicsList;
167  fEmPhysicsList = new G4EmStandardPhysics_option1();
168 
169  } else if (name == "emstandard_opt2") {
170 
171  delete fEmPhysicsList;
172  fEmPhysicsList = new G4EmStandardPhysics_option2();
173 
174  } else if (name == "emstandard_opt3") {
175 
176  delete fEmPhysicsList;
177  fEmPhysicsList = new G4EmStandardPhysics_option3();
178 
179  } else if (name == "emstandard_opt4") {
180 
181  delete fEmPhysicsList;
182  fEmPhysicsList = new G4EmStandardPhysics_option4();
183 
184  } else if (name == "FTFP_BERT_EMV") {
185 
186  AddPhysicsList("emstandard_opt1");
187  AddPhysicsList("FTFP_BERT");
188 
189  } else if (name == "FTFP_BERT_EMX") {
190 
191  AddPhysicsList("emstandard_opt2");
192  AddPhysicsList("FTFP_BERT");
193 
194  } else if (name == "FTFP_BERT") {
195 
196  SetBuilderList1();
197  fHadronPhys.push_back( new HadronPhysicsFTFP_BERT());
198 
199  } else if (name == "FTF_BIC") {
200 
201  SetBuilderList0();
202  fHadronPhys.push_back( new HadronPhysicsFTF_BIC());
203  fHadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
204 
205  } else if (name == "LHEP") {
206 
207  SetBuilderList2();
208  fHadronPhys.push_back( new HadronPhysicsLHEP());
209 
210  } else if (name == "LHEP_EMV") {
211 
212  AddPhysicsList("emstandard_opt1");
213  SetBuilderList2(true);
214  fHadronPhys.push_back( new HadronPhysicsLHEP_EMV());
215 
216  } else if (name == "QBBC") {
217 
218  AddPhysicsList("emstandard_opt0");
219  SetBuilderList3();
220  fHadronPhys.push_back( new G4HadronInelasticQBBC());
221 
222  } else if (name == "QGSC_BERT") {
223 
224  SetBuilderList4();
225  fHadronPhys.push_back( new HadronPhysicsQGSC_BERT());
226 
227  } else if (name == "QGSP") {
228 
229  SetBuilderList1();
230  fHadronPhys.push_back( new HadronPhysicsQGSP());
231 
232  } else if (name == "QGSP_BERT") {
233 
234  SetBuilderList1();
235  fHadronPhys.push_back( new HadronPhysicsQGSP_BERT());
236 
237  } else if (name == "QGSP_FTFP_BERT") {
238 
239  SetBuilderList1();
240  fHadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT());
241 
242  } else if (name == "QGSP_BERT_EMV") {
243 
244  AddPhysicsList("emstandard_opt1");
245  AddPhysicsList("QGSP_BERT");
246 
247  } else if (name == "QGSP_BERT_EMX") {
248 
249  AddPhysicsList("emstandard_opt2");
250  AddPhysicsList("QGSP_BERT");
251 
252  } else if (name == "QGSP_BERT_HP") {
253 
254  SetBuilderList1(true);
255  fHadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP());
256 
257  } else if (name == "QGSP_BIC") {
258 
259  SetBuilderList0();
260  fHadronPhys.push_back( new HadronPhysicsQGSP_BIC());
261 
262  } else if (name == "QGSP_BIC_EMY") {
263 
264  AddPhysicsList("emstandard_opt3");
265  SetBuilderList0();
266  fHadronPhys.push_back( new HadronPhysicsQGSP_BIC());
267 
268  } else if (name == "QGS_BIC") {
269 
270  SetBuilderList0();
271  fHadronPhys.push_back( new HadronPhysicsQGS_BIC());
272  fHadronPhys.push_back( new G4NeutronCrossSectionXS(verboseLevel));
273 
274  } else if (name == "QGSP_BIC_HP") {
275 
276  SetBuilderList0(true);
277  fHadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP());
278 
279  } else {
280 
281  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
282  << " is not defined"
283  << G4endl;
284  }
285 }
286 
287 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
288 
289 void PhysicsList::SetBuilderList0(G4bool flagHP)
290 {
291  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
292  if(flagHP) {
293  fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
294  } else {
295  fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
296  }
297  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
298  fHadronPhys.push_back( new G4IonBinaryCascadePhysics(verboseLevel));
299  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
300 }
301 
302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
303 
304 void PhysicsList::SetBuilderList1(G4bool flagHP)
305 {
306  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
307  if(flagHP) {
308  fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel) );
309  } else {
310  fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel) );
311  }
312  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
313  fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
314  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
315 }
316 
317 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
318 
319 void PhysicsList::SetBuilderList2(G4bool addStopping)
320 {
321  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
322  fHadronPhys.push_back( new G4HadronElasticPhysicsLHEP(verboseLevel));
323  if(addStopping) { fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel)); }
324  fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
325 }
326 
327 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
328 
329 void PhysicsList::SetBuilderList3()
330 {
331  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
332  fHadronPhys.push_back( new G4HadronElasticPhysicsXS(verboseLevel) );
333  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
334  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
335  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
336 }
337 
338 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
339 
340 void PhysicsList::SetBuilderList4()
341 {
342  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
343  fHadronPhys.push_back( new G4HadronQElasticPhysics(verboseLevel));
344  fHadronPhys.push_back( new G4QStoppingPhysics(verboseLevel)); //16-Oct-2012 A.R. Leave CHIPS stopping
345  fHadronPhys.push_back( new G4IonLHEPPhysics(verboseLevel));
346  fHadronPhys.push_back( new G4NeutronTrackingCut(verboseLevel));
347 }
348 
349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
350 
352 {
353 
354  if (verboseLevel >0){
355  G4cout << "PhysicsList::SetCuts:";
356  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
357  }
358 
359  // set cut values for gamma at first and for e- second and next for e+,
360  // because some processes for e+/e- need cut values for gamma
361  SetCutValue(fCutForGamma, "gamma");
362  SetCutValue(fCutForElectron, "e-");
363  SetCutValue(fCutForPositron, "e+");
364  SetCutValue(fCutForProton, "proton");
365 
366  if (verboseLevel>0) { DumpCutValuesTable(); }
367 }
368 
369 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
370 
372 {
373  fCutForGamma = cut;
374  SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
375 }
376 
377 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
378 
380 {
381  fCutForElectron = cut;
382  SetParticleCuts(fCutForElectron, G4Electron::Electron());
383 }
384 
385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
386 
388 {
389  fCutForPositron = cut;
390  SetParticleCuts(fCutForPositron, G4Positron::Positron());
391 }
392 
393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
394 
396 {
397  fCutForProton = cut;
398  SetParticleCuts(fCutForProton, G4Proton::Proton());
399 }
400 
402 {
403  G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV FTFP_BERT_EMX FTF_BIC"
404  << G4endl;
405  G4cout << " LHEP LHEP_EMV QBBC QGS_BIC QGSP"
406  << G4endl;
407  G4cout << " QGSC_BERT QGSP_BERT QGSP_BERT_EMV QGSP_BIC_EMY"
408  << G4endl;
409  G4cout << " QGSP_BERT_EMX QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP"
410  << G4endl;
411 }
412 
413 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
414