- Timestamp:
- Apr 17, 2009, 12:17:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh
r961 r991 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PEEffectModel.hh,v 1. 7 2009/02/20 12:06:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-02 -ref-02$26 // $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 41 41 // 42 42 // 06.02.2006 : added ComputeMeanFreePath() (mma) 43 // 20.02.2009 : move virtual inline to .cc, substitute44 // ComputeMeanFreePath() by CrossSectionPerVolume (VI)45 43 // 46 44 // Class Description: … … 72 70 virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&); 73 71 74 virtualG4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,75 76 77 78 72 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, 73 G4double kinEnergy, 74 G4double Z, 75 G4double A, 76 G4double, G4double); 79 77 80 virtual G4double CrossSectionPerVolume(const G4Material*, 81 const G4ParticleDefinition*, 82 G4double kineticEnergy, 83 G4double cutEnergy, 84 G4double maxEnergy); 78 G4double ComputeMeanFreePath( const G4ParticleDefinition*, 79 G4double kinEnergy, 80 const G4Material* material, 81 G4double, G4double); 85 82 86 83 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, … … 103 100 }; 104 101 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 105 141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 106 142
Note: See TracChangeset
for help on using the changeset viewer.