- Timestamp:
- Apr 17, 2009, 12:17:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/muons/src/G4MuBetheBlochModel.cc
r961 r991 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.cc,v 1.2 5 2009/02/20 14:48:16vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-02 -ref-02$26 // $Id: G4MuBetheBlochModel.cc,v 1.24 2008/03/25 12:31:04 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 88 88 theElectron = G4Electron::Electron(); 89 89 corr = G4LossTableManager::Instance()->EmCorrections(); 90 fParticleChange = 0;91 90 92 91 if(p) SetParticle(p); … … 100 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 101 100 101 void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p) 102 { 103 if(!particle) { 104 particle = p; 105 mass = particle->GetPDGMass(); 106 massSquare = mass*mass; 107 ratio = electron_mass_c2/mass; 108 } 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 112 102 113 G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*, 103 114 const G4MaterialCutsCouple* couple) … … 106 117 } 107 118 108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....109 110 G4double G4MuBetheBlochModel::MaxSecondaryEnergy(const G4ParticleDefinition*,111 G4double kinEnergy)112 {113 G4double tau = kinEnergy/mass;114 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /115 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);116 return tmax;117 }118 119 119 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 120 120 … … 124 124 if(p) SetParticle(p); 125 125 126 if(!fParticleChange) { 127 if(pParticleChange) { 128 fParticleChange = 129 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 130 } else { 131 fParticleChange = new G4ParticleChangeForLoss(); 132 } 133 } 126 if(pParticleChange) 127 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 128 (pParticleChange); 129 else 130 fParticleChange = new G4ParticleChangeForLoss(); 134 131 } 135 132
Note: See TracChangeset
for help on using the changeset viewer.