Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LivermoreIonisationModel Class Reference

#include <G4LivermoreIonisationModel.hh>

+ Inheritance diagram for G4LivermoreIonisationModel:

Public Member Functions

 G4LivermoreIonisationModel (const G4ParticleDefinition *p=0, const G4String &processName="LowEnergyIoni")
 
virtual ~G4LivermoreIonisationModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel ()
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)=0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
virtual G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
G4int SelectIsotopeNumber (const G4Element *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
G4VEmModelGetTripletModel ()
 
void SetTripletModel (G4VEmModel *)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy) const
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetFluctuationFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
void SetUseBaseMaterials (G4bool val)
 
G4bool UseBaseMaterials () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Attributes

G4ParticleChangeForLossfParticleChange
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const G4MaterialpBaseMaterial
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
G4bool lossFlucFlag
 
G4double inveplus
 
G4double pFactor
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Detailed Description

Definition at line 57 of file G4LivermoreIonisationModel.hh.

Constructor & Destructor Documentation

◆ G4LivermoreIonisationModel()

G4LivermoreIonisationModel::G4LivermoreIonisationModel ( const G4ParticleDefinition p = 0,
const G4String processName = "LowEnergyIoni" 
)

Definition at line 76 of file G4LivermoreIonisationModel.cc.

77 :
79 isInitialised(false),
80 crossSectionHandler(0), energySpectrum(0)
81{
82 fIntrinsicLowEnergyLimit = 12.*eV;
83 fIntrinsicHighEnergyLimit = 100.0*GeV;
84
85 verboseLevel = 0;
87
88 transitionManager = G4AtomicTransitionManager::Instance();
89}
static G4AtomicTransitionManager * Instance()
G4ParticleChangeForLoss * fParticleChange
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:618

◆ ~G4LivermoreIonisationModel()

G4LivermoreIonisationModel::~G4LivermoreIonisationModel ( )
virtual

Definition at line 93 of file G4LivermoreIonisationModel.cc.

94{
95 delete energySpectrum;
96 delete crossSectionHandler;
97}

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4LivermoreIonisationModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition ,
G4double  kinEnergy,
G4double  Z,
G4double  A = 0,
G4double  cut = 0,
G4double  emax = DBL_MAX 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 175 of file G4LivermoreIonisationModel.cc.

181{
182 G4int iZ = (G4int) Z;
183 if (!crossSectionHandler)
184 {
185 G4Exception("G4LivermoreIonisationModel::ComputeCrossSectionPerAtom",
186 "em1007",FatalException,
187 "The cross section handler is not correctly initialized");
188 return 0;
189 }
190
191 //The cut is already included in the crossSectionHandler
192 G4double cs =
193 crossSectionHandler->GetCrossSectionAboveThresholdForElement(energy,
194 cutEnergy,
195 iZ);
196
197 if (verboseLevel > 1)
198 {
199 G4cout << "G4LivermoreIonisationModel " << G4endl;
200 G4cout << "Cross section for delta emission > "
201 << cutEnergy/keV << " keV at "
202 << energy/keV << " keV and Z = " << iZ << " --> "
203 << cs/barn << " barn" << G4endl;
204 }
205 return cs;
206}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4double GetCrossSectionAboveThresholdForElement(G4double energy, G4double cutEnergy, G4int Z)
G4double energy(const ThreeVector &p, const G4double m)

◆ ComputeDEDXPerVolume()

G4double G4LivermoreIonisationModel::ComputeDEDXPerVolume ( const G4Material material,
const G4ParticleDefinition ,
G4double  kineticEnergy,
G4double  cutEnergy 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 212 of file G4LivermoreIonisationModel.cc.

216{
217 G4double sPower = 0.0;
218
219 const G4ElementVector* theElementVector = material->GetElementVector();
220 size_t NumberOfElements = material->GetNumberOfElements() ;
221 const G4double* theAtomicNumDensityVector =
222 material->GetAtomicNumDensityVector();
223
224 // loop for elements in the material
225 for (size_t iel=0; iel<NumberOfElements; iel++ )
226 {
227 G4int iZ = (G4int)((*theElementVector)[iel]->GetZ());
228 G4int nShells = transitionManager->NumberOfShells(iZ);
229 for (G4int n=0; n<nShells; n++)
230 {
231 G4double e = energySpectrum->AverageEnergy(iZ, 0.0,cutEnergy,
232 kineticEnergy, n);
233 G4double cs= crossSectionHandler->FindValue(iZ,kineticEnergy, n);
234 sPower += e * cs * theAtomicNumDensityVector[iel];
235 }
236 G4double esp = energySpectrum->Excitation(iZ,kineticEnergy);
237 sPower += esp * theAtomicNumDensityVector[iel];
238 }
239
240 if (verboseLevel > 2)
241 {
242 G4cout << "G4LivermoreIonisationModel " << G4endl;
243 G4cout << "Stopping power < " << cutEnergy/keV
244 << " keV at " << kineticEnergy/keV << " keV = "
245 << sPower/(keV/mm) << " keV/mm" << G4endl;
246 }
247
248 return sPower;
249}
std::vector< G4Element * > G4ElementVector
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:188
size_t GetNumberOfElements() const
Definition: G4Material.hh:184
const G4double * GetAtomicNumDensityVector() const
Definition: G4Material.hh:214
G4double FindValue(G4int Z, G4double e) const
virtual G4double Excitation(G4int Z, G4double kineticEnergy) const =0
virtual G4double AverageEnergy(G4int Z, G4double minKineticEnergy, G4double maxKineticEnergy, G4double kineticEnergy, G4int shell=0, const G4ParticleDefinition *pd=0) const =0

◆ GetVerboseLevel()

G4int G4LivermoreIonisationModel::GetVerboseLevel ( )
inline

Definition at line 89 of file G4LivermoreIonisationModel.hh.

89{return verboseLevel;};

◆ Initialise()

void G4LivermoreIonisationModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector cuts 
)
virtual

Implements G4VEmModel.

Definition at line 101 of file G4LivermoreIonisationModel.cc.

103{
104 //Check that the Livermore Ionisation is NOT attached to e+
105 if (particle != G4Electron::Electron())
106 {
107 G4Exception("G4LivermoreIonisationModel::Initialise",
108 "em0002",FatalException,
109 "Livermore Ionisation Model is applicable only to electrons");
110 }
111
112 transitionManager->Initialise();
113
114 //Read energy spectrum
115 if (energySpectrum)
116 {
117 delete energySpectrum;
118 energySpectrum = 0;
119 }
120 energySpectrum = new G4eIonisationSpectrum();
121 if (verboseLevel > 3)
122 G4cout << "G4VEnergySpectrum is initialized" << G4endl;
123
124 //Initialize cross section handler
125 if (crossSectionHandler)
126 {
127 delete crossSectionHandler;
128 crossSectionHandler = 0;
129 }
130
131 const size_t nbins = 20;
132 G4double emin = LowEnergyLimit();
133 G4double emax = HighEnergyLimit();
134 G4int ndec = G4int(std::log10(emax/emin) + 0.5);
135 if(ndec <= 0) { ndec = 1; }
136
137 G4VDataSetAlgorithm* interpolation = new G4SemiLogInterpolation();
138 crossSectionHandler =
139 new G4eIonisationCrossSectionHandler(energySpectrum,interpolation,
140 emin,emax,nbins*ndec);
141 crossSectionHandler->Clear();
142 crossSectionHandler->LoadShellData("ioni/ion-ss-cs-");
143 //This is used to retrieve cross section values later on
144 G4VEMDataSet* emdata =
145 crossSectionHandler->BuildMeanFreePathForMaterials(&cuts);
146 //The method BuildMeanFreePathForMaterials() is required here only to force
147 //the building of an internal table: the output pointer can be deleted
148 delete emdata;
149
150 if (verboseLevel > 0)
151 {
152 G4cout << "Livermore Ionisation model is initialized " << G4endl
153 << "Energy range: "
154 << LowEnergyLimit() / keV << " keV - "
155 << HighEnergyLimit() / GeV << " GeV"
156 << G4endl;
157 }
158
159 if (verboseLevel > 3)
160 {
161 G4cout << "Cross section data: " << G4endl;
162 crossSectionHandler->PrintData();
163 G4cout << "Parameters: " << G4endl;
164 energySpectrum->PrintData();
165 }
166
167 if(isInitialised) { return; }
169 isInitialised = true;
170}
static G4Electron * Electron()
Definition: G4Electron.cc:93
G4VEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
void LoadShellData(const G4String &dataFile)
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:652
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:645
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:118
virtual void PrintData() const =0

◆ SampleSecondaries()

void G4LivermoreIonisationModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple couple,
const G4DynamicParticle aDynamicParticle,
G4double  tmin,
G4double  maxEnergy 
)
virtual

Implements G4VEmModel.

Definition at line 253 of file G4LivermoreIonisationModel.cc.

259{
260
261 G4double kineticEnergy = aDynamicParticle->GetKineticEnergy();
262
263 if (kineticEnergy <= fIntrinsicLowEnergyLimit)
264 {
267 return;
268 }
269
270 // Select atom and shell
271 G4int Z = crossSectionHandler->SelectRandomAtom(couple, kineticEnergy);
272 G4int shellIndex = crossSectionHandler->SelectRandomShell(Z, kineticEnergy);
273 const G4AtomicShell* shell = transitionManager->Shell(Z,shellIndex);
275
276 // Sample delta energy using energy interval for delta-electrons
277 G4double energyMax =
278 std::min(maxE,energySpectrum->MaxEnergyOfSecondaries(kineticEnergy));
279 G4double energyDelta = energySpectrum->SampleEnergy(Z, cutE, energyMax,
280 kineticEnergy, shellIndex);
281
282 if (energyDelta == 0.) //nothing happens
283 { return; }
284
286 G4DynamicParticle* delta = new G4DynamicParticle(electron,
287 GetAngularDistribution()->SampleDirectionForShell(aDynamicParticle, energyDelta,
288 Z, shellIndex,
289 couple->GetMaterial()),
290 energyDelta);
291
292 fvect->push_back(delta);
293
294 // Change kinematics of primary particle
295 G4ThreeVector direction = aDynamicParticle->GetMomentumDirection();
296 G4double totalMomentum = std::sqrt(kineticEnergy*(kineticEnergy + 2*electron_mass_c2));
297
298 G4ThreeVector finalP = totalMomentum*direction - delta->GetMomentum();
299 finalP = finalP.unit();
300
301 //This is the amount of energy available for fluorescence
302 G4double theEnergyDeposit = bindingEnergy;
303
304 // fill ParticleChange
305 // changed energy and momentum of the actual particle
306 G4double finalKinEnergy = kineticEnergy - energyDelta - theEnergyDeposit;
307 if(finalKinEnergy < 0.0)
308 {
309 theEnergyDeposit += finalKinEnergy;
310 finalKinEnergy = 0.0;
311 }
312 else
313 {
315 }
317
318 if (theEnergyDeposit < 0)
319 {
320 G4cout << "G4LivermoreIonisationModel: Negative energy deposit: "
321 << theEnergyDeposit/eV << " eV" << G4endl;
322 theEnergyDeposit = 0.0;
323 }
324
325 //Assign local energy deposit
327
328 if (verboseLevel > 1)
329 {
330 G4cout << "-----------------------------------------------------------" << G4endl;
331 G4cout << "Energy balance from G4LivermoreIonisation" << G4endl;
332 G4cout << "Incoming primary energy: " << kineticEnergy/keV << " keV" << G4endl;
333 G4cout << "-----------------------------------------------------------" << G4endl;
334 G4cout << "Outgoing primary energy: " << finalKinEnergy/keV << " keV" << G4endl;
335 G4cout << "Delta ray " << energyDelta/keV << " keV" << G4endl;
336 G4cout << "Fluorescence: " << (bindingEnergy-theEnergyDeposit)/keV << " keV" << G4endl;
337 G4cout << "Local energy deposit " << theEnergyDeposit/keV << " keV" << G4endl;
338 G4cout << "Total final state: " << (finalKinEnergy+energyDelta+bindingEnergy)
339 << " keV" << G4endl;
340 G4cout << "-----------------------------------------------------------" << G4endl;
341 }
342 return;
343}
Hep3Vector unit() const
G4double BindingEnergy() const
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
const G4Material * GetMaterial() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4int SelectRandomAtom(const G4MaterialCutsCouple *couple, G4double e) const
G4int SelectRandomShell(G4int Z, G4double e) const
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:611
virtual G4double SampleEnergy(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
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)

◆ SetVerboseLevel()

void G4LivermoreIonisationModel::SetVerboseLevel ( G4int  vl)
inline

Definition at line 88 of file G4LivermoreIonisationModel.hh.

88{verboseLevel = vl;};

Member Data Documentation

◆ fParticleChange

G4ParticleChangeForLoss* G4LivermoreIonisationModel::fParticleChange
protected

Definition at line 93 of file G4LivermoreIonisationModel.hh.

Referenced by Initialise(), and SampleSecondaries().


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