Geant4  10.03.p03
 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 // $Id: PhysicsList.cc 85260 2014-10-27 08:53:35Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "G4EmDNAPhysics.hh"
44 
45 #include "G4UnitsTable.hh"
46 #include "G4SystemOfUnits.hh"
47 #include "G4UserSpecialCuts.hh"
48 
49 // particles
50 
51 #include "G4BosonConstructor.hh"
52 #include "G4LeptonConstructor.hh"
53 #include "G4MesonConstructor.hh"
54 #include "G4BosonConstructor.hh"
55 #include "G4BaryonConstructor.hh"
56 #include "G4IonConstructor.hh"
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 
64  fEmPhysicsList(0), fMessenger(0)
65 {
66  fMessenger = new PhysicsListMessenger(this);
67 
68  SetVerboseLevel(1);
69 
70  // EM physics
71  fEmPhysicsList = new G4EmDNAPhysics();
72 
73 }
74 
75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76 
78 {
79  delete fMessenger;
80  delete fEmPhysicsList;
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
86 {
87  G4BosonConstructor pBosonConstructor;
88  pBosonConstructor.ConstructParticle();
89 
90  G4LeptonConstructor pLeptonConstructor;
91  pLeptonConstructor.ConstructParticle();
92 
93  G4MesonConstructor pMesonConstructor;
94  pMesonConstructor.ConstructParticle();
95 
96  G4BaryonConstructor pBaryonConstructor;
97  pBaryonConstructor.ConstructParticle();
98 
99  G4IonConstructor pIonConstructor;
100  pIonConstructor.ConstructParticle();
101 
102  G4ShortLivedConstructor pShortLivedConstructor;
103  pShortLivedConstructor.ConstructParticle();
104 
105  G4DNAGenericIonsManager* genericIonsManager;
106  genericIonsManager=G4DNAGenericIonsManager::Instance();
107  genericIonsManager->GetIon("alpha++");
108  genericIonsManager->GetIon("alpha+");
109  genericIonsManager->GetIon("helium");
110  genericIonsManager->GetIon("hydrogen");
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114 
116 {
117  // transportation
118  //
120 
121  // electromagnetic physics list
122  //
123  fEmPhysicsList->ConstructProcess();
124 
125  // tracking cut
126  //
127  AddTrackingCut();
128 
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
135  if (verboseLevel>-1) {
136  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
137  }
138 
139  if (name == fEmName) return;
140 
141  if (name == "dna") {
142  fEmName = name;
143  delete fEmPhysicsList;
144  fEmPhysicsList = new G4EmDNAPhysics();
145 
146  } else if (name == "dna_opt1") {
147  fEmName = name;
148  delete fEmPhysicsList;
149  fEmPhysicsList = new G4EmDNAPhysics_option1();
150 
151  } else if (name == "dna_opt2") {
152  fEmName = name;
153  delete fEmPhysicsList;
154  fEmPhysicsList = new G4EmDNAPhysics_option2();
155 
156  } else if (name == "dna_opt3") {
157  fEmName = name;
158  delete fEmPhysicsList;
159  fEmPhysicsList = new G4EmDNAPhysics_option3();
160 
161  } else if (name == "dna_opt4") {
162  fEmName = name;
163  delete fEmPhysicsList;
164  fEmPhysicsList = new G4EmDNAPhysics_option4();
165 
166  } else if (name == "dna_opt5") {
167  fEmName = name;
168  delete fEmPhysicsList;
169  fEmPhysicsList = new G4EmDNAPhysics_option5();
170 
171  } else if (name == "dna_opt7") {
172  fEmName = name;
173  delete fEmPhysicsList;
174  fEmPhysicsList = new G4EmDNAPhysics_option7();
175 
176  } else {
177 
178  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
179  << " is not defined"
180  << G4endl;
181  }
182 }
183 
184 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
185 
187 {
189 
191  particleIterator->reset();
192  while ((*particleIterator)())
193  {
194  G4ParticleDefinition* particle = particleIterator->value();
195  G4String particleName = particle->GetParticleName();
196 
197  if (particleName == "e-")
198  ph->RegisterProcess(new G4UserSpecialCuts(), particle);
199  }
200 }
201 
202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const XML_Char * name
Definition: expat.h:151
void ConstructParticle()
Definition: PhysicsList.cc:117
void AddTrackingCut()
Definition: PhysicsList.cc:188
static void ConstructParticle()
static void ConstructParticle()
const G4String & GetParticleName() const
void AddPhysicsList(const G4String &name)
Definition: PhysicsList.cc:191
static void ConstructParticle()
G4GLOB_DLL std::ostream G4cout
static void ConstructParticle()
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4DNAGenericIonsManager * Instance(void)
void SetVerboseLevel(G4int value)
static void ConstructParticle()
static G4PhysicsListHelper * GetPhysicsListHelper()
virtual void ConstructProcess()=0
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
#define G4endl
Definition: G4ios.hh:61
void ConstructProcess()
Definition: PhysicsList.cc:170
G4ParticleDefinition * GetIon(const G4String &name)