- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.