Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
IORTPhysicsList.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 is the *BASIC* version of IORT, a Geant4-based application
27 //
28 // Main Authors: G.Russo(a,b), C.Casarino*(c), G.C. Candiano(c), G.A.P. Cirrone(d), F.Romano(d)
29 // Contributor Authors: S.Guatelli(e)
30 // Past Authors: G.Arnetta(c), S.E.Mazzaglia(d)
31 //
32 // (a) Fondazione Istituto San Raffaele G.Giglio, Cefalù, Italy
33 // (b) IBFM-CNR , Segrate (Milano), Italy
34 // (c) LATO (Laboratorio di Tecnologie Oncologiche), Cefalù, Italy
35 // (d) Laboratori Nazionali del Sud of the INFN, Catania, Italy
36 // (e) University of Wallongong, Australia
37 //
38 // *Corresponding author, email to carlo.casarino@polooncologicocefalu.it
40 //
41 // Physics models in IORT, following the Geant4 organisation, can be definided using three different approaches:
42 // 1. Activating one of the 'Reference Physics Lists' that are already prepared by
43 // the Geant4 Collaboration and are contained in the $G4INSTALL/source/physics_lists/lists folder
44 // The 'Reference Physics Lists' can be activated setting a specific enviroment variable to the name
45 // of the physics. For example if the QGSP_BIC Reference Physics Lists must be activated the User
46 // must set export PHYSLIST=QGSP_BIC (or setenv PHYSLIST QGSP_BIC).
47 // A 'Reference Physics Lists' contains all the physics process necessary to a particle transport
48 // If the User set the PHYSLIST variable IORT will start with the defaultMacroWithReferencePhysicsList.mac
49 // macro. See this macro file for more details
50 //
51 // 2. Activating the 'Builders' already prepared by
52 // the Geant4 Collaboration and contained in the $G4INSTALL/source/physics_lists/builder folder.
53 // Each builder is specific of a given model. There are builders for the electromagnetic processes, for the
54 // hadronic one, etc.
55 // If the PHYSLIST variable is not defined IORT starts with the defaultMacro.mac where the single builders
56 // are activated for the various processes of interest.
57 // Each builder is activated with the /Physics/addPhysics <nome builder> command
58 //
59 // ****** SUGGESTED PHYSICS *********
60 //
61 // AT MOMENT, IF ACCURATE RESULTS ARE NEDED, WE STRONGLY RECOMMEND:
62 // 1. The use of the emstandard_opt3, or
63 // 2. the QGSP_BIC_EMY Reference Physics Lists (define the PHYSLIST eviroment variable):
64 // export PHYSLIST=QGSP_BIC_EMY
65 
66 #include "G4SystemOfUnits.hh"
67 #include "G4RunManager.hh"
68 #include "G4Region.hh"
69 #include "G4RegionStore.hh"
70 #include "IORTPhysicsList.hh"
72 #include "IORTStepMax.hh"
73 #include "G4PhysListFactory.hh"
74 #include "G4VPhysicsConstructor.hh"
75 
76 // Local physic directly implemented in the Hadronthrapy directory
77 //#include "LocalIonIonInelasticPhysic.hh" // Physic dedicated to the ion-ion inelastic processes
78 //#include "LocalINCLIonIonInelasticPhysic.hh" // Physic dedicated to the ion-ion inelastic processes using ////INCL/ABLA
79 
80 // #include "LocalStandardICRU73EmPhysic.hh" // This permits the use of the ICRU73 tables for stopping powers of ions. AGGIUNTO da eliot_geant4.9.3p01_version
81 
82 // Physic lists (contained inside the Geant4 source code, in the 'physicslists folder')
84 #include "G4EmLivermorePhysics.hh"
85 #include "G4EmPenelopePhysics.hh"
86 #include "G4EmExtraPhysics.hh"
87 
88 #include "G4StoppingPhysics.hh"
89 #include "G4DecayPhysics.hh"
94 #include "G4HadronInelasticQBBC.hh"
96 #include "G4Decay.hh"
97 #include "G4DecayPhysics.hh"
98 #include "G4NeutronTrackingCut.hh"
99 #include "G4LossTableManager.hh"
100 #include "G4UnitsTable.hh"
101 #include "G4ProcessManager.hh"
102 #include "G4HadronPhysicsQGSP_BIC.hh"
103 #include "G4IonFluctuations.hh"
105 #include "G4EmProcessOptions.hh"
106 
108 
111 {
113  defaultCutValue = 0.01 *mm; //1.*mm;
117 
118  helIsRegistered = false;
119  bicIsRegistered = false;
120  biciIsRegistered = false;
123 
124  stepMaxProcess = 0;
125 
127 
128  SetVerboseLevel(1);
129 
130  // EM physics
132  emName = G4String("emstandard_opt3");
133 
134  // Decay physics and all particles
136 }
137 
140 {
141  delete pMessenger;
142  delete emPhysicsList;
143  delete decPhysicsList;
144  for(size_t i=0; i<hadronPhys.size(); i++) {delete hadronPhys[i];}
145 }
146 
149 {
151 }
152 
155 {
156  // transportation
158 
159  // electromagnetic physics list
162 
163  // decay physics list
165 
166  // hadronic physics lists
167  for(size_t i=0; i<hadronPhys.size(); i++) {
169  }
170 
171  // step limitation (as a full process)
172  //
173  AddStepMax();
174 }
175 
178 {
179 
180  if (verboseLevel>1) {
181  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
182  }
183  if (name == emName) return;
184 
186  // ELECTROMAGNETIC MODELS
188  if (name == "standard_opt3") {
189  emName = name;
190  delete emPhysicsList;
192  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
193  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option3" << G4endl;
194 
195 
196  } else if (name == "LowE_Livermore") {
197  emName = name;
198  delete emPhysicsList;
200  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
201  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmLivermorePhysics" << G4endl;
202 
203  } else if (name == "LowE_Penelope") {
204  emName = name;
205  delete emPhysicsList;
207  G4RunManager::GetRunManager()-> PhysicsHasBeenModified();
208  G4cout << "THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmPenelopePhysics" << G4endl;
209 
211  // HADRONIC MODELS
213  } else if (name == "Elastic")
214  {
215  if(!helIsRegistered)
216  {
217  G4cout << "THE FOLLOWING HADRONIC ELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronElasticPhysics()" << G4endl;
218  hadronPhys.push_back( new G4HadronElasticPhysics());
219  helIsRegistered = true;
220  }
221  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
222  }
223  else if (name == "DElastic")
224  {
225  if(!helIsRegistered)
226  {
227  hadronPhys.push_back( new G4HadronDElasticPhysics());
228  helIsRegistered = true;
229  }
230  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
231 
232  }
233  else if (name == "HElastic")
234  {
235  if(!helIsRegistered)
236  {
237  hadronPhys.push_back( new G4HadronHElasticPhysics());
238  helIsRegistered = true;
239  }
240  else G4cout << "AN ELASTIC PHYSICS HAS BEEN ALREADY ACTIVATED!" << G4endl;
241 
242  }
243  else if (name == "Em_extra_physics")
244  {
245  hadronPhys.push_back( new G4EmExtraPhysics());
246  }
247  else if (name == "Stopping_physics")
248  {
249  hadronPhys.push_back( new G4StoppingPhysics());
250  }
251  else if (name == "Neutron_tracking_cut")
252  {
253  hadronPhys.push_back( new G4NeutronTrackingCut());
254  }
255  else if (name == "Hadron_QGSP_BIC")
256  {
257  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
258  // helIsRegistered = true;
259  }
260  else if (name == "Hadron_QBBC")
261  {
262  hadronPhys.push_back(new G4HadronInelasticQBBC());
263  //bicIsRegistered = true;
264  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronInelasticQBBC()" << G4endl;
265  }
266 
267  else if (name == "binary")
268  {
269  hadronPhys.push_back(new G4HadronInelasticQBBC());
270  //bicIsRegisted = true;
271  G4cout << "THE FOLLOWING HADRONIC INELASTIC PHYSICS LIST HAS BEEN ACTIVATED: G4HadronInelasticQBBC()" << G4endl;
272  }
273 
274  else if (name == "binary_ion")
275  {
276  hadronPhys.push_back(new G4IonBinaryCascadePhysics());
277  //biciIsRegistered = true;
278  }
279 /*
280  else if (name == "local_ion_ion_inelastic")
281  {
282  hadronPhys.push_back(new LocalIonIonInelasticPhysic());
283  locIonIonInelasticIsRegistered = true;
284  }
285  else if (name == "local_incl_ion_ion_inelastic")
286  {
287  hadronPhys.push_back(new LocalINCLIonIonInelasticPhysic());
288  locIonIonInelasticIsRegistered = true;
289  }
290 */
291  else if (name == "decay")
292  {
293  hadronPhys.push_back(new G4DecayPhysics());
294  //radioactiveDecayIsRegistered = true;
295  }
296  else if (name == "radioactive_decay" && !radioactiveDecayIsRegistered )
297  {
298  hadronPhys.push_back(new G4RadioactiveDecayPhysics());
300 
301  // The following is the construction of the QGSP_BIC_EMY Reference physics list
302  // reconstructed here like a builder: it should be identical to the
303  // one contained inside the $G4INSTALL/physics_lists/lists folder
304  }
305  else if (name == "QGSP_BIC_EMY")
306  {
307  AddPhysicsList("emstandard_opt3");
308  hadronPhys.push_back( new G4EmExtraPhysics());
309  hadronPhys.push_back( new G4HadronElasticPhysics());
310  hadronPhys.push_back( new G4StoppingPhysics());
311  hadronPhys.push_back( new G4IonBinaryCascadePhysics());
312  hadronPhys.push_back( new G4NeutronTrackingCut());
313  hadronPhys.push_back( new G4HadronPhysicsQGSP_BIC());
314  hadronPhys.push_back( new G4DecayPhysics());
315 
316  }
317  else {
318 
319  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
320  << " is not defined"
321  << G4endl;
322  }
323 }
324 
327 {
328  // Step limitation seen as a process
329  stepMaxProcess = new IORTStepMax();
330 
332  particleIterator->reset();
333  while ((*particleIterator)()){
334  G4ParticleDefinition* particle = particleIterator->value();
335  G4ProcessManager* pmanager = particle->GetProcessManager();
336 
337  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
338  {
340  }
341  }
342 }
343 
346 {
347 
348  if (verboseLevel >0){
349  G4cout << "PhysicsList::SetCuts:";
350  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
351  }
352 
353  // set cut values for gamma at first and for e- second and next for e+,
354  // because some processes for e+/e- need cut values for gamma
355  SetCutValue(cutForGamma, "gamma");
358 
359  // Set cuts for detector
362 }
363 
366 {
367  cutForGamma = cut;
369 }
370 
373 {
374  cutForElectron = cut;
376 }
377 
380 {
381  cutForPositron = cut;
383 }
384 
386 {
387  G4String regionName = "DetectorLog";
388  G4Region* region = G4RegionStore::GetInstance()->GetRegion(regionName);
389 
390  G4ProductionCuts* cuts = new G4ProductionCuts ;
391  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("gamma"));
392  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e-"));
393  cuts -> SetProductionCut(cut,G4ProductionCuts::GetIndex("e+"));
394  region -> SetProductionCuts(cuts);
395 }
396 
void SetCutForPositron(G4double)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:80
virtual ~IORTPhysicsList()
const XML_Char * name
Definition: expat.h:151
G4VPhysicsConstructor * decPhysicsList
G4bool locIonIonInelasticIsRegistered
G4double cutForPositron
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static constexpr double mm
Definition: G4SIunits.hh:115
#define G4endl
Definition: G4ios.hh:61
G4bool radioactiveDecayIsRegistered
static G4int GetIndex(const G4String &name)
void AddPhysicsList(const G4String &name)
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
IORTStepMax * stepMaxProcess
G4bool IsApplicable(const G4ParticleDefinition &)
Definition: IORTStepMax.cc:55
virtual void ConstructParticle()=0
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
G4EmConfigurator em_config
IORTPhysicsListMessenger * pMessenger
std::vector< G4VPhysicsConstructor * > hadronPhys
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4VPhysicsConstructor * emPhysicsList
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void SetCutForGamma(G4double)
static G4RegionStore * GetInstance()
G4ProcessManager * GetProcessManager() const
void SetDetectorCut(G4double cut)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
G4double cutForElectron
void SetCutForElectron(G4double)
void DumpCutValuesTable(G4int flag=1)
void SetVerboseLevel(G4int value)