127 crossSectionHandler(0),
150 G4cout <<
"G4LowEnergyIonisation::BuildPhysicsTable start"
161 G4cout <<
"G4RDVEnergySpectrum is initialized"
181 <<
" is created; Cross section data: "
194 G4cout <<
"The loss table is built"
217 G4cout <<
"The MeanFreePath table is built"
227 G4cout <<
"G4LowEnergyIonisation::BuildPhysicsTable end"
257 size_t binForFluo = totBin/10;
270 for (
size_t m=0;
m<numOfCouples;
m++) {
283 if(tCut > highKineticEnergy) tCut = highKineticEnergy;
287 const G4double* theAtomicNumDensityVector =
290 G4cout <<
"Energy loss for material # " <<
m
291 <<
" tCut(keV)= " << tCut/
keV
296 for (
size_t i = 0; i<totBin; i++) {
302 for (
size_t iel=0; iel<NumberOfElements; iel++ ) {
304 G4int Z = (
G4int)((*theElementVector)[iel]->GetZ());
313 ionloss += e * cs * theAtomicNumDensityVector[iel];
315 if(
verboseLevel > 1 || (Z == 14 && lowEdgeEnergy>1. && lowEdgeEnergy<0.)) {
318 <<
" E(keV)= " << lowEdgeEnergy/
keV
319 <<
" Eav(keV)= " << e/
keV
321 <<
" loss= " << ionloss
322 <<
" rho= " << theAtomicNumDensityVector[iel]
327 ionloss += esp * theAtomicNumDensityVector[iel];
330 if(
verboseLevel > 1 || (
m == 0 && lowEdgeEnergy>=1. && lowEdgeEnergy<=0.)) {
332 <<
" E(keV)= " << lowEdgeEnergy/
keV
333 <<
" loss(MeV/mm)= " << ionloss*
mm/
MeV
344 for (
size_t iel=0; iel<NumberOfElements; iel++ ) {
346 G4int Z = (
G4int)((*theElementVector)[iel]->GetZ());
350 for (
size_t j = 0; j<binForFluo; j++) {
364 eAverage += e * cs * theAtomicNumDensityVector[iel];
365 cross += cs * pro * theAtomicNumDensityVector[iel];
369 <<
" E(keV)= " << lowEdgeEnergy/
keV
370 <<
" Eav(keV)= " << e/
keV
379 coeff = cross/eAverage;
384 G4cout <<
"Ksi Coefficient for Z= " << Z
385 <<
" E(keV)= " << lowEdgeEnergy/
keV
386 <<
" Eav(keV)= " << eAverage/
keV
387 <<
" coeff= " << coeff
391 energy->push_back(lowEdgeEnergy);
392 ksi->push_back(coeff);
434 kineticEnergy, shell);
448 / (deltaMom * primaryMom);
450 if (cost > 1.) cost = 1.;
451 G4double sint = std::sqrt(1. - cost*cost);
453 G4double dirx = sint * std::cos(phi);
454 G4double diry = sint * std::sin(phi);
460 deltaDir.
rotateUz(primaryDirection);
470 sint = std::sqrt(1. - cost*cost);
474 dirx += del* sint * std::cos(phi);
475 diry += del* sint * std::sin(phi);
479 G4double finalPx = primaryMom*primaryDirection.
x() - deltaMom*dirx;
480 G4double finalPy = primaryMom*primaryDirection.
y() - deltaMom*diry;
481 G4double finalPz = primaryMom*primaryDirection.
z() - deltaMom*dirz;
486 G4double norm = 1.0/std::sqrt(dirx*dirx + diry*diry + dirz*dirz);
498 G4double finalKinEnergy = kineticEnergy - tDelta - theEnergyDeposit;
499 if(finalKinEnergy < 0.0) {
500 theEnergyDeposit += finalKinEnergy;
501 finalKinEnergy = 0.0;
506 G4double norm = 1.0/std::sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz);
516 size_t nSecondaries = 0;
517 size_t totalNumber = 1;
518 std::vector<G4DynamicParticle*>* secondaryVector = 0;
529 if (secondaryVector != 0) {
531 nSecondaries = secondaryVector->size();
532 for (
size_t i = 0; i<nSecondaries; i++) {
534 aSecondary = (*secondaryVector)[i];
539 if (e < theEnergyDeposit &&
543 theEnergyDeposit -=
e;
549 (*secondaryVector)[i] = 0;
563 if (secondaryVector) {
565 for (
size_t l = 0; l < nSecondaries; l++) {
567 aSecondary = (*secondaryVector)[l];
574 delete secondaryVector;
577 if(theEnergyDeposit < 0.) {
578 G4cout <<
"G4LowEnergyIonisation: Negative energy deposit: "
579 << theEnergyDeposit/
eV <<
" eV" <<
G4endl;
580 theEnergyDeposit = 0.0;
590 G4String comments =
"Total cross sections from EEDL database.";
591 comments +=
"\n Gamma energy sampled from a parametrised formula.";
592 comments +=
"\n Implementation of the continuous dE/dx part.";
593 comments +=
"\n At present it can be used for electrons ";
594 comments +=
"in the energy range [250eV,100GeV].";
595 comments +=
"\n The process must work with G4LowEnergyBremsstrahlung.";
605 std::vector<G4DynamicParticle*>*
613 std::vector<G4DynamicParticle*>* partVector =
614 new std::vector<G4DynamicParticle*>;
624 std::vector<G4DynamicParticle*>* secVector = 0;
629 G4int shell, shellId;
634 std::vector<G4int>
n =
636 incidentEnergy,eLoss);
637 for (
size_t i=0; i<nElements; i++) {
640 size_t nVacancies = n[i];
646 for (
size_t j=0; j<nVacancies; j++) {
649 shellId = transitionManager->
Shell(Z, shell)->
ShellId();
657 if (secVector != 0) {
659 for (
size_t l = 0; l<secVector->size(); l++) {
661 aSecondary = (*secVector)[l];
662 if (aSecondary != 0) {
666 if ( eTot + e <= eLoss &&
671 partVector->push_back(aSecondary);
G4RDVEnergySpectrum * energySpectrum
virtual G4double AverageEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
static G4PhysicsTable ** RecorderOfPositronProcess
static G4double GetUpperBoundEloss()
G4double GetKineticEnergy() const
std::vector< G4DynamicParticle * > * GenerateParticles(G4int Z, G4int shellId)
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
G4int NumberOfShells(G4int Z) const
void BuildDEDXTable(const G4ParticleDefinition &aParticleType)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
static constexpr double MeV
G4double GetLowEdgeEnergy(size_t binNumber) const
void ActivateAuger(G4bool val)
void SetKineticEnergy(G4double aEnergy)
static constexpr double keV
static constexpr double mm
G4RDVCrossSectionHandler * crossSectionHandler
std::vector< G4int > GenerateNumberOfIonisations(const G4MaterialCutsCouple *couple, G4double incidentEnergy, G4double eLoss) const
virtual void AddComponent(G4RDVEMDataSet *dataSet)=0
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void BuildLossTable(const G4ParticleDefinition &ParticleType)
const G4ElementVector * GetElementVector() const
void SetCutForAugerElectrons(G4double cut)
G4bool Fluorescence() const
virtual std::vector< G4DynamicParticle * > * DeexciteAtom(const G4MaterialCutsCouple *couple, G4double incidentEnergy, G4double eLoss)
virtual G4double Excitation(G4int Z, G4double kineticEnergy) const =0
Hep3Vector & rotateUz(const Hep3Vector &)
void SetCutForLowEnSecElectrons(G4double cut)
virtual void PrintData(void) const =0
static G4double GetLowerBoundEloss()
void ActivateAugerElectronProduction(G4bool val)
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
G4RDAtomicDeexcitation deexcitationManager
void AddSecondary(G4Track *aSecondary)
void AddXsiTable(G4RDVEMDataSet *set)
G4RDVEMDataSet * theMeanFreePath
G4ParticleChange aParticleChange
void SetMomentumDirection(const G4ThreeVector &aDirection)
const XML_Char const XML_Char * data
static constexpr double m
void SetCutForSecondaryPhotons(G4double cut)
static G4int CounterOfPositronProcess
G4ParticleDefinition * GetDefinition() const
static G4RDAtomicTransitionManager * Instance()
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
virtual void Initialize(const G4Track &)
G4RDShellVacancy * shellVacancy
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
static constexpr double electron_mass_c2
G4PhysicsTable * theLossTable
static G4PhysicsTable ** RecorderOfElectronProcess
G4RDAtomicShell * Shell(G4int Z, size_t shellIndex) const
static G4int GetNbinEloss()
static constexpr double twopi
const G4String & GetProcessName() const
G4int SelectRandomShell(G4int Z, G4double e) const
virtual G4double MaxEnergyOfSecondaries(G4double kineticEnergy, G4int Z=0, const G4ParticleDefinition *pd=0) const =0
void SetCutForLowEnSecPhotons(G4double cut)
static constexpr double eV
void ProposeEnergy(G4double finalEnergy)
G4double BindingEnergy() const
static G4Electron * Electron()
size_t GetTableSize() const
void PrintInfoDefinition()
G4LowEnergyIonisation(const G4String &processName="LowEnergyIoni")
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
static G4ProductionCutsTable * GetProductionCutsTable()
std::vector< G4Element * > G4ElementVector
void insert(G4PhysicsVector *)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetKineticEnergy() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void LoadShellData(const G4String &dataFile)
G4GLOB_DLL std::ostream G4cout
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4int CounterOfElectronProcess
G4bool IsApplicable(const G4ParticleDefinition &)
const G4Material * GetMaterial() const
const G4double * GetAtomicNumDensityVector() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void BuildPhysicsTable(const G4ParticleDefinition &ParticleType)
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const =0
const G4ThreeVector & GetMomentumDirection() const
G4double bindingEnergy(G4int A, G4int Z)
void ProposeTrackStatus(G4TrackStatus status)
G4double FindValue(G4int Z, G4double e) const
void PutValue(size_t index, G4double theValue)
size_t GetNumberOfElements() const
virtual void PrintData() const =0
virtual G4double Probability(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
void SetNumberOfSecondaries(G4int totSecondaries)