52 :
G4VEmModel(nam),fParticleChange(0),isInitialised(false)
54 fIntrinsicLowEnergyLimit = 0.0;
55 fIntrinsicHighEnergyLimit = 100.0*GeV;
60 fPielr2 = pi*classic_electr_radius*classic_electr_radius;
83 G4cout <<
"Calling G4PenelopeAnnihilationModel::Initialise()" <<
G4endl;
85 if(verboseLevel > 0) {
86 G4cout <<
"Penelope Annihilation model is initialized " <<
G4endl
93 if(isInitialised)
return;
106 if (verboseLevel > 3)
107 G4cout <<
"Calling ComputeCrossSectionPerAtom() of G4PenelopeAnnihilationModel" <<
110 G4double cs = Z*ComputeCrossSectionPerElectron(energy);
112 if (verboseLevel > 2)
113 G4cout <<
"Annihilation cross Section at " << energy/keV <<
" keV for Z=" << Z <<
114 " = " << cs/barn <<
" barn" <<
G4endl;
141 if (verboseLevel > 3)
142 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeAnnihilationModel" <<
G4endl;
150 if (kineticEnergy == 0.0)
154 G4double sinTheta = std::sqrt(1.0-cosTheta*cosTheta);
156 G4ThreeVector direction (sinTheta*std::cos(phi),sinTheta*std::sin(phi),cosTheta);
158 direction, electron_mass_c2);
160 -direction, electron_mass_c2);
162 fvect->push_back(firstGamma);
163 fvect->push_back(secondGamma);
170 G4double gamma = 1.0 + std::max(kineticEnergy,1.0*eV)/electron_mass_c2;
171 G4double gamma21 = std::sqrt(gamma*gamma-1);
173 G4double chimin = 1.0/(ani+gamma21);
174 G4double rchi = (1.0-chimin)/chimin;
180 G4double reject = ani*ani*(1.0-epsilon)+2.0*gamma-(1.0/epsilon);
184 G4double totalAvailableEnergy = kineticEnergy + 2.0*electron_mass_c2;
185 G4double photon1Energy = epsilon*totalAvailableEnergy;
186 G4double photon2Energy = (1.0-epsilon)*totalAvailableEnergy;
187 G4double cosTheta1 = (ani-1.0/epsilon)/gamma21;
188 G4double cosTheta2 = (ani-1.0/(1.0-epsilon))/gamma21;
192 G4double sinTheta1 = std::sqrt(1.-cosTheta1*cosTheta1);
194 G4double dirx1 = sinTheta1 * std::cos(phi1);
195 G4double diry1 = sinTheta1 * std::sin(phi1);
198 G4double sinTheta2 = std::sqrt(1.-cosTheta2*cosTheta2);
200 G4double dirx2 = sinTheta2 * std::cos(phi2);
201 G4double diry2 = sinTheta2 * std::sin(phi2);
205 photon1Direction.
rotateUz(positronDirection);
210 fvect->push_back(aParticle1);
213 photon2Direction.
rotateUz(positronDirection);
218 fvect->push_back(aParticle2);
220 if (verboseLevel > 1)
222 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
223 G4cout <<
"Energy balance from G4PenelopeAnnihilation" <<
G4endl;
224 G4cout <<
"Kinetic positron energy: " << kineticEnergy/keV <<
" keV" <<
G4endl;
225 G4cout <<
"Total available energy: " << totalAvailableEnergy/keV <<
" keV " <<
G4endl;
226 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
227 G4cout <<
"Photon energy 1: " << photon1Energy/keV <<
" keV" <<
G4endl;
228 G4cout <<
"Photon energy 2: " << photon2Energy/keV <<
" keV" <<
G4endl;
229 G4cout <<
"Total final state: " << (photon1Energy+photon2Energy)/keV <<
231 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
233 if (verboseLevel > 0)
235 G4double energyDiff = std::fabs(totalAvailableEnergy-photon1Energy-photon2Energy);
236 if (energyDiff > 0.05*keV)
237 G4cout <<
"Warning from G4PenelopeAnnihilation: problem with energy conservation: " <<
238 (photon1Energy+photon2Energy)/keV <<
239 " keV (final) vs. " <<
240 totalAvailableEnergy/keV <<
" keV (initial)" <<
G4endl;
247G4double G4PenelopeAnnihilationModel:: ComputeCrossSectionPerElectron(
G4double energy)
256 G4double gamma = 1.0+std::max(energy,1.0*eV)/electron_mass_c2;
260 G4double crossSection = fPielr2*((gamma2+4.0*gamma+1.0)*std::log(gamma+f1)/f2
261 - (gamma+3.0)/f1)/(gamma+1.0);
G4DLLIMPORT std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4PenelopeAnnihilationModel(const G4ParticleDefinition *p=0, const G4String &processName="PenAnnih")
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual ~G4PenelopeAnnihilationModel()
G4ParticleChangeForGamma * fParticleChange
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void ProposeTrackStatus(G4TrackStatus status)