00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #include "G4PEEffectModel.hh"
00053 #include "G4PhysicalConstants.hh"
00054 #include "G4SystemOfUnits.hh"
00055 #include "G4Electron.hh"
00056 #include "G4Gamma.hh"
00057 #include "Randomize.hh"
00058 #include "G4DataVector.hh"
00059 #include "G4ParticleChangeForGamma.hh"
00060 #include "G4SauterGavrilaAngularDistribution.hh"
00061
00062
00063
00064 using namespace std;
00065
00066 G4PEEffectModel::G4PEEffectModel(const G4ParticleDefinition*,
00067 const G4String& nam)
00068 : G4VEmModel(nam)
00069 {
00070 G4cout << "### G4PEEffectModel is obsolete "
00071 << "and will be removed for the next release." << G4endl;
00072
00073 theGamma = G4Gamma::Gamma();
00074 theElectron = G4Electron::Electron();
00075 fminimalEnergy = 1.0*eV;
00076 fParticleChange = 0;
00077
00078
00079 SetAngularDistribution(new G4SauterGavrilaAngularDistribution());
00080 }
00081
00082
00083
00084 G4PEEffectModel::~G4PEEffectModel()
00085 {}
00086
00087
00088
00089 void G4PEEffectModel::Initialise(const G4ParticleDefinition*,
00090 const G4DataVector&)
00091 {
00092
00093 SetDeexcitationFlag(false);
00094 if(!fParticleChange) { fParticleChange = GetParticleChangeForGamma(); }
00095 }
00096
00097
00098
00099 G4double G4PEEffectModel::ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
00100 G4double energy,
00101 G4double Z, G4double,
00102 G4double, G4double)
00103 {
00104 G4double* SandiaCof = G4SandiaTable::GetSandiaCofPerAtom((G4int)Z, energy);
00105
00106 G4double energy2 = energy*energy;
00107 G4double energy3 = energy*energy2;
00108 G4double energy4 = energy2*energy2;
00109
00110 return SandiaCof[0]/energy + SandiaCof[1]/energy2 +
00111 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
00112 }
00113
00114
00115
00116 G4double G4PEEffectModel::CrossSectionPerVolume(const G4Material* material,
00117 const G4ParticleDefinition*,
00118 G4double energy,
00119 G4double, G4double)
00120 {
00121 G4double* SandiaCof =
00122 material->GetSandiaTable()->GetSandiaCofForMaterial(energy);
00123
00124 G4double energy2 = energy*energy;
00125 G4double energy3 = energy*energy2;
00126 G4double energy4 = energy2*energy2;
00127
00128 return SandiaCof[0]/energy + SandiaCof[1]/energy2 +
00129 SandiaCof[2]/energy3 + SandiaCof[3]/energy4;
00130 }
00131
00132
00133
00134 void G4PEEffectModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
00135 const G4MaterialCutsCouple* couple,
00136 const G4DynamicParticle* aDynamicPhoton,
00137 G4double,
00138 G4double)
00139 {
00140 const G4Material* aMaterial = couple->GetMaterial();
00141
00142 G4double energy = aDynamicPhoton->GetKineticEnergy();
00143 G4ParticleMomentum PhotonDirection = aDynamicPhoton->GetMomentumDirection();
00144
00145
00146 const G4Element* anElement = SelectRandomAtom(aMaterial,theGamma,energy);
00147
00148
00149
00150
00151
00152
00153 G4int nShells = anElement->GetNbOfAtomicShells();
00154 G4int i = 0;
00155 while ((i<nShells) && (energy<anElement->GetAtomicShell(i))) { ++i; }
00156
00157 G4double edep = energy;
00158
00159
00160 if (i < nShells) {
00161
00162 G4double bindingEnergy = anElement->GetAtomicShell(i);
00163 G4double elecKineEnergy = energy - bindingEnergy;
00164
00165 if (elecKineEnergy > fminimalEnergy) {
00166
00167 edep = bindingEnergy;
00168 G4ThreeVector elecDirection =
00169 GetAngularDistribution()->SampleDirection(aDynamicPhoton,
00170 elecKineEnergy,
00171 i,
00172 couple->GetMaterial());
00173
00174 G4DynamicParticle* aParticle =
00175 new G4DynamicParticle(theElectron, elecDirection, elecKineEnergy);
00176 fvect->push_back(aParticle);
00177
00178 }
00179 }
00180
00181 fParticleChange->SetProposedKineticEnergy(0.);
00182 fParticleChange->ProposeTrackStatus(fStopAndKill);
00183 if(edep > 0.0) {
00184 fParticleChange->ProposeLocalEnergyDeposit(edep);
00185 }
00186 }
00187
00188