Geant4  10.00.p02
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 70761 2013-06-05 12:30:51Z 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 "G4EmLivermorePhysics.hh"
56 #include "G4EmPenelopePhysics.hh"
61 #include "G4NeutronTrackingCut.hh"
63 #include "G4StoppingPhysics.hh"
65 #include "G4IonPhysics.hh"
66 #include "G4EmExtraPhysics.hh"
67 #include "G4EmProcessOptions.hh"
68 
72 #include "G4HadronInelasticQBBC.hh"
79 
80 #include "G4LossTableManager.hh"
81 
82 #include "G4ProcessManager.hh"
83 #include "G4ParticleTypes.hh"
84 #include "G4ParticleTable.hh"
85 #include "G4Gamma.hh"
86 #include "G4Electron.hh"
87 #include "G4Positron.hh"
88 #include "G4Proton.hh"
89 
90 #include "G4SystemOfUnits.hh"
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
93 
96  fEmPhysicsList(0), fParticleList(0), fMessenger(0)
97 {
99  defaultCutValue = 0.7*mm;
104  verboseLevel = 1;
105 
106  fMessenger = new PhysicsListMessenger(this);
107 
108  // Particles
109  fParticleList = new G4DecayPhysics("decays");
110 
111  // EM physics
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
116 
118 {
119  delete fMessenger;
120  delete fParticleList;
121  delete fEmPhysicsList;
122  for(size_t i=0; i<fHadronPhys.size(); i++) {
123  delete fHadronPhys[i];
124  }
125 }
126 
127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
128 
130 {
132 }
133 
134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
135 
137 {
141  for(size_t i=0; i<fHadronPhys.size(); i++) {
142  fHadronPhys[i]->ConstructProcess();
143  }
144 }
145 
146 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
147 
149 {
150  if (verboseLevel>0) {
151  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
152  }
153  if (name == "emstandard_opt0") {
154 
155  delete fEmPhysicsList;
157 
158  } else if (name == "emstandard_opt1") {
159 
160  delete fEmPhysicsList;
162 
163  } else if (name == "emstandard_opt2") {
164 
165  delete fEmPhysicsList;
167 
168  } else if (name == "emstandard_opt3") {
169 
170  delete fEmPhysicsList;
172 
173  } else if (name == "emstandard_opt4") {
174 
175  delete fEmPhysicsList;
177 
178  } else if (name == "FTFP_BERT_EMV") {
179 
180  AddPhysicsList("emstandard_opt1");
181  AddPhysicsList("FTFP_BERT");
182 
183  } else if (name == "FTFP_BERT_EMX") {
184 
185  AddPhysicsList("emstandard_opt2");
186  AddPhysicsList("FTFP_BERT");
187 
188  } else if (name == "FTFP_BERT_EMZ") {
189 
190  AddPhysicsList("emstandard_opt4");
191  AddPhysicsList("FTFP_BERT");
192 
193  } else if (name == "FTFP_BERT") {
194 
195  SetBuilderList1();
196  fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT());
197 
198  } else if (name == "FTF_BIC") {
199 
200  SetBuilderList0();
201  fHadronPhys.push_back( new G4HadronPhysicsFTF_BIC());
203 
204  } else if (name == "QBBC") {
205 
206  AddPhysicsList("emstandard_opt0");
207  SetBuilderList2();
208  fHadronPhys.push_back( new G4HadronInelasticQBBC());
209 
210  } else if (name == "QGSP_BERT") {
211 
212  SetBuilderList1();
213  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT());
214 
215  } else if (name == "QGSP_FTFP_BERT") {
216 
217  SetBuilderList1();
218  fHadronPhys.push_back( new G4HadronPhysicsQGSP_FTFP_BERT());
219 
220  } else if (name == "QGSP_FTFP_BERT_EMV") {
221 
222  AddPhysicsList("emstandard_opt1");
223  AddPhysicsList("QGSP_FTFP_BERT");
224 
225  } else if (name == "QGSP_BERT_EMV") {
226 
227  AddPhysicsList("emstandard_opt1");
228  AddPhysicsList("QGSP_BERT");
229 
230  } else if (name == "QGSP_BERT_EMX") {
231 
232  AddPhysicsList("emstandard_opt2");
233  AddPhysicsList("QGSP_BERT");
234 
235  } else if (name == "QGSP_BERT_HP") {
236 
237  SetBuilderList1(true);
238  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP());
239 
240  } else if (name == "QGSP_BIC") {
241 
242  SetBuilderList0();
243  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
244 
245  } else if (name == "QGSP_BIC_EMY") {
246 
247  AddPhysicsList("emstandard_opt3");
248  SetBuilderList0();
249  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
250 
251  } else if (name == "QGS_BIC") {
252 
253  SetBuilderList0();
254  fHadronPhys.push_back( new G4HadronPhysicsQGS_BIC());
256 
257  } else if (name == "QGSP_BIC_HP") {
258 
259  SetBuilderList0(true);
260  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC_HP());
261 
262  } else {
263 
264  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
265  << " is not defined"
266  << G4endl;
267  }
268 }
269 
270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
271 
273 {
274  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
275  if(flagHP) {
277  } else {
279  }
280  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
283 }
284 
285 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
286 
288 {
289  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
290  if(flagHP) {
292  } else {
294  }
295  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
296  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
298 }
299 
300 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
301 
303 {
304  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
306  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
307  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
309 }
310 
311 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
312 
314 {
315 
316  if (verboseLevel >0){
317  G4cout << "PhysicsList::SetCuts:";
318  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
319  }
320 
321  // set cut values for gamma at first and for e- second and next for e+,
322  // because some processes for e+/e- need cut values for gamma
323  SetCutValue(fCutForGamma, "gamma");
326  SetCutValue(fCutForProton, "proton");
327 
328  if (verboseLevel>0) { DumpCutValuesTable(); }
329 }
330 
331 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
332 
334 {
335  fCutForGamma = cut;
337 }
338 
339 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
340 
342 {
343  fCutForElectron = cut;
345 }
346 
347 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
348 
350 {
351  fCutForPositron = cut;
353 }
354 
355 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
356 
358 {
359  fCutForProton = cut;
361 }
362 
364 {
365  G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
366  << "FTFP_BERT_EMX FTFP_BERT_EMZ"
367  << G4endl;
368  G4cout << " FTF_BIC QBBC QGSP_BERT "
369  << "QGSP_BERT_EMV QGSP_BERT_EMX"
370  << G4endl;
371  G4cout << " QGSP_BERT_HP QGSP_FTFP_BERT "
372  << "QGSP_FTFP_BERT_EMV"
373  << G4endl;
374  G4cout << " QGS_BIC QGSP_BIC QGSP_BIC_EMY "
375  << "QGSP_BIC_HP"
376  << G4endl;
377 }
378 
379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
380 
void ConstructParticle()
Definition: PhysicsList.cc:117
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
void SetCutForGamma(G4double)
Definition: PhysicsList.cc:231
G4String name
Definition: TRTMaterials.hh:40
G4double fCutForPositron
Definition: PhysicsList.hh:70
void SetCutForPositron(G4double)
Definition: PhysicsList.cc:247
G4double fCutForElectron
Definition: PhysicsList.hh:69
G4VPhysicsConstructor * fParticleList
Definition: PhysicsList.hh:87
void SetCutForProton(G4double)
Definition: PhysicsList.cc:269
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4VPhysicsConstructor * > fHadronPhys
Definition: PhysicsList.hh:85
void SetCutForElectron(G4double)
Definition: PhysicsList.cc:239
PhysicsListMessenger * fMessenger
Definition: PhysicsList.hh:78
G4double fCutForProton
Definition: PhysicsList.hh:68
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
virtual void ConstructParticle()=0
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
G4double fCutForGamma
Definition: PhysicsList.hh:64
bool G4bool
Definition: G4Types.hh:79
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetCuts()
Definition: PhysicsList.cc:219
static G4Positron * Positron()
Definition: G4Positron.cc:94
void SetBuilderList2()
Definition: PhysicsList.cc:302
G4VPhysicsConstructor * fEmPhysicsList
Definition: PhysicsList.hh:73
virtual void ConstructProcess()=0
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void ConstructProcess()
Definition: PhysicsList.cc:170
static const double mm
Definition: G4SIunits.hh:102
void SetBuilderList0(G4bool flagHP=false)
Definition: PhysicsList.cc:272
void SetBuilderList1(G4bool flagHP=false)
Definition: PhysicsList.cc:287