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 96379 2016-04-11 07:00:43Z gcosmo $
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "PhysicsList.hh"
36 #include "PhysicsListMessenger.hh"
37 
38 #include "PhysListEmStandard.hh"
39 #include "PhysListEmLivermore.hh"
40 #include "PhysListEmPenelope.hh"
41 
42 #include "G4LossTableManager.hh"
43 #include "G4UnitsTable.hh"
44 #include "G4SystemOfUnits.hh"
45 
46 // particles
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 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
60  fEmPhysicsList(0),
61  fMessenger(0)
62 {
65 
66  fMessenger = new PhysicsListMessenger(this);
67 
68  SetVerboseLevel(1);
69 
70  // EM physics
71  fEmName = G4String("standard");
72  fEmPhysicsList = new PhysListEmStandard(fEmName);
73 
74  //add new units for cross sections
75  //
76  new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g);
77  new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  delete fMessenger;
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
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 
123  // Em options
124  //
126  param->SetIntegral(false);
127 }
128 
129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130 
132 {
133  if (verboseLevel>0) {
134  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
135  }
136 
137  if (name == fEmName) return;
138 
139  if (name == "standard") {
140  fEmName = name;
141  delete fEmPhysicsList;
142  fEmPhysicsList = new PhysListEmStandard(name);
143 
144  } else if (name == "livermore") {
145  fEmName = name;
146  delete fEmPhysicsList;
147  fEmPhysicsList = new PhysListEmLivermore(name);
148 
149  } else if (name == "penelope") {
150  fEmName = name;
151  delete fEmPhysicsList;
152  fEmPhysicsList = new PhysListEmPenelope(name);
153 
154  } else {
155  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
156  << " is not defined"
157  << G4endl;
158  }
159 }
160 
161 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
162 
void SetDefaultCutValue(G4double newCutValue)
const XML_Char * name
Definition: expat.h:151
void ConstructParticle()
Definition: PhysicsList.cc:117
static G4LossTableManager * Instance()
static constexpr double mm
Definition: G4SIunits.hh:115
static constexpr double mg
Definition: G4SIunits.hh:184
static void ConstructParticle()
static void ConstructParticle()
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
static constexpr double mm2
Definition: G4SIunits.hh:116
static void ConstructParticle()
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G4GLOB_DLL std::ostream G4cout
static constexpr double um
Definition: G4SIunits.hh:113
static void ConstructParticle()
void SetVerboseLevel(G4int value)
static void ConstructParticle()
static G4EmParameters * Instance()
void SetIntegral(G4bool val)
virtual void ConstructProcess()=0
#define G4endl
Definition: G4ios.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170