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

#include <G4MicroElecCapture.hh>

+ Inheritance diagram for G4MicroElecCapture:

Public Member Functions

 G4MicroElecCapture (const G4String &regName, G4double ekinlimit)
 
virtual ~G4MicroElecCapture ()
 
void SetKinEnergyLimit (G4double)
 
void BuildPhysicsTable (const G4ParticleDefinition &) override
 
G4bool IsApplicable (const G4ParticleDefinition &) override
 
void Initialise ()
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &) override
 
 G4MicroElecCapture (const G4MicroElecCapture &)=delete
 
G4MicroElecCaptureoperator= (const G4MicroElecCapture &right)=delete
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &aName, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
G4VDiscreteProcessoperator= (const G4VDiscreteProcess &)=delete
 
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 &)
 
virtual G4double GetCrossSection (const G4double, const G4MaterialCutsCouple *)
 
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4VProcessoperator= (const G4VProcess &)=delete
 
G4bool operator== (const G4VProcess &right) const
 
G4bool 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 const G4VProcessGetCreatorProcess () const
 
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
 
virtual void ProcessDescription (std::ostream &outfile) 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 Member Functions

G4double GetMeanFreePath (const G4Track &, G4double, G4ForceCondition *) override
 
- Protected Member Functions inherited from G4VDiscreteProcess
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double prevStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft = -1.0
 
G4double currentInteractionLength = -1.0
 
G4double theInitialNumberOfInteractionLength = -1.0
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType = fNotDefined
 
G4int theProcessSubType = -1
 
G4double thePILfactor = 1.0
 
G4int verboseLevel = 0
 
G4bool enableAtRestDoIt = true
 
G4bool enableAlongStepDoIt = true
 
G4bool enablePostStepDoIt = true
 

Detailed Description

Definition at line 67 of file G4MicroElecCapture.hh.

Constructor & Destructor Documentation

◆ G4MicroElecCapture() [1/2]

G4MicroElecCapture::G4MicroElecCapture ( const G4String & regName,
G4double ekinlimit )

Definition at line 99 of file G4MicroElecCapture.cc.

100 : G4VDiscreteProcess("MicroElecCapture", fElectromagnetic), kinEnergyThreshold(ekinlim),
101 regionName(regName), region(0)
102{
103 if(regName == "" || regName == "world")
104 {
105 regionName = "DefaultRegionForTheWorld";
106 }
107 isInitialised = false;
108 pParticleChange = &fParticleChange;
109}
@ fElectromagnetic
G4VParticleChange * pParticleChange

◆ ~G4MicroElecCapture()

G4MicroElecCapture::~G4MicroElecCapture ( )
virtual

Definition at line 113 of file G4MicroElecCapture.cc.

114{
115 for (auto pos = tableWF.cbegin(); pos != tableWF.cend(); ++pos)
116 {
117 G4MicroElecMaterialStructure* table = pos->second;
118 delete table;
119 }
120}

◆ G4MicroElecCapture() [2/2]

G4MicroElecCapture::G4MicroElecCapture ( const G4MicroElecCapture & )
delete

Member Function Documentation

◆ BuildPhysicsTable()

void G4MicroElecCapture::BuildPhysicsTable ( const G4ParticleDefinition & )
overridevirtual

Reimplemented from G4VProcess.

Definition at line 130 of file G4MicroElecCapture.cc.

131{
132 region = (G4RegionStore::GetInstance())->GetRegion(regionName);
133 // if(region && verboseLevel > 0) {
134 G4cout << "### G4MicroElecCapture: Tracking cut E(MeV) = "
135 << kinEnergyThreshold/MeV << " is assigned to " << regionName
136 << G4endl;
137}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4RegionStore * GetInstance()

◆ GetMeanFreePath()

G4double G4MicroElecCapture::GetMeanFreePath ( const G4Track & aTrack,
G4double ,
G4ForceCondition *  )
overrideprotectedvirtual

Implements G4VDiscreteProcess.

Definition at line 254 of file G4MicroElecCapture.cc.

256{
257 G4String material = aTrack.GetMaterial()->GetName();
258 // test particle type in order to applied the capture to both electrons, protons and heavy ions
259
260 if ((aTrack.GetParticleDefinition()->GetParticleName()) == "e-")
261 {
262 if (material != "G4_ALUMINUM_OXIDE" && material != "G4_SILICON_DIOXIDE"
263 && material != "G4_BORON_NITRIDE")
264 {
265 return DBL_MAX;
266 }
267 G4double S = 0;
268 G4double y = 0;
269 if (material == "G4_ALUMINUM_OXIDE")
270 {
271 S = 1 * (1 / nm);
272 y = 0.25 * (1 / eV);
273 }
274 if (material == "G4_SILICON_DIOXIDE")
275 {
276 S = 0.3 * (1 / nm);
277 y = 0.2 * (1 / eV);
278 }
279 if (material == "G4_BORON_NITRIDE")
280 {
281 S = 0 * (1 / nm);
282 y = 1 * (1 / eV);
283 }
284
285 G4double P = S * G4Exp(-y * aTrack.GetKineticEnergy());
286 if (P <= 0) { return DBL_MAX; }
287 else { return 1 / P; }
288 }
289 else return DBL_MAX;
290
291}
G4double S(G4double temp)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:180
double G4double
Definition G4Types.hh:83
const G4String & GetName() const
const G4String & GetParticleName() const
const G4ParticleDefinition * GetParticleDefinition() const
G4Material * GetMaterial() const
G4double GetKineticEnergy() const
#define DBL_MAX
Definition templates.hh:62

◆ Initialise()

void G4MicroElecCapture::Initialise ( )

Definition at line 146 of file G4MicroElecCapture.cc.

147{
148 if (isInitialised) { return; }
149
151 G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
152 G4cout << numOfCouples << G4endl;
153
154 for (G4int i = 0; i < numOfCouples; ++i)
155 {
156 const G4Material* material = theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
157
158 G4cout << "G4Capture, Material " << i + 1 << " / "
159 << numOfCouples << " : " << material->GetName() << G4endl;
160 if (material->GetName() == "Vacuum")
161 {
162 tableWF[material->GetName()] = 0;
163 continue;
164 }
165 G4String mat = material->GetName();
167 tableWF[mat] = str;
168 }
169 isInitialised = true;
170}
int G4int
Definition G4Types.hh:85
const G4Material * GetMaterial() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()

Referenced by PostStepDoIt().

◆ IsApplicable()

G4bool G4MicroElecCapture::IsApplicable ( const G4ParticleDefinition & )
overridevirtual

Reimplemented from G4VProcess.

Definition at line 141 of file G4MicroElecCapture.cc.

142{
143 return true;
144}

◆ operator=()

G4MicroElecCapture & G4MicroElecCapture::operator= ( const G4MicroElecCapture & right)
delete

◆ PostStepDoIt()

G4VParticleChange * G4MicroElecCapture::PostStepDoIt ( const G4Track & aTrack,
const G4Step &  )
overridevirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 174 of file G4MicroElecCapture.cc.

176{
177 if (!isInitialised) { Initialise(); }
178
179 G4String mat = aTrack.GetMaterial()->GetName();
180 G4int Ztarget = ((*(aTrack.GetMaterial()->GetElementVector()))[0])->GetZasInt();
181 G4int Atarget = ((*(aTrack.GetMaterial()->GetElementVector()))[0])->GetAtomicMassAmu();
182 G4double Nbelements = aTrack.GetMaterial()->GetNumberOfElements();
183 G4double moleculeMass = aTrack.GetMaterial()->GetMassOfMolecule() / amu;
184 auto FractionMass = aTrack.GetMaterial()->GetFractionVector();
186 G4int Ainc = aTrack.GetParticleDefinition()->GetAtomicMass();
187 G4String IncPartName = aTrack.GetParticleDefinition()->GetParticleName();
188 G4double NIEdep = 0.0;
189
190 for (G4int i = 0; i < Nbelements; ++i)
191 {
192 Ztarget = ((*(aTrack.GetMaterial()->GetElementVector()))[i])->GetZasInt();
193 Atarget = ((*(aTrack.GetMaterial()->GetElementVector()))[i])->GetAtomicMassAmu();
194 NIEdep = NIEdep + moleculeMass*FractionMass[i] / Atarget*G_Lindhard_Rob(aTrack.GetKineticEnergy(), Zinc, Ainc, Ztarget, Atarget);
195 }
196
197 WorkFunctionTable::iterator matWF;
198 matWF = tableWF.find(mat);
199
200 if (matWF == tableWF.end())
201 {
202 G4String str = "Material ";
203 str += mat + " not found!";
204 G4Exception("G4MicroElecCapture::PostStepGPIL", "em0002",
205 FatalException, str);
206 return nullptr;
207 }
208 else
209 {
210 G4MicroElecMaterialStructure* str = matWF->second;
213
214 G4double InitE = str->GetEnergyGap() + str->GetInitialEnergy();
215
216 if (IncPartName == "e-")
217 {
218 // metals = Non ionizing deposited energy = 0.0
219 if (((str->GetEnergyGap()) / eV)<(0.001))
220 {
223 }
224 else // MicroElec materials Non ionizing deposited energy different from zero
225 {
226 G4int c = (G4int)((aTrack.GetKineticEnergy()) / (InitE));
229 }
230 }
231 else
232 {
233 if ((IncPartName == "Genericion") || (IncPartName == "alpha")
234 || (IncPartName == "He3") || (IncPartName == "deuteron")
235 || (IncPartName == "triton") || (IncPartName == "proton"))
236 {
239 }
240 else
241 {
244 }
245 }
246 } // matWF == tableWF.end())
247
248 fParticleChange.SetProposedKineticEnergy(0.0);
249 return pParticleChange;
250}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
@ fStopAndKill
const G4double * GetFractionVector() const
G4double GetMassOfMolecule() const
std::size_t GetNumberOfElements() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4int GetAtomicNumber() const
G4int GetAtomicMass() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
virtual void Initialize(const G4Track &)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)

◆ SetKinEnergyLimit()

void G4MicroElecCapture::SetKinEnergyLimit ( G4double val)

Definition at line 124 of file G4MicroElecCapture.cc.

125{
126 kinEnergyThreshold = val;
127}

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