Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // ------------------------------------------- 28 // 29 // GEANT4 Class header file 30 // 31 // 32 // File name: G4eDPWAElasticDCS 33 // 34 // Author: Mihaly Novak 35 // 36 // Creation date: 02.07.2020 37 // 38 // Modifications: 39 // 40 // Class Description: 41 // 42 // Contains numerical Differential Cross Secti 43 // scattering computed by Dirac Partial Wave A 44 // - electrostatic interaction, with a local e 45 // electrons (using Dirac-Fock e- densities; 46 // charge distribution; exchange potential w 47 // - correlation-polarization (projectiles cau 48 // cloud of the target atom and the induced 49 // projectile) was accounted by using Local- 50 // - absorption: not included since it's an in 51 // responding excitations needs to be modell 52 // inelastic model). 53 // Using the above mentioned DPWA computation 54 // might lead to questionable results below fe 55 // solid state or bounding effects might start 56 // Nevertheless, the lower energy was set to 1 57 // some model even at low energies (with this 58 // kinetic energy is 100 [MeV]. 59 // 60 // The class provides interface methods for el 61 // cross section computations as well as for s 62 // deflections. These interface methods are al 63 // section computations and angular deflection 64 // 65 // References: 66 // 67 // [1] Salvat, F., Jablonski, A. and Powell, C 68 // wave calculation of elastic scattering 69 // atoms, positive ions and molecules. Com 70 // 165(2), pp.157-190. 71 // [2] Salvat, F., 2003. Optical-model potenti 72 // elastic scattering by atoms. Physical R 73 // [3] Benedito, E., Fernández-Varea, J.M. an 74 // of the multiple elastic scattering of e 75 // partial-wave differential cross-section 76 // in Physics Research Section B: Beam Int 77 // 174(1-2), pp.91-110. 78 // 79 // ------------------------------------------- 80 81 #ifndef G4eDPWAElasticDCS_h 82 #define G4eDPWAElasticDCS_h 1 83 84 85 #include <vector> 86 #include <fstream> 87 #include <iomanip> 88 #include <sstream> 89 90 #include "globals.hh" 91 #include "G4String.hh" 92 #include "G4Physics2DVector.hh" 93 94 95 #include "G4MaterialTable.hh" 96 #include "G4Material.hh" 97 #include "G4Element.hh" 98 #include "G4MaterialCutsCouple.hh" 99 #include "G4ProductionCutsTable.hh" 100 101 102 #include "G4Log.hh" 103 #include "G4Exp.hh" 104 105 106 class G4eDPWAElasticDCS { 107 108 public: 109 110 // CTR: 111 // - iselectron : data for e- (for e+ othe 112 // - isrestricted : sampling of angular defl 113 // required (i.e. in case o 114 G4eDPWAElasticDCS(G4bool iselectron=true, G4 115 116 // DTR 117 ~G4eDPWAElasticDCS(); 118 119 // initialise for a given 'iz' atomic number 120 // - nothing happens if it has already been 121 void InitialiseForZ(std::size_t iz); 122 123 // Computes the elastic, first and second cr 124 // energy and target atom. 125 // Cross sections are zero ff ekin is below/ 126 void ComputeCSPerAtom(G4int iz, G4double ek 127 G4double& tr2cs, G4dou 128 129 130 // samples cos(theta) i.e. cosine of the pol 131 // interaction (Coulomb scattering) of the p 132 // fIsElectron) with kinetic energy of exp(' 133 // muber of 'iz'. See the 'SampleCosineTheta 134 // a restricted inteval. 135 G4double SampleCosineTheta(std::size_t iz, G 136 G4double r2, G4do 137 138 // samples cos(theta) i.e. cosine of the pol 139 // interaction (Coulomb scattering) of the p 140 // fIsElectron) with kinetic energy of exp(' 141 // muber of 'iz'. 142 // The cosine theta will be in the [costMin, 143 // corresponds to a maximum allowed polar sc 144 // costMin corresponds to minimum allowed po 145 // See the 'SampleCosineTheta' for obtain sa 146 G4double SampleCosineThetaRestricted(std::si 147 G4doubl 148 G4doubl 149 150 // interpolate scattering power correction f 151 G4double ComputeScatteringPowerCorrection(co 152 G4 153 154 // build scattering power correction table a 155 void InitSCPCorrection(G4double lowEnerg 156 157 158 private: 159 160 // data structure to store one sampling tabl 161 // NOTE: when Alias is used, sampling on a r 162 // However, Alias makes possible faste 163 // of single scattering model while it 164 // when restricted interval sampling i 165 // the fIsRestrictedSamplingRequired f 166 struct OneSamplingTable { 167 OneSamplingTable () = default; 168 void SetSize(std::size_t nx, G4bool useAli 169 fN = nx; 170 // Alias 171 if (useAlias) { 172 fW.resize(nx); 173 fI.resize(nx); 174 } 175 // Ratin 176 fCum.resize(nx); 177 fA.resize(nx); 178 fB.resize(nx); 179 } 180 181 // members 182 std::size_t fN; // # 183 G4double fScreenParA; // th 184 std::vector<G4double> fW; 185 std::vector<G4double> fCum; 186 std::vector<G4double> fA; 187 std::vector<G4double> fB; 188 std::vector<G4int> fI; 189 }; 190 191 192 // loads the kinetic energy and theta grids 193 // should be called only by the master 194 void LoadGrid(); 195 196 // load DCS data for a given Z 197 void LoadDCSForZ(G4int iz); 198 199 // loads sampling table for the given Z over 200 void BuildSmplingTableForZ(G4int iz); 201 202 G4double SampleMu(std::size_t izet, std::siz 203 204 G4double FindCumValue(G4double u, const OneS 205 const std::vector<G4do 206 207 // muMin and muMax : no checks on these 208 G4double SampleMu(std::size_t izet, std::siz 209 G4double muMax); 210 211 // set the DCS data directory path 212 const G4String& FindDirectoryPath(); 213 214 // uncompress one data file into the input s 215 void ReadCompressedFile(G4String fname, std: 216 217 // compute Molier material dependent paramet 218 void ComputeMParams(const G4Material* mat, G 219 220 221 // members 222 private: 223 224 // indicates if the object is for mixed-simu 225 G4bool fIsRestrict 226 // indicates if the object is for e- (for e+ 227 G4bool fIsElectron 228 // indicates if the ekin, mu grids has alrea 229 static G4bool gIsGridLoad 230 // data directory 231 static G4String gDataDirect 232 // max atomic number (Z) for which DCS has b 233 static constexpr std::size_t gMaxZ = 103 234 // energy and theta grid(s) relaed variables 235 static std::size_t gNumEnergie 236 static std::size_t gIndxEnergy 237 static std::size_t gNumThetas1 238 static std::size_t gNumThetas2 239 static std::vector<G4double> gTheEnergie 240 static std::vector<G4double> gTheMus1; 241 static std::vector<G4double> gTheMus2; 242 static std::vector<G4double> gTheU1; 243 static std::vector<G4double> gTheU2; 244 static G4double gLogMinEkin 245 static G4double gInvDelLogE 246 // abscissas and weights of an 8 point Gauss 247 // for numerical integration on [0,1] 248 static const G4double gXGL[8]; 249 static const G4double gWGL[8]; 250 // 251 std::vector<G4Physics2DVector*> fDCS; // 252 std::vector<G4Physics2DVector*> fDCSLow; // 253 // sampling tables: only one of the followin 254 std::vector< std::vector<OneSamplingTable>* 255 // 256 // scattering power correction: to account s 257 const G4int fNumSPCEbin 258 struct SCPCorrection { 259 G4bool fIsUse; // 260 G4double fPrCut; // sec. e- 261 G4double fLEmin; // log min 262 G4double fILDel; // inverse 263 std::vector<G4double> fVSCPC; // scatteri 264 }; 265 std::vector<SCPCorrection*> fSCPCPerMat 266 267 268 }; 269 270 #endif 271