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3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/standard/include/G4eBremsstrahlungRelModel.hh (Version 11.3.0) and /processes/electromagnetic/standard/include/G4eBremsstrahlungRelModel.hh (Version 11.1.3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27 // -------------------------------------------     27 // -------------------------------------------------------------------
 28 //                                                 28 //
 29 // GEANT4 Class header file                        29 // GEANT4 Class header file
 30 //                                                 30 //
 31 //                                                 31 //
 32 // File name:     G4eBremsstrahlungRelModel        32 // File name:     G4eBremsstrahlungRelModel
 33 //                extention of standard G4eBre     33 //                extention of standard G4eBremsstrahlungModel
 34 //                                                 34 //
 35 // Author:        Andreas Schaelicke               35 // Author:        Andreas Schaelicke
 36 //                                                 36 //
 37 // Creation date: 28.03.2008                       37 // Creation date: 28.03.2008
 38 //                                                 38 //
 39 // Modifications:                                  39 // Modifications:
 40 //                                                 40 //
 41 // 15.07.18  introduced data structures to sto     41 // 15.07.18  introduced data structures to store LPM functions and element depen
 42 //           dent data for faster run-time com     42 //           dent data for faster run-time computation (see more in .cc M.Novak)
 43 //                                                 43 //
 44 // Class Description:                              44 // Class Description:
 45 //                                                 45 //
 46 // Implementation of energy loss for gamma emi     46 // Implementation of energy loss for gamma emission by electrons and
 47 // positrons including an improved version of      47 // positrons including an improved version of the LPM effect
 48                                                    48 
 49 // -------------------------------------------     49 // -------------------------------------------------------------------
 50 //                                                 50 //
 51                                                    51 
 52 #ifndef G4eBremsstrahlungRelModel_h                52 #ifndef G4eBremsstrahlungRelModel_h
 53 #define G4eBremsstrahlungRelModel_h 1              53 #define G4eBremsstrahlungRelModel_h 1
 54                                                    54 
 55 #include "G4VEmModel.hh"                           55 #include "G4VEmModel.hh"
 56 #include <memory>                              << 
 57                                                    56 
 58 class G4ParticleChangeForLoss;                     57 class G4ParticleChangeForLoss;
 59                                                    58 
 60 class G4eBremsstrahlungRelModel : public G4VEm     59 class G4eBremsstrahlungRelModel : public G4VEmModel {
 61                                                    60 
 62 public:                                            61 public:
 63                                                    62 
 64   explicit G4eBremsstrahlungRelModel(const G4P     63   explicit G4eBremsstrahlungRelModel(const G4ParticleDefinition* p=nullptr,
 65                                      const G4S     64                                      const G4String& nam="eBremLPM");
 66                                                    65 
 67   ~G4eBremsstrahlungRelModel() override;           66   ~G4eBremsstrahlungRelModel() override;
 68                                                    67 
 69   void Initialise(const G4ParticleDefinition*,     68   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
 70                                                    69 
 71   void InitialiseLocal(const G4ParticleDefinit     70   void InitialiseLocal(const G4ParticleDefinition*,
 72                        G4VEmModel* masterModel     71                        G4VEmModel* masterModel) override;
 73                                                    72 
 74   G4double ComputeDEDXPerVolume(const G4Materi     73   G4double ComputeDEDXPerVolume(const G4Material*,
 75                                 const G4Partic     74                                 const G4ParticleDefinition*,
 76                                 G4double ekin,     75                                 G4double ekin,
 77                                 G4double cutEn     76                                 G4double cutEnergy) override;
 78                                                    77 
 79   G4double ComputeCrossSectionPerAtom(const G4     78   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
 80                                       G4double     79                                       G4double ekin,
 81                                       G4double     80                                       G4double zet,
 82                                       G4double     81                                       G4double,
 83                                       G4double     82                                       G4double cutEnergy,
 84                                       G4double     83                                       G4double maxEnergy = DBL_MAX) override;
 85                                                    84 
 86   void SampleSecondaries(std::vector<G4Dynamic     85   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
 87                          const G4MaterialCutsC     86                          const G4MaterialCutsCouple*,
 88                          const G4DynamicPartic     87                          const G4DynamicParticle*,
 89                          G4double cutEnergy,       88                          G4double cutEnergy,
 90                          G4double maxEnergy) o     89                          G4double maxEnergy) override;
 91                                                    90 
 92   void SetupForMaterial(const G4ParticleDefini     91   void SetupForMaterial(const G4ParticleDefinition*,
 93                         const G4Material*, G4d     92                         const G4Material*, G4double) override;
 94                                                    93 
 95   G4double MinPrimaryEnergy(const G4Material*,     94   G4double MinPrimaryEnergy(const G4Material*,
 96                             const G4ParticleDe     95                             const G4ParticleDefinition*,
 97                             G4double cutEnergy     96                             G4double cutEnergy) override;
 98                                                    97 
 99 protected:                                         98 protected:
100                                                    99 
101   virtual G4double ComputeDXSectionPerAtom(G4d    100   virtual G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
102                                                   101 
103   void SetParticle(const G4ParticleDefinition*    102   void SetParticle(const G4ParticleDefinition* p);
104                                                   103 
105 private:                                          104 private:
106                                                   105 
107   G4double ComputeBremLoss(G4double cutEnergy)    106   G4double ComputeBremLoss(G4double cutEnergy);
108                                                   107 
109   G4double ComputeXSectionPerAtom(G4double cut    108   G4double ComputeXSectionPerAtom(G4double cutEnergy);
110                                                   109 
111   G4double ComputeRelDXSectionPerAtom(G4double    110   G4double ComputeRelDXSectionPerAtom(G4double gammaEnergy);
112                                                   111 
113   // init special data per element i.e. per Z     112   // init special data per element i.e. per Z
114   void InitialiseElementData();                   113   void InitialiseElementData();
115                                                   114 
116   // methods for initialisation and run-time e    115   // methods for initialisation and run-time evaluation of LPM functions:
117   void InitLPMFunctions();                        116   void InitLPMFunctions();
118                                                   117 
119   void ComputeLPMfunctions(G4double& funcXiS,     118   void ComputeLPMfunctions(G4double& funcXiS,
120                            G4double& funcGS,      119                            G4double& funcGS,
121                            G4double& funcPhiS,    120                            G4double& funcPhiS,
122                            const G4double egam    121                            const G4double egamma);
123                                                   122 
124   void GetLPMFunctions(G4double& lpmGs,           123   void GetLPMFunctions(G4double& lpmGs,
125                        G4double& lpmPhis,         124                        G4double& lpmPhis,
126                        const G4double ss);        125                        const G4double ss);
127                                                   126 
128   void ComputeLPMGsPhis(G4double& funcGS,         127   void ComputeLPMGsPhis(G4double& funcGS,
129                         G4double& funcPhiS,       128                         G4double& funcPhiS,
130                         const G4double varShat    129                         const G4double varShat);
131                                                   130 
132   // for evaluating screening related function    131   // for evaluating screening related functions
133   void ComputeScreeningFunctions(G4double& phi    132   void ComputeScreeningFunctions(G4double& phi1,
134                                  G4double& phi    133                                  G4double& phi1m2,
135                                  G4double& psi    134                                  G4double& psi1,
136                                  G4double& psi    135                                  G4double& psi1m2,
137                                  const G4doubl    136                                  const G4double gam,
138                                  const G4doubl    137                                  const G4double eps);
139   // hide assignment operator and cctr            138   // hide assignment operator and cctr
140   G4eBremsstrahlungRelModel& operator=            139   G4eBremsstrahlungRelModel& operator=
141   (const G4eBremsstrahlungRelModel& right) = d    140   (const G4eBremsstrahlungRelModel& right) = delete;
142   G4eBremsstrahlungRelModel(const  G4eBremsstr    141   G4eBremsstrahlungRelModel(const  G4eBremsstrahlungRelModel&) = delete;
143                                                   142 
144 private:                                          143 private:
145                                                   144 
146   G4bool                      fIsUseCompleteSc    145   G4bool                      fIsUseCompleteScreening = false;
147   G4bool                      fIsInitializer = << 
148   G4bool                      fUseLPM = true;  << 
149                                                   146 
150 protected:                                        147 protected:
151                                                   148 
152   G4bool                      fIsElectron = tr    149   G4bool                      fIsElectron = true;
153   G4bool                      fIsScatOffElectr    150   G4bool                      fIsScatOffElectron = false;
154   G4bool                      fIsLPMActive = f    151   G4bool                      fIsLPMActive = false;
155   //                                              152   //
156   G4int                       fCurrentIZ = 0;     153   G4int                       fCurrentIZ = 0;
157   const G4ParticleDefinition* fPrimaryParticle    154   const G4ParticleDefinition* fPrimaryParticle = nullptr;
158   G4ParticleDefinition*       fGammaParticle =    155   G4ParticleDefinition*       fGammaParticle = nullptr;
159   G4ParticleChangeForLoss*    fParticleChange     156   G4ParticleChangeForLoss*    fParticleChange = nullptr;
160   // cash                                         157   // cash
161   G4double                    fPrimaryParticle    158   G4double                    fPrimaryParticleMass = 0.;
162   G4double                    fPrimaryKinEnerg    159   G4double                    fPrimaryKinEnergy = 0.;
163   G4double                    fPrimaryTotalEne    160   G4double                    fPrimaryTotalEnergy = 0.;
164   G4double                    fDensityFactor =    161   G4double                    fDensityFactor = 0.;
165   G4double                    fDensityCorr = 0    162   G4double                    fDensityCorr = 0.;
166   G4double                    fLowestKinEnergy    163   G4double                    fLowestKinEnergy;
167   // scattering off electrons                     164   // scattering off electrons
168   G4double                    fNucTerm = 0.;      165   G4double                    fNucTerm = 0.;
169   G4double                    fSumTerm = 0.;      166   G4double                    fSumTerm = 0.;
170                                                   167 
171 private:                                          168 private:
172                                                   169 
173   // LPM related members                          170   // LPM related members
174   G4double                    fLPMEnergyThresh    171   G4double                    fLPMEnergyThreshold;
175   G4double                    fLPMEnergy;         172   G4double                    fLPMEnergy;
176                                                   173 
177 protected:                                        174 protected:
178                                                   175 
179   static const G4double       gBremFactor;        176   static const G4double       gBremFactor;
180   static const G4double       gMigdalConstant;    177   static const G4double       gMigdalConstant;
181                                                   178 
182 private:                                          179 private:
183                                                   180 
184   static const G4int          gMaxZet;            181   static const G4int          gMaxZet;
185   //                                              182   //
186   static const G4double       gLPMconstant;       183   static const G4double       gLPMconstant;
187   //                                              184   //
188   static const G4double       gXGL[8];            185   static const G4double       gXGL[8];
189   static const G4double       gWGL[8];            186   static const G4double       gWGL[8];
190   static const G4double       gFelLowZet[8];      187   static const G4double       gFelLowZet[8];
191   static const G4double       gFinelLowZet[8];    188   static const G4double       gFinelLowZet[8];
192   //                                              189   //
193   struct ElementData {                            190   struct ElementData {
194     /** @brief \f$ \ln(Z) \f$  */                 191     /** @brief \f$ \ln(Z) \f$  */
195     G4double  fLogZ;                              192     G4double  fLogZ;
196     /** @brief \f$ \ln(Z)/3 + f_c \f$  */         193     /** @brief \f$ \ln(Z)/3 + f_c \f$  */
197     G4double  fFz;                                194     G4double  fFz;
198     /** @brief \f$ ((Fel-fc)+Finel*invZ)\f$  *    195     /** @brief \f$ ((Fel-fc)+Finel*invZ)\f$  */
199     G4double  fZFactor1;                          196     G4double  fZFactor1;
200     /** @brief \f$ (Fel-fc)\f$  */                197     /** @brief \f$ (Fel-fc)\f$  */
201     G4double  fZFactor11;                         198     G4double  fZFactor11;
202     /** @brief \f$ (1.0+invZ)/12  \f$  */         199     /** @brief \f$ (1.0+invZ)/12  \f$  */
203     G4double  fZFactor2;                          200     G4double  fZFactor2;
204     // LPM variables                              201     // LPM variables
205     G4double  fVarS1;                             202     G4double  fVarS1;
206     G4double  fILVarS1;                           203     G4double  fILVarS1;
207     G4double  fILVarS1Cond;                       204     G4double  fILVarS1Cond;
208     // constant factors to the screening funct    205     // constant factors to the screening function evaluations
209     G4double  fGammaFactor;                       206     G4double  fGammaFactor;
210     G4double  fEpsilonFactor;                     207     G4double  fEpsilonFactor;
211   };                                              208   };
212   //                                              209   //
213   struct LPMFuncs {                               210   struct LPMFuncs {
214     LPMFuncs() : fIsInitialized(false), fISDel    211     LPMFuncs() : fIsInitialized(false), fISDelta(100.), fSLimit(2.) {}
215     G4bool                 fIsInitialized;        212     G4bool                 fIsInitialized;
216     G4double               fISDelta;              213     G4double               fISDelta;
217     G4double               fSLimit;               214     G4double               fSLimit;
218     std::vector<G4double>  fLPMFuncG;             215     std::vector<G4double>  fLPMFuncG;
219     std::vector<G4double>  fLPMFuncPhi;           216     std::vector<G4double>  fLPMFuncPhi;
220   };                                              217   };
221   //                                              218   //
222   static std::shared_ptr<LPMFuncs> gLPMFuncs() << 219   static LPMFuncs                   gLPMFuncs;
223   static std::shared_ptr<std::vector<ElementDa << 220   static std::vector<ElementData*>  gElementData;
224   std::shared_ptr<LPMFuncs> fLPMFuncs;         << 221 
225   std::shared_ptr<std::vector<ElementData*>> f << 
226 };                                                222 };
227                                                   223 
228 #endif                                            224 #endif
229                                                   225