155{
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 if (fVerboseLevel > 3)
172 G4cout <<
"Calling SamplingSecondaries() of G4PenelopeAnnihilationModel" <<
G4endl;
173
175
176
179
180 if (kineticEnergy == 0.0)
181 {
182
184 G4double sinTheta = std::sqrt(1.0-cosTheta*cosTheta);
186 G4ThreeVector direction (sinTheta*std::cos(phi),sinTheta*std::sin(phi),cosTheta);
188 direction, electron_mass_c2);
190 -direction, electron_mass_c2);
191
192 fvect->push_back(firstGamma);
193 fvect->push_back(secondGamma);
194 return;
195 }
196
197
200 G4double gamma = 1.0 + std::max(kineticEnergy,1.0*eV)/electron_mass_c2;
201 G4double gamma21 = std::sqrt(gamma*gamma-1);
203 G4double chimin = 1.0/(ani+gamma21);
204 G4double rchi = (1.0-chimin)/chimin;
208 do{
212 }while(test>0);
213
214 G4double totalAvailableEnergy = kineticEnergy + 2.0*electron_mass_c2;
219
220 G4double sinTheta1 = std::sqrt(1.-cosTheta1*cosTheta1);
222 G4double dirx1 = sinTheta1 * std::cos(phi1);
223 G4double diry1 = sinTheta1 * std::sin(phi1);
225
226 G4double sinTheta2 = std::sqrt(1.-cosTheta2*cosTheta2);
228 G4double dirx2 = sinTheta2 * std::cos(phi2);
229 G4double diry2 = sinTheta2 * std::sin(phi2);
231
233 photon1Direction.rotateUz(positronDirection);
234
236 photon1Direction,
237 photon1Energy);
238 fvect->push_back(aParticle1);
239
241 photon2Direction.rotateUz(positronDirection);
242
244 photon2Direction,
245 photon2Energy);
246 fvect->push_back(aParticle2);
247
248 if (fVerboseLevel > 1)
249 {
250 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
251 G4cout <<
"Energy balance from G4PenelopeAnnihilation" <<
G4endl;
252 G4cout <<
"Kinetic positron energy: " << kineticEnergy/keV <<
" keV" <<
G4endl;
253 G4cout <<
"Total available energy: " << totalAvailableEnergy/keV <<
" keV " <<
G4endl;
254 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
255 G4cout <<
"Photon energy 1: " << photon1Energy/keV <<
" keV" <<
G4endl;
256 G4cout <<
"Photon energy 2: " << photon2Energy/keV <<
" keV" <<
G4endl;
257 G4cout <<
"Total final state: " << (photon1Energy+photon2Energy)/keV <<
259 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
260 }
261 if (fVerboseLevel > 0)
262 {
263 G4double energyDiff = std::fabs(totalAvailableEnergy-photon1Energy-photon2Energy);
264 if (energyDiff > 0.05*keV)
265 G4cout <<
"Warning from G4PenelopeAnnihilation: problem with energy conservation: " <<
266 (photon1Energy+photon2Energy)/keV <<
267 " keV (final) vs. " <<
268 totalAvailableEnergy/keV <<
" keV (initial)" <<
G4endl;
269 }
270 return;
271}
G4double epsilon(G4double density, G4double temperature)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeTrackStatus(G4TrackStatus status)