- Timestamp:
- Apr 20, 2009, 4:53:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/muons/src/G4MuBetheBlochModel.cc
r991 r1005 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MuBetheBlochModel.cc,v 1.2 4 2008/03/25 12:31:04vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-02 $26 // $Id: G4MuBetheBlochModel.cc,v 1.25 2009/02/20 14:48:16 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 88 88 theElectron = G4Electron::Electron(); 89 89 corr = G4LossTableManager::Instance()->EmCorrections(); 90 fParticleChange = 0; 90 91 91 92 if(p) SetParticle(p); … … 99 100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 100 101 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 113 102 G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*, 114 103 const G4MaterialCutsCouple* couple) … … 117 106 } 118 107 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(pParticleChange) 127 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*> 128 (pParticleChange); 129 else 130 fParticleChange = new G4ParticleChangeForLoss(); 126 if(!fParticleChange) { 127 if(pParticleChange) { 128 fParticleChange = 129 reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange); 130 } else { 131 fParticleChange = new G4ParticleChangeForLoss(); 132 } 133 } 131 134 } 132 135
Note: See TracChangeset
for help on using the changeset viewer.