Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/advanced/microbeam/src/PhysicsList.cc
이 파일의 문서화 페이지로 가기
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 // This example is provided by the Geant4-DNA collaboration
27 // Any report or published results obtained using the Geant4-DNA software
28 // shall cite the following Geant4-DNA collaboration publication:
29 // Med. Phys. 37 (2010) 4692-4708
30 // The Geant4-DNA web site is available at http://geant4-dna.org
31 //
32 // If you use this example, please cite the following publication:
33 // Rad. Prot. Dos. 133 (2009) 2-11
34 
35 #include "PhysicsList.hh"
36 #include "PhysicsListMessenger.hh"
37 
38 #include "G4SystemOfUnits.hh"
39 #include "G4StepLimiter.hh"
40 
41 #include "G4EmStandardPhysics.hh"
46 #include "G4EmLivermorePhysics.hh"
47 #include "G4EmPenelopePhysics.hh"
48 #include "G4DecayPhysics.hh"
49 
50 #include "G4ProcessManager.hh"
51 
52 #include "G4Gamma.hh"
53 #include "G4Electron.hh"
54 #include "G4Positron.hh"
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
59 {
60  fMessenger = new PhysicsListMessenger(this);
61 
62  SetVerboseLevel(1);
63 
64  // EM physics
65  fEmName = G4String("emlivermore");
66 
68 
69  // Deacy physics and all particles
71 }
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74 
76 {
77  delete fMessenger;
78  delete fEmPhysicsList;
79  delete fDecPhysicsList;
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
87 }
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90 
92 {
93  // transportation
95 
96  // electromagnetic physics list
98 
99  // decay physics list
101 
102  // step limitation (as a full process)
103  AddStepMax();
104 
105 }
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
108 
110 {
111  if (verboseLevel>1) {
112  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
113  }
114 
115  if (name == fEmName) return;
116 
117  if (name == "emstandard_opt0") {
118 
119  fEmName = name;
120  delete fEmPhysicsList;
122 
123  } else if (name == "emstandard_opt1") {
124 
125  fEmName = name;
126  delete fEmPhysicsList;
128 
129  } else if (name == "emstandard_opt2") {
130 
131  fEmName = name;
132  delete fEmPhysicsList;
134 
135  } else if (name == "emstandard_opt3") {
136 
137  fEmName = name;
138  delete fEmPhysicsList;
140 
141  } else if (name == "emstandard_opt4") {
142 
143  fEmName = name;
144  delete fEmPhysicsList;
146 
147  } else if (name == "emlivermore") {
148 
149  fEmName = name;
150  delete fEmPhysicsList;
152 
153  } else if (name == "empenelope") {
154 
155  fEmName = name;
156  delete fEmPhysicsList;
158 
159  }
160 }
161 
162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163 
165 {
166  // Step limitation seen as a process
167 
169 
171 
172  particleIterator->reset();
173 
174  while ((*particleIterator)()){
175  G4ParticleDefinition* particle = particleIterator->value();
176  G4ProcessManager* pmanager = particle->GetProcessManager();
177 
178  if (fStepMaxProcess->IsApplicable(*particle) && pmanager)
179  {
181  }
182  }
183 }
184 
185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4endl
Definition: G4ios.hh:61
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
virtual void ConstructParticle()=0
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
PhysicsList()
Implementation of the PhysicsList class.
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)