Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/medical/fanoCavity/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 //
28 //
29 // $Id: PhysicsList.cc 100265 2016-10-17 08:11:18Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "PhysListEmStandard_option0.hh"
38 #include "PhysListEmStandard_option3.hh"
39 #include "PhysListEmStandard_GS.hh"
40 #include "PhysListEmStandard_WVI.hh"
41 #include "PhysListEmStandard_SS.hh"
42 
43 #include "StepMax.hh"
44 
45 #include "G4ParticleDefinition.hh"
46 
47 #include "G4ProcessManager.hh"
48 #include "G4LossTableManager.hh"
49 
50 // Bosons
51 #include "G4ChargedGeantino.hh"
52 #include "G4Geantino.hh"
53 #include "G4Gamma.hh"
54 
55 // leptons
56 #include "G4Electron.hh"
57 #include "G4Positron.hh"
58 
59 // Hadrons
60 #include "G4Proton.hh"
61 #include "G4GenericIon.hh"
62 
63 #include "G4SystemOfUnits.hh"
64 
65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66 
69  fDetector(det),fMessenger(0),fEmName(" "),fEmPhysicsList(0)
70 {
72  fMessenger = new PhysicsListMessenger(this);
73 
74  // EM physics
75  fEmName = G4String("standard_opt3");
76  fEmPhysicsList = new PhysListEmStandard_option3(fEmName,fDetector);
77 
78  defaultCutValue = 10*km;
79 
80  SetVerboseLevel(1);
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
86 {
87  delete fEmPhysicsList;
88  delete fMessenger;
89 }
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
94 {
95 
96  G4cout << "DEBUG" << G4endl;
97  // pseudo-particles
100 
101  // gamma
103 
104  // leptons
107 
108  // baryons
110 
111  // Generic Ion
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116 
118 {
121 
122  AddStepMax();
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 
128 {
129  // Step limitation seen as a process
130  StepMax* stepMaxProcess = new StepMax();
131 
133  particleIterator->reset();
134  while ((*particleIterator)()){
135  G4ParticleDefinition* particle = particleIterator->value();
136  G4ProcessManager* pmanager = particle->GetProcessManager();
137 
138  if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
139  {
140  pmanager ->AddDiscreteProcess(stepMaxProcess);
141  }
142  }
143 }
144 
145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146 
148 {
149  if (verboseLevel>-1) {
150  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
151  }
152 
153  if (name == fEmName) return;
154 
155  if (name == "standard_opt0") {
156 
157  fEmName = name;
158  delete fEmPhysicsList;
160 
161  } else if (name == "standard_opt3") {
162 
163  fEmName = name;
164  delete fEmPhysicsList;
166 
167  } else if (name == "standard_GS") {
168 
169  fEmName = name;
170  delete fEmPhysicsList;
172 
173  } else if (name == "standard_WVI") {
174 
175  fEmName = name;
176  delete fEmPhysicsList;
178 
179  } else if (name == "standard_SS") {
180 
181  fEmName = name;
182  delete fEmPhysicsList;
184  } else {
185 
186  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
187  << " is not defined"
188  << G4endl;
189  }
190 }
191 
192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
193 
194 #include "G4UnitsTable.hh"
195 
197 {
198  if (verboseLevel >0){
199  G4cout << "PhysicsList::SetCuts:";
200  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
201  }
202 
203  // set cut values for gamma at first and for e- second and next for e+,
204  // because some processes for e+/e- need cut values for gamma
205  SetCutValue(defaultCutValue, "gamma");
208  SetCutValue(defaultCutValue, "proton");
209 }
210 
211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4ChargedGeantino * ChargedGeantinoDefinition()
#define G4endl
Definition: G4ios.hh:61
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
PhysicsList()
Implementation of the PhysicsList class.
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
virtual G4bool IsApplicable(const G4ParticleDefinition &)
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
static constexpr double km
Definition: G4SIunits.hh:133
Simple detector construction with a box volume placed in a world.