Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
examples/advanced/microelectronics/src/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 {
40  cutForGamma = defaultCutValue;
41  cutForElectron = defaultCutValue;
42  cutForPositron = defaultCutValue;
43  cutForProton = defaultCutValue;
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 
130 void PhysicsList::ConstructEM()
131 {
132 
133  theParticleIterator->reset();
134 
135  while( (*theParticleIterator)() )
136  {
137 
138  G4ParticleDefinition* particle = theParticleIterator->value();
139  G4ProcessManager* pmanager = particle->GetProcessManager();
140  G4String particleName = particle->GetParticleName();
141 
142  // *********************************
143  // 1) Processes for the World region
144  // *********************************
145 
146  if (particleName == "e-") {
147 
148  // STANDARD msc is active in the world
150  pmanager->AddProcess(msc, -1, 1, 1);
151 
152  // STANDARD ionisation is active in the world
153  G4eIonisation* eion = new G4eIonisation();
154  pmanager->AddProcess(eion, -1, 2, 2);
155 
156  // MicroElec elastic is not active in the world
157  G4MicroElecElastic* theMicroElecElasticProcess = new G4MicroElecElastic("e-_G4MicroElecElastic");
158  theMicroElecElasticProcess->SetEmModel(new G4DummyModel(),1);
159  pmanager->AddDiscreteProcess(theMicroElecElasticProcess);
160 
161  // MicroElec ionisation is not active in the world
162  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("e-_G4MicroElecInelastic");
163  microelecioni->SetEmModel(new G4DummyModel(),1);
164  pmanager->AddDiscreteProcess(microelecioni);
165 
166  // THE FOLLOWING PROCESS WILL KILL ALL ELECTRONS BELOW A SELECTED ENERY THRESHOLD
167  // Capture of low-energy e-
168  G4ElectronCapture* ecap = new G4ElectronCapture("Target", 16.7*eV);
169  pmanager->AddDiscreteProcess(ecap);
170 
171  } else if ( particleName == "proton" ) {
172 
173  // STANDARD msc is active in the world
175  pmanager->AddProcess(msc, -1, 1, 1);
176 
177  // STANDARD ionisation is active in the world
178  G4hIonisation* hion = new G4hIonisation();
179  pmanager->AddProcess(hion, -1, 2, 2);
180 
181  // MicroElec ionisation is not active in the world
182  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("p_G4MicroElecInelastic");
183  microelecioni->SetEmModel(new G4DummyModel(),1);
184  microelecioni->SetEmModel(new G4DummyModel(),2);
185  pmanager->AddDiscreteProcess(microelecioni);
186 
187  } else if (particleName == "GenericIon") {
188 
189  // STANDARD msc is active in the world
190  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
191 
192  // STANDARD ionisation is active in the world
193  G4ionIonisation* hion = new G4ionIonisation();
194  pmanager->AddProcess(hion, -1, 2, 2);
195 
196  // MicroElec ionisation is not active in the world
197  G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("ion_G4MicroElecInelastic");
198  microelecioni->SetEmModel(new G4DummyModel(),1);
199  microelecioni->SetEmModel(new G4DummyModel(),2);
200  pmanager->AddDiscreteProcess(microelecioni);
201  }
202  }
203 
204  // **************************************
205  // 2) Define processes for Target region
206  // **************************************
207 
208  // STANDARD EM processes should be inactivated when corresponding MicroElec processes are used
209  // - STANDARD EM e- processes are inactivated below 100 MeV
210  // - STANDARD EM proton & ion processes are inactivated below standEnergyLimit
211  //
213 
214  G4VEmModel* mod;
215  // *** e-
216 
217  // ---> STANDARD EM processes are inactivated below 100 MeV
218 
219  G4UrbanMscModel* msc = new G4UrbanMscModel();
221  em_config->SetExtraEmModel("e-","msc",msc,"Target");
222 
223  mod = new G4MollerBhabhaModel();
224  mod->SetActivationLowEnergyLimit(99.99*MeV);
225  em_config->SetExtraEmModel("e-","eIoni",mod,"Target",0.0,10*TeV, new G4UniversalFluctuation());
226 
227  // ---> MicroElec processes activated
228 
229  mod = new G4MicroElecElasticModel();
230  em_config->SetExtraEmModel("e-","e-_G4MicroElecElastic",mod,"Target",0.0,100*MeV);
231 
232  mod = new G4MicroElecInelasticModel();
233  em_config->SetExtraEmModel("e-","e-_G4MicroElecInelastic",mod,"Target",16.7*eV,100*MeV);
234 
235  // *** proton
236 
237  // ---> STANDARD EM processes inactivated below standEnergyLimit
238 
239  // STANDARD msc is still active
240  // Inactivate following STANDARD processes
241 
242  mod = new G4BraggModel();
243  mod->SetActivationHighEnergyLimit(0.499);
244  em_config->SetExtraEmModel("proton","hIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
245 
246  mod = new G4BetheBlochModel();
247  mod->SetActivationLowEnergyLimit(0.99*GeV);
248  em_config->SetExtraEmModel("proton","hIoni",mod,"Target",2*MeV,100*GeV, new G4IonFluctuations());
249 
250  // ---> MicroElec processes activated
251  mod = new G4MicroElecInelasticModel();
252  em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",mod,"Target",50*keV,10*GeV);
253 
254  // *** ion
255 
256  // ---> STANDARD EM processes inactivated below standEnergyLimit
257 
258  // STANDARD msc is still active
259  // Inactivate following STANDARD processes
260 
261  mod = new G4BraggIonModel();
263  em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations());
264 
265  mod = new G4BetheBlochModel();
266  mod->SetActivationLowEnergyLimit(0.99*GeV);
267  em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",2*MeV,100*GeV, new G4IonFluctuations());
268 
269  // ---> MicroElec processes activated
270  mod = new G4MicroElecInelasticModel();
271  em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",mod,"Target",50*keV,10*GeV);
272 
273  // Deexcitation
274  //
277  de->SetFluo(true);
278  de->SetAuger(true);
279  de->SetPIXE(true);
280  de->InitialiseForNewRun();
281 
282 
283 }
284 
285 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
286 
288 { }
289 
290 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
291 
293 {
294  if (verboseLevel >0)
295  {
296  G4cout << "PhysicsList::SetCuts:";
297  G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
298  }
299 
300  // set cut values for gamma at first and for e- second and next for e+,
301  // because some processes for e+/e- need cut values for gamma
302  SetCutValue(cutForGamma, "gamma");
303  SetCutValue(cutForElectron, "e-");
304  SetCutValue(cutForPositron, "e+");
305  SetCutValue(cutForProton, "proton");
306 
307  if (verboseLevel>0) { DumpCutValuesTable(); }
308 }
G4EmConfigurator * EmConfigurator()
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
void SetActivationHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:697
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
static G4LossTableManager * Instance()
void SetCutValue(G4double aCut, const G4String &pname)
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
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)
void SetVerboseLevel(G4int value)
void SetActivationLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:704
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
virtual void InitialiseForNewRun()=0
#define G4endl
Definition: G4ios.hh:61
int micrometer
Definition: hepunit.py:34
void SetAtomDeexcitation(G4VAtomDeexcitation *)
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=0)
#define theParticleIterator
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81