Ignore:
Timestamp:
Apr 17, 2009, 12:17:14 PM (15 years ago)
Author:
garnier
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/muons/src/G4MuBetheBlochModel.cc

    r961 r991  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MuBetheBlochModel.cc,v 1.25 2009/02/20 14:48:16 vnivanch 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 $
    2828//
    2929// -------------------------------------------------------------------
     
    8888  theElectron = G4Electron::Electron();
    8989  corr = G4LossTableManager::Instance()->EmCorrections();
    90   fParticleChange = 0;
    9190
    9291  if(p) SetParticle(p);
     
    10099//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    101100
     101void 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
    102113G4double G4MuBetheBlochModel::MinEnergyCut(const G4ParticleDefinition*,
    103114                                           const G4MaterialCutsCouple* couple)
     
    106117}
    107118
    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 
    119119//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    120120
     
    124124  if(p) SetParticle(p);
    125125
    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();
    134131}
    135132
Note: See TracChangeset for help on using the changeset viewer.