Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4ElectronIonPair Class Reference

#include <G4ElectronIonPair.hh>

Public Member Functions

void DumpG4MeanEnergyPerIonPair () const
 
void DumpMeanEnergyPerIonPair () const
 
G4double FindG4MeanEnergyPerIonPair (const G4Material *) const
 
 G4ElectronIonPair (const G4ElectronIonPair &)=delete
 
 G4ElectronIonPair (G4int verb)
 
G4double MeanNumberOfIonsAlongStep (const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
 
G4double MeanNumberOfIonsAlongStep (const G4Step *)
 
G4ElectronIonPairoperator= (const G4ElectronIonPair &right)=delete
 
G4int ResidualeChargePostStep (const G4ParticleDefinition *, const G4TrackVector *secondary=nullptr, G4int processSubType=-1) const
 
G4int ResidualeChargePostStep (const G4Step *) const
 
std::vector< G4ThreeVector > * SampleIonsAlongStep (const G4Step *)
 
G4int SampleNumberOfIonsAlongStep (const G4Step *)
 
void SetVerbose (G4int)
 
virtual ~G4ElectronIonPair ()
 

Private Member Functions

G4double FindMeanEnergyPerIonPair (const G4Material *) const
 
void Initialise ()
 

Private Attributes

const G4MaterialcurMaterial
 
G4double curMeanEnergy
 
std::vector< G4doubleg4MatData
 
std::vector< G4Stringg4MatNames
 
G4double invFanoFactor
 
G4int nMaterials
 
G4int verbose
 

Detailed Description

Definition at line 71 of file G4ElectronIonPair.hh.

Constructor & Destructor Documentation

◆ G4ElectronIonPair() [1/2]

G4ElectronIonPair::G4ElectronIonPair ( G4int  verb)
explicit

Definition at line 57 of file G4ElectronIonPair.cc.

58{
59 verbose = verb;
60 curMaterial = nullptr;
61 curMeanEnergy = 0.0;
62 nMaterials = 0;
63 invFanoFactor = 1.0/0.2;
64 Initialise();
65}
const G4Material * curMaterial

References curMaterial, curMeanEnergy, Initialise(), invFanoFactor, nMaterials, and verbose.

◆ ~G4ElectronIonPair()

G4ElectronIonPair::~G4ElectronIonPair ( )
virtual

Definition at line 69 of file G4ElectronIonPair.cc.

70{}

◆ G4ElectronIonPair() [2/2]

G4ElectronIonPair::G4ElectronIonPair ( const G4ElectronIonPair )
delete

Member Function Documentation

◆ DumpG4MeanEnergyPerIonPair()

void G4ElectronIonPair::DumpG4MeanEnergyPerIonPair ( ) const

Definition at line 189 of file G4ElectronIonPair.cc.

190{
191 if(nMaterials > 0) {
192 G4cout << "### G4ElectronIonPair: mean energy per ion pair "
193 << " for Geant4 materials" << G4endl;
194 for(G4int i=0; i<nMaterials; ++i) {
195 G4cout << " " << g4MatNames[i] << " Epair= "
196 << g4MatData[i]/eV << " eV" << G4endl;
197 }
198 }
199}
static constexpr double eV
Definition: G4SIunits.hh:201
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
std::vector< G4String > g4MatNames
std::vector< G4double > g4MatData

References eV, G4cout, G4endl, g4MatData, g4MatNames, and nMaterials.

◆ DumpMeanEnergyPerIonPair()

void G4ElectronIonPair::DumpMeanEnergyPerIonPair ( ) const

Definition at line 169 of file G4ElectronIonPair.cc.

170{
173 if(nmat > 0) {
174 G4cout << "### G4ElectronIonPair: mean energy per ion pair available:"
175 << G4endl;
176 for(G4int i=0; i<nmat; ++i) {
177 const G4Material* mat = (*mtable)[i];
179 if(x > 0.0) {
180 G4cout << " " << mat->GetName() << " Epair= "
181 << x/eV << " eV" << G4endl;
182 }
183 }
184 }
185}
std::vector< G4Material * > G4MaterialTable
double G4double
Definition: G4Types.hh:83
G4double GetMeanEnergyPerIonPair() const
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:679
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:222
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:672
const G4String & GetName() const
Definition: G4Material.hh:173

References eV, G4cout, G4endl, G4Material::GetIonisation(), G4Material::GetMaterialTable(), G4IonisParamMat::GetMeanEnergyPerIonPair(), G4Material::GetName(), and G4Material::GetNumberOfMaterials().

◆ FindG4MeanEnergyPerIonPair()

G4double G4ElectronIonPair::FindG4MeanEnergyPerIonPair ( const G4Material mat) const

Definition at line 146 of file G4ElectronIonPair.cc.

147{
148 G4String name = mat->GetName();
149 G4double res = 0.0;
150
151 // is this material in the vector?
152 for(G4int j=0; j<nMaterials; j++) {
153 if(name == g4MatNames[j]) {
154 res = g4MatData[j];
156 if(verbose > 0) {
157 G4cout << "### G4ElectronIonPair::FindG4MeanEnergyPerIonPair for "
158 << name << " Epair= " << res/eV << " eV is set"
159 << G4endl;
160 }
161 break;
162 }
163 }
164 return res;
165}
void SetMeanEnergyPerIonPair(G4double value)
const char * name(G4int ptype)

References eV, G4cout, G4endl, g4MatData, g4MatNames, G4Material::GetIonisation(), G4Material::GetName(), G4InuclParticleNames::name(), nMaterials, G4IonisParamMat::SetMeanEnergyPerIonPair(), and verbose.

Referenced by MeanNumberOfIonsAlongStep().

◆ FindMeanEnergyPerIonPair()

G4double G4ElectronIonPair::FindMeanEnergyPerIonPair ( const G4Material ) const
private

◆ Initialise()

void G4ElectronIonPair::Initialise ( )
private

Definition at line 203 of file G4ElectronIonPair.cc.

204{
205 // ICRU Report 31, 1979
206 g4MatNames.push_back("G4_Si");
207 g4MatData.push_back(3.62*eV);
208
209 g4MatNames.push_back("G4_Ge");
210 g4MatData.push_back(2.97*eV);
211
212 g4MatNames.push_back("G4_He");
213 g4MatData.push_back(44.4*eV);
214
215 g4MatNames.push_back("G4_N");
216 g4MatData.push_back(36.4*eV);
217
218 g4MatNames.push_back("G4_O");
219 g4MatData.push_back(32.3*eV);
220
221 g4MatNames.push_back("G4_Ne");
222 g4MatData.push_back(36.8*eV);
223
224 g4MatNames.push_back("G4_Ar");
225 g4MatData.push_back(26.34*eV);
226
227 g4MatNames.push_back("G4_Kr");
228 g4MatData.push_back(24.1*eV);
229
230 g4MatNames.push_back("G4_Xe");
231 g4MatData.push_back(21.6*eV);
232
233 g4MatNames.push_back("G4_lAr");
234 g4MatData.push_back(23.6*eV);
235
236 g4MatNames.push_back("G4_lKr");
237 g4MatData.push_back(20.5*eV);
238
239 g4MatNames.push_back("G4_lXe");
240 g4MatData.push_back(15.6*eV);
241
242 g4MatNames.push_back("G4_AIR");
243 g4MatData.push_back(35.1*eV);
244
245 nMaterials = g4MatData.size();
246}

References eV, g4MatData, g4MatNames, and nMaterials.

Referenced by G4ElectronIonPair().

◆ MeanNumberOfIonsAlongStep() [1/2]

G4double G4ElectronIonPair::MeanNumberOfIonsAlongStep ( const G4ParticleDefinition part,
const G4Material material,
G4double  edepTotal,
G4double  edepNIEL = 0.0 
)

Definition at line 74 of file G4ElectronIonPair.cc.

79{
80 G4double nion = 0.0;
81
82 // NIEL does not provide ionisation clusters
83 if(edep > niel) {
84
85 // neutral particles do not produce ionisation along step
86 if(part->GetPDGCharge() != 0.0) {
87
88 // select material
89 if(material != curMaterial) {
91 curMeanEnergy = material->GetIonisation()->GetMeanEnergyPerIonPair();
92
93 // if mean energy is not defined then look into G4 DB
94 if(0.0 == curMeanEnergy) {
96 }
97 }
98 if(curMeanEnergy > 0.0) { nion = (edep - niel)/curMeanEnergy; }
99 }
100 }
101 return nion;
102}
G4double FindG4MeanEnergyPerIonPair(const G4Material *) const
G4double GetPDGCharge() const
string material
Definition: eplot.py:19

References curMaterial, curMeanEnergy, FindG4MeanEnergyPerIonPair(), G4ParticleDefinition::GetPDGCharge(), and eplot::material.

Referenced by MeanNumberOfIonsAlongStep(), and SampleNumberOfIonsAlongStep().

◆ MeanNumberOfIonsAlongStep() [2/2]

G4double G4ElectronIonPair::MeanNumberOfIonsAlongStep ( const G4Step step)
inline

Definition at line 136 of file G4ElectronIonPair.hh.

137{
139 step->GetPreStepPoint()->GetMaterial(),
140 step->GetTotalEnergyDeposit(),
142}
G4double MeanNumberOfIonsAlongStep(const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
G4Material * GetMaterial() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetNonIonizingEnergyDeposit() const
G4double GetTotalEnergyDeposit() const
const G4ParticleDefinition * GetParticleDefinition() const

References G4StepPoint::GetMaterial(), G4Step::GetNonIonizingEnergyDeposit(), G4Track::GetParticleDefinition(), G4Step::GetPreStepPoint(), G4Step::GetTotalEnergyDeposit(), G4Step::GetTrack(), and MeanNumberOfIonsAlongStep().

◆ operator=()

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

◆ ResidualeChargePostStep() [1/2]

G4int G4ElectronIonPair::ResidualeChargePostStep ( const G4ParticleDefinition ,
const G4TrackVector secondary = nullptr,
G4int  processSubType = -1 
) const

Definition at line 133 of file G4ElectronIonPair.cc.

136{
137 G4int nholes = 0;
138
139 if(2 == subType || 12 == subType || 13 == subType) { nholes = 1; }
140 return nholes;
141}

Referenced by ResidualeChargePostStep().

◆ ResidualeChargePostStep() [2/2]

G4int G4ElectronIonPair::ResidualeChargePostStep ( const G4Step step) const
inline

Definition at line 154 of file G4ElectronIonPair.hh.

155{
156 G4int subtype = -1;
157 const G4VProcess* proc = step->GetPostStepPoint()->GetProcessDefinedStep();
158 if(proc) { subtype = proc->GetProcessSubType(); }
160 step->GetSecondary(),
161 subtype);
162}
G4int ResidualeChargePostStep(const G4ParticleDefinition *, const G4TrackVector *secondary=nullptr, G4int processSubType=-1) const
const G4VProcess * GetProcessDefinedStep() const
const G4TrackVector * GetSecondary() const
G4StepPoint * GetPostStepPoint() const
G4int GetProcessSubType() const
Definition: G4VProcess.hh:400

References G4Track::GetParticleDefinition(), G4Step::GetPostStepPoint(), G4StepPoint::GetProcessDefinedStep(), G4VProcess::GetProcessSubType(), G4Step::GetSecondary(), G4Step::GetTrack(), and ResidualeChargePostStep().

◆ SampleIonsAlongStep()

std::vector< G4ThreeVector > * G4ElectronIonPair::SampleIonsAlongStep ( const G4Step step)

Definition at line 107 of file G4ElectronIonPair.cc.

108{
109 std::vector<G4ThreeVector>* v = 0;
110
112
113 // sample ionisation along step
114 if(nion > 0) {
115
116 v = new std::vector<G4ThreeVector>;
117 G4ThreeVector prePos = step->GetPreStepPoint()->GetPosition();
118 G4ThreeVector deltaPos = step->GetPostStepPoint()->GetPosition() - prePos;
119 for(G4int i=0; i<nion; ++i) {
120 v->push_back( prePos + deltaPos*G4UniformRand() );
121 }
122 if(verbose > 1 ) {
123 G4cout << "### G4ElectronIonPair::SampleIonisationPoints: "
124 << v->size() << " ion pairs are added" << G4endl;
125 }
126 }
127 return v;
128}
#define G4UniformRand()
Definition: Randomize.hh:52
G4int SampleNumberOfIonsAlongStep(const G4Step *)
const G4ThreeVector & GetPosition() const

References G4cout, G4endl, G4UniformRand, G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), SampleNumberOfIonsAlongStep(), and verbose.

◆ SampleNumberOfIonsAlongStep()

G4int G4ElectronIonPair::SampleNumberOfIonsAlongStep ( const G4Step step)
inline

Definition at line 145 of file G4ElectronIonPair.hh.

146{
147 // use gamma distribution with mean value n=meanion and
148 // dispersion D=meanion/invFanoFactor
149 G4double meanion = MeanNumberOfIonsAlongStep(step);
151}
ThreeVector shoot(const G4int Ap, const G4int Af)
int G4lrint(double ad)
Definition: templates.hh:134

References G4lrint(), invFanoFactor, MeanNumberOfIonsAlongStep(), and G4INCL::DeJongSpin::shoot().

Referenced by SampleIonsAlongStep().

◆ SetVerbose()

void G4ElectronIonPair::SetVerbose ( G4int  val)
inline

Definition at line 164 of file G4ElectronIonPair.hh.

165{
166 verbose = val;
167}

References verbose.

Referenced by G4LossTableManager::ResetParameters().

Field Documentation

◆ curMaterial

const G4Material* G4ElectronIonPair::curMaterial
private

Definition at line 122 of file G4ElectronIonPair.hh.

Referenced by G4ElectronIonPair(), and MeanNumberOfIonsAlongStep().

◆ curMeanEnergy

G4double G4ElectronIonPair::curMeanEnergy
private

Definition at line 123 of file G4ElectronIonPair.hh.

Referenced by G4ElectronIonPair(), and MeanNumberOfIonsAlongStep().

◆ g4MatData

std::vector<G4double> G4ElectronIonPair::g4MatData
private

◆ g4MatNames

std::vector<G4String> G4ElectronIonPair::g4MatNames
private

◆ invFanoFactor

G4double G4ElectronIonPair::invFanoFactor
private

Definition at line 125 of file G4ElectronIonPair.hh.

Referenced by G4ElectronIonPair(), and SampleNumberOfIonsAlongStep().

◆ nMaterials

G4int G4ElectronIonPair::nMaterials
private

◆ verbose

G4int G4ElectronIonPair::verbose
private

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