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

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/muons/include/G4MuBetheBlochModel.hh

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MuBetheBlochModel.hh,v 1.17 2007/05/22 17:35:58 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4MuBetheBlochModel.hh,v 1.18 2009/02/20 14:48:16 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    7676  virtual ~G4MuBetheBlochModel();
    7777
    78   void Initialise(const G4ParticleDefinition*, const G4DataVector&);
     78  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7979
    80   G4double MinEnergyCut(const G4ParticleDefinition*,
    81                         const G4MaterialCutsCouple*);
     80  virtual G4double MinEnergyCut(const G4ParticleDefinition*,
     81                                const G4MaterialCutsCouple*);
    8282                       
    8383  virtual G4double ComputeCrossSectionPerElectron(
     
    113113protected:
    114114
    115   G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
    116                                     G4double kinEnergy);
     115  virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
     116                                      G4double kinEnergy);
    117117
    118118private:
    119119
    120   void SetParticle(const G4ParticleDefinition* p);
     120  inline void SetParticle(const G4ParticleDefinition* p);
    121121
    122122  // hide assignment operator
     
    141141};
    142142
    143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
     143//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    144144
    145 inline G4double G4MuBetheBlochModel::MaxSecondaryEnergy(
    146           const G4ParticleDefinition*,
    147                 G4double kinEnergy)
     145inline void G4MuBetheBlochModel::SetParticle(const G4ParticleDefinition* p)
    148146{
    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 tmax;
     147  if(!particle) {
     148    particle = p;
     149    mass = particle->GetPDGMass();
     150    massSquare = mass*mass;
     151    ratio = electron_mass_c2/mass;
     152  }
    153153}
    154154
Note: See TracChangeset for help on using the changeset viewer.