Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 94383 2015-11-13 10:20:27Z gcosmo $
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "PhysicsList.hh"
36 #include "PhysicsListMessenger.hh"
37 
38 #include "G4EmStandardPhysics.hh"
39 #include "PhysListEmStandard.hh"
40 #include "MuNuclearBuilder.hh"
41 
42 #include "G4EmParameters.hh"
43 
44 #include "G4Gamma.hh"
45 #include "G4Electron.hh"
46 #include "G4Positron.hh"
47 
48 #include "G4BosonConstructor.hh"
49 #include "G4LeptonConstructor.hh"
50 #include "G4MesonConstructor.hh"
51 #include "G4BosonConstructor.hh"
52 #include "G4BaryonConstructor.hh"
53 #include "G4IonConstructor.hh"
55 
56 #include "G4SystemOfUnits.hh"
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59 
61  fEmPhysicsList(0),
62  fMuNuclPhysicsList(0),
63  fMessenger(0)
64 {
65  SetVerboseLevel(1);
66  fMessenger = new PhysicsListMessenger(this);
67 
68  // EM physics
69  fEmName = G4String("emstandard_opt0");
70  fEmPhysicsList = new G4EmStandardPhysics();
71 
72  //extend energy range of PhysicsTables
73  //
75  param->SetMinEnergy(100*eV);
76  param->SetMaxEnergy(1000*PeV);
77 
78  fMuNuclPhysicsList = 0;
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84 {
85  delete fMessenger;
86 }
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 {
92  G4BosonConstructor pBosonConstructor;
93  pBosonConstructor.ConstructParticle();
94 
95  G4LeptonConstructor pLeptonConstructor;
96  pLeptonConstructor.ConstructParticle();
97 
98  G4MesonConstructor pMesonConstructor;
99  pMesonConstructor.ConstructParticle();
100 
101  G4BaryonConstructor pBaryonConstructor;
102  pBaryonConstructor.ConstructParticle();
103 
104  G4IonConstructor pIonConstructor;
105  pIonConstructor.ConstructParticle();
106 
107  G4ShortLivedConstructor pShortLivedConstructor;
108  pShortLivedConstructor.ConstructParticle();
109 }
110 
111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112 
114 {
115  // transportation
116  //
118 
119  // electromagnetic Physics List
120  //
121  fEmPhysicsList->ConstructProcess();
122  if(fMuNuclPhysicsList) fMuNuclPhysicsList->ConstructProcess();
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 
128 {
129  if (verboseLevel>1) {
130  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
131  }
132 
133  if (name == fEmName) return;
134 
135  if (name == "emstandard_opt0") {
136 
137  fEmName = name;
138  delete fEmPhysicsList;
139  fEmPhysicsList = new PhysListEmStandard(name);
140 
141  } else if (name == "local") {
142 
143  fEmName = name;
144  delete fEmPhysicsList;
145  fEmPhysicsList = new PhysListEmStandard(name);
146 
147  } else if (name == "muNucl") {
148  fMuNuclPhysicsList = new MuNuclearBuilder(name);
149 
150  } else {
151 
152  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
153  << " is not defined"
154  << G4endl;
155  }
156 }
157 
158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159 
160 
const XML_Char * name
Definition: expat.h:151
void ConstructParticle()
Definition: PhysicsList.cc:117
static void ConstructParticle()
static void ConstructParticle()
Definition of the MuNuclearBuilder class.
void SetMaxEnergy(G4double val)
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
static void ConstructParticle()
G4GLOB_DLL std::ostream G4cout
static void ConstructParticle()
static constexpr double eV
Definition: G4SIunits.hh:215
static constexpr double PeV
Definition: G4SIunits.hh:219
void SetVerboseLevel(G4int value)
static void ConstructParticle()
void SetMinEnergy(G4double val)
static G4EmParameters * Instance()
virtual void ConstructProcess()=0
#define G4endl
Definition: G4ios.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170