Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VEmModel.hh
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: G4VEmModel.hh 97742 2016-06-08 09:24:54Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 //
33 // File name: G4VEmModel
34 //
35 // Author: Vladimir Ivanchenko
36 //
37 // Creation date: 03.01.2002
38 //
39 // Modifications:
40 //
41 // 23-12-02 V.Ivanchenko change interface before move to cut per region
42 // 24-01-03 Cut per region (V.Ivanchenko)
43 // 13-02-03 Add name (V.Ivanchenko)
44 // 25-02-03 Add sample theta and displacement (V.Ivanchenko)
45 // 23-07-03 Replace G4Material by G4MaterialCutCouple in dE/dx and CrossSection
46 // calculation (V.Ivanchenko)
47 // 01-03-04 L.Urban signature changed in SampleCosineTheta
48 // 23-04-04 L.urban signature of SampleCosineTheta changed back
49 // 17-11-04 Add method CrossSectionPerAtom (V.Ivanchenko)
50 // 14-03-05 Reduce number of pure virtual methods and make inline part
51 // separate (V.Ivanchenko)
52 // 24-03-05 Remove IsInCharge and add G4VParticleChange in the constructor (VI)
53 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko)
54 // 15-04-05 optimize internal interface for msc (V.Ivanchenko)
55 // 08-05-05 A -> N (V.Ivanchenko)
56 // 25-07-05 Move constructor and destructor to the body (V.Ivanchenko)
57 // 02-02-06 ComputeCrossSectionPerAtom: default value A=0. (mma)
58 // 06-02-06 add method ComputeMeanFreePath() (mma)
59 // 07-03-06 Optimize msc methods (V.Ivanchenko)
60 // 29-06-06 Add member currentElement and Get/Set methods (V.Ivanchenko)
61 // 29-10-07 Added SampleScattering (V.Ivanchenko)
62 // 15-07-08 Reorder class members and improve comments (VI)
63 // 21-07-08 Added vector of G4ElementSelector and methods to use it (VI)
64 // 12-09-08 Added methods GetParticleCharge, GetChargeSquareRatio,
65 // CorrectionsAlongStep, ActivateNuclearStopping (VI)
66 // 16-02-09 Moved implementations of virtual methods to source (VI)
67 // 07-04-09 Moved msc methods from G4VEmModel to G4VMscModel (VI)
68 // 13-10-10 Added G4VEmAngularDistribution (VI)
69 //
70 // Class Description:
71 //
72 // Abstract interface to energy loss models
73 
74 // -------------------------------------------------------------------
75 //
76 
77 #ifndef G4VEmModel_h
78 #define G4VEmModel_h 1
79 
80 #include "globals.hh"
81 #include "G4DynamicParticle.hh"
82 #include "G4ParticleDefinition.hh"
83 #include "G4MaterialCutsCouple.hh"
84 #include "G4Material.hh"
85 #include "G4Element.hh"
86 #include "G4ElementVector.hh"
87 #include "G4Isotope.hh"
88 #include "G4DataVector.hh"
89 #include "G4VEmFluctuationModel.hh"
91 #include "G4EmElementSelector.hh"
93 #include <vector>
94 
95 class G4ElementData;
96 class G4PhysicsTable;
97 class G4Region;
98 class G4VParticleChange;
101 class G4Track;
102 class G4LossTableManager;
103 
105 {
106 
107 public:
108 
109  explicit G4VEmModel(const G4String& nam);
110 
111  virtual ~G4VEmModel();
112 
113  //------------------------------------------------------------------------
114  // Virtual methods to be implemented for any concrete model
115  //------------------------------------------------------------------------
116 
117  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&) = 0;
118 
119  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
120  const G4MaterialCutsCouple*,
121  const G4DynamicParticle*,
122  G4double tmin = 0.0,
123  G4double tmax = DBL_MAX) = 0;
124 
125  //------------------------------------------------------------------------
126  // Methods for initialisation of MT; may be overwritten if needed
127  //------------------------------------------------------------------------
128 
129  // initilisation in local thread
130  virtual void InitialiseLocal(const G4ParticleDefinition*,
131  G4VEmModel* masterModel);
132 
133  // initilisation of a new material at run time
134  virtual void InitialiseForMaterial(const G4ParticleDefinition*,
135  const G4Material*);
136 
137  // initilisation of a new element at run time
138  virtual void InitialiseForElement(const G4ParticleDefinition*,
139  G4int Z);
140 
141  //------------------------------------------------------------------------
142  // Methods with standard implementation; may be overwritten if needed
143  //------------------------------------------------------------------------
144 
145  // main method to compute dEdx
147  const G4ParticleDefinition*,
148  G4double kineticEnergy,
149  G4double cutEnergy = DBL_MAX);
150 
151  // main method to compute cross section per Volume
153  const G4ParticleDefinition*,
154  G4double kineticEnergy,
155  G4double cutEnergy = 0.0,
156  G4double maxEnergy = DBL_MAX);
157 
158  // method to get partial cross section
160  G4int level,
161  const G4ParticleDefinition*,
162  G4double kineticEnergy);
163 
164  // main method to compute cross section per atom
166  G4double kinEnergy,
167  G4double Z,
168  G4double A = 0., /* amu */
169  G4double cutEnergy = 0.0,
170  G4double maxEnergy = DBL_MAX);
171 
172  // main method to compute cross section per atomic shell
174  G4int Z, G4int shellIdx,
175  G4double kinEnergy,
176  G4double cutEnergy = 0.0,
177  G4double maxEnergy = DBL_MAX);
178 
179  // Compute effective ion charge square
180  virtual G4double ChargeSquareRatio(const G4Track&);
181 
182  // Compute effective ion charge square
184  const G4Material*,
185  G4double kineticEnergy);
186 
187  // Compute ion charge
189  const G4Material*,
190  G4double kineticEnergy);
191 
192  // Initialisation for a new track
193  virtual void StartTracking(G4Track*);
194 
195  // add correction to energy loss and compute non-ionizing energy loss
196  virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*,
197  const G4DynamicParticle*,
198  G4double& eloss,
199  G4double& niel,
200  G4double length);
201 
202  // value which may be tabulated (by default cross section)
203  virtual G4double Value(const G4MaterialCutsCouple*,
204  const G4ParticleDefinition*,
205  G4double kineticEnergy);
206 
207  // threshold for zero value
208  virtual G4double MinPrimaryEnergy(const G4Material*,
209  const G4ParticleDefinition*,
210  G4double cut = 0.0);
211 
212  // model can define low-energy limit for the cut
214  const G4MaterialCutsCouple*);
215 
216  // initilisation at run time for a given material
217  virtual void SetupForMaterial(const G4ParticleDefinition*,
218  const G4Material*,
219  G4double kineticEnergy);
220 
221  // add a region for the model
222  virtual void DefineForRegion(const G4Region*);
223 
224  // for automatic documentation
225  virtual void ModelDescription(std::ostream& outFile) const;
226 
227 protected:
228 
229  // initialisation of the ParticleChange for the model
231 
232  // initialisation of the ParticleChange for the model
234 
235  // kinematically allowed max kinetic energy of a secondary
237  G4double kineticEnergy);
238 
239 public:
240 
241  //------------------------------------------------------------------------
242  // Generic methods common to all models
243  //------------------------------------------------------------------------
244 
245  // should be called at initialisation to build element selectors
247  const G4DataVector&);
248 
249  // should be called at initialisation to access element selectors
250  inline std::vector<G4EmElementSelector*>* GetElementSelectors();
251 
252  // should be called at initialisation to set element selectors
253  inline void SetElementSelectors(std::vector<G4EmElementSelector*>*);
254 
255  // dEdx per unit length
256  virtual inline G4double ComputeDEDX(const G4MaterialCutsCouple*,
257  const G4ParticleDefinition*,
258  G4double kineticEnergy,
259  G4double cutEnergy = DBL_MAX);
260 
261  // cross section per volume
263  const G4ParticleDefinition*,
264  G4double kineticEnergy,
265  G4double cutEnergy = 0.0,
266  G4double maxEnergy = DBL_MAX);
267 
268  // compute mean free path via cross section per volume
270  G4double kineticEnergy,
271  const G4Material*,
272  G4double cutEnergy = 0.0,
273  G4double maxEnergy = DBL_MAX);
274 
275  // generic cross section per element
277  const G4Element*,
278  G4double kinEnergy,
279  G4double cutEnergy = 0.0,
280  G4double maxEnergy = DBL_MAX);
281 
282  // select isotope in order to have precise mass of the nucleus
283  inline G4int SelectIsotopeNumber(const G4Element*);
284 
285  // atom can be selected effitiantly if element selectors are initialised
286  inline const G4Element* SelectRandomAtom(const G4MaterialCutsCouple*,
287  const G4ParticleDefinition*,
288  G4double kineticEnergy,
289  G4double cutEnergy = 0.0,
290  G4double maxEnergy = DBL_MAX);
291 
292  // to select atom cross section per volume is recomputed for each element
293  const G4Element* SelectRandomAtom(const G4Material*,
294  const G4ParticleDefinition*,
295  G4double kineticEnergy,
296  G4double cutEnergy = 0.0,
297  G4double maxEnergy = DBL_MAX);
298 
299  // to select atom if cross section is proportional number of electrons
300  inline G4int SelectRandomAtomNumber(const G4Material*);
301 
302  //------------------------------------------------------------------------
303  // Get/Set methods
304  //------------------------------------------------------------------------
305 
307 
309 
310  inline G4ElementData* GetElementData();
311 
313 
315 
317 
319 
320  inline G4double HighEnergyLimit() const;
321 
322  inline G4double LowEnergyLimit() const;
323 
324  inline G4double HighEnergyActivationLimit() const;
325 
326  inline G4double LowEnergyActivationLimit() const;
327 
328  inline G4double PolarAngleLimit() const;
329 
330  inline G4double SecondaryThreshold() const;
331 
332  inline G4bool LPMFlag() const;
333 
334  inline G4bool DeexcitationFlag() const;
335 
336  inline G4bool ForceBuildTableFlag() const;
337 
338  inline G4bool UseAngularGeneratorFlag() const;
339 
340  inline void SetAngularGeneratorFlag(G4bool);
341 
342  inline void SetHighEnergyLimit(G4double);
343 
344  inline void SetLowEnergyLimit(G4double);
345 
347 
349 
350  inline G4bool IsActive(G4double kinEnergy);
351 
352  inline void SetPolarAngleLimit(G4double);
353 
354  inline void SetSecondaryThreshold(G4double);
355 
356  inline void SetLPMFlag(G4bool val);
357 
358  inline void SetDeexcitationFlag(G4bool val);
359 
360  inline void SetForceBuildTable(G4bool val);
361 
362  inline void SetMasterThread(G4bool val);
363 
364  inline G4bool IsMaster() const;
365 
366  inline G4double MaxSecondaryKinEnergy(const G4DynamicParticle* dynParticle);
367 
368  inline const G4String& GetName() const;
369 
370  inline void SetCurrentCouple(const G4MaterialCutsCouple*);
371 
372  inline const G4Element* GetCurrentElement() const;
373 
374  inline const G4Isotope* GetCurrentIsotope() const;
375 
376  inline G4bool IsLocked() const;
377 
378  inline void SetLocked(G4bool);
379 
380 protected:
381 
382  inline const G4MaterialCutsCouple* CurrentCouple() const;
383 
384  inline void SetCurrentElement(const G4Element*);
385 
386 private:
387 
388  // hide assignment operator
389  G4VEmModel & operator=(const G4VEmModel &right) = delete;
390  G4VEmModel(const G4VEmModel&) = delete;
391 
392  // ======== Parameters of the class fixed at construction =========
393 
394  G4VEmFluctuationModel* flucModel;
395  G4VEmAngularDistribution* anglModel;
396  const G4String name;
397 
398  // ======== Parameters of the class fixed at initialisation =======
399 
400  G4double lowLimit;
401  G4double highLimit;
402  G4double eMinActive;
403  G4double eMaxActive;
404  G4double polarAngleLimit;
405  G4double secondaryThreshold;
406  G4bool theLPMflag;
407  G4bool flagDeexcitation;
408  G4bool flagForceBuildTable;
409  G4bool isMaster;
410 
411  G4bool localTable;
412  G4bool localElmSelectors;
413  G4bool useAngularGenerator;
414  G4bool isLocked;
415  G4int nSelectors;
416  std::vector<G4EmElementSelector*>* elmSelectors;
417  G4LossTableManager* fEmManager;
418 
419 protected:
420 
424  const std::vector<G4double>* theDensityFactor;
425  const std::vector<G4int>* theDensityIdx;
426  size_t idxTable;
427  const static G4double inveplus;
428 
429  // ======== Cached values - may be state dependent ================
430 
431 private:
432 
433  const G4MaterialCutsCouple* fCurrentCouple;
434  const G4Element* fCurrentElement;
435  const G4Isotope* fCurrentIsotope;
436 
437  G4int nsec;
438  std::vector<G4double> xsec;
439 
440 };
441 
442 // ======== Run time inline methods ================
443 
445 {
446  fCurrentCouple = p;
447 }
448 
449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
450 
452 {
453  return fCurrentCouple;
454 }
455 
456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
457 
459 {
460  fCurrentElement = elm;
461  fCurrentIsotope = nullptr;
462 }
463 
464 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
465 
467 {
468  return fCurrentElement;
469 }
470 
471 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
472 
474 {
475  return fCurrentIsotope;
476 }
477 
478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
479 
480 inline
482 {
483  return MaxSecondaryEnergy(dynPart->GetParticleDefinition(),
484  dynPart->GetKineticEnergy());
485 }
486 
487 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
488 
490  const G4ParticleDefinition* part,
491  G4double kinEnergy,
492  G4double cutEnergy)
493 {
494  SetCurrentCouple(couple);
495  return ComputeDEDXPerVolume(couple->GetMaterial(),part,kinEnergy,cutEnergy);
496 }
497 
498 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
499 
501  const G4ParticleDefinition* part,
502  G4double kinEnergy,
503  G4double cutEnergy,
504  G4double maxEnergy)
505 {
506  SetCurrentCouple(couple);
507  return CrossSectionPerVolume(couple->GetMaterial(),part,kinEnergy,
508  cutEnergy,maxEnergy);
509 }
510 
511 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
512 
513 inline
515  G4double ekin,
516  const G4Material* material,
517  G4double emin,
518  G4double emax)
519 {
520  G4double cross = CrossSectionPerVolume(material,part,ekin,emin,emax);
521  return cross > 0.0 ? 1./cross : DBL_MAX;
522 }
523 
524 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
525 
526 inline G4double
528  const G4Element* elm,
529  G4double kinEnergy,
530  G4double cutEnergy,
531  G4double maxEnergy)
532 {
533  SetCurrentElement(elm);
534  return ComputeCrossSectionPerAtom(part,kinEnergy,elm->GetZ(),elm->GetN(),
535  cutEnergy,maxEnergy);
536 }
537 
538 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
539 
540 inline const G4Element*
542  const G4ParticleDefinition* part,
543  G4double kinEnergy,
544  G4double cutEnergy,
545  G4double maxEnergy)
546 {
547  fCurrentCouple = couple;
548  if(nSelectors > 0) {
549  fCurrentElement =
550  ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy);
551  } else {
552  fCurrentElement = SelectRandomAtom(couple->GetMaterial(),part,kinEnergy,
553  cutEnergy,maxEnergy);
554  }
555  fCurrentIsotope = nullptr;
556  return fCurrentElement;
557 }
558 
559 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
560 
562 {
563  // this algorith assumes that cross section is proportional to
564  // number electrons multiplied by number of atoms
565  size_t nn = mat->GetNumberOfElements();
566  const G4ElementVector* elmv = mat->GetElementVector();
567  G4int Z = (*elmv)[0]->GetZasInt();
568  if(1 < nn) {
569  const G4double* at = mat->GetVecNbOfAtomsPerVolume();
571  for( size_t i=0; i<nn; ++i) {
572  tot -= at[i];
573  if(tot <= 0.0) {
574  Z = (*elmv)[i]->GetZasInt();
575  break;
576  }
577  }
578  }
579  return Z;
580 }
581 
582 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
583 
585 {
586  SetCurrentElement(elm);
587  G4int N = G4lrint(elm->GetN());
588  G4int ni = elm->GetNumberOfIsotopes();
589  fCurrentIsotope = nullptr;
590  if(ni > 0) {
591  G4int idx = 0;
592  if(ni > 1) {
594  G4double x = G4UniformRand();
595  for(; idx<ni; ++idx) {
596  x -= ab[idx];
597  if (x <= 0.0) { break; }
598  }
599  if(idx >= ni) { idx = ni - 1; }
600  }
601  fCurrentIsotope = elm->GetIsotope(idx);
602  N = fCurrentIsotope->GetN();
603  }
604  return N;
605 }
606 
607 // ======== Get/Set inline methods used at initialisation ================
608 
610 {
611  return flucModel;
612 }
613 
614 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
615 
617 {
618  return anglModel;
619 }
620 
621 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
622 
624 {
625  if(p != anglModel) {
626  delete anglModel;
627  anglModel = p;
628  }
629 }
630 
631 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
632 
634 {
635  return highLimit;
636 }
637 
638 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
639 
641 {
642  return lowLimit;
643 }
644 
645 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
646 
648 {
649  return eMaxActive;
650 }
651 
652 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
653 
655 {
656  return eMinActive;
657 }
658 
659 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
660 
662 {
663  return polarAngleLimit;
664 }
665 
666 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
667 
669 {
670  return secondaryThreshold;
671 }
672 
673 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
674 
676 {
677  return theLPMflag;
678 }
679 
680 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
681 
683 {
684  return flagDeexcitation;
685 }
686 
687 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
688 
690 {
691  return flagForceBuildTable;
692 }
693 
694 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
695 
697 {
698  return useAngularGenerator;
699 }
700 
701 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
702 
704 {
705  useAngularGenerator = val;
706 }
707 
708 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
709 
711 {
712  isMaster = val;
713 }
714 
715 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
716 
718 {
719  return isMaster;
720 }
721 
722 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
723 
725 {
726  highLimit = val;
727 }
728 
729 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
730 
732 {
733  lowLimit = val;
734 }
735 
736 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
737 
739 {
740  eMaxActive = val;
741 }
742 
743 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
744 
746 {
747  eMinActive = val;
748 }
749 
750 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
751 
753 {
754  return (kinEnergy >= eMinActive && kinEnergy <= eMaxActive);
755 }
756 
757 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
758 
760 {
761  if(!isLocked) { polarAngleLimit = val; }
762 }
763 
764 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
765 
767 {
768  secondaryThreshold = val;
769 }
770 
771 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
772 
774 {
775  theLPMflag = val;
776 }
777 
778 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
779 
781 {
782  flagDeexcitation = val;
783 }
784 
785 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
786 
788 {
789  flagForceBuildTable = val;
790 }
791 
792 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
793 
794 inline const G4String& G4VEmModel::GetName() const
795 {
796  return name;
797 }
798 
799 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
800 
801 inline std::vector<G4EmElementSelector*>* G4VEmModel::GetElementSelectors()
802 {
803  return elmSelectors;
804 }
805 
806 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
807 
808 inline void
809 G4VEmModel::SetElementSelectors(std::vector<G4EmElementSelector*>* p)
810 {
811  elmSelectors = p;
812  if(elmSelectors) { nSelectors = elmSelectors->size(); }
813  localElmSelectors = false;
814 }
815 
816 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
817 
819 {
820  return fElementData;
821 }
822 
823 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
824 
826 {
827  return xSectionTable;
828 }
829 
830 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
831 
833 {
834  return isLocked;
835 }
836 
837 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
838 
840 {
841  isLocked = val;
842 }
843 
844 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
845 
846 #endif
847 
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:159
G4double LowEnergyActivationLimit() const
Definition: G4VEmModel.hh:654
G4double HighEnergyActivationLimit() const
Definition: G4VEmModel.hh:647
const int N
Definition: mixmax.h:43
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
Definition: G4VEmModel.hh:481
size_t idxTable
Definition: G4VEmModel.hh:426
const XML_Char * name
Definition: expat.h:151
void SetActivationHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:738
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:640
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:257
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
Definition: G4VEmModel.cc:243
virtual void StartTracking(G4Track *)
Definition: G4VEmModel.cc:292
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:118
G4double SecondaryThreshold() const
Definition: G4VEmModel.hh:668
std::vector< G4Element * > G4ElementVector
G4bool ForceBuildTableFlag() const
Definition: G4VEmModel.hh:689
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
Definition: G4VEmModel.cc:370
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
G4double GetKineticEnergy() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
Definition: G4VEmModel.cc:146
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:633
G4double GetN() const
Definition: G4Element.hh:135
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
Definition: G4VEmModel.cc:418
virtual void DefineForRegion(const G4Region *)
Definition: G4VEmModel.cc:340
const char * p
Definition: xmltok.h:285
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
Definition: G4VEmModel.cc:386
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
Definition: G4VEmModel.cc:218
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Definition: G4VEmModel.cc:411
G4double GetZ() const
Definition: G4Element.hh:131
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:616
void SetSecondaryThreshold(G4double)
Definition: G4VEmModel.hh:766
G4bool LPMFlag() const
Definition: G4VEmModel.hh:675
G4bool IsMaster() const
Definition: G4VEmModel.hh:717
G4PhysicsTable * GetCrossSectionTable()
Definition: G4VEmModel.hh:825
G4VEmFluctuationModel * GetModelOfFluctuations()
Definition: G4VEmModel.hh:609
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *)
Definition: G4VEmModel.cc:395
G4ElementData * GetElementData()
Definition: G4VEmModel.hh:818
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
int G4int
Definition: G4Types.hh:78
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:68
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:724
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)=0
void SetAngularGeneratorFlag(G4bool)
Definition: G4VEmModel.hh:703
const std::vector< G4int > * theDensityIdx
Definition: G4VEmModel.hh:425
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
const G4MaterialCutsCouple * CurrentCouple() const
Definition: G4VEmModel.hh:451
virtual void InitialiseForMaterial(const G4ParticleDefinition *, const G4Material *)
Definition: G4VEmModel.cc:224
G4int GetN() const
Definition: G4Isotope.hh:94
#define G4UniformRand()
Definition: Randomize.hh:97
double A(double temperature)
virtual void ModelDescription(std::ostream &outFile) const
Definition: G4VEmModel.cc:440
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:696
void SetLocked(G4bool)
Definition: G4VEmModel.hh:839
bool G4bool
Definition: G4Types.hh:79
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:500
static const G4double inveplus
Definition: G4VEmModel.hh:427
G4double * GetRelativeAbundanceVector() const
Definition: G4Element.hh:167
virtual ~G4VEmModel()
Definition: G4VEmModel.cc:92
void SetCrossSectionTable(G4PhysicsTable *, G4bool isLocal)
Definition: G4VEmModel.cc:426
G4int SelectIsotopeNumber(const G4Element *)
Definition: G4VEmModel.hh:584
const G4ParticleDefinition * GetParticleDefinition() const
virtual G4double GetPartialCrossSection(const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
Definition: G4VEmModel.cc:283
std::vector< G4EmElementSelector * > * GetElementSelectors()
Definition: G4VEmModel.hh:801
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:321
virtual G4double ChargeSquareRatio(const G4Track &)
Definition: G4VEmModel.cc:345
const std::vector< G4double > * theDensityFactor
Definition: G4VEmModel.hh:424
G4bool IsActive(G4double kinEnergy)
Definition: G4VEmModel.hh:752
void SetActivationLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:745
static const G4double emax
void SetMasterThread(G4bool val)
Definition: G4VEmModel.hh:710
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:209
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Definition: G4VEmModel.cc:353
virtual G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Definition: G4VEmModel.cc:362
G4bool DeexcitationFlag() const
Definition: G4VEmModel.hh:682
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
Definition: G4VEmModel.cc:248
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
Definition: G4VEmModel.hh:809
static const G4double ab
virtual G4double ComputeDEDX(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
Definition: G4VEmModel.hh:489
int G4lrint(double ad)
Definition: templates.hh:163
void SetLPMFlag(G4bool val)
Definition: G4VEmModel.hh:773
void SetCurrentCouple(const G4MaterialCutsCouple *)
Definition: G4VEmModel.hh:444
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:623
G4double PolarAngleLimit() const
Definition: G4VEmModel.hh:661
virtual G4double ComputeCrossSectionPerShell(const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.cc:331
void SetForceBuildTable(G4bool val)
Definition: G4VEmModel.hh:787
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:170
G4VParticleChange * pParticleChange
Definition: G4VEmModel.hh:422
const G4String & GetName() const
Definition: G4VEmModel.hh:794
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kineticEnergy)
Definition: G4VEmModel.cc:403
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
G4bool IsLocked() const
Definition: G4VEmModel.hh:832
G4PhysicsTable * xSectionTable
Definition: G4VEmModel.hh:423
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:731
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:780
G4double ComputeMeanFreePath(const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:514
void SetCurrentElement(const G4Element *)
Definition: G4VEmModel.hh:458
#define DBL_MAX
Definition: templates.hh:83
G4ElementData * fElementData
Definition: G4VEmModel.hh:421
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:541
void SetPolarAngleLimit(G4double)
Definition: G4VEmModel.hh:759
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:132
virtual G4double Value(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
Definition: G4VEmModel.cc:377
const G4Material * GetMaterial() const
G4int SelectRandomAtomNumber(const G4Material *)
Definition: G4VEmModel.hh:561
const G4Isotope * GetCurrentIsotope() const
Definition: G4VEmModel.hh:473
const G4Element * GetCurrentElement() const
Definition: G4VEmModel.hh:466