Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4EmModelActivator.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: G4EmModelActivator.cc 1651 2015-05-02 16:40:24Z vnivanch $
27 // GEANT4 tag $Name$
28 //
29 //---------------------------------------------------------------------------
30 //
31 // ClassName: G4EmModelActivator
32 //
33 // Author: V.Ivanchenko 01.06.2015
34 //
35 // Organisation: G4AI
36 // Contract: ESA contract 4000107387/12/NL/AT
37 // Customer: ESA/ESTEC
38 //
39 // Modified:
40 //
41 //----------------------------------------------------------------------------
42 //
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46 
47 #include "G4EmModelActivator.hh"
48 #include "G4EmParameters.hh"
49 #include "G4ParticleDefinition.hh"
50 #include "G4ParticleTable.hh"
51 #include "G4RegionStore.hh"
52 #include "G4Region.hh"
53 #include "G4VEnergyLossProcess.hh"
54 #include "G4LossTableManager.hh"
55 #include "G4EmConfigurator.hh"
56 #include "G4PAIModel.hh"
57 #include "G4PAIPhotModel.hh"
58 #include "G4Gamma.hh"
59 #include "G4Electron.hh"
60 #include "G4Positron.hh"
61 #include "G4MuonPlus.hh"
62 #include "G4MuonMinus.hh"
63 #include "G4Proton.hh"
64 #include "G4GenericIon.hh"
65 #include "G4Alpha.hh"
66 #include "G4ProcessManager.hh"
67 #include "G4DummyModel.hh"
68 #include "G4EmProcessSubType.hh"
69 #include "G4PhysicsListHelper.hh"
70 
71 #include "G4MicroElecElastic.hh"
73 
74 #include "G4MicroElecInelastic.hh"
76 
77 #include "G4BraggModel.hh"
78 #include "G4BraggIonModel.hh"
79 #include "G4BetheBlochModel.hh"
80 #include "G4UrbanMscModel.hh"
81 #include "G4MollerBhabhaModel.hh"
82 #include "G4IonFluctuations.hh"
84 #include "G4LowECapture.hh"
85 #include "G4hMultipleScattering.hh"
88 #include "G4ionIonisation.hh"
89 
90 #include "G4CoulombScattering.hh"
92 #include "G4WentzelVIModel.hh"
94 #include "G4RayleighScattering.hh"
95 #include "G4UrbanMscModel.hh"
97 
104 
106 #include "G4PenelopeComptonModel.hh"
112 
113 #include "G4SystemOfUnits.hh"
114 #include "G4Threading.hh"
115 #include <vector>
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118 
120  : baseName(emphys)
121 {
122  theParameters = G4EmParameters::Instance();
123 
124  const std::vector<G4String> regnamesPAI = theParameters->RegionsPAI();
125  if(regnamesPAI.size() > 0)
126  {
127  ActivatePAI();
128  }
129  const std::vector<G4String> regnamesME = theParameters->RegionsMicroElec();
130  if(regnamesME.size() > 0)
131  {
132  ActivateMicroElec();
133  }
134  const std::vector<G4String> regnamesMSC = theParameters->RegionsMsc();
135  if(regnamesMSC.size() > 0)
136  {
137  ActivateEmOptions();
138  }
139 }
140 
141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142 
143 void G4EmModelActivator::ActivateEmOptions()
144 {
145  const std::vector<G4String> regnamesMSC = theParameters->RegionsMsc();
146  G4int nreg = regnamesMSC.size();
147  if(0 == nreg) { return; }
148  G4int verbose = theParameters->Verbose() - 1;
149  if(verbose > 0) {
150  G4cout << "### G4EmModelActivator::ActivateEmOptions for " << nreg << " regions"
151  << G4endl;
152  }
153  const std::vector<G4String> typesMSC = theParameters->TypesMsc();
154 
155  // start configuration of models
158  const G4ParticleDefinition* phot = G4Gamma::Gamma();
160  G4EmConfigurator* em_config = man->EmConfigurator();
161  G4VAtomDeexcitation* adeexc = man->AtomDeexcitation();
162  G4VEmModel* mod;
163 
164  for(G4int i=0; i<nreg; ++i) {
165  G4String reg = regnamesMSC[i];
166  if(verbose > 0) {
167  G4cout << i << ". region <" << reg << ">; type <" << typesMSC[i] << "> "
168  << G4endl;
169  }
170 
171  if(baseName == typesMSC[i]) { continue; }
172 
173  if("G4EmStandard" == typesMSC[i]) {
174  G4UrbanMscModel* msc = new G4UrbanMscModel();
175  msc->SetLocked(true);
176  em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
177  msc = new G4UrbanMscModel();
178  msc->SetLocked(true);
179  em_config->SetExtraEmModel("e+", "msc", msc, reg, 0.0, 100*MeV);
180 
181  } else if("G4EmStandard_opt1" == typesMSC[i] ||
182  "G4EmStandard_opt2" == typesMSC[i]) {
183  G4UrbanMscModel* msc = new G4UrbanMscModel();
185  msc->SetRangeFactor(0.2);
186  msc->SetLocked(true);
187  em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
188  msc = new G4UrbanMscModel();
190  msc->SetRangeFactor(0.2);
191  msc->SetLocked(true);
192  em_config->SetExtraEmModel("e+", "msc", msc, reg, 0.0, 100*MeV);
193 
194  } else if("G4EmStandard_opt3" == typesMSC[i]) {
195  G4UrbanMscModel* msc = new G4UrbanMscModel();
197  msc->SetLocked(true);
198  em_config->SetExtraEmModel("e-", "msc", msc, reg);
199  msc = new G4UrbanMscModel();
201  msc->SetLocked(true);
202  em_config->SetExtraEmModel("e+", "msc", msc, reg);
203  msc = new G4UrbanMscModel();
205  msc->SetRangeFactor(0.2);
206  msc->SetLocked(true);
207  em_config->SetExtraEmModel("proton", "msc", msc, reg);
209  theParameters->SetDeexActiveRegion(reg, true, false, false);
210  }
211  theParameters->DefineRegParamForDeex(adeexc);
212  FindOrAddProcess(phot, "Rayl");
213  mod = new G4LivermoreRayleighModel();
214  em_config->SetExtraEmModel("gamma", "Rayl", mod, reg);
215 
216  } else if("G4EmStandard_opt4" == typesMSC[i]) {
217  G4UrbanMscModel* msc = new G4UrbanMscModel();
219  msc->SetRangeFactor(0.02);
220  msc->SetLocked(true);
221  em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
222  msc = new G4UrbanMscModel();
224  msc->SetRangeFactor(0.02);
225  msc->SetLocked(true);
226  em_config->SetExtraEmModel("e+", "msc", msc, reg, 0.0, 100*MeV);
228  theParameters->SetDeexActiveRegion(reg, true, false, false);
229  }
230  theParameters->DefineRegParamForDeex(adeexc);
231  FindOrAddProcess(phot, "Rayl");
232  mod = new G4LivermoreRayleighModel();
233  em_config->SetExtraEmModel("gamma", "Rayl", mod, reg);
234 
235  } else if("G4EmStandardGS" == typesMSC[i]) {
238  msc->SetRangeFactor(0.1);
239  msc->SetLocked(true);
240  em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
241  msc = new G4GoudsmitSaundersonMscModel();
243  msc->SetRangeFactor(0.1);
244  msc->SetLocked(true);
245  em_config->SetExtraEmModel("e+", "msc", msc, reg, 0.0, 100*MeV);
246 
247  } else if("G4EmStandardWVI" == typesMSC[i]) {
248  G4WentzelVIModel* msc = new G4WentzelVIModel();
249  msc->SetLocked(true);
250  em_config->SetExtraEmModel("e-", "msc", msc, reg, 0.0, 100*MeV);
251  msc = new G4WentzelVIModel();
252  msc->SetLocked(true);
253  em_config->SetExtraEmModel("e+", "msc", msc, reg, 0.0, 100*MeV);
254 
255  FindOrAddProcess(elec, "CoulombScat");
256  FindOrAddProcess(posi, "CoulombScat");
257  mod = new G4eCoulombScatteringModel();
258  em_config->SetExtraEmModel("e-", "CoulombScat", mod, reg, 0.0, 100*MeV);
259  mod = new G4eCoulombScatteringModel();
260  em_config->SetExtraEmModel("e+", "CoulombScat", mod, reg, 0.0, 100*MeV);
261 
263  theParameters->SetDeexActiveRegion(regnamesMSC[i], true, false, false);
264  }
265  theParameters->DefineRegParamForDeex(adeexc);
266 
267  } else if("G4EmStandardSS" == typesMSC[i] &&
268  baseName != "G4EmStandard_opt3") {
270  sc->SetPolarAngleLimit(0.0);
271  sc->SetLocked(true);
272  em_config->SetExtraEmModel("e-", "CoulombScat", sc, reg);
273 
274  sc = new G4eCoulombScatteringModel();
275  sc->SetPolarAngleLimit(0.0);
276  sc->SetLocked(true);
277  em_config->SetExtraEmModel("e+", "CoulombScat", sc, reg);
278 
279  sc = new G4eCoulombScatteringModel();
280  sc->SetPolarAngleLimit(0.0);
281  sc->SetLocked(true);
282  em_config->SetExtraEmModel("mu+", "CoulombScat", sc, reg);
283 
284  sc = new G4eCoulombScatteringModel();
285  sc->SetPolarAngleLimit(0.0);
286  sc->SetLocked(true);
287  em_config->SetExtraEmModel("pi+", "CoulombScat", sc, reg);
288 
289  sc = new G4eCoulombScatteringModel();
290  sc->SetPolarAngleLimit(0.0);
291  sc->SetLocked(true);
292  em_config->SetExtraEmModel("kaon+", "CoulombScat", sc, reg);
293 
294  sc = new G4eCoulombScatteringModel();
295  sc->SetPolarAngleLimit(0.0);
296  sc->SetLocked(true);
297  em_config->SetExtraEmModel("proton", "CoulombScat", sc, reg);
298 
300  theParameters->SetDeexActiveRegion(regnamesMSC[i], true, true, true);
301  }
302  theParameters->DefineRegParamForDeex(adeexc);
303 
304  } else if("G4EmLivermore" == typesMSC[i]) {
305 
306  mod = new G4LivermorePhotoElectricModel();
307  em_config->SetExtraEmModel("gamma", "phot", mod, reg);
308  mod = new G4LivermoreComptonModel();
309  em_config->SetExtraEmModel("gamma", "compt", mod, reg);
311  em_config->SetExtraEmModel("gamma", "conv", mod, reg);
312 
313  FindOrAddProcess(phot, "Rayl");
314  mod = new G4LivermoreRayleighModel();
315  em_config->SetExtraEmModel("gamma", "Rayl", mod, reg);
316 
317  mod = new G4LivermoreIonisationModel();
319  em_config->SetExtraEmModel("e-", "eIoni", mod, reg, 0.0, 0.1*MeV, uf);
320  mod = new G4LivermoreBremsstrahlungModel();
321  em_config->SetExtraEmModel("e-", "eBrem", mod, reg, 0.0, 1*GeV);
322 
324  theParameters->SetDeexActiveRegion(regnamesMSC[i], true, false, false);
325  }
326  theParameters->DefineRegParamForDeex(adeexc);
327 
328  } else if("G4EmPenelope" == typesMSC[i]) {
329  mod = new G4PenelopePhotoElectricModel();
330  em_config->SetExtraEmModel("gamma", "phot", mod, reg);
331  mod = new G4PenelopeComptonModel();
332  em_config->SetExtraEmModel("gamma", "compt", mod, reg);
333  mod = new G4PenelopeGammaConversionModel();
334  em_config->SetExtraEmModel("gamma", "conv", mod, reg);
335 
336  FindOrAddProcess(phot, "Rayl");
337  mod = new G4PenelopeRayleighModel();
338  em_config->SetExtraEmModel("gamma", "Rayl", mod, reg);
339 
340  mod = new G4PenelopeIonisationModel();
342  em_config->SetExtraEmModel("e-", "eIoni", mod, reg, 0.0, 1*GeV, uf);
343  mod = new G4PenelopeBremsstrahlungModel();
344  em_config->SetExtraEmModel("e-", "eBrem", mod, reg, 0.0, 1*GeV);
345 
346  mod = new G4PenelopeIonisationModel();
347  uf = new G4UniversalFluctuation();
348  em_config->SetExtraEmModel("e+", "eIoni", mod, reg, 0.0, 1*GeV, uf);
349  mod = new G4PenelopeBremsstrahlungModel();
350  em_config->SetExtraEmModel("e+", "eBrem", mod, reg, 0.0, 1*GeV);
351  mod = new G4PenelopeAnnihilationModel();
352  em_config->SetExtraEmModel("e+", "annihil", mod, reg, 0.0, 1*GeV);
353 
355  theParameters->SetDeexActiveRegion(regnamesMSC[i], true, false, false);
356  }
357  theParameters->DefineRegParamForDeex(adeexc);
358 
359  } else if("G4RadioactiveDecay" == typesMSC[i]) {
360 
362  theParameters->SetFluo(true);
363  theParameters->SetAuger(true);
364  theParameters->SetAugerCascade(true);
365  theParameters->SetDeexcitationIgnoreCut(true);
366  }
367  theParameters->DefineRegParamForDeex(adeexc);
368 
369  } else {
370  if(verbose > 0 && G4Threading::IsMasterThread()) {
371  G4cout << "### G4EmModelActivator::ActivateEmOptions WARNING: \n"
372  << " EM Physics configuration name <" << typesMSC[i]
373  << "> is not known - ignored" << G4endl;
374  }
375  }
376  }
377 }
378 
379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
380 
381 void G4EmModelActivator::ActivatePAI()
382 {
383  const std::vector<G4String> regnamesPAI = theParameters->RegionsPAI();
384  G4int nreg = regnamesPAI.size();
385  if(0 == nreg) { return; }
386  G4int verbose = theParameters->Verbose() - 1;
387  if(verbose > 0) {
388  G4cout << "### G4EmModelActivator::ActivatePAI for " << nreg << " regions"
389  << G4endl;
390  }
391  const std::vector<G4String> particlesPAI = theParameters->ParticlesPAI();
392  const std::vector<G4String> typesPAI = theParameters->TypesPAI();
393 
394  const std::vector<G4VEnergyLossProcess*>& v = G4LossTableManager::Instance()
396  std::vector<G4VEnergyLossProcess*>::const_iterator itr;
397  G4RegionStore* regionStore = G4RegionStore::GetInstance();
398 
404 
405  for(G4int i = 0; i < nreg; ++i) {
406  const G4ParticleDefinition* p = nullptr;
407  if(particlesPAI[i] != "all") {
408  p = G4ParticleTable::GetParticleTable()->FindParticle(particlesPAI[i]);
409  if(!p) {
410  G4cout << "### WARNING: ActivatePAI::FindParticle fails to find "
411  << particlesPAI[i] << G4endl;
412  continue;
413  }
414  }
415  const G4Region* r = regionStore->GetRegion(regnamesPAI[i], false);
416  if(!r) {
417  G4cout << "### WARNING: ActivatePAI::GetRegion fails to find "
418  << regnamesPAI[i] << G4endl;
419  continue;
420  }
421 
422  G4String name = "hIoni";
423  if(p == elec || p == posi)
424  { name = "eIoni"; }
425  else if (p == mupl || p == mumi)
426  { name = "muIoni"; }
427  else if (p == gion)
428  { name = "ionIoni"; }
429 
430  for(itr = v.begin(); itr != v.end(); ++itr) {
431 
432  G4VEnergyLossProcess* proc = *itr;
433  if(!proc->IsIonisationProcess()) { continue; }
434 
435  G4String namep = proc->GetProcessName();
436  if(p) {
437  if(name != namep) { continue; }
438  } else {
439  if(namep != "hIoni" && namep != "muIoni" && namep != "eIoni")
440  { continue; }
441  }
442  G4VEmModel* em = nullptr;
443  G4VEmFluctuationModel* fm = nullptr;
444  if(typesPAI[i] == "PAIphoton") {
445  G4PAIPhotModel* mod = new G4PAIPhotModel(p,"PAIPhotModel");
446  em = mod;
447  fm = mod;
448  } else {
449  G4PAIModel* mod = new G4PAIModel(p,"PAIModel");
450  em = mod;
451  fm = mod;
452  }
453  proc->AddEmModel(0, em, fm, r);
454  if(verbose > 0) {
455  G4cout << "### G4EmModelActivator: add <" << typesPAI[i]
456  << "> model for " << particlesPAI[i]
457  << " in the " << regnamesPAI[i] << G4endl;
458  }
459  }
460  }
461 }
462 
463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
464 
465 void G4EmModelActivator::ActivateMicroElec()
466 {
467  const std::vector<G4String> regnamesME = theParameters->RegionsMicroElec();
468  G4int nreg = regnamesME.size();
469  if(0 == nreg)
470  {
471  return;
472  }
473  G4int verbose = theParameters->Verbose() - 1;
474  if(verbose > 0)
475  {
476  G4cout << "### G4EmModelActivator::ActivateMicroElec for " << nreg
477  << " regions" << G4endl;
478  }
480 
482  const G4ParticleDefinition* prot = G4Proton::Proton();
484  G4ProcessManager* eman = elec->GetProcessManager();
485  G4ProcessManager* pman = prot->GetProcessManager();
486  G4ProcessManager* iman = gion->GetProcessManager();
487 
488  G4bool emsc = HasMsc(eman);
489 
490  // MicroElec elastic is not active in the world
491  G4MicroElecElastic* eElasProc =
492  new G4MicroElecElastic("e-G4MicroElecElastic");
493  eman->AddDiscreteProcess(eElasProc);
494 
495  G4MicroElecInelastic* eInelProc =
496  new G4MicroElecInelastic("e-G4MicroElecInelastic");
497  eman->AddDiscreteProcess(eInelProc);
498 
499  G4MicroElecInelastic* pInelProc =
500  new G4MicroElecInelastic("p_G4MicroElecInelastic");
501  pman->AddDiscreteProcess(pInelProc);
502 
503  G4MicroElecInelastic* iInelProc =
504  new G4MicroElecInelastic("ion_G4MicroElecInelastic");
505  iman->AddDiscreteProcess(iInelProc);
506 
507  // start configuration of models
508  G4EmConfigurator* em_config = man->EmConfigurator();
509  G4VEmModel* mod;
510 
511  // limits for MicroElec applicability
512  G4double elowest = 16.7 * eV;
513  G4double elimel = 100 * MeV;
514  G4double elimin = 9 * MeV;
515  G4double pmin = 50 * keV;
516  G4double pmax = 99.9 * MeV;
517 
518  G4LowECapture* ecap = new G4LowECapture(elowest);
519  eman->AddDiscreteProcess(ecap);
520 
521  for(G4int i = 0; i < nreg; ++i)
522  {
523 
524  G4String reg = regnamesME[i];
525  G4cout << "### MicroElec models are activated for G4Region " << reg
526  << G4endl
527  << " Energy limits for e- elastic: " << elowest/eV << " eV - "
528  << elimel/MeV << " MeV"
529  << G4endl
530  << " Energy limits for e- inelastic: " << elowest/eV << " eV - "
531  << elimin/MeV << " MeV"
532  << G4endl
533  << " Energy limits for hadrons/ions: " << pmin/MeV << " MeV - "
534  << pmax/MeV << " MeV"
535  << G4endl;
536 
537  // e-
538  if(emsc)
539  {
540  G4UrbanMscModel* msc = new G4UrbanMscModel();
541  msc->SetActivationLowEnergyLimit(elimel);
542  em_config->SetExtraEmModel("e-", "msc", msc, reg);
543  }
544  else
545  {
546  mod = new G4DummyModel();
547  em_config->SetExtraEmModel("e-", "CoulombScat", mod, reg, 0.0, elimel);
548  }
549 
550  mod = new G4MicroElecElasticModel();
551  em_config->SetExtraEmModel("e-",
552  "e-G4MicroElecElastic",
553  mod,
554  reg,
555  elowest,
556  elimin);
557 
558  mod = new G4MollerBhabhaModel();
559  mod->SetActivationLowEnergyLimit(elimin);
560  em_config->SetExtraEmModel("e-",
561  "eIoni",
562  mod,
563  reg,
564  0.0,
565  10 * TeV,
566  new G4UniversalFluctuation());
567 
568  mod = new G4MicroElecInelasticModel();
569  em_config->SetExtraEmModel("e-",
570  "e-G4MicroElecInelastic",
571  mod,
572  reg,
573  elowest,
574  elimin);
575 
576  // proton
577  mod = new G4BraggModel();
578  mod->SetActivationHighEnergyLimit(pmin);
579  em_config->SetExtraEmModel("proton",
580  "hIoni",
581  mod,
582  reg,
583  0.0,
584  2 * MeV,
585  new G4UniversalFluctuation());
586 
587  mod = new G4BetheBlochModel();
588  mod->SetActivationLowEnergyLimit(pmax);
589  em_config->SetExtraEmModel("proton",
590  "hIoni",
591  mod,
592  reg,
593  2 * MeV,
594  10 * TeV,
595  new G4UniversalFluctuation());
596 
597  mod = new G4MicroElecInelasticModel();
598  em_config->SetExtraEmModel("proton",
599  "p_G4MicroElecInelastic",
600  mod,
601  reg,
602  pmin,
603  pmax);
604 
605  // ions
606  mod = new G4BraggIonModel();
607  mod->SetActivationHighEnergyLimit(pmin);
608  em_config->SetExtraEmModel("GenericIon",
609  "ionIoni",
610  mod,
611  reg,
612  0.0,
613  2 * MeV,
614  new G4IonFluctuations());
615 
616  mod = new G4BetheBlochModel();
617  mod->SetActivationLowEnergyLimit(pmax);
618  em_config->SetExtraEmModel("GenericIon",
619  "ionIoni",
620  mod,
621  reg,
622  2 * MeV,
623  10 * TeV,
624  new G4IonFluctuations());
625 
626  mod = new G4MicroElecInelasticModel();
627  em_config->SetExtraEmModel("GenericIon",
628  "ion_G4MicroElecInelastic",
629  mod,
630  reg,
631  pmin,
632  pmax);
633  }
634 }
635 
636 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
637 
638 G4bool G4EmModelActivator::HasMsc(G4ProcessManager* pm) const
639 {
640  G4bool res = false;
641  G4ProcessVector* pv = pm->GetProcessList();
642  G4int nproc = pm->GetProcessListLength();
643  for(G4int i = 0; i < nproc; ++i)
644  {
645  if(((*pv)[i])->GetProcessSubType() == fMultipleScattering)
646  {
647  res = true;
648  break;
649  }
650  }
651  return res;
652 }
653 
654 void G4EmModelActivator::FindOrAddProcess(const G4ParticleDefinition* part,
655  const G4String& name)
656 {
657  G4ProcessManager* pm = part->GetProcessManager();
658  G4ProcessVector* pv = pm->GetProcessList();
659  G4int nproc = pm->GetProcessListLength();
660  for(G4int i = 0; i<nproc; ++i) {
661  if(((*pv)[i])->GetProcessName() == name) { return; }
662  }
663  if(name == "CoulombScat") {
665  cs->SetEmModel(new G4DummyModel());
666  pm->AddDiscreteProcess(cs);
667  } else if(name == "Rayl") {
669  rs->SetEmModel(new G4DummyModel());
670  pm->AddDiscreteProcess(rs);
671  }
672 }
673 
674 
675 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmConfigurator * EmConfigurator()
const XML_Char * name
Definition: expat.h:151
void SetActivationHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:738
static G4MuonPlus * MuonPlus()
Definition: G4MuonPlus.cc:99
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4LossTableManager * Instance()
void SetDeexcitationIgnoreCut(G4bool val)
const char * p
Definition: xmltok.h:285
void SetAuger(G4bool val)
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)
const std::vector< G4String > & ParticlesPAI() const
const std::vector< G4String > & RegionsMicroElec() const
const std::vector< G4String > & RegionsPAI() const
void SetStepLimitType(G4MscStepLimitType)
Definition: G4VMscModel.hh:223
int G4int
Definition: G4Types.hh:78
void SetDeexActiveRegion(const G4String &region, G4bool fdeex, G4bool fauger, G4bool fpixe)
const std::vector< G4String > & RegionsMsc() const
static const G4double reg
static constexpr double TeV
Definition: G4SIunits.hh:218
static G4RegionStore * GetInstance()
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
void SetEmModel(G4VEmModel *, G4int index=1)
G4GLOB_DLL std::ostream G4cout
G4int Verbose() const
void SetLocked(G4bool)
Definition: G4VEmModel.hh:839
bool G4bool
Definition: G4Types.hh:79
void SetRangeFactor(G4double)
Definition: G4VMscModel.hh:209
void SetAugerCascade(G4bool val)
static G4Proton * Proton()
Definition: G4Proton.cc:93
static constexpr double eV
Definition: G4SIunits.hh:215
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
const std::vector< G4VEnergyLossProcess * > & GetEnergyLossProcessVector()
void SetActivationLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:745
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
const std::vector< G4String > & TypesMsc() const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
static G4EmParameters * Instance()
void DefineRegParamForDeex(G4VAtomDeexcitation *) const
static constexpr double GeV
Definition: G4SIunits.hh:217
G4EmModelActivator(const G4String &emphys="")
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
G4bool IsMasterThread()
Definition: G4Threading.cc:146
G4VAtomDeexcitation * AtomDeexcitation()
double G4double
Definition: G4Types.hh:76
G4int GetProcessListLength() const
static constexpr double keV
Definition: G4SIunits.hh:216
const std::vector< G4String > & TypesPAI() const
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:759
G4ProcessVector * GetProcessList() const
void SetFluo(G4bool val)
G4bool IsIonisationProcess() const