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

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

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