Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm7/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 101250 2016-11-10 08:54:02Z 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.hh"
38 #include "PhysListEmStandardNR.hh"
39 #include "G4EmStandardPhysics.hh"
45 #include "G4EmStandardPhysicsGS.hh"
46 #include "G4EmStandardPhysicsSS.hh"
47 
48 #include "G4EmLivermorePhysics.hh"
49 #include "G4EmPenelopePhysics.hh"
50 #include "G4EmLowEPPhysics.hh"
51 
52 #include "G4DecayPhysics.hh"
53 
57 #include "G4HadronInelasticQBBC.hh"
58 #include "G4IonPhysics.hh"
59 
60 #include "G4LossTableManager.hh"
61 #include "G4EmConfigurator.hh"
62 #include "G4UnitsTable.hh"
63 
64 #include "G4ProcessManager.hh"
65 #include "G4Decay.hh"
66 
67 #include "StepMax.hh"
68 
69 #include "G4IonFluctuations.hh"
72 
73 #include "G4BraggIonGasModel.hh"
75 
76 #include "G4PhysicalConstants.hh"
77 #include "G4SystemOfUnits.hh"
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80 
82  fStepMaxProcess(nullptr)
83 {
84  fHelIsRegisted = false;
85  fBicIsRegisted = false;
86  fBiciIsRegisted = false;
87 
88  // protected member of the base class
89  verboseLevel = 1;
90 
91  fMessenger = new PhysicsListMessenger(this);
92 
93  // EM physics
94  fEmName = G4String("emstandard_opt0");
96 
97  // Deacy physics and all particles
99 }
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102 
104 {
105  delete fMessenger;
106  delete fEmPhysicsList;
107  delete fDecPhysicsList;
108  for(size_t i=0; i<fHadronPhys.size(); i++) {delete fHadronPhys[i];}
109 }
110 
111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112 
114 {
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122  // transportation
123  //
125 
126  // electromagnetic physics list
127  //
129 
130  // decay physics list
131  //
133 
134  // hadronic physics lists
135  for(size_t i=0; i<fHadronPhys.size(); i++) {
136  fHadronPhys[i]->ConstructProcess();
137  }
138 
139  // step limitation (as a full process)
140  //
141  AddStepMax();
142 }
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145 
147 {
148  if (verboseLevel>1) {
149  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
150  }
151 
152  if (name == fEmName) return;
153 
154  if (name == "local") {
155 
156  fEmName = name;
157  delete fEmPhysicsList;
159 
160  } else if (name == "emstandard_opt0") {
161 
162  fEmName = name;
163  delete fEmPhysicsList;
165 
166  } else if (name == "emstandard_opt1") {
167 
168  fEmName = name;
169  delete fEmPhysicsList;
171 
172  } else if (name == "emstandard_opt2") {
173 
174  fEmName = name;
175  delete fEmPhysicsList;
177 
178  } else if (name == "emstandard_opt3") {
179 
180  fEmName = name;
181  delete fEmPhysicsList;
183 
184  } else if (name == "emstandard_opt4") {
185 
186  fEmName = name;
187  delete fEmPhysicsList;
189 
190  } else if (name == "ionGasModels") {
191 
192  AddPhysicsList("emstandard_opt0");
193  fEmName = name;
194  AddIonGasModels();
195 
196  } else if (name == "standardNR") {
197 
198  fEmName = name;
199  delete fEmPhysicsList;
201 
202  } else if (name == "emlivermore") {
203  fEmName = name;
204  delete fEmPhysicsList;
206 
207  } else if (name == "empenelope") {
208  fEmName = name;
209  delete fEmPhysicsList;
211 
212  } else if (name == "emlowenergy") {
213  fEmName = name;
214  delete fEmPhysicsList;
216 
217  } else if (name == "emstandardSS") {
218 
219  fEmName = name;
220  delete fEmPhysicsList;
222 
223  } else if (name == "emstandardWVI") {
224 
225  fEmName = name;
226  delete fEmPhysicsList;
228 
229  } else if (name == "emstandardGS") {
230 
231  fEmName = name;
232  delete fEmPhysicsList;
234 
235  } else if (name == "elastic" && !fHelIsRegisted) {
237  fHelIsRegisted = true;
238 
239  } else if (name == "DElastic" && !fHelIsRegisted) {
241  fHelIsRegisted = true;
242 
243  } else if (name == "HElastic" && !fHelIsRegisted) {
245  fHelIsRegisted = true;
246 
247  } else if (name == "binary" && !fBicIsRegisted) {
249  fBicIsRegisted = true;
250 
251  } else if (name == "binary_ion" && !fBiciIsRegisted) {
252  fHadronPhys.push_back(new G4IonPhysics(verboseLevel));
253  fBiciIsRegisted = true;
254 
255  } else {
256 
257  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
258  << " is not defined"
259  << G4endl;
260  }
261 }
262 
263 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
264 
266 {
267  // Step limitation seen as a process
268  fStepMaxProcess = new StepMax();
269 
271  particleIterator->reset();
272  while ((*particleIterator)()){
273  G4ParticleDefinition* particle = particleIterator->value();
274  G4ProcessManager* pmanager = particle->GetProcessManager();
275 
276  if (fStepMaxProcess->IsApplicable(*particle) && pmanager)
277  {
279  }
280  }
281 }
282 
283 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
284 
286 {
290  particleIterator->reset();
291  while ((*particleIterator)())
292  {
293  G4ParticleDefinition* particle = particleIterator->value();
294  G4String partname = particle->GetParticleName();
295  if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
298  G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
299  em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
300  new G4IonFluctuations());
301  em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
302  new G4UniversalFluctuation());
303 
304  }
305  }
306 }
307 
308 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
309 
const XML_Char * name
Definition: expat.h:151
static constexpr double MeV
Definition: G4SIunits.hh:214
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4endl
Definition: G4ios.hh:61
const G4String & GetParticleName() const
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
G4double GetPDGMass() const
static constexpr double proton_mass_c2
static constexpr double TeV
Definition: G4SIunits.hh:218
virtual void ConstructParticle()=0
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
PhysicsList()
Implementation of the PhysicsList class.
Definition of the PhysListEmStandardNR class.
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
std::vector< G4VPhysicsConstructor * > fHadronPhys
G4EmConfigurator * EmConfigurator()