Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Friends
G4ScreenedNuclearRecoil Class Reference

A process which handles screened Coulomb collisions between nuclei. More...

#include <G4ScreenedNuclearRecoil.hh>

Inheritance diagram for G4ScreenedNuclearRecoil:
G4ScreenedCoulombCrossSectionInfo G4VDiscreteProcess G4VProcess

Public Member Functions

 G4ScreenedNuclearRecoil (const G4String &processName="ScreenedElastic", const G4String &ScreeningKey="zbl", G4bool GenerateRecoils=1, G4double RecoilCutoff=100.0 *CLHEP::eV, G4double PhysicsCutoff=10.0 *CLHEP::eV)
 Construct the process and set some physics parameters for it. More...
 
virtual ~G4ScreenedNuclearRecoil ()
 destructor More...
 
virtual G4double GetMeanFreePath (const G4Track &, G4double, G4ForceCondition *)
 used internally by Geant4 machinery More...
 
virtual G4VParticleChangePostStepDoIt (const G4Track &aTrack, const G4Step &aStep)
 used internally by Geant4 machinery More...
 
virtual G4bool IsApplicable (const G4ParticleDefinition &aParticleType)
 test if a prticle of type aParticleType can use this process More...
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &aParticleType)
 Build physics tables in advance. Not Implemented. More...
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &aParticleType)
 Export physics tables for persistency. Not Implemented. More...
 
virtual G4bool CheckNuclearCollision (G4double A, G4double A1, G4double apsis)
 deterine if the moving particle is within the strong force range of the selected nucleus More...
 
virtual
G4ScreenedCoulombCrossSection
GetNewCrossSectionHandler (void)
 
G4double GetNIEL () const
 Get non-ionizing energy loss for last step. More...
 
void ResetTables ()
 clear precomputed screening tables More...
 
void SetMaxEnergyForScattering (G4double energy)
 set the upper energy beyond which this process has no cross section More...
 
std::string GetScreeningKey () const
 find out what screening funciton we are using More...
 
void AllowEnergyDeposition (G4bool flag)
 enable or disable all energy deposition by this process More...
 
G4bool GetAllowEnergyDeposition () const
 get flag indicating whether deposition is enabled More...
 
void EnableRecoils (G4bool flag)
 enable or disable the generation of recoils. If recoils are disabled, the energy they would have received is just deposited. More...
 
G4bool GetEnableRecoils () const
 find out if generation of recoils is enabled. More...
 
void SetMFPScaling (G4double scale)
 set the mean free path scaling as specified More...
 
G4double GetMFPScaling () const
 get the MFPScaling parameter More...
 
void AvoidNuclearReactions (G4bool flag)
 enable or disable whether this process will skip collisions which are close enough they need hadronic phsyics. Default is true (skip close collisions). Disabling this results in excess nuclear stopping power. More...
 
G4bool GetAvoidNuclearReactions () const
 get the flag indicating whether hadronic collisions are ignored. More...
 
void SetRecoilCutoff (G4double energy)
 set the minimum energy (per nucleon) at which recoils can be generated, and the energy (per nucleon) below which all ions are stopped. More...
 
G4double GetRecoilCutoff () const
 get the recoil cutoff More...
 
void SetPhysicsCutoff (G4double energy)
 set the energy to which screening tables are computed. Typically, this is 10 eV or so, and not often changed. More...
 
G4double GetPhysicsCutoff () const
 get the physics cutoff energy. More...
 
void SetNIELPartitionFunction (const G4VNIELPartition *part)
 set the pointer to a class for paritioning energy into NIEL More...
 
void SetCrossSectionHardening (G4double fraction, G4double HardeningFactor)
 set the cross section boost to provide faster computation of backscattering More...
 
G4double GetHardeningFraction () const
 get the fraction of particles which will have boosted scattering More...
 
G4double GetHardeningFactor () const
 get the boost factor in use. More...
 
G4double GetCurrentInteractionLength () const
 the the interaciton length used in the last scattering. More...
 
void SetExternalCrossSectionHandler (G4ScreenedCoulombCrossSection *cs)
 set a function to compute screening tables, if the user needs non-standard behavior. More...
 
G4int GetVerboseLevel () const
 get the verbosity. More...
 
std::map< G4int,
G4ScreenedCoulombCrossSection * > & 
GetCrossSectionHandlers ()
 
void ClearStages (void)
 
void AddStage (G4ScreenedCollisionStage *stage)
 
G4CoulombKinematicsInfoGetKinematics ()
 
void SetValidCollision (G4bool flag)
 
G4bool GetValidCollision () const
 
class G4ParticleChangeGetParticleChange ()
 get the pointer to our ParticleChange object. for internal use, primarily. More...
 
void DepositEnergy (G4int z1, G4double a1, const G4Material *material, G4double energy)
 take the given energy, and use the material information to partition it into NIEL and ionizing energy. More...
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
virtual G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
virtual G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &, G4bool)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void StartTracking (G4Track *)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Attributes

G4double highEnergyLimit
 the energy per nucleon above which the MFP is constant More...
 
G4double lowEnergyLimit
 the energy per nucleon below which the MFP is zero More...
 
G4double processMaxEnergy
 the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC More...
 
G4String screeningKey
 
G4bool generateRecoils
 
G4bool avoidReactions
 
G4double recoilCutoff
 
G4double physicsCutoff
 
G4bool registerDepositedEnergy
 
G4double IonizingLoss
 
G4double NIEL
 
G4double MFPScale
 
G4double hardeningFraction
 
G4double hardeningFactor
 
G4ScreenedCoulombCrossSectionexternalCrossSectionConstructor
 
std::vector
< G4ScreenedCollisionStage * > 
collisionStages
 
std::map< G4int,
G4ScreenedCoulombCrossSection * > 
crossSectionHandlers
 
G4bool validCollision
 
G4CoulombKinematicsInfo kinematics
 
const G4VNIELPartitionNIELPartitionFunction
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChangepParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Friends

class G4ScreenedCollisionStage
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Detailed Description

A process which handles screened Coulomb collisions between nuclei.

Definition at line 192 of file G4ScreenedNuclearRecoil.hh.

Constructor & Destructor Documentation

G4ScreenedNuclearRecoil::G4ScreenedNuclearRecoil ( const G4String processName = "ScreenedElastic",
const G4String ScreeningKey = "zbl",
G4bool  GenerateRecoils = 1,
G4double  RecoilCutoff = 100.0*CLHEP::eV,
G4double  PhysicsCutoff = 10.0*CLHEP::eV 
)

Construct the process and set some physics parameters for it.

Parameters
processNamethe name to assign the process
ScreeningKeythe name of a screening function to use. The default functions are "zbl" (recommended for soft scattering), "lj" (recommended for backscattering) and "mol" (Moliere potential)
GenerateRecoilsif frue, ions struck by primary are converted into new moving particles. If false, energy is deposited, but no new moving ions are created.
RecoilCutoffenergy below which no new moving particles will be created, even if GenerateRecoils is true. Also, a moving primary particle will be stopped if its energy falls below this limit.
PhysicsCutoffthe energy transfer to which screening tables are calucalted. There is no really compelling reason to change it from the 10.0 eV default. However, see the paper on running this in thin targets for further discussion, and its interaction with SetMFPScaling()

Definition at line 289 of file G4ScreenedNuclearRecoil.cc.

References AddStage(), fCoulombScattering, highEnergyLimit, lowEnergyLimit, python.hepunit::MeV, MFPScale, physicsCutoff, processMaxEnergy, registerDepositedEnergy, and G4VProcess::SetProcessSubType().

292  :
293  G4VDiscreteProcess(processName, fElectromagnetic),
294  screeningKey(ScreeningKey),
295  generateRecoils(GenerateRecoils), avoidReactions(1),
296  recoilCutoff(RecoilCutoff), physicsCutoff(PhysicsCutoff),
300 {
301  // for now, point to class instance of this. Doing it by creating a new one fails
302  // to correctly update NIEL
303  // not even this is needed... done in G4VProcess().
304  // pParticleChange=&aParticleChange;
305  processMaxEnergy=50000.0*MeV;
306  highEnergyLimit=100.0*MeV;
308  registerDepositedEnergy=1; // by default, don't hide NIEL
309  MFPScale=1.0;
310  // SetVerboseLevel(2);
314 }
void AddStage(G4ScreenedCollisionStage *stage)
G4double highEnergyLimit
the energy per nucleon above which the MFP is constant
const G4VNIELPartition * NIELPartitionFunction
G4ScreenedCoulombCrossSection * externalCrossSectionConstructor
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
G4double lowEnergyLimit
the energy per nucleon below which the MFP is zero
G4double processMaxEnergy
the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC ...
G4ScreenedNuclearRecoil::~G4ScreenedNuclearRecoil ( )
virtual

destructor

Definition at line 353 of file G4ScreenedNuclearRecoil.cc.

References ResetTables().

354 {
355  ResetTables();
356 }
void ResetTables()
clear precomputed screening tables

Member Function Documentation

void G4ScreenedNuclearRecoil::AddStage ( G4ScreenedCollisionStage stage)
inline

Definition at line 317 of file G4ScreenedNuclearRecoil.hh.

References collisionStages.

Referenced by G4ScreenedNuclearRecoil().

317 { collisionStages.push_back(stage); }
std::vector< G4ScreenedCollisionStage * > collisionStages
void G4ScreenedNuclearRecoil::AllowEnergyDeposition ( G4bool  flag)
inline

enable or disable all energy deposition by this process

Parameters
flagif true, enable deposition of energy (the default). If false, disable deposition.

Definition at line 255 of file G4ScreenedNuclearRecoil.hh.

References registerDepositedEnergy.

void G4ScreenedNuclearRecoil::AvoidNuclearReactions ( G4bool  flag)
inline

enable or disable whether this process will skip collisions which are close enough they need hadronic phsyics. Default is true (skip close collisions). Disabling this results in excess nuclear stopping power.

Parameters
flagtrue results in hard collisions being skipped. false allows hard collisions.

Definition at line 276 of file G4ScreenedNuclearRecoil.hh.

References avoidReactions.

void G4ScreenedNuclearRecoil::BuildPhysicsTable ( const G4ParticleDefinition aParticleType)
virtual

Build physics tables in advance. Not Implemented.

Parameters
aParticleTypethe type of particle to build tables for

Reimplemented from G4VProcess.

Definition at line 707 of file G4ScreenedNuclearRecoil.cc.

References G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), python.hepunit::MeV, and processMaxEnergy.

708 {
709  G4String nam = aParticleType.GetParticleName();
710  if(nam == "GenericIon" || nam == "proton"
711  || nam == "deuteron" || nam == "triton" || nam == "alpha" || nam == "He3") {
712  G4cout << G4endl << GetProcessName() << ": for " << nam
713  << " SubType= " << GetProcessSubType()
714  << " maxEnergy(MeV)= " << processMaxEnergy/MeV << G4endl;
715  }
716 }
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
#define G4endl
Definition: G4ios.hh:61
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
G4double processMaxEnergy
the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC ...
G4bool G4ScreenedNuclearRecoil::CheckNuclearCollision ( G4double  A,
G4double  A1,
G4double  apsis 
)
virtual

deterine if the moving particle is within the strong force range of the selected nucleus

Parameters
Athe nucleon number of the beam
A1the nucleon number of the target
apsisthe distance of closest approach

Definition at line 359 of file G4ScreenedNuclearRecoil.cc.

References avoidReactions, and python.hepunit::fermi.

Referenced by G4ScreenedCoulombClassicalKinematics::DoScreeningComputation().

360  {
361  return avoidReactions && (apsis < (1.1*(std::pow(A,1.0/3.0)+std::pow(a1,1.0/3.0)) + 1.4)*fermi);
362  // nuclei are within 1.4 fm (reduced pion Compton wavelength) of each other at apsis,
363  // this is hadronic, skip it
364 }
void G4ScreenedNuclearRecoil::ClearStages ( void  )

Definition at line 326 of file G4ScreenedNuclearRecoil.cc.

References collisionStages.

327 {
328  // I don't think I like deleting the processes here... they are better abandoned
329  // if the creator doesn't get rid of them
330  // std::vector<G4ScreenedCollisionStage *>::iterator stage=collisionStages.begin();
331  //for(; stage != collisionStages.end(); stage++) delete (*stage);
332 
333  collisionStages.clear();
334 }
std::vector< G4ScreenedCollisionStage * > collisionStages
void G4ScreenedNuclearRecoil::DepositEnergy ( G4int  z1,
G4double  a1,
const G4Material material,
G4double  energy 
)

take the given energy, and use the material information to partition it into NIEL and ionizing energy.

Definition at line 342 of file G4ScreenedNuclearRecoil.cc.

References energy(), IonizingLoss, NIEL, NIELPartitionFunction, and G4VNIELPartition::PartitionNIEL().

Referenced by G4ScreenedCoulombClassicalKinematics::DoCollisionStep(), and PostStepDoIt().

343 {
344  if(!NIELPartitionFunction) {
346  } else {
347  G4double part=NIELPartitionFunction->PartitionNIEL(z1, a1, material, energy);
348  IonizingLoss+=energy*(1-part);
349  NIEL += energy*part;
350  }
351 }
const G4VNIELPartition * NIELPartitionFunction
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
double G4double
Definition: G4Types.hh:76
virtual G4double PartitionNIEL(G4int z1, G4double a1, const G4Material *material, G4double energy) const =0
void G4ScreenedNuclearRecoil::DumpPhysicsTable ( const G4ParticleDefinition aParticleType)
virtual

Export physics tables for persistency. Not Implemented.

Parameters
aParticleTypethe type of particle to build tables for

Definition at line 720 of file G4ScreenedNuclearRecoil.cc.

721 {
722 }
void G4ScreenedNuclearRecoil::EnableRecoils ( G4bool  flag)
inline

enable or disable the generation of recoils. If recoils are disabled, the energy they would have received is just deposited.

Parameters
flagif true, create recoil ions in cases in which the energy is above the recoilCutoff. If false, just deposit the energy.

Definition at line 262 of file G4ScreenedNuclearRecoil.hh.

References generateRecoils.

G4bool G4ScreenedNuclearRecoil::GetAllowEnergyDeposition ( ) const
inline

get flag indicating whether deposition is enabled

Definition at line 257 of file G4ScreenedNuclearRecoil.hh.

References registerDepositedEnergy.

G4bool G4ScreenedNuclearRecoil::GetAvoidNuclearReactions ( ) const
inline

get the flag indicating whether hadronic collisions are ignored.

Definition at line 278 of file G4ScreenedNuclearRecoil.hh.

References avoidReactions.

std::map<G4int, G4ScreenedCoulombCrossSection*>& G4ScreenedNuclearRecoil::GetCrossSectionHandlers ( )
inline

Definition at line 314 of file G4ScreenedNuclearRecoil.hh.

References crossSectionHandlers.

Referenced by PostStepDoIt().

315  { return crossSectionHandlers; }
std::map< G4int, G4ScreenedCoulombCrossSection * > crossSectionHandlers
G4double G4ScreenedNuclearRecoil::GetCurrentInteractionLength ( ) const
inline

the the interaciton length used in the last scattering.

Definition at line 305 of file G4ScreenedNuclearRecoil.hh.

References G4VProcess::currentInteractionLength.

Referenced by PostStepDoIt().

305 { return currentInteractionLength; }
G4double currentInteractionLength
Definition: G4VProcess.hh:297
G4bool G4ScreenedNuclearRecoil::GetEnableRecoils ( ) const
inline

find out if generation of recoils is enabled.

Definition at line 264 of file G4ScreenedNuclearRecoil.hh.

References generateRecoils.

Referenced by G4ScreenedCoulombClassicalKinematics::DoCollisionStep().

G4double G4ScreenedNuclearRecoil::GetHardeningFactor ( ) const
inline

get the boost factor in use.

Definition at line 303 of file G4ScreenedNuclearRecoil.hh.

References hardeningFactor.

Referenced by PostStepDoIt().

G4double G4ScreenedNuclearRecoil::GetHardeningFraction ( ) const
inline

get the fraction of particles which will have boosted scattering

Definition at line 301 of file G4ScreenedNuclearRecoil.hh.

References hardeningFraction.

Referenced by PostStepDoIt().

G4CoulombKinematicsInfo& G4ScreenedNuclearRecoil::GetKinematics ( )
inline
G4double G4ScreenedNuclearRecoil::GetMeanFreePath ( const G4Track track,
G4double  ,
G4ForceCondition cond 
)
virtual

used internally by Geant4 machinery

Implements G4VDiscreteProcess.

Definition at line 374 of file G4ScreenedNuclearRecoil.cc.

References python.hepunit::amu_c2, G4ScreenedCoulombCrossSection::BuildMFPTables(), crossSectionHandlers, DBL_MAX, energy(), python.hepunit::eplus, Forced, G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4Material::GetIndex(), G4DynamicParticle::GetKineticEnergy(), G4MaterialCutsCouple::GetMaterial(), G4Track::GetMaterialCutsCouple(), GetNewCrossSectionHandler(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), highEnergyLimit, G4ScreenedCoulombCrossSection::LoadData(), lowEnergyLimit, G4INCL::Math::max(), MFPScale, G4INCL::Math::min(), NotForced, physicsCutoff, processMaxEnergy, recoilCutoff, screeningKey, c2_function< float_type >::xmax(), and c2_function< float_type >::xmin().

377 {
378  const G4DynamicParticle* incoming = track.GetDynamicParticle();
379  G4double energy = incoming->GetKineticEnergy();
380  G4double a1=incoming->GetDefinition()->GetPDGMass()/amu_c2;
381 
382  G4double meanFreePath;
383  *cond=NotForced;
384 
385  if (energy < lowEnergyLimit || energy < recoilCutoff*a1) {
386  *cond=Forced;
387  return 1.0*nm; /* catch and stop slow particles to collect their NIEL! */
388  } else if (energy > processMaxEnergy*a1) {
389  return DBL_MAX; // infinite mean free path
390  } else if (energy > highEnergyLimit*a1) energy=highEnergyLimit*a1; /* constant MFP at high energy */
391 
392  G4double fz1=incoming->GetDefinition()->GetPDGCharge();
393  G4int z1=(G4int)(fz1/eplus + 0.5);
394 
395  std::map<G4int, G4ScreenedCoulombCrossSection*>::iterator xh=
396  crossSectionHandlers.find(z1);
398 
399  if (xh==crossSectionHandlers.end()) {
401  xs->LoadData(screeningKey, z1, a1, physicsCutoff);
402  xs->BuildMFPTables();
403  } else xs=(*xh).second;
404 
405  const G4MaterialCutsCouple* materialCouple = track.GetMaterialCutsCouple();
406  size_t materialIndex = materialCouple->GetMaterial()->GetIndex();
407 
408  const G4_c2_function &mfp=*(*xs)[materialIndex];
409 
410  // make absolutely certain we don't get an out-of-range energy
411  meanFreePath = mfp(std::min(std::max(energy, mfp.xmin()), mfp.xmax()));
412 
413  // G4cout << "MFP: " << meanFreePath << " index " << materialIndex << " energy " << energy << " MFPScale " << MFPScale << G4endl;
414 
415  return meanFreePath*MFPScale;
416 }
virtual void LoadData(G4String screeningKey, G4int z1, G4double m1, G4double recoilCutoff)=0
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
G4double highEnergyLimit
the energy per nucleon above which the MFP is constant
size_t GetIndex() const
Definition: G4Material.hh:260
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
std::map< G4int, G4ScreenedCoulombCrossSection * > crossSectionHandlers
G4double lowEnergyLimit
the energy per nucleon below which the MFP is zero
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
virtual G4ScreenedCoulombCrossSection * GetNewCrossSectionHandler(void)
double G4double
Definition: G4Types.hh:76
float amu_c2
Definition: hepunit.py:277
G4double GetPDGCharge() const
float_type xmax() const
return the upper bound of the domain for this function as set by set_domain()
Definition: c2_function.hh:299
#define DBL_MAX
Definition: templates.hh:83
float_type xmin() const
return the lower bound of the domain for this function as set by set_domain()
Definition: c2_function.hh:297
const G4Material * GetMaterial() const
G4double processMaxEnergy
the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC ...
G4double G4ScreenedNuclearRecoil::GetMFPScaling ( ) const
inline

get the MFPScaling parameter

Definition at line 271 of file G4ScreenedNuclearRecoil.hh.

References MFPScale.

271 { return MFPScale; }
G4ScreenedCoulombCrossSection * G4ScreenedNuclearRecoil::GetNewCrossSectionHandler ( void  )
virtual
G4double G4ScreenedNuclearRecoil::GetNIEL ( ) const
inline

Get non-ionizing energy loss for last step.

Definition at line 239 of file G4ScreenedNuclearRecoil.hh.

References NIEL.

239 { return NIEL; }
class G4ParticleChange& G4ScreenedNuclearRecoil::GetParticleChange ( )
inline

get the pointer to our ParticleChange object. for internal use, primarily.

Definition at line 323 of file G4ScreenedNuclearRecoil.hh.

Referenced by G4ScreenedCoulombClassicalKinematics::DoCollisionStep(), G4SingleScatter::DoCollisionStep(), and PostStepDoIt().

323 { return static_cast<G4ParticleChange &>(*pParticleChange); }
G4double G4ScreenedNuclearRecoil::GetPhysicsCutoff ( ) const
inline

get the physics cutoff energy.

Definition at line 289 of file G4ScreenedNuclearRecoil.hh.

References physicsCutoff.

289 { return physicsCutoff; }
G4double G4ScreenedNuclearRecoil::GetRecoilCutoff ( ) const
inline

get the recoil cutoff

Definition at line 284 of file G4ScreenedNuclearRecoil.hh.

References recoilCutoff.

Referenced by G4ScreenedCoulombClassicalKinematics::DoCollisionStep(), and PostStepDoIt().

284 { return recoilCutoff; }
std::string G4ScreenedNuclearRecoil::GetScreeningKey ( ) const
inline

find out what screening funciton we are using

Definition at line 252 of file G4ScreenedNuclearRecoil.hh.

References screeningKey.

252 { return screeningKey; }
G4bool G4ScreenedNuclearRecoil::GetValidCollision ( ) const
inline
G4int G4ScreenedNuclearRecoil::GetVerboseLevel ( ) const
inline

get the verbosity.

Definition at line 312 of file G4ScreenedNuclearRecoil.hh.

References G4VProcess::verboseLevel.

Referenced by PostStepDoIt().

312 { return verboseLevel; }
G4int verboseLevel
Definition: G4VProcess.hh:368
G4bool G4ScreenedNuclearRecoil::IsApplicable ( const G4ParticleDefinition aParticleType)
virtual

test if a prticle of type aParticleType can use this process

Parameters
aParticleTypethe particle to test

Reimplemented from G4VProcess.

Definition at line 698 of file G4ScreenedNuclearRecoil.cc.

References G4ParticleDefinition::GetParticleType(), and G4Proton::Proton().

699 {
700  return aParticleType == *(G4Proton::Proton()) ||
701  aParticleType.GetParticleType() == "nucleus" ||
702  aParticleType.GetParticleType() == "static_nucleus";
703 }
static G4Proton * Proton()
Definition: G4Proton.cc:93
const G4String & GetParticleType() const
G4VParticleChange * G4ScreenedNuclearRecoil::PostStepDoIt ( const G4Track aTrack,
const G4Step aStep 
)
virtual

used internally by Geant4 machinery

Reimplemented from G4VDiscreteProcess.

Definition at line 418 of file G4ScreenedNuclearRecoil.cc.

References G4CoulombKinematicsInfo::a1, G4CoulombKinematicsInfo::a2, python.hepunit::amu_c2, python.hepunit::angstrom, collisionStages, G4CoulombKinematicsInfo::crossSection, DepositEnergy(), python.hepunit::eplus, G4UniformRand, GetCrossSectionHandlers(), GetCurrentInteractionLength(), G4Track::GetDefinition(), G4Track::GetDynamicParticle(), GetHardeningFactor(), GetHardeningFraction(), G4DynamicParticle::GetKineticEnergy(), G4MaterialCutsCouple::GetMaterial(), G4Track::GetMaterialCutsCouple(), GetParticleChange(), G4ParticleDefinition::GetPDGCharge(), G4ParticleDefinition::GetPDGMass(), GetRecoilCutoff(), G4Material::GetTotNbOfAtomsPerVolume(), GetVerboseLevel(), G4CoulombKinematicsInfo::impactParameter, G4VParticleChange::Initialize(), IonizingLoss, kinematics, NIEL, G4VDiscreteProcess::PostStepDoIt(), G4VProcess::pParticleChange, G4ParticleChange::ProposeEnergy(), G4VParticleChange::ProposeLocalEnergyDeposit(), G4VParticleChange::ProposeNonIonizingEnergyDeposit(), G4CoulombKinematicsInfo::recoilIon, registerDepositedEnergy, G4ScreenedCoulombCrossSection::SelectRandomUnweightedTarget(), G4CoulombKinematicsInfo::targetMaterial, and validCollision.

419 {
420  validCollision=1;
421  pParticleChange->Initialize(aTrack);
422  NIEL=0.0; // default is no NIEL deposited
423  IonizingLoss=0.0;
424 
425  // do universal setup
426 
427  const G4DynamicParticle* incidentParticle = aTrack.GetDynamicParticle();
428  G4ParticleDefinition *baseParticle=aTrack.GetDefinition();
429 
430  G4double fz1=baseParticle->GetPDGCharge()/eplus;
431  G4int z1=(G4int)(fz1+0.5);
432  G4double a1=baseParticle->GetPDGMass()/amu_c2;
433  G4double incidentEnergy = incidentParticle->GetKineticEnergy();
434 
435  // Select randomly one element and (possibly) isotope in the current material.
436  const G4MaterialCutsCouple* couple = aTrack.GetMaterialCutsCouple();
437 
438  const G4Material* mat = couple->GetMaterial();
439 
440  G4double P=0.0; // the impact parameter of this collision
441 
442  if(incidentEnergy < GetRecoilCutoff()*a1) { // check energy sanity on entry
443  DepositEnergy(z1, baseParticle->GetPDGMass()/amu_c2, mat, incidentEnergy);
445  // stop the particle and bail out
446  validCollision=0;
447  } else {
448 
449  G4double numberDensity=mat->GetTotNbOfAtomsPerVolume();
450  G4double lattice=0.5/std::pow(numberDensity,1.0/3.0); // typical lattice half-spacing
452  G4double sigopi=1.0/(CLHEP::pi*numberDensity*length); // this is sigma0/pi
453 
454  // compute the impact parameter very early, so if is rejected as too far away, little effort is wasted
455  // this is the TRIM method for determining an impact parameter based on the flight path
456  // this gives a cumulative distribution of N(P)= 1-exp(-pi P^2 n l)
457  // which says the probability of NOT hitting a disk of area sigma= pi P^2 =exp(-sigma N l)
458  // which may be reasonable
459  if(sigopi < lattice*lattice) {
460  // normal long-flight approximation
461  P = std::sqrt(-std::log(G4UniformRand()) *sigopi);
462  } else {
463  // short-flight limit
464  P = std::sqrt(G4UniformRand())*lattice;
465  }
466 
467  G4double fraction=GetHardeningFraction();
468  if(fraction && G4UniformRand() < fraction) {
469  // pick out some events, and increase the central cross section
470  // by reducing the impact parameter
471  P /= std::sqrt(GetHardeningFactor());
472  }
473 
474 
475  // check if we are far enough away that the energy transfer must be below cutoff,
476  // and leave everything alone if so, saving a lot of time.
477  if(P*P > sigopi) {
478  if(GetVerboseLevel() > 1)
479  printf("ScreenedNuclear impact reject: length=%.3f P=%.4f limit=%.4f\n",
480  length/angstrom, P/angstrom,std::sqrt(sigopi)/angstrom);
481  // no collision, don't follow up with anything
482  validCollision=0;
483  }
484  }
485 
486  // find out what we hit, and record it in our kinematics block.
488  kinematics.a1=a1;
489 
490  if(validCollision) {
492  G4ParticleDefinition *recoilIon=
493  xsect->SelectRandomUnweightedTarget(couple);
494  kinematics.crossSection=xsect;
495  kinematics.recoilIon=recoilIon;
497  kinematics.a2=recoilIon->GetPDGMass()/amu_c2;
498  } else {
501  kinematics.a2=0;
502  }
503 
504  std::vector<G4ScreenedCollisionStage *>::iterator stage=collisionStages.begin();
505 
506  for(; stage != collisionStages.end(); stage++)
507  (*stage)->DoCollisionStep(this,aTrack, aStep);
508 
512  //MHM G4cout << "depositing energy, total = " << IonizingLoss+NIEL << " NIEL = " << NIEL << G4endl;
513  }
514 
515  return G4VDiscreteProcess::PostStepDoIt( aTrack, aStep );
516 }
G4ParticleDefinition * GetDefinition() const
virtual void Initialize(const G4Track &)
G4CoulombKinematicsInfo kinematics
G4double GetCurrentInteractionLength() const
the the interaciton length used in the last scattering.
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
G4ParticleDefinition * recoilIon
G4double GetRecoilCutoff() const
get the recoil cutoff
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void DepositEnergy(G4int z1, G4double a1, const G4Material *material, G4double energy)
take the given energy, and use the material information to partition it into NIEL and ionizing energy...
int G4int
Definition: G4Types.hh:78
std::vector< G4ScreenedCollisionStage * > collisionStages
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
#define G4UniformRand()
Definition: Randomize.hh:87
G4ScreenedCoulombCrossSection * crossSection
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
G4double GetHardeningFactor() const
get the boost factor in use.
G4ParticleDefinition * SelectRandomUnweightedTarget(const G4MaterialCutsCouple *couple)
G4double GetPDGMass() const
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
void ProposeEnergy(G4double finalEnergy)
int angstrom
Definition: hepunit.py:36
G4double GetHardeningFraction() const
get the fraction of particles which will have boosted scattering
double G4double
Definition: G4Types.hh:76
G4int GetVerboseLevel() const
get the verbosity.
float amu_c2
Definition: hepunit.py:277
class G4ParticleChange & GetParticleChange()
get the pointer to our ParticleChange object. for internal use, primarily.
G4double GetPDGCharge() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
const G4Material * GetMaterial() const
std::map< G4int, G4ScreenedCoulombCrossSection * > & GetCrossSectionHandlers()
void G4ScreenedNuclearRecoil::ResetTables ( )

clear precomputed screening tables

Definition at line 316 of file G4ScreenedNuclearRecoil.cc.

References crossSectionHandlers.

Referenced by SetPhysicsCutoff(), and ~G4ScreenedNuclearRecoil().

317 {
318 
319  std::map<G4int, G4ScreenedCoulombCrossSection*>::iterator xt=crossSectionHandlers.begin();
320  for(;xt != crossSectionHandlers.end(); xt++) {
321  delete (*xt).second;
322  }
323  crossSectionHandlers.clear();
324 }
std::map< G4int, G4ScreenedCoulombCrossSection * > crossSectionHandlers
void G4ScreenedNuclearRecoil::SetCrossSectionHardening ( G4double  fraction,
G4double  HardeningFactor 
)
inline

set the cross section boost to provide faster computation of backscattering

Parameters
fractionthe fraction of particles to have their cross section boosted.
HardeningFactorthe factor by which to boost the scattering cross section.

Definition at line 296 of file G4ScreenedNuclearRecoil.hh.

References hardeningFactor, and hardeningFraction.

296  {
297  hardeningFraction=fraction;
298  hardeningFactor=HardeningFactor;
299  }
void G4ScreenedNuclearRecoil::SetExternalCrossSectionHandler ( G4ScreenedCoulombCrossSection cs)
inline

set a function to compute screening tables, if the user needs non-standard behavior.

Parameters
csa class which constructs the screening tables.

Definition at line 308 of file G4ScreenedNuclearRecoil.hh.

References externalCrossSectionConstructor.

308  {
310  }
G4ScreenedCoulombCrossSection * externalCrossSectionConstructor
void G4ScreenedNuclearRecoil::SetMaxEnergyForScattering ( G4double  energy)
inline

set the upper energy beyond which this process has no cross section

This funciton is used to coordinate this process with G4MSC. Typically, G4MSC should not be allowed to operate in a range which overlaps that of this process. The criterion which is most reasonable is that the transition should be somewhere in the modestly relativistic regime (500 MeV/u for example).

Parameters
energyenergy per nucleon for the cutoff

Definition at line 250 of file G4ScreenedNuclearRecoil.hh.

References energy(), and processMaxEnergy.

Referenced by PhysListEmStandardNR::ConstructProcess().

double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4double processMaxEnergy
the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC ...
void G4ScreenedNuclearRecoil::SetMFPScaling ( G4double  scale)
inline

set the mean free path scaling as specified

Parameters
scalethe factor by which the default MFP will be scaled. Set to less than 1 for very thin films, typically, to sample multiple scattering, or to greater than 1 for quick simulaitons with a very long flight path.

Definition at line 269 of file G4ScreenedNuclearRecoil.hh.

References MFPScale.

269 { MFPScale=scale; }
void G4ScreenedNuclearRecoil::SetNIELPartitionFunction ( const G4VNIELPartition part)

set the pointer to a class for paritioning energy into NIEL

part the pointer to the class.

Definition at line 336 of file G4ScreenedNuclearRecoil.cc.

References NIELPartitionFunction.

337 {
340 }
const G4VNIELPartition * NIELPartitionFunction
void G4ScreenedNuclearRecoil::SetPhysicsCutoff ( G4double  energy)
inline

set the energy to which screening tables are computed. Typically, this is 10 eV or so, and not often changed.

Parameters
energythe cutoff energy

Definition at line 287 of file G4ScreenedNuclearRecoil.hh.

References energy(), physicsCutoff, and ResetTables().

double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
void ResetTables()
clear precomputed screening tables
void G4ScreenedNuclearRecoil::SetRecoilCutoff ( G4double  energy)
inline

set the minimum energy (per nucleon) at which recoils can be generated, and the energy (per nucleon) below which all ions are stopped.

Parameters
energyenergy per nucleon

Definition at line 282 of file G4ScreenedNuclearRecoil.hh.

References energy(), and recoilCutoff.

282 { recoilCutoff=energy; }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
void G4ScreenedNuclearRecoil::SetValidCollision ( G4bool  flag)
inline

Friends And Related Function Documentation

friend class G4ScreenedCollisionStage
friend

Definition at line 196 of file G4ScreenedNuclearRecoil.hh.

Field Documentation

G4bool G4ScreenedNuclearRecoil::avoidReactions
protected
std::vector<G4ScreenedCollisionStage *> G4ScreenedNuclearRecoil::collisionStages
protected

Definition at line 343 of file G4ScreenedNuclearRecoil.hh.

Referenced by AddStage(), ClearStages(), and PostStepDoIt().

std::map<G4int, G4ScreenedCoulombCrossSection*> G4ScreenedNuclearRecoil::crossSectionHandlers
protected
G4ScreenedCoulombCrossSection* G4ScreenedNuclearRecoil::externalCrossSectionConstructor
protected
G4bool G4ScreenedNuclearRecoil::generateRecoils
protected

Definition at line 335 of file G4ScreenedNuclearRecoil.hh.

Referenced by EnableRecoils(), and GetEnableRecoils().

G4double G4ScreenedNuclearRecoil::hardeningFactor
protected

Definition at line 340 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetHardeningFactor(), and SetCrossSectionHardening().

G4double G4ScreenedNuclearRecoil::hardeningFraction
protected

Definition at line 340 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetHardeningFraction(), and SetCrossSectionHardening().

G4double G4ScreenedNuclearRecoil::highEnergyLimit
protected

the energy per nucleon above which the MFP is constant

Definition at line 329 of file G4ScreenedNuclearRecoil.hh.

Referenced by G4ScreenedNuclearRecoil(), and GetMeanFreePath().

G4double G4ScreenedNuclearRecoil::IonizingLoss
protected

Definition at line 338 of file G4ScreenedNuclearRecoil.hh.

Referenced by DepositEnergy(), and PostStepDoIt().

G4CoulombKinematicsInfo G4ScreenedNuclearRecoil::kinematics
protected

Definition at line 348 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetKinematics(), and PostStepDoIt().

G4double G4ScreenedNuclearRecoil::lowEnergyLimit
protected

the energy per nucleon below which the MFP is zero

Definition at line 331 of file G4ScreenedNuclearRecoil.hh.

Referenced by G4ScreenedNuclearRecoil(), and GetMeanFreePath().

G4double G4ScreenedNuclearRecoil::MFPScale
protected
G4double G4ScreenedNuclearRecoil::NIEL
protected

Definition at line 338 of file G4ScreenedNuclearRecoil.hh.

Referenced by DepositEnergy(), GetNIEL(), and PostStepDoIt().

const G4VNIELPartition* G4ScreenedNuclearRecoil::NIELPartitionFunction
protected

Definition at line 349 of file G4ScreenedNuclearRecoil.hh.

Referenced by DepositEnergy(), and SetNIELPartitionFunction().

G4double G4ScreenedNuclearRecoil::physicsCutoff
protected
G4double G4ScreenedNuclearRecoil::processMaxEnergy
protected

the energy per nucleon beyond which the cross section is zero, to cross over to G4MSC

Definition at line 333 of file G4ScreenedNuclearRecoil.hh.

Referenced by BuildPhysicsTable(), G4ScreenedNuclearRecoil(), GetMeanFreePath(), and SetMaxEnergyForScattering().

G4double G4ScreenedNuclearRecoil::recoilCutoff
protected

Definition at line 336 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetMeanFreePath(), GetRecoilCutoff(), and SetRecoilCutoff().

G4bool G4ScreenedNuclearRecoil::registerDepositedEnergy
protected
G4String G4ScreenedNuclearRecoil::screeningKey
protected

Definition at line 334 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetMeanFreePath(), and GetScreeningKey().

G4bool G4ScreenedNuclearRecoil::validCollision
protected

Definition at line 347 of file G4ScreenedNuclearRecoil.hh.

Referenced by GetValidCollision(), PostStepDoIt(), and SetValidCollision().


The documentation for this class was generated from the following files: