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);
444 G4double deltaMom = std::sqrt(deltaKinE*(deltaKinE + 2.0*electron_mass_c2));
445 G4double primaryMom = std::sqrt(primaryKinE*(primaryKinE + 2.0*electron_mass_c2));
447 G4double cost = deltaKinE * (primaryKinE + 2.0*electron_mass_c2)
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);
472 G4double del = std::sqrt(bindingEnergy *(bindingEnergy + 2.0*electron_mass_c2))
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++) {
639 G4int Z = (
G4int)((*theElementVector)[i]->GetZ());
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);
G4RDShellVacancy * shellVacancy
virtual G4double Excitation(G4int Z, G4double kineticEnergy) const =0
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
void AddXsiTable(G4RDVEMDataSet *set)
void SetCutForSecondaryPhotons(G4double cut)
std::vector< G4DynamicParticle * > * GenerateParticles(G4int Z, G4int shellId)
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
std::vector< G4Element * > G4ElementVector
void ActivateAuger(G4bool val)
void insert(G4PhysicsVector *)
G4RDVEnergySpectrum * energySpectrum
void ActivateAugerElectronProduction(G4bool val)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
static G4int CounterOfElectronProcess
G4bool Fluorescence() const
virtual std::vector< G4DynamicParticle * > * DeexciteAtom(const G4MaterialCutsCouple *couple, G4double incidentEnergy, G4double eLoss)
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void LoadShellData(const G4String &dataFile)
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const =0
void SetMomentumDirection(const G4ThreeVector &aDirection)
G4ParticleDefinition * GetDefinition() const
static G4double GetLowerBoundEloss()
G4double FindValue(G4int Z, G4double e) const
G4double GetLowEdgeEnergy(size_t binNumber) const
const G4ElementVector * GetElementVector() const
void BuildPhysicsTable(const G4ParticleDefinition &ParticleType)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static G4RDAtomicTransitionManager * Instance()
std::vector< G4int > GenerateNumberOfIonisations(const G4MaterialCutsCouple *couple, G4double incidentEnergy, G4double eLoss) const
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
size_t GetTableSize() const
G4bool IsApplicable(const G4ParticleDefinition &)
void SetCutForLowEnSecPhotons(G4double cut)
G4double BindingEnergy() const
G4int SelectRandomShell(G4int Z, G4double e) const
void PutValue(size_t index, G4double theValue)
void BuildDEDXTable(const G4ParticleDefinition &aParticleType)
G4LowEnergyIonisation(const G4String &processName="LowEnergyIoni")
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual void PrintData(void) const =0
virtual void PrintData() const =0
const G4String & GetProcessName() const
const G4double * GetAtomicNumDensityVector() const
void SetKineticEnergy(G4double aEnergy)
G4RDAtomicDeexcitation deexcitationManager
void SetCutForLowEnSecElectrons(G4double cut)
static G4PhysicsTable ** RecorderOfPositronProcess
virtual void Initialize(const G4Track &)
static G4ProductionCutsTable * GetProductionCutsTable()
static G4double GetUpperBoundEloss()
virtual G4double AverageEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
G4int NumberOfShells(G4int Z) const
static G4PhysicsTable ** RecorderOfElectronProcess
const G4ThreeVector & GetMomentumDirection() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
void PrintInfoDefinition()
G4double energy(const ThreeVector &p, const G4double m)
void SetNumberOfSecondaries(G4int totSecondaries)
static G4int GetNbinEloss()
void SetCutForAugerElectrons(G4double cut)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
void ProposeEnergy(G4double finalEnergy)
G4ParticleChange aParticleChange
G4RDAtomicShell * Shell(G4int Z, size_t shellIndex) const
void AddSecondary(G4Track *aSecondary)
static G4Electron * Electron()
G4RDVEMDataSet * theMeanFreePath
size_t GetNumberOfElements() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4PhysicsTable * theLossTable
static G4int CounterOfPositronProcess
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeTrackStatus(G4TrackStatus status)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
virtual void AddComponent(G4RDVEMDataSet *dataSet)=0
G4double bindingEnergy(G4int A, G4int Z)
void BuildLossTable(const G4ParticleDefinition &ParticleType)
G4RDVCrossSectionHandler * crossSectionHandler
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
const G4Material * GetMaterial() const
virtual G4double Probability(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
virtual G4double MaxEnergyOfSecondaries(G4double kineticEnergy, G4int Z=0, const G4ParticleDefinition *pd=0) const =0