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 // $Id: PhysicsList.cc 82277 2014-06-13 14:40:54Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: PhysicsList
34 //
35 // Author: V.Ivanchenko 03.05.2004
36 //
37 // Modified:
38 // 16.11.06 Use components from physics_lists subdirectory (V.Ivanchenko)
39 // 16.05.07 Use renamed EM components from physics_lists (V.Ivanchenko)
40 //
41 //----------------------------------------------------------------------------
42 //
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
47 #include "PhysicsList.hh"
48 #include "PhysicsListMessenger.hh"
49 
50 #include "G4EmStandardPhysics.hh"
54 #include "G4EmLivermorePhysics.hh"
55 #include "G4EmPenelopePhysics.hh"
56 #include "G4EmLowEPPhysics.hh"
57 #include "StepLimiterBuilder.hh"
58 #include "G4DecayPhysics.hh"
60 #include "G4HadronInelasticQBBC.hh"
62 #include "G4EmExtraPhysics.hh"
63 #include "G4StoppingPhysics.hh"
64 
65 #include "G4UnitsTable.hh"
66 #include "G4LossTableManager.hh"
67 #include "G4EmProcessOptions.hh"
68 
69 #include "G4PhysicalConstants.hh"
70 #include "G4SystemOfUnits.hh"
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
75 {
76  fEmBuilderIsRegisted = false;
77  fHelIsRegisted = false;
78  fBicIsRegisted = false;
79  fIonIsRegisted = false;
80  fGnucIsRegisted = false;
81  fStopIsRegisted = false;
82  fVerbose = 1;
85 
86  fMessenger = new PhysicsListMessenger(this);
87 
88  // Add Physics builders
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
96  delete fMessenger;
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 {
103  if(fVerbose > 0) {
104  G4cout << "### PhysicsList Construte Particles" << G4endl;
105  }
107 }
108 
109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110 
112 {
113  if(fVerbose > 0) {
114  G4cout << "### PhysicsList Construte Processes" << G4endl;
115  }
116  if(!fEmBuilderIsRegisted) { AddPhysicsList("emstandard"); }
119 
120  // Define energy interval for loss processes
121  // from 10 eV to 10 GeV
122  G4EmProcessOptions emOptions;
123  emOptions.SetMinEnergy(0.01*keV);
124  emOptions.SetMaxEnergy(10.*GeV);
125  emOptions.SetDEDXBinning(90);
126  emOptions.SetLambdaBinning(90);
127 }
128 
129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130 
132 {
133  if(fVerbose > 0) {
134  G4cout << "### PhysicsList Add Physics <" << name
135  << "> " << G4endl;
136  }
137  if ((name == "emstandard") && !fEmBuilderIsRegisted) {
139  fEmBuilderIsRegisted = true;
140 
141  } else if (name == "emstandard_opt1" && !fEmBuilderIsRegisted) {
143  fEmBuilderIsRegisted = true;
144 
145  } else if (name == "emstandard_opt2" && !fEmBuilderIsRegisted) {
147  fEmBuilderIsRegisted = true;
148 
149  } else if (name == "emstandard_opt3" && !fEmBuilderIsRegisted) {
151  fEmBuilderIsRegisted = true;
152 
153  } else if (name == "emlivermore" && !fEmBuilderIsRegisted) {
155  fEmBuilderIsRegisted = true;
156 
157  } else if (name == "empenelope" && !fEmBuilderIsRegisted) {
159  fEmBuilderIsRegisted = true;
160 
161  } else if (name == "emlowenergy" && !fEmBuilderIsRegisted) {
163  fEmBuilderIsRegisted = true;
164 
165  } else if (name == "elastic" && !fHelIsRegisted && fEmBuilderIsRegisted) {
167  fHelIsRegisted = true;
168 
169  } else if (name == "binary" && !fBicIsRegisted && fEmBuilderIsRegisted) {
171  fBicIsRegisted = true;
172 
173  } else if (name == "binary_ion" && !fIonIsRegisted && fEmBuilderIsRegisted) {
175  fIonIsRegisted = true;
176 
177  } else if (name == "gamma_nuc" && !fGnucIsRegisted && fEmBuilderIsRegisted) {
179  fGnucIsRegisted = true;
180 
181  } else if (name == "stopping" && !fStopIsRegisted && fEmBuilderIsRegisted) {
183  fStopIsRegisted = true;
184 
185  } else if(!fEmBuilderIsRegisted) {
186  G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
187  << " fail - EM physics should be registered first " << G4endl;
188  } else {
189  G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
190  << " fail - module is already regitered or is unknown " << G4endl;
191  }
192 }
193 
194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SetDefaultCutValue(G4double newCutValue)
void ConstructParticle()
Definition: PhysicsList.cc:117
void RegisterPhysics(G4VPhysicsConstructor *)
static G4LossTableManager * Instance()
G4String name
Definition: TRTMaterials.hh:40
void SetMinEnergy(G4double val)
PhysicsListMessenger * fMessenger
Definition: PhysicsList.hh:78
Definition of the StepLimiterBuilder class.
G4bool fStopIsRegisted
Definition: PhysicsList.hh:92
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
void SetDEDXBinning(G4int val)
G4bool fHelIsRegisted
Definition: PhysicsList.hh:69
G4GLOB_DLL std::ostream G4cout
void SetLambdaBinning(G4int val)
static const double GeV
Definition: G4SIunits.hh:214
void SetMaxEnergy(G4double val)
G4bool fIonIsRegisted
Definition: PhysicsList.hh:65
void SetVerbose(G4int val)
G4bool fEmBuilderIsRegisted
Definition: PhysicsList.hh:62
#define G4endl
Definition: G4ios.hh:61
static const double keV
Definition: G4SIunits.hh:213
G4int fVerbose
Definition: PhysicsList.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170
static const double mm
Definition: G4SIunits.hh:114
G4bool fGnucIsRegisted
Definition: PhysicsList.hh:91
G4bool fBicIsRegisted
Definition: PhysicsList.hh:70