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/standard/src/G4PEEffectModel.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4PEEffectModel.cc,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
    27 // GEANT4 tag $Name: $
     26// $Id: G4PEEffectModel.cc,v 1.7 2009/02/20 12:06:37 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -------------------------------------------------------------------
     
    4141//
    4242// 04.12.05 : SetProposedKineticEnergy(0.) for the killed photon (mma)
     43// 20.02.09 : Added initialisation of deexcitation flag and method
     44//            CrossSectionPerVolume instead of mfp (V.Ivanchenko)
    4345//
    4446// Class Description:
     
    6668  theGamma    = G4Gamma::Gamma();
    6769  theElectron = G4Electron::Electron();
     70  fminimalEnergy = 1.0*eV;
    6871}
    6972
     
    7174
    7275G4PEEffectModel::~G4PEEffectModel()
    73 {
    74 }
     76{}
    7577
    7678//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     
    7981                                 const G4DataVector&)
    8082{
    81  if (isInitialized) return;
    82  if (pParticleChange)
    83    fParticleChange =
    84                   reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
    85   else
    86    fParticleChange = new G4ParticleChangeForGamma();
    87 
    88  fminimalEnergy = 1.0*eV;
     83  // always false before the run
     84  SetDeexcitationFlag(false);
     85
     86  if (isInitialized) return;
     87  if (pParticleChange) {
     88    fParticleChange = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
     89  } else {
     90    fParticleChange = new G4ParticleChangeForGamma();
     91  }
     92  isInitialized = true;
     93}
     94
     95//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
     96
     97G4double G4PEEffectModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
     98                                                     G4double energy,
     99                                                     G4double Z, G4double,
     100                                                     G4double, G4double)
     101{
     102  G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
     103
     104  G4double energy2 = energy*energy;
     105  G4double energy3 = energy*energy2;
     106  G4double energy4 = energy2*energy2;
     107
     108  return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
     109    SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
     110}
     111
     112//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     113
     114G4double G4PEEffectModel::CrossSectionPerVolume(const G4Material* material,
     115                                                const G4ParticleDefinition*,
     116                                                G4double energy,
     117                                                G4double, G4double)
     118{
     119  G4double* SandiaCof =
     120    material->GetSandiaTable()->GetSandiaCofForMaterial(energy);
     121                               
     122  G4double energy2 = energy*energy;
     123  G4double energy3 = energy*energy2;
     124  G4double energy4 = energy2*energy2;
     125         
     126  return SandiaCof[0]/energy  + SandiaCof[1]/energy2 +
     127    SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
    89128}
    90129
Note: See TracChangeset for help on using the changeset viewer.