Geant4  10.03
PhysicsList.cc
Go to the documentation of this file.
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 // -------------------------------------------------------------------
27 // $Id: PhysicsList.cc,v 1.1 2012-09-21 mraine Exp $
28 // -------------------------------------------------------------------
29 
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
31 
32 #include "PhysicsList.hh"
33 #include "G4SystemOfUnits.hh"
34 
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
36 
38 {
44 
45  SetVerboseLevel(1);
46 }
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
49 
51 {}
52 
53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
54 
56 {
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65 {
66  // gamma
68 }
69  //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
70 
72 {
73  // leptons
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79 
81 {
82  // baryons
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
88 
90 {
92  ConstructEM();
94 }
95 
96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
97 
98 // Geant4-MicroElec MODELS
99 
100 #include "G4MicroElecElastic.hh"
102 
103 #include "G4MicroElecInelastic.hh"
105 //
106 
107 #include "G4LossTableManager.hh"
108 #include "G4EmConfigurator.hh"
109 #include "G4VEmModel.hh"
110 #include "G4DummyModel.hh"
111 #include "G4eIonisation.hh"
112 #include "G4hIonisation.hh"
113 #include "G4ionIonisation.hh"
114 #include "G4eMultipleScattering.hh"
115 #include "G4hMultipleScattering.hh"
116 #include "G4BraggModel.hh"
117 #include "G4BraggIonModel.hh"
118 #include "G4BetheBlochModel.hh"
119 #include "G4UrbanMscModel.hh"
120 #include "G4MollerBhabhaModel.hh"
121 #include "G4IonFluctuations.hh"
122 #include "G4UniversalFluctuation.hh"
123 
124 #include "G4ElectronCapture.hh"
125 
126 #include "G4UAtomicDeexcitation.hh"
127 
128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
129 
131 {
132 
134  particleIterator->reset();
135 
136  while( (*particleIterator)() )
137  {
138 
139  G4ParticleDefinition* particle = particleIterator->value();
140  G4ProcessManager* pmanager = particle->GetProcessManager();
141  G4String particleName = particle->GetParticleName();
142 
143  // *********************************
144  // 1) Processes for the World region
145  // *********************************
146 
147  if (particleName == "e-") {
148 
149  // STANDARD msc is active in the world
151  msc->AddEmModel(1, new G4UrbanMscModel());
152  pmanager->AddProcess(msc, -1, 1, -1);
153 
154  // STANDARD ionisation is active in the world
155  G4eIonisation* eion = new G4eIonisation();
156  pmanager->AddProcess(eion, -1, 2, 2);
157 
158  // MicroElec elastic is not active in the world
159  G4MicroElecElastic* theMicroElecElasticProcess = new G4MicroElecElastic("e-_G4MicroElecElastic");
160  theMicroElecElasticProcess->SetEmModel(new G4DummyModel(),1);
161  pmanager->AddDiscreteProcess(theMicroElecElasticProcess);
162 
163  // MicroElec ionisation is not active in the world
164  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("e-_G4MicroElecInelastic");
165  microelecioni->SetEmModel(new G4DummyModel(),1);
166  pmanager->AddDiscreteProcess(microelecioni);
167 
168  // THE FOLLOWING PROCESS WILL KILL ALL ELECTRONS BELOW A SELECTED ENERY THRESHOLD
169  // Capture of low-energy e-
170  G4ElectronCapture* ecap = new G4ElectronCapture("Target", 16.7*eV);
171  pmanager->AddDiscreteProcess(ecap);
172 
173  } else if ( particleName == "proton" ) {
174 
175  // STANDARD msc is active in the world
177  msc->AddEmModel(1, new G4UrbanMscModel());
178  pmanager->AddProcess(msc, -1, 1, -1);
179 
180  // STANDARD ionisation is active in the world
181  G4hIonisation* hion = new G4hIonisation();
182  pmanager->AddProcess(hion, -1, 2, 2);
183 
184  // MicroElec ionisation is not active in the world
185  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("p_G4MicroElecInelastic");
186  microelecioni->SetEmModel(new G4DummyModel(),1);
187  microelecioni->SetEmModel(new G4DummyModel(),2);
188  pmanager->AddDiscreteProcess(microelecioni);
189 
190  } else if (particleName == "GenericIon") {
191 
192  // STANDARD msc is active in the world
194  msc->AddEmModel(1, new G4UrbanMscModel());
195  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
196 
197  // STANDARD ionisation is active in the world
198  G4ionIonisation* hion = new G4ionIonisation();
199  pmanager->AddProcess(hion, -1, 2, 2);
200 
201  // MicroElec ionisation is not active in the world
202  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("ion_G4MicroElecInelastic");
203  microelecioni->SetEmModel(new G4DummyModel(),1);
204  microelecioni->SetEmModel(new G4DummyModel(),2);
205  pmanager->AddDiscreteProcess(microelecioni);
206  }
207  }
208 
209  // **************************************
210  // 2) Define processes for Target region
211  // **************************************
212 
213  // STANDARD EM processes should be inactivated when corresponding MicroElec processes are used
214  // - STANDARD EM e- processes are inactivated below 100 MeV
215  // - STANDARD EM proton & ion processes are inactivated below standEnergyLimit
216  //
218 
219  G4VEmModel* mod;
220  // *** e-
221 
222  // ---> STANDARD EM processes are inactivated below 100 MeV
223 
224  G4UrbanMscModel* msc = new G4UrbanMscModel();
226  em_config->SetExtraEmModel("e-","msc",msc,"Target");
227 
228  mod = new G4MollerBhabhaModel();
230  em_config->SetExtraEmModel("e-","eIoni",mod,"Target",0.0,10*TeV, new G4UniversalFluctuation());
231 
232  // ---> MicroElec processes activated
233 
234  mod = new G4MicroElecElasticModel();
235  em_config->SetExtraEmModel("e-","e-_G4MicroElecElastic",mod,"Target",0.0,100*MeV);
236 
237  mod = new G4MicroElecInelasticModel();
238  em_config->SetExtraEmModel("e-","e-_G4MicroElecInelastic",mod,"Target",16.7*eV,100*MeV);
239 
240  // *** proton
241 
242  // ---> STANDARD EM processes inactivated below standEnergyLimit
243 
244  // STANDARD msc is still active
245  // Inactivate following STANDARD processes
246 
247  mod = new G4BraggModel();
249  em_config->SetExtraEmModel("proton","hIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
250 
251  mod = new G4BetheBlochModel();
253  em_config->SetExtraEmModel("proton","hIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations());
254 
255  // ---> MicroElec processes activated
256  mod = new G4MicroElecInelasticModel();
258  em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",mod,"Target",0.0,10*GeV);
259  em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",new G4DummyModel,
260  "Target",10*GeV,10*TeV);
261 
262  // *** ion
263 
264  // ---> STANDARD EM processes inactivated below standEnergyLimit
265 
266  // STANDARD msc is still active
267  // Inactivate following STANDARD processes
268 
269  mod = new G4BraggIonModel();
271  em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
272 
273  mod = new G4BetheBlochModel();
275  em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations());
276 
277  // ---> MicroElec processes activated
278  mod = new G4MicroElecInelasticModel();
280  em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",mod,
281  "Target",0.0,10*GeV);
282  em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",new G4DummyModel,
283  "Target",10*GeV,10*TeV);
284 
285  // Deexcitation
286  //
289  de->SetFluo(true);
290  de->SetAuger(true);
291  de->SetPIXE(true);
292  de->InitialiseForNewRun();
293 
294 
295 }
296 
297 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
298 
300 { }
301 
302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
303 
305 {
306  if (verboseLevel >0)
307  {
308  G4cout << "PhysicsList::SetCuts:";
309  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
310  }
311 
312  // set cut values for gamma at first and for e- second and next for e+,
313  // because some processes for e+/e- need cut values for gamma
314  SetCutValue(cutForGamma, "gamma");
317  SetCutValue(cutForProton, "proton");
318 
319  if (verboseLevel>0) { DumpCutValuesTable(); }
320 }
G4EmConfigurator * EmConfigurator()
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
void SetActivationHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:738
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
void ConstructParticle()
Definition: PhysicsList.cc:117
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
void ConstructBosons()
Definition: PhysicsList.cc:64
void ConstructLeptons()
Definition: PhysicsList.cc:71
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4EmConfigurator em_config
Definition: PhysicsList.hh:65
const G4String & GetParticleName() const
G4double cutForProton
Definition: PhysicsList.hh:75
G4double cutForElectron
Definition: PhysicsList.hh:64
static constexpr double TeV
Definition: G4SIunits.hh:218
void ConstructBarions()
Definition: PhysicsList.cc:80
void SetEmModel(G4VEmModel *, G4int index=1)
void DumpCutValuesTable(G4int flag=1)
G4GLOB_DLL std::ostream G4cout
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
static constexpr double eV
Definition: G4SIunits.hh:215
void SetVerboseLevel(G4int value)
void SetCuts()
Definition: PhysicsList.cc:219
void SetActivationLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:745
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
G4ProcessManager * GetProcessManager() const
G4double cutForGamma
Definition: PhysicsList.hh:63
static constexpr double GeV
Definition: G4SIunits.hh:217
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=nullptr)
virtual void InitialiseForNewRun()=0
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
G4double cutForPositron
Definition: PhysicsList.hh:65
void ConstructProcess()
Definition: PhysicsList.cc:170
static constexpr double keV
Definition: G4SIunits.hh:216
static constexpr double micrometer
Definition: G4SIunits.hh:100
void ConstructGeneral()
Definition: PhysicsList.cc:299
void SetAtomDeexcitation(G4VAtomDeexcitation *)
void ConstructEM()
Definition: PhysicsList.cc:130
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81