Ignore:
Timestamp:
Apr 20, 2009, 4:53:50 PM (15 years ago)
Author:
garnier
Message:

fichier oublies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh

    r991 r1005  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4PEEffectModel.hh,v 1.7 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-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)
    4345//
    4446// Class Description:
     
    7072  virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
    7173
    72   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
    73                                       G4double kinEnergy,
    74                                       G4double Z,
    75                                       G4double A,
    76                                       G4double, G4double);
     74  virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
     75                                              G4double kinEnergy,
     76                                              G4double Z,
     77                                              G4double A,
     78                                              G4double, G4double);
    7779                                     
    78   G4double ComputeMeanFreePath( const G4ParticleDefinition*,
    79                                       G4double kinEnergy,
    80                                 const G4Material* material,     
    81                                       G4double, G4double);
     80  virtual G4double CrossSectionPerVolume(const G4Material*,
     81                                         const G4ParticleDefinition*,
     82                                         G4double kineticEnergy,
     83                                         G4double cutEnergy,
     84                                         G4double maxEnergy);
    8285
    8386  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
     
    100103};
    101104
    102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
    103 
    104 inline 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 
    121 inline 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 
    141105//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    142106
Note: See TracChangeset for help on using the changeset viewer.