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/standard/include/G4PEEffectModel.hh

    r961 r991  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02-ref-02 $
     26// $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4141//
    4242// 06.02.2006 : added ComputeMeanFreePath()  (mma)
    43 // 20.02.2009 : move virtual inline to .cc, substitute
    44 //              ComputeMeanFreePath() by CrossSectionPerVolume (VI)
    4543//
    4644// Class Description:
     
    7270  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7371
    74   virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
    75                                               G4double kinEnergy,
    76                                               G4double Z,
    77                                               G4double A,
    78                                               G4double, G4double);
     72  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
     73                                      G4double kinEnergy,
     74                                      G4double Z,
     75                                      G4double A,
     76                                      G4double, G4double);
    7977                                     
    80   virtual G4double CrossSectionPerVolume(const G4Material*,
    81                                          const G4ParticleDefinition*,
    82                                          G4double kineticEnergy,
    83                                          G4double cutEnergy,
    84                                          G4double maxEnergy);
     78  G4double ComputeMeanFreePath( const G4ParticleDefinition*,
     79                                      G4double kinEnergy,
     80                                const G4Material* material,     
     81                                      G4double, G4double);
    8582
    8683  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
     
    103100};
    104101
     102//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
     103
     104inline G4double G4PEEffectModel::ComputeCrossSectionPerAtom(
     105                                       const G4ParticleDefinition*,
     106                                             G4double energy,
     107                                             G4double Z, G4double,
     108                                             G4double, G4double)
     109{
     110 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
     111
     112 G4double energy2 = energy*energy, energy3 = energy*energy2,
     113          energy4 = energy2*energy2;
     114
     115 return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
     116        SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
     117}
     118
     119//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     120
     121inline G4double G4PEEffectModel::ComputeMeanFreePath(
     122                                       const G4ParticleDefinition*,
     123                                             G4double energy,
     124                                       const G4Material* material,
     125                                             G4double, G4double)
     126{
     127 G4double* SandiaCof = material->GetSandiaTable()
     128                                ->GetSandiaCofForMaterial(energy);
     129                               
     130 G4double energy2 = energy*energy, energy3 = energy*energy2,
     131          energy4 = energy2*energy2;
     132         
     133 G4double cross = SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
     134                  SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
     135 
     136 G4double mfp = DBL_MAX;
     137 if (cross > 0.) mfp = 1./cross;
     138 return mfp;
     139}
     140
    105141//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    106142
Note: See TracChangeset for help on using the changeset viewer.