| [819] | 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| [1007] | 26 | // $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
|
|---|
| 27 | // GEANT4 tag $Name: geant4-09-02 $
|
|---|
| [819] | 28 | //
|
|---|
| 29 | // -------------------------------------------------------------------
|
|---|
| 30 | //
|
|---|
| 31 | // GEANT4 Class header file
|
|---|
| 32 | //
|
|---|
| 33 | //
|
|---|
| 34 | // File name: G4PEEffectModel
|
|---|
| 35 | //
|
|---|
| 36 | // Author: Vladimir Ivanchenko on base of Michel Maire code
|
|---|
| 37 | //
|
|---|
| 38 | // Creation date: 21.04.2005
|
|---|
| 39 | //
|
|---|
| 40 | // Modifications:
|
|---|
| 41 | //
|
|---|
| 42 | // 06.02.2006 : added ComputeMeanFreePath() (mma)
|
|---|
| 43 | //
|
|---|
| 44 | // Class Description:
|
|---|
| 45 | //
|
|---|
| 46 | // Implementation of the photo-electric effect
|
|---|
| 47 | //
|
|---|
| 48 |
|
|---|
| 49 | // -------------------------------------------------------------------
|
|---|
| 50 | //
|
|---|
| 51 |
|
|---|
| 52 | #ifndef G4PEEffectModel_h
|
|---|
| 53 | #define G4PEEffectModel_h 1
|
|---|
| 54 |
|
|---|
| 55 | #include "G4VEmModel.hh"
|
|---|
| 56 | #include "G4PhysicsTable.hh"
|
|---|
| 57 |
|
|---|
| 58 | class G4ParticleChangeForGamma;
|
|---|
| 59 |
|
|---|
| 60 | class G4PEEffectModel : public G4VEmModel
|
|---|
| 61 | {
|
|---|
| 62 |
|
|---|
| 63 | public:
|
|---|
| 64 |
|
|---|
| 65 | G4PEEffectModel(const G4ParticleDefinition* p = 0,
|
|---|
| 66 | const G4String& nam = "PhotoElectric");
|
|---|
| 67 |
|
|---|
| 68 | virtual ~G4PEEffectModel();
|
|---|
| 69 |
|
|---|
| 70 | virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
|---|
| 71 |
|
|---|
| [1007] | 72 | G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
|
|---|
| 73 | G4double kinEnergy,
|
|---|
| 74 | G4double Z,
|
|---|
| 75 | G4double A,
|
|---|
| 76 | G4double, G4double);
|
|---|
| [819] | 77 |
|
|---|
| [1007] | 78 | G4double ComputeMeanFreePath( const G4ParticleDefinition*,
|
|---|
| 79 | G4double kinEnergy,
|
|---|
| 80 | const G4Material* material,
|
|---|
| 81 | G4double, G4double);
|
|---|
| [819] | 82 |
|
|---|
| 83 | virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
|---|
| 84 | const G4MaterialCutsCouple*,
|
|---|
| 85 | const G4DynamicParticle*,
|
|---|
| 86 | G4double tmin,
|
|---|
| 87 | G4double maxEnergy);
|
|---|
| 88 | protected:
|
|---|
| 89 |
|
|---|
| 90 | virtual G4double ElecCosThetaDistribution(G4double ElecKineEnergy);
|
|---|
| 91 |
|
|---|
| 92 | private:
|
|---|
| 93 |
|
|---|
| 94 | G4ParticleDefinition* theGamma;
|
|---|
| 95 | G4ParticleDefinition* theElectron;
|
|---|
| 96 | G4ParticleChangeForGamma* fParticleChange;
|
|---|
| 97 |
|
|---|
| 98 | G4double fminimalEnergy;
|
|---|
| 99 | G4bool isInitialized;
|
|---|
| 100 | };
|
|---|
| 101 |
|
|---|
| [1007] | 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 |
|
|---|
| [819] | 119 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 120 |
|
|---|
| [1007] | 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 |
|
|---|
| 141 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|---|
| 142 |
|
|---|
| [819] | 143 | #endif
|
|---|