258{
259
261
262
263 if (kineticEnergy <= fIntrinsicLowEnergyLimit)
264 {
267 return;
268 }
269
270
272
273
275
276 if (tGamma == 0.) { return; }
277
278 G4double totalEnergy = kineticEnergy + electron_mass_c2;
279 G4double finalEnergy = kineticEnergy - tGamma;
280
281
284 totalEnergy-tGamma,
285 Z,
287
289
290
291 if (finalEnergy < 0.)
292 {
293
294 tGamma = kineticEnergy;
296 }
297 else
298 {
299 G4double momentum = std::sqrt((totalEnergy + electron_mass_c2)*kineticEnergy);
300 G4double finalX = momentum*electronDirection.
x() - tGamma*gammaDirection.
x();
301 G4double finalY = momentum*electronDirection.
y() - tGamma*gammaDirection.
y();
302 G4double finalZ = momentum*electronDirection.
z() - tGamma*gammaDirection.
z();
303 G4double norm = 1./std::sqrt(finalX*finalX + finalY*finalY + finalZ*finalZ);
304
307 }
308
309
311 gammaDirection, tGamma);
312 fvect->push_back(aGamma);
313
314 if (verboseLevel > 1)
315 {
316 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
317 G4cout <<
"Energy balance from G4LivermoreBremsstrahlung" <<
G4endl;
318 G4cout <<
"Incoming primary energy: " << kineticEnergy/keV <<
" keV" <<
G4endl;
319 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
320 G4cout <<
"Outgoing primary energy: " << finalEnergy/keV <<
" keV" <<
G4endl;
321 G4cout <<
"Gamma ray " << tGamma/keV <<
" keV" <<
G4endl;
322 G4cout <<
"Total final state: " << (finalEnergy+tGamma)/keV <<
" keV" <<
G4endl;
323 G4cout <<
"-----------------------------------------------------------" <<
G4endl;
324 }
325 if (verboseLevel > 0)
326 {
327 G4double energyDiff = std::fabs(finalEnergy+tGamma-kineticEnergy);
328 if (energyDiff > 0.05*keV)
329 G4cout <<
"G4LivermoreBremsstrahlung WARNING: problem with energy conservation: "
330 << (finalEnergy+tGamma)/keV << " keV (final) vs. "
331 << kineticEnergy/keV <<
" keV (initial)" <<
G4endl;
332 }
333 return;
334}
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4Material * GetMaterial() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4VEmAngularDistribution * GetAngularDistribution()
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
void ProposeLocalEnergyDeposit(G4double anEnergyPart)