Changeset 961 for trunk/source/processes/electromagnetic/standard
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- Location:
- trunk/source/processes/electromagnetic/standard
- Files:
-
- 81 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/standard/History
r819 r961 1 $Id: History,v 1. 363.2.1 2008/04/25 00:22:53vnivanch Exp $1 $Id: History,v 1.432 2009/02/20 12:11:37 vnivanch Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 18 18 ---------------------------------------------------------- 19 19 20 25 April 08: V.Ivant (emstand-V09-00-23) 21 G4UrbanMscModel90, G4UrbanMscModel - fixed assymetry of lateral displacement 22 G4ionIonisation - use linLossLimit 0.15 as it was in 9.1 23 G4IonFluctuations - fixed discontinuity of width of the energy loss for small 24 velocities (very long alpha events) 20 20 February 09: V.Ivant (emstand-V09-02-00) 21 - Move all virtual methods from inline to source 22 G4PEEffectModel - substitute ComputeMeanFreePath by CrossSectionPerVolume 23 (minor CPU speadup for compound materials) 24 G4PAIModel, G4PAIPhotonModel - remove usage of random numbers at 25 initialisation (potential non-reproducibility) 26 G4WentzelVIModel - use generic methods of G4VMscModel to access safety 27 and other geometry information 28 29 24 November 08: V.Ivant (emstand-V09-01-45) 30 G4PSTARStopping, G4ASTARStopping - fixed non-initialized variable 31 introduced in the previous tag 32 33 19 November 08: V.Ivant (emstand-V09-01-44) 34 G4WentzelVIModel - minor fix in lateral displacement 35 36 13 November 08: A. Schaelicke (emstand-V09-01-43) 37 G4eBremsstrahlung - activate LPM switch for high energy model 38 G4eBremsstrahlungRelModel - revised LPMconstant 39 G4eBremsstrahlungModel, G4eBremsstrahlungRelModel - (VI) use LPM flag 40 from the base class 41 42 13 November 08: V.Ivant (emstand-V09-01-42) 43 G4PSTARStopping - fixed SiO2 and TEFLON data 44 G4ASTARStopping - fixed GRAFITE data 45 46 29 October 08: V.Ivant (emstand-V09-01-41) 47 G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel90, G4WentzelVIModel 48 use StepStatus from preStepPoint to identify first step for a given track 49 instaed of step number in order to address ATLAS problem of small step 50 limits happen with suspended tracks 51 52 27 October 08: V.Ivant (emstand-V09-01-40) 53 G4UrbanMscModel2 - extra protection for "UseDistanceToBoundary" option 54 G4WentzelVIModel - fixed cross section factor for single scattering 55 56 23 October 08: V.Ivant (emstand-V09-01-39) 57 G4eCoulombScatteringModel and G4WentzelVIModel - added protection against 58 precision loss in computation of cross section at high energy 59 G4UrbanMscModel2 - fixed screening parameter of the single scattering part 60 G4eMultipleScattering - set default RangeFactor = 0.04 61 62 22 October 08: V.Ivant (emstand-V09-01-38) 63 G4IonFluctuations - added G4UniversalFluctuation model, which are used for 64 high energy; added comments and cleanup 65 G4BetheBlochModel, G4BraggIonModel - take into account effective change 66 change over the step 67 G4hIonisation - switch off nuclear stopping for pi and K mesons 68 69 20 October 08: V.Ivant (emstand-V09-01-37) 70 G4UrbanMscModel2 - return back ref-08 version 71 G4IronStopping, G4MaterialStopping, G4SimpleMaterialStopping moved to materials 72 G4eBremsstrahlungHEModel - temporary model is removed 73 74 17 October 08: V.Ivant (emstand-V09-01-36) 75 G4UrbanMscModel2 - use logic of 9.1 version for step limitation 76 option "UseSafety" to fix CPU penalty in sampling 77 calorimeters (L.Urban) 78 G4UrbanMscModel2, G4UrbanMscModel, G4UrbanMscModel90 added protection 79 against sampling scattering angle with zero transport 80 cross section 81 82 15 October 08: V.Ivant (emstand-V09-01-35) 83 For all process classes set sub-types according to the enumeration 84 of G4EmProcessSubType.hh, improved cout 85 G4UrbanMscModel2 - use screning function from G4eCoulombScatteringModel 86 G4eBremsstrahlung - set relativistic model above 1 GeV by default 87 G4eBremsstrahlungModel, G4eBremsstrahlungRelModel removed private member 88 highEnergyTh and use access method to this threshold in the base class 89 90 21 September 08: V.Ivant (emstand-V09-01-34) 91 G4BetheBlochModel, G4BraggModel, G4BraggIonModel - simplified new methods 92 G4ionIonisation - use the same low-energy model for He ions and GenericIons 93 (like it was in 9.2beta) 94 95 16 September 08: V.Ivant (emstand-V09-01-33) 96 G4UrbanMscModel, G4UrbanMscModel2, G4UrbanMscModel90 - do not use 97 string comparison when compute transport cross section, instead 98 compare masses (G.Cosmo) 99 100 12 September 08: V.Ivant (emstand-V09-01-32) 101 Improved verbose output for processes 102 G4IonFluctuations - do not use Poisson sampling 103 G4BetheBlochModel, G4BraggModel, G4BraggIonModel - added methods 104 GetParticleCharge, GetChargeSquareRatio, CorrectionsAlongStep 105 needed for ions; define low and high energy limits inside the model 106 G4ionIonisation, G4hIonisation - remove InitialiseMassCharge and 107 CorrectionsAlongStep methods; 108 limits of kinetic energy for models 109 taken from the base class and from 110 models; separate trietment He ions 111 112 09 September 08: V.Ivant (emstand-V09-01-31) 113 G4WaterStopping, G4IronStopping, G4MaterialStopping, 114 G4SimpleMaterialStopping - use mass number instead of atomic mass 115 (A.Lechner proposal) 116 G4eBremsstrahlungModel - Migdal constant set to the vavue of 117 G4eBremsstrahlungRelModel (A.Schaelicke) 118 119 28 August 08: V.Ivant (emstand-V09-01-30) 120 G4WaterStopping, G4IronStopping - add method AddData to speeed up 121 compillation and cleanup 122 G4WentzelVIModel - fixed bug in lateral displacement 123 124 26 August 08: A.Schaelicke 125 G4eBremsstrahlungRelModel 126 * define threshold energy for LPM effect 127 * fix LPM calculation 128 * define Thomas-fermi FF (ala Tsai) 129 * some speed improvements 130 131 25 August 08: V.Ivant (emstand-V09-01-29) 132 G4MaterialStopping, G4SimpleMaterialStopping - fixed compillation 133 problem at Windows by adding a new method AddData 134 135 25 August 08: V.Ivant (emstand-V09-01-28) 136 23 August 08: V.Ivant (emstand-V09-01-27) 137 G4UrbanMscModel2 - fixed NaN in sampling of cosine theta for 50 GeV e- 138 139 22 August 08: V.Ivant (emstand-V09-01-26) 140 Added new classes with stopping data G4MaterialStopping, 141 G4SimpleMaterialStopping, G4IronStopping 142 143 13 August 08: V.Ivant (emstand-V09-01-25) 144 G4eCoulombScatteringModel - added extra protection for precision lost in 145 computation of recoil energy 146 G4eBremsstrahlungModel, G4eBremsstrahlungHEModel - define more precise names 147 of models 148 149 11 August 08: V.Ivant (emstand-V09-01-24) 150 G4IonFluctuations - do not perform loop over elements of material but use 151 effetive Z 152 G4UrbanMscModel2 - bug fix in ComputeTruePathLengthLimit (L.Urban) 153 154 4 August 08: V.Ivant (emstand-V09-01-23) 155 G4eMultipleScattering - allowed to be applied for all changed particles 156 G4UrbanMscModel2 - changed name to "UrbanMscUni2" 157 G4eCoulombScatteringModel and G4WentzelVIModel - added protections for ions 158 G4WaterStopping - added extra data 159 160 31 July 08: V.Ivant (emstand-V09-01-22) 161 G4WentzelVIModel, G4eCoulombScatteringModel, G4CoulombScatteringModel - 162 do not define min and max energy in constructor but use Set 163 methods 164 G4MultipleScattering, G4eMultipleScattering, G4hMultipleScattering - 165 added cout of model names 166 G4CoulombScattering - set angular limit of models by Set method 167 168 24 July 08: V.Ivant (emstand-V09-01-21) 169 G4UrbanMscModel2 - central part of scattering angle (theta0) and 170 tail of the scattering angle distribution have been tuned 171 using some e- and proton scattering data (L.Urban) 172 173 21 July 08: V.Ivant (emstand-V09-01-20) 174 G4eCoulombScatteringModel, G4CoulombScatteringModel - added usage of 175 G4ElementSelector vector, do not use A in SetupTarget method 176 G4WentzelVIModel - do not use A in SetupTarget method 177 178 16 June 08: V.Ivant (emstand-V09-01-19) 179 G4PAIPhotonModel - change model name 180 G4MultipleScattering71 - move inline virtual method to source to avoid 181 compillation warning 182 183 14 June 08: V.Ivant (emstand-V09-01-18) 184 - G4CoulombScattering - added SetHEModelLimit method to provide more easy 185 initialisation 186 187 11 June 08: V.Ivant (emstand-V09-01-17) 188 - G4eCoulombScatteringModel - SelectIsotope method moved from the derived 189 class and sampling of the recoil ion is performed 190 - G4CoulombScatteringModel - SelectIsotope method moved to the base class 191 - G4PAIxSection - new functions for resonance and Rutherford collisions 192 - G4IonFluctuations - fixed index 193 - G4ionIonisation - use G4BraggModel for low-energy ions heavier than He 194 - G4hIonisation - build separate tables for kaons to allow use hadron 195 bremsstrahlung and pair production by kaons 196 197 2 June 08: V.Ivant (emstand-V09-01-16) 198 - G4IonFluctuations - added method SetParticleAndCharge 199 - G4ionIonisation, G4ionGasIonisation - added pointer to G4IonFluctuations 200 and use of method SetParticleAndCharge; compute nuclear 201 stopping before adding corrections 202 203 20 May 08: V.Ivant (emstand-V09-01-15) 204 - G4IonFluctuations - summed fluctuation of components of a mixture instead 205 of computation for average Z 206 - G4BetheBlochModel - added projectile form-factor in computation of max 207 energy transfer and in sampling of the energy of e- 208 209 13 May 08: A.Schaelicke 210 - G4eBremsstrahlungHEModel - new model, which is an extension of the standard 211 bremsstrahlung model using a more sophisticated 212 LPM approach 213 214 09 May 08: V.Ivant (emstand-V09-01-14) 215 - G4hMultipleScattering - added method AlongStepGetPhysicalInteractionLength 216 in which for ions scaled energy normalized to one nucleon is used 217 - G4ionGasIonisation - fixed bug in update of the dynamic charge of 218 an ion 219 220 21 April 08: V.Ivant (emstand-V09-01-13) 221 - G4WentzelVIModel - new model of multiple scattering 222 - G4WaterStopping - use spline 223 - G4hMultipleScattering - do not build tables for particles with mass > GeV 224 - G4ionIonisation, G4ionGasIonisation - updated usage of high order 225 corrections 226 - G4CoulombScattering, G4eCoulombScatteringModel - use new parameter 227 polarAngleLimit 228 229 9 April 08: V.Ivant (emstand-V09-01-12) 230 - G4UrbanMscModel, G4UrbanMscModel90 - fixed assymetry in transverse 231 displacement 232 - G4eCoulombScatteringModel - fixed bug for compounds 233 234 31 March 08: V.Ivant (emstand-V09-01-11) 235 - G4eCoulombScatteringModel - use SelectAtomRandomly method 236 - G4UrbanMscModel2 (L.Urban): 237 - Simplification of step limitation in ComputeTruePathLengthLimit, 238 + tlimitmin is the same for UseDistancetoBoundary and UseSafety 239 - Reorganization of SampleCosineTheta + new method SimpleScattering 240 SimpleScattering is used if the relative energy loss is too big 241 or theta0 is too big (see data members rellossmax, theta0max) 242 - Tuning of the correction factor in ComputeTheta0 243 - exponent c of the 'tail' model function is not equal to 2 any more, 244 value of c has been extracted from some e- scattering data 245 - Step limitation in ComputeTruePathLengthLimit has been 246 simplified further + some data members have been removed 247 248 25 March 08: V.Ivant (emstand-V09-01-10) 249 - G4BetheBlochModel - use formfactor for sampling 250 - G4eCoulombScatteringModel - remove unsued array 251 252 25 March 08: V.Ivant (emstand-V09-01-09) 253 - G4ionIonisation - use default linLossLimit of 9.1 254 - G4hIonisation - use G4IonFluctuations at low energies 255 - G4IonFluctuations - fixed computation of corrections 256 - G4BetheBlochModel - finite size correction is taken into 257 account both for delta-electron cross section and DEDX 258 - G4eCoulombScatteringModel - reorganize and cleanup computation 259 of cross section 260 261 14 March 08: V.Ivant (emstand-V09-01-08) 262 - G4UrbanMscModel2 - L.Urban fix assymetry in lateral displacement 263 - G4UrbanMscModel90, G4MscModel71 - fixed warnings for gcc 4.3.0 264 265 10 March 08: V.Ivant (emstand-V09-01-07) 266 - G4MultipleScattering, G4hMultipleScattering, G4UrbanMscModel, 267 G4UrbanMscModel2, G4UrbanMscModel90 uses G4VMscModel interface 268 - G4eMultipleScattering - new process specialized for e+,e- 269 270 06 March 08: V.Ivant (emstand-V09-01-06) 271 - G4UrbanMscModel2 is cloned from G4UrbanMscModel 272 - SubType for all processes is initialized 273 274 20 February 08: V.Ivant (emstand-V09-01-05) 275 G4eCoulombScatteringModel - speedup run-time computations using 276 precomputed nuclear form-factors per element 277 278 14 February 08: V.Ivant (emstand-V09-01-04) 279 - G4ionIonisation, G4ionGasIonisation - use new method to compute 280 corrections: IonHighOrderCorrections 281 - G4BetheBlochModel - when computing dedx for ions use new 282 method IonBarkasCorrection 283 - G4IonFluctuations - added protection to the computation of 284 the correction factor to dispersion which provide smooth 285 transition to small velocities of an ion 286 287 04 February 08: V.Ivant (emstand-V09-01-03) 288 - G4hIonisation, G4ionIonisation, G4ionGasIonisation - add extra 289 protections in computation of non-ionizing energy loss 290 291 04 February 08: V.Ivant (emstand-V09-01-02) 292 G4IonFluctuations - added protection in computation of dispersion 293 on allowing have a corrected dispersion below Bohr value 25 294 26 295 16 January 08: V.Ivant (emstand-V09-01-01) 27 G4PAIModel, G4PAIPhotonModel - added an extra protection g aranteed28 correct usage of the last bin of the table of nergy transfers296 G4PAIModel, G4PAIPhotonModel - added an extra protection guaranteed 297 correct usage of the last bin of the table of energy transfers 29 298 30 299 14 January 08: V.Ivant (emstand-V09-01-00) 31 300 - G4hIonisation, G4ionIonisation, G4ionGasIonisation - fixed 32 computation of non-ionizing energy loss: at the last ioniz tion step301 computation of non-ionizing energy loss: at the last ionization step 33 302 and at energies above 2 MeV for protons; 34 - G4eCoulombScatteringModel - use more safe numerical e spression303 - G4eCoulombScatteringModel - use more safe numerical expression 35 304 36 305 07 December 07: V.Ivant (emstand-V09-00-22) … … 82 351 particle type (electron, muons, others) 83 352 - tuning ComputeGeomPathLength in order to get better low 84 energy behavio ur for heavy particles (mu, hadrons)353 energy behavior for heavy particles (mu, hadrons) 85 354 - small modification of theta0 in ComputeTheta0 (based on data) 86 355 - some old inconsistency/bug has been cured in SampleCosineTheta … … 115 384 - G4eCoulombScatteringModel and G4CoulombScatteringModel - fixed bug in 116 385 computation of screening parameters in SampleSecondary method; 117 reorgani sed initialisation of kinematics and screening parameters;386 reorganized initialisation of kinematics and screening parameters; 118 387 used Z(Z+1) factor to take into account scattering off e- 119 388 … … 149 418 - G4ionIonisation - remove obsolete method DefineMassCharge 150 419 - G4ionGasIonisation - new ion ionisation process with descrete ion charge and 151 no equilibrium b tween ion and media420 no equilibrium between ion and media 152 421 - G4BraggModel, G4BraggIonModel - more safe computation of scattering angle 153 422 … … 190 459 void, extra parameter std::vector<G4DynamicParticle*>*, all 191 460 classes using or inhereting this interface are modified. 192 About 5% spe adup of EM shower simulation461 About 5% speedup of EM shower simulation 193 462 194 463 21 May 07: V.Ivanchenko (emstand-V08-03-05) … … 203 472 204 473 18 May 07: V.Ivanchenko (emstand-V08-03-02) 205 - G4MultipleScattering, G4hMultipleScattering - reorgani semethods474 - G4MultipleScattering, G4hMultipleScattering - reorganized methods 206 475 for setting msc 207 476 parameters 208 - G4UrbanMscModel - reorgani seinitialisation; use G4MscStepLimitType477 - G4UrbanMscModel - reorganized initialisation; use G4MscStepLimitType 209 478 enumerator to choose step limit algorithm 210 479 -
trunk/source/processes/electromagnetic/standard/include/G4ASTARStopping.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ASTARStopping.hh,v 1. 5 2006/06/29 19:49:58 gunterExp $27 // GEANT4 tag $Name: $26 // $Id: G4ASTARStopping.hh,v 1.6 2008/11/13 12:04:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #ifndef G4ASTARStopping_h … … 86 86 G4double e[74][78], kinE[78]; 87 87 G4double effZ[74]; 88 G4int Znum[74];89 88 }; 90 89 -
trunk/source/processes/electromagnetic/standard/include/G4BetheBlochModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.hh,v 1. 9 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4BetheBlochModel.hh,v 1.17 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // 12-11-03 Fix for GenericIons (V.Ivanchenko) 46 46 // 24-03-05 Add G4EmCorrections (V.Ivanchenko) 47 // 11-04-05 Major optimisation of internal interfaces (V.Ivan tchenko)47 // 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko) 48 48 // 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko) 49 49 // 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma) 50 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 51 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 50 52 51 53 // … … 65 67 class G4EmCorrections; 66 68 class G4ParticleChangeForLoss; 69 class G4NistManager; 70 67 71 68 72 class G4BetheBlochModel : public G4VEmModel … … 78 82 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 79 83 80 G4double MinEnergyCut(const G4ParticleDefinition*,81 const G4MaterialCutsCouple*);84 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 85 const G4MaterialCutsCouple*); 82 86 83 87 virtual G4double ComputeCrossSectionPerElectron( … … 105 109 G4double cutEnergy); 106 110 111 virtual G4double GetChargeSquareRatio(const G4ParticleDefinition* p, 112 const G4Material* mat, 113 G4double kineticEnergy); 114 115 virtual G4double GetParticleCharge(const G4ParticleDefinition* p, 116 const G4Material* mat, 117 G4double kineticEnergy); 118 119 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*, 120 const G4DynamicParticle*, 121 G4double& eloss, 122 G4double& niel, 123 G4double length); 124 107 125 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 108 126 const G4MaterialCutsCouple*, … … 113 131 protected: 114 132 115 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,116 G4double kinEnergy);133 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 134 G4double kinEnergy); 117 135 118 136 private: … … 125 143 126 144 const G4ParticleDefinition* particle; 145 const G4Material* currentMaterial; 127 146 G4ParticleDefinition* theElectron; 128 147 G4EmCorrections* corr; 129 148 G4ParticleChangeForLoss* fParticleChange; 149 G4NistManager* nist; 130 150 131 151 G4double mass; 132 152 G4double tlimit; 133 153 G4double spin; 154 G4double magMoment2; 134 155 G4double chargeSquare; 135 156 G4double ratio; 157 G4double formfact; 136 158 G4double twoln10; 137 159 G4double bg2lim; 138 160 G4double taulim; 161 G4double corrFactor; 139 162 G4bool isIon; 163 G4bool isInitialised; 140 164 }; 141 165 142 166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 143 167 144 inline G4double G4BetheBlochModel::MaxSecondaryEnergy(145 const G4ParticleDefinition* pd,146 G4double kinEnergy)147 {148 if(isIon) SetParticle(pd);149 G4double tau = kinEnergy/mass;150 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /151 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);152 return std::min(tmax,tlimit);153 }154 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....156 157 inline void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p)158 {159 if(particle != p) {160 particle = p;161 mass = particle->GetPDGMass();162 spin = particle->GetPDGSpin();163 G4double q = particle->GetPDGCharge()/eplus;164 chargeSquare = q*q;165 ratio = electron_mass_c2/mass;166 if(mass > 120.*MeV) tlimit = 51.2*GeV*std::pow(proton_mass_c2/mass,0.66667);167 }168 }169 170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....171 172 168 #endif -
trunk/source/processes/electromagnetic/standard/include/G4BetheHeitlerModel.hh
r819 r961 25 25 // 26 26 // $Id: G4BetheHeitlerModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4BohrFluctuations.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BohrFluctuations.hh,v 1. 3 2007/09/27 13:53:11vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BohrFluctuations.hh,v 1.4 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 79 79 void InitialiseMe(const G4ParticleDefinition*); 80 80 81 protected:82 83 81 private: 84 82 … … 103 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 104 102 105 106 inline G4double G4BohrFluctuations::Dispersion(107 const G4Material* material,108 const G4DynamicParticle* dp,109 G4double& tmax,110 G4double& length)111 {112 if(!particle) InitialiseMe(dp->GetDefinition());113 114 G4double electronDensity = material->GetElectronDensity();115 kineticEnergy = dp->GetKineticEnergy();116 G4double etot = kineticEnergy + particleMass;117 beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot);118 G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length119 * electronDensity * chargeSquare;120 121 return siga;122 }123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....125 126 103 #endif 127 104 -
trunk/source/processes/electromagnetic/standard/include/G4BraggIonModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggIonModel.hh,v 1. 8 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BraggIonModel.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 43 43 // 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma) 44 44 // 25-04-06 Add stopping data from ASTAR (V.Ivanchenko) 45 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 46 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 45 47 46 48 // … … 48 50 // 49 51 // Implementation of energy loss and delta-electron production 50 // by heavy slow charged particles using eveluated data 52 // by heavy slow charged particles using ICRU'49 and NIST evaluated data 53 // for He4 ions 51 54 52 55 // ------------------------------------------------------------------- … … 60 63 61 64 class G4ParticleChangeForLoss; 65 class G4EmCorrections; 62 66 63 67 class G4BraggIonModel : public G4VEmModel … … 73 77 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 74 78 75 G4double MinEnergyCut(const G4ParticleDefinition*,76 const G4MaterialCutsCouple*);79 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 80 const G4MaterialCutsCouple*); 77 81 78 82 virtual G4double ComputeCrossSectionPerElectron( … … 106 110 G4double maxEnergy); 107 111 112 // Compute ion charge 113 virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*, 114 const G4Material*, 115 G4double kineticEnergy); 116 117 virtual G4double GetParticleCharge(const G4ParticleDefinition* p, 118 const G4Material* mat, 119 G4double kineticEnergy); 120 121 // add correction to energy loss and ompute non-ionizing energy loss 122 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*, 123 const G4DynamicParticle*, 124 G4double& eloss, 125 G4double& niel, 126 G4double length); 127 108 128 protected: 109 129 110 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,111 G4double kinEnergy);130 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 131 G4double kinEnergy); 112 132 113 133 private: … … 133 153 G4double DEDX(const G4Material* material, G4double kineticEnergy); 134 154 155 G4EmCorrections* corr; 156 135 157 const G4ParticleDefinition* particle; 136 158 G4ParticleDefinition* theElectron; … … 144 166 G4double massRate; 145 167 G4double ratio; 146 G4double highKinEnergy;147 G4double lowKinEnergy;148 168 G4double lowestKinEnergy; 149 169 G4double HeMass; 150 170 G4double massFactor; 171 G4double corrFactor; 151 172 G4double rateMassHe2p; 152 173 G4double theZieglerFactor; … … 154 175 G4int iMolecula; // index in the molecula's table 155 176 G4bool isIon; 177 G4bool isInitialised; 156 178 }; 157 158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......159 160 inline G4double G4BraggIonModel::MaxSecondaryEnergy(161 const G4ParticleDefinition* pd,162 G4double kinEnergy)163 {164 if(pd != particle) SetParticle(pd);165 G4double tau = kinEnergy/mass;166 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /167 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);168 return tmax;169 }170 179 171 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/include/G4BraggModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.hh,v 1.1 0 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BraggModel.hh,v 1.13 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // 11-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 46 46 // 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma) 47 // 25-04-06 Add stopping data from PSTAR (V.Ivanchenko) 47 // 25-04-06 Added stopping data from PSTAR (V.Ivanchenko) 48 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 49 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 48 50 49 51 // … … 51 53 // 52 54 // Implementation of energy loss and delta-electron production 53 // by heavy slow charged particles using eveluated data 55 // by heavy slow charged particles using ICRU'49 and NIST evaluated data 56 // for protons 54 57 55 58 // ------------------------------------------------------------------- … … 63 66 64 67 class G4ParticleChangeForLoss; 68 class G4EmCorrections; 65 69 66 70 class G4BraggModel : public G4VEmModel … … 76 80 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 77 81 78 G4double MinEnergyCut(const G4ParticleDefinition*,79 const G4MaterialCutsCouple*);82 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 83 const G4MaterialCutsCouple*); 80 84 81 85 virtual G4double ComputeCrossSectionPerElectron( … … 109 113 G4double maxEnergy); 110 114 115 // Compute ion charge 116 virtual G4double GetChargeSquareRatio(const G4ParticleDefinition*, 117 const G4Material*, 118 G4double kineticEnergy); 119 120 virtual G4double GetParticleCharge(const G4ParticleDefinition* p, 121 const G4Material* mat, 122 G4double kineticEnergy); 123 124 // add correction to energy loss and compute non-ionizing energy loss 125 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*, 126 const G4DynamicParticle*, 127 G4double& eloss, 128 G4double& niel, 129 G4double length); 130 111 131 protected: 112 132 113 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,114 G4double kinEnergy);133 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 134 G4double kinEnergy); 115 135 116 136 private: 117 137 118 void SetParticle(const G4ParticleDefinition* p);138 inline void SetParticle(const G4ParticleDefinition* p); 119 139 120 140 G4bool HasMaterial(const G4Material* material); … … 139 159 G4BraggModel & operator=(const G4BraggModel &right); 140 160 G4BraggModel(const G4BraggModel&); 161 162 163 G4EmCorrections* corr; 141 164 142 165 const G4ParticleDefinition* particle; … … 150 173 G4double massRate; 151 174 G4double ratio; 152 G4double highKinEnergy;153 G4double lowKinEnergy;154 175 G4double lowestKinEnergy; 155 176 G4double protonMassAMU; … … 159 180 G4int iMolecula; // index in the molecula's table 160 181 G4bool isIon; 182 G4bool isInitialised; 161 183 }; 162 163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......164 165 inline G4double G4BraggModel::MaxSecondaryEnergy(166 const G4ParticleDefinition* pd,167 G4double kinEnergy)168 {169 if(pd != particle) SetParticle(pd);170 G4double tau = kinEnergy/mass;171 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /172 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);173 return tmax;174 }175 184 176 185 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/include/G4ComptonScattering.hh
r819 r961 25 25 // 26 26 // 27 // $Id: G4ComptonScattering.hh,v 1.2 0 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4ComptonScattering.hh,v 1.21 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 //------------------ G4ComptonScattering physics process ----------------------- … … 82 82 83 83 // true for Gamma only. 84 G4bool IsApplicable(const G4ParticleDefinition&);84 virtual G4bool IsApplicable(const G4ParticleDefinition&); 85 85 86 86 // Print few lines of informations about the process: validity range, 87 87 virtual void PrintInfo(); 88 89 88 90 89 protected: … … 97 96 }; 98 97 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....101 102 inline103 G4bool G4ComptonScattering::IsApplicable(const G4ParticleDefinition& p)104 {105 return (&p == G4Gamma::Gamma());106 }107 108 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 109 99 -
trunk/source/processes/electromagnetic/standard/include/G4ComptonScattering52.hh
r819 r961 26 26 // 27 27 // $Id: G4ComptonScattering52.hh,v 1.4 2007/05/16 14:00:56 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 //------------------ G4ComptonScattering52 physics process ----------------------- -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScattering.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.hh,v 1. 8 2007/07/31 17:24:04vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4CoulombScattering.hh,v 1.12 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 65 65 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 66 66 67 void SetThetaMin(G4double);67 inline void SetThetaMin(G4double); 68 68 69 void SetThetaMax(G4double);69 inline void SetThetaMax(G4double); 70 70 71 void SetQ2Max(G4double); 71 inline void SetQ2Max(G4double); 72 73 // Set energy above which high energy model will be used 74 inline void SetHEModelLimit(G4double); 72 75 73 76 // obsolete method to be removed 74 void SetBuildTableFlag(G4bool);77 inline void SetBuildTableFlag(G4bool); 75 78 76 79 // Print out of the class parameters … … 101 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 102 105 103 inline G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p)104 {105 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived());106 }107 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....109 110 106 inline void G4CoulombScattering::SetThetaMin(G4double val) 111 107 { … … 132 128 {} 133 129 130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 131 132 inline void G4CoulombScattering::SetHEModelLimit(G4double val) 133 { 134 thEnergy = val; 135 thEnergyElec = val; 136 } 137 134 138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 135 139 -
trunk/source/processes/electromagnetic/standard/include/G4CoulombScatteringModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScatteringModel.hh,v 1.1 1 2007/10/09 08:16:29vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4CoulombScatteringModel.hh,v 1.15 2008/07/31 13:11:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 44 44 // 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel 45 45 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 46 // 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class 46 47 // 47 48 // Class Description: … … 64 65 #include "globals.hh" 65 66 66 class G4ParticleTable;67 class G4NistManager;68 69 67 class G4CoulombScatteringModel : public G4eCoulombScatteringModel 70 68 { … … 72 70 public: 73 71 74 G4CoulombScatteringModel(G4double thetaMin = 0.0, G4double thetaMax = pi, 75 G4bool build = false, G4double tlim = TeV*TeV, 76 const G4String& nam = "CoulombScattering"); 72 G4CoulombScatteringModel(const G4String& nam = "CoulombScattering"); 77 73 78 74 virtual ~G4CoulombScatteringModel(); … … 94 90 private: 95 91 96 G4double SelectIsotope(const G4Element*);97 98 92 // hide assignment operator 99 93 G4CoulombScatteringModel & operator=(const G4CoulombScatteringModel &right); 100 94 G4CoulombScatteringModel(const G4CoulombScatteringModel&); 101 95 102 G4ParticleTable* theParticleTable;103 const G4NistManager* theMatManager;104 96 }; 105 97 -
trunk/source/processes/electromagnetic/standard/include/G4GammaConversion.hh
r819 r961 25 25 // 26 26 // 27 // $Id: G4GammaConversion.hh,v 1.2 2 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4GammaConversion.hh,v 1.23 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 85 85 86 86 // true for Gamma only. 87 G4bool IsApplicable(const G4ParticleDefinition&);87 virtual G4bool IsApplicable(const G4ParticleDefinition&); 88 88 89 89 // Print few lines of informations about the process: validity range, … … 99 99 }; 100 100 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....103 104 inline G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& p)105 {106 return (&p == G4Gamma::Gamma());107 }108 109 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 110 102 -
trunk/source/processes/electromagnetic/standard/include/G4InitXscPAI.hh
r819 r961 26 26 // 27 27 // $Id: G4InitXscPAI.hh,v 1.8 2006/06/29 19:50:22 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/include/G4IonFluctuations.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IonFluctuations.hh,v 1. 3 2007/09/27 13:53:11vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4IonFluctuations.hh,v 1.9 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 16-10-03 Changed interface to Initialisation (V.Ivanchenko) 43 // 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko) 43 44 // 44 45 // Class Description: … … 54 55 55 56 #include "G4VEmFluctuationModel.hh" 57 #include "G4ParticleDefinition.hh" 58 #include "G4UniversalFluctuation.hh" 56 59 57 60 class G4IonFluctuations : public G4VEmFluctuationModel … … 64 67 virtual ~G4IonFluctuations(); 65 68 69 // Sample fluctuations 66 70 G4double SampleFluctuations(const G4Material*, 67 71 const G4DynamicParticle*, 68 G4double&,69 G4double&,70 G4double&);72 G4double& tmax, 73 G4double& length, 74 G4double& meanLoss); 71 75 72 G4double Dispersion( const G4Material*, 73 const G4DynamicParticle*, 74 G4double&, 75 G4double&); 76 // Compute dispertion 77 G4double Dispersion(const G4Material*, 78 const G4DynamicParticle*, 79 G4double& tmax, 80 G4double& length); 76 81 82 // Initialisation prerun 77 83 void InitialiseMe(const G4ParticleDefinition*); 84 85 // Initialisation prestep 86 void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2); 78 87 79 88 private: 80 89 81 G4double CoeffitientA(G4double&); 82 G4double CoeffitientB(const G4Material*, G4double&); 83 G4double RelativisticFactor(const G4Material*, G4double&); 90 G4double Factor(const G4Material*, G4double Zeff); 91 G4double RelativisticFactor(const G4Material*, G4double Zeff); 84 92 85 93 // hide assignment operator … … 87 95 G4IonFluctuations(const G4IonFluctuations&); 88 96 97 G4UniversalFluctuation uniFluct; 89 98 const G4ParticleDefinition* particle; 90 99 … … 92 101 G4double charge; 93 102 G4double chargeSquare; 94 G4double chargeSqRatio;103 G4double effChargeSquare; 95 104 96 105 // data members to speed up the fluctuation calculation 106 G4double parameter; 97 107 G4double minNumberInteractionsBohr; 98 108 G4double theBohrBeta2; -
trunk/source/processes/electromagnetic/standard/include/G4KleinNishinaCompton.hh
r819 r961 25 25 // 26 26 // $Id: G4KleinNishinaCompton.hh,v 1.9 2007/05/22 17:34:36 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4MollerBhabhaModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MollerBhabhaModel.hh,v 1. 19 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MollerBhabhaModel.hh,v 1.20 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 74 74 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 75 75 76 G4double MinEnergyCut(const G4ParticleDefinition*,77 const G4MaterialCutsCouple*);76 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 77 const G4MaterialCutsCouple*); 78 78 79 79 virtual G4double ComputeCrossSectionPerElectron( … … 109 109 protected: 110 110 111 G4double MaxSecondaryEnergy(const G4ParticleDefinition*,112 G4double kinEnergy);111 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 112 G4double kinEnergy); 113 113 114 void SetParticle(const G4ParticleDefinition* p);114 inline void SetParticle(const G4ParticleDefinition* p); 115 115 116 116 const G4ParticleDefinition* particle; … … 127 127 G4MollerBhabhaModel & operator=(const G4MollerBhabhaModel &right); 128 128 G4MollerBhabhaModel(const G4MollerBhabhaModel&); 129 130 G4bool isInitialised; 131 129 132 }; 130 133 131 134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 132 135 133 inline G4double G4MollerBhabhaModel::MaxSecondaryEnergy( 134 const G4ParticleDefinition*, 135 G4double kinEnergy) 136 inline void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p) 136 137 { 137 G4double tmax = kinEnergy; 138 if(isElectron) tmax *= 0.5; 139 return tmax; 138 particle = p; 139 if(p != theElectron) isElectron = false; 140 140 } 141 141 -
trunk/source/processes/electromagnetic/standard/include/G4MscModel71.hh
r819 r961 25 25 // 26 26 // $Id: G4MscModel71.hh,v 1.5 2007/05/22 17:34:36 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4MultipleScattering.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MultipleScattering.hh,v 1.3 5 2007/05/18 18:43:32vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MultipleScattering.hh,v 1.36 2008/03/10 10:39:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 100 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 101 101 102 class G4 UrbanMscModel;102 class G4VMscModel; 103 103 104 104 class G4MultipleScattering : public G4VMultipleScattering … … 133 133 private: // data members 134 134 135 G4 UrbanMscModel* mscUrban;135 G4VMscModel* mscUrban; 136 136 137 137 G4double lambdalimit; -
trunk/source/processes/electromagnetic/standard/include/G4MultipleScattering71.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MultipleScattering71.hh,v 1. 5 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 58 58 //------------------------------------------------------------------------------ 59 59 // 60 // $Id: G4MultipleScattering71.hh,v 1. 5 2007/05/22 17:34:36vnivanch Exp $61 // GEANT4 tag $Name: $60 // $Id: G4MultipleScattering71.hh,v 1.6 2008/07/16 11:27:41 vnivanch Exp $ 61 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 62 62 63 63 // class description … … 180 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 181 181 182 inline G4double G4MultipleScattering71::GetContinuousStepLimit(183 const G4Track& track,184 G4double,185 G4double currentMinimalStep,186 G4double&)187 {188 DefineMaterial(track.GetMaterialCutsCouple());189 const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple();190 G4double e = track.GetKineticEnergy();191 model = dynamic_cast<G4MscModel71*>(SelectModel(e));192 const G4ParticleDefinition* p = track.GetDefinition();193 G4double lambda0 = GetLambda(p, e);194 range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple);195 if(range < currentMinimalStep) currentMinimalStep = range;196 truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep);197 // G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= "198 // << lambda0 << " range= " << currentRange199 // << " currentMinStep= " << currentMinimalStep << G4endl;200 if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection;201 geomPathLength = model->GeomPathLength(LambdaTable(),couple,202 p,e,lambda0,range,truePathLength);203 if(geomPathLength > lambda0) geomPathLength = lambda0;204 return geomPathLength;205 }206 207 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....208 209 182 inline G4VParticleChange* G4MultipleScattering71::AlongStepDoIt( 210 183 const G4Track&, -
trunk/source/processes/electromagnetic/standard/include/G4PAIModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.hh,v 1.22 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 75 77 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 76 78 77 virtual void InitialiseMe(const G4ParticleDefinition*) {};78 79 virtual G4double ComputeDEDX (const G4MaterialCutsCouple*,79 virtual void InitialiseMe(const G4ParticleDefinition*); 80 81 virtual G4double ComputeDEDXPerVolume(const G4Material*, 80 82 const G4ParticleDefinition*, 81 83 G4double kineticEnergy, 82 84 G4double cutEnergy); 83 85 84 virtual G4double CrossSection (const G4MaterialCutsCouple*,86 virtual G4double CrossSectionPerVolume(const G4Material*, 85 87 const G4ParticleDefinition*, 86 88 G4double kineticEnergy, … … 118 120 119 121 void SetVerboseLevel(G4int verbose){fVerbose=verbose;}; 120 121 122 122 123 123 protected: … … 192 192 }; 193 193 194 /////////////////////////////////////////////////////////////////////195 196 inline G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,197 G4double kinEnergy)198 {199 G4double tmax = kinEnergy;200 if(p == fElectron) tmax *= 0.5;201 else if(p != fPositron) {202 G4double mass = p->GetPDGMass();203 G4double ratio= electron_mass_c2/mass;204 G4double gamma= kinEnergy/mass + 1.0;205 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /206 (1. + 2.0*gamma*ratio + ratio*ratio);207 }208 return tmax;209 }210 211 ///////////////////////////////////////////////////////////////212 213 inline void G4PAIModel::DefineForRegion(const G4Region* r)214 {215 fPAIRegionVector.push_back(r);216 }217 218 194 #endif 219 195 -
trunk/source/processes/electromagnetic/standard/include/G4PAIPhotonModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.hh,v 1.12 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 26 28 // 27 29 // ------------------------------------------------------------------- … … 68 70 public: 69 71 70 G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAI ");72 G4PAIPhotonModel(const G4ParticleDefinition* p = 0, const G4String& nam = "PAIPhoton"); 71 73 72 74 virtual ~G4PAIPhotonModel(); … … 74 76 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 75 77 76 virtual void InitialiseMe(const G4ParticleDefinition*) {};77 78 virtual G4double ComputeDEDX (const G4MaterialCutsCouple*,79 80 81 82 83 virtual G4double CrossSection (const G4MaterialCutsCouple*,84 const G4ParticleDefinition*,85 G4double kineticEnergy,86 G4double cutEnergy,87 G4double maxEnergy);78 virtual void InitialiseMe(const G4ParticleDefinition*); 79 80 virtual G4double ComputeDEDXPerVolume(const G4Material*, 81 const G4ParticleDefinition*, 82 G4double kineticEnergy, 83 G4double cutEnergy); 84 85 virtual G4double CrossSectionPerVolume(const G4Material*, 86 const G4ParticleDefinition*, 87 G4double kineticEnergy, 88 G4double cutEnergy, 89 G4double maxEnergy); 88 90 89 91 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 122 124 G4double position, G4int iTransfer ); 123 125 124 125 126 126 protected: 127 127 128 128 G4double MaxSecondaryEnergy(const G4ParticleDefinition*, 129 129 G4double kinEnergy); 130 130 131 131 private: … … 145 145 G4int fVerbose; 146 146 G4PhysicsLogVector* fProtonEnergyVector ; 147 148 149 147 150 148 // vectors … … 204 202 }; 205 203 206 /////////////////////////////////////////////////////////////////////207 208 inline G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p,209 G4double kinEnergy)210 {211 G4double tmax = kinEnergy;212 if(p == fElectron) tmax *= 0.5;213 else if(p != fPositron) {214 G4double mass = p->GetPDGMass();215 G4double ratio= electron_mass_c2/mass;216 G4double gamma= kinEnergy/mass + 1.0;217 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) /218 (1. + 2.0*gamma*ratio + ratio*ratio);219 }220 return tmax;221 }222 223 ///////////////////////////////////////////////////////////////224 225 inline void G4PAIPhotonModel::DefineForRegion(const G4Region* r)226 {227 fPAIRegionVector.push_back(r);228 }229 230 204 #endif 231 205 -
trunk/source/processes/electromagnetic/standard/include/G4PAIxSection.hh
r819 r961 25 25 // 26 26 // 27 // $Id: G4PAIxSection.hh,v 1.1 2 2006/06/29 19:50:44 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4PAIxSection.hh,v 1.15 2008/05/30 16:04:40 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 74 74 75 75 G4PAIxSection( G4int materialIndex, 76 G4double maxEnergyTransfer ) 76 G4double maxEnergyTransfer ); 77 77 78 78 G4PAIxSection( G4int materialIndex, // for proton loss table 79 79 G4double maxEnergyTransfer, 80 80 G4double betaGammaSq , 81 G4double** photoAbsCof, G4int intNumber ) 81 G4double** photoAbsCof, G4int intNumber ); 82 82 83 83 G4PAIxSection( G4int materialIndex, // test constructor 84 84 G4double maxEnergyTransfer, 85 G4double betaGammaSq ) 86 87 // G4PAIxSection(const G4PAIxSection& right) 85 G4double betaGammaSq ); 86 87 // G4PAIxSection(const G4PAIxSection& right); 88 88 89 89 // Destructor 90 90 91 ~G4PAIxSection() 91 ~G4PAIxSection(); 92 92 93 93 // Operators 94 // G4PAIxSection& operator=(const G4PAIxSection& right) 95 // G4int operator==(const G4PAIxSection& right)const 96 // G4int operator!=(const G4PAIxSection& right)const 94 // G4PAIxSection& operator=(const G4PAIxSection& right); 95 // G4int operator==(const G4PAIxSection& right)const; 96 // G4int operator!=(const G4PAIxSection& right)const; 97 97 98 98 // Methods … … 100 100 // General control functions 101 101 102 void InitPAI() 103 104 void NormShift( G4double betaGammaSq ) 105 106 void SplainPAI( G4double betaGammaSq ) 102 void InitPAI(); 103 104 void NormShift( G4double betaGammaSq ); 105 106 void SplainPAI( G4double betaGammaSq ); 107 107 108 108 // Physical methods … … 111 111 G4double RutherfordIntegral( G4int intervalNumber, 112 112 G4double limitLow, 113 G4double limitHigh ) 113 G4double limitHigh ); 114 114 115 115 G4double ImPartDielectricConst( G4int intervalNumber, 116 G4double energy ) ; 117 118 G4double RePartDielectricConst(G4double energy) ; 116 G4double energy ); 117 118 G4double GetPhotonRange( G4double energy ); 119 G4double GetElectronRange( G4double energy ); 120 121 G4double RePartDielectricConst(G4double energy); 119 122 120 123 G4double DifPAIxSection( G4int intervalNumber, 121 G4double betaGammaSq ) 124 G4double betaGammaSq ); 122 125 123 126 G4double PAIdNdxCerenkov( G4int intervalNumber, 124 G4double betaGammaSq ) ; 127 G4double betaGammaSq ); 128 G4double PAIdNdxMM( G4int intervalNumber, 129 G4double betaGammaSq ); 125 130 126 131 G4double PAIdNdxPlasmon( G4int intervalNumber, 127 G4double betaGammaSq ) ; 128 129 void IntegralPAIxSection() ; 130 void IntegralCerenkov() ; 131 void IntegralPlasmon() ; 132 133 G4double SumOverInterval(G4int intervalNumber) ; 134 G4double SumOverIntervaldEdx(G4int intervalNumber) ; 135 G4double SumOverInterCerenkov(G4int intervalNumber) ; 136 G4double SumOverInterPlasmon(G4int intervalNumber) ; 132 G4double betaGammaSq ); 133 134 G4double PAIdNdxResonance( G4int intervalNumber, 135 G4double betaGammaSq ); 136 137 void IntegralPAIxSection(); 138 void IntegralCerenkov(); 139 void IntegralMM(); 140 void IntegralPlasmon(); 141 void IntegralResonance(); 142 143 G4double SumOverInterval(G4int intervalNumber); 144 G4double SumOverIntervaldEdx(G4int intervalNumber); 145 G4double SumOverInterCerenkov(G4int intervalNumber); 146 G4double SumOverInterMM(G4int intervalNumber); 147 G4double SumOverInterPlasmon(G4int intervalNumber); 148 G4double SumOverInterResonance(G4int intervalNumber); 137 149 138 150 G4double SumOverBorder( G4int intervalNumber, 139 G4double energy ) 151 G4double energy ); 140 152 G4double SumOverBorderdEdx( G4int intervalNumber, 141 G4double energy ) 153 G4double energy ); 142 154 G4double SumOverBordCerenkov( G4int intervalNumber, 143 G4double energy ) ; 155 G4double energy ); 156 G4double SumOverBordMM( G4int intervalNumber, 157 G4double energy ); 144 158 G4double SumOverBordPlasmon( G4int intervalNumber, 145 G4double energy ) ; 146 147 G4double GetStepEnergyLoss( G4double step ) ; 148 G4double GetStepCerenkovLoss( G4double step ) ; 149 G4double GetStepPlasmonLoss( G4double step ) ; 159 G4double energy ); 160 G4double SumOverBordResonance( G4int intervalNumber, 161 G4double energy ); 162 163 G4double GetStepEnergyLoss( G4double step ); 164 G4double GetStepCerenkovLoss( G4double step ); 165 G4double GetStepMMLoss( G4double step ); 166 G4double GetStepPlasmonLoss( G4double step ); 167 G4double GetStepResonanceLoss( G4double step ); 168 169 G4double GetEnergyTransfer(); 170 G4double GetCerenkovEnergyTransfer(); 171 G4double GetMMEnergyTransfer(); 172 G4double GetPlasmonEnergyTransfer(); 173 G4double GetResonanceEnergyTransfer(); 174 G4double GetRutherfordEnergyTransfer(); 150 175 151 176 // Inline access functions 152 177 153 G4int GetNumberOfGammas() const { return fNumberOfGammas ; } 154 155 G4int GetSplineSize() const { return fSplineNumber ; } 156 157 G4int GetIntervalNumber() const { return fIntervalNumber ; } 158 159 G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i] ; } 160 161 G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i] ; } 162 G4double GetPAIdNdxCrenkov(G4int i){ return fdNdxCerenkov[i] ; } 163 G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i] ; } 164 165 G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0] ; } 166 G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0] ; } 167 G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0] ; } 168 169 G4double GetNormalizationCof() const { return fNormalizationCof ; } 178 G4int GetNumberOfGammas() const { return fNumberOfGammas; } 179 180 G4int GetSplineSize() const { return fSplineNumber; } 181 182 G4int GetIntervalNumber() const { return fIntervalNumber; } 183 184 G4double GetEnergyInterval(G4int i){ return fEnergyInterval[i]; } 185 186 G4double GetDifPAIxSection(G4int i){ return fDifPAIxSection[i]; } 187 G4double GetPAIdNdxCerenkov(G4int i){ return fdNdxCerenkov[i]; } 188 G4double GetPAIdNdxMM(G4int i){ return fdNdxMM[i]; } 189 G4double GetPAIdNdxPlasmon(G4int i){ return fdNdxPlasmon[i]; } 190 G4double GetPAIdNdxResonance(G4int i){ return fdNdxResonance[i]; } 191 192 G4double GetMeanEnergyLoss() const {return fIntegralPAIxSection[0]; } 193 G4double GetMeanCerenkovLoss() const {return fIntegralCerenkov[0]; } 194 G4double GetMeanMMLoss() const {return fIntegralMM[0]; } 195 G4double GetMeanPlasmonLoss() const {return fIntegralPlasmon[0]; } 196 G4double GetMeanResonanceLoss() const {return fIntegralResonance[0]; } 197 198 G4double GetNormalizationCof() const { return fNormalizationCof; } 170 199 171 inline G4double GetPAItable(G4int i,G4int j) const 172 173 inline G4double GetLorentzFactor(G4int i) const;200 inline G4double GetPAItable(G4int i,G4int j) const; 201 202 inline G4double GetLorentzFactor(G4int i) const; 174 203 175 inline G4double GetSplineEnergy(G4int i) const ; 176 177 inline G4double GetIntegralPAIxSection(G4int i) const ; 178 inline G4double GetIntegralPAIdEdx(G4int i) const ; 179 inline G4double GetIntegralCerenkov(G4int i) const ; 180 inline G4double GetIntegralPlasmon(G4int i) const ; 204 inline G4double GetSplineEnergy(G4int i) const; 205 206 inline G4double GetIntegralPAIxSection(G4int i) const; 207 inline G4double GetIntegralPAIdEdx(G4int i) const; 208 inline G4double GetIntegralCerenkov(G4int i) const; 209 inline G4double GetIntegralMM(G4int i) const; 210 inline G4double GetIntegralPlasmon(G4int i) const; 211 inline G4double GetIntegralResonance(G4int i) const; 181 212 182 213 protected : … … 186 217 // Local class constants 187 218 188 static const G4double fDelta 189 static const G4double fError 190 191 static G4int fNumberOfGammas ; // = 111;192 static const G4double fLorentzFactor[112] 219 static const G4double fDelta; // energy shift from interval border = 0.001 220 static const G4double fError; // error in lin-log approximation = 0.005 221 222 static G4int fNumberOfGammas; // = 111; 223 static const G4double fLorentzFactor[112]; // static gamma array 193 224 194 225 static 195 const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15) 196 197 G4int fIntervalNumber ; // The number of energy intervals 198 G4double fNormalizationCof ; // Normalization cof for PhotoAbsorptionXsection 199 200 // G4double fBetaGammaSq ; // (beta*gamma)^2 201 202 G4double fDensity ; // Current density 203 G4double fElectronDensity ; // Current electron (number) density 204 G4int fSplineNumber ; // Current size of spline 226 const G4int fRefGammaNumber ; // The number of gamma for creation of spline (15) 227 228 G4int fIntervalNumber ; // The number of energy intervals 229 G4double fNormalizationCof; // Normalization cof for PhotoAbsorptionXsection 230 231 // G4double fBetaGammaSq; // (beta*gamma)^2 232 233 G4int fMaterialIndex; // current material index 234 G4double fDensity; // Current density 235 G4double fElectronDensity; // Current electron (number) density 236 G4int fSplineNumber; // Current size of spline 205 237 206 238 // Arrays of Sandia coefficients … … 209 241 G4SandiaTable* fSandia; 210 242 211 G4double* fEnergyInterval 212 G4double* fA1 213 G4double* fA2 214 G4double* fA3 215 G4double* fA4 243 G4double* fEnergyInterval; 244 G4double* fA1; 245 G4double* fA2; 246 G4double* fA3; 247 G4double* fA4; 216 248 217 249 static 218 const G4int fMaxSplineSize 250 const G4int fMaxSplineSize ; // Max size of output splain arrays = 500 219 251 220 252 /* ****************** 221 G4double* fSplineEnergy 222 G4double* fRePartDielectricConst 223 G4double* fImPartDielectricConst 224 G4double* fIntegralTerm 225 G4double* fDifPAIxSection 226 G4double* fIntegralPAIxSection 253 G4double* fSplineEnergy; // energy points of splain 254 G4double* fRePartDielectricConst; // Real part of dielectric const 255 G4double* fImPartDielectricConst; // Imaginary part of dielectric const 256 G4double* fIntegralTerm; // Integral term in PAI cross section 257 G4double* fDifPAIxSection; // Differential PAI cross section 258 G4double* fIntegralPAIxSection; // Integral PAI cross section ? 227 259 */ /////////////// 228 260 229 261 230 G4double fSplineEnergy[500] ; // energy points of splain 231 G4double fRePartDielectricConst[500] ; // Real part of dielectric const 232 G4double fImPartDielectricConst[500] ; // Imaginary part of dielectric const 233 G4double fIntegralTerm[500] ; // Integral term in PAI cross section 234 G4double fDifPAIxSection[500] ; // Differential PAI cross section 235 G4double fdNdxCerenkov[500] ; // dNdx of Cerenkov collisions 236 G4double fdNdxPlasmon[500] ; // dNdx of Plasmon collisions 237 238 G4double fIntegralPAIxSection[500] ; // Integral PAI cross section ? 239 G4double fIntegralPAIdEdx[500] ; // Integral PAI dEdx ? 240 G4double fIntegralCerenkov[500] ; // Integral Cerenkov N>omega ? 241 G4double fIntegralPlasmon[500] ; // Integral Plasmon N>omega ? 242 243 G4double fPAItable[500][112] ; // Output array 244 245 } ; 262 G4double fSplineEnergy[500]; // energy points of splain 263 G4double fRePartDielectricConst[500]; // Real part of dielectric const 264 G4double fImPartDielectricConst[500]; // Imaginary part of dielectric const 265 G4double fIntegralTerm[500]; // Integral term in PAI cross section 266 G4double fDifPAIxSection[500]; // Differential PAI cross section 267 G4double fdNdxCerenkov[500]; // dNdx of Cerenkov collisions 268 G4double fdNdxMM[500]; // dNdx of MM-Cerenkov collisions 269 G4double fdNdxPlasmon[500]; // dNdx of Plasmon collisions 270 G4double fdNdxResonance[500]; // dNdx of resonance collisions 271 272 G4double fIntegralPAIxSection[500]; // Integral PAI cross section ? 273 G4double fIntegralPAIdEdx[500]; // Integral PAI dEdx ? 274 G4double fIntegralCerenkov[500]; // Integral Cerenkov N>omega ? 275 G4double fIntegralMM[500]; // Integral MM-Cerenkov N>omega ? 276 G4double fIntegralPlasmon[500]; // Integral Plasmon N>omega ? 277 G4double fIntegralResonance[500]; // Integral resonance N>omega ? 278 279 G4double fPAItable[500][112]; // Output array 280 281 }; 246 282 247 283 //////////////// Inline methods ////////////////////////////////// … … 251 287 inline G4double G4PAIxSection::GetPAItable(G4int i, G4int j) const 252 288 { 253 return fPAItable[i][j] 289 return fPAItable[i][j]; 254 290 } 255 291 256 292 inline G4double G4PAIxSection::GetLorentzFactor(G4int j) const 257 293 { 258 return fLorentzFactor[j] 294 return fLorentzFactor[j]; 259 295 } 260 296 … … 265 301 G4Exception("Invalid argument in G4PAIxSection::GetSplineEnergy"); 266 302 } 267 return fSplineEnergy[i] 303 return fSplineEnergy[i]; 268 304 } 269 305 … … 274 310 G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection"); 275 311 } 276 return fIntegralPAIxSection[i] 312 return fIntegralPAIxSection[i]; 277 313 } 278 314 … … 283 319 G4Exception("Invalid argument in G4PAIxSection::GetIntegralPAIxSection"); 284 320 } 285 return fIntegralPAIdEdx[i] 321 return fIntegralPAIdEdx[i]; 286 322 } 287 323 … … 292 328 G4Exception("Invalid argument in G4PAIxSection::GetIntegralCerenkov"); 293 329 } 294 return fIntegralCerenkov[i] ; 330 return fIntegralCerenkov[i]; 331 } 332 333 inline G4double G4PAIxSection::GetIntegralMM(G4int i) const 334 { 335 if(i < 1 || i > fSplineNumber) 336 { 337 G4Exception("Invalid argument in G4PAIxSection::GetIntegralMM"); 338 } 339 return fIntegralMM[i]; 295 340 } 296 341 … … 301 346 G4Exception("Invalid argument in G4PAIxSection::GetIntegralPlasmon"); 302 347 } 303 return fIntegralPlasmon[i] ; 348 return fIntegralPlasmon[i]; 349 } 350 351 inline G4double G4PAIxSection::GetIntegralResonance(G4int i) const 352 { 353 if(i < 1 || i > fSplineNumber) 354 { 355 G4Exception("Invalid argument in G4PAIxSection::GetIntegralResonance"); 356 } 357 return fIntegralResonance[i]; 304 358 } 305 359 -
trunk/source/processes/electromagnetic/standard/include/G4PAIySection.hh
r819 r961 26 26 // 27 27 // $Id: G4PAIySection.hh,v 1.1 2007/10/01 17:45:14 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PEEffectModel.hh,v 1. 6 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 06.02.2006 : added ComputeMeanFreePath() (mma) 43 // 20.02.2009 : move virtual inline to .cc, substitute 44 // ComputeMeanFreePath() by CrossSectionPerVolume (VI) 43 45 // 44 46 // Class Description: … … 70 72 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 71 73 72 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,73 74 75 76 74 virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 75 G4double kinEnergy, 76 G4double Z, 77 G4double A, 78 G4double, G4double); 77 79 78 G4double ComputeMeanFreePath( const G4ParticleDefinition*, 79 G4double kinEnergy, 80 const G4Material* material, 81 G4double, G4double); 80 virtual G4double CrossSectionPerVolume(const G4Material*, 81 const G4ParticleDefinition*, 82 G4double kineticEnergy, 83 G4double cutEnergy, 84 G4double maxEnergy); 82 85 83 86 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 100 103 }; 101 104 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....103 104 inline G4double G4PEEffectModel::ComputeCrossSectionPerAtom(105 const G4ParticleDefinition*,106 G4double energy,107 G4double Z, G4double,108 G4double, G4double)109 {110 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);111 112 G4double energy2 = energy*energy, energy3 = energy*energy2,113 energy4 = energy2*energy2;114 115 return SandiaCof[0]/energy + SandiaCof[1]/energy2 +116 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;117 }118 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....120 121 inline G4double G4PEEffectModel::ComputeMeanFreePath(122 const G4ParticleDefinition*,123 G4double energy,124 const G4Material* material,125 G4double, G4double)126 {127 G4double* SandiaCof = material->GetSandiaTable()128 ->GetSandiaCofForMaterial(energy);129 130 G4double energy2 = energy*energy, energy3 = energy*energy2,131 energy4 = energy2*energy2;132 133 G4double cross = SandiaCof[0]/energy + SandiaCof[1]/energy2 +134 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;135 136 G4double mfp = DBL_MAX;137 if (cross > 0.) mfp = 1./cross;138 return mfp;139 }140 141 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 142 106 -
trunk/source/processes/electromagnetic/standard/include/G4PSTARStopping.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PSTARStopping.hh,v 1. 4 2006/06/29 19:50:48 gunterExp $27 // GEANT4 tag $Name: $26 // $Id: G4PSTARStopping.hh,v 1.5 2008/11/13 12:04:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #ifndef G4PSTARStopping_h … … 85 85 G4double currentE, res; 86 86 G4double e[74][60], kinE[60]; 87 G4int Znum[74];88 87 }; 89 88 -
trunk/source/processes/electromagnetic/standard/include/G4PhotoElectricEffect.hh
r819 r961 25 25 // 26 26 // 27 // $Id: G4PhotoElectricEffect.hh,v 1.2 4 2007/05/23 08:47:34vnivanch Exp $28 // GEANT4 tag $Name: $27 // $Id: G4PhotoElectricEffect.hh,v 1.25 2009/02/20 12:06:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 91 91 92 92 // true for Gamma only. 93 G4bool IsApplicable(const G4ParticleDefinition&);93 virtual G4bool IsApplicable(const G4ParticleDefinition&); 94 94 95 95 // Print few lines of informations about the process: validity range, 96 v oid PrintInfo();96 virtual void PrintInfo(); 97 97 98 98 protected: 99 99 100 v oid InitialiseProcess(const G4ParticleDefinition*);100 virtual void InitialiseProcess(const G4ParticleDefinition*); 101 101 102 102 private: … … 105 105 }; 106 106 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....109 110 inline111 G4bool G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p)112 {113 return (&p == G4Gamma::Gamma());114 }115 116 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 108 -
trunk/source/processes/electromagnetic/standard/include/G4PolarizedComptonScattering.hh
r819 r961 26 26 // 27 27 // $Id: G4PolarizedComptonScattering.hh,v 1.9 2006/06/29 19:51:14 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // --------- G4PolarizedComptonScattering physics process ---------------------- -
trunk/source/processes/electromagnetic/standard/include/G4UniversalFluctuation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.hh,v 1. 5 2007/04/03 11:08:36 urbanExp $27 // GEANT4 tag $Name: $26 // $Id: G4UniversalFluctuation.hh,v 1.8 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 59 59 60 60 #include "G4VEmFluctuationModel.hh" 61 #include "G4ParticleDefinition.hh" 61 62 62 63 class G4UniversalFluctuation : public G4VEmFluctuationModel … … 69 70 virtual ~G4UniversalFluctuation(); 70 71 71 G4double SampleFluctuations(const G4Material*,72 73 74 75 72 virtual G4double SampleFluctuations(const G4Material*, 73 const G4DynamicParticle*, 74 G4double&, 75 G4double&, 76 G4double&); 76 77 77 G4double Dispersion( const G4Material*,78 79 80 78 virtual G4double Dispersion( const G4Material*, 79 const G4DynamicParticle*, 80 G4double&, 81 G4double&); 81 82 82 void InitialiseMe(const G4ParticleDefinition*); 83 // Initialisation before the run 84 virtual void InitialiseMe(const G4ParticleDefinition*); 83 85 84 protected: 86 // Initialisation prestep 87 virtual void SetParticleAndCharge(const G4ParticleDefinition*, G4double q2); 85 88 86 89 private: -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel.hh,v 1.3 1 2007/10/29 08:42:43vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4UrbanMscModel.hh,v 1.33 2008/03/10 10:39:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 91 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 92 92 93 #include "G4V EmModel.hh"93 #include "G4VMscModel.hh" 94 94 #include "G4PhysicsTable.hh" 95 95 #include "G4MscStepLimitType.hh" … … 101 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 102 102 103 class G4UrbanMscModel : public G4V EmModel103 class G4UrbanMscModel : public G4VMscModel 104 104 { 105 105 106 106 public: 107 107 108 G4UrbanMscModel(G4double facrange, G4double dtrl, G4double lambdalimit, 109 G4double facgeom,G4double skin, 110 G4bool samplez, G4MscStepLimitType stepAlg, 111 const G4String& nam = "UrbanMscUni"); 108 G4UrbanMscModel(const G4String& nam = "UrbanMscUni"); 112 109 113 110 virtual ~G4UrbanMscModel(); 114 111 115 v irtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);116 112 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 113 117 114 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle, 118 115 G4double KineticEnergy, … … 142 139 G4double KineticEnergy); 143 140 144 void SetStepLimitType(G4MscStepLimitType);145 146 void SetLateralDisplasmentFlag(G4bool val);147 148 void SetRangeFactor(G4double);149 150 void SetGeomFactor(G4double);151 152 void SetSkin(G4double);153 154 141 private: 155 142 … … 160 147 G4double LatCorrelation(); 161 148 162 G4double GetLambda(G4double kinEnergy);163 164 149 void GeomLimit(const G4Track& track); 165 150 166 void SetParticle(const G4ParticleDefinition* p); 151 inline G4double GetLambda(G4double kinEnergy); 152 153 inline void SetParticle(const G4ParticleDefinition*); 167 154 168 155 // hide assignment operator … … 178 165 G4LossTableManager* theManager; 179 166 180 181 167 G4double mass; 182 168 G4double charge; … … 188 174 G4double taulim; 189 175 G4double currentTau; 190 G4double dtrl;191 192 G4double lambdalimit;193 G4double facrange;194 176 G4double frscaling1,frscaling2; 195 177 G4double tlimit; … … 201 183 G4double geommin; 202 184 G4double geomlimit; 203 G4double facgeom;204 G4double skin;205 185 G4double skindepth; 206 186 G4double smallstep; 207 187 208 188 G4double presafety; 209 G4double facsafety;210 189 211 190 G4double lambda0; … … 213 192 G4double tPathLength; 214 193 G4double zPathLength; 215 G4double par1,par2,par3 216 217 G4double stepmin 194 G4double par1,par2,par3; 195 196 G4double stepmin; 218 197 219 198 G4double currentKinEnergy; … … 225 204 G4int currentMaterialIndex; 226 205 227 G4MscStepLimitType steppingAlgorithm;228 229 G4bool samplez;230 G4bool latDisplasment;231 206 G4bool isInitialized; 232 233 207 G4bool inside; 234 208 G4bool insideskin; 235 209 236 210 }; 237 238 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......239 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......240 241 inline242 void G4UrbanMscModel::SetLateralDisplasmentFlag(G4bool val)243 {244 latDisplasment = val;245 }246 247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......248 249 inline250 void G4UrbanMscModel::SetSkin(G4double val)251 {252 skin = val;253 stepmin = tlimitminfix;254 skindepth = skin*stepmin;255 }256 257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......258 259 inline260 void G4UrbanMscModel::SetRangeFactor(G4double val)261 {262 facrange = val;263 }264 265 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......266 267 inline268 void G4UrbanMscModel::SetGeomFactor(G4double val)269 {270 facgeom = val;271 }272 273 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......274 275 inline276 void G4UrbanMscModel::SetStepLimitType(G4MscStepLimitType val)277 {278 steppingAlgorithm = val;279 }280 211 281 212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/include/G4UrbanMscModel90.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel90.hh,v 1. 1 2007/12/07 17:35:52vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4UrbanMscModel90.hh,v 1.4 2008/10/29 14:15:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 56 56 57 #include "G4V EmModel.hh"57 #include "G4VMscModel.hh" 58 58 #include "G4PhysicsTable.hh" 59 59 #include "G4MscStepLimitType.hh" … … 65 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 66 67 class G4UrbanMscModel90 : public G4V EmModel67 class G4UrbanMscModel90 : public G4VMscModel 68 68 { 69 69 70 70 public: 71 71 72 G4UrbanMscModel90(G4double facrange, G4double dtrl, G4double lambdalimit, 73 G4double facgeom,G4double skin, 74 G4bool samplez, G4MscStepLimitType stepAlg, 75 const G4String& nam = "UrbanMscUni"); 72 G4UrbanMscModel90(const G4String& nam = "UrbanMscUni90"); 76 73 77 74 virtual ~G4UrbanMscModel90(); 78 75 79 v irtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);76 void Initialise(const G4ParticleDefinition*, const G4DataVector&); 80 77 81 78 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition* particle, … … 106 103 G4double KineticEnergy); 107 104 108 void SetStepLimitType(G4MscStepLimitType);109 110 void SetLateralDisplasmentFlag(G4bool val);111 112 void SetRangeFactor(G4double);113 114 void SetGeomFactor(G4double);115 116 void SetSkin(G4double);117 118 105 private: 119 106 … … 124 111 G4double LatCorrelation(); 125 112 126 G4double GetLambda(G4double kinEnergy);127 128 113 void GeomLimit(const G4Track& track); 129 114 130 void SetParticle(const G4ParticleDefinition* p); 115 inline G4double GetLambda(G4double kinEnergy); 116 117 inline void SetParticle(const G4ParticleDefinition*); 131 118 132 119 // hide assignment operator … … 142 129 G4LossTableManager* theManager; 143 130 144 145 131 G4double mass; 146 132 G4double charge; … … 152 138 G4double taulim; 153 139 G4double currentTau; 154 G4double dtrl;155 156 G4double lambdalimit;157 G4double facrange;158 140 G4double frscaling1,frscaling2; 159 141 G4double tlimit; … … 165 147 G4double geommin; 166 148 G4double geomlimit; 167 G4double facgeom;168 G4double skin;169 149 G4double skindepth; 170 150 G4double smallstep; 171 151 172 152 G4double presafety; 173 G4double facsafety;174 153 175 154 G4double lambda0; … … 177 156 G4double tPathLength; 178 157 G4double zPathLength; 179 G4double par1,par2,par3 180 181 G4double stepmin 158 G4double par1,par2,par3; 159 160 G4double stepmin; 182 161 183 162 G4double currentKinEnergy; … … 189 168 G4int currentMaterialIndex; 190 169 191 G4MscStepLimitType steppingAlgorithm;192 193 G4bool samplez;194 G4bool latDisplasment;195 170 G4bool isInitialized; 196 197 171 G4bool inside; 198 172 G4bool insideskin; 199 173 200 174 }; 201 202 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......204 205 inline206 void G4UrbanMscModel90::SetLateralDisplasmentFlag(G4bool val)207 {208 latDisplasment = val;209 }210 211 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......212 213 inline214 void G4UrbanMscModel90::SetSkin(G4double val)215 {216 skin = val;217 stepmin = tlimitminfix;218 skindepth = skin*stepmin;219 }220 221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......222 223 inline224 void G4UrbanMscModel90::SetRangeFactor(G4double val)225 {226 facrange = val;227 }228 229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......230 231 inline232 void G4UrbanMscModel90::SetGeomFactor(G4double val)233 {234 facgeom = val;235 }236 237 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......238 239 inline240 void G4UrbanMscModel90::SetStepLimitType(G4MscStepLimitType val)241 {242 steppingAlgorithm = val;243 }244 175 245 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/include/G4WaterStopping.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.hh,v 1. 2 2006/06/29 19:51:56 gunterExp $27 // GEANT4 tag $Name: $26 // $Id: G4WaterStopping.hh,v 1.6 2008/09/09 09:30:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 #ifndef G4WaterStopping_h … … 60 60 public: 61 61 62 G4WaterStopping(G4EmCorrections* corr = 0 );62 G4WaterStopping(G4EmCorrections* corr = 0, G4bool splineFlag = true); 63 63 64 64 ~G4WaterStopping(); … … 70 70 void Initialise(G4EmCorrections*); 71 71 72 void AddData(G4double* energy, G4double* stoppower, G4double factor); 73 72 74 // hide assignment operator 73 75 G4WaterStopping & operator=(const G4WaterStopping &right); 74 76 G4WaterStopping(const G4WaterStopping&); 75 77 76 G4int Z[8]; 77 G4int A[8]; 78 G4bool spline; 79 G4int Z[16]; 80 G4double A[16]; 78 81 std::vector<G4LPhysicsFreeVector*> dedx; 79 82 }; -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlung.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlung.hh,v 1.3 6 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eBremsstrahlung.hh,v 1.37 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 89 89 virtual ~G4eBremsstrahlung(); 90 90 91 G4bool IsApplicable(const G4ParticleDefinition& p);91 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 92 92 93 93 // Print out of the class parameters … … 111 111 112 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....114 115 inline G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p)116 {117 return (&p == G4Electron::Electron() || &p == G4Positron::Positron());118 }119 120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....121 113 122 114 #endif -
trunk/source/processes/electromagnetic/standard/include/G4eBremsstrahlungModel.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.hh,v 1.2 2 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eBremsstrahlungModel.hh,v 1.26 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 69 69 70 70 G4eBremsstrahlungModel(const G4ParticleDefinition* p = 0, 71 const G4String& nam = " StandBrem");71 const G4String& nam = "eBrem"); 72 72 73 73 virtual ~G4eBremsstrahlungModel(); … … 75 75 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 76 76 77 G4double MinEnergyCut(const G4ParticleDefinition*,78 const G4MaterialCutsCouple*);77 virtual G4double MinEnergyCut(const G4ParticleDefinition*, 78 const G4MaterialCutsCouple*); 79 79 80 80 virtual G4double ComputeDEDXPerVolume(const G4Material*, … … 101 101 G4double maxEnergy); 102 102 103 inline void SetLPMflag(G4bool val);104 inline G4bool LPMflag() const;105 106 inline void SetEnergyThreshold(G4double val);107 inline G4double EnergyThreshold() const;108 109 103 protected: 110 111 inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,112 G4double kineticEnergy);113 104 114 105 const G4Element* SelectRandomAtom(const G4MaterialCutsCouple* couple); … … 154 145 G4double MigdalConstant; 155 146 G4double LPMconstant; 156 G4double highEnergyTh;157 G4bool theLPMflag;158 147 G4bool isInitialised; 159 148 … … 199 188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 200 189 201 inline202 G4double G4eBremsstrahlungModel::MaxSecondaryEnergy(203 const G4ParticleDefinition*,204 G4double kineticEnergy)205 {206 return kineticEnergy;207 }208 209 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....210 211 inline212 void G4eBremsstrahlungModel::SetLPMflag(G4bool val)213 {214 theLPMflag = val;215 }216 217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....218 219 inline220 G4bool G4eBremsstrahlungModel::LPMflag() const221 {222 return theLPMflag;223 }224 225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....226 227 inline228 void G4eBremsstrahlungModel::SetEnergyThreshold(G4double val)229 {230 highEnergyTh = val;231 }232 233 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....234 235 inline236 G4double G4eBremsstrahlungModel::EnergyThreshold() const237 {238 return highEnergyTh;239 }240 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....242 243 190 #endif -
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 -
trunk/source/processes/electromagnetic/standard/include/G4eIonisation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisation.hh,v 1.3 5 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eIonisation.hh,v 1.36 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 88 88 virtual ~G4eIonisation(); 89 89 90 G4bool IsApplicable(const G4ParticleDefinition& p);90 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 91 91 92 92 // Print out of the class parameters … … 98 98 const G4ParticleDefinition*); 99 99 100 G4double MinPrimaryEnergy(const G4ParticleDefinition*,101 const G4Material*, G4double cut);100 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*, 101 const G4Material*, G4double cut); 102 102 103 103 private: … … 114 114 }; 115 115 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....118 119 inline G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,120 const G4Material*,121 G4double cut)122 {123 G4double x = cut;124 if(isElectron) x += cut;125 return x;126 }127 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....129 130 inline G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p)131 {132 return (&p == G4Electron::Electron() || &p == G4Positron::Positron());133 }134 135 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 117 -
trunk/source/processes/electromagnetic/standard/include/G4eeToTwoGammaModel.hh
r819 r961 25 25 // 26 26 // $Id: G4eeToTwoGammaModel.hh,v 1.14 2007/05/23 08:47:34 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/include/G4eplusAnnihilation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eplusAnnihilation.hh,v 1.2 3 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eplusAnnihilation.hh,v 1.24 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 73 73 virtual ~G4eplusAnnihilation(); 74 74 75 G4bool IsApplicable(const G4ParticleDefinition& p);75 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 76 76 77 77 virtual G4VParticleChange* AtRestDoIt( … … 79 79 const G4Step& stepData); 80 80 81 G4double AtRestGetPhysicalInteractionLength(81 virtual G4double AtRestGetPhysicalInteractionLength( 82 82 const G4Track& track, 83 83 G4ForceCondition* condition … … 96 96 }; 97 97 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....100 101 inline G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p)102 {103 return (&p == G4Positron::Positron());104 }105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....107 108 inline109 G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength(110 const G4Track&, G4ForceCondition* condition)111 {112 *condition = NotForced;113 return 0.0;114 }115 116 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 99 -
trunk/source/processes/electromagnetic/standard/include/G4hIonisation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.hh,v 1. 38 2008/01/14 11:59:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4hIonisation.hh,v 1.42 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 63 63 // 08-04-05 Major optimisation of internal interfaces (V.Ivantchenko) 64 64 // 11-04-04 Move MaxSecondaryEnergy to models (V.Ivanchenko) 65 // 12-09-08 Removed CorrectionsAlongStep (VI) 65 66 // 66 67 // Class Description: … … 80 81 #include "G4Positron.hh" 81 82 #include "globals.hh" 82 #include "G4VEmModel.hh"83 #include "G4EmCorrections.hh"84 83 85 84 class G4Material; … … 94 93 virtual ~G4hIonisation(); 95 94 96 G4bool IsApplicable(const G4ParticleDefinition& p);95 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 97 96 98 G4double MinPrimaryEnergy(const G4ParticleDefinition* p,99 const G4Material*, G4double cut);97 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 98 const G4Material*, G4double cut); 100 99 101 100 // Print out of the class parameters … … 105 104 106 105 protected: 107 108 void CorrectionsAlongStep(109 const G4MaterialCutsCouple*,110 const G4DynamicParticle*,111 G4double& eloss,112 G4double& length);113 106 114 107 virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*, … … 121 114 G4hIonisation(const G4hIonisation&); 122 115 116 G4bool isInitialised; 117 G4bool nuclearStopping; 118 123 119 G4double mass; 124 120 G4double ratio; 125 126 const G4ParticleDefinition* theParticle; 127 const G4ParticleDefinition* theBaseParticle; 128 G4EmCorrections* corr; 129 130 G4bool isInitialised; 131 G4bool nuclearStopping; 132 133 G4double eth; 134 G4double ethnuc; 135 G4double massratio; 136 121 G4double eth; 137 122 }; 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....141 142 inline G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p)143 {144 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV &&145 !p.IsShortLived());146 }147 148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....149 150 inline G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*,151 const G4Material*,152 G4double cut)153 {154 G4double x = 0.5*cut/electron_mass_c2;155 G4double y = electron_mass_c2/mass;156 G4double g = x*y + std::sqrt((1. + x)*(1. + x*y*y));157 return mass*(g - 1.0);158 }159 123 160 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/include/G4hMultipleScattering.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hMultipleScattering.hh,v 1. 4 2007/12/07 17:35:52vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4hMultipleScattering.hh,v 1.6 2008/05/09 08:23:44 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 60 60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 61 61 62 class G4 UrbanMscModel90;62 class G4VMscModel; 63 63 64 64 class G4hMultipleScattering : public G4VMultipleScattering … … 86 86 void SetLambdalimit(G4double value) { lambdalimit = value;}; 87 87 88 // The function overloads the corresponding function of the base 89 // class.It limits the step near to boundaries only 90 // and invokes the method GetMscContinuousStepLimit at every step. 91 G4double AlongStepGetPhysicalInteractionLength( 92 const G4Track&, 93 G4double previousStepSize, 94 G4double currentMinimalStep, 95 G4double& currentSafety, 96 G4GPILSelection* selection); 97 88 98 protected: 89 99 … … 93 103 private: // data members 94 104 95 G4 UrbanMscModel90* mscUrban;105 G4VMscModel* mscUrban; 96 106 97 107 G4double lambdalimit; … … 100 110 G4bool samplez; 101 111 G4bool isInitialized; 112 G4bool isIon; 102 113 103 114 }; -
trunk/source/processes/electromagnetic/standard/include/G4ionGasIonisation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionGasIonisation.hh,v 1. 2 2007/08/13 06:13:30vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ionGasIonisation.hh,v 1.4 2008/09/12 16:26:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 #include "G4ionIonisation.hh" 56 56 57 class G4Material;58 59 57 class G4ionGasIonisation : public G4ionIonisation 60 58 { … … 65 63 virtual ~G4ionGasIonisation(); 66 64 67 virtual void PrintInfo();68 69 protected:70 71 // Initialise process before run72 virtual void InitialiseEnergyLossProcess(73 const G4ParticleDefinition*,74 const G4ParticleDefinition*);75 76 // Initialise dynamic charge before step77 virtual void InitialiseMassCharge(const G4Track&);78 79 // Apply correction after step and modify dynamic charge80 virtual void CorrectionsAlongStep(81 const G4MaterialCutsCouple*,82 const G4DynamicParticle*,83 G4double& eloss,84 G4double& length);85 86 65 private: 87 88 // Sample change of charge of the projectile ion89 G4double SampleChargeAfterStep(G4double qeff, G4double xeff);90 66 91 67 // hide assignment operator 92 68 G4ionGasIonisation & operator=(const G4ionGasIonisation &right); 93 69 G4ionGasIonisation(const G4ionGasIonisation&); 94 95 const G4ParticleDefinition* currParticle;96 const G4ParticleDefinition* baseParticle;97 98 G4double basePartMass;99 G4double currMassRatio;100 G4double atomXS;101 G4double preStepKinEnergy;102 103 G4int currentIonZ;104 G4int ionZ;105 106 G4bool initialised;107 108 70 }; 109 71 -
trunk/source/processes/electromagnetic/standard/include/G4ionIonisation.hh
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.hh,v 1.5 0 2007/11/09 11:45:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ionIonisation.hh,v 1.57 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 57 57 // 22-07-06 Remove obsolete method (V.Ivantchenko) 58 58 // 07-11-07 Moved CorrectionsAlongStep to cc (V.Ivantchenko) 59 // 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI) 59 60 // 60 61 // Class Description: … … 72 73 73 74 #include "G4VEnergyLossProcess.hh" 74 #include "G4ionEffectiveCharge.hh"75 #include "G4VEmModel.hh"76 #include "G4EmCorrections.hh"77 75 78 76 class G4Material; 79 class G4PhysicsVector; 80 class G4BraggIonModel; 77 class G4EmCorrections; 81 78 82 79 class G4ionIonisation : public G4VEnergyLossProcess … … 88 85 virtual ~G4ionIonisation(); 89 86 90 inlineG4bool IsApplicable(const G4ParticleDefinition& p);87 virtual G4bool IsApplicable(const G4ParticleDefinition& p); 91 88 92 89 // Print out of the class parameters … … 94 91 95 92 void AddStoppingData(G4int Z, G4int A, const G4String& materialName, 96 G4PhysicsVector &dVector);93 G4PhysicsVector* dVector); 97 94 98 95 void ActivateStoppingData(G4bool); … … 105 102 const G4ParticleDefinition*); 106 103 107 virtual void CorrectionsAlongStep(const G4MaterialCutsCouple*, 108 const G4DynamicParticle*, 109 G4double& eloss, 110 G4double& length); 111 112 inline void InitialiseMassCharge(const G4Track&); 113 114 inline G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 104 virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p, 115 105 const G4Material*, G4double cut); 116 106 … … 118 108 119 109 inline G4bool NuclearStoppingFlag(); 120 121 // protected pointers122 G4ionEffectiveCharge* effCharge;123 G4EmCorrections* corr;124 110 125 111 private: … … 129 115 G4ionIonisation(const G4ionIonisation&); 130 116 131 // cash 132 const G4Material* curMaterial; 133 const G4ParticleDefinition* curParticle; 117 G4EmCorrections* corr; 118 134 119 const G4ParticleDefinition* theParticle; 135 const G4ParticleDefinition* theBaseParticle;136 120 137 G4double preKinEnergy;121 G4double eth; 138 122 139 G4double eth; 140 G4double baseMass; 141 G4double massRatio; 142 G4double massFactor; 143 G4double charge2; 144 145 G4bool isInitialised; 146 G4bool stopDataActive; 147 G4bool nuclearStopping; 123 G4bool isInitialised; 124 G4bool stopDataActive; 125 G4bool nuclearStopping; 148 126 }; 149 127 150 128 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....152 153 inline G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p)154 {155 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() &&156 p.GetParticleType() == "nucleus");157 }158 159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....160 161 inline G4double G4ionIonisation::MinPrimaryEnergy(162 const G4ParticleDefinition*, const G4Material*, G4double cut)163 {164 G4double x = 0.5*cut/electron_mass_c2;165 G4double g = std::sqrt(1. + x);166 return proton_mass_c2*(g - 1.0);167 }168 169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....170 171 inline void G4ionIonisation::InitialiseMassCharge(const G4Track& track)172 {173 preKinEnergy = track.GetKineticEnergy();174 massRatio = baseMass/track.GetDynamicParticle()->GetMass();175 charge2 = effCharge->EffectiveChargeSquareRatio(track.GetDefinition(),176 track.GetMaterial(),177 preKinEnergy);178 SetDynamicMassCharge(massRatio, charge2);179 }180 181 129 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 182 130 -
trunk/source/processes/electromagnetic/standard/src/G4ASTARStopping.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ASTARStopping.cc,v 1. 6 2006/06/29 19:52:36 gunterExp $27 // GEANT4 tag $Name: $26 // $Id: G4ASTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 53 53 G4ASTARStopping::G4ASTARStopping() 54 54 { 55 currentE = 0.0; 55 56 currentMaterial = 0; 56 57 index = 0; … … 72 73 for (G4int i=0; i<74; i++){ 73 74 if (matName == name[i]){ 74 matIndex = -1;75 matIndex = i; 75 76 currentMaterial = mat; 76 77 return i; … … 102 103 return res; 103 104 } else if (energy >= kinE[77]) { 104 index = 58;105 index = 76; 105 106 res = e[matIndex][77]; 106 107 return res; … … 134 135 for(i=0; i<74; i++) {effZ[i]=Z[i];} 135 136 136 name [0] = "G4_A-150_TISSUE"; 137 Znum [0] = 0; 138 137 name [0] = "G4_A-150_TISSUE"; 139 138 G4double T0[78] = { 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01, 0.0125, 0.015, 0.0175, 0.02, 0.0225, 0.025, 0.0275, 0.03, 0.035, 0.04, 0.045, 0.05, 0.055, 0.06, 0.065, 0.07, 0.075, 0.08, 0.085, 0.09, 0.095, 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10 }; 140 139 … … 145 144 146 145 name [1] = "G4_ACETYLENE"; 147 Znum [1] = 0;148 149 146 G4double e1[78] = { 192.2, 229.4, 260.2, 287, 311, 353.1, 389.7, 422.5, 452.4, 480.1, 506, 530.3, 585.9, 635.7, 681.2, 723.2, 762.5, 799.4, 834.3, 867.5, 929.6, 986.9, 1040, 1090, 1137, 1182, 1224, 1265, 1304, 1341, 1376, 1411, 1444, 1475, 1619, 1741, 1847, 1938, 2017, 2085, 2144, 2195, 2275, 2331, 2367, 2388, 2397, 2395, 2386, 2370, 2350, 2326, 2299, 2271, 2241, 2210, 2056, 1913, 1783, 1666, 1562, 1468, 1384, 1308, 1177, 1072, 986.8, 915.5, 855, 802.8, 757.2, 717.1, 681.4, 649.5, 620.7, 594.7, 570.9, 549.2 }; 150 147 … … 152 149 153 150 name [2] = "G4_ADIPOSE_TISSUE_ICRP"; 154 Znum [2] = 0;155 156 151 G4double e2[78] = { 169.4, 204.2, 233.3, 258.8, 281.8, 322.4, 358.1, 390.2, 419.7, 447.2, 472.9, 497.2, 552.9, 603.2, 649.4, 692.4, 732.7, 770.7, 806.8, 841.3, 906, 966.1, 1022, 1075, 1125, 1173, 1219, 1262, 1304, 1344, 1383, 1420, 1456, 1491, 1650, 1787, 1907, 2012, 2104, 2185, 2256, 2317, 2417, 2489, 2539, 2571, 2588, 2592, 2587, 2573, 2554, 2529, 2500, 2468, 2434, 2398, 2213, 2035, 1874, 1731, 1605, 1499, 1408, 1328, 1197, 1091, 1004, 932.2, 870.7, 817.8, 771.5, 730.8, 694.5, 662.1, 632.9, 606.4, 582.3, 560.2 }; 157 152 … … 159 154 160 155 name [3] = "G4_Ag"; 161 Znum [3] = 47;162 163 156 G4double e3[78] = { 31.26, 38.13, 43.91, 48.98, 53.56, 61.66, 68.79, 75.21, 81.11, 86.6, 91.74, 96.6, 107.7, 117.8, 127, 135.6, 143.6, 151.2, 158.4, 165.3, 178.2, 190.2, 201.4, 212, 222, 231.6, 240.7, 249.5, 257.9, 266, 273.9, 281.4, 288.8, 295.9, 328.8, 357.8, 383.8, 407.4, 428.8, 448.4, 466.3, 482.8, 511.8, 536.2, 556.6, 573.5, 587.3, 598.4, 607.2, 613.8, 618.5, 621.6, 623.4, 623.8, 623.3, 621.8, 604.4, 578.7, 550.8, 523.3, 497.6, 474.4, 453.6, 435, 402.7, 375.9, 353.2, 333.6, 316.9, 302, 288.8, 276.9, 266.2, 256.5, 247.7, 239.5, 232, 225.1 }; 164 157 … … 166 159 167 160 name [4] = "G4_AIR"; 168 Znum [4] = 0;169 170 161 G4double e4[78] = { 87.5, 108.6, 126.7, 142.7, 157.3, 183.5, 206.7, 227.9, 247.5, 265.9, 283.2, 299.6, 337.7, 372.3, 404.3, 434.3, 462.6, 489.4, 515, 539.5, 585.8, 629, 669.6, 708.1, 744.8, 779.8, 813.4, 845.7, 876.8, 906.8, 935.9, 964, 991.3, 1018, 1140, 1247, 1343, 1429, 1506, 1575, 1637, 1693, 1787, 1861, 1918, 1961, 1990, 2008, 2017, 2019, 2013, 2002, 1987, 1968, 1946, 1922, 1774, 1625, 1494, 1382, 1287, 1205, 1133, 1072, 968.6, 885.9, 818, 760.7, 711.7, 669.6, 632.7, 600.2, 571.2, 545.3, 521.9, 500.6, 481.2, 463.4 }; 171 162 … … 173 164 174 165 name [5] = "G4_Al"; 175 Znum [5] = 13;176 177 166 G4double e5[78] = { 55.8, 71.89, 86.05, 98.92, 110.9, 132.7, 152.5, 170.9, 188.2, 204.5, 220.1, 235.1, 270.1, 302.5, 332.8, 361.5, 388.6, 414.6, 439.4, 463.3, 508.4, 550.4, 589.6, 626.5, 661.1, 693.7, 724.3, 753.2, 780.3, 805.9, 830.1, 852.8, 874.3, 894.5, 980, 1045, 1096, 1136, 1168, 1195, 1216, 1234, 1262, 1280, 1291, 1297, 1298, 1297, 1293, 1286, 1279, 1269, 1259, 1248, 1237, 1225, 1161, 1098, 1039, 984.9, 937.6, 895.4, 856.8, 821, 756.1, 698.6, 647.8, 604.8, 567.8, 535.7, 507.4, 482.4, 460, 439.8, 421.6, 405.1, 389.9, 376 }; 178 167 … … 180 169 181 170 name [6] = "G4_ALUMINUM_OXIDE"; 182 Znum [6] = 0;183 184 171 G4double e6[78] = { 71.39, 88.59, 103.3, 116.4, 128.4, 149.9, 169, 186.5, 202.8, 218, 232.3, 246, 277.7, 306.6, 333.4, 358.5, 382.1, 404.6, 426, 446.5, 485, 520.9, 554.3, 585.8, 615.5, 643.5, 670, 695.2, 719.1, 741.9, 763.6, 784.3, 804, 822.9, 905.9, 974, 1031, 1080, 1122, 1159, 1191, 1220, 1267, 1304, 1332, 1353, 1368, 1378, 1383, 1385, 1384, 1381, 1376, 1370, 1362, 1352, 1308, 1253, 1187, 1115, 1044, 982.5, 928.4, 880, 801.2, 737, 683.4, 638.1, 599.1, 565.2, 535.4, 508.9, 485.3, 464, 444.8, 427.3, 411.4, 396.7 }; 185 172 … … 187 174 188 175 name [7] = "G4_Ar"; 189 Znum [7] = 40;190 191 176 G4double e7[78] = { 34.54, 44.56, 53.39, 61.42, 68.88, 82.53, 94.95, 106.5, 117.3, 127.6, 137.4, 146.8, 168.8, 189.3, 208.5, 226.7, 244.1, 260.8, 276.8, 292.3, 321.9, 349.8, 376.5, 401.9, 426.4, 450, 472.8, 494.9, 516.3, 537.1, 557.3, 577, 596.1, 614.8, 702.1, 780.3, 850.8, 914.4, 971.9, 1024, 1070, 1111, 1181, 1233, 1272, 1298, 1314, 1321, 1321, 1315, 1305, 1291, 1276, 1258, 1240, 1222, 1130, 1047, 974, 911.2, 856.7, 809, 767, 729.8, 666.1, 613.2, 569.7, 532.7, 501, 473.4, 449.1, 427.4, 408.3, 391, 375.4, 361.1, 348.1, 336 }; 192 177 … … 194 179 195 180 name [8] = "G4_Au"; 196 Znum [8] = 79;197 198 181 G4double e8[78] = { 11.5, 14.55, 17.2, 19.57, 21.76, 25.72, 29.27, 32.54, 35.59, 38.46, 41.18, 43.78, 49.83, 55.39, 60.56, 65.44, 70.06, 74.46, 78.68, 82.74, 90.45, 97.69, 104.5, 111.1, 117.3, 123.3, 129.1, 134.6, 140, 145.2, 150.3, 155.2, 160, 164.7, 186.4, 205.8, 223.5, 239.5, 254.2, 267.7, 280.1, 291.5, 311.6, 328.5, 342.6, 354.3, 363.8, 371.5, 377.5, 382.1, 385.5, 387.8, 389.1, 389.6, 389.4, 388.7, 384.4, 375.7, 362.6, 346.8, 330.5, 316.4, 304, 293, 274.1, 258.4, 245, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.5, 179.7, 174.5, 169.6, 165 }; 199 182 … … 201 184 202 185 name [9] = "G4_B-100_BONE"; 203 Znum [9] = 0;204 205 186 G4double e9[78] = { 138.6, 167.7, 192, 213.3, 232.4, 266.3, 296, 322.7, 347.2, 369.9, 391.2, 411.3, 457.3, 498.8, 536.8, 572, 605, 636.1, 665.7, 693.8, 746.5, 795.4, 841, 883.9, 924.5, 963.1, 999.9, 1035, 1069, 1101, 1133, 1163, 1192, 1220, 1348, 1460, 1557, 1643, 1719, 1786, 1845, 1897, 1983, 2047, 2093, 2124, 2142, 2149, 2148, 2139, 2125, 2106, 2084, 2059, 2031, 2003, 1861, 1726, 1600, 1484, 1379, 1290, 1214, 1147, 1035, 945.3, 871.8, 810, 757.7, 712.5, 672.9, 638.1, 607, 579.2, 554.1, 531.3, 510.5, 491.5 }; 206 187 … … 208 189 209 190 name [10] = "G4_Be"; 210 Znum [10] = 4;211 212 191 G4double e10[78] = { 146.3, 177.1, 202.9, 225.4, 245.6, 281.3, 312.5, 340.6, 366.2, 390, 412.2, 433.2, 481.1, 524.1, 563.3, 599.7, 633.6, 665.4, 695.6, 724.2, 777.7, 827, 872.7, 915.5, 955.7, 993.7, 1030, 1064, 1096, 1128, 1157, 1186, 1213, 1239, 1356, 1453, 1534, 1602, 1659, 1706, 1745, 1776, 1821, 1846, 1856, 1855, 1845, 1829, 1809, 1785, 1759, 1732, 1703, 1674, 1645, 1617, 1499, 1406, 1326, 1254, 1189, 1129, 1075, 1024, 935.3, 858.7, 792.9, 737.6, 690, 648.7, 612.5, 580.4, 552, 526.4, 503.3, 482.4, 463.3, 445.8 }; 213 192 … … 215 194 216 195 name [11] = "G4_BONE_COMPACT_ICRU"; 217 Znum [11] = 0;218 219 196 G4double e11[78] = { 125.9, 152.6, 175, 194.8, 212.5, 244.1, 271.8, 296.8, 319.8, 341.1, 361.2, 380.2, 423.8, 463.1, 499.3, 533, 564.6, 594.5, 622.8, 649.9, 700.8, 748.1, 792.4, 834.2, 873.7, 911.4, 947.4, 981.9, 1015, 1047, 1078, 1107, 1136, 1164, 1291, 1401, 1498, 1584, 1660, 1727, 1787, 1839, 1926, 1991, 2039, 2072, 2092, 2103, 2105, 2100, 2089, 2075, 2056, 2035, 2011, 1986, 1846, 1705, 1576, 1460, 1358, 1271, 1196, 1130, 1020, 931.6, 859.4, 798.8, 747.4, 702.9, 664, 629.7, 599.1, 571.7, 547.1, 524.7, 504.3, 485.6 }; 220 197 … … 222 199 223 200 name [12] = "G4_C"; 224 Znum [12] = 6;225 226 201 G4double e12[78] = { 190.6, 225.6, 254.3, 279, 300.9, 339.2, 372.1, 401.4, 427.9, 452.3, 475, 496.2, 544.3, 586.9, 625.5, 661, 693.8, 724.6, 753.5, 780.8, 831.5, 877.9, 920.8, 960.6, 998, 1033, 1066, 1098, 1128, 1156, 1184, 1210, 1235, 1259, 1366, 1455, 1531, 1595, 1650, 1698, 1738, 1772, 1825, 1862, 1886, 1900, 1906, 1906, 1901, 1892, 1880, 1866, 1850, 1833, 1814, 1795, 1684, 1571, 1466, 1372, 1288, 1213, 1145, 1085, 981.9, 898.2, 829.6, 772, 722.9, 680.4, 643.1, 610.2, 580.8, 554.4, 530.6, 509, 489.2, 471.2 }; 227 202 … … 229 204 230 205 name [13] = "G4_C_Graphite"; 231 Znum [13] = 0;232 233 206 G4double e13[78] = { 192.3, 228.9, 259, 285.1, 308.3, 348.9, 384, 415.3, 443.7, 469.9, 494.2, 517, 568.9, 615.1, 657, 695.5, 731.3, 764.8, 796.3, 826.2, 881.8, 932.7, 979.8, 1024, 1065, 1104, 1141, 1175, 1209, 1240, 1271, 1300, 1327, 1354, 1473, 1574, 1658, 1731, 1793, 1845, 1890, 1929, 1987, 2027, 2051, 2063, 2065, 2060, 2049, 2034, 2015, 1993, 1969, 1944, 1917, 1891, 1751, 1620, 1502, 1400, 1310, 1231, 1161, 1099, 994.3, 909, 839.2, 780.7, 730.8, 687.6, 649.8, 616.4, 586.6, 559.8, 535.7, 513.8, 493.8, 475.5 }; 234 207 … … 236 209 237 210 name [14] = "G4_ETHYLENE"; 238 Znum [14] = 0;239 240 211 G4double e14[78] = { 159.8, 195.8, 226, 252.7, 276.8, 319.7, 357.4, 391.5, 422.9, 452.1, 479.5, 505.4, 565.1, 619, 668.6, 714.8, 758.1, 799.1, 838.1, 875.3, 945.4, 1011, 1072, 1130, 1185, 1237, 1288, 1336, 1383, 1428, 1471, 1514, 1555, 1594, 1779, 1945, 2094, 2230, 2354, 2468, 2571, 2666, 2830, 2961, 3060, 3130, 3172, 3189, 3185, 3164, 3129, 3086, 3038, 2986, 2931, 2876, 2578, 2306, 2084, 1907, 1763, 1642, 1539, 1450, 1303, 1185, 1089, 1010, 941.9, 883.6, 832.8, 788.1, 748.4, 712.9, 680.9, 652, 625.7, 601.7 }; 241 212 … … 243 214 244 215 name [15] = "G4_C-552"; 245 Znum [15] = 0;246 247 216 G4double e15[78] = { 124.1, 148.8, 169.3, 187.2, 203.3, 231.5, 256.1, 278.2, 298.4, 317.1, 334.5, 351, 388.6, 422.4, 453.2, 481.8, 508.4, 533.5, 557.3, 579.9, 622.2, 661.3, 697.8, 732, 764.3, 794.9, 824, 851.9, 878.5, 904.1, 928.7, 952.4, 975.2, 997.3, 1097, 1184, 1259, 1325, 1384, 1435, 1481, 1521, 1588, 1639, 1678, 1706, 1726, 1738, 1744, 1745, 1743, 1736, 1727, 1716, 1703, 1688, 1603, 1511, 1421, 1338, 1261, 1190, 1126, 1067, 965.5, 883.8, 816.4, 759.6, 711.1, 669.1, 632.3, 599.9, 571, 545, 521.6, 500.3, 480.9, 463.1 }; 248 217 … … 250 219 251 220 name [16] = "G4_CARBON_DIOXIDE"; 252 Znum [16] = 0;253 254 221 G4double e16[78] = { 93.28, 114.2, 131.9, 147.5, 161.6, 186.6, 208.6, 228.5, 246.8, 263.8, 279.8, 295, 329.8, 361.2, 390.2, 417.1, 442.4, 466.4, 489.1, 510.8, 551.8, 589.8, 625.6, 659.4, 691.5, 722.2, 751.6, 779.8, 807.1, 833.4, 858.9, 883.7, 907.7, 931.1, 1040, 1137, 1225, 1306, 1380, 1449, 1513, 1571, 1676, 1763, 1834, 1891, 1933, 1961, 1977, 1982, 1978, 1967, 1952, 1932, 1911, 1888, 1752, 1614, 1490, 1383, 1290, 1209, 1139, 1077, 973.3, 890, 821.5, 764, 714.9, 672.6, 635.5, 602.6, 573.5, 547.3, 523.7, 502.4, 482.9, 465 }; 255 222 … … 257 224 258 225 name [17] = "G4_CALCIUM_FLUORIDE"; 259 Znum [17] = 0;260 261 226 G4double e17[78] = { 72.78, 90.74, 106.1, 119.8, 132.3, 154.7, 174.6, 192.8, 209.7, 225.5, 240.4, 254.5, 287.2, 317, 344.6, 370.4, 394.6, 417.6, 439.5, 460.5, 499.9, 536.5, 570.8, 603.1, 633.6, 662.6, 690.1, 716.4, 741.5, 765.6, 788.6, 810.8, 832.1, 852.6, 944.4, 1022, 1088, 1145, 1194, 1237, 1275, 1308, 1361, 1401, 1431, 1453, 1467, 1476, 1481, 1481, 1479, 1474, 1466, 1458, 1447, 1436, 1352, 1256, 1166, 1086, 1016, 954.4, 900.2, 852.3, 772.1, 708.1, 655.5, 610.7, 573.3, 540.6, 511.9, 486.6, 464, 443.8, 425.4, 408.7, 393.4, 379.4 }; 262 227 … … 264 229 265 230 name [18] = "G4_CERIC_SULFATE"; 266 Znum [18] = 0;267 268 231 G4double e18[78] = { 99.73, 123.7, 144.1, 162.3, 178.8, 208.3, 234.6, 258.5, 280.5, 301.2, 320.6, 339.1, 381.8, 420.6, 456.5, 490, 521.6, 551.5, 580.1, 607.4, 658.9, 707, 752.2, 795, 835.7, 874.6, 911.8, 947.6, 982, 1015, 1047, 1078, 1109, 1138, 1273, 1391, 1497, 1591, 1676, 1753, 1822, 1884, 1990, 2074, 2140, 2190, 2227, 2251, 2266, 2273, 2272, 2266, 2254, 2238, 2220, 2198, 2049, 1886, 1737, 1607, 1495, 1399, 1315, 1242, 1120, 1023, 942.8, 875.6, 818.4, 769.2, 726.1, 688, 654.2, 624, 596.7, 572, 549.5, 528.9 }; 269 232 … … 271 234 272 235 name [19] = "G4_CELLULOSE_NITRATE"; 273 Znum [19] = 0;274 275 236 G4double e19[78] = { 157.6, 186.4, 209.9, 230.3, 248.3, 279.7, 306.8, 330.8, 352.6, 372.6, 391.2, 408.7, 448.1, 483.2, 514.9, 544.1, 571.1, 596.4, 620.3, 642.8, 684.8, 723.2, 758.8, 792, 823.2, 852.7, 880.6, 907.2, 932.6, 956.9, 980.2, 1003, 1024, 1045, 1139, 1220, 1290, 1353, 1408, 1457, 1502, 1541, 1608, 1662, 1704, 1736, 1761, 1778, 1789, 1796, 1798, 1796, 1790, 1782, 1772, 1760, 1674, 1574, 1476, 1385, 1302, 1227, 1160, 1099, 993.8, 909.3, 839.7, 781.1, 731.2, 688.1, 650.2, 616.7, 587, 560.3, 536.2, 514.4, 494.5, 476.2 }; 276 237 … … 278 239 279 240 name [20] = "G4_BONE_CORTICAL_ICRP"; 280 Znum [20] = 0;281 282 241 G4double e20[78] = { 109.1, 132.8, 152.8, 170.4, 186.2, 214.4, 239.3, 261.7, 282.4, 301.6, 319.7, 336.8, 376.1, 411.7, 444.5, 475, 503.6, 530.7, 556.5, 581.1, 627.4, 670.4, 710.8, 748.9, 785, 819.4, 852.4, 883.9, 914.3, 943.5, 971.7, 999, 1025, 1051, 1168, 1270, 1360, 1440, 1511, 1574, 1630, 1680, 1763, 1826, 1872, 1905, 1927, 1939, 1943, 1941, 1933, 1921, 1905, 1887, 1866, 1844, 1720, 1593, 1475, 1369, 1274, 1193, 1123, 1062, 959.2, 877.1, 809.7, 753, 704.9, 663.4, 627, 594.9, 566.3, 540.6, 517.5, 496.5, 477.4, 459.8 }; 283 242 … … 285 244 286 245 name [21] = "G4_CESIUM_IODIDE"; 287 Znum [21] = 0;288 289 246 G4double e21[78] = { 40.6, 48.54, 55.16, 60.95, 66.15, 75.33, 83.38, 90.64, 97.29, 103.5, 109.3, 114.8, 127.3, 138.7, 149.2, 158.9, 168, 176.7, 184.9, 192.8, 207.6, 221.3, 234.2, 246.4, 258, 269.1, 279.7, 289.9, 299.7, 309.2, 318.3, 327.1, 335.7, 344, 382.3, 415.8, 445.6, 472.1, 495.7, 516.7, 535.4, 551.8, 578.9, 599.2, 613.8, 623.8, 629.9, 633, 633.6, 632.3, 629.5, 625.5, 620.6, 615.1, 609.1, 602.8, 567.7, 533, 501.8, 474.4, 450.3, 429, 410.1, 393.3, 364.6, 340.9, 321, 304, 289.2, 275.9, 264.1, 253.6, 243.9, 235, 226.7, 218.9, 211.9, 205.4 }; 290 247 … … 292 249 293 250 name [22] = "G4_Cu"; 294 Znum [22] = 29;295 296 251 G4double e22[78] = { 29.51, 36.49, 42.42, 47.68, 52.45, 60.98, 68.54, 75.4, 81.74, 87.65, 93.23, 98.51, 110.7, 121.8, 132, 141.5, 150.5, 159, 167.2, 174.9, 189.5, 203.2, 216, 228.1, 239.7, 250.7, 261.3, 271.4, 281.2, 290.7, 299.8, 308.7, 317.3, 325.6, 364.2, 398.4, 429.1, 456.8, 482.1, 505.1, 526.2, 545.4, 579, 607, 630.1, 649.1, 664.4, 676.6, 686.2, 693.4, 698.8, 702.4, 704.6, 705.7, 705.7, 704.9, 692.5, 672.6, 650.3, 627.6, 606, 585.6, 566.3, 548, 514, 483.4, 455.8, 431, 408.4, 388, 369.6, 353.7, 339.1, 325.7, 313.4, 302, 291.7, 282.3 }; 297 252 … … 299 254 300 255 name [23] = "G4_Fe"; 301 Znum [23] = 26;302 303 256 G4double e23[78] = { 54.06, 65.42, 74.91, 83.2, 90.66, 103.8, 115.3, 125.6, 135.1, 143.8, 152, 159.8, 177.4, 193.3, 207.8, 221.3, 233.9, 245.7, 256.9, 267.6, 287.7, 306.2, 323.5, 339.8, 355.2, 369.8, 383.8, 397.1, 410, 422.3, 434.2, 445.7, 456.9, 467.6, 517.1, 560.6, 599.4, 634.3, 665.9, 694.6, 720.8, 744.8, 786.6, 821.5, 850.4, 874.1, 893.1, 908.1, 919.6, 928, 933.6, 936.8, 938, 937.3, 935.1, 931.5, 899.9, 856.7, 810.9, 766.9, 727.3, 691.9, 660.2, 631.5, 581.8, 540.1, 504.6, 473.9, 447.2, 423.6, 402.6, 383.5, 366.9, 352, 338.3, 325.7, 314.1, 303.6 }; 304 257 … … 306 259 307 260 name [24] = "G4_FERROUS_SULFATE"; 308 Znum [24] = 0;309 310 261 G4double e24[78] = { 99.58, 123.5, 144, 162.1, 178.6, 208.1, 234.3, 258.2, 280.2, 300.8, 320.3, 338.7, 381.4, 420.2, 456, 489.5, 521, 551, 579.5, 606.8, 658.3, 706.3, 751.5, 794.2, 834.9, 873.7, 910.9, 946.6, 981, 1014, 1046, 1077, 1108, 1137, 1271, 1390, 1495, 1590, 1675, 1751, 1820, 1882, 1988, 2072, 2138, 2188, 2225, 2250, 2265, 2271, 2271, 2264, 2253, 2237, 2218, 2197, 2048, 1886, 1738, 1609, 1497, 1401, 1317, 1244, 1122, 1025, 944.6, 877.4, 820, 770.7, 727.5, 689.3, 655.4, 625.2, 597.8, 573.1, 550.5, 529.9 }; 311 262 … … 313 264 314 265 name [25] = "G4_Gd"; 315 Znum [25] = 64;316 317 266 G4double e25[78] = { 38.11, 45.4, 51.41, 56.61, 61.25, 69.34, 76.36, 82.61, 88.29, 93.53, 98.41, 103, 113.4, 122.7, 131.1, 138.9, 146.1, 152.9, 159.3, 165.4, 176.7, 187.1, 196.8, 205.9, 214.4, 222.5, 230.3, 237.6, 244.7, 251.5, 258, 264.3, 270.3, 276.2, 303.1, 326.6, 347.4, 366.2, 383.1, 398.5, 412.5, 425.4, 447.8, 466.5, 482.1, 494.8, 505.1, 513.2, 519.4, 523.9, 526.9, 528.6, 529.1, 528.6, 527.3, 525.2, 505.6, 481, 456.8, 434.6, 414.6, 396.6, 380.5, 366, 340.9, 319.7, 301.6, 285.8, 272, 259.8, 248.8, 239, 230.1, 222, 214.6, 207.7, 201.4, 195.6 }; 318 267 … … 320 269 321 270 name [26] = "G4_Ge"; 322 Znum [26] = 32;323 324 271 G4double e26[78] = { 47.65, 57.57, 65.83, 73.05, 79.53, 90.94, 100.9, 109.9, 118, 125.6, 132.7, 139.4, 154.6, 168.3, 180.8, 192.3, 203.1, 213.3, 222.9, 232, 249.1, 264.8, 279.5, 293.2, 306.1, 318.4, 330, 341.1, 351.7, 361.8, 371.5, 380.8, 389.8, 398.4, 437.2, 469.9, 497.8, 521.7, 542.3, 560.1, 575.5, 588.9, 610.7, 627.4, 640.1, 649.9, 657.3, 662.8, 666.8, 669.6, 671.4, 672.3, 672.4, 671.9, 670.9, 669.4, 656.9, 639.5, 619.8, 599.4, 578.4, 557.6, 537.5, 518.5, 483.6, 452.9, 425.8, 401.8, 380.5, 361.5, 344.3, 328.6, 315.1, 303.1, 292.1, 282, 272.6, 263.8 }; 325 272 … … 327 274 328 275 name [27] = "G4_Pyrex_Glass"; 329 Znum [27] = 0;330 331 276 G4double e27[78] = { 83.85, 102.1, 117.5, 131, 143.3, 165, 184.1, 201.3, 217.2, 232, 245.9, 259, 289.2, 316.5, 341.5, 364.8, 386.7, 407.4, 427.1, 445.8, 481.1, 513.8, 544.4, 573.2, 600.6, 626.6, 651.5, 675.3, 698.1, 720.1, 741.3, 761.7, 781.5, 800.6, 888, 963.9, 1031, 1090, 1142, 1189, 1231, 1268, 1330, 1378, 1414, 1441, 1460, 1473, 1481, 1485, 1484, 1481, 1475, 1466, 1456, 1445, 1389, 1323, 1249, 1171, 1095, 1029, 971.4, 920.7, 835.9, 768, 711.5, 663.8, 622.8, 587.4, 556.1, 528.4, 503.7, 481.5, 461.4, 443.2, 426.5, 411.2 }; 332 277 … … 334 279 335 280 name [28] = "G4_H"; 336 Znum [28] = 1;337 338 281 G4double e28[78] = { 212, 275.4, 331.7, 383, 430.9, 518.8, 599.2, 674, 744.5, 811.5, 875.6, 937.1, 1082, 1217, 1344, 1465, 1580, 1691, 1798, 1901, 2098, 2285, 2463, 2634, 2798, 2956, 3108, 3256, 3399, 3538, 3674, 3805, 3933, 4058, 4637, 5152, 5610, 6019, 6383, 6705, 6988, 7235, 7632, 7915, 8100, 8203, 8240, 8222, 8161, 8067, 7947, 7808, 7655, 7494, 7327, 7157, 6345, 5647, 5068, 4588, 4188, 3860, 3585, 3351, 2971, 2675, 2438, 2242, 2078, 1939, 1818, 1713, 1620, 1538, 1464, 1398, 1337, 1283 }; 339 282 … … 341 284 342 285 name [29] = "G4_HELIUM"; 343 Znum [29] = 2;344 345 286 G4double e29[78] = { 87.26, 110.8, 131.3, 149.8, 166.8, 197.7, 225.5, 251.1, 275, 297.5, 318.9, 339.4, 387, 430.9, 471.8, 510.4, 547, 581.9, 615.3, 647.5, 708.7, 766.1, 820.5, 872.3, 921.8, 969.3, 1015, 1059, 1102, 1143, 1183, 1221, 1259, 1296, 1465, 1614, 1748, 1867, 1975, 2071, 2156, 2233, 2361, 2460, 2535, 2588, 2624, 2644, 2652, 2650, 2639, 2621, 2598, 2571, 2540, 2507, 2323, 2139, 1976, 1832, 1706, 1593, 1493, 1402, 1249, 1130, 1033, 953.8, 886.8, 829.5, 779.8, 736.4, 697.9, 663.7, 632.9, 605.2, 580, 557 }; 346 287 … … 348 289 349 290 name [30] = "G4_KAPTON"; 350 Znum [30] = 0;351 352 291 G4double e30[78] = { 165.5, 197.6, 224.2, 247.2, 267.8, 304, 335.4, 363.5, 389.1, 412.8, 434.8, 455.6, 502.9, 545.2, 583.8, 619.4, 652.6, 683.8, 713.3, 741.2, 793.5, 841.6, 886.3, 928.2, 967.7, 1005, 1041, 1074, 1107, 1138, 1167, 1196, 1223, 1250, 1369, 1471, 1560, 1636, 1703, 1762, 1812, 1857, 1928, 1981, 2018, 2042, 2056, 2062, 2061, 2054, 2043, 2028, 2010, 1990, 1969, 1946, 1819, 1688, 1565, 1451, 1350, 1264, 1190, 1125, 1017, 929.8, 858.3, 798.2, 747, 702.8, 664, 629.8, 599.3, 571.9, 547.2, 524.8, 504.4, 485.7 }; 353 292 … … 355 294 356 295 name [31] = "G4_Kr"; 357 Znum [31] = 36;358 359 296 G4double e31[78] = { 10.15, 13.69, 16.93, 19.96, 22.84, 28.23, 33.29, 38.08, 42.66, 47.08, 51.35, 55.5, 65.43, 74.84, 83.85, 92.52, 100.9, 109.1, 117, 124.7, 139.7, 154.1, 168, 181.5, 194.6, 207.4, 219.9, 232.1, 244, 255.7, 267.2, 278.4, 289.5, 300.3, 351.9, 399.6, 443.7, 484.4, 522.1, 556.7, 588.4, 617.2, 666.6, 705.7, 735.5, 757, 771.4, 779.9, 783.4, 783, 779.4, 773.6, 765.9, 757, 747.2, 736.9, 683.7, 635.6, 595.2, 561.5, 533, 508.6, 487.3, 468.5, 439.9, 417.9, 398.8, 381.4, 364.9, 349.2, 334.2, 319.8, 306.2, 293.7, 282.8, 272.8, 263.6, 255.2 }; 360 297 … … 362 299 363 300 name [32] = "G4_LITHIUM_TETRABORATE"; 364 Znum [32] = 0;365 366 301 G4double e32[78] = { 132.7, 159.4, 181.6, 200.9, 218.2, 248.6, 275, 298.7, 320.4, 340.4, 359.1, 376.6, 416.8, 452.7, 485.5, 515.8, 544, 570.6, 595.8, 619.7, 664.3, 705.6, 743.9, 779.9, 813.9, 846.1, 876.8, 906.1, 934.2, 961.1, 987, 1012, 1036, 1059, 1166, 1258, 1338, 1410, 1474, 1531, 1583, 1628, 1706, 1767, 1814, 1849, 1874, 1891, 1899, 1902, 1899, 1891, 1875, 1852, 1825, 1795, 1638, 1494, 1375, 1276, 1193, 1121, 1058, 1002, 908.8, 833.2, 770.5, 717.6, 672.4, 633.2, 598.8, 568.3, 541.2, 516.9, 494.8, 474.9, 456.6, 439.9 }; 367 302 … … 369 304 370 305 name [33] = "G4_LITHIUM_FLUORIDE"; 371 Znum [33] = 0;372 373 306 G4double e33[78] = { 118.7, 142.6, 162.5, 179.7, 195.2, 222.4, 246, 267.2, 286.5, 304.3, 321, 336.6, 372.4, 404.4, 433.5, 460.4, 485.5, 509.1, 531.4, 552.6, 592.1, 628.5, 662.4, 694.1, 724.1, 752.4, 779.4, 805.1, 829.6, 853.2, 875.9, 897.6, 918.7, 938.9, 1031, 1110, 1179, 1240, 1294, 1341, 1383, 1421, 1483, 1530, 1566, 1592, 1610, 1621, 1627, 1627, 1624, 1618, 1609, 1598, 1585, 1571, 1483, 1387, 1296, 1214, 1140, 1074, 1015, 962.2, 872, 799.7, 739.5, 688.5, 644.8, 606.9, 573.7, 544.4, 518.3, 494.9, 473.6, 454.3, 436.7, 420.6 }; 374 307 … … 376 309 377 310 name [34] = "G4_M3_WAX"; 378 Znum [34] = 0;379 380 311 G4double e34[78] = { 173.6, 209, 238.5, 264.3, 287.6, 328.7, 364.7, 397.1, 426.9, 454.5, 480.4, 504.9, 561, 611.6, 658, 701.1, 741.6, 779.8, 816, 850.6, 915.4, 975.6, 1032, 1085, 1135, 1182, 1228, 1271, 1313, 1353, 1392, 1429, 1465, 1499, 1657, 1792, 1910, 2012, 2101, 2179, 2247, 2305, 2398, 2463, 2507, 2533, 2544, 2544, 2534, 2517, 2494, 2468, 2437, 2405, 2371, 2335, 2154, 1981, 1825, 1686, 1564, 1460, 1372, 1295, 1167, 1064, 980.4, 910.2, 850.4, 798.9, 753.8, 714.2, 678.9, 647.3, 618.8, 593, 569.4, 547.9 }; 381 312 … … 383 314 384 315 name [35] = "G4_MS20_TISSUE"; 385 Znum [35] = 0;386 387 316 G4double e35[78] = { 163.5, 196.6, 224.1, 248.2, 269.8, 308, 341.4, 371.4, 398.9, 424.4, 448.3, 470.9, 522.5, 569, 611.6, 651.1, 688, 722.9, 756, 787.5, 846.6, 901.2, 952.3, 1000, 1046, 1089, 1130, 1169, 1207, 1243, 1278, 1311, 1344, 1375, 1516, 1638, 1744, 1836, 1916, 1986, 2048, 2101, 2185, 2247, 2288, 2314, 2327, 2330, 2325, 2312, 2295, 2273, 2249, 2222, 2193, 2163, 2002, 1845, 1703, 1575, 1463, 1368, 1286, 1215, 1097, 1001, 923.2, 857.7, 802, 753.9, 711.7, 674.6, 641.6, 611.9, 585.2, 561, 539, 518.8 }; 388 317 … … 390 319 391 320 name [36] = "G4_METHANE"; 392 Znum [36] = 0;393 394 321 G4double e36[78] = { 197.5, 241.8, 279.3, 312.2, 342, 394.9, 441.5, 483.7, 522.4, 558.5, 592.4, 624.4, 698.1, 764.8, 826, 883.1, 936.6, 987.3, 1035, 1081, 1168, 1249, 1324, 1396, 1464, 1529, 1591, 1650, 1708, 1764, 1818, 1870, 1920, 1970, 2198, 2402, 2586, 2754, 2907, 3047, 3175, 3291, 3492, 3652, 3773, 3856, 3905, 3921, 3899, 3849, 3783, 3708, 3627, 3544, 3460, 3378, 2998, 2685, 2432, 2226, 2055, 1911, 1789, 1683, 1508, 1370, 1257, 1163, 1084, 1015, 955.9, 903.7, 857.5, 816.2, 779.1, 745.5, 714.9, 687.1 }; 395 322 … … 397 324 398 325 name [37] = "G4_Mo"; 399 Znum [37] = 42;400 401 326 G4double e37[78] = { 58.22, 68.98, 77.79, 85.4, 92.16, 103.9, 114.1, 123.1, 131.3, 138.8, 145.8, 152.4, 167.3, 180.5, 192.5, 203.5, 213.8, 223.4, 232.4, 241, 256.9, 271.6, 285.1, 297.8, 309.8, 321.1, 331.8, 342.1, 351.9, 361.3, 370.3, 379, 387.4, 395.5, 432.4, 464.5, 492.9, 518.2, 541, 561.6, 580.4, 597.4, 626.9, 651.2, 671.2, 687.3, 700.1, 710, 717.3, 722.3, 725.4, 726.7, 726.5, 725, 722.3, 718.8, 690.9, 655, 617.8, 582.6, 552.1, 525.7, 502.3, 481.5, 445.5, 415.5, 389.9, 367.7, 348.1, 330.6, 314.8, 300.9, 288.6, 277.3, 266.9, 257.6, 249, 241.2 }; 402 327 … … 404 329 405 330 name [38] = "G4_MUSCLE_WITH_SUCROSE"; 406 Znum [38] = 0;407 408 331 G4double e38[78] = { 111.7, 137.5, 159.4, 178.8, 196.5, 227.9, 255.7, 281, 304.4, 326.2, 346.7, 366.2, 411.2, 452, 489.7, 525, 558.1, 589.5, 619.5, 648.1, 702.2, 752.5, 799.9, 844.6, 887.2, 927.9, 966.8, 1004, 1040, 1075, 1108, 1141, 1172, 1203, 1343, 1467, 1576, 1674, 1762, 1841, 1912, 1975, 2081, 2165, 2230, 2277, 2310, 2331, 2342, 2344, 2339, 2329, 2313, 2293, 2270, 2244, 2074, 1896, 1739, 1607, 1494, 1398, 1314, 1241, 1120, 1022, 942.4, 875.3, 818.1, 768.9, 725.8, 687.7, 653.9, 623.7, 596.4, 571.7, 549.2, 528.6 }; 409 332 … … 411 334 412 335 name [39] = "G4_MUSCLE_WITHOUT_SUCROSE"; 413 Znum [39] = 0;414 415 336 G4double e39[78] = { 108.2, 133.5, 155, 174.1, 191.4, 222.4, 249.8, 274.8, 297.8, 319.3, 339.6, 358.9, 403.3, 443.7, 481, 515.9, 548.7, 579.8, 609.5, 637.9, 691.4, 741.4, 788.3, 832.7, 875, 915.3, 953.9, 991.1, 1027, 1061, 1095, 1127, 1158, 1189, 1328, 1451, 1560, 1658, 1745, 1824, 1895, 1958, 2065, 2150, 2215, 2263, 2298, 2320, 2332, 2335, 2331, 2321, 2306, 2287, 2265, 2240, 2075, 1901, 1746, 1613, 1501, 1404, 1320, 1247, 1125, 1027, 946.2, 878.8, 821.4, 772, 728.6, 690.4, 656.4, 626.1, 598.7, 573.9, 551.3, 530.6 }; 416 337 … … 418 339 419 340 name [40] = "G4_MUSCLE_SKELETAL_ICRP"; 420 Znum [40] = 0;421 422 341 G4double e40[78] = { 104.5, 129.2, 150.2, 168.8, 185.8, 216.1, 242.9, 267.4, 290, 311.1, 331, 349.8, 393.5, 433.1, 469.7, 503.9, 536.2, 566.7, 595.9, 623.7, 676.3, 725.4, 771.5, 815.1, 856.6, 896.2, 934.1, 970.6, 1006, 1040, 1072, 1104, 1135, 1165, 1302, 1422, 1530, 1626, 1712, 1790, 1860, 1922, 2029, 2113, 2178, 2228, 2263, 2286, 2299, 2304, 2302, 2293, 2280, 2262, 2242, 2218, 2059, 1888, 1735, 1604, 1492, 1396, 1312, 1240, 1118, 1021, 941.1, 874.1, 817, 767.9, 724.9, 686.8, 653.1, 622.9, 595.7, 571, 548.6, 528 }; 423 342 … … 425 344 426 345 name [41] = "G4_MUSCLE_STRIATED_ICRU"; 427 Znum [41] = 0;428 429 346 G4double e41[78] = { 104.7, 129.4, 150.5, 169.2, 186.2, 216.5, 243.4, 267.9, 290.5, 311.7, 331.6, 350.5, 394.2, 433.9, 470.6, 504.9, 537.2, 567.8, 596.9, 624.9, 677.5, 726.7, 772.8, 816.5, 858.1, 897.8, 935.8, 972.3, 1007, 1041, 1074, 1106, 1137, 1167, 1304, 1425, 1532, 1629, 1715, 1793, 1863, 1925, 2032, 2116, 2181, 2230, 2265, 2289, 2302, 2306, 2304, 2295, 2282, 2264, 2244, 2220, 2063, 1894, 1742, 1611, 1498, 1401, 1318, 1244, 1123, 1025, 944.5, 877.2, 819.9, 770.6, 727.3, 689.2, 655.3, 625, 597.7, 572.9, 550.4, 529.7 }; 430 347 … … 432 349 433 350 name [42] = "G4_N"; 434 Znum [42] = 7;435 436 351 G4double e42[78] = { 82.8, 103.7, 121.6, 137.7, 152.3, 178.7, 202.3, 223.8, 243.8, 262.5, 280.2, 297.1, 336.2, 372, 405.1, 436.2, 465.5, 493.4, 520.1, 545.7, 594.1, 639.3, 682, 722.5, 761, 797.9, 833.4, 867.4, 900.3, 932, 962.8, 992.5, 1021, 1049, 1179, 1293, 1395, 1486, 1567, 1640, 1706, 1765, 1864, 1940, 1999, 2041, 2069, 2086, 2093, 2091, 2083, 2069, 2051, 2030, 2005, 1978, 1819, 1660, 1522, 1406, 1308, 1224, 1151, 1088, 982.9, 898.5, 829.5, 771.1, 721.3, 678.5, 641, 608, 578.6, 552.3, 528.5, 506.9, 487.2, 469.1 }; 437 352 … … 439 354 440 355 name [43] = "G4_SODIUM_IODIDE"; 441 Znum [43] = 0;442 443 356 G4double e43[78] = { 35.86, 44.19, 51.24, 57.48, 63.13, 73.21, 82.12, 90.2, 97.64, 104.6, 111.1, 117.3, 131.6, 144.5, 156.4, 167.6, 178, 187.9, 197.3, 206.3, 223.3, 239.1, 253.9, 268, 281.3, 294, 306.2, 317.9, 329.2, 340.1, 350.6, 360.8, 370.6, 380.2, 424.5, 463.5, 498.4, 529.9, 558.2, 583.8, 607, 627.8, 663.4, 691.6, 713.4, 729.6, 740.9, 748.1, 751.7, 752.4, 750.7, 747, 741.7, 735.1, 727.6, 719.5, 664.4, 611.2, 569.4, 538.3, 514, 491.6, 472.1, 454, 422.9, 393.7, 370.2, 349.6, 331.4, 315.3, 301.2, 288.5, 276.8, 266.1, 256.3, 247.1, 238.9, 231.5 }; 444 357 … … 446 359 447 360 name [44] = "G4_Ne"; 448 Znum [44] = 10;449 450 361 G4double e44[78] = { 68.73, 83.7, 96.26, 107.3, 117.2, 134.8, 150.3, 164.2, 177, 188.8, 199.9, 210.4, 234.5, 256.2, 276.1, 294.6, 311.9, 328.3, 343.8, 358.6, 386.3, 412, 436.1, 458.8, 480.3, 500.8, 520.3, 539.1, 557.1, 574.5, 591.2, 607.5, 623.2, 638.4, 708.4, 770.3, 825.6, 875.7, 921.2, 962.8, 1001, 1036, 1098, 1150, 1194, 1230, 1260, 1285, 1304, 1319, 1330, 1338, 1343, 1344, 1344, 1341, 1296, 1229, 1160, 1095, 1035, 981.4, 932.6, 888.5, 812.1, 748.3, 695.6, 650.4, 611.3, 577, 546.8, 520, 496, 474.4, 454.8, 437, 420.7, 405.7 }; 451 362 … … 453 364 454 365 name [45] = "G4_NYLON-6/6"; 455 Znum [45] = 0;456 457 366 G4double e45[78] = { 167.4, 201.6, 230.3, 255.4, 278, 317.9, 352.9, 384.4, 413.4, 440.3, 465.5, 489.3, 544, 593.3, 638.6, 680.6, 720.1, 757.3, 792.7, 826.4, 889.7, 948.5, 1003, 1055, 1104, 1151, 1195, 1238, 1279, 1318, 1356, 1392, 1427, 1461, 1617, 1750, 1867, 1969, 2059, 2138, 2207, 2267, 2363, 2433, 2482, 2512, 2527, 2531, 2525, 2511, 2491, 2467, 2439, 2408, 2375, 2340, 2160, 1987, 1830, 1690, 1567, 1463, 1374, 1297, 1169, 1066, 981.3, 910.8, 850.9, 799.3, 754.1, 714.4, 679, 647.4, 618.9, 593, 569.5, 547.9 }; 458 367 … … 460 369 461 370 name [46] = "G4_O"; 462 Znum [46] = 8;463 464 371 G4double e46[78] = { 105.8, 117.3, 257.6, 1.139e-05, 5.976e-06, 0.005, 248.1, 71.83, 352, 3.186e-05, 2.012e-05, 0.015, 412.7, 40.96, 503.1, 6.782e-05, 5.098e-05, 0.035, 610.6, 24.07, 700.7, 0.0001156, 9.613e-05, 0.07, 820, 15.89, 884.2, 0.0001583, 0.0001354, 0.125, 1124, 8.719, 1280, 0.0002775, 0.0002641, 0.3, 1573, 4.478, 1697, 0.0004528, 0.000448, 0.65, 1818, 2.655, 1822, 0.0006468, 0.0006403, 1, 1667, 1.474, 1431, 0.00138, 0.001539, 2.75, 1038, 0.7076, 860.9, 0.003906, 0.004519, 6, 616.1, 0.3845, 556.8, 0.009419, 0.01034, 9.5, 452, 0.2295, 334.7, 0.03447, 0.04325, 27.5, 196.3, 0.09039, 156.5, 0.1784, 0.2149, 60 }; 465 372 … … 467 374 468 375 name [47] = "G4_PARAFFIN"; 469 Znum [47] = 0;470 471 376 G4double e47[78] = { 193.8, 233, 265.8, 294.4, 320.3, 365.9, 405.9, 441.9, 475, 505.7, 534.5, 561.7, 624.2, 680.6, 732.3, 780.4, 825.5, 868.2, 908.6, 947.2, 1020, 1087, 1150, 1209, 1265, 1319, 1370, 1419, 1465, 1510, 1554, 1595, 1636, 1675, 1852, 2004, 2137, 2253, 2354, 2442, 2518, 2584, 2688, 2762, 2810, 2837, 2848, 2845, 2831, 2810, 2782, 2749, 2713, 2674, 2633, 2592, 2381, 2184, 2007, 1851, 1714, 1598, 1500, 1414, 1272, 1158, 1066, 988.4, 922.7, 866.1, 816.7, 773.2, 734.5, 699.9, 668.8, 640.6, 614.9, 591.4 }; 472 377 … … 474 379 475 380 name [48] = "G4_Pb"; 476 Znum [48] = 82;477 478 381 G4double e48[78] = { 17.96, 22.18, 25.76, 28.92, 31.8, 36.93, 41.47, 45.6, 49.4, 52.95, 56.3, 59.46, 66.77, 73.41, 79.52, 85.23, 90.6, 95.69, 100.5, 105.2, 113.9, 122, 129.7, 136.9, 143.8, 150.3, 156.6, 162.7, 168.5, 174.1, 179.5, 184.8, 189.9, 194.9, 217.7, 237.9, 256, 272.3, 287, 300.4, 312.6, 323.6, 342.6, 358.2, 370.7, 380.6, 388.3, 394.2, 398.4, 401.3, 403.1, 404, 404.1, 403.5, 402.4, 401, 392.5, 380.4, 365.3, 348.6, 332, 317.6, 304.9, 293.7, 274.4, 258.3, 244.7, 232.9, 222.5, 213.2, 205, 197.5, 190.7, 184.4, 178.7, 173.4, 168.4, 163.9 }; 479 382 … … 481 384 482 385 name [49] = "G4_PHOTOGRAPHIC_EMULSION"; 483 Znum [49] = 0;484 485 386 G4double e49[78] = { 46.69, 57.18, 66.06, 73.91, 81.04, 93.75, 105, 115.2, 124.7, 133.5, 141.8, 149.6, 167.8, 184.3, 199.6, 213.8, 227.3, 240, 252.1, 263.8, 285.7, 306.2, 325.4, 343.6, 361, 377.5, 393.4, 408.7, 423.3, 437.5, 451.2, 464.5, 477.3, 489.8, 547, 597.3, 641.7, 681.2, 716.3, 747.6, 775.5, 800.2, 841.5, 873.5, 897.8, 915.8, 928.6, 937.1, 940, 938.4, 933.8, 927, 918.6, 909.2, 899.1, 888.5, 833.7, 781.8, 735.1, 693.7, 657.1, 624.6, 595.5, 569.4, 524.5, 487.2, 455.6, 428.5, 404.9, 383.9, 365.2, 348.6, 333.8, 320.5, 308.3, 297.2, 287, 277.8 }; 486 387 … … 488 389 489 390 name [50] = "G4_PLASTIC_SC_VINYLTOLUENE"; 490 Znum [50] = 0;491 492 391 G4double e50[78] = { 192.4, 229.8, 260.8, 287.8, 312, 354.4, 391.4, 424.6, 454.8, 482.8, 509, 533.7, 590, 640.5, 686.6, 729.3, 769.2, 806.7, 842.2, 876, 939.2, 997.5, 1052, 1103, 1151, 1197, 1240, 1281, 1321, 1359, 1395, 1430, 1464, 1497, 1644, 1769, 1878, 1971, 2053, 2123, 2184, 2236, 2319, 2377, 2414, 2436, 2445, 2443, 2433, 2417, 2396, 2371, 2343, 2314, 2283, 2251, 2091, 1936, 1791, 1657, 1537, 1435, 1349, 1273, 1148, 1047, 964.8, 895.9, 837.3, 786.7, 742.4, 703.5, 668.8, 637.7, 609.7, 584.3, 561.2, 540 }; 493 392 … … 495 394 496 395 name [51] = "G4_POLYCARBONATE"; 497 Znum [51] = 0;498 499 396 G4double e51[78] = { 146.3, 178.1, 204.7, 228.1, 249.2, 286.4, 319.1, 348.5, 375.5, 400.6, 424.1, 446.2, 497, 542.8, 584.7, 623.5, 659.9, 694.2, 726.6, 757.6, 815.5, 869.1, 919, 965.9, 1010, 1052, 1092, 1130, 1167, 1202, 1235, 1268, 1299, 1329, 1465, 1581, 1681, 1768, 1843, 1908, 1965, 2013, 2090, 2144, 2180, 2201, 2210, 2209, 2202, 2188, 2170, 2149, 2125, 2099, 2072, 2044, 1912, 1785, 1661, 1543, 1433, 1340, 1261, 1191, 1076, 982.4, 906, 842, 787.5, 740.5, 699.2, 662.9, 630.5, 601.5, 575.3, 551.6, 529.9, 510.1 }; 500 397 … … 502 399 503 400 name [52] = "G4_POLYETHYLENE"; 504 Znum [52] = 0;505 506 401 G4double e52[78] = { 168.2, 205.8, 237.5, 265.4, 290.7, 335.4, 374.8, 410.5, 443.2, 473.7, 502.3, 529.3, 591.4, 647.6, 699.1, 747.1, 792.1, 834.6, 874.9, 913.5, 985.9, 1053, 1116, 1175, 1232, 1285, 1336, 1385, 1432, 1478, 1521, 1564, 1604, 1644, 1825, 1983, 2122, 2246, 2355, 2453, 2539, 2615, 2740, 2833, 2899, 2940, 2962, 2967, 2958, 2938, 2908, 2871, 2829, 2782, 2732, 2681, 2418, 2183, 1987, 1826, 1691, 1577, 1480, 1396, 1257, 1145, 1053, 977.1, 912.4, 856.5, 807.8, 764.9, 726.7, 692.6, 661.8, 633.9, 608.6, 585.4 }; 507 402 … … 509 404 510 405 name [53] = "G4_MYLAR"; 511 Znum [53] = 0;512 513 406 G4double e53[78] = { 163.2, 195.3, 221.8, 244.9, 265.6, 301.9, 333.5, 361.8, 387.6, 411.5, 433.8, 454.8, 502.7, 545.7, 584.8, 621, 654.8, 686.6, 716.7, 745.3, 798.7, 847.9, 893.8, 936.8, 977.4, 1016, 1052, 1087, 1121, 1153, 1183, 1213, 1241, 1269, 1393, 1500, 1593, 1673, 1744, 1806, 1860, 1908, 1985, 2042, 2083, 2110, 2126, 2133, 2133, 2126, 2115, 2100, 2082, 2061, 2038, 2014, 1874, 1731, 1599, 1482, 1379, 1290, 1215, 1148, 1038, 948.5, 875.3, 813.8, 761.5, 716.3, 676.6, 641.6, 610.5, 582.5, 557.3, 534.4, 513.6, 494.5 }; 514 407 … … 516 409 517 410 name [54] = "G4_PLEXIGLASS"; 518 Znum [54] = 0;519 520 411 G4double e54[78] = { 118.7, 146.6, 170.3, 191.4, 210.4, 244.5, 274.7, 302.1, 327.3, 350.9, 373.1, 394.2, 442.7, 486.8, 527.4, 565.2, 600.9, 634.6, 666.7, 697.4, 755.1, 808.9, 859.3, 906.9, 952, 995, 1036, 1075, 1113, 1150, 1185, 1219, 1252, 1283, 1428, 1554, 1665, 1762, 1848, 1923, 1990, 2049, 2144, 2216, 2266, 2300, 2320, 2328, 2327, 2318, 2302, 2282, 2259, 2232, 2203, 2173, 2008, 1847, 1702, 1574, 1464, 1369, 1288, 1217, 1099, 1004, 925.6, 860.1, 804.4, 756.3, 714.1, 676.9, 643.8, 614.2, 587.4, 563.2, 541.1, 520.8 }; 521 412 … … 523 414 524 415 name [55] = "G4_POLYPROPYLENE"; 525 Znum [55] = 0;526 527 416 G4double e55[78] = { 193.7, 232.8, 265.4, 293.9, 319.6, 365, 404.8, 440.6, 473.4, 503.9, 532.5, 559.6, 621.6, 677.5, 728.8, 776.5, 821.2, 863.4, 903.5, 941.8, 1014, 1080, 1142, 1201, 1257, 1309, 1360, 1408, 1454, 1499, 1541, 1583, 1622, 1661, 1836, 1986, 2117, 2231, 2331, 2417, 2492, 2557, 2660, 2732, 2779, 2806, 2817, 2814, 2801, 2780, 2752, 2720, 2684, 2646, 2606, 2565, 2359, 2165, 1991, 1836, 1700, 1585, 1488, 1403, 1263, 1150, 1058, 981.3, 916.1, 860, 810.9, 767.8, 729.5, 695.1, 664.3, 636.2, 610.8, 587.5 }; 528 417 … … 530 419 531 420 name [56] = "G4_POLYSTYRENE"; 532 Znum [56] = 0;533 534 421 G4double e56[78] = { 153, 187.5, 216.6, 242.2, 265.3, 306.5, 342.7, 375.5, 405.6, 433.6, 460, 484.9, 542.1, 593.8, 641.3, 685.4, 726.9, 766, 803.1, 838.5, 905, 966.6, 1024, 1078, 1130, 1178, 1225, 1269, 1312, 1352, 1392, 1429, 1466, 1501, 1661, 1797, 1915, 2017, 2106, 2183, 2249, 2305, 2394, 2454, 2492, 2511, 2516, 2509, 2494, 2471, 2443, 2410, 2376, 2339, 2301, 2262, 2070, 1895, 1742, 1609, 1493, 1395, 1312, 1239, 1119, 1021, 941.4, 874.6, 817.8, 768.7, 725.7, 687.9, 654.1, 623.9, 596.6, 571.9, 549.4, 528.7 }; 535 422 … … 537 424 538 425 name [57] = "G4_TEFLON"; 539 Znum [57] = 0;540 541 426 G4double e57[78] = { 82.7, 99.97, 114.4, 127.1, 138.4, 158.5, 176.2, 192, 206.5, 220, 232.6, 244.5, 271.9, 296.4, 319, 339.8, 359.4, 377.8, 395.3, 412, 443.3, 472.2, 499.3, 524.7, 548.8, 571.7, 593.6, 614.5, 634.6, 653.9, 672.5, 690.4, 707.8, 724.6, 801.6, 868.9, 928.6, 981.9, 1030, 1073, 1112, 1148, 1209, 1260, 1301, 1334, 1361, 1382, 1397, 1408, 1415, 1419, 1420, 1418, 1414, 1409, 1399, 1373, 1319, 1246, 1165, 1095, 1034, 979.4, 887.4, 813.7, 752.5, 700.8, 656.5, 618.1, 584.5, 554.8, 528.3, 504.6, 483, 463.5, 445.6, 429.3 }; 542 427 … … 544 429 545 430 name [58] = "G4_POLYVINYL_CHLORIDE"; 546 Znum [58] = 0;547 548 431 G4double e58[78] = { 94.27, 114.4, 131.3, 146.3, 159.9, 184, 205.5, 224.9, 242.9, 259.7, 275.5, 290.5, 325.3, 357, 386.3, 413.7, 439.5, 464.1, 487.6, 510.1, 552.6, 592.4, 629.9, 665.5, 699.4, 731.8, 762.9, 792.9, 821.8, 849.7, 876.7, 902.9, 928.2, 952.9, 1067, 1167, 1255, 1335, 1405, 1468, 1525, 1574, 1657, 1719, 1764, 1795, 1814, 1823, 1824, 1818, 1807, 1792, 1774, 1753, 1731, 1708, 1591, 1482, 1385, 1299, 1222, 1153, 1092, 1037, 941.7, 862.4, 795.8, 739.8, 692.3, 651.2, 615.4, 583.7, 555.6, 530.3, 507.5, 486.9, 468, 450.8 }; 549 432 … … 551 434 552 435 name [59] = "G4_PROPANE"; 553 Znum [59] = 0;554 555 436 G4double e59[78] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022, 1868, 1739, 1629, 1534, 1377, 1252, 1150, 1065, 993, 931.1, 877.2, 829.9, 787.8, 750.2, 716.4, 685.8, 658, 632.5 }; 556 437 … … 558 439 559 440 name [60] = "G4_Pt"; 560 Znum [60] = 78;561 562 441 G4double e60[78] = { 14.45, 17.87, 20.78, 23.37, 25.71, 29.9, 33.61, 36.99, 40.1, 43.01, 45.75, 48.35, 54.36, 59.81, 64.84, 69.54, 73.97, 78.17, 82.17, 86, 93.22, 99.96, 106.3, 112.3, 118, 123.5, 128.7, 133.8, 138.7, 143.4, 147.9, 152.4, 156.7, 160.8, 180.3, 197.6, 213.3, 227.7, 240.9, 253, 264.3, 274.7, 293.2, 309, 322.4, 333.7, 343.1, 350.7, 356.8, 361.6, 365.1, 367.6, 369.1, 369.8, 369.9, 369.3, 364.7, 357, 347.3, 336.6, 325.5, 314.4, 303.6, 293.2, 274.3, 258.5, 245.1, 233.4, 223.1, 214, 205.8, 198.4, 191.6, 185.4, 179.7, 174.4, 169.5, 164.9 }; 563 442 … … 565 444 566 445 name [61] = "G4_Si"; 567 Znum [61] = 14;568 569 446 G4double e61[78] = { 47.32, 61.63, 74.34, 85.98, 96.82, 116.8, 135.1, 152.1, 168.2, 183.4, 198.1, 212.1, 245.3, 276.1, 305.2, 332.7, 359.1, 384.4, 408.7, 432.2, 477, 519.3, 559.4, 597.5, 633.9, 668.6, 701.9, 733.7, 764.3, 793.5, 821.6, 848.5, 874.4, 899.1, 1008, 1097, 1168, 1225, 1270, 1307, 1336, 1359, 1390, 1408, 1416, 1417, 1413, 1405, 1395, 1383, 1370, 1356, 1341, 1326, 1310, 1295, 1218, 1146, 1081, 1023, 970.6, 923.9, 881.4, 842.4, 773.1, 713.1, 661.2, 617.4, 579.7, 547, 518.2, 492.7, 470, 449.5, 430.9, 414, 398.6, 384.4 }; 570 447 … … 572 449 573 450 name [62] = "G4_SILICON_DIOXIDE"; 574 Znum [62] = 0;575 576 451 G4double e62[78] = { 68.9, 85.1, 98.85, 111, 122.1, 141.8, 159.3, 175.1, 189.8, 203.4, 216.3, 228.5, 256.6, 282.1, 305.7, 327.6, 348.3, 367.9, 386.5, 404.4, 437.9, 469.2, 498.5, 526.3, 552.6, 577.7, 601.7, 624.7, 646.9, 668.2, 688.8, 708.7, 728, 746.7, 832.2, 906.8, 972.6, 1031, 1083, 1129, 1170, 1207, 1268, 1315, 1351, 1377, 1396, 1409, 1417, 1421, 1421, 1419, 1414, 1406, 1397, 1387, 1349, 1301, 1237, 1163, 1087, 1021, 964, 913.7, 829.4, 762.2, 706.3, 659, 618.4, 583.3, 552.3, 524.9, 500.4, 478.4, 458.5, 440.4, 423.9, 408.7 }; 577 452 … … 579 454 580 455 name [63] = "G4_STILBENE"; 581 Znum [63] = 0;582 583 456 G4double e63[78] = { 192, 228.9, 259.4, 286, 309.7, 351.2, 387.4, 419.7, 449.2, 476.4, 501.9, 525.8, 580.4, 629.2, 673.8, 714.9, 753.3, 789.4, 823.5, 856, 916.5, 972.3, 1024, 1073, 1119, 1162, 1203, 1243, 1280, 1316, 1351, 1384, 1416, 1446, 1585, 1703, 1805, 1892, 1968, 2034, 2090, 2139, 2215, 2268, 2303, 2323, 2331, 2330, 2321, 2307, 2287, 2265, 2240, 2212, 2184, 2155, 1995, 1841, 1703, 1582, 1477, 1385, 1305, 1233, 1113, 1015, 936, 869.6, 813, 764.1, 721.3, 683.7, 650.1, 620, 592.9, 568.3, 545.9, 525.4 }; 584 457 … … 586 459 587 460 name [64] = "G4_Ti"; 588 Znum [64] = 22;589 590 461 G4double e64[78] = { 59.24, 72.81, 84.28, 94.41, 103.6, 119.9, 134.3, 147.4, 159.4, 170.6, 181.1, 191.1, 214, 234.7, 253.8, 271.6, 288.3, 304.1, 319.1, 333.5, 360.5, 385.5, 409, 431.2, 452.2, 472.2, 491.4, 509.7, 527.3, 544.3, 560.6, 576.4, 591.7, 606.5, 674.2, 733.1, 785, 831, 871.7, 907.9, 940, 968.3, 1015, 1051, 1077, 1095, 1106, 1112, 1114, 1112, 1107, 1100, 1092, 1082, 1071, 1059, 995.6, 933.7, 877.6, 827.9, 785.2, 747.8, 714.5, 684.4, 631.9, 587.1, 548.3, 514.3, 484.2, 457.3, 433.4, 412.5, 393.7, 376.7, 361.5, 347.6, 334.9, 323.2 }; 591 462 … … 593 464 594 465 name [65] = "G4_Sn"; 595 Znum [65] = 50;596 597 466 G4double e65[78] = { 27.39, 33.96, 39.55, 44.52, 49.04, 57.11, 64.28, 70.8, 76.82, 82.45, 87.76, 92.79, 104.4, 115, 124.8, 133.9, 142.5, 150.6, 158.4, 165.8, 179.8, 192.9, 205.2, 216.8, 227.8, 238.4, 248.4, 258.1, 267.4, 276.4, 285.1, 293.5, 301.6, 309.5, 345.7, 377.3, 405.3, 430.1, 452.1, 471.8, 489.3, 504.8, 530.7, 550.9, 566.3, 577.9, 586.3, 592.2, 596.1, 598.4, 599.3, 599.1, 598.1, 596.4, 594.2, 591.5, 573.8, 552.8, 531.2, 510.1, 488.3, 467, 447, 428.6, 396.3, 369.4, 346.8, 327.7, 311.4, 297.1, 283.9, 271.9, 260.8, 250.6, 241.7, 233.6, 226, 218.9 }; 598 467 … … 600 469 601 470 name [66] = "G4_TISSUE_METHANE"; 602 Znum [66] = 0;603 604 471 G4double e66[78] = { 135.1, 165.6, 191.3, 213.9, 234.4, 270.7, 302.8, 331.8, 358.4, 383.2, 406.5, 428.6, 479.3, 525.2, 567.4, 606.7, 643.6, 678.5, 711.7, 743.4, 803.1, 858.6, 910.7, 960.1, 1007, 1052, 1095, 1136, 1176, 1214, 1251, 1287, 1322, 1356, 1514, 1655, 1783, 1899, 2006, 2104, 2193, 2275, 2418, 2535, 2626, 2693, 2737, 2760, 2764, 2752, 2728, 2695, 2655, 2612, 2566, 2519, 2278, 2060, 1878, 1727, 1602, 1494, 1403, 1323, 1191, 1085, 998.2, 926, 864.6, 811.7, 765.6, 724.9, 688.8, 656.5, 627.4, 601.1, 577.1, 555.2 }; 605 472 … … 607 474 608 475 name [67] = "G4_TISSUE_PROPANE"; 609 Znum [67] = 0;610 611 476 G4double e67[78] = { 149.7, 181.5, 208.2, 231.7, 252.8, 290.4, 323.5, 353.4, 380.9, 406.5, 430.5, 453.3, 505.7, 553, 596.6, 637.2, 675.4, 711.5, 745.8, 778.6, 840.4, 897.8, 951.6, 1003, 1051, 1097, 1141, 1183, 1224, 1263, 1301, 1337, 1372, 1407, 1563, 1701, 1822, 1929, 2024, 2109, 2185, 2252, 2362, 2446, 2507, 2549, 2573, 2583, 2581, 2569, 2550, 2524, 2494, 2461, 2426, 2389, 2211, 2043, 1887, 1744, 1616, 1507, 1415, 1334, 1201, 1094, 1006, 933.3, 871.4, 818.1, 771.5, 730.5, 694.1, 661.5, 632.1, 605.6, 581.4, 559.3 }; 612 477 … … 614 479 615 480 name [68] = "G4_TOLUENE"; 616 Znum [68] = 0;617 618 481 G4double e68[78] = { 192.5, 230, 261, 288.1, 312.3, 354.9, 392, 425.3, 455.6, 483.7, 510, 534.8, 591.3, 642.1, 688.4, 731.3, 771.4, 809.1, 844.8, 878.8, 942.4, 1001, 1056, 1107, 1155, 1201, 1245, 1287, 1327, 1365, 1401, 1437, 1471, 1504, 1652, 1779, 1888, 1983, 2065, 2136, 2197, 2250, 2333, 2392, 2430, 2452, 2461, 2459, 2449, 2433, 2411, 2386, 2358, 2328, 2296, 2264, 2109, 1960, 1817, 1683, 1560, 1456, 1368, 1291, 1163, 1060, 976.6, 906.6, 847.1, 795.7, 750.8, 711.3, 676.1, 644.6, 616.2, 590.5, 567, 545.6 }; 619 482 … … 621 484 622 485 name [69] = "G4_U"; 623 Znum [69] = 92;624 625 486 G4double e69[78] = { 13.2, 16.72, 19.77, 22.52, 25.04, 29.61, 33.73, 37.51, 41.03, 44.35, 47.5, 50.51, 57.52, 63.96, 69.97, 75.62, 80.99, 86.11, 91.01, 95.73, 104.7, 113.1, 121.1, 128.7, 136, 143, 149.8, 156.3, 162.6, 168.8, 174.7, 180.5, 186.2, 191.7, 217.4, 240.5, 261.5, 280.8, 298.5, 314.8, 329.8, 343.7, 368, 388.4, 405.3, 419, 429.8, 438.1, 444.2, 448.4, 450.8, 451.8, 451.6, 450.3, 448.2, 445.4, 420, 390.1, 362.9, 339.6, 319.8, 303.1, 288.9, 276.7, 256.9, 241.7, 229.4, 218.6, 209.1, 200.6, 193, 186.1, 179.8, 174, 168.6, 163.7, 159.1, 154.8 }; 626 487 … … 628 489 629 490 name [70] = "G4_W"; 630 Znum [70] = 74;631 632 491 G4double e70[78] = { 20.75, 25.23, 28.99, 32.29, 35.26, 40.51, 45.11, 49.26, 53.06, 56.59, 59.9, 63.02, 70.18, 76.63, 82.54, 88.02, 93.16, 98.01, 102.6, 107, 115.2, 122.9, 130, 136.7, 143.1, 149.2, 155, 160.6, 165.9, 171.1, 176.1, 180.9, 185.6, 190.1, 211.1, 229.6, 246.2, 261.3, 275.1, 287.7, 299.3, 310, 328.8, 344.7, 358.1, 369.2, 378.3, 385.6, 391.3, 395.6, 398.7, 400.6, 401.7, 401.9, 401.4, 400.4, 389.5, 374.8, 359.5, 344.8, 331, 318.3, 306.5, 295.7, 276.7, 260.8, 247.3, 235.5, 225.2, 216.1, 207.8, 200.3, 193.5, 187.3, 181.5, 176.2, 171.3, 166.7 }; 633 492 … … 635 494 636 495 name [71] = "G4_WATER"; 637 Znum [71] = 0;638 639 496 G4double e71[78] = { 98.91, 122.7, 143.1, 161.1, 177.5, 206.9, 233, 256.8, 278.8, 299.3, 318.6, 337, 379.5, 418.1, 453.8, 487.1, 518.6, 548.3, 576.7, 603.9, 655.2, 703, 748, 790.5, 831, 869.6, 906.6, 942.2, 976.4, 1009, 1041, 1072, 1102, 1131, 1265, 1383, 1488, 1582, 1666, 1743, 1811, 1873, 1978, 2062, 2128, 2178, 2215, 2240, 2255, 2262, 2262, 2256, 2245, 2230, 2211, 2190, 2050, 1896, 1752, 1624, 1511, 1414, 1329, 1255, 1132, 1034, 952.7, 884.8, 826.9, 777.1, 733.4, 694.9, 660.7, 630.1, 602.5, 577.6, 554.8, 534 }; 640 497 … … 642 499 643 500 name [72] = "G4_WATER_VAPOR"; 644 Znum [72] = 0;645 646 501 G4double e72[78] = { 126.3, 154.7, 178.7, 199.8, 218.8, 252.7, 282.5, 309.5, 334.3, 357.3, 379, 399.5, 446.7, 489.3, 528.5, 565, 599.2, 631.6, 662.4, 691.9, 747.3, 798.8, 847.2, 892.9, 936.3, 977.8, 1018, 1056, 1093, 1128, 1163, 1196, 1228, 1260, 1405, 1535, 1652, 1758, 1855, 1942, 2022, 2094, 2216, 2309, 2377, 2422, 2446, 2455, 2453, 2446, 2436, 2423, 2409, 2392, 2371, 2346, 2169, 1971, 1797, 1653, 1537, 1437, 1351, 1275, 1149, 1049, 965.8, 896.6, 837.6, 786.9, 742.5, 703.3, 668.6, 637.5, 609.5, 584.2, 561.1, 539.9 }; 647 502 … … 649 504 650 505 name [73] = "G4_Xe"; 651 Znum [73] = 54;652 653 506 G4double e73[78] = { 18.11, 23.3, 27.86, 31.99, 35.83, 42.84, 49.2, 55.1, 60.63, 65.87, 70.87, 75.65, 86.89, 97.3, 107.1, 116.3, 125.1, 133.5, 141.7, 149.5, 164.4, 178.6, 192, 204.9, 217.3, 229.2, 240.7, 251.8, 262.6, 273.1, 283.4, 293.3, 303, 312.5, 356.7, 396.5, 432.5, 465.2, 494.9, 521.8, 546.1, 567.9, 604.7, 633.2, 654.5, 669.3, 678.8, 683.6, 684.6, 682.5, 678, 671.7, 663.9, 655.1, 645.6, 635.6, 584.6, 538.7, 500.4, 468.8, 446.7, 430.5, 417.1, 405.3, 383.9, 364, 344.9, 326.8, 309.7, 294.6, 281.3, 269.5, 258.7, 248.8, 239.6, 231.1, 223.2, 216.2 }; 654 507 -
trunk/source/processes/electromagnetic/standard/src/G4BetheBlochModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheBlochModel.cc,v 1. 13 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4BetheBlochModel.cc,v 1.25 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 45 45 // 13-02-03 Add name (V.Ivanchenko) 46 46 // 24-03-05 Add G4EmCorrections (V.Ivanchenko) 47 // 11-04-05 Major optimisation of internal interfaces (V.Ivan tchenko)47 // 11-04-05 Major optimisation of internal interfaces (V.Ivanchenko) 48 48 // 11-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma) 49 49 // 12-02-06 move G4LossTableManager::Instance()->EmCorrections() 50 50 // in constructor (mma) 51 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 52 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 51 53 // 52 54 // ------------------------------------------------------------------- … … 63 65 #include "G4EmCorrections.hh" 64 66 #include "G4ParticleChangeForLoss.hh" 67 #include "G4NistManager.hh" 65 68 66 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 71 74 const G4String& nam) 72 75 : G4VEmModel(nam), 73 particle(0), 74 tlimit(DBL_MAX), 75 twoln10(2.0*log(10.0)), 76 bg2lim(0.0169), 77 taulim(8.4146e-3), 78 isIon(false) 79 { 76 particle(0), 77 tlimit(DBL_MAX), 78 twoln10(2.0*log(10.0)), 79 bg2lim(0.0169), 80 taulim(8.4146e-3), 81 isIon(false), 82 isInitialised(false) 83 { 84 fParticleChange = 0; 80 85 if(p) SetParticle(p); 81 86 theElectron = G4Electron::Electron(); 82 87 corr = G4LossTableManager::Instance()->EmCorrections(); 88 nist = G4NistManager::Instance(); 89 SetLowEnergyLimit(2.0*MeV); 83 90 } 84 91 … … 102 109 { 103 110 if (!particle) SetParticle(p); 104 G4String pname = particle->GetParticleName(); 105 if (particle->GetParticleType() == "nucleus" && 106 pname != "deuteron" && pname != "triton") isIon = true; 107 108 if (pParticleChange) 109 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 110 (pParticleChange); 111 else 112 fParticleChange = new G4ParticleChangeForLoss(); 113 } 114 115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 116 117 G4double G4BetheBlochModel::ComputeCrossSectionPerElectron( 118 const G4ParticleDefinition* p, 119 G4double kineticEnergy, 120 G4double cutEnergy, 121 G4double maxKinEnergy) 111 112 corrFactor = chargeSquare; 113 // always false before the run 114 SetDeexcitationFlag(false); 115 116 if(!isInitialised) { 117 isInitialised = true; 118 119 if(!fParticleChange) { 120 if (pParticleChange) { 121 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 122 (pParticleChange); 123 } else { 124 fParticleChange = new G4ParticleChangeForLoss(); 125 } 126 } 127 } 128 } 129 130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 131 132 void G4BetheBlochModel::SetParticle(const G4ParticleDefinition* p) 133 { 134 if(particle != p) { 135 particle = p; 136 G4String pname = particle->GetParticleName(); 137 if (particle->GetParticleType() == "nucleus" && 138 pname != "deuteron" && pname != "triton") { 139 isIon = true; 140 } 141 142 mass = particle->GetPDGMass(); 143 spin = particle->GetPDGSpin(); 144 G4double q = particle->GetPDGCharge()/eplus; 145 chargeSquare = q*q; 146 ratio = electron_mass_c2/mass; 147 G4double magmom = particle->GetPDGMagneticMoment() 148 *mass/(0.5*eplus*hbar_Planck*c_squared); 149 magMoment2 = magmom*magmom - 1.0; 150 formfact = 0.0; 151 if(particle->GetLeptonNumber() == 0) { 152 G4double x = 0.8426*GeV; 153 if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;} 154 else if(mass > GeV) { 155 x /= nist->GetZ13(mass/proton_mass_c2); 156 // tlimit = 51.2*GeV*A13[iz]*A13[iz]; 157 } 158 formfact = 2.0*electron_mass_c2/(x*x); 159 tlimit = 2.0/formfact; 160 } 161 } 162 } 163 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 165 166 G4double G4BetheBlochModel::GetChargeSquareRatio(const G4ParticleDefinition* p, 167 const G4Material* mat, 168 G4double kineticEnergy) 169 { 170 // this method is called only for ions 171 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy); 172 corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy); 173 return corrFactor; 174 } 175 176 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 177 178 G4double G4BetheBlochModel::GetParticleCharge(const G4ParticleDefinition* p, 179 const G4Material* mat, 180 G4double kineticEnergy) 181 { 182 // this method is called only for ions 183 return corr->GetParticleCharge(p,mat,kineticEnergy); 184 } 185 186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 187 188 G4double 189 G4BetheBlochModel::ComputeCrossSectionPerElectron(const G4ParticleDefinition* p, 190 G4double kineticEnergy, 191 G4double cutEnergy, 192 G4double maxKinEnergy) 122 193 { 123 194 G4double cross = 0.0; … … 130 201 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2; 131 202 132 cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax; 203 cross = 1.0/cutEnergy - 1.0/maxEnergy 204 - beta2*log(maxEnergy/cutEnergy)/tmax; 133 205 134 206 // +term for spin=1/2 particle 135 207 if( 0.5 == spin ) cross += 0.5*(maxEnergy - cutEnergy)/energy2; 208 209 // High order correction different for hadrons and ions 210 // nevetheless they are applied to reduce high energy transfers 211 // if(!isIon) 212 //cross += corr->FiniteSizeCorrectionXS(p,currentMaterial, 213 // kineticEnergy,cutEnergy); 136 214 137 215 cross *= twopi_mc2_rcl2*chargeSquare/beta2; … … 167 245 G4double maxEnergy) 168 246 { 247 currentMaterial = material; 169 248 G4double eDensity = material->GetElectronDensity(); 170 249 G4double cross = eDensity*ComputeCrossSectionPerElectron … … 222 301 dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2; 223 302 224 //High order correction only for hadrons 225 if(!isIon) dedx += corr->HighOrderCorrections(p,material,kineticEnergy); 226 303 //High order correction different for hadrons and ions 304 if(isIon) { 305 dedx += corr->IonBarkasCorrection(p,material,kineticEnergy); 306 } else { 307 dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy); 308 } 227 309 return dedx; 310 } 311 312 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 313 314 void G4BetheBlochModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple, 315 const G4DynamicParticle* dp, 316 G4double& eloss, 317 G4double&, 318 G4double length) 319 { 320 const G4ParticleDefinition* p = dp->GetDefinition(); 321 const G4Material* mat = couple->GetMaterial(); 322 G4double preKinEnergy = dp->GetKineticEnergy(); 323 G4double e = preKinEnergy - eloss*0.5; 324 if(e < 0.0) e = preKinEnergy*0.5; 325 326 if(isIon) { 327 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e); 328 GetModelOfFluctuations()->SetParticleAndCharge(p, q2); 329 eloss *= q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor; 330 eloss += length*corr->IonHighOrderCorrections(p,couple,e); 331 } 332 333 if(nuclearStopping && preKinEnergy*proton_mass_c2/mass < chargeSquare*100.*MeV) { 334 335 G4double nloss = length*corr->NuclearDEDX(p,mat,e,false); 336 337 // too big energy loss 338 if(eloss + nloss > preKinEnergy) { 339 nloss *= (preKinEnergy/(eloss + nloss)); 340 eloss = preKinEnergy; 341 } else { 342 eloss += nloss; 343 } 344 /* 345 G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy 346 << " de= " << eloss << " NIEL= " << nloss 347 << " dynQ= " << dp->GetCharge()/eplus << G4endl; 348 */ 349 fParticleChange->ProposeNonIonizingEnergyDeposit(nloss); 350 } 351 228 352 } 229 353 … … 239 363 G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy); 240 364 241 G4double maxKinEnergy = min(maxEnergy,tmax);365 G4double maxKinEnergy = std::min(maxEnergy,tmax); 242 366 if(minKinEnergy >= maxKinEnergy) return; 243 367 … … 246 370 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2; 247 371 248 G4double deltaKinEnergy, f; 249 250 // sampling follows ... 372 G4double deltaKinEnergy, f; 373 G4double f1 = 0.0; 374 G4double fmax = 1.0; 375 if( 0.5 == spin ) fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; 376 377 // sampling without nuclear size effect 251 378 do { 252 379 G4double q = G4UniformRand(); … … 255 382 256 383 f = 1.0 - beta2*deltaKinEnergy/tmax; 257 if( 0.5 == spin ) f += 0.5*deltaKinEnergy*deltaKinEnergy/etot2; 258 259 if(f > 1.0) { 260 G4cout << "G4BetheBlochModel::SampleSecondary Warning! " 261 << "Majorant 1.0 < " 262 << f << " for Edelta= " << deltaKinEnergy 263 << G4endl; 264 } 265 266 } while( G4UniformRand() > f ); 267 384 if( 0.5 == spin ) { 385 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2; 386 f += f1; 387 } 388 389 } while( fmax*G4UniformRand() > f); 390 391 // projectile formfactor - suppresion of high energy 392 // delta-electron production at high energy 393 394 G4double x = formfact*deltaKinEnergy; 395 if(x > 1.e-6) { 396 397 G4double x1 = 1.0 + x; 398 G4double g = 1.0/(x1*x1); 399 if( 0.5 == spin ) { 400 G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass); 401 g *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2)); 402 } 403 if(g > 1.0) { 404 G4cout << "### G4BetheBlochModel WARNING: g= " << g 405 << dp->GetDefinition()->GetParticleName() 406 << " Ekin(MeV)= " << kineticEnergy 407 << " delEkin(MeV)= " << deltaKinEnergy 408 << G4endl; 409 } 410 if(G4UniformRand() > g) return; 411 } 412 413 // delta-electron is produced 268 414 G4double totMomentum = totEnergy*sqrt(beta2); 269 415 G4double deltaMomentum = … … 309 455 } 310 456 311 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 458 459 G4double G4BetheBlochModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 460 G4double kinEnergy) 461 { 462 if(isIon) SetParticle(pd); 463 G4double tau = kinEnergy/mass; 464 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 465 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 466 return std::min(tmax,tlimit); 467 } 468 469 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4BetheHeitlerModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BetheHeitlerModel.cc,v 1.1 1 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BetheHeitlerModel.cc,v 1.12 2008/10/15 15:54:57 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 61 61 #include "G4PhysicsLogVector.hh" 62 62 #include "G4ParticleChangeForGamma.hh" 63 #include "G4LossTableManager.hh" 63 64 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 70 71 : G4VEmModel(nam), 71 72 theCrossSectionTable(0), 72 nbins(200) 73 { 73 nbins(10) 74 { 75 fParticleChange = 0; 74 76 theGamma = G4Gamma::Gamma(); 75 77 thePositron = G4Positron::Positron(); … … 92 94 const G4DataVector&) 93 95 { 94 if(pParticleChange) 95 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 96 else 97 fParticleChange = new G4ParticleChangeForGamma(); 96 if(!fParticleChange) { 97 if(pParticleChange) { 98 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 99 } else { 100 fParticleChange = new G4ParticleChangeForGamma(); 101 } 102 } 98 103 99 104 if(theCrossSectionTable) { … … 108 113 G4double emin = LowEnergyLimit(); 109 114 G4double emax = HighEnergyLimit(); 115 G4int n = nbins*G4int(log10(emax/emin)); 116 G4bool spline = G4LossTableManager::Instance()->SplineFlag(); 110 117 G4double e, value; 111 118 112 119 for(size_t j=0; j<nvect ; j++) { 113 120 114 ptrVector = new G4PhysicsLogVector(emin, emax, nbins); 121 ptrVector = new G4PhysicsLogVector(emin, emax, n); 122 ptrVector->SetSpline(spline); 115 123 G4double Z = (*theElementTable)[j]->GetZ(); 116 124 G4int iz = G4int(Z); -
trunk/source/processes/electromagnetic/standard/src/G4BohrFluctuations.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BohrFluctuations.cc,v 1. 6 2007/09/27 14:02:41vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BohrFluctuations.cc,v 1.7 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 137 137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 138 138 139 G4double G4BohrFluctuations::Dispersion(const G4Material* material, 140 const G4DynamicParticle* dp, 141 G4double& tmax, 142 G4double& length) 143 { 144 if(!particle) InitialiseMe(dp->GetDefinition()); 139 145 146 G4double electronDensity = material->GetElectronDensity(); 147 kineticEnergy = dp->GetKineticEnergy(); 148 G4double etot = kineticEnergy + particleMass; 149 beta2 = kineticEnergy*(kineticEnergy + 2.0*particleMass)/(etot*etot); 150 G4double siga = (1.0/beta2 - 0.5) * twopi_mc2_rcl2 * tmax * length 151 * electronDensity * chargeSquare; 152 153 return siga; 154 } 155 156 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 157 158 -
trunk/source/processes/electromagnetic/standard/src/G4BraggIonModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggIonModel.cc,v 1. 17 2007/07/28 13:30:53vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4BraggIonModel.cc,v 1.23 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 44 44 // 25-04-06 Add stopping data from ASTAR (V.Ivanchenko) 45 45 // 23-10-06 Reduce lowestKinEnergy to 0.25 keV (V.Ivanchenko) 46 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 47 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 46 48 // 47 49 … … 62 64 #include "G4Electron.hh" 63 65 #include "G4ParticleChangeForLoss.hh" 66 #include "G4LossTableManager.hh" 67 #include "G4EmCorrections.hh" 64 68 65 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 70 74 const G4String& nam) 71 75 : G4VEmModel(nam), 72 particle(0), 73 iMolecula(0), 74 isIon(false) 76 corr(0), 77 particle(0), 78 fParticleChange(0), 79 iMolecula(0), 80 isIon(false), 81 isInitialised(false) 75 82 { 76 83 if(p) SetParticle(p); 77 highKinEnergy = 2.0*MeV;78 lowKinEnergy = 0.0*MeV; 84 SetHighEnergyLimit(2.0*MeV); 85 79 86 HeMass = 3.727417*GeV; 80 87 rateMassHe2p = HeMass/proton_mass_c2; … … 104 111 { 105 112 if(p != particle) SetParticle(p); 106 G4String pname = particle->GetParticleName(); 107 if(particle->GetParticleType() == "nucleus" && 108 pname != "deuteron" && pname != "triton") isIon = true; 109 110 if(pParticleChange) 111 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 112 (pParticleChange); 113 else 114 fParticleChange = new G4ParticleChangeForLoss(); 115 113 114 corrFactor = chargeSquare; 115 116 // always false before the run 117 SetDeexcitationFlag(false); 118 119 if(!isInitialised) { 120 isInitialised = true; 121 122 G4String pname = particle->GetParticleName(); 123 if(particle->GetParticleType() == "nucleus" && 124 pname != "deuteron" && pname != "triton") isIon = true; 125 126 corr = G4LossTableManager::Instance()->EmCorrections(); 127 128 if(!fParticleChange) { 129 if(pParticleChange) { 130 fParticleChange = 131 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 132 } else { 133 fParticleChange = new G4ParticleChangeForLoss(); 134 } 135 } 136 } 137 } 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 140 141 G4double G4BraggIonModel::GetChargeSquareRatio(const G4ParticleDefinition* p, 142 const G4Material* mat, 143 G4double kineticEnergy) 144 { 145 // this method is called only for ions 146 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy); 147 corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy); 148 return corrFactor; 149 } 150 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 152 153 G4double G4BraggIonModel::GetParticleCharge(const G4ParticleDefinition* p, 154 const G4Material* mat, 155 G4double kineticEnergy) 156 { 157 // this method is called only for ions 158 return corr->GetParticleCharge(p,mat,kineticEnergy); 116 159 } 117 160 … … 124 167 G4double maxKinEnergy) 125 168 { 126 127 169 G4double cross = 0.0; 128 170 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy); 129 G4double maxEnergy = min(tmax,maxKinEnergy);171 G4double maxEnergy = std::min(tmax,maxKinEnergy); 130 172 if(cutEnergy < tmax) { 131 173 … … 213 255 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 214 256 257 void G4BraggIonModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple, 258 const G4DynamicParticle* dp, 259 G4double& eloss, 260 G4double&, 261 G4double length) 262 { 263 // this method is called only for ions 264 const G4ParticleDefinition* p = dp->GetDefinition(); 265 const G4Material* mat = couple->GetMaterial(); 266 G4double preKinEnergy = dp->GetKineticEnergy(); 267 G4double e = preKinEnergy - eloss*0.5; 268 if(e < 0.0) e = preKinEnergy*0.5; 269 270 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e); 271 GetModelOfFluctuations()->SetParticleAndCharge(p, q2); 272 eloss *= q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor; 273 274 if(nuclearStopping) { 275 276 G4double nloss = length*corr->NuclearDEDX(p,mat,e,false); 277 278 // too big energy loss 279 if(eloss + nloss > preKinEnergy) { 280 nloss *= (preKinEnergy/(eloss + nloss)); 281 eloss = preKinEnergy; 282 } else { 283 eloss += nloss; 284 } 285 /* 286 G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy 287 << " de= " << eloss << " NIEL= " << nloss 288 << " dynQ= " << dp->GetCharge()/eplus << G4endl; 289 */ 290 fParticleChange->ProposeNonIonizingEnergyDeposit(nloss); 291 } 292 } 293 294 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 295 215 296 void G4BraggIonModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp, 216 297 const G4MaterialCutsCouple*, … … 220 301 { 221 302 G4double tmax = MaxSecondaryKinEnergy(dp); 222 G4double xmax = min(tmax, maxEnergy);303 G4double xmax = std::min(tmax, maxEnergy); 223 304 if(xmin >= xmax) return; 224 305 … … 274 355 fParticleChange->SetProposedKineticEnergy(kineticEnergy); 275 356 fParticleChange->SetProposedMomentumDirection(finalP); 357 } 358 359 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 360 361 G4double G4BraggIonModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 362 G4double kinEnergy) 363 { 364 if(pd != particle) SetParticle(pd); 365 G4double tau = kinEnergy/mass; 366 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 367 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 368 return tmax; 276 369 } 277 370 -
trunk/source/processes/electromagnetic/standard/src/G4BraggModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BraggModel.cc,v 1. 16 2007/07/28 13:30:53vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BraggModel.cc,v 1.21 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 50 50 // 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma) 51 51 // 25-04-06 Add stopping data from PSTAR (V.Ivanchenko) 52 // 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio, 53 // CorrectionsAlongStep needed for ions(V.Ivanchenko) 52 54 53 55 // Class Description: … … 67 69 #include "G4Electron.hh" 68 70 #include "G4ParticleChangeForLoss.hh" 71 #include "G4LossTableManager.hh" 72 #include "G4EmCorrections.hh" 69 73 70 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 74 78 G4BraggModel::G4BraggModel(const G4ParticleDefinition* p, const G4String& nam) 75 79 : G4VEmModel(nam), 76 particle(0), 77 protonMassAMU(1.007276), 78 iMolecula(0), 79 isIon(false) 80 particle(0), 81 protonMassAMU(1.007276), 82 iMolecula(0), 83 isIon(false), 84 isInitialised(false) 80 85 { 81 86 if(p) SetParticle(p); 87 SetHighEnergyLimit(2.0*MeV); 88 82 89 lowestKinEnergy = 1.0*keV; 83 90 theZieglerFactor = eV*cm2*1.0e-15; … … 104 111 { 105 112 if(p != particle) SetParticle(p); 106 G4String pname = particle->GetParticleName(); 107 if(particle->GetParticleType() == "nucleus" && 108 pname != "deuteron" && pname != "triton") isIon = true; 109 110 if(pParticleChange) 111 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 112 (pParticleChange); 113 else 114 fParticleChange = new G4ParticleChangeForLoss(); 113 114 // always false before the run 115 SetDeexcitationFlag(false); 116 117 if(!isInitialised) { 118 isInitialised = true; 119 120 G4String pname = particle->GetParticleName(); 121 if(particle->GetParticleType() == "nucleus" && 122 pname != "deuteron" && pname != "triton") isIon = true; 123 124 corr = G4LossTableManager::Instance()->EmCorrections(); 125 126 if(pParticleChange) { 127 fParticleChange = 128 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 129 } else { 130 fParticleChange = new G4ParticleChangeForLoss(); 131 } 132 } 133 } 134 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 137 G4double G4BraggModel::GetChargeSquareRatio(const G4ParticleDefinition* p, 138 const G4Material* mat, 139 G4double kineticEnergy) 140 { 141 // this method is called only for ions 142 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy); 143 GetModelOfFluctuations()->SetParticleAndCharge(p, q2); 144 return q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy); 145 } 146 147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 148 149 G4double G4BraggModel::GetParticleCharge(const G4ParticleDefinition* p, 150 const G4Material* mat, 151 G4double kineticEnergy) 152 { 153 // this method is called only for ions 154 return corr->GetParticleCharge(p,mat,kineticEnergy); 115 155 } 116 156 … … 123 163 G4double maxKinEnergy) 124 164 { 125 126 165 G4double cross = 0.0; 127 166 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy); 128 G4double maxEnergy = min(tmax,maxKinEnergy);167 G4double maxEnergy = std::min(tmax,maxKinEnergy); 129 168 if(cutEnergy < tmax) { 130 169 … … 203 242 204 243 return dedx; 244 } 245 246 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 247 248 void G4BraggModel::CorrectionsAlongStep(const G4MaterialCutsCouple* couple, 249 const G4DynamicParticle* dp, 250 G4double& eloss, 251 G4double&, 252 G4double length) 253 { 254 if(nuclearStopping) { 255 256 G4double preKinEnergy = dp->GetKineticEnergy(); 257 G4double e = preKinEnergy - eloss*0.5; 258 if(e < 0.0) e = preKinEnergy*0.5; 259 G4double nloss = length*corr->NuclearDEDX(dp->GetDefinition(), 260 couple->GetMaterial(), 261 e,false); 262 263 // too big energy loss 264 if(eloss + nloss > preKinEnergy) { 265 nloss *= (preKinEnergy/(eloss + nloss)); 266 eloss = preKinEnergy; 267 } else { 268 eloss += nloss; 269 } 270 /* 271 G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy 272 << " de= " << eloss << " NIEL= " << nloss 273 << " dynQ= " << dp->GetCharge()/eplus << G4endl; 274 */ 275 fParticleChange->ProposeNonIonizingEnergyDeposit(nloss); 276 } 205 277 } 206 278 … … 268 340 269 341 vdp->push_back(delta); 342 } 343 344 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 345 346 G4double G4BraggModel::MaxSecondaryEnergy(const G4ParticleDefinition* pd, 347 G4double kinEnergy) 348 { 349 if(pd != particle) SetParticle(pd); 350 G4double tau = kinEnergy/mass; 351 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) / 352 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio); 353 return tmax; 270 354 } 271 355 -
trunk/source/processes/electromagnetic/standard/src/G4ComptonScattering.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ComptonScattering.cc,v 1. 27 2006/09/14 10:27:19 maireExp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ComptonScattering.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 74 74 isInitialised(false) 75 75 { 76 SetLambdaBinning(90); 77 SetMinKinEnergy(0.1*keV); 78 SetMaxKinEnergy(100.0*GeV); 76 SetProcessSubType(fComptonScattering); 79 77 } 80 78 … … 86 84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 87 85 86 G4bool G4ComptonScattering::IsApplicable(const G4ParticleDefinition& p) 87 { 88 return (&p == G4Gamma::Gamma()); 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 88 93 void G4ComptonScattering::InitialiseProcess(const G4ParticleDefinition*) 89 94 { … … 92 97 SetBuildTableFlag(true); 93 98 SetSecondaryParticle(G4Electron::Electron()); 94 G4double emin = MinKinEnergy();95 G4double emax = MaxKinEnergy();96 99 if(!Model()) SetModel(new G4KleinNishinaCompton); 97 Model()->SetLowEnergyLimit( emin);98 Model()->SetHighEnergyLimit( emax);100 Model()->SetLowEnergyLimit(MinKinEnergy()); 101 Model()->SetHighEnergyLimit(MaxKinEnergy()); 99 102 AddEmModel(1, Model()); 100 103 } … … 104 107 105 108 void G4ComptonScattering::PrintInfo() 106 { 107 G4cout 108 << " Total cross sections has a good parametrisation" 109 << " from 10 KeV to (100/Z) GeV" 110 << "\n Sampling according " << Model()->GetName() << " model" 111 << G4endl; 112 } 109 {} 113 110 114 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4ComptonScattering52.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ComptonScattering52.cc,v 1. 5 2007/05/16 14:00:56vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ComptonScattering52.cc,v 1.7 2008/10/15 17:53:44 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 73 73 NumbBinTable(80), 74 74 fminimalEnergy(1*eV) 75 {} 75 { 76 SetProcessSubType(13); 77 G4cout << "!!! G4ComptonScattering52 is the obsolete process class and will be removed soon !!!" 78 << G4endl; 79 } 76 80 77 81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScattering.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScattering.cc,v 1. 11 2007/11/20 18:43:25vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4CoulombScattering.cc,v 1.20 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 59 59 60 60 G4CoulombScattering::G4CoulombScattering(const G4String& name) 61 : G4VEmProcess(name),thetaMin(0.0),thetaMax(pi),q2Max( DBL_MAX),61 : G4VEmProcess(name),thetaMin(0.0),thetaMax(pi),q2Max(TeV*TeV), 62 62 isInitialised(false) 63 63 { 64 G4VEmProcess::SetBuildTableFlag(true);64 SetBuildTableFlag(true); 65 65 SetStartFromNullFlag(false); 66 66 SetIntegral(true); 67 SetMinKinEnergy(keV);68 SetMaxKinEnergy(PeV);69 67 thEnergy = PeV; 70 68 thEnergyElec = PeV; … … 73 71 thEnergyElec = 10.*GeV; 74 72 } 75 SetLambdaBinning(120);76 73 SetSecondaryParticle(G4Electron::Electron()); 77 buildElmTableFlag = true;74 SetProcessSubType(fCoulombScattering); 78 75 } 79 76 … … 85 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 86 83 84 G4bool G4CoulombScattering::IsApplicable(const G4ParticleDefinition& p) 85 { 86 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived()); 87 } 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 90 87 91 void G4CoulombScattering::InitialiseProcess(const G4ParticleDefinition* p) 88 92 { 89 if(!isInitialised) { 93 // second initialisation 94 if(isInitialised) { 95 G4VEmModel* mod = GetModelByIndex(0); 96 mod->SetPolarAngleLimit(PolarAngleLimit()); 97 mod = GetModelByIndex(1); 98 if(mod) mod->SetPolarAngleLimit(PolarAngleLimit()); 99 100 // first initialisation 101 } else { 90 102 isInitialised = true; 91 103 aParticle = p; 92 104 G4double mass = p->GetPDGMass(); 93 105 if (mass > GeV || p->GetParticleType() == "nucleus") { 94 buildElmTableFlag = false;106 SetBuildTableFlag(false); 95 107 verboseLevel = 0; 96 108 } else { … … 106 118 if(mass < MeV) eth = thEnergyElec; 107 119 if(eth > emin) { 108 G4eCoulombScatteringModel* model = 109 new G4eCoulombScatteringModel(thetaMin,thetaMax,buildElmTableFlag,q2Max);120 G4eCoulombScatteringModel* model = new G4eCoulombScatteringModel(); 121 model->SetPolarAngleLimit(PolarAngleLimit()); 110 122 model->SetLowEnergyLimit(emin); 111 123 model->SetHighEnergyLimit(std::min(eth,emax)); … … 113 125 } 114 126 if(eth < emax) { 115 G4CoulombScatteringModel* model = 116 new G4CoulombScatteringModel(thetaMin,thetaMax,buildElmTableFlag,q2Max);127 G4CoulombScatteringModel* model = new G4CoulombScatteringModel(); 128 model->SetPolarAngleLimit(PolarAngleLimit()); 117 129 model->SetLowEnergyLimit(eth); 118 130 model->SetHighEnergyLimit(emax); … … 126 138 void G4CoulombScattering::PrintInfo() 127 139 { 128 G4cout << " Scattering of " << aParticle->GetParticleName() 129 << " with " << thetaMin/degree 130 << " < Theta(degree) < " << thetaMax/degree 131 << "; Eth(MeV)= "; 140 G4cout << " " << PolarAngleLimit()/degree 141 << " < Theta(degree) < 180" 142 << ", Eth(MeV)= "; 132 143 if(aParticle->GetPDGMass() < MeV) G4cout << thEnergyElec; 133 144 else G4cout << thEnergy; -
trunk/source/processes/electromagnetic/standard/src/G4CoulombScatteringModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CoulombScatteringModel.cc,v 1. 29 2007/11/09 11:45:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4CoulombScatteringModel.cc,v 1.37 2008/07/31 13:11:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 44 44 // 19.10.06 V.Ivanchenko use inheritance from G4eCoulombScatteringModel 45 45 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 46 // 09.06.08 V.Ivanchenko SelectIsotope is moved to the base class 46 47 // 47 48 // Class Description: … … 55 56 #include "Randomize.hh" 56 57 #include "G4ParticleChangeForGamma.hh" 57 #include "G4NistManager.hh"58 58 #include "G4ParticleTable.hh" 59 59 #include "G4IonTable.hh" … … 64 64 using namespace std; 65 65 66 G4CoulombScatteringModel::G4CoulombScatteringModel( 67 G4double thetaMin, G4double thetaMax, G4bool build, 68 G4double tlim, const G4String& nam) 69 : G4eCoulombScatteringModel(thetaMin,thetaMax,build,tlim,nam) 70 { 71 theMatManager = G4NistManager::Instance(); 72 theParticleTable = G4ParticleTable::GetParticleTable(); 73 } 66 G4CoulombScatteringModel::G4CoulombScatteringModel(const G4String& nam) 67 : G4eCoulombScatteringModel(nam) 68 {} 74 69 75 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 84 79 G4double kinEnergy, 85 80 G4double Z, 86 G4double A,81 G4double, 87 82 G4double cutEnergy, 88 83 G4double) 89 84 { 90 if(p == particle && kinEnergy == tkin && Z == targetZ && 91 A == targetA && cutEnergy == ecut) return nucXSection; 92 93 // Lab system 94 G4double ekin = std::max(keV, kinEnergy); 95 nucXSection = ComputeElectronXSectionPerAtom(p,ekin,Z,A,cutEnergy); 85 SetupParticle(p); 86 G4double ekin = std::max(lowEnergyLimit, kinEnergy); 87 SetupKinematic(ekin, cutEnergy); 88 89 // save lab system kinematics 90 G4double xtkin = tkin; 91 G4double xmom2 = mom2; 92 G4double xinvb = invbeta2; 96 93 97 94 // CM system 98 95 G4int iz = G4int(Z); 99 G4double m 1 = theMatManager->GetAtomicMassAmu(iz)*amu_c2;96 G4double m2 = fNistManager->GetAtomicMassAmu(iz)*amu_c2; 100 97 G4double etot = tkin + mass; 101 98 G4double ptot = sqrt(mom2); 102 G4double bet = ptot/(etot + m1); 103 G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet)); 104 G4double momCM= gam*(ptot - bet*etot); 105 106 // G4cout << "ptot= " << ptot << " etot= " << etot << " beta= " 107 // << bet << " gam= " << gam << " Z= " << Z << " A= " << A << G4endl; 108 // G4cout << " CM. mom= " << momCM << " m= " << m 109 // << " m1= " << m1 << " iz= " << iz <<G4endl; 110 111 G4double momCM2 = momCM*momCM; 112 cosTetMaxNuc = std::max(cosThetaMax, 1.0 - 0.5*q2Limit/momCM2); 113 if(1.5 > targetA && p == theProton && cosTetMaxNuc < 0.0) cosTetMaxNuc = 0.0; 114 //G4cout << " ctmax= " << cosTetMaxNuc 115 //<< " ctmin= " << cosThetaMin << G4endl; 116 117 // Cross section in CM system 118 if(cosTetMaxNuc < cosThetaMin) { 119 G4double effmass = mass*m1/(mass + m1); 120 G4double x1 = 1.0 - cosThetaMin; 121 G4double x2 = 1.0 - cosTetMaxNuc; 122 G4double z1 = x1 + screenZ; 123 G4double z2 = x2 + screenZ; 124 G4double d = 1.0/formfactA; 125 G4double zn1= x1 + d; 126 G4double zn2= x2 + d; 127 nucXSection += coeff*Z*Z*chargeSquare*(1.0 + effmass*effmass/momCM2) 128 *(1./z1 - 1./z2 + 1./zn1 - 1./zn2 + 129 2.0*formfactA*std::log(z1*zn2/(z2*zn1)))/momCM2; 130 //G4cout << "XS: x1= " << x1 << " x2= " << x2 131 //<< " cross= " << cross << G4endl; 132 //G4cout << "momCM2= " << momCM2 << " invbeta2= " << invbeta2 133 // << " coeff= " << coeff << G4endl; 134 } 135 if(nucXSection < 0.0) nucXSection = 0.0; 136 return nucXSection; 137 } 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 140 141 G4double G4CoulombScatteringModel::SelectIsotope(const G4Element* elm) 142 { 143 G4double N = elm->GetN(); 144 G4int ni = elm->GetNumberOfIsotopes(); 145 if(ni > 0) { 146 G4double* ab = elm->GetRelativeAbundanceVector(); 147 G4double x = G4UniformRand(); 148 G4int idx; 149 for(idx=0; idx<ni; idx++) { 150 x -= ab[idx]; 151 if (x <= 0.0) break; 152 } 153 if(idx >= ni) { 154 G4cout << "G4CoulombScatteringModel::SelectIsotope WARNING: " 155 << "abandance vector for" 156 << elm->GetName() << " is not normalised to unit" << G4endl; 157 } else { 158 N = G4double(elm->GetIsotope(idx)->GetN()); 159 } 160 } 161 return N; 99 100 G4double m12 = mass*mass; 101 G4double momCM= ptot*m2/sqrt(m12 + m2*m2 + 2.0*etot*m2); 102 103 mom2 = momCM*momCM; 104 tkin = sqrt(mom2 + m12) - mass; 105 invbeta2 = 1.0 + m12/mom2; 106 107 SetupTarget(Z, tkin); 108 109 G4double xsec = CrossSectionPerAtom(); 110 111 // restore Lab system kinematics 112 tkin = xtkin; 113 mom2 = xmom2; 114 invbeta2 = xinvb; 115 116 return xsec; 162 117 } 163 118 … … 169 124 const G4DynamicParticle* dp, 170 125 G4double cutEnergy, 171 G4double maxEnergy)126 G4double) 172 127 { 173 const G4Material* aMaterial = couple->GetMaterial();174 const G4ParticleDefinition* p = dp->GetDefinition();175 128 G4double kinEnergy = dp->GetKineticEnergy(); 176 177 // Select isotope and setup 178 SetupParticle(p); 179 const G4Element* elm = 180 SelectRandomAtom(aMaterial,p,kinEnergy,cutEnergy,maxEnergy); 181 G4double Z = elm->GetZ(); 182 G4double A = SelectIsotope(elm); 129 if(kinEnergy <= DBL_MIN) return; 130 DefineMaterial(couple); 131 SetupParticle(dp->GetDefinition()); 132 G4double ekin = std::max(lowEnergyLimit, kinEnergy); 133 SetupKinematic(ekin, cutEnergy); 134 135 // Choose nucleus 136 currentElement = SelectRandomAtom(couple,particle,ekin,ecut,tkin); 137 138 G4double Z = currentElement->GetZ(); 183 139 G4int iz = G4int(Z); 184 G4int ia = G4int(A + 0.5); 185 186 G4double cross = 187 ComputeCrossSectionPerAtom(p,kinEnergy,Z,A,cutEnergy,maxEnergy); 188 189 G4double costm = cosTetMaxNuc; 190 G4double formf = formfactA; 191 if(G4UniformRand()*cross < elecXSection) { 192 costm = cosTetMaxElec; 193 formf = 0.0; 194 } 195 196 // G4cout << "SampleSec: Ekin= " << kinEnergy << " m1= " << m1 197 // << " Z= "<< Z << " A= " <<A<< G4endl; 198 199 if(costm >= cosThetaMin) return; 200 201 // kinematics in CM system 202 G4double m1 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia); 203 G4double etot = kinEnergy + mass; 140 G4int ia = SelectIsotopeNumber(currentElement); 141 G4double m2 = theParticleTable->GetIonTable()->GetNucleusMass(iz, ia); 142 143 // CM system 144 G4double etot = tkin + mass; 204 145 G4double ptot = sqrt(mom2); 205 G4double bet = ptot/(etot + m1); 146 147 G4double momCM= ptot*m2/sqrt(mass*mass + m2*m2 + 2.0*etot*m2); 148 mom2 = momCM*momCM; 149 G4double m12 = mass*mass; 150 G4double eCM = sqrt(mom2 + m12); 151 152 // a correction for heavy projectile 153 G4double fm = m2/(mass + m2); 154 invbeta2 = 1.0 + m12*fm*fm/mom2; 155 156 // sample scattering angle in CM system 157 SetupTarget(Z, eCM - mass); 158 159 G4double cost = SampleCosineTheta(); 160 G4double z1 = 1.0 - cost; 161 if(z1 < 0.0) return; 162 163 G4double sint = sqrt(z1*(1.0 + cost)); 164 G4double phi = twopi * G4UniformRand(); 165 166 // kinematics in the Lab system 167 G4double bet = ptot/(etot + m2); 206 168 G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet)); 207 G4double pCM = gam*(ptot - bet*etot); 208 G4double eCM = gam*(etot - bet*ptot); 209 210 G4double x1 = 1. - cosThetaMin + screenZ; 211 G4double x2 = 1. - costm; 212 G4double x3 = cosThetaMin - costm; 213 214 G4double grej, z, z1; 215 do { 216 z = G4UniformRand()*x3; 217 z1 = (x1*x2 - screenZ*z)/(x1 + z); 218 if(z1 < 0.0) z1 = 0.0; 219 else if(z1 > 2.0) z1 = 2.0; 220 grej = 1.0/(1.0 + formf*z1); 221 } while ( G4UniformRand() > grej*grej ); 222 223 G4double cost = 1.0 - z1; 224 G4double sint= sqrt(z1*(2.0 - z1)); 225 226 G4double phi = twopi * G4UniformRand(); 227 228 // projectile after scattering 229 G4double pzCM = pCM*cost; 230 G4ThreeVector v1(pCM*cos(phi)*sint,pCM*sin(phi)*sint,gam*(pzCM + bet*eCM)); 169 G4double pzCM = momCM*cost; 170 171 G4ThreeVector v1(momCM*cos(phi)*sint,momCM*sin(phi)*sint,gam*(pzCM + bet*eCM)); 231 172 G4ThreeVector dir = dp->GetMomentumDirection(); 232 173 G4ThreeVector newDirection = v1.unit(); 233 174 newDirection.rotateUz(dir); 234 175 fParticleChange->ProposeMomentumDirection(newDirection); 176 235 177 G4double elab = gam*(eCM + bet*pzCM); 236 G4doubleekin = elab - mass;178 ekin = elab - mass; 237 179 if(ekin < 0.0) ekin = 0.0; 238 G4double plab = sqrt(ekin*(ekin + 2.0*mass));239 180 fParticleChange->SetProposedKineticEnergy(ekin); 240 181 241 182 // recoil 242 183 G4double erec = kinEnergy - ekin; 243 if(erec > Z*aMaterial->GetIonisation()->GetMeanExcitationEnergy()) { 184 G4double th = 185 std::min(recoilThreshold, 186 Z*currentElement->GetIonisation()->GetMeanExcitationEnergy()); 187 188 if(erec > th) { 244 189 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz); 190 G4double plab = sqrt(ekin*(ekin + 2.0*mass)); 245 191 G4ThreeVector p2 = (ptot*dir - plab*newDirection).unit(); 246 192 G4DynamicParticle* newdp = new G4DynamicParticle(ion, p2, erec); -
trunk/source/processes/electromagnetic/standard/src/G4GammaConversion.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GammaConversion.cc,v 1. 27 2006/09/14 10:27:19 maireExp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4GammaConversion.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 79 79 isInitialised(false) 80 80 { 81 SetLambdaBinning(100);82 81 SetMinKinEnergy(2.0*electron_mass_c2); 83 Set MaxKinEnergy(100.0*GeV);82 SetProcessSubType(fGammaConversion); 84 83 } 85 84 … … 91 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 91 92 G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& p) 93 { 94 return (&p == G4Gamma::Gamma()); 95 } 96 97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 98 93 99 void G4GammaConversion::InitialiseProcess(const G4ParticleDefinition*) 94 100 { … … 97 103 SetBuildTableFlag(true); 98 104 SetSecondaryParticle(G4Electron::Electron()); 99 G4double emin = max(MinKinEnergy(), 2.0*electron_mass_c2);105 G4double emin = std::max(MinKinEnergy(), 2.0*electron_mass_c2); 100 106 SetMinKinEnergy(emin); 101 G4double emax = MaxKinEnergy(); 102 if(!Model()) SetModel(new G4BetheHeitlerModel); 107 if(!Model()) SetModel(new G4BetheHeitlerModel()); 103 108 Model()->SetLowEnergyLimit(emin); 104 Model()->SetHighEnergyLimit( emax);109 Model()->SetHighEnergyLimit(MaxKinEnergy()); 105 110 AddEmModel(1, Model()); 106 111 } … … 110 115 111 116 void G4GammaConversion::PrintInfo() 112 { 113 G4cout 114 << " Total cross sections has a good parametrisation" 115 << " from 1.5 MeV to 100 GeV for all Z;" 116 << "\n sampling secondary e+e- according " 117 << Model()->GetName() << " model" 118 << G4endl; 119 } 117 {} 120 118 121 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4InitXscPAI.cc
r819 r961 26 26 // 27 27 // $Id: G4InitXscPAI.cc,v 1.9 2006/06/29 19:53:00 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/src/G4IonFluctuations.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4IonFluctuations.cc,v 1. 5.2.1 2008/04/25 00:22:53vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4IonFluctuations.cc,v 1.25 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 46 46 // 16-10-03 Changed interface to Initialisation (V.Ivanchenko) 47 47 // 27-09-07 Use FermiEnergy from material, add cut dependence (V.Ivanchenko) 48 // 01-02-08 Add protection for small energies and optimise the code (V.Ivanchenko) 49 // 01-06-08 Added initialisation of effective charge prestep (V.Ivanchenko) 48 50 // 49 51 // Class Description: … … 60 62 #include "G4Material.hh" 61 63 #include "G4DynamicParticle.hh" 62 #include "G4ParticleDefinition.hh"63 64 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 67 68 68 69 G4IonFluctuations::G4IonFluctuations(const G4String& nam) 69 :G4VEmFluctuationModel(nam), 70 particle(0), 71 minNumberInteractionsBohr(10.0), 72 theBohrBeta2(50.0*keV/proton_mass_c2), 73 minFraction(0.2), 74 xmin(0.2), 75 minLoss(0.001*eV) 70 : G4VEmFluctuationModel(nam), 71 particle(0), 72 particleMass(proton_mass_c2), 73 charge(1.0), 74 chargeSquare(1.0), 75 effChargeSquare(1.0), 76 parameter(10.0*CLHEP::MeV/CLHEP::proton_mass_c2), 77 minNumberInteractionsBohr(0.0), 78 theBohrBeta2(50.0*keV/CLHEP::proton_mass_c2), 79 minFraction(0.2), 80 xmin(0.2), 81 minLoss(0.001*eV) 76 82 {} 77 83 … … 89 95 charge = part->GetPDGCharge()/eplus; 90 96 chargeSquare = charge*charge; 91 chargeSqRatio = 1.0; 97 effChargeSquare= chargeSquare; 98 uniFluct.InitialiseMe(part); 92 99 } 93 100 … … 96 103 G4double G4IonFluctuations::SampleFluctuations(const G4Material* material, 97 104 const G4DynamicParticle* dp, 98 G4double& tmax, 99 G4double& length, 100 G4double& meanLoss) 101 { 105 G4double& tmax, 106 G4double& length, 107 G4double& meanLoss) 108 { 109 // G4cout << "### meanLoss= " << meanLoss << G4endl; 102 110 if(meanLoss <= minLoss) return meanLoss; 103 // G4cout << "### meanLoss= " << meanLoss << G4endl; 111 112 //G4cout << "G4IonFluctuations::SampleFluctuations E(MeV)= " << dp->GetKineticEnergy() 113 // << " Elim(MeV)= " << parameter*charge*particleMass << G4endl; 114 115 // Vavilov fluctuations 116 if(dp->GetKineticEnergy() > parameter*charge*particleMass) { 117 return uniFluct.SampleFluctuations(material,dp,tmax,length,meanLoss); 118 } 104 119 105 120 G4double siga = Dispersion(material,dp,tmax,length); … … 107 122 108 123 G4double navr = minNumberInteractionsBohr; 109 110 124 navr = meanLoss*meanLoss/siga; 111 // 125 //G4cout << "### siga= " << sqrt(siga) << " navr= " << navr << G4endl; 112 126 113 127 // Gaussian fluctuation … … 126 140 // G4cout << "siga= " << siga << G4endl; 127 141 siga = sqrt(siga); 128 129 142 G4double lossmax = meanLoss+meanLoss; 130 do { 131 loss = G4RandGauss::shoot(meanLoss,siga); 132 } while (0.0 > loss || loss > lossmax); 133 143 144 if(siga > 5.0*meanLoss) { 145 loss = lossmax*G4UniformRand(); 146 } else { 147 do { 148 loss = G4RandGauss::shoot(meanLoss,siga); 149 } while (0.0 > loss || loss > lossmax); 150 } 134 151 // Poisson fluctuations 135 152 } else { … … 139 156 } 140 157 141 // 158 //G4cout << "meanLoss= " << meanLoss << " loss= " << loss << G4endl; 142 159 return loss; 143 160 } … … 145 162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 146 163 147 G4double G4IonFluctuations::Dispersion( 148 const G4Material* material, 149 const G4DynamicParticle* dp, 150 G4double& tmax, 151 G4double& length) 152 { 153 particle = dp->GetDefinition(); 154 charge = particle->GetPDGCharge()/eplus; 155 G4double Q2 = charge*charge; 156 particleMass = particle->GetPDGMass(); 157 G4double q = dp->GetCharge()/eplus; 158 chargeSquare = q*q; 159 chargeSqRatio = chargeSquare/Q2; 160 161 //chargeSquare = charge*charge; 162 //chargeSqRatio = 1.0; 164 G4double G4IonFluctuations::Dispersion(const G4Material* material, 165 const G4DynamicParticle* dp, 166 G4double& tmax, 167 G4double& length) 168 { 169 kineticEnergy = dp->GetKineticEnergy(); 170 G4double etot = kineticEnergy + particleMass; 171 beta2 = kineticEnergy*(kineticEnergy + 2.*particleMass)/(etot*etot); 163 172 164 173 G4double electronDensity = material->GetElectronDensity(); 165 kineticEnergy = dp->GetKineticEnergy(); 166 G4double etot = kineticEnergy + particleMass;167 //G4cout << "e= " << kineticEnergy << " m= " << particleMass168 // << " tmax= " << tmax << " l= " << length << " q^2= " << chargeSquare << G4endl;169 beta2 = kineticEnergy*(kineticEnergy + 2.*particleMass)/(etot*etot);170 174 175 /* 176 G4cout << "e= " << kineticEnergy << " m= " << particleMass 177 << " tmax= " << tmax << " l= " << length 178 << " q^2= " << effChargeSquare << " beta2=" << beta2<< G4endl; 179 */ 171 180 G4double siga = (1. - beta2*0.5)*tmax*length*electronDensity* 172 twopi_mc2_rcl2* Q2/beta2;181 twopi_mc2_rcl2*chargeSquare/beta2; 173 182 174 183 // Low velocity - additional ion charge fluctuations according to 175 184 // Q.Yang et al., NIM B61(1991)149-155. 176 G4double zeff = electronDensity/(material->GetTotNbOfAtomsPerVolume()); 177 //G4cout << "siga= " << siga << " zeff= " << zeff << " c= " << c << G4endl; 178 179 G4double f = 0.0; 180 181 // correction factors with cut dependence 182 if ( beta2 < 3.0*theBohrBeta2*zeff ) { 183 184 G4double a = CoeffitientA (zeff); 185 G4double b = CoeffitientB (material, zeff); 186 // G4cout << "a= " << a << " b= " << b << G4endl; 187 f = a*chargeSqRatio + b; 188 } else { 189 190 // H.Geissel et al. NIM B, 195 (2002) 3. 191 f = RelativisticFactor(material, zeff); 192 } 185 //G4cout << "sigE= " << sqrt(siga) << " charge= " << charge <<G4endl; 186 187 G4double Z = electronDensity/material->GetTotNbOfAtomsPerVolume(); 188 189 G4double fac = Factor(material, Z); 193 190 194 191 // heavy ion correction … … 196 193 if(beta2 > theBohrBeta2) f1/= beta2; 197 194 else f1/= theBohrBeta2; 198 if(f1 > 2.0) f1 = 2.0; 199 f *= (1.0 + f1); 200 201 if(f > 1.0) { 202 siga *= (1. + (f - 1.0)*2.0*electron_mass_c2*beta2/(tmax*(1.0 - beta2))); 203 } 204 // G4cout << "siga= " << siga << G4endl; 195 if(f1 > 2.5) f1 = 2.5; 196 fac *= (1.0 + f1); 197 198 // taking into account the cut 199 if(fac > 1.0) { 200 siga *= (1.0 + (fac - 1.0)*2.0*electron_mass_c2*beta2/(tmax*(1.0 - beta2))); 201 } 202 //G4cout << "siga(keV)= " << sqrt(siga)/keV << " fac= " << fac 203 // << " f1= " << f1 << G4endl; 205 204 206 205 return siga; … … 209 208 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 210 209 211 G4double G4IonFluctuations:: CoeffitientA(G4double& zeff)210 G4double G4IonFluctuations::Factor(const G4Material* material, G4double Z) 212 211 { 213 212 // The aproximation of energy loss fluctuations … … 215 214 216 215 // Reduced energy in MeV/AMU 217 G4double energy = kineticEnergy * amu_c2/(particleMass*MeV) ; 218 static G4double a[96][4] = { 216 G4double energy = kineticEnergy *amu_c2/(particleMass*MeV) ; 217 218 // simple approximation for higher beta2 219 G4double s1 = RelativisticFactor(material, Z); 220 221 // tabulation for lower beta2 222 if( beta2 < 3.0*theBohrBeta2*Z ) { 223 224 static G4double a[96][4] = { 219 225 {-0.3291, -0.8312, 0.2460, -1.0220}, 220 226 {-0.5615, -0.5898, 0.5205, -0.7258}, … … 260 266 {-0.3972, -0.3600, 1.0260, -0.5842}, 261 267 262 {-0.3985, -0.3803, 1.0200, -0.6013},268 {-0.3985, -0.3803, 1.0200, -0.6013}, 263 269 {-0.3985, -0.3979, 1.0150, -0.6168}, 264 270 {-0.3968, -0.3990, 1.0160, -0.6195}, … … 322 328 {-0.4284, -0.3204, 1.6290, -0.6380}, 323 329 {-0.4227, -0.3217, 1.6360, -0.6438} 324 } ; 325 326 G4int iz = (G4int)zeff - 2 ; 327 if( 0 > iz ) iz = 0 ; 328 if(95 < iz ) iz = 95 ; 329 330 G4double q = 1.0 / (1.0 + a[iz][0]*pow(energy,a[iz][1])+ 331 + a[iz][2]*pow(energy,a[iz][3])) ; 332 333 return q ; 334 } 335 336 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 337 338 G4double G4IonFluctuations::CoeffitientB(const G4Material* material, G4double& zeff) 339 { 340 // The aproximation of energy loss fluctuations 341 // Q.Yang et al., NIM B61(1991)149-155. 342 343 // Reduced energy in MeV/AMU 344 G4double energy = kineticEnergy *amu_c2/(particleMass*MeV) ; 330 } ; 331 332 G4int iz = G4int(Z) - 2; 333 if( 0 > iz ) iz = 0; 334 else if(95 < iz ) iz = 95; 335 336 G4double ss = 1.0 + a[iz][0]*pow(energy,a[iz][1])+ 337 + a[iz][2]*pow(energy,a[iz][3]); 338 339 // protection for the validity range for low beta 340 G4double slim = 0.001; 341 if(ss < slim) s1 = 1.0/slim; 342 // for high value of beta 343 else if(s1*ss < 1.0) s1 = 1.0/ss; 344 } 345 345 346 346 G4int i = 0 ; … … 366 366 // ions 367 367 } else { 368 factor = charge * pow(charge/zeff, 0.3333) ; 368 369 factor = charge * pow(charge/Z, 0.33333333); 369 370 370 371 if( kStateGas == material->GetState() ) { … … 378 379 379 380 } else { 380 energy /= (charge * sqrt(charge* zeff)) ;381 energy /= (charge * sqrt(charge*Z)) ; 381 382 i = 4 ; 382 383 } 383 384 } 384 385 385 G4double x = b[i][2] * (1.0 - exp( - energy * b[i][3] )) ; 386 387 G4double q = factor * x * b[i][0] / 388 ((energy - b[i][1])*(energy - b[i][1]) + x*x) ; 389 390 return q ; 391 } 392 393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 394 395 G4double G4IonFluctuations::RelativisticFactor(const G4Material* material, 396 G4double& zeff) 397 { 386 G4double x = b[i][2]; 387 G4double y = energy * b[i][3]; 388 if(y <= 0.2) x *= (y*(1.0 - 0.5*y)); 389 else x *= (1.0 - exp(-y)); 390 391 y = energy - b[i][1]; 392 393 G4double s2 = factor * x * b[i][0] / (y*y + x*x); 394 /* 395 G4cout << "s1= " << s1 << " s2= " << s2 << " q^2= " << effChargeSquare 396 << " e= " << energy << G4endl; 397 */ 398 return s1*effChargeSquare/chargeSquare + s2; 399 } 400 401 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 402 403 G4double G4IonFluctuations::RelativisticFactor(const G4Material* mat, 404 G4double Z) 405 { 406 G4double eF = mat->GetIonisation()->GetFermiEnergy(); 407 G4double I = mat->GetIonisation()->GetMeanExcitationEnergy(); 408 398 409 // H.Geissel et al. NIM B, 195 (2002) 3. 399 G4double eF = material->GetIonisation()->GetFermiEnergy();400 410 G4double bF2= 2.0*eF/electron_mass_c2; 401 G4double I = material->GetIonisation()->GetMeanExcitationEnergy(); 402 G4double f = 0.4*(1.0 - beta2)/((1.0 - 0.5*beta2)*zeff); 411 G4double f = 0.4*(1.0 - beta2)/((1.0 - 0.5*beta2)*Z); 403 412 if(beta2 > bF2) f *= log(2.0*electron_mass_c2*beta2/I)*bF2/beta2; 404 413 else f *= log(4.0*eF/I); 405 414 415 // G4cout << "f= " << f << " beta2= " << beta2 416 // << " bf2= " << bF2 << " q^2= " << chargeSquare << G4endl; 417 406 418 return 1.0 + f; 407 419 } 408 420 409 421 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 422 423 void G4IonFluctuations::SetParticleAndCharge(const G4ParticleDefinition* part, 424 G4double q2) 425 { 426 if(part != particle) { 427 particle = part; 428 particleMass = part->GetPDGMass(); 429 charge = part->GetPDGCharge()/eplus; 430 chargeSquare = charge*charge; 431 } 432 effChargeSquare = q2; 433 uniFluct.SetParticleAndCharge(part, q2); 434 } 435 436 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4KleinNishinaCompton.cc
r819 r961 25 25 // 26 26 // $Id: G4KleinNishinaCompton.cc,v 1.9 2007/05/22 17:34:36 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/src/G4MollerBhabhaModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MollerBhabhaModel.cc,v 1.3 0 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MollerBhabhaModel.cc,v 1.31 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 74 74 const G4String& nam) 75 75 : G4VEmModel(nam), 76 particle(0), 77 isElectron(true), 78 twoln10(2.0*log(10.0)), 79 lowLimit(0.2*keV) 76 particle(0), 77 isElectron(true), 78 twoln10(2.0*log(10.0)), 79 lowLimit(0.2*keV), 80 isInitialised(false) 80 81 { 81 82 theElectron = G4Electron::Electron(); … … 87 88 G4MollerBhabhaModel::~G4MollerBhabhaModel() 88 89 {} 89 90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......91 92 void G4MollerBhabhaModel::SetParticle(const G4ParticleDefinition* p)93 {94 particle = p;95 if(p != theElectron) isElectron = false;96 }97 90 98 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 108 101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 109 102 103 G4double G4MollerBhabhaModel::MaxSecondaryEnergy(const G4ParticleDefinition*, 104 G4double kinEnergy) 105 { 106 G4double tmax = kinEnergy; 107 if(isElectron) tmax *= 0.5; 108 return tmax; 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 110 113 void G4MollerBhabhaModel::Initialise(const G4ParticleDefinition* p, 111 114 const G4DataVector&) 112 115 { 113 116 if(!particle) SetParticle(p); 114 if(pParticleChange) 117 SetDeexcitationFlag(false); 118 119 if(isInitialised) return; 120 121 isInitialised = true; 122 if(pParticleChange) { 115 123 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 116 124 (pParticleChange); 117 else125 } else { 118 126 fParticleChange = new G4ParticleChangeForLoss(); 127 } 119 128 } 120 129 -
trunk/source/processes/electromagnetic/standard/src/G4MscModel71.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MscModel71.cc,v 1. 5 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MscModel71.cc,v 1.6 2008/03/13 17:20:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 561 561 G4double tau = trueStepLength/lambda0 ; 562 562 563 if(trueStepLength >= currentRange*dtrl) 563 if(trueStepLength >= currentRange*dtrl) { 564 564 if(par1*trueStepLength < 1.) 565 565 tau = -par2*log(1.-par1*trueStepLength) ; 566 566 else 567 567 tau = taubig ; 568 568 } 569 569 currentTau = tau ; 570 570 -
trunk/source/processes/electromagnetic/standard/src/G4MultipleScattering.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MultipleScattering.cc,v 1.7 0 2007/10/29 08:57:19vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4MultipleScattering.cc,v 1.75 2008/10/15 17:53:44 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 121 121 // 12-02-07 skin can be changed via UI command, default skin=1 (VI) 122 122 // 24-04-07 default skin=0 (temporal protection) (VI) 123 // 11-03-08 use G4VMscModel interface (VI) 123 124 // 124 125 // ----------------------------------------------------------------------------- … … 130 131 #include "G4UrbanMscModel.hh" 131 132 #include "G4MscStepLimitType.hh" 133 #include "G4UrbanMscModel.hh" 132 134 133 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 138 140 : G4VMultipleScattering(processName) 139 141 { 140 dtrl = 0.05; 141 lambdalimit = 1.*mm; 142 143 samplez = false ; 144 isInitialized = false; 142 isInitialized = false; 145 143 } 146 144 … … 178 176 SetLateralDisplasmentFlag(false); 179 177 SetBuildLambdaTable(false); 180 SetSkin(0.0);181 SetRangeFactor(0.2);182 178 } 183 179 184 180 // initialisation of parameters - defaults for particles other 185 181 // than ions can be overwritten by users 186 mscUrban = new G4UrbanMscModel(RangeFactor(),dtrl,lambdalimit, 187 GeomFactor(),Skin(), 188 samplez,StepLimitType()); 182 mscUrban = new G4UrbanMscModel(); 183 mscUrban->SetStepLimitType(StepLimitType()); 189 184 mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag()); 185 mscUrban->SetSkin(Skin()); 186 mscUrban->SetRangeFactor(RangeFactor()); 187 mscUrban->SetGeomFactor(GeomFactor()); 190 188 191 189 AddEmModel(1,mscUrban); … … 204 202 void G4MultipleScattering::PrintInfo() 205 203 { 206 G4cout << " Boundary/stepping algorithm is active with RangeFactor= " 207 << RangeFactor() 208 << " Step limit type " << StepLimitType() 204 G4cout << " RangeFactor= " << RangeFactor() 205 << ", step limit type: " << StepLimitType() 206 << ", lateralDisplacement: " << LateralDisplasmentFlag() 207 << ", skin= " << Skin() 208 << ", geomFactor= " << GeomFactor() 209 209 << G4endl; 210 210 } -
trunk/source/processes/electromagnetic/standard/src/G4MultipleScattering71.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MultipleScattering71.cc,v 1. 4 2006/10/16 15:26:49vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4MultipleScattering71.cc,v 1.5 2008/07/16 11:27:41 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 76 76 77 77 #include "G4MultipleScattering71.hh" 78 #include "G4LossTableManager.hh" 78 79 #include "G4MscModel71.hh" 79 80 … … 176 177 } 177 178 179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 180 181 G4double G4MultipleScattering71::GetContinuousStepLimit( 182 const G4Track& track, 183 G4double, 184 G4double currentMinimalStep, 185 G4double&) 186 { 187 DefineMaterial(track.GetMaterialCutsCouple()); 188 const G4MaterialCutsCouple* couple = CurrentMaterialCutsCouple(); 189 G4double e = track.GetKineticEnergy(); 190 model = dynamic_cast<G4MscModel71*>(SelectModel(e)); 191 const G4ParticleDefinition* p = track.GetDefinition(); 192 G4double lambda0 = GetLambda(p, e); 193 range = G4LossTableManager::Instance()->GetRangeFromRestricteDEDX(p,e,couple); 194 if(range < currentMinimalStep) currentMinimalStep = range; 195 truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep); 196 // G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= " 197 // << lambda0 << " range= " << currentRange 198 // << " currentMinStep= " << currentMinimalStep << G4endl; 199 if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection; 200 geomPathLength = model->GeomPathLength(LambdaTable(),couple, 201 p,e,lambda0,range,truePathLength); 202 if(geomPathLength > lambda0) geomPathLength = lambda0; 203 return geomPathLength; 204 } 205 178 206 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 179 207 -
trunk/source/processes/electromagnetic/standard/src/G4PAIModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIModel.cc,v 1.46 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class 26 32 // File name: G4PAIModel.cc 27 33 // … … 177 183 fCutCouple = theCoupleTable->GetMaterialCutsCouple( fMaterial, 178 184 curReg->GetProductionCuts() ); 185 //G4cout << "Reg <" <<curReg->GetName() << "> mat <" 186 // << fMaterial->GetName() << "> fCouple= " 187 // << fCutCouple<<G4endl; 179 188 if( fCutCouple ) { 180 189 fMaterialCutsCoupleVector.push_back(fCutCouple); … … 197 206 } 198 207 } 208 209 ////////////////////////////////////////////////////////////////// 210 211 void G4PAIModel::InitialiseMe(const G4ParticleDefinition*) 212 {} 199 213 200 214 ////////////////////////////////////////////////////////////////// … … 393 407 { 394 408 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 395 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 409 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 410 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 396 411 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 397 412 } … … 435 450 { 436 451 // if ( x1 == x2 ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 437 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 452 // if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 453 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*0.5 ; 438 454 else dEdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 439 455 } … … 444 460 ////////////////////////////////////////////////////////////////////////////// 445 461 446 G4double G4PAIModel::ComputeDEDX (const G4MaterialCutsCouple* matCC,447 448 449 462 G4double G4PAIModel::ComputeDEDXPerVolume(const G4Material*, 463 const G4ParticleDefinition* p, 464 G4double kineticEnergy, 465 G4double cutEnergy) 450 466 { 451 467 G4int iTkin,iPlace; 452 468 size_t jMat; 469 470 //G4double cut = std::min(MaxSecondaryEnergy(p, kineticEnergy), cutEnergy); 471 G4double cut = cutEnergy; 472 453 473 G4double massRatio = fMass/p->GetPDGMass(); 454 474 G4double scaledTkin = kineticEnergy*massRatio; 455 475 G4double charge = p->GetPDGCharge(); 456 G4double charge2 = charge*charge, dEdx; 476 G4double charge2 = charge*charge; 477 const G4MaterialCutsCouple* matCC = CurrentCouple(); 457 478 458 479 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 470 491 iPlace = iTkin - 1; 471 492 if(iPlace < 0) iPlace = 0; 472 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cutEnergy) ) ; 473 493 G4double dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut) ); 474 494 if( dEdx < 0.) dEdx = 0.; 475 495 return dEdx; … … 478 498 ///////////////////////////////////////////////////////////////////////// 479 499 480 G4double G4PAIModel::CrossSection ( const G4MaterialCutsCouple* matCC,481 482 483 484 500 G4double G4PAIModel::CrossSectionPerVolume( const G4Material*, 501 const G4ParticleDefinition* p, 502 G4double kineticEnergy, 503 G4double cutEnergy, 504 G4double maxEnergy ) 485 505 { 486 506 G4int iTkin,iPlace; 487 507 size_t jMat; 488 G4double tmax = min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 508 G4double tmax = std::min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 509 if(tmax <= cutEnergy) return 0.0; 489 510 G4double massRatio = fMass/p->GetPDGMass(); 490 511 G4double scaledTkin = kineticEnergy*massRatio; 491 512 G4double charge = p->GetPDGCharge(); 492 513 G4double charge2 = charge*charge, cross, cross1, cross2; 514 const G4MaterialCutsCouple* matCC = CurrentCouple(); 493 515 494 516 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 935 957 } 936 958 959 ///////////////////////////////////////////////////////////////////// 960 961 G4double G4PAIModel::MaxSecondaryEnergy( const G4ParticleDefinition* p, 962 G4double kinEnergy) 963 { 964 G4double tmax = kinEnergy; 965 if(p == fElectron) tmax *= 0.5; 966 else if(p != fPositron) { 967 G4double mass = p->GetPDGMass(); 968 G4double ratio= electron_mass_c2/mass; 969 G4double gamma= kinEnergy/mass + 1.0; 970 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / 971 (1. + 2.0*gamma*ratio + ratio*ratio); 972 } 973 return tmax; 974 } 975 976 /////////////////////////////////////////////////////////////// 977 978 void G4PAIModel::DefineForRegion(const G4Region* r) 979 { 980 fPAIRegionVector.push_back(r); 981 } 937 982 938 983 // -
trunk/source/processes/electromagnetic/standard/src/G4PAIPhotonModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PAIPhotonModel.cc,v 1.21 2009/02/19 19:17:50 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class 26 32 // File name: G4PAIPhotonModel.cc 27 33 // … … 217 223 ////////////////////////////////////////////////////////////////// 218 224 225 void G4PAIPhotonModel::InitialiseMe(const G4ParticleDefinition*) 226 {} 227 228 ////////////////////////////////////////////////////////////////// 229 219 230 void G4PAIPhotonModel::ComputeSandiaPhotoAbsCof() 220 231 { … … 487 498 { 488 499 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 489 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 500 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 501 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 490 502 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 491 503 } … … 530 542 { 531 543 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 532 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 544 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 545 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 533 546 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 534 547 } … … 574 587 { 575 588 // if ( x1 == x2 ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 576 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 589 // if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*G4UniformRand() ; 590 if ( std::abs(x1-x2) <= eV ) dNdxCut = y1 + (y2 - y1)*0.5 ; 577 591 else dNdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 578 592 } … … 617 631 { 618 632 // if ( x1 == x2 ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 619 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 633 // if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*G4UniformRand() ; 634 if ( std::abs(x1-x2) <= eV ) dEdxCut = y1 + (y2 - y1)*0.5 ; 620 635 else dEdxCut = y1 + (transferCut - x1)*(y2 - y1)/(x2 - x1) ; 621 636 } … … 626 641 ////////////////////////////////////////////////////////////////////////////// 627 642 628 G4double G4PAIPhotonModel::ComputeDEDX (const G4MaterialCutsCouple* matCC,629 630 631 643 G4double G4PAIPhotonModel::ComputeDEDXPerVolume(const G4Material*, 644 const G4ParticleDefinition* p, 645 G4double kineticEnergy, 646 G4double cutEnergy) 632 647 { 633 648 G4int iTkin,iPlace; 634 649 size_t jMat; 650 651 //G4double cut = std::min(MaxSecondaryEnergy(p, kineticEnergy), cutEnergy); 652 G4double cut = cutEnergy; 653 635 654 G4double particleMass = p->GetPDGMass(); 636 655 G4double scaledTkin = kineticEnergy*proton_mass_c2/particleMass; … … 638 657 G4double charge2 = charge*charge; 639 658 G4double dEdx = 0.; 659 const G4MaterialCutsCouple* matCC = CurrentCouple(); 640 660 641 661 for( jMat = 0 ;jMat < fMaterialCutsCoupleVector.size() ; ++jMat ) … … 653 673 iPlace = iTkin - 1; 654 674 if(iPlace < 0) iPlace = 0; 655 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut Energy) ) ;675 dEdx = charge2*( (*fdEdxVector)(iPlace) - GetdEdxCut(iPlace,cut) ) ; 656 676 657 677 if( dEdx < 0.) dEdx = 0.; … … 661 681 ///////////////////////////////////////////////////////////////////////// 662 682 663 G4double G4PAIPhotonModel::CrossSection ( const G4MaterialCutsCouple* matCC,664 665 666 667 683 G4double G4PAIPhotonModel::CrossSectionPerVolume( const G4Material*, 684 const G4ParticleDefinition* p, 685 G4double kineticEnergy, 686 G4double cutEnergy, 687 G4double maxEnergy ) 668 688 { 669 689 G4int iTkin,iPlace; 670 690 size_t jMat, jMatCC; 671 G4double tmax = min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 691 G4double tmax = std::min(MaxSecondaryEnergy(p, kineticEnergy), maxEnergy); 692 if(cutEnergy >= tmax) return 0.0; 672 693 G4double particleMass = p->GetPDGMass(); 673 694 G4double scaledTkin = kineticEnergy*proton_mass_c2/particleMass; … … 675 696 G4double charge2 = charge*charge, cross, cross1, cross2; 676 697 G4double photon1, photon2, plasmon1, plasmon2; 698 699 const G4MaterialCutsCouple* matCC = CurrentCouple(); 677 700 678 701 const G4ProductionCutsTable* theCoupleTable= … … 1225 1248 } 1226 1249 1250 ///////////////////////////////////////////////////////////////////// 1251 1252 G4double G4PAIPhotonModel::MaxSecondaryEnergy( const G4ParticleDefinition* p, 1253 G4double kinEnergy) 1254 { 1255 G4double tmax = kinEnergy; 1256 if(p == fElectron) tmax *= 0.5; 1257 else if(p != fPositron) { 1258 G4double mass = p->GetPDGMass(); 1259 G4double ratio= electron_mass_c2/mass; 1260 G4double gamma= kinEnergy/mass + 1.0; 1261 tmax = 2.0*electron_mass_c2*(gamma*gamma - 1.) / 1262 (1. + 2.0*gamma*ratio + ratio*ratio); 1263 } 1264 return tmax; 1265 } 1266 1267 /////////////////////////////////////////////////////////////// 1268 1269 void G4PAIPhotonModel::DefineForRegion(const G4Region* r) 1270 { 1271 fPAIRegionVector.push_back(r); 1272 } 1273 1227 1274 1228 1275 // -
trunk/source/processes/electromagnetic/standard/src/G4PAIxSection.cc
r819 r961 25 25 // 26 26 // 27 // $Id: G4PAIxSection.cc,v 1.2 1 2006/06/29 19:53:20 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4PAIxSection.cc,v 1.24 2008/05/30 16:04:40 grichine Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 70 70 70.0 , 100.0 , 300.0 , 600.0 , 1000.0 , 3000.0 , 71 71 10000.0 , 50000.0 72 } 72 }; 73 73 74 74 const G4int G4PAIxSection:: 75 fRefGammaNumber = 29 75 fRefGammaNumber = 29; // The number of gamma for creation of 76 76 // spline (9) 77 77 … … 80 80 // Local class constants 81 81 82 const G4double G4PAIxSection::fDelta = 0.005 83 const G4double G4PAIxSection::fError = 0.005 84 85 const G4int G4PAIxSection::fMaxSplineSize = 500 82 const G4double G4PAIxSection::fDelta = 0.005; // energy shift from interval border 83 const G4double G4PAIxSection::fError = 0.005; // error in lin-log approximation 84 85 const G4int G4PAIxSection::fMaxSplineSize = 500; // Max size of output spline 86 86 // arrays 87 87 … … 95 95 fDensity = matCC->GetMaterial()->GetDensity(); 96 96 G4int matIndex = matCC->GetMaterial()->GetIndex(); 97 fMaterialIndex = matIndex; 97 98 fSandia = new G4SandiaTable(matIndex); 98 99 … … 108 109 (*(*fMatSandiaMatrix)[i])[0] = fSandia->GetSandiaMatTable(i,0); 109 110 110 for(j = 1; j < 5 111 for(j = 1; j < 5; j++) 111 112 { 112 113 (*(*fMatSandiaMatrix)[i])[j] = fSandia->GetSandiaMatTable(i,j)*fDensity; 113 114 } 114 115 } 115 116 117 118 116 } 117 118 //////////////////////////////////////////////////////////////// 119 119 120 120 G4PAIxSection::G4PAIxSection(G4int materialIndex, 121 121 G4double maxEnergyTransfer) 122 122 { 123 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable() ; 124 G4int i, j ; 125 126 fDensity = (*theMaterialTable)[materialIndex]->GetDensity() ; 123 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 124 G4int i, j; 125 126 fMaterialIndex = materialIndex; 127 fDensity = (*theMaterialTable)[materialIndex]->GetDensity(); 127 128 fElectronDensity = (*theMaterialTable)[materialIndex]-> 128 GetElectronDensity() 129 GetElectronDensity(); 129 130 fIntervalNumber = (*theMaterialTable)[materialIndex]-> 130 GetSandiaTable()->GetMatNbOfIntervals() 131 GetSandiaTable()->GetMatNbOfIntervals(); 131 132 fIntervalNumber--; 132 // G4cout<<fDensity<<"\t"<<fElectronDensity<<"\t"<<fIntervalNumber<<G4endl 133 134 fEnergyInterval = new G4double[fIntervalNumber+2] 135 fA1 = new G4double[fIntervalNumber+2] 136 fA2 = new G4double[fIntervalNumber+2] 137 fA3 = new G4double[fIntervalNumber+2] 138 fA4 = new G4double[fIntervalNumber+2] 139 140 for(i = 1 ; i <= fIntervalNumber; i++ )133 // G4cout<<fDensity<<"\t"<<fElectronDensity<<"\t"<<fIntervalNumber<<G4endl; 134 135 fEnergyInterval = new G4double[fIntervalNumber+2]; 136 fA1 = new G4double[fIntervalNumber+2]; 137 fA2 = new G4double[fIntervalNumber+2]; 138 fA3 = new G4double[fIntervalNumber+2]; 139 fA4 = new G4double[fIntervalNumber+2]; 140 141 for(i = 1; i <= fIntervalNumber; i++ ) 141 142 { 142 143 if(((*theMaterialTable)[materialIndex]-> … … 144 145 i > fIntervalNumber ) 145 146 { 146 fEnergyInterval[i] = maxEnergyTransfer 147 fIntervalNumber = i 147 fEnergyInterval[i] = maxEnergyTransfer; 148 fIntervalNumber = i; 148 149 break; 149 150 } … … 159 160 GetSandiaTable()->GetSandiaCofForMaterial(i-1,4); 160 161 // G4cout<<i<<"\t"<<fEnergyInterval[i]<<"\t"<<fA1[i]<<"\t"<<fA2[i]<<"\t" 161 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl 162 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl; 162 163 } 163 164 if(fEnergyInterval[fIntervalNumber] != maxEnergyTransfer) 164 165 { 165 166 fIntervalNumber++; 166 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer 167 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer; 167 168 } 168 169 … … 174 175 1.5*fDelta*(fEnergyInterval[i+1]+fEnergyInterval[i])) 175 176 { 176 continue 177 continue; 177 178 } 178 179 else … … 180 181 for(j=i;j<fIntervalNumber;j++) 181 182 { 182 fEnergyInterval[j] = fEnergyInterval[j+1] 183 fA1[j] = fA1[j+1] 184 fA2[j] = fA2[j+1] 185 fA3[j] = fA3[j+1] 186 fA4[j] = fA4[j+1] 183 fEnergyInterval[j] = fEnergyInterval[j+1]; 184 fA1[j] = fA1[j+1]; 185 fA2[j] = fA2[j+1]; 186 fA3[j] = fA3[j+1]; 187 fA4[j] = fA4[j+1]; 187 188 } 188 fIntervalNumber-- 189 i-- 189 fIntervalNumber--; 190 i--; 190 191 } 191 192 } … … 194 195 /* ********************************* 195 196 196 fSplineEnergy = new G4double[fMaxSplineSize] 197 fRePartDielectricConst = new G4double[fMaxSplineSize] 198 fImPartDielectricConst = new G4double[fMaxSplineSize] 199 fIntegralTerm = new G4double[fMaxSplineSize] 200 fDifPAIxSection = new G4double[fMaxSplineSize] 201 fIntegralPAIxSection = new G4double[fMaxSplineSize] 197 fSplineEnergy = new G4double[fMaxSplineSize]; 198 fRePartDielectricConst = new G4double[fMaxSplineSize]; 199 fImPartDielectricConst = new G4double[fMaxSplineSize]; 200 fIntegralTerm = new G4double[fMaxSplineSize]; 201 fDifPAIxSection = new G4double[fMaxSplineSize]; 202 fIntegralPAIxSection = new G4double[fMaxSplineSize]; 202 203 203 204 for(i=0;i<fMaxSplineSize;i++) 204 205 { 205 fSplineEnergy[i] = 0.0 206 fRePartDielectricConst[i] = 0.0 207 fImPartDielectricConst[i] = 0.0 208 fIntegralTerm[i] = 0.0 209 fDifPAIxSection[i] = 0.0 210 fIntegralPAIxSection[i] = 0.0 206 fSplineEnergy[i] = 0.0; 207 fRePartDielectricConst[i] = 0.0; 208 fImPartDielectricConst[i] = 0.0; 209 fIntegralTerm[i] = 0.0; 210 fDifPAIxSection[i] = 0.0; 211 fIntegralPAIxSection[i] = 0.0; 211 212 } 212 213 ************************************************** */ 213 214 214 InitPAI() 215 InitPAI(); // create arrays allocated above 215 216 216 delete[] fEnergyInterval 217 delete[] fA1 218 delete[] fA2 219 delete[] fA3 220 delete[] fA4 217 delete[] fEnergyInterval; 218 delete[] fA1; 219 delete[] fA2; 220 delete[] fA3; 221 delete[] fA4; 221 222 } 222 223 … … 232 233 { 233 234 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 234 G4int i, j ; 235 235 G4int i, j; 236 237 fMaterialIndex = materialIndex; 236 238 fDensity = (*theMaterialTable)[materialIndex]->GetDensity(); 237 239 fElectronDensity = (*theMaterialTable)[materialIndex]-> 238 GetElectronDensity() 239 240 fIntervalNumber = intNumber 240 GetElectronDensity(); 241 242 fIntervalNumber = intNumber; 241 243 fIntervalNumber--; 242 // G4cout<<fDensity<<"\t"<<fElectronDensity<<"\t"<<fIntervalNumber<<G4endl 244 // G4cout<<fDensity<<"\t"<<fElectronDensity<<"\t"<<fIntervalNumber<<G4endl; 243 245 244 fEnergyInterval = new G4double[fIntervalNumber+2] 245 fA1 = new G4double[fIntervalNumber+2] 246 fA2 = new G4double[fIntervalNumber+2] 247 fA3 = new G4double[fIntervalNumber+2] 248 fA4 = new G4double[fIntervalNumber+2] 249 250 for( i = 1 ; i <= fIntervalNumber; i++ )246 fEnergyInterval = new G4double[fIntervalNumber+2]; 247 fA1 = new G4double[fIntervalNumber+2]; 248 fA2 = new G4double[fIntervalNumber+2]; 249 fA3 = new G4double[fIntervalNumber+2]; 250 fA4 = new G4double[fIntervalNumber+2]; 251 252 for( i = 1; i <= fIntervalNumber; i++ ) 251 253 { 252 254 if( ( photoAbsCof[i-1][0] >= maxEnergyTransfer ) || 253 255 i > fIntervalNumber ) 254 256 { 255 fEnergyInterval[i] = maxEnergyTransfer 256 fIntervalNumber = i 257 fEnergyInterval[i] = maxEnergyTransfer; 258 fIntervalNumber = i; 257 259 break; 258 260 } 259 fEnergyInterval[i] = photoAbsCof[i-1][0] 260 fA1[i] = photoAbsCof[i-1][1] 261 fA2[i] = photoAbsCof[i-1][2] 262 fA3[i] = photoAbsCof[i-1][3] 263 fA4[i] = photoAbsCof[i-1][4] 261 fEnergyInterval[i] = photoAbsCof[i-1][0]; 262 fA1[i] = photoAbsCof[i-1][1]; 263 fA2[i] = photoAbsCof[i-1][2]; 264 fA3[i] = photoAbsCof[i-1][3]; 265 fA4[i] = photoAbsCof[i-1][4]; 264 266 // G4cout<<i<<"\t"<<fEnergyInterval[i]<<"\t"<<fA1[i]<<"\t"<<fA2[i]<<"\t" 265 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl 267 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl; 266 268 } 267 269 // G4cout<<"i last = "<<i<<"; "<<"fIntervalNumber = "<<fIntervalNumber<<G4endl; … … 269 271 { 270 272 fIntervalNumber++; 271 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer 273 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer; 272 274 } 273 275 for(i=1;i<=fIntervalNumber;i++) 274 276 { 275 277 // G4cout<<i<<"\t"<<fEnergyInterval[i]<<"\t"<<fA1[i]<<"\t"<<fA2[i]<<"\t" 276 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl 278 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl; 277 279 } 278 280 // Now checking, if two borders are too close together 279 281 280 for( i = 1 ; i < fIntervalNumber; i++ )282 for( i = 1; i < fIntervalNumber; i++ ) 281 283 { 282 284 if(fEnergyInterval[i+1]-fEnergyInterval[i] > 283 285 1.5*fDelta*(fEnergyInterval[i+1]+fEnergyInterval[i])) 284 286 { 285 continue 287 continue; 286 288 } 287 289 else … … 289 291 for(j=i;j<fIntervalNumber;j++) 290 292 { 291 fEnergyInterval[j] = fEnergyInterval[j+1] 292 fA1[j] = fA1[j+1] 293 fA2[j] = fA2[j+1] 294 fA3[j] = fA3[j+1] 295 fA4[j] = fA4[j+1] 293 fEnergyInterval[j] = fEnergyInterval[j+1]; 294 fA1[j] = fA1[j+1]; 295 fA2[j] = fA2[j+1]; 296 fA3[j] = fA3[j+1]; 297 fA4[j] = fA4[j+1]; 296 298 } 297 fIntervalNumber-- 298 i-- 299 fIntervalNumber--; 300 i--; 299 301 } 300 302 } … … 305 307 fLorentzFactor[fRefGammaNumber]*fLorentzFactor[fRefGammaNumber] - 1; 306 308 307 NormShift(betaGammaSqRef) 308 SplainPAI(betaGammaSqRef) 309 NormShift(betaGammaSqRef); 310 SplainPAI(betaGammaSqRef); 309 311 310 312 // Preparation of integral PAI cross section for input betaGammaSq 311 313 312 for(i = 1 ; i <= fSplineNumber; i++)314 for(i = 1; i <= fSplineNumber; i++) 313 315 { 314 316 fdNdxCerenkov[i] = PAIdNdxCerenkov(i,betaGammaSq); 317 fdNdxMM[i] = PAIdNdxMM(i,betaGammaSq); 315 318 fdNdxPlasmon[i] = PAIdNdxPlasmon(i,betaGammaSq); 319 fdNdxResonance[i] = PAIdNdxResonance(i,betaGammaSq); 316 320 fDifPAIxSection[i] = DifPAIxSection(i,betaGammaSq); 321 317 322 // G4cout<<i<<"; dNdxC = "<<fdNdxCerenkov[i]<<"; dNdxP = "<<fdNdxPlasmon[i] 318 323 // <<"; dNdxPAI = "<<fDifPAIxSection[i]<<G4endl; 319 324 } 320 IntegralCerenkov() ; 321 IntegralPlasmon() ; 322 IntegralPAIxSection() ; 325 IntegralCerenkov(); 326 IntegralMM(); 327 IntegralPlasmon(); 328 IntegralResonance(); 329 IntegralPAIxSection(); 323 330 324 delete[] fEnergyInterval 325 delete[] fA1 326 delete[] fA2 327 delete[] fA3 328 delete[] fA4 331 delete[] fEnergyInterval; 332 delete[] fA1; 333 delete[] fA2; 334 delete[] fA3; 335 delete[] fA4; 329 336 } 330 337 … … 339 346 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 340 347 341 G4int i, j, numberOfElements ; 342 348 G4int i, j, numberOfElements; 349 350 fMaterialIndex = materialIndex; 343 351 fDensity = (*theMaterialTable)[materialIndex]->GetDensity(); 344 fElectronDensity = (*theMaterialTable)[materialIndex]->GetElectronDensity() 345 numberOfElements = (*theMaterialTable)[materialIndex]->GetNumberOfElements() 346 347 G4int* thisMaterialZ = new G4int[numberOfElements] 348 349 for( i = 0 ; i < numberOfElements; i++ )352 fElectronDensity = (*theMaterialTable)[materialIndex]->GetElectronDensity(); 353 numberOfElements = (*theMaterialTable)[materialIndex]->GetNumberOfElements(); 354 355 G4int* thisMaterialZ = new G4int[numberOfElements]; 356 357 for( i = 0; i < numberOfElements; i++ ) 350 358 { 351 359 thisMaterialZ[i] = (G4int)(*theMaterialTable)[materialIndex]-> 352 GetElement(i)->GetZ() ; 353 } 354 G4SandiaTable thisMaterialSandiaTable(materialIndex) ; 360 GetElement(i)->GetZ(); 361 } 362 // fSandia = new G4SandiaTable(materialIndex); 363 fSandia = (*theMaterialTable)[materialIndex]-> 364 GetSandiaTable(); 365 G4SandiaTable thisMaterialSandiaTable(materialIndex); 355 366 fIntervalNumber = thisMaterialSandiaTable.SandiaIntervals 356 (thisMaterialZ,numberOfElements) 367 (thisMaterialZ,numberOfElements); 357 368 fIntervalNumber = thisMaterialSandiaTable.SandiaMixing 358 369 ( thisMaterialZ , 359 370 (*theMaterialTable)[materialIndex]->GetFractionVector() , 360 numberOfElements,fIntervalNumber) 371 numberOfElements,fIntervalNumber); 361 372 362 373 fIntervalNumber--; 363 374 364 fEnergyInterval = new G4double[fIntervalNumber+2] 365 fA1 = new G4double[fIntervalNumber+2] 366 fA2 = new G4double[fIntervalNumber+2] 367 fA3 = new G4double[fIntervalNumber+2] 368 fA4 = new G4double[fIntervalNumber+2] 369 370 for( i=1;i<=fIntervalNumber;i++)375 fEnergyInterval = new G4double[fIntervalNumber+2]; 376 fA1 = new G4double[fIntervalNumber+2]; 377 fA2 = new G4double[fIntervalNumber+2]; 378 fA3 = new G4double[fIntervalNumber+2]; 379 fA4 = new G4double[fIntervalNumber+2]; 380 381 for( i = 1; i <= fIntervalNumber; i++ ) 371 382 { 372 383 if((thisMaterialSandiaTable.GetPhotoAbsorpCof(i,0) >= maxEnergyTransfer) || 373 384 i > fIntervalNumber) 374 385 { 375 fEnergyInterval[i] = maxEnergyTransfer 376 fIntervalNumber = i 386 fEnergyInterval[i] = maxEnergyTransfer; 387 fIntervalNumber = i; 377 388 break; 378 389 } 379 fEnergyInterval[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,0) 380 fA1[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,1)*fDensity 381 fA2[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,2)*fDensity 382 fA3[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,3)*fDensity 383 fA4[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,4)*fDensity 390 fEnergyInterval[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,0); 391 fA1[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,1)*fDensity; 392 fA2[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,2)*fDensity; 393 fA3[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,3)*fDensity; 394 fA4[i] = thisMaterialSandiaTable.GetPhotoAbsorpCof(i,4)*fDensity; 384 395 385 396 } … … 387 398 { 388 399 fIntervalNumber++; 389 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer 390 fA1[fIntervalNumber] = fA1[fIntervalNumber-1] 391 fA2[fIntervalNumber] = fA2[fIntervalNumber-1] 392 fA3[fIntervalNumber] = fA3[fIntervalNumber-1] 393 fA4[fIntervalNumber] = fA4[fIntervalNumber-1] 400 fEnergyInterval[fIntervalNumber] = maxEnergyTransfer; 401 fA1[fIntervalNumber] = fA1[fIntervalNumber-1]; 402 fA2[fIntervalNumber] = fA2[fIntervalNumber-1]; 403 fA3[fIntervalNumber] = fA3[fIntervalNumber-1]; 404 fA4[fIntervalNumber] = fA4[fIntervalNumber-1]; 394 405 } 395 406 for(i=1;i<=fIntervalNumber;i++) 396 407 { 397 408 // G4cout<<fEnergyInterval[i]<<"\t"<<fA1[i]<<"\t"<<fA2[i]<<"\t" 398 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl 409 // <<fA3[i]<<"\t"<<fA4[i]<<"\t"<<G4endl; 399 410 } 400 411 // Now checking, if two borders are too close together 401 412 402 for( i=1;i<fIntervalNumber;i++)413 for( i = 1; i < fIntervalNumber; i++ ) 403 414 { 404 415 if(fEnergyInterval[i+1]-fEnergyInterval[i] > 405 416 1.5*fDelta*(fEnergyInterval[i+1]+fEnergyInterval[i])) 406 417 { 407 continue 418 continue; 408 419 } 409 420 else 410 421 { 411 for( j=i;j<fIntervalNumber;j++)422 for( j = i; j < fIntervalNumber; j++ ) 412 423 { 413 fEnergyInterval[j] = fEnergyInterval[j+1] 414 fA1[j] = fA1[j+1] 415 fA2[j] = fA2[j+1] 416 fA3[j] = fA3[j+1] 417 fA4[j] = fA4[j+1] 424 fEnergyInterval[j] = fEnergyInterval[j+1]; 425 fA1[j] = fA1[j+1]; 426 fA2[j] = fA2[j+1]; 427 fA3[j] = fA3[j+1]; 428 fA4[j] = fA4[j+1]; 418 429 } 419 fIntervalNumber-- 420 i-- 430 fIntervalNumber--; 431 i--; 421 432 } 422 433 } 423 434 424 435 /* ********************************* 425 fSplineEnergy = new G4double[fMaxSplineSize] 426 fRePartDielectricConst = new G4double[fMaxSplineSize] 427 fImPartDielectricConst = new G4double[fMaxSplineSize] 428 fIntegralTerm = new G4double[fMaxSplineSize] 429 fDifPAIxSection = new G4double[fMaxSplineSize] 430 fIntegralPAIxSection = new G4double[fMaxSplineSize] 436 fSplineEnergy = new G4double[fMaxSplineSize]; 437 fRePartDielectricConst = new G4double[fMaxSplineSize]; 438 fImPartDielectricConst = new G4double[fMaxSplineSize]; 439 fIntegralTerm = new G4double[fMaxSplineSize]; 440 fDifPAIxSection = new G4double[fMaxSplineSize]; 441 fIntegralPAIxSection = new G4double[fMaxSplineSize]; 431 442 432 443 for(i=0;i<fMaxSplineSize;i++) 433 444 { 434 fSplineEnergy[i] = 0.0 435 fRePartDielectricConst[i] = 0.0 436 fImPartDielectricConst[i] = 0.0 437 fIntegralTerm[i] = 0.0 438 fDifPAIxSection[i] = 0.0 439 fIntegralPAIxSection[i] = 0.0 445 fSplineEnergy[i] = 0.0; 446 fRePartDielectricConst[i] = 0.0; 447 fImPartDielectricConst[i] = 0.0; 448 fIntegralTerm[i] = 0.0; 449 fDifPAIxSection[i] = 0.0; 450 fIntegralPAIxSection[i] = 0.0; 440 451 } 441 452 */ //////////////////////// … … 446 457 fLorentzFactor[fRefGammaNumber]*fLorentzFactor[fRefGammaNumber] - 1; 447 458 448 NormShift(betaGammaSqRef) 449 SplainPAI(betaGammaSqRef) 459 NormShift(betaGammaSqRef); 460 SplainPAI(betaGammaSqRef); 450 461 451 462 // Preparation of integral PAI cross section for input betaGammaSq 452 463 453 for(i = 1 ; i <= fSplineNumber; i++)464 for(i = 1; i <= fSplineNumber; i++) 454 465 { 455 466 fDifPAIxSection[i] = DifPAIxSection(i,betaGammaSq); 456 467 fdNdxCerenkov[i] = PAIdNdxCerenkov(i,betaGammaSq); 468 fdNdxMM[i] = PAIdNdxMM(i,betaGammaSq); 457 469 fdNdxPlasmon[i] = PAIdNdxPlasmon(i,betaGammaSq); 458 } 459 IntegralPAIxSection() ; 460 IntegralCerenkov() ; 461 IntegralPlasmon() ; 470 fdNdxResonance[i] = PAIdNdxResonance(i,betaGammaSq); 471 } 472 IntegralPAIxSection(); 473 IntegralCerenkov(); 474 IntegralMM(); 475 IntegralPlasmon(); 476 IntegralResonance(); 462 477 463 // delete[] fEnergyInterval 464 delete[] fA1 465 delete[] fA2 466 delete[] fA3 467 delete[] fA4 478 // delete[] fEnergyInterval; 479 delete[] fA1; 480 delete[] fA2; 481 delete[] fA3; 482 delete[] fA4; 468 483 } 469 484 … … 476 491 { 477 492 /* ************************ 478 delete[] fSplineEnergy 479 delete[] fRePartDielectricConst 480 delete[] fImPartDielectricConst 481 delete[] fIntegralTerm 482 delete[] fDifPAIxSection 483 delete[] fIntegralPAIxSection 493 delete[] fSplineEnergy ; 494 delete[] fRePartDielectricConst; 495 delete[] fImPartDielectricConst; 496 delete[] fIntegralTerm ; 497 delete[] fDifPAIxSection ; 498 delete[] fIntegralPAIxSection ; 484 499 */ //////////////////////// 485 500 } … … 492 507 void G4PAIxSection::InitPAI() 493 508 { 494 G4int i 509 G4int i; 495 510 G4double betaGammaSq = fLorentzFactor[fRefGammaNumber]* 496 511 fLorentzFactor[fRefGammaNumber] - 1; … … 498 513 // Preparation of integral PAI cross section for reference gamma 499 514 500 NormShift(betaGammaSq) ; 501 SplainPAI(betaGammaSq) ; 502 503 IntegralPAIxSection() ; 504 IntegralCerenkov() ; 505 IntegralPlasmon() ; 506 507 for(i = 0 ; i<=fSplineNumber ; i++) 508 { 509 fPAItable[i][fRefGammaNumber] = fIntegralPAIxSection[i] ; 515 NormShift(betaGammaSq); 516 SplainPAI(betaGammaSq); 517 518 IntegralPAIxSection(); 519 IntegralCerenkov(); 520 IntegralMM(); 521 IntegralPlasmon(); 522 IntegralResonance(); 523 524 for(i = 0; i<= fSplineNumber; i++) 525 { 526 fPAItable[i][fRefGammaNumber] = fIntegralPAIxSection[i]; 510 527 if(i != 0) 511 528 { 512 fPAItable[i][0] = fSplineEnergy[i] 513 } 514 } 515 fPAItable[0][0] = fSplineNumber 516 517 for(G4int j = 1 ; j < 112; j++) // for other gammas518 { 519 if( j == fRefGammaNumber ) continue 529 fPAItable[i][0] = fSplineEnergy[i]; 530 } 531 } 532 fPAItable[0][0] = fSplineNumber; 533 534 for(G4int j = 1; j < 112; j++) // for other gammas 535 { 536 if( j == fRefGammaNumber ) continue; 520 537 521 betaGammaSq = fLorentzFactor[j]*fLorentzFactor[j] - 1 538 betaGammaSq = fLorentzFactor[j]*fLorentzFactor[j] - 1; 522 539 523 for(i = 1 ; i <= fSplineNumber; i++)540 for(i = 1; i <= fSplineNumber; i++) 524 541 { 525 542 fDifPAIxSection[i] = DifPAIxSection(i,betaGammaSq); 526 543 fdNdxCerenkov[i] = PAIdNdxCerenkov(i,betaGammaSq); 544 fdNdxMM[i] = PAIdNdxMM(i,betaGammaSq); 527 545 fdNdxPlasmon[i] = PAIdNdxPlasmon(i,betaGammaSq); 528 } 529 IntegralPAIxSection() ; 530 IntegralCerenkov() ; 531 IntegralPlasmon() ; 546 fdNdxResonance[i] = PAIdNdxResonance(i,betaGammaSq); 547 } 548 IntegralPAIxSection(); 549 IntegralCerenkov(); 550 IntegralMM(); 551 IntegralPlasmon(); 552 IntegralResonance(); 532 553 533 for(i = 0 ; i <= fSplineNumber; i++)534 { 535 fPAItable[i][j] = fIntegralPAIxSection[i] 554 for(i = 0; i <= fSplineNumber; i++) 555 { 556 fPAItable[i][j] = fIntegralPAIxSection[i]; 536 557 } 537 558 } … … 546 567 void G4PAIxSection::NormShift(G4double betaGammaSq) 547 568 { 548 G4int i, j 549 550 for( i = 1 ; i <= fIntervalNumber-1; i++ )551 { 552 for( j = 1 ; j <= 2; j++ )569 G4int i, j; 570 571 for( i = 1; i <= fIntervalNumber-1; i++ ) 572 { 573 for( j = 1; j <= 2; j++ ) 553 574 { 554 fSplineNumber = (i-1)*2 + j 575 fSplineNumber = (i-1)*2 + j; 555 576 556 577 if( j == 1 ) fSplineEnergy[fSplineNumber] = fEnergyInterval[i ]*(1+fDelta); … … 562 583 fIntegralTerm[1]=RutherfordIntegral(1,fEnergyInterval[1],fSplineEnergy[1]); 563 584 564 j = 1 565 566 for( i=2;i<=fSplineNumber;i++)585 j = 1; 586 587 for( i = 2; i <= fSplineNumber; i++ ) 567 588 { 568 589 if(fSplineEnergy[i]<fEnergyInterval[j+1]) … … 570 591 fIntegralTerm[i] = fIntegralTerm[i-1] + 571 592 RutherfordIntegral(j,fSplineEnergy[i-1], 572 fSplineEnergy[i] ) 593 fSplineEnergy[i] ); 573 594 } 574 595 else 575 596 { 576 597 G4double x = RutherfordIntegral(j,fSplineEnergy[i-1], 577 fEnergyInterval[j+1] ) 598 fEnergyInterval[j+1] ); 578 599 j++; 579 600 fIntegralTerm[i] = fIntegralTerm[i-1] + x + 580 601 RutherfordIntegral(j,fEnergyInterval[j], 581 fSplineEnergy[i] ) 602 fSplineEnergy[i] ); 582 603 } 583 604 // G4cout<<i<<"\t"<<fSplineEnergy[i]<<"\t"<<fIntegralTerm[i]<<"\n"<<G4endl; 584 605 } 585 fNormalizationCof = 2*pi*pi*hbarc*hbarc*fine_structure_const/electron_mass_c2 586 fNormalizationCof *= fElectronDensity/fIntegralTerm[fSplineNumber] 587 588 // G4cout<<"fNormalizationCof = "<<fNormalizationCof<<G4endl 606 fNormalizationCof = 2*pi*pi*hbarc*hbarc*fine_structure_const/electron_mass_c2; 607 fNormalizationCof *= fElectronDensity/fIntegralTerm[fSplineNumber]; 608 609 // G4cout<<"fNormalizationCof = "<<fNormalizationCof<<G4endl; 589 610 590 611 // Calculation of PAI differrential cross-section (1/(keV*cm)) 591 612 // in the energy points near borders of energy intervals 592 613 593 for(G4int k =1;k<=fIntervalNumber-1;k++)594 { 595 for( j=1;j<=2;j++)596 { 597 i = (k-1)*2 + j 614 for(G4int k = 1; k <= fIntervalNumber-1; k++ ) 615 { 616 for( j = 1; j <= 2; j++ ) 617 { 618 i = (k-1)*2 + j; 598 619 fImPartDielectricConst[i] = fNormalizationCof* 599 620 ImPartDielectricConst(k,fSplineEnergy[i]); … … 604 625 fDifPAIxSection[i] = DifPAIxSection(i,betaGammaSq); 605 626 fdNdxCerenkov[i] = PAIdNdxCerenkov(i,betaGammaSq); 627 fdNdxMM[i] = PAIdNdxMM(i,betaGammaSq); 606 628 fdNdxPlasmon[i] = PAIdNdxPlasmon(i,betaGammaSq); 629 fdNdxResonance[i] = PAIdNdxResonance(i,betaGammaSq); 607 630 } 608 631 } … … 616 639 // linear approximation would be smaller than 'fError' 617 640 618 void 619 G4PAIxSection::SplainPAI(G4double betaGammaSq) 641 void G4PAIxSection::SplainPAI(G4double betaGammaSq) 620 642 { 621 G4int k = 1 622 G4int i = 1 643 G4int k = 1; 644 G4int i = 1; 623 645 624 646 while ( (i < fSplineNumber) && (fSplineNumber < fMaxSplineSize-1) ) … … 626 648 if(fSplineEnergy[i+1] > fEnergyInterval[k+1]) 627 649 { 628 k++ 650 k++; // Here next energy point is in next energy interval 629 651 i++; 630 652 continue; … … 634 656 fSplineNumber++; 635 657 636 for(G4int j = fSplineNumber; j >= i+2 658 for(G4int j = fSplineNumber; j >= i+2; j-- ) 637 659 { 638 660 fSplineEnergy[j] = fSplineEnergy[j-1]; … … 643 665 fDifPAIxSection[j] = fDifPAIxSection[j-1]; 644 666 fdNdxCerenkov[j] = fdNdxCerenkov[j-1]; 667 fdNdxMM[j] = fdNdxMM[j-1]; 645 668 fdNdxPlasmon[j] = fdNdxPlasmon[j-1]; 669 fdNdxResonance[j] = fdNdxResonance[j-1]; 646 670 } 647 671 G4double x1 = fSplineEnergy[i]; … … 658 682 G4double a = log10(y2/yy1)/log10(x2/x1); 659 683 G4double b = log10(yy1) - a*log10(x1); 660 G4double y = a*log10(en1) + b 684 G4double y = a*log10(en1) + b; 661 685 y = pow(10.,y); 662 686 … … 673 697 fDifPAIxSection[i+1] = DifPAIxSection(i+1,betaGammaSq); 674 698 fdNdxCerenkov[i+1] = PAIdNdxCerenkov(i+1,betaGammaSq); 699 fdNdxMM[i+1] = PAIdNdxMM(i+1,betaGammaSq); 675 700 fdNdxPlasmon[i+1] = PAIdNdxPlasmon(i+1,betaGammaSq); 701 fdNdxResonance[i+1] = PAIdNdxResonance(i+1,betaGammaSq); 676 702 677 703 // Condition for next division of this segment or to pass … … 682 708 if( x < 0 ) 683 709 { 684 x = -x 710 x = -x; 685 711 } 686 712 if( x > fError && fSplineNumber < fMaxSplineSize-1 ) … … 704 730 G4double x2 ) 705 731 { 706 G4double c1, c2, c3 732 G4double c1, c2, c3; 707 733 // G4cout<<"RI: x1 = "<<x1<<"; "<<"x2 = "<<x2<<G4endl; 708 c1 = (x2 - x1)/x1/x2 709 c2 = (x2 - x1)*(x2 + x1)/x1/x1/x2/x2 710 c3 = (x2 - x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 734 c1 = (x2 - x1)/x1/x2; 735 c2 = (x2 - x1)*(x2 + x1)/x1/x1/x2/x2; 736 c3 = (x2 - x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2; 711 737 // G4cout<<" RI: c1 = "<<c1<<"; "<<"c2 = "<<c2<<"; "<<"c3 = "<<c3<<G4endl; 712 738 713 return fA1[k]*log(x2/x1) + fA2[k]*c1 + fA3[k]*c2/2 + fA4[k]*c3/3 739 return fA1[k]*log(x2/x1) + fA2[k]*c1 + fA3[k]*c2/2 + fA4[k]*c3/3; 714 740 715 741 } // end of RutherfordIntegral … … 730 756 energy4 = energy3*energy1; 731 757 732 result = fA1[k]/energy1+fA2[k]/energy2+fA3[k]/energy3+fA4[k]/energy4 733 result *=hbarc/energy1 734 735 return result 758 result = fA1[k]/energy1+fA2[k]/energy2+fA3[k]/energy3+fA4[k]/energy4; 759 result *=hbarc/energy1; 760 761 return result; 736 762 737 763 } // end of ImPartDielectricConst 738 764 765 ///////////////////////////////////////////////////////////////// 766 // 767 // Returns lambda of photon with energy1 in current material 768 769 G4double G4PAIxSection::GetPhotonRange( G4double energy1 ) 770 { 771 G4int i; 772 G4double energy2, energy3, energy4, result, lambda; 773 774 energy2 = energy1*energy1; 775 energy3 = energy2*energy1; 776 energy4 = energy3*energy1; 777 778 // G4double* SandiaCof = fSandia->GetSandiaCofForMaterialPAI(energy1); 779 // result = SandiaCof[0]/energy1+SandiaCof[1]/energy2+SandiaCof[2]/energy3+SandiaCof[3]/energy4; 780 // result *= fDensity; 781 782 for( i = 1; i <= fIntervalNumber; i++ ) 783 { 784 if( energy1 < fEnergyInterval[i]) break; 785 } 786 i--; 787 if(i == 0) i = 1; 788 789 result = fA1[i]/energy1+fA2[i]/energy2+fA3[i]/energy3+fA4[i]/energy4; 790 791 if( result > DBL_MIN ) lambda = 1./result; 792 else lambda = DBL_MAX; 793 794 return lambda; 795 } 796 797 ///////////////////////////////////////////////////////////////// 798 // 799 // Return lambda of electron with energy1 in current material 800 // parametrisation from NIM A554(2005)474-493 801 802 G4double G4PAIxSection::GetElectronRange( G4double energy ) 803 { 804 G4double range; 805 /* 806 const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable(); 807 808 G4double Z = (*theMaterialTable)[fMaterialIndex]->GetIonisation()->GetZeffective(); 809 G4double A = (*theMaterialTable)[fMaterialIndex]->GetA(); 810 811 energy /= keV; // energy in keV in parametrised formula 812 813 if (energy < 10.) 814 { 815 range = 3.872e-3*A/Z; 816 range *= pow(energy,1.492); 817 } 818 else 819 { 820 range = 6.97e-3*pow(energy,1.6); 821 } 822 */ 823 // Blum&Rolandi Particle Detection with Drift Chambers, p. 7 824 825 G4double cofA = 5.37e-4*g/cm2/keV; 826 G4double cofB = 0.9815; 827 G4double cofC = 3.123e-3/keV; 828 // energy /= keV; 829 830 range = cofA*energy*( 1 - cofB/(1 + cofC*energy) ); 831 832 // range *= g/cm2; 833 range /= fDensity; 834 835 return range; 836 } 739 837 740 838 ////////////////////////////////////////////////////////////////////////////// … … 747 845 { 748 846 G4double x0, x02, x03, x04, x05, x1, x2, xx1 ,xx2 , xx12, 749 c1, c2, c3, cof1, cof2, xln1, xln2, xln3, result 750 751 x0 = enb 752 result = 0 847 c1, c2, c3, cof1, cof2, xln1, xln2, xln3, result; 848 849 x0 = enb; 850 result = 0; 753 851 754 852 for(G4int i=1;i<=fIntervalNumber-1;i++) 755 853 { 756 x1 = fEnergyInterval[i] 757 x2 = fEnergyInterval[i+1] 758 xx1 = x1 - x0 759 xx2 = x2 - x0 760 xx12 = xx2/xx1 854 x1 = fEnergyInterval[i]; 855 x2 = fEnergyInterval[i+1]; 856 xx1 = x1 - x0; 857 xx2 = x2 - x0; 858 xx12 = xx2/xx1; 761 859 762 860 if(xx12<0) … … 764 862 xx12 = -xx12; 765 863 } 766 xln1 = log(x2/x1) 767 xln2 = log(xx12) 768 xln3 = log((x2 + x0)/(x1 + x0)) 769 x02 = x0*x0 770 x03 = x02*x0 771 x04 = x03*x0 864 xln1 = log(x2/x1); 865 xln2 = log(xx12); 866 xln3 = log((x2 + x0)/(x1 + x0)); 867 x02 = x0*x0; 868 x03 = x02*x0; 869 x04 = x03*x0; 772 870 x05 = x04*x0; 773 c1 = (x2 - x1)/x1/x2 774 c2 = (x2 - x1)*(x2 +x1)/x1/x1/x2/x2 775 c3 = (x2 -x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2 776 777 result -= (fA1[i]/x02 + fA3[i]/x04)*xln1 778 result -= (fA2[i]/x02 + fA4[i]/x04)*c1 779 result -= fA3[i]*c2/2/x02 780 result -= fA4[i]*c3/3/x02 781 782 cof1 = fA1[i]/x02 + fA3[i]/x04 783 cof2 = fA2[i]/x03 + fA4[i]/x05 784 785 result += 0.5*(cof1 +cof2)*xln2 786 result += 0.5*(cof1 - cof2)*xln3 871 c1 = (x2 - x1)/x1/x2; 872 c2 = (x2 - x1)*(x2 +x1)/x1/x1/x2/x2; 873 c3 = (x2 -x1)*(x1*x1 + x1*x2 + x2*x2)/x1/x1/x1/x2/x2/x2; 874 875 result -= (fA1[i]/x02 + fA3[i]/x04)*xln1; 876 result -= (fA2[i]/x02 + fA4[i]/x04)*c1; 877 result -= fA3[i]*c2/2/x02; 878 result -= fA4[i]*c3/3/x02; 879 880 cof1 = fA1[i]/x02 + fA3[i]/x04; 881 cof2 = fA2[i]/x03 + fA4[i]/x05; 882 883 result += 0.5*(cof1 +cof2)*xln2; 884 result += 0.5*(cof1 - cof2)*xln3; 787 885 } 788 result *= 2*hbarc/pi 789 790 return result 886 result *= 2*hbarc/pi; 887 888 return result; 791 889 792 890 } // end of RePartDielectricConst … … 801 899 G4double betaGammaSq ) 802 900 { 803 G4double be2,cof,x1,x2,x3,x4,x5,x6,x7,x8,result 804 //G4double beta, be4 805 G4double be4 806 G4double betaBohr2 = fine_structure_const*fine_structure_const 807 G4double betaBohr4 = betaBohr2*betaBohr2*4.0 808 be2 = betaGammaSq/(1 + betaGammaSq) 809 be4 = be2*be2 810 // beta = sqrt(be2) 811 cof = 1 812 x1 = log(2*electron_mass_c2/fSplineEnergy[i]) 813 814 if( betaGammaSq < 0.01 ) x2 = log(be2) 901 G4double be2,cof,x1,x2,x3,x4,x5,x6,x7,x8,result; 902 //G4double beta, be4; 903 G4double be4; 904 G4double betaBohr2 = fine_structure_const*fine_structure_const; 905 G4double betaBohr4 = betaBohr2*betaBohr2*4.0; 906 be2 = betaGammaSq/(1 + betaGammaSq); 907 be4 = be2*be2; 908 // beta = sqrt(be2); 909 cof = 1; 910 x1 = log(2*electron_mass_c2/fSplineEnergy[i]); 911 912 if( betaGammaSq < 0.01 ) x2 = log(be2); 815 913 else 816 914 { 817 915 x2 = -log( (1/betaGammaSq - fRePartDielectricConst[i])* 818 916 (1/betaGammaSq - fRePartDielectricConst[i]) + 819 fImPartDielectricConst[i]*fImPartDielectricConst[i] )/2 917 fImPartDielectricConst[i]*fImPartDielectricConst[i] )/2; 820 918 } 821 919 if( fImPartDielectricConst[i] == 0.0 ||betaGammaSq < 0.01 ) 822 920 { 823 x6=0 921 x6=0; 824 922 } 825 923 else 826 924 { 827 x3 = -fRePartDielectricConst[i] + 1/betaGammaSq 925 x3 = -fRePartDielectricConst[i] + 1/betaGammaSq; 828 926 x5 = -1 - fRePartDielectricConst[i] + 829 927 be2*((1 +fRePartDielectricConst[i])*(1 + fRePartDielectricConst[i]) + 830 fImPartDielectricConst[i]*fImPartDielectricConst[i]) 831 832 x7 = atan2(fImPartDielectricConst[i],x3) 833 x6 = x5 * x7 834 } 835 // if(fImPartDielectricConst[i] == 0) x6 = 0 836 837 x4 = ((x1 + x2)*fImPartDielectricConst[i] + x6)/hbarc 838 // if( x4 < 0.0 ) x4 = 0.0 928 fImPartDielectricConst[i]*fImPartDielectricConst[i]); 929 930 x7 = atan2(fImPartDielectricConst[i],x3); 931 x6 = x5 * x7; 932 } 933 // if(fImPartDielectricConst[i] == 0) x6 = 0; 934 935 x4 = ((x1 + x2)*fImPartDielectricConst[i] + x6)/hbarc; 936 // if( x4 < 0.0 ) x4 = 0.0; 839 937 x8 = (1 + fRePartDielectricConst[i])*(1 + fRePartDielectricConst[i]) + 840 fImPartDielectricConst[i]*fImPartDielectricConst[i] 841 842 result = (x4 + cof*fIntegralTerm[i]/fSplineEnergy[i]/fSplineEnergy[i]) 843 if(result < 1.0e-8) result = 1.0e-8 844 result *= fine_structure_const/be2/pi 845 // result *= (1-exp(-beta/betaBohr))*(1-exp(-beta/betaBohr)) 846 // result *= (1-exp(-be2/betaBohr2)) 847 result *= (1-exp(-be4/betaBohr4)) 938 fImPartDielectricConst[i]*fImPartDielectricConst[i]; 939 940 result = (x4 + cof*fIntegralTerm[i]/fSplineEnergy[i]/fSplineEnergy[i]); 941 if(result < 1.0e-8) result = 1.0e-8; 942 result *= fine_structure_const/be2/pi; 943 // result *= (1-exp(-beta/betaBohr))*(1-exp(-beta/betaBohr)); 944 // result *= (1-exp(-be2/betaBohr2)); 945 result *= (1-exp(-be4/betaBohr4)); 848 946 if(fDensity >= 0.1) 849 947 { 850 result /= x8 851 } 852 return result 948 result /= x8; 949 } 950 return result; 853 951 854 952 } // end of DifPAIxSection … … 861 959 G4double betaGammaSq ) 862 960 { 863 G4double cof, logarithm, x3, x5, argument, modul2, dNdxC ; 864 G4double be2, be4, betaBohr2,betaBohr4,cofBetaBohr ; 865 866 cof = 1.0 ; 867 cofBetaBohr = 4.0 ; 868 betaBohr2 = fine_structure_const*fine_structure_const ; 869 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr ; 870 871 be2 = betaGammaSq/(1 + betaGammaSq) ; 872 be4 = be2*be2 ; 873 874 if( betaGammaSq < 0.01 ) logarithm = log(1.0+betaGammaSq) ; // 0.0 ; 961 G4double logarithm, x3, x5, argument, modul2, dNdxC; 962 G4double be2, be4, betaBohr2,betaBohr4,cofBetaBohr; 963 964 cofBetaBohr = 4.0; 965 betaBohr2 = fine_structure_const*fine_structure_const; 966 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr; 967 968 be2 = betaGammaSq/(1 + betaGammaSq); 969 be4 = be2*be2; 970 971 if( betaGammaSq < 0.01 ) logarithm = log(1.0+betaGammaSq); // 0.0; 875 972 else 876 973 { 877 974 logarithm = -log( (1/betaGammaSq - fRePartDielectricConst[i])* 878 975 (1/betaGammaSq - fRePartDielectricConst[i]) + 879 fImPartDielectricConst[i]*fImPartDielectricConst[i] )*0.5 880 logarithm += log(1+1.0/betaGammaSq) 976 fImPartDielectricConst[i]*fImPartDielectricConst[i] )*0.5; 977 logarithm += log(1+1.0/betaGammaSq); 881 978 } 882 979 883 980 if( fImPartDielectricConst[i] == 0.0 || betaGammaSq < 0.01 ) 884 981 { 885 argument = 0.0 982 argument = 0.0; 886 983 } 887 984 else 888 985 { 889 x3 = -fRePartDielectricConst[i] + 1.0/betaGammaSq 986 x3 = -fRePartDielectricConst[i] + 1.0/betaGammaSq; 890 987 x5 = -1.0 - fRePartDielectricConst[i] + 891 988 be2*((1.0 +fRePartDielectricConst[i])*(1.0 + fRePartDielectricConst[i]) + 892 fImPartDielectricConst[i]*fImPartDielectricConst[i]) 989 fImPartDielectricConst[i]*fImPartDielectricConst[i]); 893 990 if( x3 == 0.0 ) argument = 0.5*pi; 894 else argument = atan2(fImPartDielectricConst[i],x3) 895 argument *= x5 991 else argument = atan2(fImPartDielectricConst[i],x3); 992 argument *= x5 ; 896 993 } 897 dNdxC = ( logarithm*fImPartDielectricConst[i] + argument )/hbarc 994 dNdxC = ( logarithm*fImPartDielectricConst[i] + argument )/hbarc; 898 995 899 if(dNdxC < 1.0e-8) dNdxC = 1.0e-8 900 901 dNdxC *= fine_structure_const/be2/pi 902 903 dNdxC *= (1-exp(-be4/betaBohr4)) 996 if(dNdxC < 1.0e-8) dNdxC = 1.0e-8; 997 998 dNdxC *= fine_structure_const/be2/pi; 999 1000 dNdxC *= (1-exp(-be4/betaBohr4)); 904 1001 905 1002 if(fDensity >= 0.1) 906 1003 { 907 1004 modul2 = (1.0 + fRePartDielectricConst[i])*(1.0 + fRePartDielectricConst[i]) + 908 fImPartDielectricConst[i]*fImPartDielectricConst[i] 909 dNdxC /= modul2 910 } 911 return dNdxC 1005 fImPartDielectricConst[i]*fImPartDielectricConst[i]; 1006 dNdxC /= modul2; 1007 } 1008 return dNdxC; 912 1009 913 1010 } // end of PAIdNdxCerenkov 1011 1012 ////////////////////////////////////////////////////////////////////////// 1013 // 1014 // Calculation od dN/dx of collisions of MM with creation of Cerenkov pseudo-photons 1015 1016 G4double G4PAIxSection::PAIdNdxMM( G4int i , 1017 G4double betaGammaSq ) 1018 { 1019 G4double logarithm, x3, x5, argument, dNdxC; 1020 G4double be2, be4, betaBohr2,betaBohr4,cofBetaBohr; 1021 1022 cofBetaBohr = 4.0; 1023 betaBohr2 = fine_structure_const*fine_structure_const; 1024 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr; 1025 1026 be2 = betaGammaSq/(1 + betaGammaSq); 1027 be4 = be2*be2; 1028 1029 if( betaGammaSq < 0.01 ) logarithm = log(1.0+betaGammaSq); // 0.0; 1030 else 1031 { 1032 logarithm = -log( (1/betaGammaSq - fRePartDielectricConst[i])* 1033 (1/betaGammaSq - fRePartDielectricConst[i]) + 1034 fImPartDielectricConst[i]*fImPartDielectricConst[i] )*0.5; 1035 logarithm += log(1+1.0/betaGammaSq); 1036 } 1037 1038 if( fImPartDielectricConst[i] == 0.0 || betaGammaSq < 0.01 ) 1039 { 1040 argument = 0.0; 1041 } 1042 else 1043 { 1044 x3 = -fRePartDielectricConst[i] + 1.0/betaGammaSq; 1045 x5 = be2*( 1.0 + fRePartDielectricConst[i] ) - 1.0; 1046 if( x3 == 0.0 ) argument = 0.5*pi; 1047 else argument = atan2(fImPartDielectricConst[i],x3); 1048 argument *= x5 ; 1049 } 1050 dNdxC = ( logarithm*fImPartDielectricConst[i]*be2 + argument )/hbarc; 1051 1052 if(dNdxC < 1.0e-8) dNdxC = 1.0e-8; 1053 1054 dNdxC *= fine_structure_const/be2/pi; 1055 1056 dNdxC *= (1-exp(-be4/betaBohr4)); 1057 return dNdxC; 1058 1059 } // end of PAIdNdxMM 914 1060 915 1061 ////////////////////////////////////////////////////////////////////////// … … 921 1067 G4double betaGammaSq ) 922 1068 { 923 G4double cof, resonance, modul2, dNdxP;924 G4double be2, be4, betaBohr2, betaBohr4, cofBetaBohr 925 926 cof = 1 ;927 cofBetaBohr = 4.0 928 betaBohr2 = fine_structure_const*fine_structure_const 929 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr 930 931 be2 = betaGammaSq/(1 + betaGammaSq) 932 be4 = be2*be2 1069 G4double resonance, modul2, dNdxP, cof = 1.; 1070 G4double be2, be4, betaBohr2, betaBohr4, cofBetaBohr; 1071 1072 1073 cofBetaBohr = 4.0; 1074 betaBohr2 = fine_structure_const*fine_structure_const; 1075 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr; 1076 1077 be2 = betaGammaSq/(1 + betaGammaSq); 1078 be4 = be2*be2; 933 1079 934 resonance = log(2*electron_mass_c2*be2/fSplineEnergy[i]) 935 resonance *= fImPartDielectricConst[i]/hbarc 936 937 938 dNdxP = ( resonance + cof*fIntegralTerm[i]/fSplineEnergy[i]/fSplineEnergy[i] ) 939 940 if( dNdxP < 1.0e-8 ) dNdxP = 1.0e-8 941 942 dNdxP *= fine_structure_const/be2/pi 943 dNdxP *= (1-exp(-be4/betaBohr4)) 1080 resonance = log(2*electron_mass_c2*be2/fSplineEnergy[i]); 1081 resonance *= fImPartDielectricConst[i]/hbarc; 1082 1083 1084 dNdxP = ( resonance + cof*fIntegralTerm[i]/fSplineEnergy[i]/fSplineEnergy[i] ); 1085 1086 if( dNdxP < 1.0e-8 ) dNdxP = 1.0e-8; 1087 1088 dNdxP *= fine_structure_const/be2/pi; 1089 dNdxP *= (1-exp(-be4/betaBohr4)); 944 1090 945 1091 if( fDensity >= 0.1 ) 946 1092 { 947 1093 modul2 = (1 + fRePartDielectricConst[i])*(1 + fRePartDielectricConst[i]) + 948 fImPartDielectricConst[i]*fImPartDielectricConst[i] 949 dNdxP /= modul2 950 } 951 return dNdxP 1094 fImPartDielectricConst[i]*fImPartDielectricConst[i]; 1095 dNdxP /= modul2; 1096 } 1097 return dNdxP; 952 1098 953 1099 } // end of PAIdNdxPlasmon 1100 1101 ////////////////////////////////////////////////////////////////////////// 1102 // 1103 // Calculation od dN/dx of collisions with creation of longitudinal EM 1104 // resonance excitations (plasmons, delta-electrons) 1105 1106 G4double G4PAIxSection::PAIdNdxResonance( G4int i , 1107 G4double betaGammaSq ) 1108 { 1109 G4double resonance, modul2, dNdxP; 1110 G4double be2, be4, betaBohr2, betaBohr4, cofBetaBohr; 1111 1112 cofBetaBohr = 4.0; 1113 betaBohr2 = fine_structure_const*fine_structure_const; 1114 betaBohr4 = betaBohr2*betaBohr2*cofBetaBohr; 1115 1116 be2 = betaGammaSq/(1 + betaGammaSq); 1117 be4 = be2*be2; 1118 1119 resonance = log(2*electron_mass_c2*be2/fSplineEnergy[i]); 1120 resonance *= fImPartDielectricConst[i]/hbarc; 1121 1122 1123 dNdxP = resonance; 1124 1125 if( dNdxP < 1.0e-8 ) dNdxP = 1.0e-8; 1126 1127 dNdxP *= fine_structure_const/be2/pi; 1128 dNdxP *= (1-exp(-be4/betaBohr4)); 1129 1130 if( fDensity >= 0.1 ) 1131 { 1132 modul2 = (1 + fRePartDielectricConst[i])*(1 + fRePartDielectricConst[i]) + 1133 fImPartDielectricConst[i]*fImPartDielectricConst[i]; 1134 dNdxP /= modul2; 1135 } 1136 return dNdxP; 1137 1138 } // end of PAIdNdxResonance 954 1139 955 1140 //////////////////////////////////////////////////////////////////////// … … 961 1146 void G4PAIxSection::IntegralPAIxSection() 962 1147 { 963 fIntegralPAIxSection[fSplineNumber] = 0 964 fIntegralPAIdEdx[fSplineNumber] = 0 965 fIntegralPAIxSection[0] = 0 966 G4int k = fIntervalNumber -1 967 968 for(G4int i = fSplineNumber-1 ; i >= 1; i--)1148 fIntegralPAIxSection[fSplineNumber] = 0; 1149 fIntegralPAIdEdx[fSplineNumber] = 0; 1150 fIntegralPAIxSection[0] = 0; 1151 G4int k = fIntervalNumber -1; 1152 1153 for(G4int i = fSplineNumber-1; i >= 1; i--) 969 1154 { 970 1155 if(fSplineEnergy[i] >= fEnergyInterval[k]) 971 1156 { 972 fIntegralPAIxSection[i] = fIntegralPAIxSection[i+1] + SumOverInterval(i) 973 fIntegralPAIdEdx[i] = fIntegralPAIdEdx[i+1] + SumOverIntervaldEdx(i) 1157 fIntegralPAIxSection[i] = fIntegralPAIxSection[i+1] + SumOverInterval(i); 1158 fIntegralPAIdEdx[i] = fIntegralPAIdEdx[i+1] + SumOverIntervaldEdx(i); 974 1159 } 975 1160 else 976 1161 { 977 1162 fIntegralPAIxSection[i] = fIntegralPAIxSection[i+1] + 978 SumOverBorder(i+1,fEnergyInterval[k]) 1163 SumOverBorder(i+1,fEnergyInterval[k]); 979 1164 fIntegralPAIdEdx[i] = fIntegralPAIdEdx[i+1] + 980 SumOverBorderdEdx(i+1,fEnergyInterval[k]) 981 k-- 1165 SumOverBorderdEdx(i+1,fEnergyInterval[k]); 1166 k--; 982 1167 } 983 1168 } … … 992 1177 void G4PAIxSection::IntegralCerenkov() 993 1178 { 994 G4int i, k 995 fIntegralCerenkov[fSplineNumber] = 0 996 fIntegralCerenkov[0] = 0 997 k = fIntervalNumber -1 998 999 for( i = fSplineNumber-1 ; i >= 1; i-- )1179 G4int i, k; 1180 fIntegralCerenkov[fSplineNumber] = 0; 1181 fIntegralCerenkov[0] = 0; 1182 k = fIntervalNumber -1; 1183 1184 for( i = fSplineNumber-1; i >= 1; i-- ) 1000 1185 { 1001 1186 if(fSplineEnergy[i] >= fEnergyInterval[k]) 1002 1187 { 1003 fIntegralCerenkov[i] = fIntegralCerenkov[i+1] + SumOverInterCerenkov(i) 1188 fIntegralCerenkov[i] = fIntegralCerenkov[i+1] + SumOverInterCerenkov(i); 1004 1189 // G4cout<<"int: i = "<<i<<"; sumC = "<<fIntegralCerenkov[i]<<G4endl; 1005 1190 } … … 1007 1192 { 1008 1193 fIntegralCerenkov[i] = fIntegralCerenkov[i+1] + 1009 SumOverBordCerenkov(i+1,fEnergyInterval[k]) 1010 k-- 1194 SumOverBordCerenkov(i+1,fEnergyInterval[k]); 1195 k--; 1011 1196 // G4cout<<"bord: i = "<<i<<"; sumC = "<<fIntegralCerenkov[i]<<G4endl; 1012 1197 } … … 1014 1199 1015 1200 } // end of IntegralCerenkov 1201 1202 //////////////////////////////////////////////////////////////////////// 1203 // 1204 // Calculation of the PAI MM-Cerenkov integral cross-section 1205 // fIntegralMM[1] = specific MM-Cerenkov ionisation, 1/cm 1206 // and fIntegralMM[0] = mean MM-Cerenkov loss per cm in keV/cm 1207 1208 void G4PAIxSection::IntegralMM() 1209 { 1210 G4int i, k; 1211 fIntegralMM[fSplineNumber] = 0; 1212 fIntegralMM[0] = 0; 1213 k = fIntervalNumber -1; 1214 1215 for( i = fSplineNumber-1; i >= 1; i-- ) 1216 { 1217 if(fSplineEnergy[i] >= fEnergyInterval[k]) 1218 { 1219 fIntegralMM[i] = fIntegralMM[i+1] + SumOverInterMM(i); 1220 // G4cout<<"int: i = "<<i<<"; sumC = "<<fIntegralMM[i]<<G4endl; 1221 } 1222 else 1223 { 1224 fIntegralMM[i] = fIntegralMM[i+1] + 1225 SumOverBordMM(i+1,fEnergyInterval[k]); 1226 k--; 1227 // G4cout<<"bord: i = "<<i<<"; sumC = "<<fIntegralMM[i]<<G4endl; 1228 } 1229 } 1230 1231 } // end of IntegralMM 1016 1232 1017 1233 //////////////////////////////////////////////////////////////////////// … … 1023 1239 void G4PAIxSection::IntegralPlasmon() 1024 1240 { 1025 fIntegralPlasmon[fSplineNumber] = 0 1026 fIntegralPlasmon[0] = 0 1027 G4int k = fIntervalNumber -1 1241 fIntegralPlasmon[fSplineNumber] = 0; 1242 fIntegralPlasmon[0] = 0; 1243 G4int k = fIntervalNumber -1; 1028 1244 for(G4int i=fSplineNumber-1;i>=1;i--) 1029 1245 { 1030 1246 if(fSplineEnergy[i] >= fEnergyInterval[k]) 1031 1247 { 1032 fIntegralPlasmon[i] = fIntegralPlasmon[i+1] + SumOverInterPlasmon(i) 1248 fIntegralPlasmon[i] = fIntegralPlasmon[i+1] + SumOverInterPlasmon(i); 1033 1249 } 1034 1250 else 1035 1251 { 1036 1252 fIntegralPlasmon[i] = fIntegralPlasmon[i+1] + 1037 SumOverBordPlasmon(i+1,fEnergyInterval[k]) 1038 k-- 1253 SumOverBordPlasmon(i+1,fEnergyInterval[k]); 1254 k--; 1039 1255 } 1040 1256 } 1041 1257 1042 1258 } // end of IntegralPlasmon 1259 1260 //////////////////////////////////////////////////////////////////////// 1261 // 1262 // Calculation of the PAI resonance integral cross-section 1263 // fIntegralResonance[1] = resonance primary ionisation, 1/cm 1264 // and fIntegralResonance[0] = mean resonance loss per cm in keV/cm 1265 1266 void G4PAIxSection::IntegralResonance() 1267 { 1268 fIntegralResonance[fSplineNumber] = 0; 1269 fIntegralResonance[0] = 0; 1270 G4int k = fIntervalNumber -1; 1271 for(G4int i=fSplineNumber-1;i>=1;i--) 1272 { 1273 if(fSplineEnergy[i] >= fEnergyInterval[k]) 1274 { 1275 fIntegralResonance[i] = fIntegralResonance[i+1] + SumOverInterResonance(i); 1276 } 1277 else 1278 { 1279 fIntegralResonance[i] = fIntegralResonance[i+1] + 1280 SumOverBordResonance(i+1,fEnergyInterval[k]); 1281 k--; 1282 } 1283 } 1284 1285 } // end of IntegralResonance 1043 1286 1044 1287 ////////////////////////////////////////////////////////////////////// … … 1050 1293 G4double G4PAIxSection::SumOverInterval( G4int i ) 1051 1294 { 1052 G4double x0,x1,y0,yy1,a,b,c,result 1053 1054 x0 = fSplineEnergy[i] 1055 x1 = fSplineEnergy[i+1] 1056 y0 = fDifPAIxSection[i] 1295 G4double x0,x1,y0,yy1,a,b,c,result; 1296 1297 x0 = fSplineEnergy[i]; 1298 x1 = fSplineEnergy[i+1]; 1299 y0 = fDifPAIxSection[i]; 1057 1300 yy1 = fDifPAIxSection[i+1]; 1058 1301 c = x1/x0; 1059 a = log10(yy1/y0)/log10(c) 1060 // b = log10(y0) - a*log10(x0) 1061 b = y0/pow(x0,a) 1062 a += 1 1302 a = log10(yy1/y0)/log10(c); 1303 // b = log10(y0) - a*log10(x0); 1304 b = y0/pow(x0,a); 1305 a += 1; 1063 1306 if(a == 0) 1064 1307 { 1065 result = b*log(x1/x0) 1308 result = b*log(x1/x0); 1066 1309 } 1067 1310 else 1068 1311 { 1069 result = y0*(x1*pow(c,a-1) - x0)/a 1312 result = y0*(x1*pow(c,a-1) - x0)/a; 1070 1313 } 1071 1314 a++; 1072 1315 if(a == 0) 1073 1316 { 1074 fIntegralPAIxSection[0] += b*log(x1/x0) 1317 fIntegralPAIxSection[0] += b*log(x1/x0); 1075 1318 } 1076 1319 else 1077 1320 { 1078 fIntegralPAIxSection[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a 1079 } 1080 return result 1321 fIntegralPAIxSection[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1322 } 1323 return result; 1081 1324 1082 1325 } // end of SumOverInterval … … 1086 1329 G4double G4PAIxSection::SumOverIntervaldEdx( G4int i ) 1087 1330 { 1088 G4double x0,x1,y0,yy1,a,b,c,result 1089 1090 x0 = fSplineEnergy[i] 1091 x1 = fSplineEnergy[i+1] 1092 y0 = fDifPAIxSection[i] 1331 G4double x0,x1,y0,yy1,a,b,c,result; 1332 1333 x0 = fSplineEnergy[i]; 1334 x1 = fSplineEnergy[i+1]; 1335 y0 = fDifPAIxSection[i]; 1093 1336 yy1 = fDifPAIxSection[i+1]; 1094 1337 c = x1/x0; 1095 a = log10(yy1/y0)/log10(c) 1096 // b = log10(y0) - a*log10(x0) 1097 b = y0/pow(x0,a) 1098 a += 2 1338 a = log10(yy1/y0)/log10(c); 1339 // b = log10(y0) - a*log10(x0); 1340 b = y0/pow(x0,a); 1341 a += 2; 1099 1342 if(a == 0) 1100 1343 { 1101 result = b*log(x1/x0) 1344 result = b*log(x1/x0); 1102 1345 } 1103 1346 else 1104 1347 { 1105 result = y0*(x1*x1*pow(c,a-2) - x0*x0)/a 1106 } 1107 return result 1348 result = y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1349 } 1350 return result; 1108 1351 1109 1352 } // end of SumOverInterval … … 1117 1360 G4double G4PAIxSection::SumOverInterCerenkov( G4int i ) 1118 1361 { 1119 G4double x0,x1,y0,yy1,a,b,c,result 1120 1121 x0 = fSplineEnergy[i] 1122 x1 = fSplineEnergy[i+1] 1123 y0 = fdNdxCerenkov[i] 1362 G4double x0,x1,y0,yy1,a,b,c,result; 1363 1364 x0 = fSplineEnergy[i]; 1365 x1 = fSplineEnergy[i+1]; 1366 y0 = fdNdxCerenkov[i]; 1124 1367 yy1 = fdNdxCerenkov[i+1]; 1125 1368 // G4cout<<"SumC, i = "<<i<<"; x0 ="<<x0<<"; x1 = "<<x1 … … 1127 1370 1128 1371 c = x1/x0; 1129 a = log10(yy1/y0)/log10(c) 1130 b = y0/pow(x0,a) 1131 1132 a += 1.0 1133 if(a == 0) result = b*log(c) 1134 else result = y0*(x1*pow(c,a-1) - x0)/a 1135 a += 1.0 1136 1137 if( a == 0 ) fIntegralCerenkov[0] += b*log(x1/x0) 1138 else fIntegralCerenkov[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a 1372 a = log10(yy1/y0)/log10(c); 1373 b = y0/pow(x0,a); 1374 1375 a += 1.0; 1376 if(a == 0) result = b*log(c); 1377 else result = y0*(x1*pow(c,a-1) - x0)/a; 1378 a += 1.0; 1379 1380 if( a == 0 ) fIntegralCerenkov[0] += b*log(x1/x0); 1381 else fIntegralCerenkov[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1139 1382 // G4cout<<"a = "<<a<<"; b = "<<b<<"; result = "<<result<<G4endl; 1140 return result 1383 return result; 1141 1384 1142 1385 } // end of SumOverInterCerenkov 1386 1387 ////////////////////////////////////////////////////////////////////// 1388 // 1389 // Calculation the PAI MM-Cerenkov integral cross-section inside 1390 // of interval of continuous values of photo-ionisation Cerenkov 1391 // cross-section. Parameter 'i' is the number of interval. 1392 1393 G4double G4PAIxSection::SumOverInterMM( G4int i ) 1394 { 1395 G4double x0,x1,y0,yy1,a,b,c,result; 1396 1397 x0 = fSplineEnergy[i]; 1398 x1 = fSplineEnergy[i+1]; 1399 y0 = fdNdxMM[i]; 1400 yy1 = fdNdxMM[i+1]; 1401 // G4cout<<"SumC, i = "<<i<<"; x0 ="<<x0<<"; x1 = "<<x1 1402 // <<"; y0 = "<<y0<<"; yy1 = "<<yy1<<G4endl; 1403 1404 c = x1/x0; 1405 a = log10(yy1/y0)/log10(c); 1406 b = y0/pow(x0,a); 1407 1408 a += 1.0; 1409 if(a == 0) result = b*log(c); 1410 else result = y0*(x1*pow(c,a-1) - x0)/a; 1411 a += 1.0; 1412 1413 if( a == 0 ) fIntegralMM[0] += b*log(x1/x0); 1414 else fIntegralMM[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1415 // G4cout<<"a = "<<a<<"; b = "<<b<<"; result = "<<result<<G4endl; 1416 return result; 1417 1418 } // end of SumOverInterMM 1143 1419 1144 1420 ////////////////////////////////////////////////////////////////////// … … 1150 1426 G4double G4PAIxSection::SumOverInterPlasmon( G4int i ) 1151 1427 { 1152 G4double x0,x1,y0,yy1,a,b,c,result 1153 1154 x0 = fSplineEnergy[i] 1155 x1 = fSplineEnergy[i+1] 1156 y0 = fdNdxPlasmon[i] 1428 G4double x0,x1,y0,yy1,a,b,c,result; 1429 1430 x0 = fSplineEnergy[i]; 1431 x1 = fSplineEnergy[i+1]; 1432 y0 = fdNdxPlasmon[i]; 1157 1433 yy1 = fdNdxPlasmon[i+1]; 1158 1434 c =x1/x0; 1159 a = log10(yy1/y0)/log10(c) 1160 // b = log10(y0) - a*log10(x0) 1161 b = y0/pow(x0,a) 1162 1163 a += 1.0 1164 if(a == 0) result = b*log(x1/x0) 1165 else result = y0*(x1*pow(c,a-1) - x0)/a 1166 a += 1.0 1167 1168 if( a == 0 ) fIntegralPlasmon[0] += b*log(x1/x0) 1169 else fIntegralPlasmon[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a 1170 1171 return result 1435 a = log10(yy1/y0)/log10(c); 1436 // b = log10(y0) - a*log10(x0); 1437 b = y0/pow(x0,a); 1438 1439 a += 1.0; 1440 if(a == 0) result = b*log(x1/x0); 1441 else result = y0*(x1*pow(c,a-1) - x0)/a; 1442 a += 1.0; 1443 1444 if( a == 0 ) fIntegralPlasmon[0] += b*log(x1/x0); 1445 else fIntegralPlasmon[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1446 1447 return result; 1172 1448 1173 1449 } // end of SumOverInterPlasmon 1450 1451 ////////////////////////////////////////////////////////////////////// 1452 // 1453 // Calculation the PAI resonance integral cross-section inside 1454 // of interval of continuous values of photo-ionisation resonance 1455 // cross-section. Parameter 'i' is the number of interval. 1456 1457 G4double G4PAIxSection::SumOverInterResonance( G4int i ) 1458 { 1459 G4double x0,x1,y0,yy1,a,b,c,result; 1460 1461 x0 = fSplineEnergy[i]; 1462 x1 = fSplineEnergy[i+1]; 1463 y0 = fdNdxResonance[i]; 1464 yy1 = fdNdxResonance[i+1]; 1465 c =x1/x0; 1466 a = log10(yy1/y0)/log10(c); 1467 // b = log10(y0) - a*log10(x0); 1468 b = y0/pow(x0,a); 1469 1470 a += 1.0; 1471 if(a == 0) result = b*log(x1/x0); 1472 else result = y0*(x1*pow(c,a-1) - x0)/a; 1473 a += 1.0; 1474 1475 if( a == 0 ) fIntegralResonance[0] += b*log(x1/x0); 1476 else fIntegralResonance[0] += y0*(x1*x1*pow(c,a-2) - x0*x0)/a; 1477 1478 return result; 1479 1480 } // end of SumOverInterResonance 1174 1481 1175 1482 /////////////////////////////////////////////////////////////////////////////// … … 1181 1488 G4double en0 ) 1182 1489 { 1183 G4double x0,x1,y0,yy1,a,b,c,d,e0,result 1184 1185 e0 = en0 1186 x0 = fSplineEnergy[i] 1187 x1 = fSplineEnergy[i+1] 1188 y0 = fDifPAIxSection[i] 1189 yy1 = fDifPAIxSection[i+1] 1490 G4double x0,x1,y0,yy1,a,b,c,d,e0,result; 1491 1492 e0 = en0; 1493 x0 = fSplineEnergy[i]; 1494 x1 = fSplineEnergy[i+1]; 1495 y0 = fDifPAIxSection[i]; 1496 yy1 = fDifPAIxSection[i+1]; 1190 1497 1191 1498 c = x1/x0; 1192 1499 d = e0/x0; 1193 a = log10(yy1/y0)/log10(x1/x0) 1194 // b0 = log10(y0) - a*log10(x0) 1195 b = y0/pow(x0,a); // pow(10.,b) 1196 1197 a += 1 1500 a = log10(yy1/y0)/log10(x1/x0); 1501 // b0 = log10(y0) - a*log10(x0); 1502 b = y0/pow(x0,a); // pow(10.,b); 1503 1504 a += 1; 1198 1505 if(a == 0) 1199 1506 { 1200 result = b*log(x0/e0) 1507 result = b*log(x0/e0); 1201 1508 } 1202 1509 else 1203 1510 { 1204 result = y0*(x0 - e0*pow(d,a-1))/a 1205 } 1206 a++ 1511 result = y0*(x0 - e0*pow(d,a-1))/a; 1512 } 1513 a++; 1207 1514 if(a == 0) 1208 1515 { 1209 fIntegralPAIxSection[0] += b*log(x0/e0) 1516 fIntegralPAIxSection[0] += b*log(x0/e0); 1210 1517 } 1211 1518 else 1212 1519 { 1213 fIntegralPAIxSection[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a 1214 } 1215 x0 = fSplineEnergy[i - 1] 1216 x1 = fSplineEnergy[i - 2] 1217 y0 = fDifPAIxSection[i - 1] 1218 yy1 = fDifPAIxSection[i - 2] 1520 fIntegralPAIxSection[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1521 } 1522 x0 = fSplineEnergy[i - 1]; 1523 x1 = fSplineEnergy[i - 2]; 1524 y0 = fDifPAIxSection[i - 1]; 1525 yy1 = fDifPAIxSection[i - 2]; 1219 1526 1220 1527 c = x1/x0; 1221 1528 d = e0/x0; 1222 a = log10(yy1/y0)/log10(x1/x0) 1223 // b0 = log10(y0) - a*log10(x0) 1224 b = y0/pow(x0,a) 1225 a += 1 1529 a = log10(yy1/y0)/log10(x1/x0); 1530 // b0 = log10(y0) - a*log10(x0); 1531 b = y0/pow(x0,a); 1532 a += 1; 1226 1533 if(a == 0) 1227 1534 { 1228 result += b*log(e0/x0) 1535 result += b*log(e0/x0); 1229 1536 } 1230 1537 else 1231 1538 { 1232 result += y0*(e0*pow(d,a-1) - x0)/a 1233 } 1234 a++ 1539 result += y0*(e0*pow(d,a-1) - x0)/a; 1540 } 1541 a++; 1235 1542 if(a == 0) 1236 1543 { 1237 fIntegralPAIxSection[0] += b*log(e0/x0) 1544 fIntegralPAIxSection[0] += b*log(e0/x0); 1238 1545 } 1239 1546 else 1240 1547 { 1241 fIntegralPAIxSection[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a 1242 } 1243 return result 1548 fIntegralPAIxSection[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1549 } 1550 return result; 1244 1551 1245 1552 } … … 1250 1557 G4double en0 ) 1251 1558 { 1252 G4double x0,x1,y0,yy1,a,b,c,d,e0,result 1253 1254 e0 = en0 1255 x0 = fSplineEnergy[i] 1256 x1 = fSplineEnergy[i+1] 1257 y0 = fDifPAIxSection[i] 1258 yy1 = fDifPAIxSection[i+1] 1559 G4double x0,x1,y0,yy1,a,b,c,d,e0,result; 1560 1561 e0 = en0; 1562 x0 = fSplineEnergy[i]; 1563 x1 = fSplineEnergy[i+1]; 1564 y0 = fDifPAIxSection[i]; 1565 yy1 = fDifPAIxSection[i+1]; 1259 1566 1260 1567 c = x1/x0; 1261 1568 d = e0/x0; 1262 a = log10(yy1/y0)/log10(x1/x0) 1263 // b0 = log10(y0) - a*log10(x0) 1264 b = y0/pow(x0,a); // pow(10.,b) 1265 1266 a += 2 1569 a = log10(yy1/y0)/log10(x1/x0); 1570 // b0 = log10(y0) - a*log10(x0); 1571 b = y0/pow(x0,a); // pow(10.,b); 1572 1573 a += 2; 1267 1574 if(a == 0) 1268 1575 { 1269 result = b*log(x0/e0) 1576 result = b*log(x0/e0); 1270 1577 } 1271 1578 else 1272 1579 { 1273 result = y0*(x0*x0 - e0*e0*pow(d,a-2))/a 1274 } 1275 x0 = fSplineEnergy[i - 1] 1276 x1 = fSplineEnergy[i - 2] 1277 y0 = fDifPAIxSection[i - 1] 1278 yy1 = fDifPAIxSection[i - 2] 1580 result = y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1581 } 1582 x0 = fSplineEnergy[i - 1]; 1583 x1 = fSplineEnergy[i - 2]; 1584 y0 = fDifPAIxSection[i - 1]; 1585 yy1 = fDifPAIxSection[i - 2]; 1279 1586 1280 1587 c = x1/x0; 1281 1588 d = e0/x0; 1282 a = log10(yy1/y0)/log10(x1/x0) 1283 // b0 = log10(y0) - a*log10(x0) 1284 b = y0/pow(x0,a) 1285 a += 2 1589 a = log10(yy1/y0)/log10(x1/x0); 1590 // b0 = log10(y0) - a*log10(x0); 1591 b = y0/pow(x0,a); 1592 a += 2; 1286 1593 if(a == 0) 1287 1594 { 1288 result += b*log(e0/x0) 1595 result += b*log(e0/x0); 1289 1596 } 1290 1597 else 1291 1598 { 1292 result += y0*(e0*e0*pow(d,a-2) - x0*x0)/a 1293 } 1294 return result 1599 result += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1600 } 1601 return result; 1295 1602 1296 1603 } … … 1304 1611 G4double en0 ) 1305 1612 { 1306 G4double x0,x1,y0,yy1,a,b,e0,c,d,result 1307 1308 e0 = en0 1309 x0 = fSplineEnergy[i] 1310 x1 = fSplineEnergy[i+1] 1311 y0 = fdNdxCerenkov[i] 1312 yy1 = fdNdxCerenkov[i+1] 1613 G4double x0,x1,y0,yy1,a,b,e0,c,d,result; 1614 1615 e0 = en0; 1616 x0 = fSplineEnergy[i]; 1617 x1 = fSplineEnergy[i+1]; 1618 y0 = fdNdxCerenkov[i]; 1619 yy1 = fdNdxCerenkov[i+1]; 1313 1620 1314 1621 // G4cout<<G4endl; 1315 1622 // G4cout<<"SumBordC, i = "<<i<<"; en0 = "<<en0<<"; x0 ="<<x0<<"; x1 = "<<x1 1316 1623 // <<"; y0 = "<<y0<<"; yy1 = "<<yy1<<G4endl; 1317 c = x1/x0 1318 d = e0/x0 1319 a = log10(yy1/y0)/log10(c) 1320 // b0 = log10(y0) - a*log10(x0) 1321 b = y0/pow(x0,a); // pow(10.,b0) 1322 1323 a += 1.0 1324 if( a == 0 ) result = b*log(x0/e0) 1325 else result = y0*(x0 - e0*pow(d,a-1))/a 1326 a += 1.0 1327 1328 if( a == 0 ) fIntegralCerenkov[0] += b*log(x0/e0) 1329 else fIntegralCerenkov[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a 1624 c = x1/x0; 1625 d = e0/x0; 1626 a = log10(yy1/y0)/log10(c); 1627 // b0 = log10(y0) - a*log10(x0); 1628 b = y0/pow(x0,a); // pow(10.,b0); 1629 1630 a += 1.0; 1631 if( a == 0 ) result = b*log(x0/e0); 1632 else result = y0*(x0 - e0*pow(d,a-1))/a; 1633 a += 1.0; 1634 1635 if( a == 0 ) fIntegralCerenkov[0] += b*log(x0/e0); 1636 else fIntegralCerenkov[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1330 1637 1331 1638 // G4cout<<"a = "<<a<<"; b0 = "<<b0<<"; b = "<<b<<"; result = "<<result<<G4endl; 1332 1639 1333 x0 = fSplineEnergy[i - 1] 1334 x1 = fSplineEnergy[i - 2] 1335 y0 = fdNdxCerenkov[i - 1] 1336 yy1 = fdNdxCerenkov[i - 2] 1640 x0 = fSplineEnergy[i - 1]; 1641 x1 = fSplineEnergy[i - 2]; 1642 y0 = fdNdxCerenkov[i - 1]; 1643 yy1 = fdNdxCerenkov[i - 2]; 1337 1644 1338 1645 // G4cout<<"x0 ="<<x0<<"; x1 = "<<x1 1339 1646 // <<"; y0 = "<<y0<<"; yy1 = "<<yy1<<G4endl; 1340 1647 1341 c = x1/x0 1342 d = e0/x0 1343 a = log10(yy1/y0)/log10(x1/x0) 1344 // b0 = log10(y0) - a*log10(x0) 1345 b = y0/pow(x0,a); // pow(10.,b0) 1346 1347 a += 1.0 1348 if( a == 0 ) result += b*log(e0/x0) 1349 else result += y0*(e0*pow(d,a-1) - x0 )/a 1350 a += 1.0 1351 1352 if( a == 0 ) fIntegralCerenkov[0] += b*log(e0/x0) 1353 else fIntegralCerenkov[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a 1648 c = x1/x0; 1649 d = e0/x0; 1650 a = log10(yy1/y0)/log10(x1/x0); 1651 // b0 = log10(y0) - a*log10(x0); 1652 b = y0/pow(x0,a); // pow(10.,b0); 1653 1654 a += 1.0; 1655 if( a == 0 ) result += b*log(e0/x0); 1656 else result += y0*(e0*pow(d,a-1) - x0 )/a; 1657 a += 1.0; 1658 1659 if( a == 0 ) fIntegralCerenkov[0] += b*log(e0/x0); 1660 else fIntegralCerenkov[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1354 1661 1355 1662 // G4cout<<"a = "<<a<<"; b0 = "<<b0<<"; b = " 1356 1663 // <<b<<"; result = "<<result<<G4endl; 1357 1664 1358 return result ; 1665 return result; 1666 1667 } 1668 1669 /////////////////////////////////////////////////////////////////////////////// 1670 // 1671 // Integration of MM-Cerenkov cross-section for the case of 1672 // passing across border between intervals 1673 1674 G4double G4PAIxSection::SumOverBordMM( G4int i , 1675 G4double en0 ) 1676 { 1677 G4double x0,x1,y0,yy1,a,b,e0,c,d,result; 1678 1679 e0 = en0; 1680 x0 = fSplineEnergy[i]; 1681 x1 = fSplineEnergy[i+1]; 1682 y0 = fdNdxMM[i]; 1683 yy1 = fdNdxMM[i+1]; 1684 1685 // G4cout<<G4endl; 1686 // G4cout<<"SumBordC, i = "<<i<<"; en0 = "<<en0<<"; x0 ="<<x0<<"; x1 = "<<x1 1687 // <<"; y0 = "<<y0<<"; yy1 = "<<yy1<<G4endl; 1688 c = x1/x0; 1689 d = e0/x0; 1690 a = log10(yy1/y0)/log10(c); 1691 // b0 = log10(y0) - a*log10(x0); 1692 b = y0/pow(x0,a); // pow(10.,b0); 1693 1694 a += 1.0; 1695 if( a == 0 ) result = b*log(x0/e0); 1696 else result = y0*(x0 - e0*pow(d,a-1))/a; 1697 a += 1.0; 1698 1699 if( a == 0 ) fIntegralMM[0] += b*log(x0/e0); 1700 else fIntegralMM[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1701 1702 // G4cout<<"a = "<<a<<"; b0 = "<<b0<<"; b = "<<b<<"; result = "<<result<<G4endl; 1703 1704 x0 = fSplineEnergy[i - 1]; 1705 x1 = fSplineEnergy[i - 2]; 1706 y0 = fdNdxMM[i - 1]; 1707 yy1 = fdNdxMM[i - 2]; 1708 1709 // G4cout<<"x0 ="<<x0<<"; x1 = "<<x1 1710 // <<"; y0 = "<<y0<<"; yy1 = "<<yy1<<G4endl; 1711 1712 c = x1/x0; 1713 d = e0/x0; 1714 a = log10(yy1/y0)/log10(x1/x0); 1715 // b0 = log10(y0) - a*log10(x0); 1716 b = y0/pow(x0,a); // pow(10.,b0); 1717 1718 a += 1.0; 1719 if( a == 0 ) result += b*log(e0/x0); 1720 else result += y0*(e0*pow(d,a-1) - x0 )/a; 1721 a += 1.0; 1722 1723 if( a == 0 ) fIntegralMM[0] += b*log(e0/x0); 1724 else fIntegralMM[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1725 1726 // G4cout<<"a = "<<a<<"; b0 = "<<b0<<"; b = " 1727 // <<b<<"; result = "<<result<<G4endl; 1728 1729 return result; 1359 1730 1360 1731 } … … 1368 1739 G4double en0 ) 1369 1740 { 1370 G4double x0,x1,y0,yy1,a,b,c,d,e0,result 1371 1372 e0 = en0 1373 x0 = fSplineEnergy[i] 1374 x1 = fSplineEnergy[i+1] 1375 y0 = fdNdxPlasmon[i] 1376 yy1 = fdNdxPlasmon[i+1] 1377 1378 c = x1/x0 1379 d = e0/x0 1380 a = log10(yy1/y0)/log10(c) 1381 // b0 = log10(y0) - a*log10(x0) 1382 b = y0/pow(x0,a); //pow(10.,b) 1383 1384 a += 1.0 1385 if( a == 0 ) result = b*log(x0/e0) 1386 else result = y0*(x0 - e0*pow(d,a-1))/a 1387 a += 1.0 1388 1389 if( a == 0 ) fIntegralPlasmon[0] += b*log(x0/e0) 1390 else fIntegralPlasmon[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a 1391 1392 x0 = fSplineEnergy[i - 1] 1393 x1 = fSplineEnergy[i - 2] 1394 y0 = fdNdxPlasmon[i - 1] 1395 yy1 = fdNdxPlasmon[i - 2] 1396 1397 c = x1/x0 1398 d = e0/x0 1399 a = log10(yy1/y0)/log10(c) 1400 // b0 = log10(y0) - a*log10(x0) 1401 b = y0/pow(x0,a);// pow(10.,b0) 1402 1403 a += 1.0 1404 if( a == 0 ) result += b*log(e0/x0) 1405 else result += y0*(e0*pow(d,a-1) - x0)/a 1406 a += 1.0 1407 1408 if( a == 0 ) fIntegralPlasmon[0] += b*log(e0/x0) 1409 else fIntegralPlasmon[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a 1410 1411 return result 1741 G4double x0,x1,y0,yy1,a,b,c,d,e0,result; 1742 1743 e0 = en0; 1744 x0 = fSplineEnergy[i]; 1745 x1 = fSplineEnergy[i+1]; 1746 y0 = fdNdxPlasmon[i]; 1747 yy1 = fdNdxPlasmon[i+1]; 1748 1749 c = x1/x0; 1750 d = e0/x0; 1751 a = log10(yy1/y0)/log10(c); 1752 // b0 = log10(y0) - a*log10(x0); 1753 b = y0/pow(x0,a); //pow(10.,b); 1754 1755 a += 1.0; 1756 if( a == 0 ) result = b*log(x0/e0); 1757 else result = y0*(x0 - e0*pow(d,a-1))/a; 1758 a += 1.0; 1759 1760 if( a == 0 ) fIntegralPlasmon[0] += b*log(x0/e0); 1761 else fIntegralPlasmon[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1762 1763 x0 = fSplineEnergy[i - 1]; 1764 x1 = fSplineEnergy[i - 2]; 1765 y0 = fdNdxPlasmon[i - 1]; 1766 yy1 = fdNdxPlasmon[i - 2]; 1767 1768 c = x1/x0; 1769 d = e0/x0; 1770 a = log10(yy1/y0)/log10(c); 1771 // b0 = log10(y0) - a*log10(x0); 1772 b = y0/pow(x0,a);// pow(10.,b0); 1773 1774 a += 1.0; 1775 if( a == 0 ) result += b*log(e0/x0); 1776 else result += y0*(e0*pow(d,a-1) - x0)/a; 1777 a += 1.0; 1778 1779 if( a == 0 ) fIntegralPlasmon[0] += b*log(e0/x0); 1780 else fIntegralPlasmon[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1781 1782 return result; 1412 1783 1413 1784 } 1414 1785 1786 /////////////////////////////////////////////////////////////////////////////// 1787 // 1788 // Integration of resonance cross-section for the case of 1789 // passing across border between intervals 1790 1791 G4double G4PAIxSection::SumOverBordResonance( G4int i , 1792 G4double en0 ) 1793 { 1794 G4double x0,x1,y0,yy1,a,b,c,d,e0,result; 1795 1796 e0 = en0; 1797 x0 = fSplineEnergy[i]; 1798 x1 = fSplineEnergy[i+1]; 1799 y0 = fdNdxResonance[i]; 1800 yy1 = fdNdxResonance[i+1]; 1801 1802 c = x1/x0; 1803 d = e0/x0; 1804 a = log10(yy1/y0)/log10(c); 1805 // b0 = log10(y0) - a*log10(x0); 1806 b = y0/pow(x0,a); //pow(10.,b); 1807 1808 a += 1.0; 1809 if( a == 0 ) result = b*log(x0/e0); 1810 else result = y0*(x0 - e0*pow(d,a-1))/a; 1811 a += 1.0; 1812 1813 if( a == 0 ) fIntegralResonance[0] += b*log(x0/e0); 1814 else fIntegralResonance[0] += y0*(x0*x0 - e0*e0*pow(d,a-2))/a; 1815 1816 x0 = fSplineEnergy[i - 1]; 1817 x1 = fSplineEnergy[i - 2]; 1818 y0 = fdNdxResonance[i - 1]; 1819 yy1 = fdNdxResonance[i - 2]; 1820 1821 c = x1/x0; 1822 d = e0/x0; 1823 a = log10(yy1/y0)/log10(c); 1824 // b0 = log10(y0) - a*log10(x0); 1825 b = y0/pow(x0,a);// pow(10.,b0); 1826 1827 a += 1.0; 1828 if( a == 0 ) result += b*log(e0/x0); 1829 else result += y0*(e0*pow(d,a-1) - x0)/a; 1830 a += 1.0; 1831 1832 if( a == 0 ) fIntegralResonance[0] += b*log(e0/x0); 1833 else fIntegralResonance[0] += y0*(e0*e0*pow(d,a-2) - x0*x0)/a; 1834 1835 return result; 1836 1837 } 1838 1415 1839 ///////////////////////////////////////////////////////////////////////// 1416 1840 // 1417 // 1841 // Returns random PAI-total energy loss over step 1418 1842 1419 1843 G4double G4PAIxSection::GetStepEnergyLoss( G4double step ) 1420 1844 { 1421 G4int iTransfer ; 1422 G4long numOfCollisions ; 1423 G4double loss = 0.0 ; 1424 G4double meanNumber, position ; 1425 1426 // G4cout<<" G4PAIxSection::GetStepEnergyLoss "<<G4endl ; 1427 1428 1429 1430 meanNumber = fIntegralPAIxSection[1]*step ; 1431 numOfCollisions = G4Poisson(meanNumber) ; 1432 1433 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl ; 1845 G4long numOfCollisions; 1846 G4double meanNumber, loss = 0.0; 1847 1848 // G4cout<<" G4PAIxSection::GetStepEnergyLoss "<<G4endl; 1849 1850 meanNumber = fIntegralPAIxSection[1]*step; 1851 numOfCollisions = G4Poisson(meanNumber); 1852 1853 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl; 1434 1854 1435 1855 while(numOfCollisions) 1436 1856 { 1437 position = fIntegralPAIxSection[1]*G4UniformRand() ; 1438 1439 for( iTransfer=1 ; iTransfer<=fSplineNumber ; iTransfer++ ) 1440 { 1441 if( position >= fIntegralPAIxSection[iTransfer] ) break ; 1442 } 1443 loss += fSplineEnergy[iTransfer] ; 1444 numOfCollisions-- ; 1857 loss += GetEnergyTransfer(); 1858 numOfCollisions--; 1445 1859 } 1446 // G4cout<<"PAI energy loss = "<<loss/keV<<" keV"<<G4endl 1447 1448 return loss 1860 // G4cout<<"PAI energy loss = "<<loss/keV<<" keV"<<G4endl; 1861 1862 return loss; 1449 1863 } 1450 1864 1451 1865 ///////////////////////////////////////////////////////////////////////// 1452 1866 // 1453 // 1867 // Returns random PAI-total energy transfer in one collision 1868 1869 G4double G4PAIxSection::GetEnergyTransfer() 1870 { 1871 G4int iTransfer ; 1872 1873 G4double energyTransfer, position; 1874 1875 position = fIntegralPAIxSection[1]*G4UniformRand(); 1876 1877 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 1878 { 1879 if( position >= fIntegralPAIxSection[iTransfer] ) break; 1880 } 1881 if(iTransfer > fSplineNumber) iTransfer--; 1882 1883 energyTransfer = fSplineEnergy[iTransfer]; 1884 1885 if(iTransfer > 1) 1886 { 1887 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 1888 } 1889 return energyTransfer; 1890 } 1891 1892 ///////////////////////////////////////////////////////////////////////// 1893 // 1894 // Returns random Cerenkov energy loss over step 1454 1895 1455 1896 G4double G4PAIxSection::GetStepCerenkovLoss( G4double step ) 1456 1897 { 1457 G4int iTransfer ; 1458 G4long numOfCollisions ; 1459 G4double loss = 0.0 ; 1460 G4double meanNumber, position ; 1461 1462 // G4cout<<" G4PAIxSection::GetStepCreLosnkovs "<<G4endl ; 1463 1464 1465 1466 meanNumber = fIntegralCerenkov[1]*step ; 1467 numOfCollisions = G4Poisson(meanNumber) ; 1468 1469 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl ; 1898 G4long numOfCollisions; 1899 G4double meanNumber, loss = 0.0; 1900 1901 // G4cout<<" G4PAIxSection::GetStepCerenkovLoss "<<G4endl; 1902 1903 meanNumber = fIntegralCerenkov[1]*step; 1904 numOfCollisions = G4Poisson(meanNumber); 1905 1906 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl; 1470 1907 1471 1908 while(numOfCollisions) 1472 1909 { 1473 position = fIntegralCerenkov[1]*G4UniformRand() ; 1474 1475 for( iTransfer=1 ; iTransfer<=fSplineNumber ; iTransfer++ ) 1476 { 1477 if( position >= fIntegralCerenkov[iTransfer] ) break ; 1478 } 1479 loss += fSplineEnergy[iTransfer] ; 1480 numOfCollisions-- ; 1910 loss += GetCerenkovEnergyTransfer(); 1911 numOfCollisions--; 1481 1912 } 1482 // G4cout<<"PAI Cerenkov loss = "<<loss/keV<<" keV"<<G4endl 1483 1484 return loss 1913 // G4cout<<"PAI Cerenkov loss = "<<loss/keV<<" keV"<<G4endl; 1914 1915 return loss; 1485 1916 } 1486 1917 1487 1918 ///////////////////////////////////////////////////////////////////////// 1488 1919 // 1489 // 1920 // Returns random MM-Cerenkov energy loss over step 1921 1922 G4double G4PAIxSection::GetStepMMLoss( G4double step ) 1923 { 1924 G4long numOfCollisions; 1925 G4double meanNumber, loss = 0.0; 1926 1927 // G4cout<<" G4PAIxSection::GetStepMMLoss "<<G4endl; 1928 1929 meanNumber = fIntegralMM[1]*step; 1930 numOfCollisions = G4Poisson(meanNumber); 1931 1932 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl; 1933 1934 while(numOfCollisions) 1935 { 1936 loss += GetMMEnergyTransfer(); 1937 numOfCollisions--; 1938 } 1939 // G4cout<<"PAI MM-Cerenkov loss = "<<loss/keV<<" keV"<<G4endl; 1940 1941 return loss; 1942 } 1943 1944 ///////////////////////////////////////////////////////////////////////// 1945 // 1946 // Returns Cerenkov energy transfer in one collision 1947 1948 G4double G4PAIxSection::GetCerenkovEnergyTransfer() 1949 { 1950 G4int iTransfer ; 1951 1952 G4double energyTransfer, position; 1953 1954 position = fIntegralCerenkov[1]*G4UniformRand(); 1955 1956 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 1957 { 1958 if( position >= fIntegralCerenkov[iTransfer] ) break; 1959 } 1960 if(iTransfer > fSplineNumber) iTransfer--; 1961 1962 energyTransfer = fSplineEnergy[iTransfer]; 1963 1964 if(iTransfer > 1) 1965 { 1966 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 1967 } 1968 return energyTransfer; 1969 } 1970 1971 ///////////////////////////////////////////////////////////////////////// 1972 // 1973 // Returns MM-Cerenkov energy transfer in one collision 1974 1975 G4double G4PAIxSection::GetMMEnergyTransfer() 1976 { 1977 G4int iTransfer ; 1978 1979 G4double energyTransfer, position; 1980 1981 position = fIntegralMM[1]*G4UniformRand(); 1982 1983 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 1984 { 1985 if( position >= fIntegralMM[iTransfer] ) break; 1986 } 1987 if(iTransfer > fSplineNumber) iTransfer--; 1988 1989 energyTransfer = fSplineEnergy[iTransfer]; 1990 1991 if(iTransfer > 1) 1992 { 1993 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 1994 } 1995 return energyTransfer; 1996 } 1997 1998 ///////////////////////////////////////////////////////////////////////// 1999 // 2000 // Returns random plasmon energy loss over step 1490 2001 1491 2002 G4double G4PAIxSection::GetStepPlasmonLoss( G4double step ) 1492 2003 { 1493 G4int iTransfer ; 1494 G4long numOfCollisions ; 1495 G4double loss = 0.0 ; 1496 G4double meanNumber, position ; 1497 1498 // G4cout<<" G4PAIxSection::GetStepCreLosnkovs "<<G4endl ; 1499 1500 1501 1502 meanNumber = fIntegralPlasmon[1]*step ; 1503 numOfCollisions = G4Poisson(meanNumber) ; 1504 1505 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl ; 2004 G4long numOfCollisions; 2005 G4double meanNumber, loss = 0.0; 2006 2007 // G4cout<<" G4PAIxSection::GetStepPlasmonLoss "<<G4endl; 2008 2009 meanNumber = fIntegralPlasmon[1]*step; 2010 numOfCollisions = G4Poisson(meanNumber); 2011 2012 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl; 1506 2013 1507 2014 while(numOfCollisions) 1508 2015 { 1509 position = fIntegralPlasmon[1]*G4UniformRand() ; 1510 1511 for( iTransfer=1 ; iTransfer<=fSplineNumber ; iTransfer++ ) 1512 { 1513 if( position >= fIntegralPlasmon[iTransfer] ) break ; 1514 } 1515 loss += fSplineEnergy[iTransfer] ; 1516 numOfCollisions-- ; 2016 loss += GetPlasmonEnergyTransfer(); 2017 numOfCollisions--; 1517 2018 } 1518 // G4cout<<"PAI Plasmon loss = "<<loss/keV<<" keV"<<G4endl 1519 1520 return loss 2019 // G4cout<<"PAI Plasmon loss = "<<loss/keV<<" keV"<<G4endl; 2020 2021 return loss; 1521 2022 } 1522 2023 2024 ///////////////////////////////////////////////////////////////////////// 2025 // 2026 // Returns plasmon energy transfer in one collision 2027 2028 G4double G4PAIxSection::GetPlasmonEnergyTransfer() 2029 { 2030 G4int iTransfer ; 2031 2032 G4double energyTransfer, position; 2033 2034 position = fIntegralPlasmon[1]*G4UniformRand(); 2035 2036 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 2037 { 2038 if( position >= fIntegralPlasmon[iTransfer] ) break; 2039 } 2040 if(iTransfer > fSplineNumber) iTransfer--; 2041 2042 energyTransfer = fSplineEnergy[iTransfer]; 2043 2044 if(iTransfer > 1) 2045 { 2046 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 2047 } 2048 return energyTransfer; 2049 } 2050 2051 ///////////////////////////////////////////////////////////////////////// 2052 // 2053 // Returns random resonance energy loss over step 2054 2055 G4double G4PAIxSection::GetStepResonanceLoss( G4double step ) 2056 { 2057 G4long numOfCollisions; 2058 G4double meanNumber, loss = 0.0; 2059 2060 // G4cout<<" G4PAIxSection::GetStepCreLosnkovs "<<G4endl; 2061 2062 meanNumber = fIntegralResonance[1]*step; 2063 numOfCollisions = G4Poisson(meanNumber); 2064 2065 // G4cout<<"numOfCollisions = "<<numOfCollisions<<G4endl; 2066 2067 while(numOfCollisions) 2068 { 2069 loss += GetResonanceEnergyTransfer(); 2070 numOfCollisions--; 2071 } 2072 // G4cout<<"PAI resonance loss = "<<loss/keV<<" keV"<<G4endl; 2073 2074 return loss; 2075 } 2076 2077 2078 ///////////////////////////////////////////////////////////////////////// 2079 // 2080 // Returns resonance energy transfer in one collision 2081 2082 G4double G4PAIxSection::GetResonanceEnergyTransfer() 2083 { 2084 G4int iTransfer ; 2085 2086 G4double energyTransfer, position; 2087 2088 position = fIntegralResonance[1]*G4UniformRand(); 2089 2090 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 2091 { 2092 if( position >= fIntegralResonance[iTransfer] ) break; 2093 } 2094 if(iTransfer > fSplineNumber) iTransfer--; 2095 2096 energyTransfer = fSplineEnergy[iTransfer]; 2097 2098 if(iTransfer > 1) 2099 { 2100 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 2101 } 2102 return energyTransfer; 2103 } 2104 2105 2106 ///////////////////////////////////////////////////////////////////////// 2107 // 2108 // Returns Rutherford energy transfer in one collision 2109 2110 G4double G4PAIxSection::GetRutherfordEnergyTransfer() 2111 { 2112 G4int iTransfer ; 2113 2114 G4double energyTransfer, position; 2115 2116 position = (fIntegralPlasmon[1]-fIntegralResonance[1])*G4UniformRand(); 2117 2118 for( iTransfer = 1; iTransfer <= fSplineNumber; iTransfer++ ) 2119 { 2120 if( position >= (fIntegralPlasmon[iTransfer]-fIntegralResonance[iTransfer]) ) break; 2121 } 2122 if(iTransfer > fSplineNumber) iTransfer--; 2123 2124 energyTransfer = fSplineEnergy[iTransfer]; 2125 2126 if(iTransfer > 1) 2127 { 2128 energyTransfer -= (fSplineEnergy[iTransfer]-fSplineEnergy[iTransfer-1])*G4UniformRand(); 2129 } 2130 return energyTransfer; 2131 } 1523 2132 1524 2133 … … 1528 2137 // 1529 2138 1530 G4int G4PAIxSection::fNumberOfGammas = 111 2139 G4int G4PAIxSection::fNumberOfGammas = 111; 1531 2140 1532 2141 const G4double G4PAIxSection::fLorentzFactor[112] = // fNumberOfGammas+1 … … 1556 2165 5.658206e+04, 6.422112e+04, 7.289153e+04, 8.273254e+04, 9.390219e+04, // 110 1557 2166 1.065799e+05 1558 } 2167 }; 1559 2168 1560 2169 /////////////////////////////////////////////////////////////////////// … … 1564 2173 1565 2174 const 1566 G4int G4PAIxSection::fRefGammaNumber = 29 2175 G4int G4PAIxSection::fRefGammaNumber = 29; 1567 2176 1568 2177 -
trunk/source/processes/electromagnetic/standard/src/G4PAIySection.cc
r819 r961 26 26 // 27 27 // $Id: G4PAIySection.cc,v 1.3 2007/10/01 18:38:10 vnivanch Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // -
trunk/source/processes/electromagnetic/standard/src/G4PEEffectModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PEEffectModel.cc,v 1. 6 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4PEEffectModel.cc,v 1.7 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 04.12.05 : SetProposedKineticEnergy(0.) for the killed photon (mma) 43 // 20.02.09 : Added initialisation of deexcitation flag and method 44 // CrossSectionPerVolume instead of mfp (V.Ivanchenko) 43 45 // 44 46 // Class Description: … … 66 68 theGamma = G4Gamma::Gamma(); 67 69 theElectron = G4Electron::Electron(); 70 fminimalEnergy = 1.0*eV; 68 71 } 69 72 … … 71 74 72 75 G4PEEffectModel::~G4PEEffectModel() 73 { 74 } 76 {} 75 77 76 78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 79 81 const G4DataVector&) 80 82 { 81 if (isInitialized) return; 82 if (pParticleChange) 83 fParticleChange = 84 reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 85 else 86 fParticleChange = new G4ParticleChangeForGamma(); 87 88 fminimalEnergy = 1.0*eV; 83 // always false before the run 84 SetDeexcitationFlag(false); 85 86 if (isInitialized) return; 87 if (pParticleChange) { 88 fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); 89 } else { 90 fParticleChange = new G4ParticleChangeForGamma(); 91 } 92 isInitialized = true; 93 } 94 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 96 97 G4double G4PEEffectModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 98 G4double energy, 99 G4double Z, G4double, 100 G4double, G4double) 101 { 102 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy); 103 104 G4double energy2 = energy*energy; 105 G4double energy3 = energy*energy2; 106 G4double energy4 = energy2*energy2; 107 108 return SandiaCof[0]/energy + SandiaCof[1]/energy2 + 109 SandiaCof[2]/energy3 + SandiaCof[3]/energy4; 110 } 111 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 114 G4double G4PEEffectModel::CrossSectionPerVolume(const G4Material* material, 115 const G4ParticleDefinition*, 116 G4double energy, 117 G4double, G4double) 118 { 119 G4double* SandiaCof = 120 material->GetSandiaTable()->GetSandiaCofForMaterial(energy); 121 122 G4double energy2 = energy*energy; 123 G4double energy3 = energy*energy2; 124 G4double energy4 = energy2*energy2; 125 126 return SandiaCof[0]/energy + SandiaCof[1]/energy2 + 127 SandiaCof[2]/energy3 + SandiaCof[3]/energy4; 89 128 } 90 129 -
trunk/source/processes/electromagnetic/standard/src/G4PSTARStopping.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PSTARStopping.cc,v 1. 5 2006/06/29 19:53:24 gunterExp $27 // GEANT4 tag $Name: $26 // $Id: G4PSTARStopping.cc,v 1.8 2008/11/24 18:28:09 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 53 53 G4PSTARStopping::G4PSTARStopping() 54 54 { 55 currentE = 0.0; 55 56 currentMaterial = 0; 56 57 index = 0; … … 72 73 for (G4int i=0; i<74; i++){ 73 74 if (matName == name[i]){ 74 matIndex = -1;75 matIndex = i; 75 76 currentMaterial = mat; 76 77 return i; … … 115 116 res = e1*std::exp(std::log(energy/t1)*std::log(e2/e1)/std::log(t2/t1)); 116 117 return res; 117 118 } 118 119 119 120 void G4PSTARStopping::Initialise() … … 122 123 123 124 name [0] = "G4_A-150_TISSUE"; 124 Znum [0] = 0;125 126 125 G4double T0[60] = { 127 126 0.001, 0.0015, 0.002, 0.0025, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, … … 131 130 0.275, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 132 131 0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.25, 1.5, 1.75, 2. }; 133 134 132 G4double e0[60] = { 176.8, 216.6, 250.1, 279.6, 306.3, 351.1, 390.9, 426.8, 459.8, 489.9, 517.8, 544, 596.4, 641.3, 680.6, 715.7, 747, 775, 800, 822.6, 861.7, 894.2, 920.7, 941.5, 957.3, 968.6, 976.2, 980.5, 982, 981, 978, 973.2, 967, 959.5, 910.4, 853.6, 797.9, 746.9, 701.5, 661.5, 626.4, 595.6, 544.8, 504.4, 471.1, 442.8, 416.4, 392, 369.9, 350, 332.2, 316.4, 302.2, 289.5, 278.1, 267.9, 228.9, 200.8, 179.5, 162.6 }; 135 133 … … 138 136 139 137 name [1] = "G4_ACETYLENE"; 140 Znum [1] = 0;141 142 138 G4double e1[60] = { 185.5, 227.2, 262.3, 293.2, 321.2, 364.8, 404, 439.3, 471.6, 500.3, 526.4, 550.6, 600.2, 641.6, 677.4, 709.2, 737.3, 762, 783.7, 803.1, 837.2, 866.8, 891.7, 911.6, 926.6, 937.4, 944.7, 949, 950.8, 950.3, 947.9, 943.9, 938.4, 931.8, 887.1, 833.7, 779.9, 729.5, 686.8, 650.4, 618.5, 590.2, 541.4, 500.4, 465.3, 434.8, 408, 384.6, 364.4, 346.5, 330.5, 316.1, 303.2, 291.3, 280.4, 270.4, 230.7, 202.2, 180.5, 163.5 }; 143 139 … … 145 141 146 142 name [2] = "G4_ADIPOSE_TISSUE_ICRP"; 147 Znum [2] = 0;148 149 143 G4double e2[60] = { 195.9, 239.9, 277, 309.7, 339.3, 387.5, 430.6, 469.4, 505, 537.2, 566.9, 594.6, 649.9, 696.7, 737.4, 773.3, 805.2, 833.4, 858.3, 880.5, 918.9, 951, 977.2, 997.6, 1013, 1023, 1030, 1034, 1034, 1033, 1029, 1023, 1016, 1008, 955.6, 895, 835.1, 779.6, 729.7, 685.6, 646.6, 612.3, 555, 509.1, 471.6, 440.3, 413.7, 390.4, 370.1, 352.1, 336, 321.4, 308.3, 296.3, 285.3, 275.2, 234.9, 206, 184, 166.7 }; 150 144 … … 152 146 153 147 name [3] = "G4_Ag"; 154 Znum [3] = 47;155 156 148 G4double e3[60] = { 29.73, 36.41, 42.05, 47.01, 51.5, 59.46, 66.48, 72.83, 78.66, 84.09, 89.2, 94.02, 103.7, 112.1, 119.7, 126.6, 132.8, 138.5, 143.7, 148.5, 157.1, 164.3, 170.5, 175.7, 180.1, 183.7, 186.7, 189.1, 191.1, 192.5, 193.6, 194.4, 194.8, 195, 193.4, 189.3, 184.4, 179.2, 174.1, 169.3, 164.8, 160.5, 152.7, 145.7, 139.5, 133.8, 128.6, 123.9, 119.5, 115.4, 111.7, 108.1, 104.8, 101.7, 98.74, 95.98, 84.49, 75.92, 69.3, 64.05 }; 157 149 … … 159 151 160 152 name [4] = "G4_AIR"; 161 Znum [4] = 0;162 163 153 G4double e4[60] = { 119.7, 146.7, 169.3, 189.3, 207.4, 239.5, 267.8, 293.3, 316.8, 338.7, 359.2, 378.7, 417, 450.4, 480.1, 506.7, 530.7, 552.6, 572.4, 590.5, 622.1, 648.3, 670, 687.7, 702, 713.2, 721.7, 727.8, 731.9, 734.1, 734.8, 734, 732, 729, 702.9, 667.2, 629.1, 592.2, 558.3, 527.8, 500.6, 476.3, 434.9, 401.2, 373.3, 349.8, 329.7, 312.1, 296.4, 282.4, 269.9, 258.7, 248.5, 239.1, 230.6, 222.7, 191.1, 168.2, 150.8, 137 }; 164 154 … … 166 156 167 157 name [5] = "G4_Al"; 168 Znum [5] = 13;169 170 158 G4double e5[60] = { 92.38, 113.1, 130.6, 146.1, 160, 184.8, 206.6, 226.3, 244.4, 261.3, 277.1, 292.1, 320.6, 344.8, 365.7, 383.8, 399.6, 413.2, 425, 435.1, 451, 462, 469.2, 473.4, 475.2, 475.1, 473.7, 471.2, 468, 464.2, 460.1, 455.8, 451.3, 446.8, 424.5, 404.5, 386.7, 371, 356.8, 344, 332.3, 321.5, 301.7, 284.2, 268.6, 254.8, 242.5, 231.4, 221.5, 212.4, 204.2, 196.6, 189.7, 183.3, 177.4, 171.9, 149.4, 132.7, 119.8, 109.4 }; 171 159 … … 173 161 174 162 name [6] = "G4_ALUMINUM_OXIDE"; 175 Znum [6] = 0;176 177 163 G4double e6[60] = { 73.51, 90.03, 104, 116.2, 127.3, 147, 164.4, 180.1, 194.5, 207.9, 220.5, 232.5, 256.1, 276.8, 295.3, 311.9, 327, 340.8, 353.4, 364.9, 385.3, 402.5, 417, 429.2, 439.3, 447.6, 454.3, 459.6, 463.7, 466.6, 468.6, 469.8, 470.2, 470, 461.9, 447.2, 430.1, 412.7, 396.5, 381.4, 367.5, 354.5, 331.1, 310.6, 292.6, 276.5, 262.2, 249.4, 238.1, 227.9, 218.7, 210.2, 202.6, 195.7, 189.2, 183.2, 158.9, 140.9, 127, 116 }; 178 164 … … 180 166 181 167 name [7] = "G4_Ar"; 182 Znum [7] = 40;183 184 168 G4double e7[60] = { 86.08, 105.4, 121.7, 136.1, 149.1, 172.2, 192.5, 210.9, 227.7, 243.5, 258.2, 272.2, 299.7, 323.5, 344.5, 363.3, 380.2, 395.3, 409, 421.4, 442.5, 459.4, 472.8, 483.1, 490.7, 496, 499.2, 500.7, 500.8, 499.5, 497.2, 494, 490, 485.5, 457.4, 426.7, 397.7, 371.9, 349.5, 330.1, 313.2, 298.5, 274.2, 254.9, 239, 225.6, 214.4, 204.7, 196.1, 188.4, 181.3, 174.9, 168.9, 163.4, 158.2, 153.3, 133, 118.2, 106.8, 97.72 }; 185 169 … … 187 171 188 172 name [8] = "G4_Au"; 189 Znum [8] = 79;190 191 173 G4double e8[60] = { 14.76, 18.07, 20.87, 23.33, 25.56, 29.51, 33, 36.15, 39.04, 41.74, 44.27, 46.66, 51.51, 55.8, 59.66, 63.18, 66.43, 69.43, 72.23, 74.84, 79.58, 83.77, 87.5, 90.81, 93.77, 96.4, 98.74, 100.8, 102.6, 104.3, 105.7, 106.9, 108, 108.9, 111.5, 112, 111.2, 109.6, 107.6, 105.4, 103.2, 101, 96.33, 91.8, 87.7, 84.05, 80.83, 78, 75.47, 73.18, 71.11, 69.21, 67.46, 65.83, 64.32, 62.91, 56.98, 52.39, 48.68, 45.58 }; 192 174 … … 194 176 195 177 name [9] = "G4_B-100_BONE"; 196 Znum [9] = 0;197 198 178 G4double e9[60] = { 142.5, 174.5, 201.5, 225.2, 246.7, 283.1, 315.3, 344.4, 371.1, 395.5, 418.2, 439.6, 482.3, 519, 551.3, 580.1, 606, 629.2, 650.1, 669, 701.9, 729.5, 752.2, 770.4, 784.5, 795.1, 802.6, 807.4, 810, 810.5, 809.3, 806.6, 802.7, 797.7, 762.5, 719.5, 676.2, 635.8, 599.3, 566.7, 537.9, 512.3, 468.1, 431.4, 400.8, 375, 353, 333.7, 316.9, 301.9, 288.5, 276.3, 265.3, 255.1, 245.9, 237.4, 203.4, 178.9, 160.2, 145.4 }; 199 179 … … 201 181 202 182 name [10] = "G4_Be"; 203 Znum [10] = 4;204 205 183 G4double e10[60] = { 149.7, 183.3, 211.7, 236.7, 259.2, 299.3, 334.7, 366.6, 396, 423.3, 449, 473.3, 517.2, 553.4, 583.6, 608.7, 629.6, 646.8, 660.7, 671.9, 687.3, 695.5, 698.4, 697.6, 694.2, 689.1, 682.8, 675.7, 668.2, 660.5, 652.7, 644.9, 637.2, 629.6, 594.2, 563, 535.4, 510.7, 488.4, 468.2, 449.8, 432.8, 404.4, 380.1, 358.1, 337.6, 318.8, 302.2, 287.4, 274.2, 262.3, 251.5, 241.7, 232.7, 224.4, 216.8, 186, 163.6, 146.3, 132.6 }; 206 184 … … 208 186 209 187 name [11] = "G4_BONE_COMPACT_ICRU"; 210 Znum [11] = 0;211 212 188 G4double e11[60] = { 141.6, 173.4, 200.2, 223.8, 245.2, 281.3, 313.3, 342.2, 368.8, 393.1, 415.6, 436.8, 479, 515.2, 547, 575.3, 600.7, 623.4, 643.8, 662.1, 694.2, 721, 743.2, 760.9, 774.8, 785.2, 792.6, 797.6, 800.3, 801.1, 800.3, 797.9, 794.4, 789.9, 756.4, 714.5, 671.4, 630.5, 593.2, 559.7, 530, 503.5, 459, 423, 393.3, 368.3, 346.9, 328.1, 311.6, 296.9, 283.7, 271.8, 261, 251.1, 242, 233.7, 200.3, 176.3, 158, 143.5 }; 213 189 … … 215 191 216 192 name [12] = "G4_C"; 217 Znum [12] = 6;218 219 193 G4double e12[60] = { 138.4, 169.5, 195.7, 218.8, 239.7, 270.2, 297.8, 322.7, 345.4, 365.1, 382.6, 398.7, 433.5, 462.4, 487.4, 509.9, 530, 547.7, 563.4, 577.6, 603.9, 628.3, 650.1, 668.6, 683.5, 695.3, 704.5, 711.4, 716.3, 719.4, 720.8, 720.9, 719.7, 717.4, 694.5, 661.1, 624.7, 589.1, 556, 526, 499.1, 475, 435.8, 404.4, 377.9, 354.6, 334, 315.9, 300.2, 286.2, 273.7, 262.4, 252.2, 242.7, 234.1, 226.1, 194.2, 171.1, 153.4, 139.4 }; 220 194 221 195 for(i=0; i<60; i++) {e[12][i]=e12[i]*MeV*cm2/g;} 222 196 223 name [13] = "G4_C_Graphite"; 224 Znum [13] = 0; 225 197 name [13] = "G4_GRAPHITE"; 226 198 G4double e13[60] = { 142.6, 175.3, 203.1, 228, 250.5, 283.4, 313.3, 340.4, 365.1, 386.7, 405.9, 423.5, 462, 494, 521.9, 546.9, 569.3, 589.2, 606.9, 622.9, 652.4, 679.9, 704.5, 725.3, 742.2, 755.6, 766.1, 774, 779.6, 783.1, 784.7, 784.8, 783.4, 780.7, 753.8, 714.5, 671.4, 629.1, 590.2, 555.6, 524.9, 497.7, 453.9, 419.3, 390.3, 365.1, 343, 323.7, 307.1, 292.3, 279.1, 267.3, 256.6, 246.8, 237.8, 229.5, 196.7, 173, 155, 140.8 }; 227 199 … … 229 201 230 202 name [14] = "G4_ETHYLENE"; 231 Znum [14] = 0;232 233 203 G4double e14[60] = { 225.8, 276.5, 319.3, 357, 391.1, 445.9, 494.9, 539.1, 579.6, 616, 649.5, 680.6, 742.9, 795.1, 840.1, 879.9, 914.8, 945.5, 972.4, 996.1, 1037, 1071, 1099, 1120, 1135, 1145, 1150, 1152, 1152, 1148, 1142, 1135, 1126, 1115, 1052, 981.5, 912.8, 849.7, 795.6, 749, 708.3, 672.4, 611.7, 562.1, 520.6, 485.3, 454.9, 428.4, 405.5, 385.2, 367.1, 350.8, 336.2, 322.8, 310.5, 299.3, 254.6, 222.7, 198.6, 179.6 }; 234 204 … … 236 206 237 207 name [15] = "G4_C-552"; 238 Znum [15] = 0;239 240 208 G4double e15[60] = { 119.2, 146, 168.6, 188.5, 206.5, 235.1, 260.7, 283.8, 305, 323.9, 341.3, 357.4, 390.7, 418.9, 443.7, 465.8, 485.7, 503.6, 519.5, 534.1, 560.1, 583.2, 603.2, 620, 633.7, 644.7, 653.4, 660.1, 665, 668.4, 670.3, 671.1, 670.7, 669.5, 652.9, 626.4, 596.2, 565.7, 537, 510.7, 486.8, 465.1, 427.5, 396.1, 369.6, 347, 327.4, 310.1, 294.9, 281.3, 269, 258, 247.9, 238.6, 230.2, 222.4, 191, 168.2, 150.8, 137 }; 241 209 … … 243 211 244 212 name [16] = "G4_CARBON_DIOXIDE"; 245 Znum [16] = 0;246 247 213 G4double e16[60] = { 106.4, 130.3, 150.4, 168.2, 184.2, 212.7, 237.9, 260.6, 281.4, 300.9, 319.1, 336.4, 370.9, 401.2, 428.3, 452.8, 475.1, 495.6, 514.4, 531.8, 562.6, 588.8, 611.2, 630.2, 646.1, 659.3, 670.1, 678.6, 685.2, 690, 693.2, 694.9, 695.4, 694.8, 679, 650.5, 617.3, 583.6, 552.1, 523.6, 497.8, 474.6, 434.7, 401.8, 374.3, 351, 330.9, 313.2, 297.6, 283.7, 271.2, 259.9, 249.6, 240.3, 231.7, 223.7, 191.9, 168.9, 151.4, 137.5 }; 248 214 … … 250 216 251 217 name [17] = "G4_CALCIUM_FLUORIDE"; 252 Znum [17] = 0;253 254 218 G4double e17[60] = { 74.48, 91.21, 105.3, 117.8, 129, 149, 166.5, 182.4, 197, 210.6, 223.4, 235.5, 259.6, 280.7, 299.6, 316.6, 332, 346.2, 359.1, 371.1, 392.2, 410.1, 425.2, 438, 448.7, 457.5, 464.6, 470.3, 474.7, 477.9, 480.1, 481.4, 481.9, 481.7, 473, 456.7, 437.6, 417.8, 398.6, 380.6, 364, 348.7, 322.9, 301.7, 283.5, 267.5, 253.4, 240.9, 229.8, 219.9, 210.8, 202.5, 194.8, 187.7, 181.3, 175.5, 151.6, 134.4, 121.1, 110.6 }; 255 219 … … 257 221 258 222 name [18] = "G4_CERIC_SULFATE"; 259 Znum [18] = 0;260 261 223 G4double e18[60] = { 135.4, 165.8, 191.5, 214.1, 234.5, 270.8, 302.8, 331.7, 358.2, 383, 406.2, 428.2, 471.7, 509.8, 543.6, 574, 601.5, 626.5, 649.3, 670.1, 706.4, 736.5, 761.2, 781.4, 797.4, 809.8, 819, 825.3, 829.2, 830.8, 830.6, 828.7, 825.4, 820.9, 785.9, 741.4, 696, 653.6, 618.4, 588.8, 562.8, 539.6, 499.3, 464.8, 434.6, 407.9, 384.2, 363.4, 344.9, 328.4, 313.6, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 }; 262 224 … … 264 226 265 227 name [19] = "G4_CELLULOSE_NITRATE"; 266 Znum [19] = 0;267 268 228 G4double e19[60] = { 132.2, 161.9, 187, 209, 229, 262.6, 292.5, 319.4, 344.2, 366.8, 387.8, 407.5, 447, 481, 510.8, 537.6, 561.6, 583.2, 602.7, 620.4, 651.5, 677.9, 700, 718.2, 732.7, 744.1, 752.7, 759, 763.2, 765.5, 766.2, 765.5, 763.5, 760.6, 734.4, 698.2, 659.3, 621.4, 586, 553.8, 524.9, 498.9, 452.4, 413.9, 382.9, 358, 337.7, 319.7, 303.9, 289.7, 277.1, 265.6, 255.2, 245.6, 236.9, 228.8, 196.4, 173, 155, 140.8 }; 269 229 … … 271 231 272 232 name [20] = "G4_BONE_CORTICAL_ICRP"; 273 Znum [20] = 0;274 275 233 G4double e20[60] = { 123.5, 151.3, 174.7, 195.3, 214, 246.1, 274.5, 300.2, 323.8, 345.6, 365.9, 385, 423, 455.7, 484.7, 510.5, 533.8, 554.8, 573.7, 590.9, 620.8, 645.9, 666.5, 683.3, 696.6, 706.8, 714.4, 719.7, 723, 724.5, 724.5, 723.1, 720.6, 717.1, 689.6, 653.5, 615.8, 579.8, 546.6, 516.7, 490, 466.2, 426.1, 393.6, 366.6, 343.7, 324, 306.7, 291.5, 278, 265.8, 254.7, 244.7, 235.5, 227.1, 219.4, 188.4, 166.1, 149, 135.4 }; 276 234 … … 278 236 279 237 name [21] = "G4_CESIUM_IODIDE"; 280 Znum [21] = 0;281 282 238 G4double e21[60] = { 34.67, 42.46, 49.03, 54.82, 60.05, 69.34, 77.52, 84.92, 91.73, 98.06, 104, 109.6, 121, 130.9, 139.9, 148, 155.5, 162.3, 168.6, 174.5, 184.9, 194, 201.8, 208.5, 214.2, 219, 223, 226.3, 228.9, 231, 232.5, 233.4, 234, 234.1, 230.4, 221.9, 211.4, 200.6, 190.1, 180.6, 171.9, 164.1, 151.1, 140.6, 132.1, 125.1, 119.1, 114, 109.6, 105.6, 102.1, 98.92, 95.83, 92.83, 89.95, 87.22, 75.76, 67.41, 61.26, 56.63 }; 283 239 … … 285 241 286 242 name [22] = "G4_Cu"; 287 Znum [22] = 29;288 289 243 G4double e22[60] = { 34.9, 42.74, 49.35, 55.18, 60.45, 69.8, 78.04, 85.48, 92.33, 98.71, 104.7, 110.4, 121.4, 130.9, 139.2, 146.6, 153.2, 159, 164.3, 168.9, 176.9, 183.2, 188.4, 192.5, 195.9, 198.7, 201, 202.8, 204.4, 205.6, 206.7, 207.5, 208.2, 208.7, 209.9, 209.2, 207.5, 205.1, 202.3, 199.1, 195.8, 192.3, 185.4, 178.6, 172, 165.8, 159.6, 153.6, 148, 142.7, 137.8, 133.3, 129.1, 125.2, 121.7, 118.3, 104.7, 94.43, 86.45, 79.87 }; 290 244 … … 292 246 293 247 name [23] = "G4_Fe"; 294 Znum [23] = 26;295 296 248 G4double e23[60] = { 37.81, 46.31, 53.47, 59.78, 65.49, 75.62, 84.54, 92.61, 100, 106.9, 113.4, 119.6, 132, 143, 153, 162, 170.4, 178.2, 185.4, 192.2, 204.6, 215.6, 225.4, 234.2, 242.1, 249.2, 255.5, 261.2, 266.2, 270.7, 274.6, 278.1, 281, 283.6, 290.9, 291.5, 287.6, 281, 272.8, 263.9, 254.9, 246, 229.5, 214.8, 202.1, 191.1, 181.6, 173.4, 166.2, 159.7, 153.8, 148.5, 143.6, 139.1, 135, 131.1, 115.3, 103.5, 94.02, 86.52 }; 297 249 … … 299 251 300 252 name [24] = "G4_FERROUS_SULFATE"; 301 Znum [24] = 0;302 303 253 G4double e24[60] = { 135.1, 165.5, 191.1, 213.6, 234, 270.2, 302.1, 330.9, 357.4, 382.1, 405.3, 427.2, 470.7, 508.7, 542.4, 572.8, 600.3, 625.3, 648, 668.8, 705, 735.1, 759.9, 780.1, 796.1, 808.5, 817.7, 824.1, 827.9, 829.6, 829.4, 827.5, 824.2, 819.7, 784.9, 740.5, 695.1, 652.8, 617.8, 588.4, 562.8, 539.9, 499.9, 465.6, 435.5, 408.8, 385, 364.1, 345.6, 329.1, 314.3, 300.9, 288.8, 277.7, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 }; 304 254 … … 306 256 307 257 name [25] = "G4_Gd"; 308 Znum [25] = 64;309 310 258 G4double e25[60] = { 25.71, 31.49, 36.37, 40.66, 44.54, 51.43, 57.5, 62.99, 68.03, 72.73, 77.14, 81.32, 89.78, 97.24, 104, 110.1, 115.8, 121, 125.8, 130.4, 138.5, 145.7, 152.1, 157.7, 162.6, 166.9, 170.7, 173.9, 176.7, 179, 181, 182.5, 183.8, 184.7, 185.6, 182.1, 176.3, 169.4, 162.2, 155.2, 148.7, 142.6, 132, 123.3, 116.2, 110.2, 105, 100.6, 96.67, 93.2, 90.08, 87.27, 84.72, 82.38, 80.24, 78.26, 70.14, 63.87, 58.87, 54.76 }; 311 259 … … 313 261 314 262 name [26] = "G4_Ge"; 315 Znum [26] = 32;316 317 263 G4double e26[60] = { 45.91, 56.23, 64.93, 72.59, 79.52, 91.82, 102.7, 112.5, 121.5, 129.9, 137.7, 145.2, 159.7, 172.3, 183.3, 193.1, 201.7, 209.4, 216.3, 222.3, 232.3, 240, 245.6, 249.6, 252.3, 253.9, 254.5, 254.5, 253.9, 252.9, 251.5, 250, 248.2, 246.4, 236.5, 227.2, 218.9, 211.6, 205.1, 199.3, 193.9, 189, 180.1, 172.3, 165.2, 158.8, 152.6, 146.6, 140.9, 135.7, 130.8, 126.3, 122.1, 118.3, 114.7, 111.3, 97.72, 87.77, 80.18, 74.18 }; 318 264 … … 320 266 321 267 name [27] = "G4_Pyrex_Glass"; 322 Znum [27] = 0;323 324 268 G4double e27[60] = { 88.74, 108.7, 125.5, 140.3, 153.7, 177.5, 198.4, 217.4, 234.8, 251, 266.2, 280.6, 308.9, 333.6, 355.6, 375.3, 393.1, 409.2, 423.9, 437.3, 460.8, 480.4, 496.7, 510.2, 521.2, 530.1, 537.1, 542.5, 546.4, 549.1, 550.6, 551.2, 551, 550.1, 537.6, 518.1, 496.1, 473.9, 451.2, 429.2, 408.8, 390.1, 357.9, 331.5, 309.8, 291.7, 276.2, 262.4, 250.1, 239.1, 229.2, 220.2, 212, 204.6, 197.7, 191.4, 165.6, 146.7, 132.1, 120.4 }; 325 269 … … 327 271 328 272 name [28] = "G4_H"; 329 Znum [28] = 1;330 331 273 G4double e28[60] = { 746.5, 914.3, 1056, 1180, 1293, 1493, 1669, 1829, 1975, 2112, 2240, 2361, 2586, 2777, 2942, 3084, 3208, 3316, 3409, 3490, 3618, 3710, 3771, 3808, 3823, 3822, 3807, 3781, 3745, 3702, 3654, 3601, 3545, 3487, 3183, 2890, 2629, 2402, 2204, 2031, 1882, 1753, 1544, 1384, 1258, 1159, 1077, 1007, 947, 894.2, 847.5, 805.9, 768.6, 734.9, 704.3, 676.4, 566.7, 489.7, 432.5, 388.1 }; 332 274 … … 334 276 335 277 name [29] = "G4_He"; 336 Znum [29] = 2;337 338 278 G4double e29[60] = { 184.2, 225.6, 260.6, 291.3, 319.1, 368.5, 412, 451.3, 487.4, 521.1, 552.7, 582.6, 641.3, 691.9, 736.7, 776.6, 812.5, 844.9, 874.2, 900.8, 946.6, 984.1, 1014, 1039, 1058, 1072, 1083, 1089, 1093, 1094, 1093, 1090, 1085, 1079, 1032, 973, 911.2, 852.1, 797.5, 748.3, 704.5, 665.8, 600.4, 547.7, 504.5, 468.3, 437.7, 411.3, 388.2, 368, 349.9, 333.8, 319.3, 306.2, 294.2, 283.2, 239.6, 208.6, 185.2, 167 }; 339 279 … … 341 281 342 282 name [30] = "G4_KAPTON"; 343 Znum [30] = 0;344 345 283 G4double e30[60] = { 145.4, 178.1, 205.6, 229.9, 251.8, 286.2, 317.1, 344.9, 370.4, 393.1, 413.7, 432.9, 472.6, 506.1, 535.2, 561.3, 584.6, 605.3, 623.8, 640.4, 670.2, 696.5, 719.1, 737.7, 752.5, 763.9, 772.5, 778.6, 782.6, 784.6, 784.9, 783.8, 781.4, 778, 749.2, 710.6, 669.6, 630, 593.5, 560.4, 530.8, 504.4, 459.6, 423.3, 393.3, 368.2, 346.8, 328, 311.6, 296.9, 283.8, 272, 261.3, 251.5, 242.4, 234.1, 200.8, 176.8, 158.4, 143.8 }; 346 284 … … 348 286 349 287 name [31] = "G4_Kr"; 350 Znum [31] = 36;351 352 288 G4double e31[60] = { 45.92, 56.24, 64.94, 72.6, 79.53, 91.84, 102.7, 112.5, 121.5, 129.9, 137.8, 145.2, 160.1, 173.2, 184.9, 195.5, 205.1, 213.8, 221.8, 229.1, 242, 252.7, 261.6, 268.8, 274.6, 279, 282.3, 284.5, 285.8, 286.2, 286, 285.1, 283.8, 281.9, 268.6, 252.2, 236.2, 221.7, 209, 198.2, 188.9, 180.9, 168.1, 158.1, 150.2, 143.7, 138.1, 133.2, 128.8, 124.8, 121.2, 117.8, 114.6, 111.6, 108.8, 106.1, 94.63, 85.43, 77.91, 71.84 }; 353 289 … … 355 291 356 292 name [32] = "G4_LITHIUM_TETRABORATE"; 357 Znum [32] = 0;358 359 293 G4double e32[60] = { 111, 135.9, 157, 175.5, 192.2, 222, 248.2, 271.9, 293.6, 313.9, 333, 351, 386.5, 417.4, 444.8, 469.4, 491.6, 511.7, 530.1, 546.7, 575.8, 599.9, 619.8, 636, 649.1, 659.3, 667.2, 672.9, 676.7, 678.9, 679.6, 679.1, 677.6, 675.1, 653, 622.4, 589.5, 557.3, 525.5, 495.6, 468.4, 444.1, 403.1, 370.6, 344.6, 323.5, 305.9, 290.3, 276.4, 263.9, 252.7, 242.4, 233.2, 224.7, 216.9, 209.6, 180.4, 159.2, 142.8, 129.9 }; 360 294 … … 362 296 363 297 name [33] = "G4_LITHIUM_FLUORIDE"; 364 Znum [33] = 0;365 366 298 G4double e33[60] = { 80.87, 99.04, 114.4, 127.9, 140.1, 161.7, 180.8, 198.1, 214, 228.7, 242.6, 255.7, 281.9, 304.9, 325.4, 344, 360.9, 376.5, 390.8, 404, 427.6, 447.8, 465.3, 480.3, 493.1, 504.1, 513.3, 521.1, 527.4, 532.5, 536.5, 539.6, 541.7, 543, 540.3, 527.4, 509.2, 488.8, 467.4, 446.5, 426.9, 408.7, 376.9, 350.4, 328, 309.1, 292.7, 278.1, 265.1, 253.3, 242.5, 232.8, 223.9, 215.6, 208.2, 201.2, 173.1, 152.5, 136.8, 124.4 }; 367 299 … … 369 301 370 302 name [34] = "G4_M3_WAX"; 371 Znum [34] = 0;372 373 303 G4double e34[60] = { 198.1, 242.6, 280.2, 313.3, 343.1, 391.9, 435.4, 474.6, 510.6, 543.1, 573, 601, 656.7, 703.7, 744.4, 780.4, 812.2, 840.3, 865, 887, 925, 956.5, 982.1, 1002, 1016, 1026, 1032, 1035, 1036, 1033, 1029, 1023, 1016, 1007, 953.3, 891.9, 831.3, 775.4, 725.1, 680.6, 641.3, 606.6, 546.6, 497.8, 458.8, 427.4, 401.7, 379.2, 359.6, 342.2, 326.7, 312.7, 300.1, 288.5, 277.8, 268.1, 229.1, 201, 179.7, 162.8 }; 374 304 … … 376 306 377 307 name [35] = "G4_MS20_TISSUE"; 378 Znum [35] = 0;379 380 308 G4double e35[60] = { 174.4, 213.6, 246.7, 275.8, 302.1, 345, 383.2, 417.7, 449.4, 477.9, 504.3, 528.8, 578.1, 619.8, 656, 688.2, 716.7, 742, 764.4, 784.4, 819.3, 848.7, 872.8, 892, 906.4, 916.8, 923.7, 927.8, 929.4, 928.8, 926.4, 922.3, 916.9, 910.4, 866.6, 814.5, 762, 712.8, 668.3, 628.6, 593.3, 562.1, 507.7, 463.3, 427.6, 398.9, 375.3, 354.7, 336.7, 320.6, 306.2, 293.3, 281.6, 270.9, 261, 252, 215.7, 189.5, 169.6, 153.9 }; 381 309 … … 383 311 384 312 name [36] = "G4_METHANE"; 385 Znum [36] = 0;386 387 313 G4double e36[60] = { 272.8, 334.1, 385.8, 431.4, 472.5, 545.6, 610, 668.2, 721.8, 771.6, 818.4, 862.7, 949.2, 1024, 1090, 1148, 1200, 1246, 1288, 1325, 1387, 1436, 1473, 1500, 1518, 1528, 1532, 1530, 1524, 1514, 1501, 1485, 1467, 1447, 1338, 1227, 1127, 1041, 967.3, 904.6, 850.4, 803.2, 724.6, 661.8, 610.5, 567.7, 531.4, 499.8, 472.5, 448.3, 426.7, 407.4, 390, 374.1, 359.6, 346.4, 293.7, 256.2, 227.9, 205.7 }; 388 314 … … 390 316 391 317 name [37] = "G4_Mo"; 392 Znum [37] = 42;393 394 318 G4double e37[60] = { 40.18, 49.21, 56.82, 63.53, 69.59, 80.35, 89.84, 98.41, 106.3, 113.6, 120.5, 127, 140.2, 151.7, 162.1, 171.5, 180.1, 188, 195.4, 202.1, 214.3, 224.8, 233.8, 241.6, 248.3, 253.9, 258.7, 262.6, 265.7, 268.2, 270, 271.3, 272.1, 272.4, 268.7, 259.5, 248, 235.8, 224, 213.1, 203.1, 194.1, 178.9, 166.6, 156.5, 148.1, 141, 134.9, 129.5, 124.7, 120.4, 116.4, 112.6, 109.1, 105.8, 102.6, 89.8, 80.34, 73.15, 67.51 }; 395 319 … … 397 321 398 322 name [38] = "G4_MUSCLE_WITH_SUCROSE"; 399 Znum [38] = 0;400 401 323 G4double e38[60] = { 149.4, 183, 211.3, 236.2, 258.7, 298.3, 333.3, 364.8, 393.8, 420.8, 446, 469.8, 516.6, 557.2, 593.1, 625.2, 654, 680, 703.5, 724.8, 761.7, 792, 816.7, 836.5, 851.9, 863.6, 871.9, 877.4, 880.4, 881.2, 880.1, 877.3, 873.2, 867.9, 829.5, 781.9, 733.4, 688, 647.9, 612.8, 581.8, 554.2, 507.1, 468.4, 435.9, 408.3, 384.4, 363.5, 344.9, 328.4, 313.7, 300.3, 288.2, 277.2, 267, 257.7, 220.4, 193.5, 173, 156.9 }; 402 324 … … 404 326 405 327 name [39] = "G4_MUSCLE_WITHOUT_SUCROSE"; 406 Znum [39] = 0;407 408 328 G4double e39[60] = { 146.6, 179.5, 207.3, 231.8, 253.9, 292.9, 327.3, 358.4, 386.9, 413.5, 438.4, 461.9, 508.2, 548.4, 584, 615.8, 644.5, 670.4, 693.8, 715.1, 752, 782.3, 807.1, 827, 842.5, 854.3, 862.9, 868.5, 871.6, 872.6, 871.6, 869, 865, 859.8, 822, 774.9, 726.9, 682, 643, 609.2, 579.4, 552.9, 507.4, 469.6, 437.7, 410.1, 386.1, 365.1, 346.5, 329.9, 315, 301.6, 289.4, 278.3, 268.2, 258.8, 221.3, 194.3, 173.7, 157.5 }; 409 329 … … 411 331 412 332 name [40] = "G4_MUSCLE_SKELETAL_ICRP"; 413 Znum [40] = 0;414 415 333 G4double e40[60] = { 141.3, 173.1, 199.9, 223.5, 244.8, 282.5, 315.8, 345.8, 373.5, 399.2, 423.3, 446.1, 491.1, 530.2, 565, 596.1, 624.2, 649.7, 672.8, 693.8, 730.4, 760.6, 785.3, 805.3, 821.1, 833.1, 841.9, 847.9, 851.4, 852.6, 852, 849.7, 846.1, 841.2, 804.8, 758.9, 712.2, 668.5, 631.2, 599, 570.8, 545.6, 502.2, 465.8, 434.6, 407.5, 383.7, 362.8, 344.4, 327.9, 313.1, 299.8, 287.7, 276.7, 266.6, 257.3, 220, 193.2, 172.8, 156.7 }; 416 334 … … 418 336 419 337 name [41] = "G4_MUSCLE_STRIATED_ICRU"; 420 Znum [41] = 0;421 422 338 G4double e41[60] = { 141.7, 173.5, 200.4, 224, 245.4, 283.2, 316.5, 346.6, 374.3, 400, 424.2, 447, 492.1, 531.3, 566.1, 597.3, 625.4, 650.9, 674, 695.1, 731.6, 761.9, 786.7, 806.6, 822.4, 834.4, 843.3, 849.2, 852.6, 853.9, 853.2, 851, 847.3, 842.4, 805.8, 759.8, 713, 669.2, 632, 600.1, 572.1, 547.1, 504, 467.7, 436.5, 409.3, 385.3, 364.3, 345.7, 329.2, 314.4, 300.9, 288.8, 277.8, 267.6, 258.3, 220.8, 193.9, 173.4, 157.2 }; 423 339 … … 425 341 426 342 name [42] = "G4_N"; 427 Znum [42] = 7;428 429 343 G4double e42[60] = { 126.5, 155, 179, 200.1, 219.2, 253.1, 283, 310, 334.8, 357.9, 379.6, 400.2, 440.6, 475.8, 507, 535, 560.2, 583.1, 603.8, 622.7, 655.5, 682.7, 704.9, 722.9, 737.3, 748.4, 756.6, 762.3, 765.9, 767.5, 767.5, 766, 763.3, 759.4, 729.3, 689.8, 648.6, 609.1, 572.9, 540.4, 511.6, 486.2, 443.4, 408.8, 380.1, 356, 335.4, 317.2, 301.2, 286.8, 274.1, 262.6, 252.2, 242.7, 234, 225.9, 193.8, 170.5, 152.8, 138.8 }; 430 344 … … 432 346 433 347 name [43] = "G4_SODIUM_IODIDE"; 434 Znum [43] = 0;435 436 348 G4double e43[60] = { 41.1, 50.34, 58.12, 64.98, 71.19, 82.2, 91.9, 100.7, 108.7, 116.2, 123.3, 130, 143.4, 155.2, 165.8, 175.4, 184.2, 192.3, 199.7, 206.6, 219, 229.6, 238.9, 246.8, 253.5, 259.2, 264, 268, 271.1, 273.6, 275.4, 276.7, 277.4, 277.7, 273.7, 264.2, 252.3, 239.7, 227.6, 216.2, 205.9, 196.6, 180.7, 167.8, 157.3, 148.5, 141.1, 134.7, 129.1, 124.1, 119.7, 115.7, 111.9, 108.4, 105.1, 101.9, 88.79, 78.99, 71.48, 65.54 }; 437 349 … … 439 351 440 352 name [44] = "G4_Ne"; 441 Znum [44] = 10;442 443 353 G4double e44[60] = { 58.01, 71.05, 82.04, 91.73, 100.5, 116, 129.7, 142.1, 153.5, 164.1, 174, 183.5, 202.5, 219.3, 234.5, 248.3, 261, 272.8, 283.8, 294, 312.7, 329.2, 343.8, 356.9, 368.6, 379, 388.3, 396.5, 403.8, 410.2, 415.8, 420.7, 424.8, 428.4, 438.1, 437.9, 431.3, 420.8, 408.2, 394.6, 380.7, 367.1, 339, 313.8, 293.3, 277.2, 264.3, 252.6, 241.9, 232.2, 223.2, 215, 207.4, 200.4, 193.8, 187.7, 163, 144.6, 130.3, 118.9 }; 444 354 … … 446 356 447 357 name [45] = "G4_NYLON_6/6"; 448 Znum [45] = 0;449 450 358 G4double e45[60] = { 191, 233.9, 270.1, 302, 330.8, 377.8, 419.7, 457.5, 492.1, 523.4, 552.3, 579.2, 633, 678.5, 717.9, 752.9, 783.8, 811.1, 835.3, 856.8, 894.2, 925.4, 951, 971, 985.8, 996.3, 1003, 1007, 1008, 1006, 1003, 997.7, 991.2, 983.5, 933.5, 875.4, 817.5, 763.6, 715, 671.7, 633.5, 599.6, 542.9, 497.4, 460.4, 429.7, 403.7, 381, 361.2, 343.6, 327.9, 313.8, 301, 289.3, 278.6, 268.8, 229.5, 201.3, 179.8, 162.9 }; 451 359 … … 453 361 454 362 name [46] = "G4_O"; 455 Znum [46] = 8;456 457 363 G4double e46[60] = { 99.46, 121.8, 140.7, 157.3, 172.3, 198.9, 222.4, 243.6, 263.1, 281.3, 298.4, 314.5, 346.6, 374.7, 399.8, 422.4, 443, 461.9, 479.1, 495, 523.1, 547, 567.2, 584.4, 598.7, 610.6, 620.2, 628, 633.9, 638.3, 641.3, 643, 643.6, 643.3, 630.5, 606.7, 578.3, 549.1, 520.9, 494.6, 470.9, 449.7, 413.2, 383.1, 357.8, 336.3, 317.6, 301.1, 286.3, 273.2, 261.3, 250.5, 240.8, 231.9, 223.7, 216.1, 185.7, 163.7, 146.7, 133.4 }; 458 364 … … 460 366 461 367 name [47] = "G4_PARAFFIN"; 462 Znum [47] = 0;463 464 368 G4double e47[60] = { 228.8, 280.2, 323.5, 361.7, 396.2, 451.9, 501.6, 546.5, 587.6, 624.6, 658.6, 690.2, 753.4, 806.4, 852.1, 892.4, 927.9, 959.1, 986.3, 1010, 1052, 1086, 1114, 1135, 1150, 1160, 1166, 1168, 1166, 1163, 1157, 1149, 1140, 1129, 1064, 992.4, 922.6, 858.6, 801.5, 751.1, 706.8, 667.8, 601.8, 548.9, 506.2, 471.3, 442.2, 416.9, 394.9, 375.4, 358, 342.3, 328.2, 315.3, 303.4, 292.6, 249.3, 218.3, 194.8, 176.3 }; 465 369 … … 467 371 468 372 name [48] = "G4_Pb"; 469 Znum [48] = 82;470 471 373 G4double e48[60] = { 15.4, 18.86, 21.78, 24.35, 26.68, 30.81, 34.44, 37.73, 40.75, 43.57, 46.21, 48.71, 53.82, 58.34, 62.45, 66.21, 69.7, 72.94, 75.98, 78.85, 84.11, 88.84, 93.13, 97.02, 100.6, 103.8, 106.8, 109.5, 111.9, 114.1, 116.2, 118, 119.6, 121.1, 126.1, 128.1, 127.9, 126.3, 123.6, 120.4, 116.9, 113.3, 106.4, 99.98, 94.37, 89.5, 85.18, 81.37, 78.01, 75.05, 72.42, 70.08, 67.99, 66.12, 64.44, 62.92, 56.88, 52.22, 48.46, 45.34 }; 472 374 … … 474 376 475 377 name [49] = "G4_PHOTO_EMULSION"; 476 Znum [49] = 0;477 478 378 G4double e49[60] = { 61.33, 75.12, 86.74, 96.97, 106.2, 122.2, 136.3, 149.1, 160.8, 171.6, 181.6, 191.1, 210, 226.3, 240.6, 253.5, 265, 275.4, 284.8, 293.3, 308, 320.3, 330.3, 338.4, 344.7, 349.4, 352.8, 355.1, 356.4, 356.9, 356.6, 355.7, 354.3, 352.4, 338.9, 322.3, 305.5, 289.9, 275.7, 263, 251.7, 241.5, 224.4, 210.3, 198.3, 188, 179, 171, 163.9, 157.5, 151.6, 146.3, 141.3, 136.6, 132.1, 128, 110.6, 97.75, 87.92, 80.2 }; 479 379 … … 481 381 482 382 name [50] = "G4_PLASTIC_SC_VINYLTOLUENE"; 483 Znum [50] = 0;484 485 383 G4double e50[60] = { 190.1, 232.8, 268.8, 300.5, 329.2, 374.1, 414.4, 450.7, 483.9, 513.5, 540.4, 565.4, 616.5, 659.2, 696, 728.7, 757.6, 783, 805.3, 825.2, 860.1, 890.2, 915.4, 935.4, 950.4, 961.1, 968.2, 972.3, 973.8, 973, 970.2, 965.7, 959.9, 952.8, 906, 850.6, 795.1, 743.3, 696.4, 654.7, 617.9, 585.3, 530.7, 487.1, 451.3, 421.4, 395.9, 373.7, 354.4, 337.2, 321.9, 308.1, 295.7, 284.2, 273.8, 264.1, 225.7, 198.1, 177.1, 160.5 }; 486 384 … … 488 386 489 387 name [51] = "G4_POLYCARBONATE"; 490 Znum [51] = 0;491 492 388 G4double e51[60] = { 164.8, 201.8, 233, 260.5, 285.4, 324.6, 359.7, 391.4, 420.3, 446.2, 469.7, 491.7, 536.5, 574.3, 607.1, 636.2, 662.2, 685.1, 705.4, 723.6, 755.9, 783.9, 807.7, 826.9, 841.7, 852.8, 860.8, 866, 868.8, 869.6, 868.6, 866, 862.1, 857.1, 820.5, 774.5, 727.2, 682.2, 641.1, 604.1, 571.2, 542, 492.3, 452.1, 419.1, 391.8, 368.6, 348.4, 330.7, 314.9, 300.8, 288.1, 276.7, 266.1, 256.5, 247.6, 212, 186.3, 166.8, 151.3 }; 493 389 … … 495 391 496 392 name [52] = "G4_POLYETHYLENE"; 497 Znum [52] = 0;498 499 393 G4double e52[60] = { 184.9, 226.5, 261.5, 292.4, 320.3, 369.9, 413.5, 453, 489.3, 523, 554.8, 584.8, 643.9, 695.3, 740.8, 781.4, 817.9, 850.9, 880.6, 907.5, 953.7, 990.9, 1021, 1044, 1061, 1073, 1081, 1084, 1085, 1083, 1078, 1072, 1064, 1054, 994.1, 927.8, 865, 808.9, 760.1, 717.9, 681.4, 649.7, 591.2, 541, 499.2, 464.9, 436.3, 411.4, 389.8, 370.6, 353.4, 338.1, 324.2, 311.4, 299.8, 289.1, 246.4, 215.9, 192.7, 174.4 }; 500 394 … … 502 396 503 397 name [53] = "G4_POLYETHYLENE_TEREPHTHALATE_MYLAR"; 504 Znum [53] = 0;505 506 398 G4double e53[60] = { 150.9, 184.9, 213.5, 238.7, 261.4, 297.8, 330.2, 359.6, 386.4, 410.5, 432.5, 453, 494.9, 530.3, 561.2, 588.8, 613.4, 635.3, 654.7, 672.3, 703.4, 730.5, 753.5, 772.3, 787, 798.3, 806.6, 812.4, 816, 817.6, 817.4, 815.8, 812.9, 808.9, 777.6, 736.5, 693.4, 651.9, 613.6, 579.1, 548.2, 520.6, 472.9, 434, 402.2, 376.1, 354.3, 335, 318.2, 303.2, 289.8, 277.7, 266.7, 256.6, 247.4, 238.9, 204.8, 180.2, 161.4, 146.5 }; 507 399 … … 509 401 510 402 name [54] = "G4_PLEXIGLASS"; 511 Znum [54] = 0;512 513 403 G4double e54[60] = { 174.9, 214.2, 247.4, 276.6, 303, 345.9, 384.1, 418.7, 450.4, 479, 505.2, 529.8, 579.1, 620.8, 657.1, 689.3, 717.9, 743.2, 765.7, 785.8, 820.8, 850.5, 875, 894.5, 909.3, 920.1, 927.4, 931.9, 933.9, 933.7, 931.6, 928, 922.9, 916.8, 874.4, 823.2, 771.3, 722.4, 676.2, 634, 596.2, 562.8, 507.2, 463.4, 428.5, 400.2, 376.7, 356.1, 338, 321.9, 307.5, 294.5, 282.8, 272, 262.1, 253, 216.6, 190.4, 170.3, 154.5 }; 514 404 … … 516 406 517 407 name [55] = "G4_POLYPROPYLENE"; 518 Znum [55] = 0;519 520 408 G4double e55[60] = { 197.6, 242, 279.4, 312.4, 342.2, 395.1, 441.8, 483.9, 522.7, 558.8, 592.7, 624.8, 687.3, 741.3, 789, 831.4, 869.4, 903.6, 934.3, 962, 1009, 1048, 1078, 1101, 1119, 1132, 1140, 1145, 1146, 1145, 1141, 1135, 1128, 1119, 1060, 991.7, 924.3, 862, 806.1, 756.5, 712.8, 674.2, 605.4, 548.6, 503.3, 467.5, 438.7, 413.6, 391.8, 372.4, 355.2, 339.7, 325.7, 312.9, 301.1, 290.4, 247.5, 216.8, 193.5, 175.1 }; 521 409 … … 523 411 524 412 name [56] = "G4_POLYSTYRENE"; 525 Znum [56] = 0;526 527 413 G4double e56[60] = { 186, 227.8, 263.1, 294.1, 322.2, 372.1, 416, 455.7, 492.2, 526.2, 558.1, 588.3, 645.3, 693.8, 735.8, 772.4, 804.5, 832.6, 857.2, 878.7, 913.5, 939.2, 957.2, 969, 975.6, 978, 976.8, 972.8, 966.5, 958.4, 948.9, 938.3, 926.9, 914.9, 851.3, 789.6, 734.2, 685.4, 642.9, 605.7, 573, 543.9, 499.5, 465.2, 435.8, 409.1, 384.6, 363.2, 344.6, 328.1, 313.3, 300, 288, 277, 266.8, 257.5, 220.4, 193.6, 173.2, 157 }; 528 414 529 415 for(i=0; i<60; i++) {e[56][i]=e56[i]*MeV*cm2/g;} 530 416 531 name [57] = "G4_POLYTETRAFLUOROETHYLENE"; 532 Znum [57] = 0; 533 417 name [57] = "G4_TEFLON"; 534 418 G4double e57[60] = { 83.27, 102, 117.8, 131.7, 144.2, 165, 183.4, 200.1, 215.3, 229.2, 242, 254, 278.7, 300, 319, 336.2, 351.9, 366.1, 379.2, 391.2, 413.1, 432.7, 450, 465.1, 478, 489.1, 498.5, 506.4, 513, 518.4, 522.7, 526, 528.4, 530.1, 528.6, 516.7, 499.4, 479.6, 460.4, 442.3, 425.4, 409.6, 381.2, 356.4, 334.6, 315.4, 298.3, 283.1, 269.6, 257.4, 246.5, 236.5, 227.4, 219.1, 211.5, 204.4, 175.9, 155.2, 139.3, 126.7 }; 535 419 … … 537 421 538 422 name [58] = "G4_POLYVINYL_CHLORIDE"; 539 Znum [58] = 0;540 541 423 G4double e58[60] = { 140.2, 171.7, 198.3, 221.7, 242.8, 277.9, 309, 337.2, 363, 386.4, 408.1, 428.4, 468.9, 503.4, 533.6, 560.3, 584.1, 605.3, 624.1, 640.9, 670.1, 694.5, 714.3, 729.8, 741.4, 749.6, 755, 757.9, 758.6, 757.6, 755, 751, 746, 740, 701.3, 656.7, 612.9, 572.6, 538.7, 509.8, 484.7, 462.4, 424.2, 392.4, 365.3, 341.8, 321.1, 302.9, 287.3, 273.6, 261.3, 250.1, 240.1, 231.1, 222.7, 215, 184.5, 162.6, 145.9, 132.6 }; 542 424 … … 544 426 545 427 name [59] = "G4_PROPANE"; 546 Znum [59] = 0;547 548 428 G4double e59[60] = { 194.5, 234.7, 268.4, 298, 324.7, 372, 413.6, 451.2, 485.8, 518, 548.2, 576.8, 642.6, 702.2, 756.9, 808, 855.9, 901.2, 944.4, 985.6, 1063, 1135, 1203, 1267, 1327, 1385, 1440, 1492, 1543, 1592, 1639, 1684, 1728, 1770, 1964, 2131, 2277, 2404, 2516, 2613, 2698, 2771, 2887, 2969, 3022, 3053, 3065, 3061, 3046, 3021, 2990, 2953, 2912, 2868, 2822, 2775, 2564, 2372, 2191, 2022 }; 549 429 … … 551 431 552 432 name [60] = "G4_Pt"; 553 Znum [60] = 78;554 555 433 G4double e60[60] = { 30.79, 33.73, 36.43, 38.95, 41.31, 43.55, 48.11, 52.16, 55.83, 59.2, 62.32, 65.23, 67.95, 70.51, 75.22, 79.46, 83.3, 86.79, 89.97, 92.87, 95.51, 97.92, 100.1, 102.1, 103.9, 105.5, 107, 108.3, 112.7, 114.5, 114.4, 113, 110.8, 108.1, 105.3, 102.4, 96.92, 92.12, 87.91, 84.22, 80.97, 78.11, 75.56, 73.26, 71.17, 69.26, 67.5, 65.87, 64.36, 62.94, 57, 52.39, 48.67, 45.57, 42.94, 40.66, 38.67, 36.9, 33.91, 31.45 }; 556 434 … … 558 436 559 437 name [61] = "G4_Si"; 560 Znum [61] = 14;561 562 438 G4double e61[60] = { 105, 128.6, 148.5, 166, 181.8, 210, 234.8, 257.2, 277.8, 296.9, 315, 332, 364.6, 392.5, 416.7, 437.8, 456.3, 472.5, 486.6, 498.9, 518.4, 532.3, 541.6, 547, 549.2, 549, 546.8, 543, 538, 532.2, 525.7, 518.8, 511.7, 504.4, 468.7, 437.3, 410.7, 388.4, 369.4, 353, 338.7, 325.9, 304.1, 285.9, 270.3, 256.7, 245.2, 235.1, 225.9, 217.2, 209, 201.1, 193.6, 187, 180.9, 175.3, 152.3, 135.4, 122.2, 111.7 }; 563 439 564 440 for(i=0; i<60; i++) {e[61][i]=e61[i]*MeV*cm2/g;} 565 441 566 name [62] = "G4_SiO2"; 567 Znum [62] = 0; 568 442 name [62] = "G4_SILICON_DIOXIDE"; 569 443 G4double e62[60] = { 85.64, 104.9, 121.1, 135.4, 148.3, 171.3, 191.5, 209.8, 226.6, 242.2, 256.9, 270.8, 298.1, 322, 343.1, 362.1, 379.3, 394.9, 409.1, 422.1, 444.8, 463.8, 479.7, 492.8, 503.6, 512.3, 519.2, 524.5, 528.5, 531.2, 532.9, 533.7, 533.6, 532.9, 521.9, 503.9, 483.5, 462.8, 442.9, 424.2, 406.7, 390.6, 358.9, 330.8, 307.6, 288.9, 273.6, 259.9, 247.8, 236.9, 227.1, 218.2, 210.1, 202.7, 195.9, 189.7, 164.2, 145.5, 131.1, 119.6 }; 570 444 … … 572 446 573 447 name [63] = "G4_STILBENE"; 574 Znum [63] = 0;575 576 448 G4double e63[60] = { 179.2, 219.5, 253.4, 283.3, 310.4, 352.2, 389.8, 423.8, 454.7, 482.3, 507.2, 530.3, 577.9, 617.7, 652.1, 682.6, 709.7, 733.5, 754.4, 773, 806.1, 835.1, 859.5, 879.2, 894.2, 905.1, 912.7, 917.4, 919.6, 919.6, 917.7, 914.2, 909.3, 903.3, 861.4, 810.7, 759.2, 710.8, 667.1, 628.3, 593.9, 563.4, 511.8, 470.2, 435.9, 407.2, 382.8, 361.4, 342.9, 326.4, 311.6, 298.4, 286.4, 275.4, 265.3, 256.1, 219, 192.4, 172.1, 156.1 }; 577 449 … … 579 451 580 452 name [64] = "G4_Ti"; 581 Znum [64] = 22;582 583 453 G4double e64[60] = { 60.88, 74.56, 86.1, 96.26, 105.4, 121.8, 136.1, 149.1, 161.1, 172.2, 182.6, 192.5, 212.3, 229.6, 245.1, 259.1, 271.8, 283.5, 294.2, 304.1, 321.6, 336.5, 349.1, 359.8, 368.7, 376, 382, 386.7, 390.2, 392.7, 394.4, 395.2, 395.3, 394.8, 385.4, 369.3, 351, 332.6, 315.4, 299.6, 285.5, 272.8, 251.3, 233.9, 219.6, 207.6, 197.4, 188.7, 181, 174.1, 167.9, 162.2, 157, 152.2, 147.7, 143.5, 126, 112.5, 101.7, 93.07 }; 584 454 … … 586 456 587 457 name [65] = "G4_Sn"; 588 Znum [65] = 50;589 590 458 G4double e65[60] = { 32.4, 39.68, 45.82, 51.23, 56.12, 64.8, 72.45, 79.36, 85.72, 91.64, 97.2, 102.5, 113.1, 122.4, 130.8, 138.5, 145.5, 151.9, 157.9, 163.4, 173.4, 182, 189.5, 196, 201.6, 206.4, 210.4, 213.8, 216.5, 218.7, 220.4, 221.6, 222.4, 222.9, 220.7, 213.8, 204.9, 195.4, 186, 177.3, 169.4, 162.3, 150.1, 140.3, 132.2, 125.5, 119.7, 114.7, 110.1, 106.1, 102.5, 99.14, 96.12, 93.34, 90.77, 88.4, 78.69, 71.47, 65.7, 60.79 }; 591 459 … … 593 461 594 462 name [66] = "G4_TISSUE-METHANE"; 595 Znum [66] = 0;596 597 463 G4double e66[60] = { 174.5, 213.8, 246.8, 276, 302.3, 349.1, 390.3, 427.6, 461.8, 493.7, 523.6, 552, 607.8, 656.2, 699.1, 737.4, 771.9, 803, 831.1, 856.5, 900.2, 935.6, 963.8, 985.9, 1003, 1015, 1022, 1027, 1028, 1027, 1023, 1018, 1011, 1002, 947.8, 885.5, 824.9, 769.7, 720.9, 678.2, 641, 608.6, 553.2, 507.9, 470.5, 439.1, 412.4, 389, 368.6, 350.5, 334.4, 319.8, 306.6, 294.6, 283.6, 273.5, 233.2, 204.4, 182.5, 165.2 }; 598 464 … … 600 466 601 467 name [67] = "G4_TISSUE-PROPANE"; 602 Znum [67] = 0;603 604 468 G4double e67[60] = { 169.9, 208.1, 240.3, 268.6, 294.3, 339.8, 379.9, 416.2, 449.5, 480.6, 509.7, 537.3, 591.5, 638.4, 679.9, 716.9, 750.2, 780.2, 807.4, 832, 874.4, 909.1, 937.1, 959.3, 976.6, 989.5, 998.7, 1005, 1008, 1008, 1006, 1003, 998, 991.7, 946.9, 891.9, 836, 783.4, 735.7, 693.2, 655.4, 622, 563.5, 515.3, 475.8, 443.4, 416.2, 392.6, 371.9, 353.6, 337.3, 322.5, 309.3, 297.1, 286, 275.8, 235.1, 206, 183.9, 166.5 }; 605 469 … … 607 471 608 472 name [68] = "G4_TOLUENE"; 609 Znum [68] = 0;610 611 473 G4double e68[60] = { 191.6, 234.7, 271, 302.9, 331.9, 377.2, 417.8, 454.5, 488, 517.9, 545.1, 570.4, 621.9, 665, 702.2, 735.2, 764.3, 790, 812.4, 832.5, 867.7, 897.9, 923.2, 943.3, 958.3, 969, 976, 980, 981.4, 980.4, 977.5, 972.9, 966.9, 959.8, 912.2, 856.2, 800.1, 747.8, 700.6, 658.5, 621.4, 588.5, 535.1, 492.8, 457.8, 427.9, 401.8, 379.1, 359.4, 341.9, 326.3, 312.3, 299.6, 287.9, 277.3, 267.5, 228.5, 200.4, 179.1, 162.3 }; 612 474 … … 614 476 615 477 name [69] = "G4_U"; 616 Znum [69] = 92;617 618 478 G4double e69[60] = { 18.38, 22.51, 25.99, 29.06, 31.83, 36.75, 41.09, 45.01, 48.62, 51.98, 55.13, 58.11, 64.19, 69.57, 74.44, 78.9, 83.02, 86.84, 90.42, 93.78, 99.92, 105.4, 110.3, 114.8, 118.8, 122.4, 125.7, 128.6, 131.2, 133.5, 135.6, 137.4, 139, 140.4, 144.4, 144.8, 142.7, 139.1, 134.5, 129.6, 124.2, 118.8, 108.7, 100, 92.78, 86.72, 81.64, 77.35, 73.71, 70.6, 67.92, 65.59, 63.56, 61.77, 60.19, 58.78, 53.33, 49.08, 45.62, 42.73 }; 619 479 … … 621 481 622 482 name [70] = "G4_W"; 623 Znum [70] = 74;624 625 483 G4double e70[60] = { 14.97, 18.34, 21.17, 23.67, 25.93, 29.94, 33.47, 36.67, 39.61, 42.34, 44.91, 47.34, 52.3, 56.7, 60.68, 64.33, 67.7, 70.84, 73.78, 76.55, 81.61, 86.15, 90.24, 93.95, 97.3, 100.3, 103.1, 105.6, 107.8, 109.9, 111.7, 113.3, 114.7, 116, 120, 121.2, 120.5, 118.5, 115.9, 112.9, 109.8, 106.7, 100.2, 94.14, 89.08, 85, 81.68, 78.78, 76.2, 73.88, 71.78, 69.86, 68.09, 66.45, 64.93, 63.5, 57.52, 52.9, 49.15, 46.04 }; 626 484 … … 628 486 629 487 name [71] = "G4_WATER"; 630 Znum [71] = 0;631 632 488 G4double e71[60] = { 133.7, 163.8, 189.1, 211.4, 231.6, 267.5, 299, 327.6, 353.8, 378.2, 401.2, 422.9, 466, 503.6, 537.2, 567.3, 594.6, 619.5, 642.1, 662.8, 698.9, 729, 753.8, 774, 790.1, 802.6, 811.9, 818.3, 822.3, 824.1, 823.9, 822.2, 819, 814.5, 780.1, 736, 695.9, 660.4, 628.6, 599.9, 573.7, 549.7, 507.5, 471.4, 440.1, 412.8, 388.8, 367.6, 348.9, 332.2, 317.2, 303.7, 291.4, 280.3, 270, 260.6, 222.8, 195.5, 174.8, 158.5 }; 633 489 … … 635 491 636 492 name [72] = "G4_WATER_VAPOR"; 637 Znum [72] = 0;638 639 493 G4double e72[60] = { 152.2, 186.5, 215.3, 240.7, 263.7, 304.5, 340.4, 372.9, 402.8, 430.6, 456.7, 481.4, 530.5, 573.2, 611.3, 645.4, 676.4, 704.4, 730, 753.3, 793.8, 827.4, 855, 877.2, 894.8, 908.2, 918.1, 924.7, 928.5, 929.9, 929.1, 926.5, 922.3, 916.9, 876.3, 825.9, 775.3, 728.5, 686.8, 650.1, 618, 589.9, 536.1, 489.2, 450.8, 420.2, 395.5, 373.8, 354.6, 337.5, 322.2, 308.3, 295.8, 284.4, 273.9, 264.3, 225.7, 198, 176.9, 160.4 }; 640 494 … … 642 496 643 497 name [73] = "G4_Xe"; 644 Znum [73] = 54;645 646 498 G4double e73[60] = { 38.1, 46.67, 53.88, 60.24, 65.99, 76.2, 85.2, 93.33, 100.8, 107.8, 114.3, 120.5, 132.8, 143.6, 153.2, 161.8, 169.6, 176.7, 183.2, 189.1, 199.4, 208, 215, 220.7, 225.2, 228.7, 231.2, 232.9, 233.9, 234.3, 234.1, 233.5, 232.5, 231.1, 221.3, 209.3, 197.4, 186.5, 177, 168.6, 161.3, 155, 144.4, 135.9, 128.8, 122.8, 117.5, 112.7, 108.4, 104.5, 101, 97.75, 94.8, 92.09, 89.6, 87.29, 77.8, 70.52, 64.84, 60.13 }; 647 499 -
trunk/source/processes/electromagnetic/standard/src/G4PhotoElectricEffect.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PhotoElectricEffect.cc,v 1. 37 2006/09/14 10:27:19 maireExp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4PhotoElectricEffect.cc,v 1.42 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 80 80 G4ProcessType type):G4VEmProcess (processName, type), 81 81 isInitialised(false) 82 {} 82 { 83 SetProcessSubType(fPhotoElectricEffect); 84 } 83 85 84 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 86 88 G4PhotoElectricEffect::~G4PhotoElectricEffect() 87 89 {} 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 93 G4bool G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p) 94 { 95 return (&p == G4Gamma::Gamma()); 96 } 88 97 89 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 95 104 SetBuildTableFlag(false); 96 105 SetSecondaryParticle(G4Electron::Electron()); 97 if(!Model()) SetModel(new G4PEEffectModel );106 if(!Model()) SetModel(new G4PEEffectModel()); 98 107 Model()->SetLowEnergyLimit(MinKinEnergy()); 99 108 Model()->SetHighEnergyLimit(MaxKinEnergy()); … … 105 114 106 115 void G4PhotoElectricEffect::PrintInfo() 107 { 108 G4cout 109 << " Total cross sections from Sandia parametrisation. " 110 << "\n Sampling according " << Model()->GetName() << " model" 111 << G4endl; 112 } 116 {} 113 117 114 118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4PolarizedComptonScattering.cc
r819 r961 25 25 // 26 26 // 27 // $Id: G4PolarizedComptonScattering.cc,v 1.1 6 2006/06/29 19:53:30 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4PolarizedComptonScattering.cc,v 1.18 2008/10/15 17:53:44 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // … … 50 50 using namespace std; 51 51 52 G4PolarizedComptonScattering::G4PolarizedComptonScattering( 53 const G4String& processName) 54 : G4ComptonScattering52 (processName) 52 G4PolarizedComptonScattering::G4PolarizedComptonScattering(const G4String& pname) 53 : G4ComptonScattering52 (pname) 55 54 { } 56 55 -
trunk/source/processes/electromagnetic/standard/src/G4UniversalFluctuation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UniversalFluctuation.cc,v 1.1 5 2007/07/13 11:01:50vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4UniversalFluctuation.cc,v 1.17 2009/02/19 11:26:01 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 107 107 108 108 G4double G4UniversalFluctuation::SampleFluctuations(const G4Material* material, 109 110 111 112 109 const G4DynamicParticle* dp, 110 G4double& tmax, 111 G4double& length, 112 G4double& meanLoss) 113 113 { 114 114 // Calculate actual loss from the mean loss. … … 305 305 } 306 306 307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 308 309 void 310 G4UniversalFluctuation::SetParticleAndCharge(const G4ParticleDefinition* part, 311 G4double q2) 312 { 313 if(part != particle) { 314 particle = part; 315 particleMass = part->GetPDGMass(); 316 } 317 chargeSquare = q2; 318 } 319 320 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel.cc,v 1. 77.2.2 2008/04/25 00:34:55vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4UrbanMscModel.cc,v 1.86 2008/10/29 14:15:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 178 178 using namespace std; 179 179 180 G4UrbanMscModel::G4UrbanMscModel(G4double m_facrange, G4double m_dtrl, 181 G4double m_lambdalimit, 182 G4double m_facgeom,G4double m_skin, 183 G4bool m_samplez, G4MscStepLimitType m_stepAlg, 184 const G4String& nam) 185 : G4VEmModel(nam), 186 dtrl(m_dtrl), 187 lambdalimit(m_lambdalimit), 188 facrange(m_facrange), 189 facgeom(m_facgeom), 190 skin(m_skin), 191 steppingAlgorithm(m_stepAlg), 192 samplez(m_samplez), 180 G4UrbanMscModel::G4UrbanMscModel(const G4String& nam) 181 : G4VMscModel(nam), 193 182 isInitialized(false) 194 183 { … … 202 191 tlimitminfix = 1.e-6*mm; 203 192 stepmin = tlimitminfix; 204 skindepth = skin*stepmin;205 193 smallstep = 1.e10; 206 194 currentRange = 0. ; … … 213 201 geommin = 1.e-3*mm; 214 202 geomlimit = geombig; 215 facsafety = 0.25;216 203 presafety = 0.*mm; 217 204 Zeff = 1.; … … 396 383 G4double eKineticEnergy = KineticEnergy; 397 384 398 if((particle->GetParticleName() != "e-") && 399 (particle->GetParticleName() != "e+") ) 385 if(mass > electron_mass_c2) 400 386 { 401 402 403 404 405 387 G4double TAU = KineticEnergy/mass ; 388 G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ; 389 G4double w = c-2. ; 390 G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ; 391 eKineticEnergy = electron_mass_c2*tau ; 406 392 } 407 393 … … 504 490 { 505 491 tPathLength = currentMinimalStep; 506 G4int stepNumber = track.GetCurrentStepNumber();507 492 const G4DynamicParticle* dp = track.GetDynamicParticle(); 508 509 if(stepNumber == 1) { 493 G4StepPoint* sp = track.GetStep()->GetPreStepPoint(); 494 G4StepStatus stepStatus = sp->GetStepStatus(); 495 496 if(stepStatus == fUndefined) { 510 497 inside = false; 511 498 insideskin = false; … … 527 514 if(tPathLength > currentRange) tPathLength = currentRange; 528 515 529 G4StepPoint* sp = track.GetStep()->GetPreStepPoint();530 516 presafety = sp->GetSafety(); 531 517 … … 541 527 } 542 528 543 G4StepStatus stepStatus = sp->GetStepStatus();544 545 529 // standard version 546 530 // … … 560 544 insideskin = false; 561 545 562 if((stepStatus == fGeomBoundary) || (step Number == 1))546 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 563 547 { 564 if(step Number == 1) smallstep = 1.e10;548 if(stepStatus == fUndefined) smallstep = 1.e10; 565 549 else smallstep = 1.; 566 550 … … 660 644 } 661 645 662 if((stepStatus == fGeomBoundary) || (step Number == 1))646 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 663 647 { 664 648 // facrange scaling in lambda … … 870 854 { 871 855 G4double kineticEnergy = dynParticle->GetKineticEnergy(); 872 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return; 856 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix) || 857 (tPathLength/tausmall < lambda0) ) return; 873 858 874 859 G4double cth = SampleCosineTheta(tPathLength,kineticEnergy); 875 860 // protection against 'bad' cth values 876 if( cth > 1.) cth = 1.;877 if(cth < -1.) cth = -1.; 861 if(abs(cth) > 1.) return; 862 878 863 G4double sth = sqrt((1.0 - cth)*(1.0 + cth)); 879 864 G4double phi = twopi*G4UniformRand(); -
trunk/source/processes/electromagnetic/standard/src/G4UrbanMscModel90.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4UrbanMscModel90.cc,v 1.1 .2.2 2008/04/25 00:34:55vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4UrbanMscModel90.cc,v 1.10 2008/10/29 14:15:30 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 69 69 using namespace std; 70 70 71 G4UrbanMscModel90::G4UrbanMscModel90(G4double m_facrange, G4double m_dtrl, 72 G4double m_lambdalimit, 73 G4double m_facgeom,G4double m_skin, 74 G4bool m_samplez, G4MscStepLimitType m_stepAlg, 75 const G4String& nam) 76 : G4VEmModel(nam), 77 dtrl(m_dtrl), 78 lambdalimit(m_lambdalimit), 79 facrange(m_facrange), 80 facgeom(m_facgeom), 81 skin(m_skin), 82 steppingAlgorithm(m_stepAlg), 83 samplez(m_samplez), 71 G4UrbanMscModel90::G4UrbanMscModel90(const G4String& nam) 72 : G4VMscModel(nam), 84 73 isInitialized(false) 85 74 { … … 90 79 tlimitminfix = 1.e-6*mm; 91 80 stepmin = tlimitminfix; 92 skindepth = skin*stepmin;93 81 smallstep = 1.e10; 94 82 currentRange = 0. ; … … 101 89 geommin = 1.e-3*mm; 102 90 geomlimit = geombig; 103 facsafety = 0.25;104 91 presafety = 0.*mm; 105 92 Zeff = 1.; … … 126 113 SetParticle(p); 127 114 128 if (pParticleChange) 115 if (pParticleChange) { 129 116 fParticleChange = reinterpret_cast<G4ParticleChangeForMSC*>(pParticleChange); 130 else117 } else { 131 118 fParticleChange = new G4ParticleChangeForMSC(); 132 119 } 133 120 safetyHelper = G4TransportationManager::GetTransportationManager() 134 121 ->GetSafetyHelper(); … … 283 270 G4double eKineticEnergy = KineticEnergy; 284 271 285 if((particle->GetParticleName() != "e-") && 286 (particle->GetParticleName() != "e+") ) 272 if(mass > electron_mass_c2) 287 273 { 288 289 290 291 292 274 G4double TAU = KineticEnergy/mass ; 275 G4double c = mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ; 276 G4double w = c-2. ; 277 G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ; 278 eKineticEnergy = electron_mass_c2*tau ; 293 279 } 294 280 … … 391 377 { 392 378 tPathLength = currentMinimalStep; 393 G4int stepNumber = track.GetCurrentStepNumber();394 379 const G4DynamicParticle* dp = track.GetDynamicParticle(); 395 396 if(stepNumber == 1) { 380 G4StepPoint* sp = track.GetStep()->GetPreStepPoint(); 381 G4StepStatus stepStatus = sp->GetStepStatus(); 382 383 if(stepStatus == fUndefined) { 397 384 inside = false; 398 385 insideskin = false; … … 414 401 if(tPathLength > currentRange) tPathLength = currentRange; 415 402 416 G4StepPoint* sp = track.GetStep()->GetPreStepPoint();417 403 presafety = sp->GetSafety(); 418 419 //G4cout << "G4UrbanMscModel90::ComputeTruePathLengthLimit tPathLength= "420 //<<tPathLength<<" safety= " << presafety421 //<< " range= " <<currentRange<<G4endl;422 404 /* 405 G4cout << "G4UrbanMscModel90::ComputeTruePathLengthLimit tPathLength= " 406 <<tPathLength<<" safety= " << presafety 407 << " range= " <<currentRange<<G4endl; 408 */ 423 409 // far from geometry boundary 424 410 if(currentRange < presafety) … … 427 413 return tPathLength; 428 414 } 429 430 G4StepStatus stepStatus = sp->GetStepStatus();431 415 432 416 // standard version … … 447 431 insideskin = false; 448 432 449 if((stepStatus == fGeomBoundary) || (step Number == 1))433 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 450 434 { 451 435 452 if(step Number == 1) smallstep = 1.e10;436 if(stepStatus == fUndefined) smallstep = 1.e10; 453 437 else smallstep = 1.; 454 438 … … 547 531 } 548 532 549 if((stepStatus == fGeomBoundary) || (step Number == 1))533 if((stepStatus == fGeomBoundary) || (stepStatus == fUndefined)) 550 534 { 551 535 // facrange scaling in lambda … … 584 568 // G4cout << "tPathLength= " << tPathLength << " geomlimit= " << geomlimit 585 569 // << " currentMinimalStep= " << currentMinimalStep << G4endl; 586 587 570 return tPathLength ; 588 571 } … … 755 738 void G4UrbanMscModel90::SampleScattering(const G4DynamicParticle* dynParticle, 756 739 G4double safety) 757 758 759 760 740 { 761 741 G4double kineticEnergy = dynParticle->GetKineticEnergy(); 762 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix)) return; 742 if((kineticEnergy <= 0.0) || (tPathLength <= tlimitminfix) || 743 (tPathLength/tausmall < lambda0) ) return; 763 744 764 745 G4double cth = SampleCosineTheta(tPathLength,kineticEnergy); 765 746 // protection against 'bad' cth values 766 if(cth > 1.) cth = 1.; 767 if(cth < -1.) cth = -1.; 747 if(std::abs(cth) > 1.) return; 768 748 769 749 G4double sth = sqrt((1.0 - cth)*(1.0 + cth)); -
trunk/source/processes/electromagnetic/standard/src/G4WaterStopping.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4WaterStopping.cc,v 1. 2 2006/06/29 19:53:40gunter Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4WaterStopping.cc,v 1.11 2008/12/18 13:01:38 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 29 29 //--------------------------------------------------------------------------- … … 48 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 49 49 50 G4WaterStopping::G4WaterStopping(G4EmCorrections* corr )50 G4WaterStopping::G4WaterStopping(G4EmCorrections* corr, G4bool splineFlag) 51 51 { 52 spline = splineFlag; 52 53 Initialise(corr); 53 54 } … … 56 57 57 58 G4WaterStopping::~G4WaterStopping() 58 { 59 int n = dedx.size(); 60 for(int i=0; i<n; i++) {delete dedx[i];} 61 } 59 {} 62 60 63 61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 66 64 { 67 65 G4double res = 0.0; 66 if(iz < 3 || iz > 18) return res; 68 67 G4bool b; 69 G4int idx = 0; 70 for(; idx<8; idx++) { 71 if(iz == Z[idx]) { 72 res = (dedx[idx])->GetValue(energy, b); 73 break; 74 } 68 G4int idx = iz - 3; 69 G4double scaledEnergy = energy/A[idx]; 70 G4double emin = 0.025*MeV; 71 if(scaledEnergy < emin) { 72 res = (dedx[idx])->GetValue(emin, b)*std::sqrt(scaledEnergy/emin); 73 } else { 74 res = (dedx[idx])->GetValue(scaledEnergy, b); 75 75 } 76 76 return res; 77 } 77 } 78 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 80 81 void G4WaterStopping::AddData(G4double* energy, G4double* stoppower, 82 G4double factor) 83 { 84 G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,energy[0],energy[52]); 85 pv->SetSpline(spline); 86 dedx.push_back(pv); 87 for(G4int i=0;i<53;i++) { 88 pv->PutValues(i,energy[i],stoppower[i]*factor); 89 } 90 } 91 92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 93 79 94 void G4WaterStopping::Initialise(G4EmCorrections* corr) … … 81 96 G4int i; 82 97 //..List of ions 83 G4int zz[ 8] = {3, 4, 5, 6, 7, 8, 9, 10};84 G4int aa[ 8] = {7, 9, 11, 12, 14, 16, 19, 20};85 86 for(i=0; i< 8; i++) {98 G4int zz[16] = {3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18}; 99 G4int aa[16] = {7, 9, 11, 12, 14, 16, 19, 20, 23, 24, 27, 28,31,32, 35,40}; 100 // G4double A_Ion[16] = {6.941,9.0122,10.811,12.011,14.007,15.999,18.998,20.180,22.990,24.305,26.982,28.086,30.974,32.065,35.453,39.948}; 101 for(i=0; i<16; i++) { 87 102 Z[i] = zz[i]; 88 A[i] = aa[i];103 A[i] = G4double(aa[i]); 89 104 } 90 105 //..Reduced energies 91 G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250 92 ,300,400,500,600,700,800,900,1000}; 106 G4double E[53] = {0.025,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.15,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2,2.5,3,4,5,6,7,8,9,10,15,20,25,30,40,50,60,70,80,90,100,150,200,250,300,400,500,600,700,800,900,1000}; 93 107 for(i=0; i<53; i++) {E[i] *= MeV;} 94 108 95 //..Li 96 G4double Li[53] = {2.626,2.84,3.191,3.461,3.665,3.817,3.927,4.004,4.056,4.102,3.998,3.853,3.702,3.413,3.158,2.934,2.739,2.567,2.415,2.28,1.782,1.465,1.247,1.087,0.8706,0.7299,0.631,0.5575,0.5005,0.455,0.4178,0.3004,0.2376,0.1981,0.1708,0.1354,0.1132,0.09803,0.08692,0.07842,0.07171,0.06627,0.0495,0.04085,0.03557,0.03203,0.0276,0.02498,0.02327,0.0221,0.02126,0.02064,0.02016}; 97 G4LPhysicsFreeVector* pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 98 dedx.push_back(pv); 99 for(i=0; i<53; i++) { pv->PutValues(i,E[i],Li[i]*1000.*MeV/cm); } 109 G4double factor = 1000.*MeV/cm; 100 110 101 //..Be 102 G4double Be[53] = {3.272,3.565,4.061,4.463,4.79,5.052,5.258,5.419,5.542,5.803,5.787,5.675,5.529,5.215,4.912,4.634,4.381,4.152,3.944,3.756,3.026,2.533,2.179,1.913,1.542,1.296,1.122,0.9911,0.8898,0.8087,0.7423,0.5335,0.4219,0.3518,0.3034,0.2406,0.2013,0.1743,0.1545,0.1394,0.1275,0.1178,0.08805,0.07266,0.06328,0.05698,0.0491,0.04444,0.04141,0.03933,0.03783,0.03672,0.03588}; 103 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 104 dedx.push_back(pv); 105 for(i=0; i<53; i++) { pv->PutValues(i,E[i],Be[i]*1000.*MeV/cm); } 111 G4double G4_WATER_Li [53]={2.626, 2.84, 3.191, 3.461, 3.665, 3.817, 3.927, 4.004, 4.056, 4.102, 3.998, 3.853, 3.702, 3.413, 3.158, 2.934, 2.739, 2.567, 2.415, 2.28, 1.782, 1.465, 1.247, 1.087, 0.8706, 0.7299, 0.631, 0.5575, 0.5005, 0.455, 0.4178, 0.3004, 0.2376, 0.1981, 0.1708, 0.1354, 0.1132, 0.09803, 0.08692, 0.07842, 0.07171, 0.06627, 0.0495, 0.04085, 0.03557, 0.03203, 0.0276, 0.02498, 0.02327, 0.0221, 0.02126, 0.02064, 0.02016, }; 112 AddData(E,G4_WATER_Li,factor); 106 113 107 //..B 108 G4double B[53] = {3.773,4.142,4.776,5.304,5.749,6.122,6.431,6.684,6.89,7.432,7.551,7.505,7.391,7.091,6.772,6.463,6.172,5.901,5.65,5.418,4.484,3.817,3.322,2.94,2.392,2.02,1.752,1.549,1.391,1.265,1.161,0.8332,0.6587,0.5492,0.4737,0.3757,0.3144,0.2723,0.2415,0.2179,0.1993,0.1842,0.1376,0.1136,0.09894,0.08909,0.07678,0.0695,0.06477,0.06151,0.05916,0.05743,0.05611}; 109 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 110 dedx.push_back(pv); 111 for(i=0; i<53; i++) { pv->PutValues(i,E[i],B[i]*1000.*MeV/cm); } 114 G4double G4_WATER_Be [53]={3.272, 3.565, 4.061, 4.463, 4.79, 5.052, 5.258, 5.419, 5.542, 5.803, 5.787, 5.675, 5.529, 5.215, 4.912, 4.634, 4.381, 4.152, 3.944, 3.756, 3.026, 2.533, 2.179, 1.913, 1.542, 1.296, 1.122, 0.9911, 0.8898, 0.8087, 0.7423, 0.5335, 0.4219, 0.3518, 0.3034, 0.2406, 0.2013, 0.1743, 0.1545, 0.1394, 0.1275, 0.1178, 0.08805, 0.07266, 0.06328, 0.05698, 0.0491, 0.04444, 0.04141, 0.03933, 0.03783, 0.03672, 0.03588, }; 115 AddData(E,G4_WATER_Be,factor); 112 116 113 //..C 114 G4double C[53] = {4.154,4.593,5.358,6.009,6.568,7.049,7.46,7.809,8.103,8.968,9.262,9.311,9.25,8.994,8.68,8.358,8.045,7.747,7.465,7.199,6.093,5.269,4.636,4.137,3.403,2.891,2.516,2.23,2.004,1.823,1.673,1.2,0.9483,0.7904,0.6817,0.5406,0.4525,0.392,0.3477,0.3138,0.287,0.2653,0.1983,0.1637,0.1426,0.1284,0.1107,0.1002,0.09335,0.08865,0.08528,0.08278,0.08088}; 115 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 116 dedx.push_back(pv); 117 for(i=0; i<53; i++) { pv->PutValues(i,E[i],C[i]*1000.*MeV/cm); } 117 G4double G4_WATER_B [53]={3.773, 4.142, 4.776, 5.304, 5.749, 6.122, 6.431, 6.684, 6.89, 7.432, 7.551, 7.505, 7.391, 7.091, 6.772, 6.463, 6.172, 5.901, 5.65, 5.418, 4.484, 3.817, 3.322, 2.94, 2.392, 2.02, 1.752, 1.549, 1.391, 1.265, 1.161, 0.8332, 0.6587, 0.5492, 0.4737, 0.3757, 0.3144, 0.2723, 0.2415, 0.2179, 0.1993, 0.1842, 0.1376, 0.1136, 0.09894, 0.08909, 0.07678, 0.0695, 0.06477, 0.06151, 0.05916, 0.05743, 0.05611, }; 118 AddData(E,G4_WATER_B,factor); 118 119 119 //..N 120 G4double N[53] = {4.49,4.984,5.86,6.616,7.276,7.854,8.36,8.799,9.179,10.39,10.89,11.07,11.08,10.9,10.61,10.3,9.974,9.66,9.357,9.068,7.823,6.859,6.097,5.484,4.56,3.9,3.408,3.029,2.727,2.482,2.28,1.636,1.291,1.076,0.9274,0.7354,0.6156,0.5333,0.4731,0.427,0.3906,0.3611,0.27,0.2229,0.1942,0.1749,0.1507,0.1365,0.1272,0.1208,0.1162,0.1128,0.1102}; 121 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 122 dedx.push_back(pv); 123 for(i=0; i<53; i++) { pv->PutValues(i,E[i],N[i]*1000.*MeV/cm); } 120 G4double G4_WATER_C [53]={4.154, 4.593, 5.358, 6.009, 6.568, 7.049, 7.46, 7.809, 8.103, 8.968, 9.262, 9.311, 9.25, 8.994, 8.68, 8.358, 8.045, 7.747, 7.465, 7.199, 6.093, 5.269, 4.636, 4.137, 3.403, 2.891, 2.516, 2.23, 2.004, 1.823, 1.673, 1.2, 0.9483, 0.7904, 0.6817, 0.5406, 0.4525, 0.392, 0.3477, 0.3138, 0.287, 0.2653, 0.1983, 0.1637, 0.1426, 0.1284, 0.1107, 0.1002, 0.09335, 0.08865, 0.08528, 0.08278, 0.08088, }; 121 AddData(E,G4_WATER_C,factor); 124 122 125 //..O 126 G4double O[53] = {4.778,5.321,6.298,7.152,7.907,8.578,9.173,9.7,10.16,11.73,12.46,12.78,12.89,12.81,12.57,12.27,11.95,11.63,11.32,11.01,9.659,8.571,7.691,6.967,5.854,5.042,4.427,3.945,3.56,3.245,2.983,2.142,1.689,1.406,1.212,0.9602,0.8037,0.6963,0.6178,0.5577,0.5102,0.4716,0.3527,0.2913,0.2538,0.2285,0.197,0.1784,0.1663,0.1579,0.1519,0.1475,0.1441}; 127 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 128 dedx.push_back(pv); 129 for(i=0; i<53; i++) { pv->PutValues(i,E[i],O[i]*1000.*MeV/cm); } 123 G4double G4_WATER_N [53]={4.49, 4.984, 5.86, 6.616, 7.276, 7.854, 8.36, 8.799, 9.179, 10.39, 10.89, 11.07, 11.08, 10.9, 10.61, 10.3, 9.974, 9.66, 9.357, 9.068, 7.823, 6.859, 6.097, 5.484, 4.56, 3.9, 3.408, 3.029, 2.727, 2.482, 2.28, 1.636, 1.291, 1.076, 0.9274, 0.7354, 0.6156, 0.5333, 0.4731, 0.427, 0.3906, 0.3611, 0.27, 0.2229, 0.1942, 0.1749, 0.1507, 0.1365, 0.1272, 0.1208, 0.1162, 0.1128, 0.1102, }; 124 AddData(E,G4_WATER_N,factor); 130 125 131 //..F 132 G4double F[53] = {4.992, 5.575, 6.637, 7.578, 8.418, 9.171, 9.847, 10.45, 11, 12.9, 13.88, 14.35, 14.56, 14.59, 14.4, 14.13, 13.83, 13.51, 13.19, 12.87, 11.44, 10.26, 9.279, 8.463, 7.187, 6.237, 5.506, 4.928, 4.461, 4.076, 3.753, 2.707, 2.137, 1.779, 1.533, 1.215, 1.017, 0.8809, 0.7816, 0.7056, 0.6456, 0.5969, 0.4466, 0.3688, 0.3213, 0.2894, 0.2496, 0.2259, 133 0.2106, 0.2, 0.1924, 0.1868, 0.1825}; 134 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 135 dedx.push_back(pv); 136 for(i=0; i<53; i++) { pv->PutValues(i,E[i],F[i]*1000.*MeV/cm); } 126 G4double G4_WATER_O [53]={4.778, 5.321, 6.298, 7.152, 7.907, 8.578, 9.173, 9.7, 10.16, 11.73, 12.46, 12.78, 12.89, 12.81, 12.57, 12.27, 11.95, 11.63, 11.32, 11.01, 9.659, 8.571, 7.691, 6.967, 5.854, 5.042, 4.427, 3.945, 3.56, 3.245, 2.983, 2.142, 1.689, 1.406, 1.212, 0.9602, 0.8037, 0.6963, 0.6178, 0.5577, 0.5102, 0.4716, 0.3527, 0.2913, 0.2538, 0.2285, 0.197, 0.1784, 0.1663, 0.1579, 0.1519, 0.1475, 0.1441, }; 127 AddData(E,G4_WATER_O,factor); 137 128 138 //..Ne 139 G4double Ne[53] = {5.182, 5.797, 6.931, 7.948, 8.865, 9.693, 10.044, 11.12, 11.74, 13.98, 15.21, 15.85, 16.17, 16.33, 16.21, 15.98, 15.69, 15.38, 15.06, 14.74, 13.24, 11.98, 10.91, 10.01, 8.584, 7.503, 6.66, 5.986, 5.436, 4.979, 4.595, 3.332, 2.635, 2.195, 1.892, 1.499, 1.255, 1.087, 0.9646, 0.8709, 0.7969, 0.7368, 0.5514, 0.4555, 0.3969, 0.3576, 0.3083, 0.2792, 0.2602, 0.2472, 0.2378, 0.2308, 0.2255}; 140 pv = new G4LPhysicsFreeVector(53,E[0],E[52]); 141 dedx.push_back(pv); 142 for(i=0; i<53; i++) { pv->PutValues(i,E[i],Ne[i]*1000.*MeV/cm); } 129 G4double G4_WATER_F [53]={4.992, 5.575, 6.637, 7.578, 8.418, 9.171, 9.847, 10.45, 11, 12.9, 13.88, 14.35, 14.56, 14.59, 14.4, 14.13, 13.83, 13.51, 13.19, 12.87, 11.44, 10.26, 9.279, 8.463, 7.187, 6.237, 5.506, 4.928, 4.461, 4.076, 3.753, 2.707, 2.137, 1.779, 1.533, 1.215, 1.017, 0.8809, 0.7816, 0.7056, 0.6456, 0.5969, 0.4466, 0.3688, 0.3213, 0.2894, 0.2496, 0.2259, 0.2106, 0.2, 0.1924, 0.1868, 0.1825, }; 130 AddData(E,G4_WATER_F,factor); 131 132 G4double G4_WATER_Ne [53]={5.182, 5.797, 6.931, 7.948, 8.865, 9.693, 10.44, 11.12, 11.74, 13.98, 15.21, 15.85, 16.17, 16.33, 16.21, 15.98, 15.69, 15.38, 15.06, 14.74, 13.24, 11.98, 10.91, 10.01, 8.584, 7.503, 6.66, 5.986, 5.436, 4.979, 4.595, 3.332, 2.635, 2.195, 1.892, 1.499, 1.255, 1.087, 0.9646, 0.8709, 0.7969, 0.7368, 0.5514, 0.4555, 0.3969, 0.3576, 0.3083, 0.2792, 0.2602, 0.2472, 0.2378, 0.2308, 0.2255, }; 133 AddData(E,G4_WATER_Ne,factor); 134 135 G4double G4_WATER_Na [53]={5.352, 5.998, 7.203, 8.3, 9.298, 10.21, 11.04, 11.81, 12.5, 15.13, 16.68, 17.56, 18.04, 18.43, 18.44, 18.29, 18.05, 17.78, 17.48, 17.18, 15.67, 14.32, 13.15, 12.14, 10.5, 9.226, 8.218, 7.401, 6.728, 6.166, 5.69, 4.112, 3.237, 2.686, 2.307, 1.821, 1.521, 1.317, 1.168, 1.054, 0.9644, 0.8917, 0.6674, 0.5514, 0.4806, 0.4329, 0.3734, 0.3381, 0.3152, 0.2993, 0.288, 0.2796, 0.2732, }; 136 AddData(E,G4_WATER_Na,factor); 137 138 G4double G4_WATER_Mg [53]={5.542, 6.193, 7.42, 8.551, 9.59, 10.54, 11.42, 12.23, 12.98, 15.85, 17.62, 18.66, 19.26, 19.76, 19.83, 19.7, 19.47, 19.2, 18.89, 18.58, 17.02, 15.62, 14.41, 13.36, 11.64, 10.3, 9.233, 8.362, 7.64, 7.033, 6.516, 4.777, 3.792, 3.162, 2.725, 2.159, 1.806, 1.565, 1.388, 1.254, 1.147, 1.061, 0.7944, 0.6565, 0.5722, 0.5156, 0.4447, 0.4027, 0.3754, 0.3566, 0.343, 0.333, 0.3254, }; 139 AddData(E,G4_WATER_Mg,factor); 140 141 G4double G4_WATER_Al [53]={5.724, 6.39, 7.649, 8.82, 9.905, 10.91, 11.84, 12.71, 13.51, 16.66, 18.69, 19.93, 20.68, 21.38, 21.56, 21.5, 21.32, 21.07, 20.79, 20.48, 18.91, 17.47, 16.19, 15.08, 13.24, 11.78, 10.61, 9.641, 8.835, 8.153, 7.569, 5.583, 4.444, 3.71, 3.199, 2.534, 2.12, 1.836, 1.629, 1.471, 1.346, 1.245, 0.9325, 0.7707, 0.6719, 0.6054, 0.5223, 0.473, 0.441, 0.4189, 0.403, 0.3912, 0.3823, }; 142 AddData(E,G4_WATER_Al,factor); 143 144 G4double G4_WATER_Si [53]={5.905, 6.583, 7.868, 9.073, 10.2, 11.25, 12.23, 13.14, 13.99, 17.4, 19.66, 21.1, 22.01, 22.91, 23.21, 23.22, 23.09, 22.87, 22.61, 22.32, 20.76, 19.28, 17.95, 16.78, 14.83, 13.26, 11.99, 10.94, 10.06, 9.304, 8.656, 6.43, 5.135, 4.294, 3.705, 2.938, 2.458, 2.129, 1.889, 1.706, 1.561, 1.444, 1.082, 0.8942, 0.7796, 0.7026, 0.6061, 0.549, 0.5119, 0.4862, 0.4678, 0.4542, 0.4438, }; 145 AddData(E,G4_WATER_Si,factor); 146 147 G4double G4_WATER_P [53]={6.12, 6.81, 8.118, 9.352, 10.51, 11.61, 12.63, 13.58, 14.48, 18.13, 20.63, 22.28, 23.34, 24.47, 24.91, 25.02, 24.95, 24.78, 24.55, 24.28, 22.76, 21.26, 19.89, 18.67, 16.59, 14.92, 13.54, 12.39, 11.42, 10.59, 9.867, 7.367, 5.896, 4.935, 4.259, 3.376, 2.824, 2.445, 2.169, 1.959, 1.792, 1.657, 1.242, 1.027, 0.8954, 0.807, 0.6963, 0.6308, 0.5881, 0.5587, 0.5375, 0.5219, 0.51, }; 148 AddData(E,G4_WATER_P,factor); 149 150 G4double G4_WATER_S [53]={6.294, 7, 8.338, 9.604, 10.8, 11.94, 13, 14, 14.94, 18.82, 21.55, 23.41, 24.65, 26.01, 26.6, 26.81, 26.81, 26.69, 26.5, 26.26, 24.79, 23.28, 21.88, 20.61, 18.43, 16.64, 15.16, 13.92, 12.86, 11.95, 11.15, 8.371, 6.715, 5.624, 4.856, 3.847, 3.217, 2.785, 2.47, 2.229, 2.04, 1.886, 1.413, 1.169, 1.019, 0.9187, 0.7929, 0.7183, 0.6697, 0.6362, 0.6122, 0.5944, 0.5808, }; 151 AddData(E,G4_WATER_S,factor); 152 153 G4double G4_WATER_Cl [53]={6.522, 7.237, 8.59, 9.875, 11.1, 12.26, 13.36, 14.39, 15.37, 19.45, 22.4, 24.45, 25.86, 27.46, 28.19, 28.5, 28.57, 28.5, 28.34, 28.13, 26.72, 25.21, 23.78, 22.47, 20.2, 18.32, 16.75, 15.42, 14.28, 13.3, 12.44, 9.392, 7.557, 6.34, 5.479, 4.344, 3.633, 3.145, 2.789, 2.517, 2.303, 2.13, 1.596, 1.32, 1.151, 1.038, 0.8957, 0.8115, 0.7567, 0.7189, 0.6917, 0.6717, 0.6563, }; 154 AddData(E,G4_WATER_Cl,factor); 155 156 G4double G4_WATER_Ar [53]={6.642, 7.369, 8.739, 10.04, 11.28, 12.47, 13.59, 14.66, 15.66, 19.93, 23.08, 25.32, 26.89, 28.72, 29.6, 30.01, 30.15, 30.13, 30, 29.82, 28.46, 26.94, 25.49, 24.15, 21.81, 19.86, 18.22, 16.82, 15.61, 14.57, 13.65, 10.39, 8.394, 7.063, 6.114, 4.859, 4.067, 3.522, 3.125, 2.821, 2.581, 2.387, 1.789, 1.48, 1.291, 1.164, 1.005, 0.9105, 0.8491, 0.8067, 0.7763, 0.7537, 0.7365, }; 157 AddData(E,G4_WATER_Ar,factor); 143 158 144 159 if(corr) { 145 for(i=0; i< 8; i++) {corr->AddStoppingData(Z[i], A[i], "G4_WATER", *(dedx[i]));}160 for(i=0; i<16; i++) {corr->AddStoppingData(Z[i], aa[i], "G4_WATER", dedx[i]);} 146 161 } 147 162 } -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlung.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlung.cc,v 1. 48 2007/05/23 08:47:34vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4eBremsstrahlung.cc,v 1.56 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 69 69 // 22-05-06 Use gammaThreshold from manager (V.Ivantchenko) 70 70 // 15-01-07 use SetEmModel() from G4VEnergyLossProcess (mma) 71 // 71 // use RelEmModel above 1GeV (AS & VI) 72 // 13-11-08 reenable LPM switch (A.Schaelicke) 72 73 // ------------------------------------------------------------------- 73 74 // … … 78 79 #include "G4Gamma.hh" 79 80 #include "G4eBremsstrahlungModel.hh" 80 #include "G4 UniversalFluctuation.hh"81 #include "G4eBremsstrahlungRelModel.hh" 81 82 #include "G4UnitsTable.hh" 82 83 #include "G4LossTableManager.hh" … … 92 93 G4VEnergyLossProcess(name), 93 94 isInitialised(false) 94 {} 95 { 96 SetProcessSubType(fBremsstrahlung); 97 } 95 98 96 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 98 101 G4eBremsstrahlung::~G4eBremsstrahlung() 99 102 {} 103 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 105 106 G4bool G4eBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) 107 { 108 return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); 109 } 100 110 101 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 109 119 SetSecondaryParticle(G4Gamma::Gamma()); 110 120 SetIonisation(false); 111 if (!EmModel()) SetEmModel(new G4eBremsstrahlungModel()); 112 EmModel()->SetLowEnergyLimit (100*eV); 113 EmModel()->SetHighEnergyLimit(100*TeV); 114 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation()); 121 122 if (!EmModel(1)) SetEmModel(new G4eBremsstrahlungModel(), 1); 123 if (!EmModel(2)) SetEmModel(new G4eBremsstrahlungRelModel(), 2); 124 125 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 126 EmModel(1)->SetHighEnergyLimit(EmModel(2)->LowEnergyLimit()); 127 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); 115 128 116 AddEmModel(1, EmModel(), FluctModel()); 129 G4VEmFluctuationModel* fm = 0; 130 AddEmModel(1, EmModel(1), fm); 131 AddEmModel(2, EmModel(2), fm); 117 132 isInitialised = true; 118 133 } 119 134 G4LossTableManager* man = G4LossTableManager::Instance(); 120 dynamic_cast<G4eBremsstrahlungModel*>(EmModel()) 121 ->SetEnergyThreshold(man->BremsstrahlungTh()); 122 dynamic_cast<G4eBremsstrahlungModel*>(EmModel()) 123 ->SetLPMflag(man->LPMFlag()); 135 G4double eth = man->BremsstrahlungTh(); 136 EmModel(1)->SetSecondaryThreshold(eth); 137 EmModel(2)->SetSecondaryThreshold(eth); 138 139 // Only high energy model LMP flag is ON/OFF 140 EmModel(1)->SetLPMFlag(false); 141 EmModel(2)->SetLPMFlag(man->LPMFlag()); 124 142 } 125 143 … … 128 146 void G4eBremsstrahlung::PrintInfo() 129 147 { 130 if(EmModel()) { 131 G4cout << " Total cross sections and sampling from " 132 << EmModel()->GetName() << " model" 133 << " (based on the EEDL data library) " 134 << "\n Good description from 1 KeV to 100 GeV, " 135 << "log scale extrapolation above 100 GeV." 136 << " LPM flag " 137 << dynamic_cast<G4eBremsstrahlungModel*>(EmModel())->LPMflag() 138 << G4endl; 139 G4double eth = dynamic_cast<G4eBremsstrahlungModel*>(EmModel())->EnergyThreshold(); 140 if(eth < DBL_MIN) 141 G4cout << " HighEnergyThreshold(GeV)= " << eth/GeV 142 << G4endl; 148 if(EmModel(1)) { 149 G4LossTableManager* man = G4LossTableManager::Instance(); 150 G4double eth = man->BremsstrahlungTh(); 151 G4cout << " LPM flag: " << man->LPMFlag() << " for E > " 152 << EmModel(1)->HighEnergyLimit()/GeV << " GeV"; 153 if(eth < DBL_MAX) G4cout << ", HighEnergyThreshold(GeV)= " << eth/GeV; 154 G4cout << G4endl; 143 155 } 144 156 } -
trunk/source/processes/electromagnetic/standard/src/G4eBremsstrahlungModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eBremsstrahlungModel.cc,v 1. 39 2007/05/23 08:47:35vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4eBremsstrahlungModel.cc,v 1.43 2008/11/13 19:28:58 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 54 54 // 27-03-06 Fix calculation of fl parameter at low energy (energy loss) (VI) 55 55 // 15-02-07 correct LPMconstant by a factor 2, thanks to G. Depaola (mma) 56 // 09-09-08 MigdalConstant increased in (2pi)^2 times (A.Schaelicke) 56 57 // 57 58 // Class Description: … … 85 86 isElectron(true), 86 87 probsup(1.0), 87 MigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length /pi),88 MigdalConstant(classic_electr_radius*electron_Compton_length*electron_Compton_length*4.0*pi), 88 89 LPMconstant(fine_structure_const*electron_mass_c2*electron_mass_c2/(4.*pi*hbarc)), 89 theLPMflag(true),90 90 isInitialised(false) 91 91 { … … 93 93 theGamma = G4Gamma::Gamma(); 94 94 minThreshold = 1.0*keV; 95 highKinEnergy= 100.*TeV;96 lowKinEnergy = 1.0*keV;97 highEnergyTh = DBL_MAX;98 95 } 99 96 … … 164 161 if(isInitialised) return; 165 162 166 if(pParticleChange) 163 if(pParticleChange) { 167 164 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 168 else165 } else { 169 166 fParticleChange = new G4ParticleChangeForLoss(); 170 167 } 171 168 isInitialised = true; 172 169 } … … 834 831 gammaEnergy = x*kineticEnergy; 835 832 836 if ( theLPMflag) {833 if (LPMFlag()) { 837 834 // take into account the supression due to the LPM effect 838 835 if (G4UniformRand() <= SupressionFunction(material,kineticEnergy, … … 879 876 880 877 // stop tracking and create new secondary instead of primary 881 if(gammaEnergy > highEnergyTh) {878 if(gammaEnergy > SecondaryThreshold()) { 882 879 fParticleChange->ProposeTrackStatus(fStopAndKill); 883 880 fParticleChange->SetProposedKineticEnergy(0.0); … … 951 948 G4double supr = 1.0; 952 949 953 if ( theLPMflag) {950 if (LPMFlag()) { 954 951 955 952 G4double s2lpm = LPMEnergy*gammaEnergy/totEnergySquare; -
trunk/source/processes/electromagnetic/standard/src/G4eCoulombScatteringModel.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eCoulombScatteringModel.cc,v 1. 40 2008/01/07 08:32:01vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4eCoulombScatteringModel.cc,v 1.59 2008/10/22 18:39:29 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 44 44 // 19.08.06 V.Ivanchenko add inline function ScreeningParameter 45 45 // 09.10.07 V.Ivanchenko reorganized methods, add cut dependence in scattering off e- 46 // 09.06.08 V.Ivanchenko add SelectIsotope and sampling of the recoil ion 46 47 // 47 48 // Class Description: … … 61 62 #include "G4Positron.hh" 62 63 #include "G4Proton.hh" 64 #include "G4ParticleTable.hh" 63 65 64 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 66 68 using namespace std; 67 69 68 G4eCoulombScatteringModel::G4eCoulombScatteringModel( 69 G4double thetaMin, G4double thetaMax, G4bool build, 70 G4double tlim, const G4String& nam) 70 G4eCoulombScatteringModel::G4eCoulombScatteringModel(const G4String& nam) 71 71 : G4VEmModel(nam), 72 cosThetaMin(cos(thetaMin)), 73 cosThetaMax(cos(thetaMax)), 74 q2Limit(tlim), 75 theCrossSectionTable(0), 76 lowKEnergy(keV), 77 highKEnergy(TeV), 72 cosThetaMin(1.0), 73 cosThetaMax(-1.0), 74 q2Limit(TeV*TeV), 78 75 alpha2(fine_structure_const*fine_structure_const), 79 76 faclim(100.0), 80 nbins(12),81 nmax(100),82 buildTable(build),83 77 isInitialised(false) 84 78 { 85 79 fNistManager = G4NistManager::Instance(); 80 theParticleTable = G4ParticleTable::GetParticleTable(); 86 81 theElectron = G4Electron::Electron(); 87 82 thePositron = G4Positron::Positron(); 88 83 theProton = G4Proton::Proton(); 84 currentMaterial = 0; 85 currentElement = 0; 89 86 a0 = alpha2*electron_mass_c2*electron_mass_c2/(0.885*0.885); 90 87 G4double p0 = electron_mass_c2*classic_electr_radius; 91 88 coeff = twopi*p0*p0; 92 89 constn = 6.937e-6/(MeV*MeV); 93 tkin = targetZ = targetA =mom2 = DBL_MIN;90 tkin = targetZ = mom2 = DBL_MIN; 94 91 elecXSection = nucXSection = 0.0; 92 recoilThreshold = DBL_MAX; 95 93 ecut = DBL_MAX; 96 94 particle = 0; 97 for(size_t j=0; j<100; j++) {index[j] = -1;} 95 currentCouple = 0; 96 for(size_t j=0; j<100; j++) { 97 FF[j] = 0.0; 98 } 98 99 } 99 100 … … 101 102 102 103 G4eCoulombScatteringModel::~G4eCoulombScatteringModel() 103 { 104 if(theCrossSectionTable) { 105 theCrossSectionTable->clearAndDestroy(); 106 delete theCrossSectionTable; 107 } 108 } 104 {} 109 105 110 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 111 107 112 108 void G4eCoulombScatteringModel::Initialise(const G4ParticleDefinition* p, 113 const G4DataVector&) 114 { 115 // G4cout << "!!! G4eCoulombScatteringModel::Initialise for " 116 // << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin 117 // << " cos(TetMax)= " << cosThetaMax <<G4endl; 109 const G4DataVector& cuts) 110 { 111 SetupParticle(p); 112 currentCouple = 0; 113 elecXSection = nucXSection = 0.0; 114 tkin = targetZ = mom2 = DBL_MIN; 115 ecut = etag = DBL_MAX; 116 cosThetaMin = cos(PolarAngleLimit()); 117 currentCuts = &cuts; 118 //G4cout << "!!! G4eCoulombScatteringModel::Initialise for " 119 // << p->GetParticleName() << " cos(TetMin)= " << cosThetaMin 120 // << " cos(TetMax)= " << cosThetaMax <<G4endl; 118 121 if(!isInitialised) { 119 122 isInitialised = true; … … 124 127 else 125 128 fParticleChange = new G4ParticleChangeForGamma(); 126 } else { 127 return; 128 } 129 130 if(p->GetParticleType() == "nucleus") buildTable = false; 131 if(!buildTable) return; 132 133 // Compute log cross section table per atom 134 if(!theCrossSectionTable) theCrossSectionTable = new G4PhysicsTable(); 135 136 nbins = 2*G4int(log10(highKEnergy/lowKEnergy)); 137 } 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 140 141 G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom( 142 const G4ParticleDefinition* p, 143 G4double kinEnergy, 144 G4double Z, G4double A, 145 G4double cutEnergy, G4double) 146 { 147 if(p == particle && kinEnergy == tkin && Z == targetZ && 148 A == targetA && cutEnergy == ecut) return nucXSection; 149 150 //G4cout << "### G4eCoulombScatteringModel::ComputeCrossSectionPerAtom for " 151 // << p->GetParticleName() << " Z= " << Z << " A= " << A 152 // << " e= " << kinEnergy << G4endl; 153 154 nucXSection = ComputeElectronXSectionPerAtom(p,kinEnergy,Z,A,cutEnergy); 155 156 // nuclear cross section 157 if(theCrossSectionTable) { 158 G4bool b; 159 G4int iz = G4int(Z); 160 G4int idx = index[iz]; 161 162 // compute table for given Z 163 if(-1 == idx) { 164 idx = theCrossSectionTable->size(); 165 index[iz] = idx; 166 G4PhysicsLogVector* ptrVector 167 = new G4PhysicsLogVector(lowKEnergy, highKEnergy, nbins); 168 // G4cout << "New vector Z= " << iz << " A= " << A << " idx= " << idx << G4endl; 169 G4double e, value; 170 for(G4int i=0; i<=nbins; i++) { 171 e = ptrVector->GetLowEdgeEnergy( i ) ; 172 value = CalculateCrossSectionPerAtom(p, e, Z, A); 173 ptrVector->PutValue( i, log(value) ); 174 } 175 theCrossSectionTable->push_back(ptrVector); 176 } 177 178 // take value from the table 179 nucXSection += 180 std::exp((((*theCrossSectionTable)[idx]))->GetValue(kinEnergy, b)); 181 182 // compute value from scratch 183 } else nucXSection += CalculateCrossSectionPerAtom(p, kinEnergy, Z, A); 184 185 // G4cout << " cross(bn)= " << nucXSection/barn << G4endl; 186 187 if(nucXSection < 0.0) nucXSection = 0.0; 188 return nucXSection; 189 } 190 191 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 192 193 G4double G4eCoulombScatteringModel::ComputeElectronXSectionPerAtom( 194 const G4ParticleDefinition* p, 195 G4double kinEnergy, 196 G4double Z, 197 G4double A, 198 G4double cutEnergy) 199 { 200 if(p == particle && kinEnergy == tkin && Z == targetZ && 201 cutEnergy == ecut) return elecXSection; 129 } 130 if(mass < GeV && particle->GetParticleType() != "nucleus") { 131 InitialiseElementSelectors(p,cuts); 132 } 133 } 134 135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 136 137 void G4eCoulombScatteringModel::ComputeMaxElectronScattering(G4double cutEnergy) 138 { 202 139 ecut = cutEnergy; 203 elecXSection = 0.0;204 SetupParticle(p);205 G4double ekin = std::max(keV, kinEnergy);206 //G4double ekin = kinEnergy;207 SetupTarget(Z, A, ekin);208 209 140 G4double tmax = tkin; 210 if(p == theElectron) tmax *= 0.5;211 else if(p != thePositron) {141 cosTetMaxElec = 1.0; 142 if(mass > MeV) { 212 143 G4double ratio = electron_mass_c2/mass; 213 144 G4double tau = tkin/mass; 214 145 tmax = 2.0*electron_mass_c2*tau*(tau + 2.)/ 215 146 (1.0 + 2.0*ratio*(tau + 1.0) + ratio*ratio); 216 } 217 218 cosTetMaxElec = cosTetMaxNuc; 219 G4double t = std::min(cutEnergy, tmax); 220 G4double mom21 = t*(t + 2.0*electron_mass_c2); 221 G4double t1 = tkin - t; 222 if(t1 > 0.0) { 223 G4double mom22 = t1*(t1 + 2.0*mass); 224 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22); 225 if(ctm > cosTetMaxElec && ctm <= 1.0) cosTetMaxElec = ctm; 226 } 227 228 if(cosTetMaxElec < cosThetaMin) { 229 G4double x1 = 1.0 - cosThetaMin + screenZ; 230 G4double x2 = 1.0 - cosTetMaxElec + screenZ; 231 elecXSection = coeff*Z*chargeSquare*invbeta2* 232 (cosThetaMin - cosTetMaxElec)/(x1*x2*mom2); 233 } 234 // G4cout << "cut= " << ecut << " e= " << tkin 235 // << " croosE(barn)= " << elecXSection/barn 236 // << " cosEl= " << cosTetMaxElec << " costmin= " << cosThetaMin << G4endl; 237 return elecXSection; 238 } 239 240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 241 242 G4double G4eCoulombScatteringModel::CalculateCrossSectionPerAtom( 243 const G4ParticleDefinition* p, 244 G4double kinEnergy, 245 G4double Z, G4double A) 246 { 247 G4double cross = 0.0; 147 cosTetMaxElec = 1.0 - std::min(cutEnergy, tmax)*electron_mass_c2/mom2; 148 } else { 149 150 if(particle == theElectron) tmax *= 0.5; 151 G4double t = std::min(cutEnergy, tmax); 152 G4double mom21 = t*(t + 2.0*electron_mass_c2); 153 G4double t1 = tkin - t; 154 //G4cout << "tkin= " << tkin << " t= " << t << " t1= " << t1 << G4endl; 155 if(t1 > 0.0) { 156 G4double mom22 = t1*(t1 + 2.0*mass); 157 G4double ctm = (mom2 + mom22 - mom21)*0.5/sqrt(mom2*mom22); 158 //G4cout << "ctm= " << ctm << G4endl; 159 if(ctm < 1.0) cosTetMaxElec = ctm; 160 } 161 } 162 } 163 164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 165 166 G4double G4eCoulombScatteringModel::ComputeCrossSectionPerAtom( 167 const G4ParticleDefinition* p, 168 G4double kinEnergy, 169 G4double Z, G4double, 170 G4double cutEnergy, G4double) 171 { 172 //G4cout << "### G4eCoulombScatteringModel::ComputeCrossSectionPerAtom for " 173 // << p->GetParticleName()<<" Z= "<<Z<<" e(MeV)= "<< kinEnergy/MeV << G4endl; 174 G4double xsec = 0.0; 248 175 SetupParticle(p); 249 G4double ekin = std::max(keV, kinEnergy); 250 //G4double ekin = kinEnergy; 251 SetupTarget(Z, A, ekin); 252 253 if(cosTetMaxNuc < cosThetaMin) { 254 G4double x1 = 1.0 - cosThetaMin; 255 G4double x2 = 1.0 - cosTetMaxNuc; 256 G4double x3 = cosThetaMin - cosTetMaxNuc; 257 G4double z1 = x1 + screenZ; 258 G4double z2 = x2 + screenZ; 259 G4double d = 1.0/formfactA - screenZ; 260 G4double d1 = 1.0 - formfactA*screenZ; 261 G4double zn1= x1 + d; 262 G4double zn2= x2 + d; 263 cross = coeff*Z*Z*chargeSquare*invbeta2 264 *(x3/(z1*z2) + x3/(zn1*zn2) + 265 2.0*std::log(z1*zn2/(z2*zn1))/d) / (mom2*d1*d1); 266 } 176 G4double ekin = std::max(lowEnergyLimit, kinEnergy); 177 SetupKinematic(ekin, cutEnergy); 178 if(cosTetMaxNuc < cosTetMinNuc) { 179 SetupTarget(Z, ekin); 180 xsec = CrossSectionPerAtom(); 181 } 182 /* 183 G4cout << "e(MeV)= " << ekin/MeV << "cosTetMinNuc= " << cosTetMinNuc 184 << " cosTetMaxNuc= " << cosTetMaxNuc 185 << " cosTetMaxElec= " << cosTetMaxElec 186 << " screenZ= " << screenZ 187 << " formfactA= " << formfactA 188 << " cosTetMaxHad= " << cosTetMaxHad << G4endl; 189 */ 190 return xsec; 191 } 192 193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 194 195 G4double G4eCoulombScatteringModel::CrossSectionPerAtom() 196 { 197 // This method needs initialisation before be called 198 199 G4double fac = coeff*targetZ*chargeSquare*invbeta2/mom2; 200 elecXSection = 0.0; 201 nucXSection = 0.0; 202 203 G4double x = 1.0 - cosTetMinNuc; 204 G4double x1 = x + screenZ; 205 206 if(cosTetMaxElec2 < cosTetMinNuc) { 207 elecXSection = fac*(cosTetMinNuc - cosTetMaxElec2)/ 208 (x1*(1.0 - cosTetMaxElec2 + screenZ)); 209 nucXSection = elecXSection; 210 } 211 212 //G4cout << "XS tkin(MeV)= " << tkin<<" xs= " <<nucXSection 213 // << " costmax= " << cosTetMaxNuc2 214 // << " costmin= " << cosTetMinNuc << " Z= " << targetZ <<G4endl; 215 if(cosTetMaxNuc2 < cosTetMinNuc) { 216 G4double s = screenZ*formfactA; 217 G4double z1 = 1.0 - cosTetMaxNuc2 + screenZ; 218 G4double d = (1.0 - s)/formfactA; 219 //G4cout <<"x1= "<<x1<<" z1= " <<z1<<" s= "<<s << " d= " <<d <<G4endl; 220 if(d < 0.2*x1) { 221 G4double x2 = x1*x1; 222 G4double z2 = z1*z1; 223 x = (1.0/(x1*x2) - 1.0/(z1*z2) - d*1.5*(1.0/(x2*x2) - 1.0/(z2*z2)))/ 224 (3.0*formfactA*formfactA); 225 } else { 226 G4double x2 = x1 + d; 227 G4double z2 = z1 + d; 228 x = (1.0 + 2.0*s)*((cosTetMinNuc - cosTetMaxNuc2)*(1.0/(x1*z1) + 1.0/(x2*z2)) - 229 2.0*log(z1*x2/(z2*x1))/d); 230 } 231 nucXSection += fac*targetZ*x; 232 } 233 234 //G4cout<<" cross(bn)= "<<nucXSection/barn<<" xsElec(bn)= "<<elecXSection/barn 235 // << " Asc= " << screenZ << G4endl; 267 236 268 // G4cout << "CalculateCrossSectionPerAtom: e(MeV)= " << tkin 269 // << " cross(b)= " << cross/barn << " ctmin= " << cosThetaMin 270 // << " ctmax= " << cosTetMaxNuc << G4endl; 271 272 return cross; 237 return nucXSection; 273 238 } 274 239 … … 276 241 277 242 void G4eCoulombScatteringModel::SampleSecondaries( 278 std::vector<G4DynamicParticle*>* ,243 std::vector<G4DynamicParticle*>* fvect, 279 244 const G4MaterialCutsCouple* couple, 280 245 const G4DynamicParticle* dp, 281 246 G4double cutEnergy, 282 G4double maxEnergy) 283 { 284 const G4Material* aMaterial = couple->GetMaterial(); 285 const G4ParticleDefinition* p = dp->GetDefinition(); 247 G4double) 248 { 286 249 G4double kinEnergy = dp->GetKineticEnergy(); 287 288 // Select atom and setup 289 SetupParticle(p); 290 const G4Element* elm = 291 SelectRandomAtom(aMaterial,p,kinEnergy,cutEnergy,maxEnergy); 292 G4double Z = elm->GetZ(); 293 G4double A = elm->GetN(); 294 295 G4double cross = 296 ComputeCrossSectionPerAtom(p,kinEnergy,Z,A,cutEnergy,maxEnergy); 297 298 G4double costm = cosTetMaxNuc; 250 if(kinEnergy <= DBL_MIN) return; 251 DefineMaterial(couple); 252 SetupParticle(dp->GetDefinition()); 253 G4double ekin = std::max(lowEnergyLimit, kinEnergy); 254 SetupKinematic(ekin, cutEnergy); 255 //G4cout << "G4eCoulombScatteringModel::SampleSecondaries e(MeV)= " 256 // << kinEnergy << " " << particle->GetParticleName() << G4endl; 257 258 // Choose nucleus 259 currentElement = SelectRandomAtom(couple,particle,ekin,cutEnergy,ekin); 260 261 SetupTarget(currentElement->GetZ(),ekin); 262 263 G4double cost = SampleCosineTheta(); 264 G4double z1 = 1.0 - cost; 265 if(z1 < 0.0) return; 266 267 G4double sint = sqrt(z1*(1.0 + cost)); 268 269 //G4cout<<"## Sampled sint= " << sint << " Z= " << targetZ 270 // << " screenZ= " << screenZ << " cn= " << formfactA << G4endl; 271 272 G4double phi = twopi * G4UniformRand(); 273 274 G4ThreeVector direction = dp->GetMomentumDirection(); 275 G4ThreeVector newDirection(cos(phi)*sint,sin(phi)*sint,cost); 276 newDirection.rotateUz(direction); 277 278 fParticleChange->ProposeMomentumDirection(newDirection); 279 280 // recoil sampling assuming a small recoil 281 // and first order correction to primary 4-momentum 282 if(lowEnergyLimit < kinEnergy) { 283 G4int ia = SelectIsotopeNumber(currentElement); 284 G4double Trec = z1*mom2/(amu_c2*G4double(ia)); 285 G4double th = 286 std::min(recoilThreshold, 287 targetZ*currentElement->GetIonisation()->GetMeanExcitationEnergy()); 288 289 if(Trec > th) { 290 G4int iz = G4int(targetZ); 291 G4ParticleDefinition* ion = theParticleTable->FindIon(iz, ia, 0, iz); 292 Trec = z1*mom2/ion->GetPDGMass(); 293 if(Trec < kinEnergy) { 294 G4ThreeVector dir = (direction - newDirection).unit(); 295 G4DynamicParticle* newdp = new G4DynamicParticle(ion, dir, Trec); 296 fvect->push_back(newdp); 297 fParticleChange->SetProposedKineticEnergy(kinEnergy - Trec); 298 } 299 } 300 } 301 302 return; 303 } 304 305 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 306 307 G4double G4eCoulombScatteringModel::SampleCosineTheta() 308 { 309 G4double costm = cosTetMaxNuc2; 299 310 G4double formf = formfactA; 300 if(G4UniformRand()*cross < elecXSection) { 301 costm = cosTetMaxElec; 311 G4double prob = 0.0; 312 G4double xs = CrossSectionPerAtom(); 313 if(xs > 0.0) prob = elecXSection/xs; 314 315 // scattering off e or A? 316 if(G4UniformRand() < prob) { 317 costm = cosTetMaxElec2; 302 318 formf = 0.0; 303 319 } 320 304 321 /* 305 G4cout << " G4eCoul...SampleSecondaries: e(MeV)= " << tkin322 G4cout << "SampleCost: e(MeV)= " << tkin 306 323 << " ctmin= " << cosThetaMin 307 324 << " ctmaxN= " << cosTetMaxNuc 308 325 << " ctmax= " << costm 309 << " Z= " << Z << " A= " << A 310 << " cross= " << cross/barn << " crossE= " << elecXSection/barn 326 << " Z= " << targetZ << " A= " << targetA 311 327 << G4endl; 312 328 */ 313 if(costm >= cosT hetaMin) return;314 315 G4double x1 = 1. - cosT hetaMin+ screenZ;316 G4double x2 = 1. - costm ;317 G4double x3 = cosT hetaMin- costm;318 G4double grej, z,z1;329 if(costm >= cosTetMinNuc) return 2.0; 330 331 G4double x1 = 1. - cosTetMinNuc + screenZ; 332 G4double x2 = 1. - costm + screenZ; 333 G4double x3 = cosTetMinNuc - costm; 334 G4double grej, z1; 319 335 do { 320 z = G4UniformRand()*x3; 321 z1 = (x1*x2 - screenZ*z)/(x1 + z); 322 if(z1 < 0.0) z1 = 0.0; 323 else if(z1 > 2.0) z1 = 2.0; 336 z1 = x1*x2/(x1 + G4UniformRand()*x3) - screenZ; 324 337 grej = 1.0/(1.0 + formf*z1); 325 338 } while ( G4UniformRand() > grej*grej ); 326 327 G4double cost = 1.0 - z1; 328 G4double sint= sqrt(z1*(2.0 - z1)); 329 /* 330 if(sint > 0.1) 331 G4cout<<"## SampleSecondaries: e(MeV)= " << kinEnergy 332 << " sint= " << sint << " Z= " << Z << " screenZ= " << screenZ 333 << " cn= " << formf 334 << G4endl; 335 */ 336 G4double phi = twopi * G4UniformRand(); 337 338 G4ThreeVector direction = dp->GetMomentumDirection(); 339 G4ThreeVector newDirection(cos(phi)*sint,sin(phi)*sint,cost); 340 newDirection.rotateUz(direction); 341 342 fParticleChange->ProposeMomentumDirection(newDirection); 343 344 return; 345 } 346 347 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 348 349 339 340 //G4cout << "z= " << z1 << " cross= " << nucXSection/barn 341 // << " crossE= " << elecXSection/barn << G4endl; 342 343 return 1.0 - z1; 344 } 345 346 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 347 348 -
trunk/source/processes/electromagnetic/standard/src/G4eIonisation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eIonisation.cc,v 1.5 3 2007/05/22 17:34:36vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4eIonisation.cc,v 1.57 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 90 90 isInitialised(false) 91 91 { 92 SetStepFunction(0.2, 1*mm); 93 SetIntegral(true); 94 SetVerboseLevel(1); 92 // SetStepFunction(0.2, 1*mm); 93 // SetIntegral(true); 94 // SetVerboseLevel(1); 95 SetProcessSubType(fIonisation); 95 96 } 96 97 … … 99 100 G4eIonisation::~G4eIonisation() 100 101 {} 102 103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 104 105 G4double G4eIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 106 const G4Material*, 107 G4double cut) 108 { 109 G4double x = cut; 110 if(isElectron) x += cut; 111 return x; 112 } 113 114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 115 116 G4bool G4eIonisation::IsApplicable(const G4ParticleDefinition& p) 117 { 118 return (&p == G4Electron::Electron() || &p == G4Positron::Positron()); 119 } 101 120 102 121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 110 129 SetSecondaryParticle(theElectron); 111 130 if (!EmModel()) SetEmModel(new G4MollerBhabhaModel()); 112 EmModel()->SetLowEnergyLimit ( 100*eV);113 EmModel()->SetHighEnergyLimit( 100*TeV);131 EmModel()->SetLowEnergyLimit (MinKinEnergy()); 132 EmModel()->SetHighEnergyLimit(MaxKinEnergy()); 114 133 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation()); 115 134 … … 122 141 123 142 void G4eIonisation::PrintInfo() 124 { 125 if(EmModel()) 126 G4cout << " Delta cross sections and sampling from " 127 << EmModel()->GetName() << " model" 128 << "\n Good description from 1 KeV to 100 GeV." 129 << G4endl; 130 } 143 {} 131 144 132 145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4eeToTwoGammaModel.cc
r819 r961 25 25 // 26 26 // $Id: G4eeToTwoGammaModel.cc,v 1.14 2007/05/23 08:47:35 vnivanch Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/electromagnetic/standard/src/G4eplusAnnihilation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4eplusAnnihilation.cc,v 1. 27 2007/10/02 10:17:12vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4eplusAnnihilation.cc,v 1.30 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 68 68 : G4VEmProcess(name), isInitialised(false) 69 69 { 70 SetProcessSubType(fAnnihilation); 70 71 enableAtRestDoIt = true; 71 72 } … … 78 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 79 80 81 G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& p) 82 { 83 return (&p == G4Positron::Positron()); 84 } 85 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 87 88 G4double G4eplusAnnihilation::AtRestGetPhysicalInteractionLength( 89 const G4Track&, G4ForceCondition* condition) 90 { 91 *condition = NotForced; 92 return 0.0; 93 } 94 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 96 80 97 void G4eplusAnnihilation::InitialiseProcess(const G4ParticleDefinition*) 81 98 { … … 85 102 SetStartFromNullFlag(false); 86 103 SetSecondaryParticle(G4Gamma::Gamma()); 87 G4double emin = 0.1*keV; 88 G4double emax = 100.*TeV; 89 SetLambdaBinning(120); 90 SetMinKinEnergy(emin); 91 SetMaxKinEnergy(emax); 92 if(!Model()) SetModel(new G4eeToTwoGammaModel); 93 Model()->SetLowEnergyLimit(emin); 94 Model()->SetHighEnergyLimit(emax); 104 if(!Model()) SetModel(new G4eeToTwoGammaModel()); 105 Model()->SetLowEnergyLimit(MinKinEnergy()); 106 Model()->SetHighEnergyLimit(MaxKinEnergy()); 95 107 AddEmModel(1, Model()); 96 108 } … … 100 112 101 113 void G4eplusAnnihilation::PrintInfo() 102 { 103 G4cout 104 << " Sampling according " << Model()->GetName() << " model" 105 << G4endl; 106 } 114 {} 107 115 108 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4hIonisation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hIonisation.cc,v 1. 70 2008/01/14 11:59:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4hIonisation.cc,v 1.82 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 78 78 // positive from pi+ and p (VI) 79 79 // 14-01-07 use SetEmModel() and SetFluctModel() from G4VEnergyLossProcess (mma) 80 // 12-09-08 Removed CorrectionsAlongStep (VI) 80 81 // 81 82 // ------------------------------------------------------------------- … … 90 91 #include "G4BraggModel.hh" 91 92 #include "G4BetheBlochModel.hh" 93 #include "G4IonFluctuations.hh" 92 94 #include "G4UniversalFluctuation.hh" 93 95 #include "G4BohrFluctuations.hh" … … 95 97 #include "G4PionPlus.hh" 96 98 #include "G4PionMinus.hh" 97 #include "G4LossTableManager.hh" 99 #include "G4KaonPlus.hh" 100 #include "G4KaonMinus.hh" 98 101 99 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 103 106 G4hIonisation::G4hIonisation(const G4String& name) 104 107 : G4VEnergyLossProcess(name), 105 theParticle(0),106 theBaseParticle(0),107 isInitialised(false) 108 { 109 SetStepFunction(0.2, 1*mm);110 SetIntegral(true);111 Set VerboseLevel(1);108 isInitialised(false), 109 nuclearStopping(true) 110 { 111 // SetStepFunction(0.2, 1.0*mm); 112 //SetIntegral(true); 113 //SetVerboseLevel(1); 114 SetProcessSubType(fIonisation); 112 115 mass = 0.0; 113 116 ratio = 0.0; 114 corr = G4LossTableManager::Instance()->EmCorrections();115 nuclearStopping = true;116 117 } 117 118 … … 120 121 G4hIonisation::~G4hIonisation() 121 122 {} 123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 125 126 G4bool G4hIonisation::IsApplicable(const G4ParticleDefinition& p) 127 { 128 return (p.GetPDGCharge() != 0.0 && p.GetPDGMass() > 10.0*MeV && 129 !p.IsShortLived()); 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 133 134 G4double G4hIonisation::MinPrimaryEnergy(const G4ParticleDefinition*, 135 const G4Material*, 136 G4double cut) 137 { 138 G4double x = 0.5*cut/electron_mass_c2; 139 G4double g = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio)); 140 return mass*(g - 1.0); 141 } 122 142 123 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 127 147 const G4ParticleDefinition* bpart) 128 148 { 129 if(isInitialised) return; 130 131 theParticle = part; 132 133 G4String pname = part->GetParticleName(); 134 135 // standard base particles 136 if(part == bpart || pname == "proton" || 137 pname == "anti_proton" || pname == "pi+" || pname == "pi-" ) 138 theBaseParticle = 0; 139 140 // select base particle 141 else if(bpart == 0) { 142 143 if(pname == "kaon+") theBaseParticle = G4PionPlus::PionPlus(); 144 else if(pname == "kaon-") theBaseParticle = G4PionMinus::PionMinus(); 145 else if(part->GetPDGCharge() > 0.0) theBaseParticle = G4Proton::Proton(); 146 else theBaseParticle = G4AntiProton::AntiProton(); 147 148 } else theBaseParticle = bpart; 149 150 SetBaseParticle(theBaseParticle); 151 SetSecondaryParticle(G4Electron::Electron()); 152 mass = theParticle->GetPDGMass(); 153 ratio = electron_mass_c2/mass; 154 massratio = 1.0; 155 if(theBaseParticle) massratio = theBaseParticle->GetPDGMass()/mass; 156 157 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 158 EmModel(1)->SetLowEnergyLimit(100*eV); 159 eth = 2.0*MeV*mass/proton_mass_c2; 160 ethnuc = eth*50.0; 161 EmModel(1)->SetHighEnergyLimit(eth); 162 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation()); 163 AddEmModel(1, EmModel(1), FluctModel()); 164 165 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 166 EmModel(2)->SetLowEnergyLimit(eth); 167 EmModel(2)->SetHighEnergyLimit(100*TeV); 168 AddEmModel(2, EmModel(2), FluctModel()); 169 170 isInitialised = true; 149 if(!isInitialised) { 150 151 const G4ParticleDefinition* theBaseParticle = 0; 152 G4String pname = part->GetParticleName(); 153 154 // standard base particles 155 if(part == bpart || pname == "proton" || 156 pname == "anti_proton" || 157 pname == "pi+" || pname == "pi-" || 158 pname == "kaon+" || pname == "kaon-") 159 { 160 theBaseParticle = 0; 161 } 162 // select base particle 163 else if(bpart == 0) { 164 165 if(part->GetPDGSpin() == 0.0) 166 if(part->GetPDGCharge() > 0.0 ) { 167 theBaseParticle = G4KaonPlus::KaonPlus(); 168 } else { 169 theBaseParticle = G4KaonMinus::KaonMinus(); 170 } 171 else if(part->GetPDGCharge() > 0.0) { 172 theBaseParticle = G4Proton::Proton(); 173 } else { 174 theBaseParticle = G4AntiProton::AntiProton(); 175 } 176 // base particle defined by interface 177 } else { 178 theBaseParticle = bpart; 179 } 180 SetBaseParticle(theBaseParticle); 181 SetSecondaryParticle(G4Electron::Electron()); 182 183 mass = part->GetPDGMass(); 184 ratio = electron_mass_c2/mass; 185 186 if(mass < 900.*MeV) nuclearStopping = false; 187 188 if (!EmModel(1)) SetEmModel(new G4BraggModel(),1); 189 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 190 191 // model limit defined for protons 192 eth = (EmModel(1)->HighEnergyLimit())*mass/proton_mass_c2; 193 EmModel(1)->SetHighEnergyLimit(eth); 194 AddEmModel(1, EmModel(1), new G4IonFluctuations()); 195 196 if (!FluctModel()) SetFluctModel(new G4UniversalFluctuation()); 197 198 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 199 EmModel(2)->SetLowEnergyLimit(eth); 200 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); 201 AddEmModel(2, EmModel(2), FluctModel()); 202 203 isInitialised = true; 204 } 205 EmModel(1)->ActivateNuclearStopping(nuclearStopping); 206 EmModel(2)->ActivateNuclearStopping(nuclearStopping); 171 207 } 172 208 … … 175 211 void G4hIonisation::PrintInfo() 176 212 { 177 if(EmModel(1) && EmModel(2)) 178 G4cout << " Scaling relation is used from proton dE/dx and range." 179 << "\n Delta cross sections and sampling from " 180 << EmModel(2)->GetName() << " model for scaled energy > " 181 << eth/MeV << " MeV" 182 << "\n Parametrisation from " 183 << EmModel(1)->GetName() << " for protons below." 184 << " NuclearStopping= " << nuclearStopping 213 if(EmModel(1) && EmModel(2)) { 214 G4cout << " NuclearStopping= " << nuclearStopping 185 215 << G4endl; 186 }187 188 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....189 190 void G4hIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,191 const G4DynamicParticle* dp,192 G4double& eloss,193 G4double& s)194 {195 G4double ekin = dp->GetKineticEnergy();196 if(nuclearStopping && ekin < ethnuc) {197 G4double nloss = s*corr->NuclearDEDX(theParticle,couple->GetMaterial(),198 ekin - eloss*0.5);199 eloss += nloss;200 // G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy201 // << " de= " << eloss << " NIEL= " << nloss << G4endl;202 fParticleChange.ProposeNonIonizingEnergyDeposit(nloss);203 216 } 204 217 } -
trunk/source/processes/electromagnetic/standard/src/G4hMultipleScattering.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4hMultipleScattering.cc,v 1. 7 2007/12/07 17:35:52vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4hMultipleScattering.cc,v 1.13 2008/10/15 17:53:44 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ----------------------------------------------------------------------------- … … 58 58 : G4VMultipleScattering(processName) 59 59 { 60 dtrl = 0.05; 61 lambdalimit = 1.*mm; 62 63 samplez = false ; 64 isInitialized = false; 65 66 SetLateralDisplasmentFlag(true); 67 SetSkin(0.0); 68 SetRangeFactor(0.2); 69 SetGeomFactor(0.1); 60 isInitialized = false; 61 isIon = false; 70 62 SetStepLimitType(fMinimal); 71 63 } … … 89 81 // Modification of parameters between runs 90 82 if(isInitialized) { 91 if (p->GetParticleType() != "nucleus" ) {83 if (p->GetParticleType() != "nucleus" && p->GetPDGMass() < GeV) { 92 84 mscUrban->SetStepLimitType(StepLimitType()); 93 85 mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag()); … … 99 91 } 100 92 93 // defaults for ions, which cannot be overwritten 94 if (p->GetParticleType() == "nucleus" || p->GetPDGMass() > GeV) { 95 SetStepLimitType(fMinimal); 96 SetLateralDisplasmentFlag(false); 97 SetBuildLambdaTable(false); 98 if(p->GetParticleType() == "nucleus") isIon = true; 99 } 100 101 101 // initialisation of parameters 102 102 G4String part_name = p->GetParticleName(); 103 mscUrban = new G4UrbanMscModel90( RangeFactor(),dtrl,lambdalimit,104 GeomFactor(),Skin(), 105 samplez,StepLimitType());103 mscUrban = new G4UrbanMscModel90(); 104 105 mscUrban->SetStepLimitType(StepLimitType()); 106 106 mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag()); 107 mscUrban->SetSkin(Skin()); 108 mscUrban->SetRangeFactor(RangeFactor()); 109 mscUrban->SetGeomFactor(GeomFactor()); 107 110 108 if (p->GetParticleType() == "nucleus") {109 mscUrban->SetStepLimitType(fMinimal);110 SetLateralDisplasmentFlag(false);111 SetBuildLambdaTable(false);112 SetSkin(0.0);113 SetRangeFactor(0.2);114 }115 111 AddEmModel(1,mscUrban); 116 112 isInitialized = true; … … 121 117 void G4hMultipleScattering::PrintInfo() 122 118 { 123 G4cout << " Boundary/stepping algorithm is active with RangeFactor= " 124 << RangeFactor() 125 << " Step limit type " << StepLimitType() 119 G4cout << " RangeFactor= " << RangeFactor() 120 << ", step limit type: " << StepLimitType() 121 << ", lateralDisplacement: " << LateralDisplasmentFlag() 122 << ", skin= " << Skin() 123 // << ", geomFactor= " << GeomFactor() 126 124 << G4endl; 127 125 } … … 129 127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 130 128 129 G4double G4hMultipleScattering::AlongStepGetPhysicalInteractionLength( 130 const G4Track& track, 131 G4double, 132 G4double currentMinimalStep, 133 G4double& currentSafety, 134 G4GPILSelection* selection) 135 { 136 // get Step limit proposed by the process 137 valueGPILSelectionMSC = NotCandidateForSelection; 138 139 G4double escaled = track.GetKineticEnergy(); 140 if(isIon) escaled *= track.GetDynamicParticle()->GetMass()/proton_mass_c2; 141 142 G4double steplength = GetMscContinuousStepLimit(track, 143 escaled, 144 currentMinimalStep, 145 currentSafety); 146 // G4cout << "StepLimit= " << steplength << G4endl; 147 // set return value for G4GPILSelection 148 *selection = valueGPILSelectionMSC; 149 return steplength; 150 } 151 152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 153 -
trunk/source/processes/electromagnetic/standard/src/G4ionGasIonisation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionGasIonisation.cc,v 1. 4 2008/01/14 11:59:45vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ionGasIonisation.cc,v 1.14 2008/09/12 16:26:34 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 56 56 57 57 G4ionGasIonisation::G4ionGasIonisation(const G4String& name) 58 : G4ionIonisation(name), 59 currParticle(0), 60 baseParticle(0), 61 initialised(false) 58 : G4ionIonisation(name) 62 59 { 63 atomXS = CLHEP::pi*CLHEP::Bohr_radius*CLHEP::Bohr_radius;64 verboseLevel = 1;65 60 } 66 61 … … 70 65 {} 71 66 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 73 74 void G4ionGasIonisation::InitialiseEnergyLossProcess( 75 const G4ParticleDefinition* part, 76 const G4ParticleDefinition* bpart) 77 { 78 G4ionIonisation::InitialiseEnergyLossProcess(part, bpart); 79 if(initialised) return; 80 81 currParticle = part; 82 83 if(part == bpart || part == G4GenericIon::GenericIon()) baseParticle = 0; 84 else if(bpart == 0) baseParticle = G4GenericIon::GenericIon(); 85 else baseParticle = bpart; 86 87 if(baseParticle) basePartMass = baseParticle->GetPDGMass(); 88 else basePartMass = currParticle->GetPDGMass(); 89 90 initialised = true; 91 } 92 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 94 95 void G4ionGasIonisation::PrintInfo() 96 { 97 G4ionIonisation::PrintInfo(); 98 G4cout << " Version of ion process with simulation discrete ion/media change exchange." 99 << G4endl; 100 } 101 102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 103 104 void G4ionGasIonisation::InitialiseMassCharge(const G4Track& track) 105 { 106 // First step of an ion 107 if(track.GetCurrentStepNumber() == 1) { 108 currParticle = track.GetDefinition(); 109 ionZ = G4int(currParticle->GetPDGCharge()/eplus + 0.5); 110 currentIonZ = G4int(track.GetDynamicParticle()->GetCharge()/eplus + 0.5); 111 currMassRatio = basePartMass/currParticle->GetPDGMass(); 112 } 113 // any step 114 G4double q = eplus*currentIonZ; 115 SetDynamicMassCharge(currMassRatio, q*q); 116 preStepKinEnergy = track.GetKineticEnergy(); 117 } 118 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 120 121 void G4ionGasIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple, 122 const G4DynamicParticle* dp, 123 G4double& eloss, 124 G4double& s) 125 { 126 const G4ParticleDefinition* part = dp->GetDefinition(); 127 const G4Material* mat = couple->GetMaterial(); 128 // add corrections 129 if(eloss < preStepKinEnergy) { 130 131 // use Bethe-Bloch with corrections 132 if(preStepKinEnergy*currMassRatio > BetheBlochEnergyThreshold()) 133 eloss += s*corr->HighOrderCorrections(part,mat,preStepKinEnergy); 134 135 // effective number of collisions 136 G4double x = mat->GetElectronDensity()*s*atomXS; 137 // equilibrium charge 138 G4double q = fParticleChange.GetProposedCharge(); 139 140 // sample charge change during the step 141 fParticleChange.SetProposedCharge(SampleChargeAfterStep(q, x)); 142 } 143 144 // use nuclear stopping 145 if(NuclearStoppingFlag()) { 146 G4double nloss = s*corr->NuclearDEDX(part,mat,preStepKinEnergy - eloss*0.5); 147 eloss += nloss; 148 fParticleChange.ProposeNonIonizingEnergyDeposit(nloss); 149 } 150 } 151 67 /* 152 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 153 69 … … 157 73 // xeff - effective number of collisions 158 74 // q - current charge 159 G4double q = eplus*currentIonZ; 75 G4double q = G4double(currentIonZ); 76 if(qeff > q) { 77 if(G4UniformRand() < qeff - q) currentIonZ++; 78 } else { 79 if(G4UniformRand() < q - qeff) currentIonZ--; 80 } 81 82 q = eplus*currentIonZ; 160 83 if(verboseLevel > 1) G4cout << "G4ionGasIonisation: Q1= " << currentIonZ 161 84 << " Qeff= " << qeff/eplus << " Neff= " << xeff … … 163 86 return q; 164 87 } 165 88 */ 166 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... -
trunk/source/processes/electromagnetic/standard/src/G4ionIonisation.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionIonisation.cc,v 1. 45.2.2 2008/04/25 00:34:55vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ionIonisation.cc,v 1.66 2009/02/20 12:06:37 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 // 16-05-07 Add data for light ion stopping only for GenericIon (V.Ivantchenko) 56 56 // 07-11-07 Fill non-ionizing energy loss (V.Ivantchenko) 57 // 12-09-08 Removed InitialiseMassCharge and CorrectionsAlongStep (VI) 57 58 // 58 59 // … … 65 66 #include "G4Electron.hh" 66 67 #include "G4Proton.hh" 68 //#include "G4Alpha.hh" 67 69 #include "G4GenericIon.hh" 68 70 #include "G4BraggModel.hh" 69 71 #include "G4BraggIonModel.hh" 70 72 #include "G4BetheBlochModel.hh" 71 #include "G4IonFluctuations.hh"72 73 #include "G4UnitsTable.hh" 73 74 #include "G4LossTableManager.hh" 74 75 #include "G4WaterStopping.hh" 76 #include "G4EmCorrections.hh" 77 #include "G4IonFluctuations.hh" 75 78 76 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 80 83 G4ionIonisation::G4ionIonisation(const G4String& name) 81 84 : G4VEnergyLossProcess(name), 85 corr(0), 82 86 theParticle(0), 83 theBaseParticle(0),84 87 isInitialised(false), 85 88 stopDataActive(true), … … 89 92 SetStepFunction(0.1, 0.1*mm); 90 93 SetIntegral(true); 91 SetVerboseLevel(1); 94 SetProcessSubType(fIonisation); 95 // SetVerboseLevel(1); 92 96 corr = G4LossTableManager::Instance()->EmCorrections(); 93 97 } … … 100 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 101 105 106 G4bool G4ionIonisation::IsApplicable(const G4ParticleDefinition& p) 107 { 108 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived() && 109 p.GetParticleType() == "nucleus"); 110 } 111 112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 113 114 G4double G4ionIonisation::MinPrimaryEnergy(const G4ParticleDefinition* p, 115 const G4Material*, 116 G4double cut) 117 { 118 return 119 p->GetPDGMass()*(std::sqrt(1. + 0.5*cut/CLHEP::electron_mass_c2) - 1.0); 120 } 121 122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 123 102 124 void G4ionIonisation::InitialiseEnergyLossProcess( 103 125 const G4ParticleDefinition* part, 104 126 const G4ParticleDefinition* bpart) 105 127 { 106 if(isInitialised) return;128 const G4ParticleDefinition* ion = G4GenericIon::GenericIon(); 107 129 108 theParticle = part;130 if(!isInitialised) { 109 131 110 if(part == bpart || part == G4GenericIon::GenericIon()) theBaseParticle = 0; 111 else if(bpart == 0) theBaseParticle = G4GenericIon::GenericIon(); 112 else theBaseParticle = bpart; 132 theParticle = part; 133 //G4String pname = part->GetParticleName(); 113 134 114 SetBaseParticle(theBaseParticle);115 SetSecondaryParticle(G4Electron::Electron());135 // define base particle 136 const G4ParticleDefinition* theBaseParticle = 0; 116 137 117 if(theBaseParticle) baseMass = theBaseParticle->GetPDGMass(); 118 else baseMass = theParticle->GetPDGMass(); 119 120 if (!EmModel(1)) SetEmModel(new G4BraggIonModel(),1); 121 EmModel(1)->SetLowEnergyLimit(100*eV); 122 eth = 2.0*MeV; 123 EmModel(1)->SetHighEnergyLimit(eth); 124 if (!FluctModel()) SetFluctModel(new G4IonFluctuations()); 125 AddEmModel(1, EmModel(1), FluctModel()); 138 if(part == ion) theBaseParticle = 0; 139 else if(bpart == 0) theBaseParticle = ion; 140 else theBaseParticle = bpart; 126 141 127 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 128 EmModel(2)->SetLowEnergyLimit(eth); 129 EmModel(2)->SetHighEnergyLimit(100*TeV); 130 AddEmModel(2, EmModel(2), FluctModel()); 142 SetBaseParticle(theBaseParticle); 143 SetSecondaryParticle(G4Electron::Electron()); 131 144 132 // Add ion stoping tables for Generic Ion 133 if(part == G4GenericIon::GenericIon()) { 134 G4WaterStopping ws(corr); 135 effCharge = corr->GetIonEffectiveCharge(EmModel(1)); 136 } else { 137 effCharge = corr->GetIonEffectiveCharge(0); 145 if (!EmModel(1)) SetEmModel(new G4BraggIonModel(), 1); 146 EmModel(1)->SetLowEnergyLimit(MinKinEnergy()); 147 148 // model limit defined for protons 149 eth = (EmModel(1)->HighEnergyLimit())*part->GetPDGMass()/proton_mass_c2; 150 EmModel(1)->SetHighEnergyLimit(eth); 151 152 if (!FluctModel()) SetFluctModel(new G4IonFluctuations()); 153 AddEmModel(1, EmModel(1), FluctModel()); 154 155 if (!EmModel(2)) SetEmModel(new G4BetheBlochModel(),2); 156 EmModel(2)->SetLowEnergyLimit(eth); 157 EmModel(2)->SetHighEnergyLimit(MaxKinEnergy()); 158 AddEmModel(2, EmModel(2), FluctModel()); 159 160 // Add ion stoping tables for Generic Ion 161 if(part == ion) { 162 G4WaterStopping ws(corr); 163 corr->SetIonisationModels(EmModel(1),EmModel(2)); 164 } 165 isInitialised = true; 138 166 } 139 140 isInitialised = true; 167 // reinitialisation of corrections for the new run 168 EmModel(1)->ActivateNuclearStopping(nuclearStopping); 169 EmModel(2)->ActivateNuclearStopping(nuclearStopping); 170 if(part == ion) corr->InitialiseForNewRun(); 141 171 } 142 172 … … 145 175 void G4ionIonisation::PrintInfo() 146 176 { 147 if(EmModel(1) && EmModel(2)) 148 G4cout << " Scaling relation is used from proton dE/dx and range." 149 << "\n Delta cross sections and sampling from " 150 << EmModel(2)->GetName() << " model for scaled energy > " 151 << eth/MeV << " MeV" 152 << "\n Parametrisation from " 153 << EmModel(1)->GetName() << " for protons below." 154 << " NuclearStopping= " << nuclearStopping 155 << G4endl; 156 if (stopDataActive) 157 G4cout << "\n Stopping Power data for " 177 if (stopDataActive && G4GenericIon::GenericIon() == theParticle) { 178 G4cout << " Stopping Power data for " 158 179 << corr->GetNumberOfStoppingVectors() 159 << " ion/material pairs are used."180 << " ion/material pairs, nuclearStopping: " << nuclearStopping 160 181 << G4endl; 182 } 161 183 } 162 184 … … 165 187 void G4ionIonisation::AddStoppingData(G4int Z, G4int A, 166 188 const G4String& mname, 167 G4PhysicsVector &dVector)189 G4PhysicsVector* dVector) 168 190 { 169 191 corr->AddStoppingData(Z, A, mname, dVector); … … 171 193 172 194 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 173 174 void G4ionIonisation::CorrectionsAlongStep(const G4MaterialCutsCouple* couple,175 const G4DynamicParticle* dp,176 G4double& eloss,177 G4double& s)178 {179 const G4ParticleDefinition* part = dp->GetDefinition();180 const G4Material* mat = couple->GetMaterial();181 if(eloss < preKinEnergy) {182 // G4cout << "e= " << preKinEnergy << " ratio= " << massRatio << " eth= " << eth<< G4endl;183 if(preKinEnergy*massRatio > eth)184 eloss += s*corr->HighOrderCorrections(part,mat,preKinEnergy);185 else {186 187 if(stopDataActive)188 eloss *= corr->EffectiveChargeCorrection(part,mat,preKinEnergy);189 190 }191 fParticleChange.SetProposedCharge(effCharge->EffectiveCharge(part,192 mat,preKinEnergy-eloss));193 }194 if(nuclearStopping && preKinEnergy*massRatio < 50.*eth*charge2) {195 G4double nloss = s*corr->NuclearDEDX(part,mat,preKinEnergy - eloss*0.5);196 eloss += nloss;197 // G4cout << "G4ionIonisation::CorrectionsAlongStep: e= " << preKinEnergy198 // << " de= " << eloss << " NIEL= " << nloss << G4endl;199 fParticleChange.ProposeNonIonizingEnergyDeposit(nloss);200 }201 }202 203 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset
for help on using the changeset viewer.