Geant4  10.02
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 92421 2015-09-01 07:38:57Z 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 "G4EmProcessOptions.hh"
70 
75 #include "G4HadronInelasticQBBC.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 #include "G4Proton.hh"
92 
93 #include "G4SystemOfUnits.hh"
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
96 
99  fEmPhysicsList(0), fParticleList(0), fMessenger(0)
100 {
102  defaultCutValue = 0.7*mm;
107  verboseLevel = 1;
108 
109  fMessenger = new PhysicsListMessenger(this);
110 
111  // Particles
112  fParticleList = new G4DecayPhysics("decays");
113 
114  // EM physics
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
119 
121 {
122  delete fMessenger;
123  delete fParticleList;
124  delete fEmPhysicsList;
125  for(size_t i=0; i<fHadronPhys.size(); i++) {
126  delete fHadronPhys[i];
127  }
128 }
129 
130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
131 
133 {
135 }
136 
137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
138 
140 {
144  for(size_t i=0; i<fHadronPhys.size(); i++) {
145  fHadronPhys[i]->ConstructProcess();
146  }
147 }
148 
149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
150 
152 {
153  if (verboseLevel>0) {
154  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
155  }
156  if (name == "emstandard_opt0") {
157 
158  delete fEmPhysicsList;
160 
161  } else if (name == "emstandard_opt1") {
162 
163  delete fEmPhysicsList;
165 
166  } else if (name == "emstandard_opt2") {
167 
168  delete fEmPhysicsList;
170 
171  } else if (name == "emstandard_opt3") {
172 
173  delete fEmPhysicsList;
175 
176  } else if (name == "emstandard_opt4") {
177 
178  delete fEmPhysicsList;
180 
181  } else if (name == "emstandardGS") {
182 
183  delete fEmPhysicsList;
185 
186  } else if (name == "FTFP_BERT_EMV") {
187 
188  AddPhysicsList("emstandard_opt1");
189  AddPhysicsList("FTFP_BERT");
190 
191  } else if (name == "FTFP_BERT_EMX") {
192 
193  AddPhysicsList("emstandard_opt2");
194  AddPhysicsList("FTFP_BERT");
195 
196  } else if (name == "FTFP_BERT_EMY") {
197 
198  AddPhysicsList("emstandard_opt3");
199  AddPhysicsList("FTFP_BERT");
200 
201  } else if (name == "FTFP_BERT_EMZ") {
202 
203  AddPhysicsList("emstandard_opt4");
204  AddPhysicsList("FTFP_BERT");
205 
206  } else if (name == "FTFP_BERT") {
207 
208  SetBuilderList0(false);
209  fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT());
210 
211  } else if (name == "FTFP_BERT_TRV") {
212 
213  AddPhysicsList("emstandardGS");
214  SetBuilderList1(false);
215  fHadronPhys.push_back( new G4HadronPhysicsFTFP_BERT_TRV());
216 
217  } else if (name == "FTF_BIC") {
218 
219  SetBuilderList0(false);
220  fHadronPhys.push_back( new G4HadronPhysicsFTF_BIC());
221 
222  } else if (name == "QBBC") {
223 
224  AddPhysicsList("emstandard_opt0");
225  SetBuilderList2();
226  fHadronPhys.push_back( new G4HadronInelasticQBBC());
227 
228  } else if (name == "QGSP_BERT") {
229 
230  SetBuilderList0(false);
231  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT());
232 
233  } else if (name == "QGSP_FTFP_BERT") {
234 
235  SetBuilderList0(false);
236  fHadronPhys.push_back( new G4HadronPhysicsQGSP_FTFP_BERT());
237 
238  } else if (name == "QGSP_FTFP_BERT_EMV") {
239 
240  AddPhysicsList("emstandard_opt1");
241  AddPhysicsList("QGSP_FTFP_BERT");
242 
243  } else if (name == "QGSP_BERT_EMV") {
244 
245  AddPhysicsList("emstandard_opt1");
246  AddPhysicsList("QGSP_BERT");
247 
248  } else if (name == "QGSP_BERT_EMX") {
249 
250  AddPhysicsList("emstandard_opt2");
251  AddPhysicsList("QGSP_BERT");
252 
253  } else if (name == "QGSP_BERT_HP") {
254 
255  SetBuilderList0(true);
256  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP());
257 
258  } else if (name == "QGSP_BIC") {
259 
260  SetBuilderList0(false);
261  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
262 
263  } else if (name == "QGSP_BIC_EMY") {
264 
265  AddPhysicsList("emstandard_opt3");
266  SetBuilderList0(false);
267  fHadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
268 
269  } else if (name == "QGS_BIC") {
270 
271  SetBuilderList0(false);
272  fHadronPhys.push_back( new G4HadronPhysicsQGS_BIC());
273 
274  } else if (name == "QGSP_BIC_HP") {
275 
276  SetBuilderList0(true);
277  fHadronPhys.push_back( new G4HadronPhysicsQGSP_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 
290 {
291  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
292  if(flagHP) {
294  } else {
296  }
297  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
298  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
300 }
301 
302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
303 
305 {
306  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
307  if(flagHP) {
309  } else {
311  }
312  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
313  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
315 }
316 
317 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
318 
320 {
321  fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel));
323  fHadronPhys.push_back( new G4StoppingPhysics(verboseLevel));
324  fHadronPhys.push_back( new G4IonPhysics(verboseLevel));
326 }
327 
328 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
329 
331 {
332 
333  if (verboseLevel >0){
334  G4cout << "PhysicsList::SetCuts:";
335  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
336  }
337 
338  // set cut values for gamma at first and for e- second and next for e+,
339  // because some processes for e+/e- need cut values for gamma
340  SetCutValue(fCutForGamma, "gamma");
343  SetCutValue(fCutForProton, "proton");
344 
345  if (verboseLevel>0) { DumpCutValuesTable(); }
346 }
347 
348 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
349 
351 {
352  fCutForGamma = cut;
354 }
355 
356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
357 
359 {
360  fCutForElectron = cut;
362 }
363 
364 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
365 
367 {
368  fCutForPositron = cut;
370 }
371 
372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
373 
375 {
376  fCutForProton = cut;
378 }
379 
381 {
382  G4cout << "### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
383  << "FTFP_BERT_EMX FTFP_BERT_EMZ FTFP_BERT_TRV"
384  << G4endl;
385  G4cout << " FTF_BIC QBBC QGSP_BERT "
386  << "QGSP_BERT_EMV QGSP_BERT_EMX"
387  << G4endl;
388  G4cout << " QGSP_BERT_HP QGSP_FTFP_BERT "
389  << "QGSP_FTFP_BERT_EMV"
390  << G4endl;
391  G4cout << " QGS_BIC QGSP_BIC QGSP_BIC_EMY "
392  << "QGSP_BIC_HP"
393  << G4endl;
394 }
395 
396 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
397 
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:374
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4VPhysicsConstructor * > fHadronPhys
Definition: PhysicsList.hh:76
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:319
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:114
void SetBuilderList0(G4bool flagHP=false)
Definition: PhysicsList.cc:289
void SetBuilderList1(G4bool flagHP=false)
Definition: PhysicsList.cc:304