Loading...
Searching...
No Matches
G4EmPenelopePhysicsMI.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// $Id: G4EmPenelopePhysicsMI.cc 109526 2018-04-30 07:11:52Z gcosmo $
27// customized by gpaterno for MI in Rayleigh Scattering, March 2019
28//
29//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30
32#include "G4ParticleDefinition.hh"
33#include "G4SystemOfUnits.hh"
34#include "G4ParticleTable.hh"
35
36//Processes and models
37//gamma
38#include "G4PhotoElectricEffect.hh"
39#include "G4PenelopePhotoElectricModel.hh"
40
41#include "G4ComptonScattering.hh"
42#include "G4PenelopeComptonModel.hh"
43
44#include "G4GammaConversion.hh"
45#include "G4PenelopeGammaConversionModel.hh"
46
47#include "G4RayleighScattering.hh"
48#include "G4PenelopeRayleighModel.hh"
49#include "G4PenelopeRayleighModelMI.hh"
50
51//e- and e+
52#include "G4eMultipleScattering.hh"
53#include "G4UniversalFluctuation.hh"
54
55#include "G4eIonisation.hh"
56#include "G4PenelopeIonisationModel.hh"
57
58#include "G4eBremsstrahlung.hh"
59#include "G4PenelopeBremsstrahlungModel.hh"
60
61//e+ only
62#include "G4eplusAnnihilation.hh"
63#include "G4PenelopeAnnihilationModel.hh"
64
65//mu
66#include "G4MuMultipleScattering.hh"
67#include "G4MuIonisation.hh"
68#include "G4MuBremsstrahlung.hh"
69#include "G4MuPairProduction.hh"
70
71#include "G4MuBremsstrahlungModel.hh"
72#include "G4MuPairProductionModel.hh"
73#include "G4hBremsstrahlungModel.hh"
74#include "G4hPairProductionModel.hh"
75
76//hadrons
77#include "G4hMultipleScattering.hh"
78#include "G4MscStepLimitType.hh"
79
80#include "G4hBremsstrahlung.hh"
81#include "G4hPairProduction.hh"
82
83#include "G4hIonisation.hh"
84#include "G4ionIonisation.hh"
85#include "G4IonParametrisedLossModel.hh"
86#include "G4NuclearStopping.hh"
87
88//msc models
89#include "G4UrbanMscModel.hh"
90#include "G4GoudsmitSaundersonMscModel.hh"
91#include "G4WentzelVIModel.hh"
92#include "G4CoulombScattering.hh"
93#include "G4eCoulombScatteringModel.hh"
94
95#include "G4LossTableManager.hh"
96#include "G4VAtomDeexcitation.hh"
97#include "G4UAtomicDeexcitation.hh"
98
99//particles
100#include "G4Gamma.hh"
101#include "G4Electron.hh"
102#include "G4Positron.hh"
103#include "G4MuonPlus.hh"
104#include "G4MuonMinus.hh"
105#include "G4PionPlus.hh"
106#include "G4PionMinus.hh"
107#include "G4KaonPlus.hh"
108#include "G4KaonMinus.hh"
109#include "G4Proton.hh"
110#include "G4AntiProton.hh"
111#include "G4Deuteron.hh"
112#include "G4Triton.hh"
113#include "G4He3.hh"
114#include "G4Alpha.hh"
115#include "G4GenericIon.hh"
116
117#include "G4PhysicsListHelper.hh"
118#include "G4BuilderType.hh"
119#include "G4EmModelActivator.hh"
120
121//factory
122#include "G4PhysicsConstructorFactory.hh"
123
125
126//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127
129 G4bool UseMIFlag):
130 G4VPhysicsConstructor("G4EmPenelopeMI"), fVerbose(ver),fUseMIFlag(UseMIFlag)
131{
132 G4EmParameters* param = G4EmParameters::Instance();
133 param->SetDefaults();
134 param->SetVerbose(fVerbose);
135 param->SetMinEnergy(100*eV);
136 param->SetLowestElectronEnergy(100*eV);
137 param->SetNumberOfBinsPerDecade(20);
138 param->SetMscRangeFactor(0.02);
139 param->SetMscStepLimitType(fUseDistanceToBoundary);
140 param->SetMuHadLateralDisplacement(true);
141 param->SetFluo(true);
142 param->SetPIXEElectronCrossSectionModel("Penelope");
143 SetPhysicsType(bElectromagnetic);
144}
145
146//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
147
150
151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152
154{
155 //gamma
156 G4Gamma::Gamma();
157
158 //leptons
159 G4Electron::Electron();
160 G4Positron::Positron();
161 G4MuonPlus::MuonPlus();
162 G4MuonMinus::MuonMinus();
163
164 //mesons
165 G4PionPlus::PionPlusDefinition();
166 G4PionMinus::PionMinusDefinition();
167 G4KaonPlus::KaonPlusDefinition();
168 G4KaonMinus::KaonMinusDefinition();
169
170 //baryons
171 G4Proton::Proton();
172 G4AntiProton::AntiProton();
173
174 //ions
175 G4Deuteron::Deuteron();
176 G4Triton::Triton();
177 G4He3::He3();
178 G4Alpha::Alpha();
179 G4GenericIon::GenericIonDefinition();
180}
181
182//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183
185{
186 if(fVerbose > 1) {
187 G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
188 }
189
190 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
191
192 //muon & hadron bremsstrahlung and pair production
201
202 //muon & hadron multiple scattering
204 mumsc->SetEmModel(new G4WentzelVIModel());
205 G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
206
207 //high energy limit for e+- scattering models
208 G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
209
210 //nuclear stopping
212
213 //Applicability range for Penelope models
214 //for higher energies, the Standard models are used
215 G4double PenelopeHighEnergyLimit = 1.0*GeV;
216
217 //Add Penelope EM Processes
218 G4ParticleTable* table = G4ParticleTable::GetParticleTable();
219 for (const auto& particleName : fPartList.PartNames()) {
220 G4ParticleDefinition* particle = table->FindParticle(particleName);
221 if (!particle) { continue; }
222 if (particleName == "gamma") {
223
224 //Photo-electric effect
225 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
226 G4PenelopePhotoElectricModel* thePEPenelopeModel = new
228 thePEPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
229 thePhotoElectricEffect->SetEmModel(thePEPenelopeModel);
230 ph->RegisterProcess(thePhotoElectricEffect, particle);
231
232 //Compton scattering
233 G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
234 G4PenelopeComptonModel* theComptonPenelopeModel =
236 theComptonPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
237 theComptonScattering->SetEmModel(theComptonPenelopeModel);
238 ph->RegisterProcess(theComptonScattering, particle);
239
240 //Gamma conversion
241 G4GammaConversion* theGammaConversion = new G4GammaConversion();
242 G4PenelopeGammaConversionModel* theGCPenelopeModel =
244 theGammaConversion->SetEmModel(theGCPenelopeModel);
245 ph->RegisterProcess(theGammaConversion, particle);
246
247 //Rayleigh scattering (modified by gpaterno)
248 G4RayleighScattering* theRayleigh = new G4RayleighScattering();
249 G4PenelopeRayleighModelMI* theRayleighPenelopeModel =
251 theRayleighPenelopeModel->SetVerbosityLevel(1);
252 theRayleighPenelopeModel->SetMIActive(fUseMIFlag);
253 //theRayleighPenelopeModel->SetHighEnergyLimit(PenelopeHighEnergyLimit);
254 theRayleigh->SetEmModel(theRayleighPenelopeModel);
255 ph->RegisterProcess(theRayleigh, particle);
256
257 } else if (particleName == "e-") {
258
259 //multiple scattering
261 G4UrbanMscModel* msc1 = new G4UrbanMscModel();
263 msc1->SetHighEnergyLimit(highEnergyLimit);
264 msc2->SetLowEnergyLimit(highEnergyLimit);
265 msc->SetEmModel(msc1);
266 msc->SetEmModel(msc2);
267
270 ss->SetEmModel(ssm);
271 ss->SetMinKinEnergy(highEnergyLimit);
272 ssm->SetLowEnergyLimit(highEnergyLimit);
273 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
274
275 //Ionisation
276 G4eIonisation* eIoni = new G4eIonisation();
277 G4PenelopeIonisationModel* theIoniPenelope =
279 theIoniPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
280 eIoni->AddEmModel(0,theIoniPenelope,new G4UniversalFluctuation());
281 eIoni->SetStepFunction(0.2, 100*um); //
282
283 //Bremsstrahlung
285 G4PenelopeBremsstrahlungModel* theBremPenelope =
287 theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
288 eBrem->SetEmModel(theBremPenelope);
289
290 //register processes
291 ph->RegisterProcess(msc, particle);
292 ph->RegisterProcess(eIoni, particle);
293 ph->RegisterProcess(eBrem, particle);
294 ph->RegisterProcess(ss, particle);
295
296 } else if (particleName == "e+") {
297
298 //multiple scattering
300 G4UrbanMscModel* msc1 = new G4UrbanMscModel();
302 msc1->SetHighEnergyLimit(highEnergyLimit);
303 msc2->SetLowEnergyLimit(highEnergyLimit);
304 msc->SetEmModel(msc1);
305 msc->SetEmModel(msc2);
306
309 ss->SetEmModel(ssm);
310 ss->SetMinKinEnergy(highEnergyLimit);
311 ssm->SetLowEnergyLimit(highEnergyLimit);
312 ssm->SetActivationLowEnergyLimit(highEnergyLimit);
313
314 //Ionisation
315 G4eIonisation* eIoni = new G4eIonisation();
316 G4PenelopeIonisationModel* theIoniPenelope =
318 theIoniPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
319 eIoni->AddEmModel(0,theIoniPenelope,new G4UniversalFluctuation());
320 eIoni->SetStepFunction(0.2, 100*um); //
321
322 //Bremsstrahlung
324 G4PenelopeBremsstrahlungModel* theBremPenelope =
326 theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
327 eBrem->SetEmModel(theBremPenelope);
328
329 //Annihilation
331 G4PenelopeAnnihilationModel* theAnnPenelope =
333 theAnnPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
334 eAnni->AddEmModel(0, theAnnPenelope);
335
336 //register processes
337 ph->RegisterProcess(msc, particle);
338 ph->RegisterProcess(eIoni, particle);
339 ph->RegisterProcess(eBrem, particle);
340 ph->RegisterProcess(eAnni, particle);
341 ph->RegisterProcess(ss, particle);
342
343 } else if (particleName == "mu+" ||particleName == "mu-") {
344
345 G4MuIonisation* muIoni = new G4MuIonisation();
346 muIoni->SetStepFunction(0.2, 50*um);
347
348 ph->RegisterProcess(mumsc, particle);
349 ph->RegisterProcess(muIoni, particle);
350 ph->RegisterProcess(mub, particle);
351 ph->RegisterProcess(mup, particle);
352 ph->RegisterProcess(new G4CoulombScattering(), particle);
353
354 } else if (particleName == "alpha" || particleName == "He3") {
355
357 G4ionIonisation* ionIoni = new G4ionIonisation();
358 ionIoni->SetStepFunction(0.1, 10*um);
359
360 ph->RegisterProcess(msc, particle);
361 ph->RegisterProcess(ionIoni, particle);
362 ph->RegisterProcess(pnuc, particle);
363
364 } else if (particleName == "GenericIon") {
365
366 G4ionIonisation* ionIoni = new G4ionIonisation();
367 ionIoni->SetEmModel(new G4IonParametrisedLossModel());
368 ionIoni->SetStepFunction(0.1, 1*um);
369
370 ph->RegisterProcess(hmsc, particle);
371 ph->RegisterProcess(ionIoni, particle);
372 ph->RegisterProcess(pnuc, particle);
373
374 } else if (particleName == "pi+" || particleName == "pi-" ) {
375
377 G4hIonisation* hIoni = new G4hIonisation();
378 hIoni->SetStepFunction(0.2, 50*um);
379
380 ph->RegisterProcess(pimsc, particle);
381 ph->RegisterProcess(hIoni, particle);
382 ph->RegisterProcess(pib, particle);
383 ph->RegisterProcess(pip, particle);
384
385 } else if (particleName == "kaon+" || particleName == "kaon-" ) {
386
388 G4hIonisation* hIoni = new G4hIonisation();
389 hIoni->SetStepFunction(0.2, 50*um);
390
391 ph->RegisterProcess(kmsc, particle);
392 ph->RegisterProcess(hIoni, particle);
393 ph->RegisterProcess(kb, particle);
394 ph->RegisterProcess(kp, particle);
395
396 } else if (particleName == "proton" || particleName == "anti_proton") {
397
399 G4hIonisation* hIoni = new G4hIonisation();
400 hIoni->SetStepFunction(0.2, 50*um);
401
402 ph->RegisterProcess(pmsc, particle);
403 ph->RegisterProcess(hIoni, particle);
404 ph->RegisterProcess(pb, particle);
405 ph->RegisterProcess(pp, particle);
406 ph->RegisterProcess(pnuc, particle);
407
408 } else if (particleName == "B+" ||
409 particleName == "B-" ||
410 particleName == "D+" ||
411 particleName == "D-" ||
412 particleName == "Ds+" ||
413 particleName == "Ds-" ||
414 particleName == "anti_He3" ||
415 particleName == "anti_alpha" ||
416 particleName == "anti_deuteron" ||
417 particleName == "anti_lambda_c+" ||
418 particleName == "anti_omega-" ||
419 particleName == "anti_sigma_c+" ||
420 particleName == "anti_sigma_c++" ||
421 particleName == "anti_sigma+" ||
422 particleName == "anti_sigma-" ||
423 particleName == "anti_triton" ||
424 particleName == "anti_xi_c+" ||
425 particleName == "anti_xi-" ||
426 particleName == "deuteron" ||
427 particleName == "lambda_c+" ||
428 particleName == "omega-" ||
429 particleName == "sigma_c+" ||
430 particleName == "sigma_c++" ||
431 particleName == "sigma+" ||
432 particleName == "sigma-" ||
433 particleName == "tau+" ||
434 particleName == "tau-" ||
435 particleName == "triton" ||
436 particleName == "xi_c+" ||
437 particleName == "xi-" ) {
438
439 ph->RegisterProcess(hmsc, particle);
440 ph->RegisterProcess(new G4hIonisation(), particle);
441 }
442 }
443
444 //Nuclear stopping
445 pnuc->SetMaxKinEnergy(MeV);
446
447 //Deexcitation
448 G4VAtomDeexcitation* deexcitation = new G4UAtomicDeexcitation();
449 G4LossTableManager::Instance()->SetAtomDeexcitation(deexcitation);
450
451 G4EmModelActivator mact(GetPhysicsName());
452}
453
454//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4_DECLARE_PHYSCONSTR_FACTORY(G4EmPenelopePhysicsMI)
G4EmPenelopePhysicsMI(G4int ver=1, const G4String &name="", G4bool useMI=true)

Applications | User Support | Publications | Collaboration