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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 9.2.p4)


  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 // $Id: G4eBremsstrahlungRelModel.hh,v 1.10 2008/11/14 09:25:19 vnivanch Exp $
                                                   >>  27 // GEANT4 tag $Name: geant4-09-02-patch-04 $
 26 //                                                 28 //
 27 // -------------------------------------------     29 // -------------------------------------------------------------------
 28 //                                                 30 //
 29 // GEANT4 Class header file                        31 // GEANT4 Class header file
 30 //                                                 32 //
 31 //                                                 33 //
 32 // File name:     G4eBremsstrahlungRelModel        34 // File name:     G4eBremsstrahlungRelModel
 33 //                extention of standard G4eBre     35 //                extention of standard G4eBremsstrahlungModel
 34 //                                                 36 //
 35 // Author:        Andreas Schaelicke           <<  37 // Author:        Andreas Schaelicke 
 36 //                                                 38 //
 37 // Creation date: 28.03.2008                       39 // Creation date: 28.03.2008
 38 //                                                 40 //
 39 // Modifications:                                  41 // Modifications:
 40 //                                                 42 //
 41 // 15.07.18  introduced data structures to sto << 
 42 //           dent data for faster run-time com << 
 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>                              <<  56 #include "G4NistManager.hh"
 57                                                    57 
 58 class G4ParticleChangeForLoss;                     58 class G4ParticleChangeForLoss;
                                                   >>  59 class G4PhysicsVector;
 59                                                    60 
 60 class G4eBremsstrahlungRelModel : public G4VEm <<  61 class G4eBremsstrahlungRelModel : public G4VEmModel
                                                   >>  62 {
 61                                                    63 
 62 public:                                            64 public:
 63                                                    65 
 64   explicit G4eBremsstrahlungRelModel(const G4P <<  66   G4eBremsstrahlungRelModel(const G4ParticleDefinition* p = 0, 
 65                                      const G4S <<  67           const G4String& nam = "eBremRel");
 66                                                    68 
 67   ~G4eBremsstrahlungRelModel() override;       <<  69   virtual ~G4eBremsstrahlungRelModel();
 68                                                    70 
 69   void Initialise(const G4ParticleDefinition*, <<  71   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
 70                                                    72 
 71   void InitialiseLocal(const G4ParticleDefinit <<  73   G4double MinEnergyCut(const G4ParticleDefinition*, 
 72                        G4VEmModel* masterModel <<  74       const G4MaterialCutsCouple*);
 73                                                <<  75 
 74   G4double ComputeDEDXPerVolume(const G4Materi <<  76   virtual G4double ComputeDEDXPerVolume(const G4Material*,
 75                                 const G4Partic <<  77           const G4ParticleDefinition*,
 76                                 G4double ekin, <<  78           G4double kineticEnergy,
 77                                 G4double cutEn <<  79           G4double cutEnergy);
 78                                                <<  80           
 79   G4double ComputeCrossSectionPerAtom(const G4 <<  81   virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
 80                                       G4double <<  82                 G4double tkin, 
 81                                       G4double <<  83                 G4double Z,   G4double,
 82                                       G4double <<  84                 G4double cutEnergy,
 83                                       G4double <<  85                 G4double maxEnergy = DBL_MAX);
 84                                       G4double <<  86   
 85                                                <<  87   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
 86   void SampleSecondaries(std::vector<G4Dynamic <<  88          const G4MaterialCutsCouple*,
 87                          const G4MaterialCutsC <<  89          const G4DynamicParticle*,
 88                          const G4DynamicPartic <<  90          G4double cutEnergy,
 89                          G4double cutEnergy,   <<  91          G4double maxEnergy);
 90                          G4double maxEnergy) o << 
 91                                                << 
 92   void SetupForMaterial(const G4ParticleDefini << 
 93                         const G4Material*, G4d << 
 94                                                << 
 95   G4double MinPrimaryEnergy(const G4Material*, << 
 96                             const G4ParticleDe << 
 97                             G4double cutEnergy << 
 98                                                    92 
 99 protected:                                     <<  93   virtual void SetupForMaterial(const G4ParticleDefinition*,
                                                   >>  94                                 const G4Material*,G4double);
100                                                    95 
101   virtual G4double ComputeDXSectionPerAtom(G4d <<  96   inline void SetLPMconstant(G4double val);
                                                   >>  97   inline G4double LPMconstant() const;
102                                                    98 
103   void SetParticle(const G4ParticleDefinition* <<  99 protected:
                                                   >> 100 
                                                   >> 101   inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
                                                   >> 102              G4double kineticEnergy);
104                                                   103 
105 private:                                          104 private:
106                                                   105 
                                                   >> 106   void InitialiseConstants();
                                                   >> 107 
                                                   >> 108   void CalcLPMFunctions(G4double gammaEnergy);
                                                   >> 109 
107   G4double ComputeBremLoss(G4double cutEnergy)    110   G4double ComputeBremLoss(G4double cutEnergy);
108                                                   111 
109   G4double ComputeXSectionPerAtom(G4double cut    112   G4double ComputeXSectionPerAtom(G4double cutEnergy);
110                                                   113 
                                                   >> 114   G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
                                                   >> 115 
111   G4double ComputeRelDXSectionPerAtom(G4double    116   G4double ComputeRelDXSectionPerAtom(G4double gammaEnergy);
112                                                   117 
113   // init special data per element i.e. per Z  << 118   void SetParticle(const G4ParticleDefinition* p);
114   void InitialiseElementData();                << 
115                                                   119 
116   // methods for initialisation and run-time e << 120   // * fast inline functions *
117   void InitLPMFunctions();                     << 121   inline void SetCurrentElement(const G4double);
118                                                   122 
119   void ComputeLPMfunctions(G4double& funcXiS,  << 123   inline G4double Phi1(G4double,G4double);
120                            G4double& funcGS,   << 124   inline G4double Phi1M2(G4double,G4double);
121                            G4double& funcPhiS, << 125   inline G4double Psi1(G4double,G4double);
122                            const G4double egam << 126   inline G4double Psi1M2(G4double,G4double);
123                                                << 127 
124   void GetLPMFunctions(G4double& lpmGs,        << 128   // hide assignment operator
125                        G4double& lpmPhis,      << 129   G4eBremsstrahlungRelModel & operator=(const  G4eBremsstrahlungRelModel &right);
126                        const G4double ss);     << 130   G4eBremsstrahlungRelModel(const  G4eBremsstrahlungRelModel&);
127                                                << 
128   void ComputeLPMGsPhis(G4double& funcGS,      << 
129                         G4double& funcPhiS,    << 
130                         const G4double varShat << 
131                                                << 
132   // for evaluating screening related function << 
133   void ComputeScreeningFunctions(G4double& phi << 
134                                  G4double& phi << 
135                                  G4double& psi << 
136                                  G4double& psi << 
137                                  const G4doubl << 
138                                  const G4doubl << 
139   // hide assignment operator and cctr         << 
140   G4eBremsstrahlungRelModel& operator=         << 
141   (const G4eBremsstrahlungRelModel& right) = d << 
142   G4eBremsstrahlungRelModel(const  G4eBremsstr << 
143                                                   131 
144 private:                                       << 132 protected:
145                                                   133 
146   G4bool                      fIsUseCompleteSc << 134   G4NistManager*              nist;
147   G4bool                      fIsInitializer = << 135   const G4ParticleDefinition* particle;
148   G4bool                      fUseLPM = true;  << 136   G4ParticleDefinition*       theGamma;
                                                   >> 137   G4ParticleChangeForLoss*    fParticleChange;
                                                   >> 138 
                                                   >> 139   static const G4double xgi[8], wgi[8];
                                                   >> 140   static const G4double Fel_light[5];
                                                   >> 141   static const G4double Finel_light[5];
149                                                   142 
150 protected:                                     << 143   G4double minThreshold;
151                                                   144 
152   G4bool                      fIsElectron = tr << 
153   G4bool                      fIsScatOffElectr << 
154   G4bool                      fIsLPMActive = f << 
155   //                                           << 
156   G4int                       fCurrentIZ = 0;  << 
157   const G4ParticleDefinition* fPrimaryParticle << 
158   G4ParticleDefinition*       fGammaParticle = << 
159   G4ParticleChangeForLoss*    fParticleChange  << 
160   // cash                                         145   // cash
161   G4double                    fPrimaryParticle << 146   G4double particleMass;
162   G4double                    fPrimaryKinEnerg << 147   G4double kinEnergy;
163   G4double                    fPrimaryTotalEne << 148   G4double totalEnergy;
164   G4double                    fDensityFactor = << 149   G4double currentZ;
165   G4double                    fDensityCorr = 0 << 150   G4double z13, z23, lnZ;
166   G4double                    fLowestKinEnergy << 151   G4double Fel, Finel, fCoulomb, fMax; 
167   // scattering off electrons                  << 152   G4double densityFactor;
168   G4double                    fNucTerm = 0.;   << 153   G4double densityCorr;
169   G4double                    fSumTerm = 0.;   << 154 
                                                   >> 155   // LPM effect
                                                   >> 156   G4double lpmEnergy;
                                                   >> 157   G4PhysicsVector  *fXiLPM, *fPhiLPM, *fGLPM;
                                                   >> 158   G4double xiLPM, phiLPM, gLPM;
                                                   >> 159 
                                                   >> 160   // critical gamma energies
                                                   >> 161   G4double klpm, kp;
                                                   >> 162 
                                                   >> 163   G4bool   isElectron;
170                                                   164 
171 private:                                          165 private:
                                                   >> 166   // consts
                                                   >> 167   G4double highKinEnergy;
                                                   >> 168   G4double lowKinEnergy;
                                                   >> 169   G4double fMigdalConstant;
                                                   >> 170   G4double fLPMconstant;
                                                   >> 171   G4double bremFactor;
                                                   >> 172   G4double energyThresholdLPM;
                                                   >> 173   G4double facFel, facFinel;
                                                   >> 174   G4double preS1,logTwo;
172                                                   175 
173   // LPM related members                       << 176   G4bool   use_completescreening;
174   G4double                    fLPMEnergyThresh << 
175   G4double                    fLPMEnergy;      << 
176                                                   177 
177 protected:                                     << 178   G4bool   isInitialised;
                                                   >> 179 };
178                                                   180 
179   static const G4double       gBremFactor;     << 181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
180   static const G4double       gMigdalConstant; << 
181                                                   182 
182 private:                                       << 183 inline void G4eBremsstrahlungRelModel::SetCurrentElement(const G4double Z)
                                                   >> 184 {
                                                   >> 185   if(Z != currentZ) {
                                                   >> 186     currentZ = Z;
                                                   >> 187 
                                                   >> 188     G4int iz = G4int(Z);
                                                   >> 189     z13 = nist->GetZ13(iz);
                                                   >> 190     z23 = z13*z13;
                                                   >> 191     lnZ = nist->GetLOGZ(iz);
                                                   >> 192 
                                                   >> 193     if (iz <= 4) {
                                                   >> 194       Fel = Fel_light[iz];  
                                                   >> 195       Finel = Finel_light[iz] ; 
                                                   >> 196     }
                                                   >> 197     else {
                                                   >> 198       Fel = facFel - lnZ/3. ;
                                                   >> 199       Finel = facFinel - 2.*lnZ/3. ;
                                                   >> 200     }
                                                   >> 201 
                                                   >> 202     fCoulomb=GetCurrentElement()->GetfCoulomb();
                                                   >> 203     fMax   =  Fel-fCoulomb + Finel/currentZ  +  (1.+1./currentZ)/12.;
                                                   >> 204   }
                                                   >> 205 }
                                                   >> 206 
                                                   >> 207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 208 
                                                   >> 209 inline G4double 
                                                   >> 210 G4eBremsstrahlungRelModel::MaxSecondaryEnergy(const G4ParticleDefinition*,
                                                   >> 211                 G4double kineticEnergy)
                                                   >> 212 {
                                                   >> 213   return kineticEnergy;
                                                   >> 214 }
                                                   >> 215 
                                                   >> 216 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 217 
                                                   >> 218 
                                                   >> 219 inline G4double G4eBremsstrahlungRelModel::Phi1(G4double gg, G4double)
                                                   >> 220 {
                                                   >> 221   //       Thomas-Fermi FF from Tsai, eq.(3.38) for Z>=5
                                                   >> 222   return 20.863 - 2.*std::log(1. + sqr(0.55846*gg) )
                                                   >> 223     - 4.*( 1. - 0.6*std::exp(-0.9*gg) - 0.4*std::exp(-1.5*gg) );
                                                   >> 224 }
                                                   >> 225 
                                                   >> 226 inline G4double G4eBremsstrahlungRelModel::Phi1M2(G4double gg, G4double)
                                                   >> 227 {
                                                   >> 228   //       Thomas-Fermi FF from Tsai, eq. (3.39) for Z>=5
                                                   >> 229   // return Phi1(gg,Z) - 
                                                   >> 230   return 2./(3.*(1. + 6.5*gg +6.*gg*gg) );
                                                   >> 231 }
                                                   >> 232 
                                                   >> 233 inline G4double G4eBremsstrahlungRelModel::Psi1(G4double eps, G4double)
                                                   >> 234 {
                                                   >> 235   //       Thomas-Fermi FF from Tsai, eq.(3.40) for Z>=5 
                                                   >> 236   return 28.340 - 2.*std::log(1. + sqr(3.621*eps) )
                                                   >> 237     - 4.*( 1. - 0.7*std::exp(-8*eps) - 0.3*std::exp(-29.*eps) );
                                                   >> 238 }
                                                   >> 239 
                                                   >> 240 inline G4double G4eBremsstrahlungRelModel::Psi1M2(G4double eps, G4double)
                                                   >> 241 {
                                                   >> 242   //       Thomas-Fermi FF from Tsai, eq. (3.41) for Z>=5
                                                   >> 243   return  2./(3.*(1. + 40.*eps +400.*eps*eps) );
                                                   >> 244 }
                                                   >> 245 
                                                   >> 246 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 247 
                                                   >> 248 inline 
                                                   >> 249 void G4eBremsstrahlungRelModel::SetLPMconstant(G4double val) 
                                                   >> 250 {
                                                   >> 251   fLPMconstant = val;
                                                   >> 252 }
                                                   >> 253 
                                                   >> 254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 255 
                                                   >> 256 inline 
                                                   >> 257 G4double G4eBremsstrahlungRelModel::LPMconstant() const 
                                                   >> 258 {
                                                   >> 259   return fLPMconstant;
                                                   >> 260 }
                                                   >> 261 
                                                   >> 262 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
183                                                   263 
184   static const G4int          gMaxZet;         << 
185   //                                           << 
186   static const G4double       gLPMconstant;    << 
187   //                                           << 
188   static const G4double       gXGL[8];         << 
189   static const G4double       gWGL[8];         << 
190   static const G4double       gFelLowZet[8];   << 
191   static const G4double       gFinelLowZet[8]; << 
192   //                                           << 
193   struct ElementData {                         << 
194     /** @brief \f$ \ln(Z) \f$  */              << 
195     G4double  fLogZ;                           << 
196     /** @brief \f$ \ln(Z)/3 + f_c \f$  */      << 
197     G4double  fFz;                             << 
198     /** @brief \f$ ((Fel-fc)+Finel*invZ)\f$  * << 
199     G4double  fZFactor1;                       << 
200     /** @brief \f$ (Fel-fc)\f$  */             << 
201     G4double  fZFactor11;                      << 
202     /** @brief \f$ (1.0+invZ)/12  \f$  */      << 
203     G4double  fZFactor2;                       << 
204     // LPM variables                           << 
205     G4double  fVarS1;                          << 
206     G4double  fILVarS1;                        << 
207     G4double  fILVarS1Cond;                    << 
208     // constant factors to the screening funct << 
209     G4double  fGammaFactor;                    << 
210     G4double  fEpsilonFactor;                  << 
211   };                                           << 
212   //                                           << 
213   struct LPMFuncs {                            << 
214     LPMFuncs() : fIsInitialized(false), fISDel << 
215     G4bool                 fIsInitialized;     << 
216     G4double               fISDelta;           << 
217     G4double               fSLimit;            << 
218     std::vector<G4double>  fLPMFuncG;          << 
219     std::vector<G4double>  fLPMFuncPhi;        << 
220   };                                           << 
221   //                                           << 
222   static std::shared_ptr<LPMFuncs> gLPMFuncs() << 
223   static std::shared_ptr<std::vector<ElementDa << 
224   std::shared_ptr<LPMFuncs> fLPMFuncs;         << 
225   std::shared_ptr<std::vector<ElementData*>> f << 
226 };                                             << 
227                                                   264 
228 #endif                                            265 #endif
229                                                   266