Geant4  10.02.p03
G4ElectronIonPair Class Reference

#include <G4ElectronIonPair.hh>

Collaboration diagram for G4ElectronIonPair:

Public Member Functions

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

Private Member Functions

void Initialise ()
 
G4double FindMeanEnergyPerIonPair (const G4Material *) const
 
G4ElectronIonPairoperator= (const G4ElectronIonPair &right)
 
 G4ElectronIonPair (const G4ElectronIonPair &)
 

Private Attributes

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

Detailed Description

Definition at line 74 of file G4ElectronIonPair.hh.

Constructor & Destructor Documentation

◆ G4ElectronIonPair() [1/2]

G4ElectronIonPair::G4ElectronIonPair ( G4int  verb)

Definition at line 58 of file G4ElectronIonPair.cc.

59 {
60  verbose = verb;
61  curMaterial = nullptr;
62  curMeanEnergy = 0.0;
63  nMaterials = 0;
64  invFanoFactor = 1.0/0.2;
65  Initialise();
66 }
const G4Material * curMaterial
Here is the call graph for this function:

◆ ~G4ElectronIonPair()

G4ElectronIonPair::~G4ElectronIonPair ( )
virtual

Definition at line 70 of file G4ElectronIonPair.cc.

71 {}

◆ G4ElectronIonPair() [2/2]

G4ElectronIonPair::G4ElectronIonPair ( const G4ElectronIonPair )
private

Member Function Documentation

◆ DumpG4MeanEnergyPerIonPair()

void G4ElectronIonPair::DumpG4MeanEnergyPerIonPair ( ) const

Definition at line 190 of file G4ElectronIonPair.cc.

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

◆ DumpMeanEnergyPerIonPair()

void G4ElectronIonPair::DumpMeanEnergyPerIonPair ( ) const

Definition at line 170 of file G4ElectronIonPair.cc.

171 {
174  if(nmat > 0) {
175  G4cout << "### G4ElectronIonPair: mean energy per ion pair avalable:"
176  << G4endl;
177  for(G4int i=0; i<nmat; ++i) {
178  const G4Material* mat = (*mtable)[i];
180  if(x > 0.0) {
181  G4cout << " " << mat->GetName() << " Epair= "
182  << x/eV << " eV" << G4endl;
183  }
184  }
185  }
186 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
std::vector< G4Material * > G4MaterialTable
int G4int
Definition: G4Types.hh:78
Float_t mat
G4GLOB_DLL std::ostream G4cout
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:596
static const double eV
Definition: G4SIunits.hh:212
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
const G4String & GetName() const
Definition: G4Material.hh:178
G4double GetMeanEnergyPerIonPair() const
Here is the call graph for this function:

◆ FindG4MeanEnergyPerIonPair()

G4double G4ElectronIonPair::FindG4MeanEnergyPerIonPair ( const G4Material mat) const

Definition at line 147 of file G4ElectronIonPair.cc.

148 {
149  G4String name = mat->GetName();
150  G4double res = 0.0;
151 
152  // is this material in the vector?
153  for(G4int j=0; j<nMaterials; j++) {
154  if(name == g4MatNames[j]) {
155  res = g4MatData[j];
157  if(verbose > 0) {
158  G4cout << "### G4ElectronIonPair::FindG4MeanEnergyPerIonPair for "
159  << name << " Epair= " << res/eV << " eV is set"
160  << G4endl;
161  }
162  break;
163  }
164  }
165  return res;
166 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
std::vector< G4double > g4MatData
G4GLOB_DLL std::ostream G4cout
std::vector< G4String > g4MatNames
static const double eV
Definition: G4SIunits.hh:212
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
const G4String & GetName() const
Definition: G4Material.hh:178
void SetMeanEnergyPerIonPair(G4double value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindMeanEnergyPerIonPair()

G4double G4ElectronIonPair::FindMeanEnergyPerIonPair ( const G4Material ) const
private

◆ Initialise()

void G4ElectronIonPair::Initialise ( )
private

Definition at line 204 of file G4ElectronIonPair.cc.

205 {
206  // ICRU Report 31, 1979
207  g4MatNames.push_back("G4_Si");
208  g4MatData.push_back(3.62*eV);
209 
210  g4MatNames.push_back("G4_Ge");
211  g4MatData.push_back(2.97*eV);
212 
213  g4MatNames.push_back("G4_He");
214  g4MatData.push_back(44.4*eV);
215 
216  g4MatNames.push_back("G4_N");
217  g4MatData.push_back(36.4*eV);
218 
219  g4MatNames.push_back("G4_O");
220  g4MatData.push_back(32.3*eV);
221 
222  g4MatNames.push_back("G4_Ne");
223  g4MatData.push_back(36.8*eV);
224 
225  g4MatNames.push_back("G4_Ar");
226  g4MatData.push_back(26.34*eV);
227 
228  g4MatNames.push_back("G4_Kr");
229  g4MatData.push_back(24.1*eV);
230 
231  g4MatNames.push_back("G4_Xe");
232  g4MatData.push_back(21.6*eV);
233 
234  g4MatNames.push_back("G4_lAr");
235  g4MatData.push_back(23.6*eV);
236 
237  g4MatNames.push_back("G4_lKr");
238  g4MatData.push_back(20.5*eV);
239 
240  g4MatNames.push_back("G4_lXe");
241  g4MatData.push_back(15.6*eV);
242 
243  g4MatNames.push_back("G4_AIR");
244  g4MatData.push_back(35.1*eV);
245 
246  nMaterials = g4MatData.size();
247 }
std::vector< G4double > g4MatData
std::vector< G4String > g4MatNames
static const double eV
Definition: G4SIunits.hh:212
Here is the caller graph for this function:

◆ MeanNumberOfIonsAlongStep() [1/2]

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

Definition at line 75 of file G4ElectronIonPair.cc.

80 {
81  G4double nion = 0.0;
82 
83  // NIEL does not provide ionisation clusters
84  if(edep > niel) {
85 
86  // neutral particles do not produce ionisation along step
87  if(part->GetPDGCharge() != 0.0) {
88 
89  // select material
90  if(material != curMaterial) {
93 
94  // if mean energy is not defined then look into G4 DB
95  if(0.0 == curMeanEnergy) {
97  }
98  }
99  if(curMeanEnergy > 0.0) { nion = (edep - niel)/curMeanEnergy; }
100  }
101  }
102  return nion;
103 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
const G4Material * curMaterial
G4double FindG4MeanEnergyPerIonPair(const G4Material *) const
Double_t edep
string material
Definition: eplot.py:19
double G4double
Definition: G4Types.hh:76
G4double GetMeanEnergyPerIonPair() const
G4double GetPDGCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MeanNumberOfIonsAlongStep() [2/2]

G4double G4ElectronIonPair::MeanNumberOfIonsAlongStep ( const G4Step *  step)
inline

Definition at line 139 of file G4ElectronIonPair.hh.

140 {
141  return MeanNumberOfIonsAlongStep(step->GetTrack()->GetParticleDefinition(),
142  step->GetPreStepPoint()->GetMaterial(),
143  step->GetTotalEnergyDeposit(),
144  step->GetNonIonizingEnergyDeposit());
145 }
G4double MeanNumberOfIonsAlongStep(const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
Here is the call graph for this function:

◆ operator=()

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

◆ ResidualeChargePostStep() [1/2]

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

Definition at line 134 of file G4ElectronIonPair.cc.

137 {
138  G4int nholes = 0;
139 
140  if(2 == subType || 12 == subType || 13 == subType) { nholes = 1; }
141  return nholes;
142 }
int G4int
Definition: G4Types.hh:78
Here is the caller graph for this function:

◆ ResidualeChargePostStep() [2/2]

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

Definition at line 157 of file G4ElectronIonPair.hh.

158 {
159  G4int subtype = -1;
160  const G4VProcess* proc = step->GetPostStepPoint()->GetProcessDefinedStep();
161  if(proc) { subtype = proc->GetProcessSubType(); }
162  return ResidualeChargePostStep(step->GetTrack()->GetParticleDefinition(),
163  step->GetSecondary(),
164  subtype);
165 }
G4int ResidualeChargePostStep(const G4ParticleDefinition *, const G4TrackVector *secondary=0, G4int processSubType=-1) const
int G4int
Definition: G4Types.hh:78
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
Here is the call graph for this function:

◆ SampleIonsAlongStep()

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

Definition at line 108 of file G4ElectronIonPair.cc.

109 {
110  std::vector<G4ThreeVector>* v = 0;
111 
112  G4int nion = SampleNumberOfIonsAlongStep(step);
113 
114  // sample ionisation along step
115  if(nion > 0) {
116 
117  v = new std::vector<G4ThreeVector>;
118  G4ThreeVector prePos = step->GetPreStepPoint()->GetPosition();
119  G4ThreeVector deltaPos = step->GetPostStepPoint()->GetPosition() - prePos;
120  for(G4int i=0; i<nion; ++i) {
121  v->push_back( prePos + deltaPos*G4UniformRand() );
122  }
123  if(verbose > 1 ) {
124  G4cout << "### G4ElectronIonPair::SampleIonisationPoints: "
125  << v->size() << " ion pairs are added" << G4endl;
126  }
127  }
128  return v;
129 }
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
G4int SampleNumberOfIonsAlongStep(const G4Step *)
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ SampleNumberOfIonsAlongStep()

G4int G4ElectronIonPair::SampleNumberOfIonsAlongStep ( const G4Step *  step)
inline

Definition at line 148 of file G4ElectronIonPair.hh.

149 {
150  // use gamma distribution with mean value n=meanion and
151  // dispersion D=meanion/invFanoFactor
152  G4double meanion = MeanNumberOfIonsAlongStep(step);
153  return G4lrint(G4RandGamma::shoot(meanion*invFanoFactor,invFanoFactor));
154 }
ThreeVector shoot(const G4int Ap, const G4int Af)
G4double MeanNumberOfIonsAlongStep(const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
int G4lrint(double ad)
Definition: templates.hh:163
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVerbose()

void G4ElectronIonPair::SetVerbose ( G4int  val)
inline

Definition at line 167 of file G4ElectronIonPair.hh.

168 {
169  verbose = val;
170 }
Here is the caller graph for this function:

Member Data Documentation

◆ curMaterial

const G4Material* G4ElectronIonPair::curMaterial
private

Definition at line 125 of file G4ElectronIonPair.hh.

◆ curMeanEnergy

G4double G4ElectronIonPair::curMeanEnergy
private

Definition at line 126 of file G4ElectronIonPair.hh.

◆ g4MatData

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

Definition at line 134 of file G4ElectronIonPair.hh.

◆ g4MatNames

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

Definition at line 135 of file G4ElectronIonPair.hh.

◆ invFanoFactor

G4double G4ElectronIonPair::invFanoFactor
private

Definition at line 128 of file G4ElectronIonPair.hh.

◆ nMaterials

G4int G4ElectronIonPair::nMaterials
private

Definition at line 131 of file G4ElectronIonPair.hh.

◆ verbose

G4int G4ElectronIonPair::verbose
private

Definition at line 130 of file G4ElectronIonPair.hh.


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