source: trunk/examples/extended/hadronic/Hadr01/src/PhysicsList.cc @ 1238

Last change on this file since 1238 was 1230, checked in by garnier, 15 years ago

update to geant4.9.3

  • Property svn:executable set to *
File size: 14.7 KB
Line 
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// $Id: PhysicsList.cc,v 1.31 2009/08/28 09:21:34 vnivanch Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30/////////////////////////////////////////////////////////////////////////
31//
32// PhysicsList
33//
34// Created: 31.04.2006 V.Ivanchenko
35//
36// Modified:
37// 04.06.2006 Adoptation of hadr01 (V.Ivanchenko)
38// 26.04.2007 Physics according to 8.3 Physics List (V.Ivanchenko)
39//
40////////////////////////////////////////////////////////////////////////
41//
42
43#include "PhysicsList.hh"
44#include "PhysicsListMessenger.hh"
45
46#include "G4DecayPhysics.hh"
47#include "G4EmStandardPhysics_option3.hh"
48#include "G4EmStandardPhysics_option2.hh"
49#include "G4EmStandardPhysics_option1.hh"
50#include "G4EmStandardPhysics.hh"
51#include "G4HadronElasticPhysics.hh"
52#include "G4HadronDElasticPhysics.hh"
53#include "G4HadronQElasticPhysics.hh"
54#include "G4HadronHElasticPhysics.hh"
55#include "G4ChargeExchangePhysics.hh"
56#include "G4NeutronTrackingCut.hh"
57#include "G4QStoppingPhysics.hh"
58#include "G4LHEPStoppingPhysics.hh"
59#include "G4IonBinaryCascadePhysics.hh"
60#include "G4IonPhysics.hh"
61#include "G4EmExtraPhysics.hh"
62#include "G4EmProcessOptions.hh"
63
64#include "HadronPhysicsFTFP_BERT_TRV.hh"
65#include "HadronPhysicsFTFP.hh"
66#include "HadronPhysicsFTFP_BERT.hh"
67#include "HadronPhysicsFTF_BIC.hh"
68#include "HadronPhysicsLHEP.hh"
69#include "HadronPhysicsLHEP_EMV.hh"
70#include "G4HadronInelasticQBBC.hh"
71#include "HadronPhysicsQGSC.hh"
72#include "HadronPhysicsQGSC_BERT.hh"
73#include "HadronPhysicsQGSC_CHIPS.hh"
74#include "HadronPhysicsQGSC_QGSC.hh"
75#include "HadronPhysicsQGSP.hh"
76#include "HadronPhysicsQGSP_BERT.hh"
77#include "HadronPhysicsQGSP_BERT_HP.hh"
78#include "HadronPhysicsQGSP_BIC.hh"
79#include "HadronPhysicsQGSP_BIC_HP.hh"
80#include "HadronPhysicsQGSP_FTFP_BERT.hh"
81#include "HadronPhysicsQGS_BIC.hh"
82
83#include "G4HadronInelasticQLHEP.hh"
84#include "G4IonPhysics.hh"
85
86#include "G4LossTableManager.hh"
87
88#include "G4ProcessManager.hh"
89#include "G4ParticleTypes.hh"
90#include "G4ParticleTable.hh"
91#include "G4Gamma.hh"
92#include "G4Electron.hh"
93#include "G4Positron.hh"
94
95//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
96
97PhysicsList::PhysicsList() : G4VModularPhysicsList()
98{
99  G4LossTableManager::Instance();
100  defaultCutValue = 1.*mm;
101  cutForGamma     = defaultCutValue;
102  cutForElectron  = defaultCutValue;
103  cutForPositron  = defaultCutValue;
104  dump            = false;
105  verboseLevel    = 1;
106
107  pMessenger = new PhysicsListMessenger(this);
108
109  // Particles
110  particleList = new G4DecayPhysics("decays");
111
112  // EM physics
113  emPhysicsList = new G4EmStandardPhysics();
114}
115
116//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
117
118PhysicsList::~PhysicsList()
119{
120  delete pMessenger;
121  delete particleList;
122  delete emPhysicsList;
123  for(size_t i=0; i<hadronPhys.size(); i++) {
124    delete hadronPhys[i];
125  }
126}
127
128//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
129
130void PhysicsList::ConstructParticle()
131{
132  particleList->ConstructParticle();
133}
134
135//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
136
137void PhysicsList::ConstructProcess()
138{
139  AddTransportation();
140  emPhysicsList->ConstructProcess();
141  particleList->ConstructProcess();
142  for(size_t i=0; i<hadronPhys.size(); i++) {
143    hadronPhys[i]->ConstructProcess();
144  }
145}
146
147//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
148
149void PhysicsList::AddPhysicsList(const G4String& name)
150{
151  if (verboseLevel>0)
152    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
153
154  if (name == "emstandard_opt2") {
155
156    delete emPhysicsList;
157    emPhysicsList = new G4EmStandardPhysics_option2();
158
159  } else if (name == "emstandard_opt3") {
160
161    delete emPhysicsList;
162    emPhysicsList = new G4EmStandardPhysics_option3();
163
164  } else if (name == "emstandard_opt1") {
165
166    delete emPhysicsList;
167    emPhysicsList = new G4EmStandardPhysics_option1();
168
169  } else if (name == "FTFP_BERT_EMV") {
170
171    AddPhysicsList("emstandard_opt1");
172    AddPhysicsList("FTFP_BERT");
173
174  } else if (name == "FTFP_BERT_EMX") {
175
176    AddPhysicsList("emstandard_opt2");
177    AddPhysicsList("FTFP_BERT");
178
179  } else if (name == "FTFP") {
180
181    SetBuilderList1();
182    hadronPhys.push_back( new HadronPhysicsFTFP("hadron",true));
183    dump = true;
184
185  } else if (name == "FTFP_BERT") {
186
187    SetBuilderList1();
188    hadronPhys.push_back( new HadronPhysicsFTFP_BERT("hadron",true));
189    dump = true;
190
191  } else if (name == "FTFP_BERT_TRV") {
192
193    SetBuilderList1();
194    hadronPhys.push_back( new HadronPhysicsFTFP_BERT_TRV("hadron",true));
195    dump = true;
196
197  } else if (name == "FTF_BIC") {
198
199    SetBuilderList0();
200    hadronPhys.push_back( new HadronPhysicsFTF_BIC("hadron",true));
201    dump = true;
202
203  } else if (name == "LHEP") {
204
205    SetBuilderList2();
206    hadronPhys.push_back( new HadronPhysicsLHEP("hadron"));
207    dump = true;
208
209  } else if (name == "LHEP_EMV") {
210
211    AddPhysicsList("emstandard_opt1");
212    SetBuilderList3();
213    hadronPhys.push_back( new HadronPhysicsLHEP_EMV("hadron"));
214    dump = true;
215
216  } else if (name == "QBBC") {
217
218    SetBuilderList0();
219    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
220                                                    false,true,false,false,false));
221
222  } else if (name == "QBBCG") {
223
224    SetBuilderList0();
225    hadronPhys.push_back( new G4ChargeExchangePhysics(verboseLevel,false));
226    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
227                                                    false,true,false,false,true));
228  } else if (name == "QBBCF") {
229
230    SetBuilderList0();
231    hadronPhys.push_back( new G4ChargeExchangePhysics(verboseLevel,false));
232    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
233                                                    false,true,false,false,false));
234
235  } else if (name == "QBBC_DEL") {
236
237    SetBuilderList5();
238    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
239                                                    false,false,false,false,true));
240
241  } else if (name == "QBBC_HEL") {
242
243    SetBuilderList6();
244    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
245                                                    false,false,false,false,true));
246
247  } else if (name == "QBBC_HP") {
248
249    SetBuilderList0(true);
250    hadronPhys.push_back( new G4HadronInelasticQBBC("QBBC",verboseLevel,
251                                                    false,false,false,true,true));
252  } else if (name == "QGSC") {
253
254    SetBuilderList4();
255    hadronPhys.push_back( new HadronPhysicsQGSC("hadron",true));
256    dump = true;
257
258  } else if (name == "QGSC_BERT") {
259
260    SetBuilderList4();
261    hadronPhys.push_back( new HadronPhysicsQGSC_BERT("hadron",true));
262    dump = true;
263
264  } else if (name == "QGSC_CHIPS") {
265
266    SetBuilderList4();
267    hadronPhys.push_back( new HadronPhysicsQGSC_CHIPS("hadron",true));
268    dump = true;
269
270  } else if (name == "QGSC_QGSC") {
271
272    SetBuilderList4();
273    hadronPhys.push_back( new HadronPhysicsQGSC_QGSC("hadron",true));
274    dump = true;
275
276  } else if (name == "QGSC_EMV") {
277
278    AddPhysicsList("emstandard_opt1");
279    AddPhysicsList("QGSC");
280
281  } else if (name == "QGSP") {
282
283    SetBuilderList1();
284    hadronPhys.push_back( new HadronPhysicsQGSP("hadron",true));
285    dump = true;
286
287  } else if (name == "QGSP_BERT") {
288
289    SetBuilderList1();
290    hadronPhys.push_back( new HadronPhysicsQGSP_BERT("hadron",true));
291    dump = true;
292
293  } else if (name == "QGSP_FTFP_BERT") {
294
295    SetBuilderList1();
296    hadronPhys.push_back( new HadronPhysicsQGSP_FTFP_BERT("hadron",true));
297    dump = true;
298
299  } else if (name == "QGSP_BERT_EMV") {
300
301    AddPhysicsList("emstandard_opt1");
302    AddPhysicsList("QGSP_BERT");
303
304  } else if (name == "QGSP_BERT_EMX") {
305
306    AddPhysicsList("emstandard_opt2");
307    AddPhysicsList("QGSP_BERT");
308
309  } else if (name == "QGSP_BERT_HP") {
310
311    SetBuilderList1(true);
312    hadronPhys.push_back( new HadronPhysicsQGSP_BERT_HP("hadron",true));
313
314  } else if (name == "QGSP_BIC") {
315
316    SetBuilderList0();
317    hadronPhys.push_back( new HadronPhysicsQGSP_BIC("hadron",true));
318    dump = true;
319
320  } else if (name == "QGS_BIC") {
321
322    SetBuilderList0();
323    hadronPhys.push_back( new HadronPhysicsQGS_BIC("hadron",true));
324    dump = true;
325
326  } else if (name == "QGSP_BIC_HP") {
327
328    SetBuilderList0(true);
329    hadronPhys.push_back( new HadronPhysicsQGSP_BIC_HP("hadron",true));
330    dump = true;
331
332  } else if (name == "QGSP_BIC_EMY") {
333
334    AddPhysicsList("emstandard_opt3");
335    AddPhysicsList("QGSP_BIC");
336
337  } else {
338
339    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
340           << " is not defined"
341           << G4endl;
342  }
343}
344
345//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
346
347void PhysicsList::SetBuilderList0(G4bool flagHP)
348{
349  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
350  hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
351                                                    flagHP));
352  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
353  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
354  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
355}
356
357//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
358
359void PhysicsList::SetBuilderList1(G4bool flagHP)
360{
361  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
362  hadronPhys.push_back( new G4HadronElasticPhysics("elastic",verboseLevel,
363                                                    flagHP));
364  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
365  hadronPhys.push_back( new G4IonPhysics("ion"));
366  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
367}
368
369//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
370
371void PhysicsList::SetBuilderList2(G4bool flagHP)
372{
373  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
374  hadronPhys.push_back( new G4HadronElasticPhysics("LElastic",verboseLevel,
375                                                    flagHP));
376  hadronPhys.push_back( new G4IonPhysics("ion"));
377}
378
379//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
380
381void PhysicsList::SetBuilderList3(G4bool flagHP)
382{
383  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
384  hadronPhys.push_back( new G4HadronElasticPhysics("LElastic",verboseLevel,
385                                                    flagHP));
386  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
387  hadronPhys.push_back( new G4IonPhysics("ion"));
388}
389
390//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
391
392void PhysicsList::SetBuilderList4(G4bool)
393{
394  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
395  hadronPhys.push_back( new G4HadronQElasticPhysics("elastic",verboseLevel));
396  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
397  hadronPhys.push_back( new G4IonPhysics("ion"));
398  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
399}
400
401//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
402
403void PhysicsList::SetBuilderList5(G4bool flagHP)
404{
405  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
406  hadronPhys.push_back( new G4HadronDElasticPhysics(verboseLevel,flagHP));
407  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
408  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
409  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
410}
411
412//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
413
414void PhysicsList::SetBuilderList6(G4bool flagHP)
415{
416  hadronPhys.push_back( new G4EmExtraPhysics("extra EM"));
417  hadronPhys.push_back( new G4HadronHElasticPhysics(verboseLevel,flagHP));
418  hadronPhys.push_back( new G4QStoppingPhysics("stopping",verboseLevel));
419  hadronPhys.push_back( new G4IonBinaryCascadePhysics("ionBIC"));
420  hadronPhys.push_back( new G4NeutronTrackingCut("nTackingCut",verboseLevel));
421}
422
423//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
424
425void PhysicsList::SetCuts()
426{
427
428  if (verboseLevel >0){
429    G4cout << "PhysicsList::SetCuts:";
430    G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
431  }
432
433  // set cut values for gamma at first and for e- second and next for e+,
434  // because some processes for e+/e- need cut values for gamma
435  SetCutValue(cutForGamma, "gamma");
436  SetCutValue(cutForElectron, "e-");
437  SetCutValue(cutForPositron, "e+");
438
439  if (verboseLevel>0) DumpCutValuesTable();
440}
441
442//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
443
444void PhysicsList::SetCutForGamma(G4double cut)
445{
446  cutForGamma = cut;
447  SetParticleCuts(cutForGamma, G4Gamma::Gamma());
448}
449
450//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
451
452void PhysicsList::SetCutForElectron(G4double cut)
453{
454  cutForElectron = cut;
455  SetParticleCuts(cutForElectron, G4Electron::Electron());
456}
457
458//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
459
460void PhysicsList::SetCutForPositron(G4double cut)
461{
462  cutForPositron = cut;
463  SetParticleCuts(cutForPositron, G4Positron::Positron());
464}
465
466void PhysicsList::List()
467{
468  G4cout << "### PhysicsLists available: FTFP FTFP_BERT FTFP_BERT_EMV FTFP_BERT_EMX FTFP_BERT_TRV FTF_BIC LHEP LHEP_EMV"
469         << G4endl;
470  G4cout << "                            QBBC QBBC_DEL QBBC_HEL QBBC_HP QGSC "
471         << G4endl; 
472  G4cout << "                            QGSC_BERT QGSC_CHIPS QGSC_QGSC QGSC_EMV QGSP QGSP_BERT QGSP_BER_EMV "
473         << G4endl; 
474  G4cout << "                            QGSP_BERT_EMX QGSP_BERT_HP QGSP_BIC QGSP_BIC_HP QGSP_FTFP_BERT " 
475         << G4endl; 
476}
477
478//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
479
Note: See TracBrowser for help on using the repository browser.