Geant4  10.02.p01
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 //
26 // $Id: PhysicsList.cc 83010 2014-07-24 14:53:07Z gcosmo $
27 //
28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 
31 #include "PhysicsList.hh"
32 #include "PhysicsListMessenger.hh"
33 
34 #include "PhysListEmStandard.hh"
35 
36 #include "G4EmStandardPhysics.hh"
40 
41 #include "G4LossTableManager.hh"
42 #include "G4SystemOfUnits.hh"
43 #include "G4UnitsTable.hh"
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
48 {
49  pMessenger = new PhysicsListMessenger(this);
50  SetVerboseLevel(1);
51 
52  // EM physics
53  emName = G4String("local");
55 
58 }
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 
63 {
64  delete pMessenger;
65 }
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
69 #include "G4BosonConstructor.hh"
70 #include "G4LeptonConstructor.hh"
71 #include "G4MesonConstructor.hh"
72 #include "G4BosonConstructor.hh"
73 #include "G4BaryonConstructor.hh"
74 #include "G4IonConstructor.hh"
76 
78 {
79  G4BosonConstructor pBosonConstructor;
80  pBosonConstructor.ConstructParticle();
81 
82  G4LeptonConstructor pLeptonConstructor;
83  pLeptonConstructor.ConstructParticle();
84 
85  G4MesonConstructor pMesonConstructor;
86  pMesonConstructor.ConstructParticle();
87 
88  G4BaryonConstructor pBaryonConstructor;
89  pBaryonConstructor.ConstructParticle();
90 
91  G4IonConstructor pIonConstructor;
92  pIonConstructor.ConstructParticle();
93 
94  G4ShortLivedConstructor pShortLivedConstructor;
95  pShortLivedConstructor.ConstructParticle();
96 }
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
100 #include "G4PhysicsListHelper.hh"
101 #include "G4Decay.hh"
102 
104 {
106 
107  // electromagnetic Physics List
108  //
110 
111  // Add Decay Process
112  //
113  G4Decay* fDecayProcess = new G4Decay();
115 
116  theParticleIterator->reset();
117  while( (*theParticleIterator)() ){
118  G4ParticleDefinition* particle = theParticleIterator->value();
119  if (fDecayProcess->IsApplicable(*particle))
120  ph ->RegisterProcess(fDecayProcess, particle);
121  }
122 }
123 
124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125 
127 {
128  if (verboseLevel>1) {
129  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
130  }
131 
132  if (name == emName) return;
133 
134  if (name == "local") {
135 
136  emName = name;
137  delete emPhysicsList;
138  emPhysicsList = new PhysListEmStandard(name);
139 
140  } else if (name == "emstandard_opt0") {
141 
142  emName = name;
143  delete emPhysicsList;
145 
146  } else if (name == "emstandard_opt1") {
147 
148  emName = name;
149  delete emPhysicsList;
151 
152  } else if (name == "emstandard_opt2") {
153 
154  emName = name;
155  delete emPhysicsList;
157 
158  } else if (name == "emstandard_opt3") {
159 
160  emName = name;
161  delete emPhysicsList;
163 
164  } else {
165 
166  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
167  << " is not defined"
168  << G4endl;
169  }
170 }
171 
172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void SetDefaultCutValue(G4double newCutValue)
void ConstructParticle()
Definition: PhysicsList.cc:117
static G4LossTableManager * Instance()
G4VPhysicsConstructor * emPhysicsList
Definition: PhysicsList.hh:68
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4Decay.cc:89
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
G4String name
Definition: TRTMaterials.hh:40
static void ConstructParticle()
static void ConstructParticle()
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
static void ConstructParticle()
G4GLOB_DLL std::ostream G4cout
static void ConstructParticle()
void SetVerboseLevel(G4int value)
static void ConstructParticle()
G4String emName
Definition: PhysicsList.hh:69
PhysicsListMessenger * pMessenger
Definition: PhysicsList.hh:71
static G4PhysicsListHelper * GetPhysicsListHelper()
virtual void ConstructProcess()=0
#define G4endl
Definition: G4ios.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170
static const double mm
Definition: G4SIunits.hh:114
#define theParticleIterator