Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/medical/dna/splitting/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 // $Id$
27 //
30 
31 #include "PhysicsList.hh"
32 
33 #include "G4UIcmdWithAnInteger.hh"
34 #include "G4SystemOfUnits.hh"
35 
36 // Geant4-DNA MODELS
37 
38 #include "G4DNAElastic.hh"
41 
42 #include "G4DNAExcitation.hh"
45 
46 #include "G4DNAIonisation.hh"
49 
50 #include "G4DNAChargeDecrease.hh"
52 
53 #include "G4DNAChargeIncrease.hh"
55 
56 #include "G4DNAAttachment.hh"
58 
59 #include "G4DNAVibExcitation.hh"
61 
63 
64 //
65 
66 #include "G4LossTableManager.hh"
67 #include "G4EmConfigurator.hh"
68 #include "G4VEmModel.hh"
69 #include "G4DummyModel.hh"
70 #include "G4eIonisation.hh"
71 #include "G4hIonisation.hh"
72 #include "G4ionIonisation.hh"
73 #include "G4eMultipleScattering.hh"
74 #include "G4hMultipleScattering.hh"
75 #include "G4BraggIonGasModel.hh"
77 #include "G4UrbanMscModel.hh"
78 #include "G4MollerBhabhaModel.hh"
79 #include "G4IonFluctuations.hh"
81 
82 #include "G4ElectronCapture.hh"
83 
84 #include "SplitProcess.hh"
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
90 
91 {
92 
93  fpNumberOfSplit = new G4UIcmdWithAnInteger("/vrt/numberOfSplit", this);
94  fpNumberOfSplit->SetGuidance("Number of split for particle splitting");
95  fpNumberOfSplit->SetParameterName("NumberOfSplit",false);
96  fpNumberOfSplit->SetDefaultValue(1);
97 
98  defaultCutValue = 1*micrometer;
99  fCutForGamma = defaultCutValue;
100  fCutForElectron = defaultCutValue;
101  fCutForPositron = defaultCutValue;
102  fCutForProton = defaultCutValue;
103 
104  SetVerboseLevel(1);
105 
106 // fNumberOfSplit = 1;
107 
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
113 {}
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117  G4String newValue) {
118  if ( command == fpNumberOfSplit )
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123 
125 {
126  ConstructBosons();
129 }
130 
131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132 
134 {
135  // gamma
137 }
138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139 
141 {
142  // leptons
145 }
146 
147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148 
149 //DNA
151 //ENDDNA
152 
154 {
155  // baryons
158 
159  // Geant4 DNA new particles
160  G4DNAGenericIonsManager * genericIonsManager;
161  genericIonsManager=G4DNAGenericIonsManager::Instance();
162  genericIonsManager->GetIon("alpha++");
163  genericIonsManager->GetIon("alpha+");
164  genericIonsManager->GetIon("helium");
165  genericIonsManager->GetIon("hydrogen");
166 }
167 
168 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169 
171 {
173  ConstructEM();
175 }
176 
177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
178 
180 {
181 
183  particleIterator->reset();
184  G4bool splitProcessActive = false;
185  // Only if particle split is larger than 1, VRT is set
186  if ( fNumberOfSplit > 1 )
187  splitProcessActive = true;
188 
189  while( (*particleIterator)() )
190  {
191 
192  G4ParticleDefinition* particle = particleIterator->value();
193  G4ProcessManager* pmanager = particle->GetProcessManager();
194  G4String particleName = particle->GetParticleName();
195 
196  // *********************************
197  // 1) Processes for the World region
198  // *********************************
199 
200  if (particleName == "e-") {
201 
202  // STANDARD msc is active in the world
204  msc->AddEmModel(1,new G4UrbanMscModel());
205  pmanager->AddProcess(msc, -1, 1, -1);
206 
207  // STANDARD ionisation is active in the world
208  G4eIonisation* eion = new G4eIonisation();
209  eion->SetEmModel(new G4MollerBhabhaModel(), 1);
210  pmanager->AddProcess(eion, -1, 2, 2);
211 
212  // DNA elastic is not active in the world
213  G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
214  theDNAElasticProcess->SetEmModel(new G4DummyModel(),1);
215  pmanager->AddDiscreteProcess(theDNAElasticProcess);
216 
217  // DNA excitation is not active in the world
218  G4DNAExcitation* dnaex = new G4DNAExcitation("e-_G4DNAExcitation");
219  dnaex->SetEmModel(new G4DummyModel(),1);
220  pmanager->AddDiscreteProcess(dnaex);
221 
222  // DNA ionisation is not active in the world
223  G4DNAIonisation* dnaioni = new G4DNAIonisation("e-_G4DNAIonisation");
224  dnaioni->SetEmModel(new G4DummyModel(),1);
225 
226  // Variance reduction is set here
227  if (splitProcessActive) {
228  G4String splitRegion = "Target";
229  G4cout << "- Split for e-e created in e-_G4DNAIonisation process activated"
230  << "with split number " << fNumberOfSplit << " in region "
231  << splitRegion << "-- " << G4endl;
232  SplitProcess* splitProcess = new SplitProcess(splitRegion, fNumberOfSplit);
233  splitProcess->RegisterProcess(dnaioni);
234 
235  pmanager->AddDiscreteProcess(splitProcess);
236 
237  } else {
238  pmanager->AddDiscreteProcess(dnaioni);
239  }
240 
241  // DNA attachment is not active in the world
242  G4DNAAttachment* dnaatt = new G4DNAAttachment("e-_G4DNAAttachment");
243  dnaatt->SetEmModel(new G4DummyModel(),1);
244  pmanager->AddDiscreteProcess(dnaatt);
245 
246  // DNA vib. excitation is not active in the world
247  G4DNAVibExcitation* dnavib =
248  new G4DNAVibExcitation("e-_G4DNAVibExcitation");
249  dnavib->SetEmModel(new G4DummyModel(),1);
250  pmanager->AddDiscreteProcess(dnavib);
251 
252  // THE FOLLOWING PROCESS WILL KILL ALL ELECTRONS BELOW A
253  // SELECTED ENERY THRESHOLD
254  // Capture of low-energy e-
255  G4ElectronCapture* ecap = new G4ElectronCapture("Target", 7.4*eV);
256  pmanager->AddDiscreteProcess(ecap);
257  // 7.4 eV is compatible with the validity range of the Champion's model
258 
259  } else if ( particleName == "proton" ) {
260 
261  // STANDARD msc is active in the world
263  msc->AddEmModel(1,new G4UrbanMscModel());
264  pmanager->AddProcess(msc, -1, 1, -1);
265 
266  // STANDARD ionisation is active in the world
267  G4hIonisation* hion = new G4hIonisation();
268  hion->SetEmModel(new G4BraggIonGasModel(), 1);
269  hion->SetEmModel(new G4BetheBlochIonGasModel(), 2);
270  pmanager->AddProcess(hion, -1, 2, 2);
271 
272  // DNA excitation is not active in the world
273  G4DNAExcitation* dnaex = new G4DNAExcitation("proton_G4DNAExcitation");
274  dnaex->SetEmModel(new G4DummyModel(),1);
275  dnaex->SetEmModel(new G4DummyModel(),2);
276  pmanager->AddDiscreteProcess(dnaex);
277 
278  // DNA ionisation is not active in the world
279  G4DNAIonisation* dnaioni = new G4DNAIonisation("proton_G4DNAIonisation");
280  dnaioni->SetEmModel(new G4DummyModel(),1);
281  dnaioni->SetEmModel(new G4DummyModel(),2);
282  pmanager->AddDiscreteProcess(dnaioni);
283 
284  // DNA charge decrease is ACTIVE in the world since
285  // no corresponding STANDARD process exist
286  pmanager->AddDiscreteProcess(
287  new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"));
288 
289  } else if ( particleName == "hydrogen" ) {
290 
291  // DNA processes are ACTIVE in the world since
292  // no corresponding STANDARD processes exist
293  pmanager->AddDiscreteProcess(
294  new G4DNAIonisation("hydrogen_G4DNAIonisation"));
295  pmanager->AddDiscreteProcess(
296  new G4DNAExcitation("hydrogen_G4DNAExcitation"));
297  pmanager->AddDiscreteProcess(
298  new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"));
299 
300  } else if (particleName == "GenericIon") {
301 
302  // THIS IS NEEDED FOR STANDARD ALPHA G4ionIonisation PROCESS
303 
304  // STANDARD msc is active in the world
306  msc->AddEmModel(1, new G4UrbanMscModel());
307  pmanager->AddProcess(msc, -1, 1, -1);
308 
309  // STANDARD ionisation is active in the world
310  G4ionIonisation* hion = new G4ionIonisation();
311  hion->SetEmModel(new G4BraggIonGasModel(),1);
312  hion->SetEmModel(new G4BetheBlochIonGasModel(), 2);
313  pmanager->AddProcess(hion, -1, 2, 2);
314 
315  } else if ( particleName == "alpha" ) {
316 
317  // STANDARD msc is active in the world
319  msc->AddEmModel(1, new G4UrbanMscModel());
320  pmanager->AddProcess(msc, -1, 1, -1);
321 
322  // STANDARD ionisation is active in the world
323  G4ionIonisation* hion = new G4ionIonisation();
324  hion->SetEmModel(new G4BraggIonGasModel(),1);
325  hion->SetEmModel(new G4BetheBlochIonGasModel(), 2);
326  pmanager->AddProcess(hion, -1, 2, 2);
327 
328  // DNA excitation is not active in the world
329  G4DNAExcitation* dnaex = new G4DNAExcitation("alpha_G4DNAExcitation");
330  dnaex->SetEmModel(new G4DummyModel(),1);
331  pmanager->AddDiscreteProcess(dnaex);
332 
333  // DNA ionisation is not active in the world
334  G4DNAIonisation* dnaioni = new G4DNAIonisation("alpha_G4DNAIonisation");
335  dnaioni->SetEmModel(new G4DummyModel(),1);
336  pmanager->AddDiscreteProcess(dnaioni);
337 
338  // DNA charge decrease is ACTIVE in the world since no
339  // corresponding STANDARD process exist
340  pmanager->AddDiscreteProcess(
341  new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"));
342 
343  } else if ( particleName == "alpha+" ) {
344 
345  // DNA processes are ACTIVE in the world since no
346  // corresponding STANDARD processes exist
347  pmanager->AddDiscreteProcess(
348  new G4DNAExcitation("alpha+_G4DNAExcitation"));
349  pmanager->AddDiscreteProcess(
350  new G4DNAIonisation("alpha+_G4DNAIonisation"));
351  pmanager->AddDiscreteProcess(
352  new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"));
353  pmanager->AddDiscreteProcess(
354  new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"));
355 
356  } else if ( particleName == "helium" ) {
357 
358  // DNA processes are ACTIVE in the world since no
359  // corresponding STANDARD processes exist
360  pmanager->AddDiscreteProcess(
361  new G4DNAExcitation("helium_G4DNAExcitation"));
362  pmanager->AddDiscreteProcess(
363  new G4DNAIonisation("helium_G4DNAIonisation"));
364  pmanager->AddDiscreteProcess(
365  new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"));
366 
367  }
368  }
369 
370  // **************************************
371  // 2) Define processes for Target region
372  // **************************************
373 
374  // STANDARD EM processes should be inactivated when
375  // corresponding DNA processes are used
376  // - STANDARD EM e- processes are inactivated below 1 MeV
377  // - STANDARD EM proton & alpha processes are inactivated below
378  // standEnergyLimit
379  G4double standEnergyLimit = 9.9*MeV;
380  //
381 
382  G4double massFactor = 1.0079/4.0026;
385 
386  G4VEmModel* mod;
387 
388  // *** e-
389 
390  // ---> STANDARD EM processes are inactivated below 1 MeV
391 
392  mod = new G4UrbanMscModel();
394  em_config->SetExtraEmModel("e-","msc",mod,"Target");
395 
396  mod = new G4MollerBhabhaModel();
398  em_config->SetExtraEmModel("e-",
399  "eIoni",
400  mod,
401  "Target",
402  0.0,
403  100*TeV,
404  new G4UniversalFluctuation());
405 
406  // ---> DNA processes activated
407 
408  mod = new G4DNAChampionElasticModel();
409  em_config->SetExtraEmModel("e-","e-_G4DNAElastic",
410  mod,"Target",7.4*eV,1.*MeV);
411 
412  mod = new G4DNABornIonisationModel();
413  em_config->SetExtraEmModel("e-","e-_G4DNAIonisation",
414  mod,"Target",11.*eV,1.*MeV);
415  // Note: valid from 11 eV to 0.999.. MeV then switch to std models at
416  // higher energies ; same for other models
417 
418  mod = new G4DNABornExcitationModel();
419  em_config->SetExtraEmModel("e-","e-_G4DNAExcitation",
420  mod,"Target",9.*eV,1.*MeV);
421 
422  mod = new G4DNAMeltonAttachmentModel();
423  em_config->SetExtraEmModel("e-","e-_G4DNAAttachment",
424  mod,"Target",4.*eV,13.*eV);
425 
426  mod = new G4DNASancheExcitationModel();
427  em_config->SetExtraEmModel("e-","e-_G4DNAVibExcitation",
428  mod,"Target",2.*eV,100.*eV);
429 
430  // *** proton
431 
432  // ---> STANDARD EM processes inactivated below standEnergyLimit
433 
434  // STANDARD msc is still active
435  // Inactivate following STANDARD processes
436 
437  mod = new G4BraggIonGasModel();
438  mod->SetActivationLowEnergyLimit(standEnergyLimit);
439  em_config->SetExtraEmModel("proton","hIoni",
440  mod,"Target",0.0,2*MeV, new G4IonFluctuations());
441 
442  mod = new G4BetheBlochIonGasModel();
443  mod->SetActivationLowEnergyLimit(standEnergyLimit);
444  em_config->SetExtraEmModel("proton","hIoni",
445  mod,"Target",2*MeV,100*TeV,
446  new G4UniversalFluctuation());
447 
448  // ---> DNA processes activated
449 
450  mod = new G4DNARuddIonisationModel();
451  em_config->SetExtraEmModel("proton","proton_G4DNAIonisation",
452  mod,"Target",0.0,0.5*MeV);
453 
454  mod = new G4DNABornIonisationModel();
455  em_config->SetExtraEmModel("proton","proton_G4DNAIonisation",
456  mod,"Target",0.5*MeV,10*MeV);
457 
459  em_config->SetExtraEmModel("proton","proton_G4DNAExcitation",
460  mod,"Target",10*eV,0.5*MeV);
461 
462  mod = new G4DNABornExcitationModel();
463  em_config->SetExtraEmModel("proton","proton_G4DNAExcitation",
464  mod,"Target",0.5*MeV,10*MeV);
465 
466  // *** alpha
467 
468  // ---> STANDARD EM processes inactivated below standEnergyLimit
469 
470  // STANDARD msc is still active
471  // Inactivate following STANDARD processes
472 
473  mod = new G4BraggIonGasModel();
474  mod->SetActivationLowEnergyLimit(standEnergyLimit);
475  em_config->SetExtraEmModel("alpha","ionIoni",
476  mod,"Target",0.0,2*MeV/massFactor,
477  new G4IonFluctuations());
478 
479  mod = new G4BetheBlochIonGasModel();
480  mod->SetActivationLowEnergyLimit(standEnergyLimit);
481  em_config->SetExtraEmModel("alpha","ionIoni",
482  mod,"Target",2*MeV/massFactor,100*TeV,
483  new G4UniversalFluctuation());
484 
485  // ---> DNA processes activated
486 
487  mod = new G4DNARuddIonisationModel();
488  em_config->SetExtraEmModel("alpha","alpha_G4DNAIonisation",
489  mod,"Target",0.0,10*MeV);
490 
492  em_config->SetExtraEmModel("alpha","alpha_G4DNAExcitation",
493  mod,"Target",1*keV,10*MeV);
494 
495 }
496 
497 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
498 
500 { }
501 
502 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
503 
505 {
506  if (verboseLevel >0)
507  {
508  G4cout << "PhysicsList::SetCuts:";
509  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
510  }
511 
512  // set cut values for gamma at first and for e- second and next for e+,
513  // because some processes for e+/e- need cut values for gamma
514  SetCutValue(fCutForGamma, "gamma");
517  SetCutValue(fCutForProton, "proton");
518 
519  if (verboseLevel>0) { DumpCutValuesTable(); }
520 }
521 
523  fNumberOfSplit = nb;
524 }
525 
527  return fNumberOfSplit;
528 }
529 
static constexpr double micrometer
Definition: G4SIunits.hh:100
Definition of the SplitProcess class.
virtual void RegisterProcess(G4VProcess *)
void SetEmModel(G4VEmModel *, G4int index=0)
static constexpr double MeV
Definition: G4SIunits.hh:214
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static constexpr double keV
Definition: G4SIunits.hh:216
#define G4endl
Definition: G4ios.hh:61
const G4String & GetParticleName() const
G4DNABornExcitationModel1 G4DNABornExcitationModel
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
static constexpr double TeV
Definition: G4SIunits.hh:218
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
void SetActivationLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:728
void SetEmModel(G4VEmModel *, G4int index=0)
PhysicsList()
Implementation of the PhysicsList class.
static constexpr double eV
Definition: G4SIunits.hh:215
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
int G4int
Definition: G4Types.hh:78
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
G4ParticleDefinition * GetIon(const G4String &name)
G4ProcessManager * GetProcessManager() const
#define G4DNABornIonisationModel
static G4DNAGenericIonsManager * Instance(void)
static G4int GetNewIntValue(const char *paramString)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=nullptr)
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
void DumpCutValuesTable(G4int flag=1)
G4EmConfigurator * EmConfigurator()