source: trunk/source/processes/electromagnetic/standard/include/G4PEEffectModel.hh @ 846

Last change on this file since 846 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.1 KB
Line 
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//
26// $Id: G4PEEffectModel.hh,v 1.6 2007/05/22 17:34:36 vnivanch Exp $
27// GEANT4 tag $Name:  $
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
58class G4ParticleChangeForGamma;
59
60class G4PEEffectModel : public G4VEmModel
61{
62
63public:
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
72  G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
73                                      G4double kinEnergy,
74                                      G4double Z,
75                                      G4double A,
76                                      G4double, G4double);
77                                     
78  G4double ComputeMeanFreePath( const G4ParticleDefinition*,
79                                      G4double kinEnergy,
80                                const G4Material* material,     
81                                      G4double, G4double);
82
83  virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
84                                 const G4MaterialCutsCouple*,
85                                 const G4DynamicParticle*,
86                                 G4double tmin,
87                                 G4double maxEnergy);
88protected:
89
90  virtual G4double ElecCosThetaDistribution(G4double ElecKineEnergy);
91
92private:
93
94  G4ParticleDefinition*     theGamma;
95  G4ParticleDefinition*     theElectron;
96  G4ParticleChangeForGamma* fParticleChange;
97
98  G4double                  fminimalEnergy;
99  G4bool                    isInitialized;
100};
101
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
141//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
142
143#endif
Note: See TracBrowser for help on using the repository browser.