Changeset 961 for trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.hh,v 1. 20 2007/10/24 10:42:05vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4eCoulombScatteringModel.hh,v 1.36 2008/08/04 08:49:09 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // make some members protected 46 46 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 47 // 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion 47 48 // 48 49 // Class Description: … … 75 76 public: 76 77 77 G4eCoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi, 78 G4bool build = false, G4double tlim = TeV*TeV, 79 const G4String& nam = "eCoulombScattering"); 78 G4eCoulombScatteringModel(const G4String& nam = "eCoulombScattering"); 80 79 81 80 virtual ~G4eCoulombScatteringModel(); … … 97 96 G4double maxEnergy); 98 97 98 inline void SetRecoilThreshold(G4double eth); 99 99 100 protected: 100 101 101 G4double ComputeElectronXSectionPerAtom( 102 const G4ParticleDefinition*, 103 G4double kinEnergy, 104 G4double Z, 105 G4double A, 106 G4double cut); 107 108 virtual G4double CalculateCrossSectionPerAtom( 109 const G4ParticleDefinition*, 110 G4double kinEnergy, 111 G4double Z, G4double A); 102 G4double CrossSectionPerAtom(); 103 104 G4double SampleCosineTheta(); 105 106 inline void DefineMaterial(const G4MaterialCutsCouple*); 112 107 113 108 inline void SetupParticle(const G4ParticleDefinition*); 114 109 115 inline void SetupKinematic(G4double kinEnergy );110 inline void SetupKinematic(G4double kinEnergy, G4double cut); 116 111 117 inline void SetupTarget(G4double Z, G4double A, G4doublekinEnergy);112 inline void SetupTarget(G4double Z, G4double kinEnergy); 118 113 119 114 private: 115 116 void ComputeMaxElectronScattering(G4double cut); 120 117 121 118 // hide assignment operator … … 124 121 125 122 protected: 126 123 127 124 const G4ParticleDefinition* theProton; 128 125 const G4ParticleDefinition* theElectron; 129 126 const G4ParticleDefinition* thePositron; 130 127 128 G4ParticleTable* theParticleTable; 131 129 G4ParticleChangeForGamma* fParticleChange; 132 130 G4NistManager* fNistManager; 131 const G4DataVector* currentCuts; 132 133 const G4MaterialCutsCouple* currentCouple; 134 const G4Material* currentMaterial; 135 const G4Element* currentElement; 136 G4int currentMaterialIndex; 133 137 134 138 G4double coeff; … … 136 140 G4double cosThetaMin; 137 141 G4double cosThetaMax; 142 G4double cosTetMinNuc; 138 143 G4double cosTetMaxNuc; 144 G4double cosTetMaxNuc2; 139 145 G4double cosTetMaxElec; 146 G4double cosTetMaxElec2; 140 147 G4double q2Limit; 148 G4double recoilThreshold; 141 149 G4double elecXSection; 142 150 G4double nucXSection; … … 152 160 G4double mom2; 153 161 G4double invbeta2; 162 G4double etag; 163 G4double lowEnergyLimit; 154 164 155 165 // target 156 166 G4double targetZ; 157 G4double targetA;158 167 G4double screenZ; 159 168 G4double formfactA; 169 G4int idxelm; 160 170 161 171 private: 162 172 163 G4PhysicsTable* theCrossSectionTable;164 165 173 G4double a0; 166 G4double lowKEnergy;167 G4double highKEnergy;168 174 G4double alpha2; 169 175 G4double faclim; 170 171 G4int nbins; 172 G4int nmax; 173 G4int index[100]; 174 175 G4bool buildTable; 176 G4double FF[100]; 177 176 178 G4bool isInitialised; 177 179 }; 180 181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 182 183 inline 184 void G4eCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup) 185 { 186 if(cup != currentCouple) { 187 currentCouple = cup; 188 currentMaterial = cup->GetMaterial(); 189 currentMaterialIndex = currentCouple->GetIndex(); 190 } 191 } 178 192 179 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 190 204 chargeSquare = q*q; 191 205 tkin = 0.0; 206 lowEnergyLimit = keV*mass/electron_mass_c2; 192 207 } 193 208 } … … 195 210 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 196 211 197 inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin) 198 { 199 if(ekin != tkin) { 200 tkin = ekin; 201 mom2 = tkin*(tkin + 2.0*mass); 212 inline void G4eCoulombScatteringModel::SetupKinematic(G4double ekin, 213 G4double cut) 214 { 215 if(ekin != tkin || ecut != cut) { 216 tkin = ekin; 217 mom2 = tkin*(tkin + 2.0*mass); 202 218 invbeta2 = 1.0 + mass*mass/mom2; 203 } 219 cosTetMinNuc = cosThetaMin; 220 cosTetMaxNuc = cosThetaMax; 221 if(ekin <= 10.*cut && mass < MeV && cosThetaMin < 1.0) { 222 cosTetMinNuc = ekin*(cosThetaMin + 1.0)/(10.*cut) - 1.0; 223 } 224 ComputeMaxElectronScattering(cut); 225 } 204 226 } 205 227 206 228 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 207 229 208 inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double A,209 G4double e) 210 {211 if(e != tkin || Z != targetZ || A != targetA) {230 inline void G4eCoulombScatteringModel::SetupTarget(G4double Z, G4double e) 231 { 232 if(Z != targetZ || e != etag) { 233 etag = e; 212 234 targetZ = Z; 213 targetA = A; 214 SetupKinematic(e); 215 cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/mom2); 216 G4double x = fNistManager->GetZ13(Z); 217 screenZ = a0*x*x*(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2)/mom2; 218 if(particle == theProton && A < 1.5 && cosTetMaxNuc < 0.0) 219 cosTetMaxNuc = 0.0; 235 G4int iz= G4int(Z); 236 if(iz > 99) iz = 99; 237 G4double x = fNistManager->GetZ13(iz); 238 screenZ = a0*x*x/mom2; 239 if(iz > 1) screenZ *=(1.13 + 3.76*invbeta2*Z*Z*chargeSquare*alpha2); 240 //screenZ = a0*x*x*(1.13 + 3.76*Z*Z*chargeSquare*alpha2)/mom2; 220 241 // A.V. Butkevich et al., NIM A 488 (2002) 282 221 x = fNistManager->GetLOGA(A); 222 formfactA = mom2*constn*std::exp(0.54*x); 242 formfactA = FF[iz]; 243 if(formfactA == 0.0) { 244 x = fNistManager->GetA27(iz); 245 formfactA = constn*x*x; 246 FF[iz] = formfactA; 247 } 248 formfactA *= mom2; 249 cosTetMaxNuc2 = cosTetMaxNuc; 250 if(particle == theProton && 1 == iz && cosTetMaxNuc2 < 0.0) { 251 cosTetMaxNuc2 = 0.0; 252 } 253 /* 254 G4double ee = 10.*eV*Z; 255 if(1 == iz) ee *= 2.0; 256 G4double z = std::min(cosTetMaxElec, 1.0 - std::max(ecut,ee)*amu_c2 257 *fNistManager->GetAtomicMassAmu(iz)/mom2); 258 cosTetMaxElec2 = std::max(cosTetMaxNuc2, z); 259 */ 260 cosTetMaxElec2 = cosTetMaxElec; 223 261 } 224 262 } … … 226 264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 227 265 266 inline void G4eCoulombScatteringModel::SetRecoilThreshold(G4double eth) 267 { 268 recoilThreshold = eth; 269 } 270 271 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 272 228 273 #endif
Note: See TracChangeset
for help on using the changeset viewer.