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 96378 2016-04-11 06:59:45Z 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), fMessenger(0)
61 {
62 
63  //add new units for cross sections
64  //
65  new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g);
66  new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
67 
68  SetVerboseLevel(1);
69 
70  fMessenger = new PhysicsListMessenger(this);
71 
72  // EM physics
73  fEmName = G4String("standard");
74  fEmPhysicsList = new PhysListEmStandard(fEmName);
75 
77  SetDefaultCutValue(1.0*mm);
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  delete fMessenger;
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
90 {
91  G4BosonConstructor pBosonConstructor;
92  pBosonConstructor.ConstructParticle();
93 
94  G4LeptonConstructor pLeptonConstructor;
95  pLeptonConstructor.ConstructParticle();
96 
97  G4MesonConstructor pMesonConstructor;
98  pMesonConstructor.ConstructParticle();
99 
100  G4BaryonConstructor pBaryonConstructor;
101  pBaryonConstructor.ConstructParticle();
102 
103  G4IonConstructor pIonConstructor;
104  pIonConstructor.ConstructParticle();
105 
106  G4ShortLivedConstructor pShortLivedConstructor;
107  pShortLivedConstructor.ConstructParticle();
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
113 {
114  // Transportation
115  //
117 
118  // Electromagnetic physics list
119  //
120  fEmPhysicsList->ConstructProcess();
121 
122  // Em options
123  //
125  param->SetIntegral(false);
126 }
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
129 
131 {
132  if (verboseLevel>0) {
133  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
134  }
135 
136  if (name == fEmName) return;
137 
138  if (name == "standard") {
139  fEmName = name;
140  delete fEmPhysicsList;
141  fEmPhysicsList = new PhysListEmStandard(name);
142 
143  } else if (name == "livermore") {
144  fEmName = name;
145  delete fEmPhysicsList;
146  fEmPhysicsList = new PhysListEmLivermore(name);
147 
148  } else if (name == "penelope") {
149  fEmName = name;
150  delete fEmPhysicsList;
151  fEmPhysicsList = new PhysListEmPenelope(name);
152 
153  } else {
154  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
155  << " is not defined"
156  << G4endl;
157  }
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
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