Geant4 Cross Reference |
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: G4WentzelVIRelXSection.hh 94676 2015-12-02 09:51:20Z gunter $ 26 // 27 // 27 // ------------------------------------------- 28 // ------------------------------------------------------------------- 28 // 29 // 29 // 30 // 30 // GEANT4 Class header file 31 // GEANT4 Class header file 31 // 32 // 32 // 33 // 33 // File name: G4WentzelVIRelXSection 34 // File name: G4WentzelVIRelXSection 34 // 35 // 35 // Authors: V.Ivanchenko 36 // Authors: V.Ivanchenko 36 // 37 // 37 // Creation date: 08.06.2012 from G4WentzelOKa 38 // Creation date: 08.06.2012 from G4WentzelOKandVIxSection 38 // 39 // 39 // Modifications: 40 // Modifications: 40 // 41 // 41 // 42 // 42 // Class Description: 43 // Class Description: 43 // 44 // 44 // Implementation of the computation of total 45 // Implementation of the computation of total and transport cross sections, 45 // sample scattering angle for the single scat 46 // sample scattering angle for the single scattering case. 46 // to be used by single and multiple scatterin 47 // to be used by single and multiple scattering models. References: 47 // 1) G.Wentzel, Z. Phys. 40 (1927) 590. 48 // 1) G.Wentzel, Z. Phys. 40 (1927) 590. 48 // 2) J.M. Fernandez-Varea et al., NIM B73 (19 49 // 2) J.M. Fernandez-Varea et al., NIM B73 (1993) 447. 49 // 50 // 50 // ------------------------------------------- 51 // ------------------------------------------------------------------- 51 // 52 // 52 53 53 #ifndef G4WentzelVIRelXSection_h 54 #ifndef G4WentzelVIRelXSection_h 54 #define G4WentzelVIRelXSection_h 1 55 #define G4WentzelVIRelXSection_h 1 55 56 56 //....oooOO0OOooo........oooOO0OOooo........oo 57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 57 58 58 #include "G4WentzelOKandVIxSection.hh" << 59 #include "globals.hh" 59 #include "globals.hh" >> 60 #include "G4Material.hh" >> 61 #include "G4Element.hh" >> 62 #include "G4ElementVector.hh" >> 63 #include "G4NistManager.hh" >> 64 #include "G4ThreeVector.hh" >> 65 #include "G4Pow.hh" >> 66 >> 67 class G4ParticleDefinition; 60 68 61 //....oooOO0OOooo........oooOO0OOooo........oo 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 62 70 63 class G4WentzelVIRelXSection : public G4Wentze << 71 class G4WentzelVIRelXSection 64 { 72 { 65 73 66 public: 74 public: 67 75 68 explicit G4WentzelVIRelXSection(); << 76 G4WentzelVIRelXSection(G4bool combined = true); >> 77 >> 78 virtual ~G4WentzelVIRelXSection(); 69 79 70 ~G4WentzelVIRelXSection() override; << 80 void Initialise(const G4ParticleDefinition*, G4double CosThetaLim); >> 81 >> 82 void SetupParticle(const G4ParticleDefinition*); 71 83 72 // return cos(ThetaMax) for msc and cos(thet 84 // return cos(ThetaMax) for msc and cos(thetaMin) for single scattering 73 // cut = DBL_MAX means no scattering off ele 85 // cut = DBL_MAX means no scattering off electrons 74 G4double SetupKinematic(G4double kinEnergy, << 86 G4double SetupTarget(G4int Z, G4double cut); 75 87 76 G4WentzelVIRelXSection & operator= << 88 G4double ComputeTransportCrossSectionPerAtom(G4double CosThetaMax); 77 (const G4WentzelVIRelXSection &right) = dele << 89 78 G4WentzelVIRelXSection(const G4WentzelVIRel << 90 G4ThreeVector& SampleSingleScattering(G4double CosThetaMin, >> 91 G4double CosThetaMax, >> 92 G4double elecRatio); >> 93 >> 94 inline G4double ComputeNuclearCrossSection(G4double CosThetaMin, >> 95 G4double CosThetaMax); >> 96 >> 97 inline G4double ComputeElectronCrossSection(G4double CosThetaMin, >> 98 G4double CosThetaMax); >> 99 >> 100 inline G4double SetupKinematic(G4double kinEnergy, >> 101 const G4Material* mat, >> 102 G4double cut, >> 103 G4double tmass); >> 104 >> 105 inline G4double GetMomentumSquare() const; >> 106 >> 107 inline G4double GetCosThetaNuc() const; >> 108 >> 109 inline G4double GetCosThetaElec() const; >> 110 >> 111 private: >> 112 >> 113 void ComputeMaxElectronScattering(G4double cut); >> 114 >> 115 // hide assignment operator >> 116 G4WentzelVIRelXSection & operator=(const G4WentzelVIRelXSection &right); >> 117 G4WentzelVIRelXSection(const G4WentzelVIRelXSection&); >> 118 >> 119 const G4ParticleDefinition* theProton; >> 120 const G4ParticleDefinition* theElectron; >> 121 const G4ParticleDefinition* thePositron; >> 122 const G4Material* currentMaterial; >> 123 >> 124 G4NistManager* fNistManager; >> 125 G4Pow* fG4pow; >> 126 >> 127 G4ThreeVector temp; >> 128 >> 129 G4double numlimit; >> 130 >> 131 // integer parameters >> 132 G4int nwarnings; >> 133 G4int nwarnlimit; >> 134 >> 135 G4bool isCombined; >> 136 >> 137 // single scattering parameters >> 138 G4double coeff; >> 139 G4double cosTetMaxElec; >> 140 G4double cosTetMaxNuc; >> 141 G4double cosThetaMax; >> 142 G4double alpha2; >> 143 >> 144 // projectile >> 145 const G4ParticleDefinition* particle; >> 146 >> 147 G4double chargeSquare; >> 148 G4double charge3; >> 149 G4double spin; >> 150 G4double mass; >> 151 G4double tkin; >> 152 G4double mom2; >> 153 G4double momCM2; >> 154 G4double invbeta2; >> 155 G4double kinFactor; >> 156 G4double etag; >> 157 G4double ecut; >> 158 G4double lowEnergyLimit; >> 159 >> 160 // target >> 161 G4int targetZ; >> 162 G4double targetMass; >> 163 G4double screenZ; >> 164 G4double formfactA; >> 165 G4double factorA2; >> 166 G4double factB; >> 167 G4double factB1; >> 168 G4double factD; >> 169 G4double gam0pcmp; >> 170 G4double pcmp2; 79 171 >> 172 static G4double ScreenRSquare[100]; >> 173 static G4double FormFactor[100]; 80 }; 174 }; 81 175 >> 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 177 >> 178 inline G4double >> 179 G4WentzelVIRelXSection::SetupKinematic(G4double kinEnergy, >> 180 const G4Material* mat, >> 181 G4double cut, >> 182 G4double tmass) >> 183 { >> 184 if(kinEnergy != tkin || mat != currentMaterial || >> 185 ecut != cut || tmass != targetMass) { >> 186 >> 187 currentMaterial = mat; >> 188 ecut = cut; >> 189 tkin = kinEnergy; >> 190 G4double momLab2 = tkin*(tkin + 2.0*mass); >> 191 >> 192 G4double etot = tkin + mass; >> 193 G4double ptot = std::sqrt(momLab2); >> 194 G4double m12 = mass*mass; >> 195 >> 196 targetMass = tmass; >> 197 >> 198 // relativistic reduced mass from publucation >> 199 // A.P. Martynenko, R.N. Faustov, Teoret. mat. Fiz. 64 (1985) 179 >> 200 >> 201 //incident particle & target nucleus >> 202 G4double Ecm = std::sqrt(m12 + targetMass*targetMass + 2.0*etot*targetMass); >> 203 G4double mu_rel = mass*targetMass/Ecm; >> 204 G4double momCM = ptot*targetMass/Ecm; >> 205 // relative system >> 206 mom2 = momCM*momCM; >> 207 invbeta2 = 1.0 + mu_rel*mu_rel/mom2; >> 208 >> 209 factB = spin/invbeta2; >> 210 factD = std::sqrt(mom2)/tmass; >> 211 if(isCombined) { >> 212 G4double cost = 1.-factorA2*mat->GetIonisation()->GetInvA23()/mom2; >> 213 if(cost > cosTetMaxNuc) { cosTetMaxNuc = cost; } >> 214 } >> 215 } >> 216 return cosTetMaxNuc; >> 217 >> 218 } >> 219 >> 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 221 >> 222 inline G4double G4WentzelVIRelXSection::GetMomentumSquare() const >> 223 { >> 224 return mom2; >> 225 } >> 226 >> 227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 228 >> 229 inline G4double G4WentzelVIRelXSection::GetCosThetaNuc() const >> 230 { >> 231 return cosTetMaxNuc; >> 232 } >> 233 >> 234 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 235 >> 236 inline G4double G4WentzelVIRelXSection::GetCosThetaElec() const >> 237 { >> 238 return cosTetMaxElec; >> 239 } >> 240 >> 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 242 >> 243 inline G4double >> 244 G4WentzelVIRelXSection::ComputeNuclearCrossSection(G4double cosTMin, >> 245 G4double cosTMax) >> 246 { >> 247 G4double xsec = 0.0; >> 248 if(cosTMax < cosTMin) { >> 249 xsec = targetZ*kinFactor*(cosTMin - cosTMax)/ >> 250 ((1.0 - cosTMin + screenZ)*(1.0 - cosTMax + screenZ)); >> 251 } >> 252 return xsec; >> 253 } >> 254 >> 255 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 256 >> 257 inline G4double >> 258 G4WentzelVIRelXSection::ComputeElectronCrossSection(G4double cosTMin, >> 259 G4double cosTMax) >> 260 { >> 261 G4double xsec = 0.0; >> 262 G4double cost1 = std::max(cosTMin,cosTetMaxElec); >> 263 G4double cost2 = std::max(cosTMax,cosTetMaxElec); >> 264 if(cost1 > cost2) { >> 265 xsec = kinFactor*(cost1 - cost2)/ >> 266 ((1.0 - cost1 + screenZ)*(1.0 - cost2 + screenZ)); >> 267 } >> 268 return xsec; >> 269 } 82 //....oooOO0OOooo........oooOO0OOooo........oo 270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 83 271 84 #endif 272 #endif 85 273 86 274