127 crossSectionHandler(0),
132 cutForPhotons = 250.0*
eV;
133 cutForElectrons = 250.0*
eV;
140 delete crossSectionHandler;
141 delete energySpectrum;
142 delete theMeanFreePath;
150 G4cout <<
"G4LowEnergyIonisation::BuildPhysicsTable start"
157 if( energySpectrum != 0 )
delete energySpectrum;
161 G4cout <<
"G4RDVEnergySpectrum is initialized"
167 if ( crossSectionHandler != 0 )
delete crossSectionHandler;
181 <<
" is created; Cross section data: "
191 BuildLossTable(aParticleType);
194 G4cout <<
"The loss table is built"
212 if( theMeanFreePath )
delete theMeanFreePath;
213 theMeanFreePath = crossSectionHandler->
214 BuildMeanFreePathForMaterials(&cutForDelta);
217 G4cout <<
"The MeanFreePath table is built"
227 G4cout <<
"G4LowEnergyIonisation::BuildPhysicsTable end"
253 if (shellVacancy != 0)
delete shellVacancy;
257 size_t binForFluo = totBin/10;
270 for (
size_t m=0;
m<numOfCouples;
m++) {
283 if(tCut > highKineticEnergy) tCut = highKineticEnergy;
284 cutForDelta.push_back(tCut);
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;
524 if (
Fluorescence() && Z > 5 && (bindingEnergy >= cutForPhotons
525 || bindingEnergy >= cutForElectrons)) {
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*>;
616 if(eLoss > cutForPhotons && eLoss > cutForElectrons) {
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];
644 if (nVacancies && Z > 5 && (maxE>cutForPhotons || maxE>cutForElectrons)) {
646 for (
size_t j=0; j<nVacancies; j++) {
649 shellId = transitionManager->
Shell(Z, shell)->
ShellId();
653 if (maxEShell>cutForPhotons || maxEShell>cutForElectrons ) {
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);
709 cutForElectrons = cut;
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 *)
void ActivateAugerElectronProduction(G4bool val)
G4double GetKineticEnergy() const
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
Hep3Vector & rotateUz(const Hep3Vector &)
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)
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()
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()
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)
virtual G4double SampleEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0
const XML_Char const XML_Char * data
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