303{
304
305 if(verboseLevel > 3)
306 {
307 G4cout <<
"Calling SampleSecondaries() of G4DNAEmfietzoglouIonisationModel"
309 }
310
312
314
316 {
319 G4double totalEnergy = k + particleMass;
320 G4double pSquare = k * (totalEnergy + particleMass);
321 G4double totalMomentum = std::sqrt(pSquare);
322
323 G4int ionizationShell = 0;
324
325 ionizationShell = RandomSelect(k,particleName);
326
329
330
331 if (k<bindingEnergy) return;
332
333
335
336 if (!fasterCode) secondaryKinetic = RandomizeEjectedElectronEnergy(particle->
GetDefinition(),k,ionizationShell);
337
338 if (fasterCode)
339 secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->
GetDefinition(),k,ionizationShell);
340
341
342
344
347 Z, ionizationShell,
349
350 if (secondaryKinetic>0)
351 {
353 fvect->push_back(dp);
354 }
355
356 G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
357
358 G4double finalPx = totalMomentum*primaryDirection.
x() - deltaTotalMomentum*deltaDirection.
x();
359 G4double finalPy = totalMomentum*primaryDirection.
y() - deltaTotalMomentum*deltaDirection.
y();
360 G4double finalPz = totalMomentum*primaryDirection.
z() - deltaTotalMomentum*deltaDirection.
z();
361 G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
362 finalPx /= finalMomentum;
363 finalPy /= finalMomentum;
364 finalPz /= finalMomentum;
365
367 direction.
set(finalPx,finalPy,finalPz);
368
370
371
372
373
374
375 size_t secNumberInit = 0;
376 size_t secNumberFinal = 0;
377
379
380
381 if(fAtomDeexcitation && ionizationShell == 4)
382 {
385 secNumberInit = fvect->size();
387 secNumberFinal = fvect->size();
388
389 if(secNumberFinal > secNumberInit) {
390 for (size_t i=secNumberInit; i<secNumberFinal; ++i) {
391
392 if (bindingEnergy >= ((*fvect)[i])->GetKineticEnergy())
393 {
394
396 }
397 else
398 {
399
400
401 delete (*fvect)[i];
402 (*fvect)[i]=0;
403 }
404 }
405 }
406
407 }
408
409
410 if(bindingEnergy < 0.0)
411 G4Exception(
"G4DNAEmfietzoglouIonisatioModel1::SampleSecondaries()",
413
414
415
416 if (!statCode)
417 {
420 }
421 else
422 {
425 }
426
427
428
429
430
431
432
435 ionizationShell,
436 theIncomingTrack);
437 }
438
439}
void set(double x, double y, double z)
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
const G4Material * GetMaterial() const
const G4Track * GetCurrentTrack() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetPDGMass() const
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *)
G4VEmAngularDistribution * GetAngularDistribution()
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)