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

#include <G4PenelopeOscillatorManager.hh>

Public Member Functions

void Clear ()
 
void Dump (const G4Material *)
 
G4PenelopeOscillatorTableGetOscillatorTableIonisation (const G4Material *)
 
G4PenelopeOscillatorGetOscillatorIonisation (const G4Material *, G4int)
 
G4PenelopeOscillatorTableGetOscillatorTableCompton (const G4Material *)
 
G4PenelopeOscillatorGetOscillatorCompton (const G4Material *, G4int)
 
void SetVerbosityLevel (G4int vl)
 
G4int GetVerbosityLevel ()
 
G4double GetTotalZ (const G4Material *)
 
G4double GetTotalA (const G4Material *)
 Returns the total A for the molecule.
 
G4double GetMeanExcitationEnergy (const G4Material *)
 Returns the mean excitation energy.
 
G4double GetPlasmaEnergySquared (const G4Material *)
 Returns the squared plasma energy.
 
G4double GetAtomsPerMolecule (const G4Material *)
 Returns the total number of atoms per molecule.
 
G4double GetNumberOfZAtomsPerMolecule (const G4Material *, G4int Z)
 

Static Public Member Functions

static G4PenelopeOscillatorManagerGetOscillatorManager ()
 

Protected Member Functions

 G4PenelopeOscillatorManager ()
 
 ~G4PenelopeOscillatorManager ()
 

Detailed Description

Definition at line 68 of file G4PenelopeOscillatorManager.hh.

Constructor & Destructor Documentation

◆ G4PenelopeOscillatorManager()

G4PenelopeOscillatorManager::G4PenelopeOscillatorManager ( )
protected

Definition at line 61 of file G4PenelopeOscillatorManager.cc.

61 :
62 oscillatorStoreIonisation(0),oscillatorStoreCompton(0),atomicNumber(0),
63 atomicMass(0),excitationEnergy(0),plasmaSquared(0),atomsPerMolecule(0),
64 atomTablePerMolecule(0)
65{
66 fReadElementData = false;
67 for (G4int i=0;i<5;i++)
68 {
69 for (G4int j=0;j<2000;j++)
70 elementData[i][j] = 0.;
71 }
72 verbosityLevel = 0;
73}
int G4int
Definition: G4Types.hh:66

Referenced by GetOscillatorManager().

◆ ~G4PenelopeOscillatorManager()

G4PenelopeOscillatorManager::~G4PenelopeOscillatorManager ( )
protected

Definition at line 77 of file G4PenelopeOscillatorManager.cc.

78{
79 Clear();
80 delete instance;
81}

Member Function Documentation

◆ Clear()

void G4PenelopeOscillatorManager::Clear ( )

Definition at line 98 of file G4PenelopeOscillatorManager.cc.

99{
100 if (verbosityLevel > 1)
101 G4cout << " G4PenelopeOscillatorManager::Clear() - Clean Oscillator Tables" << G4endl;
102
103 //Clean up OscillatorStoreIonisation
104 std::map<const G4Material*,G4PenelopeOscillatorTable*>::iterator i;
105 for (i=oscillatorStoreIonisation->begin();i != oscillatorStoreIonisation->end();i++)
106 {
107 G4PenelopeOscillatorTable* table = i->second;
108 if (table)
109 {
110 for (size_t k=0;k<table->size();k++) //clean individual oscillators
111 {
112 if ((*table)[k])
113 delete ((*table)[k]);
114 }
115 delete table;
116 }
117 }
118 delete oscillatorStoreIonisation;
119
120 //Clean up OscillatorStoreCompton
121 for (i=oscillatorStoreCompton->begin();i != oscillatorStoreCompton->end();i++)
122 {
123 G4PenelopeOscillatorTable* table = i->second;
124 if (table)
125 {
126 for (size_t k=0;k<table->size();k++) //clean individual oscillators
127 {
128 if ((*table)[k])
129 delete ((*table)[k]);
130 }
131 delete table;
132 }
133 }
134 delete oscillatorStoreCompton;
135
136 if (atomicMass) delete atomicMass;
137 if (atomicNumber) delete atomicNumber;
138 if (excitationEnergy) delete excitationEnergy;
139 if (plasmaSquared) delete plasmaSquared;
140 if (atomsPerMolecule) delete atomsPerMolecule;
141 if (atomTablePerMolecule) delete atomTablePerMolecule;
142}
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by ~G4PenelopeOscillatorManager().

◆ Dump()

void G4PenelopeOscillatorManager::Dump ( const G4Material material)

Definition at line 146 of file G4PenelopeOscillatorManager.cc.

147{
149 if (!theTable)
150 {
151 G4cout << " G4PenelopeOscillatorManager::Dump " << G4endl;
152 G4cout << "Problem in retrieving the Ionisation Oscillator Table for " << material->GetName() << G4endl;
153 return;
154 }
155 G4cout << "*********************************************************************" << G4endl;
156 G4cout << " Penelope Oscillator Table Ionisation for " << material->GetName() << G4endl;
157 G4cout << "*********************************************************************" << G4endl;
158 G4cout << "The table contains " << theTable->size() << " oscillators " << G4endl;
159 G4cout << "*********************************************************************" << G4endl;
160 if (theTable->size() < 10)
161 for (size_t k=0;k<theTable->size();k++)
162 {
163 G4cout << "Oscillator # " << k << " Z = " << (*theTable)[k]->GetParentZ() <<
164 " Shell Flag = " << (*theTable)[k]->GetShellFlag() <<
165 " Parent shell ID = " << (*theTable)[k]->GetParentShellID() << G4endl;
166 G4cout << "Ionisation energy = " << (*theTable)[k]->GetIonisationEnergy()/eV << " eV" << G4endl;
167 G4cout << "Occupation number = " << (*theTable)[k]->GetOscillatorStrength() << G4endl;
168 G4cout << "Resonance energy = " << (*theTable)[k]->GetResonanceEnergy()/eV << " eV" << G4endl;
169 G4cout << "Cufoff resonance energy = " <<
170 (*theTable)[k]->GetCutoffRecoilResonantEnergy()/eV << " eV" << G4endl;
171 G4cout << "*********************************************************************" << G4endl;
172 }
173 for (size_t k=0;k<theTable->size();k++)
174 {
175 G4cout << k << " " << (*theTable)[k]->GetOscillatorStrength() << " " <<
176 (*theTable)[k]->GetIonisationEnergy()/eV << " " << (*theTable)[k]->GetResonanceEnergy()/eV << " " <<
177 (*theTable)[k]->GetParentZ() << " " << (*theTable)[k]->GetShellFlag() << " " <<
178 (*theTable)[k]->GetParentShellID() << G4endl;
179 }
180 G4cout << "*********************************************************************" << G4endl;
181
182
183 //Compton table
184 theTable = GetOscillatorTableCompton(material);
185 if (!theTable)
186 {
187 G4cout << " G4PenelopeOscillatorManager::Dump " << G4endl;
188 G4cout << "Problem in retrieving the Compton Oscillator Table for " << material->GetName() << G4endl;
189 return;
190 }
191 G4cout << "*********************************************************************" << G4endl;
192 G4cout << " Penelope Oscillator Table Compton for " << material->GetName() << G4endl;
193 G4cout << "*********************************************************************" << G4endl;
194 G4cout << "The table contains " << theTable->size() << " oscillators " << G4endl;
195 G4cout << "*********************************************************************" << G4endl;
196 if (theTable->size() < 10)
197 for (size_t k=0;k<theTable->size();k++)
198 {
199 G4cout << "Oscillator # " << k << " Z = " << (*theTable)[k]->GetParentZ() <<
200 " Shell Flag = " << (*theTable)[k]->GetShellFlag() <<
201 " Parent shell ID = " << (*theTable)[k]->GetParentShellID() << G4endl;
202 G4cout << "Compton index = " << (*theTable)[k]->GetHartreeFactor() << G4endl;
203 G4cout << "Ionisation energy = " << (*theTable)[k]->GetIonisationEnergy()/eV << " eV" << G4endl;
204 G4cout << "Occupation number = " << (*theTable)[k]->GetOscillatorStrength() << G4endl;
205 G4cout << "*********************************************************************" << G4endl;
206 }
207 for (size_t k=0;k<theTable->size();k++)
208 {
209 G4cout << k << " " << (*theTable)[k]->GetOscillatorStrength() << " " <<
210 (*theTable)[k]->GetIonisationEnergy()/eV << " " << (*theTable)[k]->GetHartreeFactor() << " " <<
211 (*theTable)[k]->GetParentZ() << " " << (*theTable)[k]->GetShellFlag() << " " <<
212 (*theTable)[k]->GetParentShellID() << G4endl;
213 }
214 G4cout << "*********************************************************************" << G4endl;
215
216 return;
217}
const G4String & GetName() const
Definition: G4Material.hh:177
G4PenelopeOscillatorTable * GetOscillatorTableCompton(const G4Material *)
G4PenelopeOscillatorTable * GetOscillatorTableIonisation(const G4Material *)

◆ GetAtomsPerMolecule()

G4double G4PenelopeOscillatorManager::GetAtomsPerMolecule ( const G4Material mat)

Returns the total number of atoms per molecule.

Definition at line 1190 of file G4PenelopeOscillatorManager.cc.

1191{
1192 // (1) First time, create oscillatorStores and read data
1193 CheckForTablesCreated();
1194
1195 // (2) Check if the material has been already included
1196 if (atomsPerMolecule->count(mat))
1197 return atomsPerMolecule->find(mat)->second;
1198
1199 // (3) If we are here, it means that we have to create the table for the material
1200 BuildOscillatorTable(mat);
1201
1202 // (4) now, the oscillator store should be ok
1203 if (atomsPerMolecule->count(mat))
1204 return atomsPerMolecule->find(mat)->second;
1205 else
1206 {
1207 G4cout << "G4PenelopeOscillatorManager::GetAtomsPerMolecule() " << G4endl;
1208 G4cout << "Impossible to retrieve the number of atoms per molecule for "
1209 << mat->GetName() << G4endl;
1210 return 0;
1211 }
1212}

Referenced by G4PenelopeBremsstrahlungModel::ComputeDEDXPerVolume(), G4PenelopeIonisationModel::ComputeDEDXPerVolume(), G4PenelopeComptonModel::CrossSectionPerVolume(), G4PenelopeBremsstrahlungModel::CrossSectionPerVolume(), and G4PenelopeIonisationModel::CrossSectionPerVolume().

◆ GetMeanExcitationEnergy()

G4double G4PenelopeOscillatorManager::GetMeanExcitationEnergy ( const G4Material mat)

Returns the mean excitation energy.

Definition at line 1141 of file G4PenelopeOscillatorManager.cc.

1142{
1143 // (1) First time, create oscillatorStores and read data
1144 CheckForTablesCreated();
1145
1146 // (2) Check if the material has been already included
1147 if (excitationEnergy->count(mat))
1148 return excitationEnergy->find(mat)->second;
1149
1150 // (3) If we are here, it means that we have to create the table for the material
1151 BuildOscillatorTable(mat);
1152
1153 // (4) now, the oscillator store should be ok
1154 if (excitationEnergy->count(mat))
1155 return excitationEnergy->find(mat)->second;
1156 else
1157 {
1158 G4cout << "G4PenelopeOscillatorManager::GetMolecularExcitationEnergy() " << G4endl;
1159 G4cout << "Impossible to retrieve the excitation energy for " << mat->GetName() << G4endl;
1160 return 0;
1161 }
1162}

◆ GetNumberOfZAtomsPerMolecule()

G4double G4PenelopeOscillatorManager::GetNumberOfZAtomsPerMolecule ( const G4Material mat,
G4int  Z 
)

Definition at line 1216 of file G4PenelopeOscillatorManager.cc.

1217{
1218 // (1) First time, create oscillatorStores and read data
1219 CheckForTablesCreated();
1220
1221 // (2) Check if the material/Z couple has been already included
1222 std::pair<const G4Material*,G4int> theKey = std::make_pair(mat,Z);
1223 if (atomTablePerMolecule->count(theKey))
1224 return atomTablePerMolecule->find(theKey)->second;
1225
1226 // (3) If we are here, it means that we have to create the table for the material
1227 BuildOscillatorTable(mat);
1228
1229 // (4) now, the oscillator store should be ok
1230 if (atomTablePerMolecule->count(theKey))
1231 return atomTablePerMolecule->find(theKey)->second;
1232 else
1233 {
1234 G4cout << "G4PenelopeOscillatorManager::GetAtomsPerMolecule() " << G4endl;
1235 G4cout << "Impossible to retrieve the number of atoms per molecule for Z = "
1236 << Z << " in material " << mat->GetName() << G4endl;
1237 return 0;
1238 }
1239}

Referenced by G4PenelopeIonisationCrossSection::CrossSection().

◆ GetOscillatorCompton()

G4PenelopeOscillator * G4PenelopeOscillatorManager::GetOscillatorCompton ( const G4Material material,
G4int  index 
)

Definition at line 391 of file G4PenelopeOscillatorManager.cc.

393{
395 if (((size_t)index) < theTable->size())
396 return (*theTable)[index];
397 else
398 {
399 G4cout << "WARNING: Compton table for material " << material->GetName() << " has " <<
400 theTable->size() << " oscillators" << G4endl;
401 G4cout << "Oscillator #" << index << " cannot be retrieved" << G4endl;
402 G4cout << "Returning null pointer" << G4endl;
403 return NULL;
404 }
405}

◆ GetOscillatorIonisation()

G4PenelopeOscillator * G4PenelopeOscillatorManager::GetOscillatorIonisation ( const G4Material material,
G4int  index 
)

Definition at line 344 of file G4PenelopeOscillatorManager.cc.

346{
348 if (((size_t)index) < theTable->size())
349 return (*theTable)[index];
350 else
351 {
352 G4cout << "WARNING: Ionisation table for material " << material->GetName() << " has " <<
353 theTable->size() << " oscillators" << G4endl;
354 G4cout << "Oscillator #" << index << " cannot be retrieved" << G4endl;
355 G4cout << "Returning null pointer" << G4endl;
356 return NULL;
357 }
358}

Referenced by G4PenelopeIonisationCrossSection::CrossSection().

◆ GetOscillatorManager()

◆ GetOscillatorTableCompton()

G4PenelopeOscillatorTable * G4PenelopeOscillatorManager::GetOscillatorTableCompton ( const G4Material mat)

Definition at line 363 of file G4PenelopeOscillatorManager.cc.

364{
365 // (1) First time, create oscillatorStore and read data
366 CheckForTablesCreated();
367
368 // (2) Check if the material has been already included
369 if (oscillatorStoreCompton->count(mat))
370 {
371 //Ok, it exists
372 return oscillatorStoreCompton->find(mat)->second;
373 }
374
375 // (3) If we are here, it means that we have to create the table for the material
376 BuildOscillatorTable(mat);
377
378 // (4) now, the oscillator store should be ok
379 if (oscillatorStoreCompton->count(mat))
380 return oscillatorStoreCompton->find(mat)->second;
381 else
382 {
383 G4cout << "G4PenelopeOscillatorManager::GetOscillatorTableCompton() " << G4endl;
384 G4cout << "Impossible to create Compton oscillator table for " << mat->GetName() << G4endl;
385 return NULL;
386 }
387}

Referenced by G4PenelopeComptonModel::CrossSectionPerVolume(), Dump(), GetOscillatorCompton(), and G4PenelopeComptonModel::SampleSecondaries().

◆ GetOscillatorTableIonisation()

G4PenelopeOscillatorTable * G4PenelopeOscillatorManager::GetOscillatorTableIonisation ( const G4Material mat)

Definition at line 316 of file G4PenelopeOscillatorManager.cc.

317{
318 // (1) First time, create oscillatorStores and read data
319 CheckForTablesCreated();
320
321 // (2) Check if the material has been already included
322 if (oscillatorStoreIonisation->count(mat))
323 {
324 //Ok, it exists
325 return oscillatorStoreIonisation->find(mat)->second;
326 }
327
328 // (3) If we are here, it means that we have to create the table for the material
329 BuildOscillatorTable(mat);
330
331 // (4) now, the oscillator store should be ok
332 if (oscillatorStoreIonisation->count(mat))
333 return oscillatorStoreIonisation->find(mat)->second;
334 else
335 {
336 G4cout << "G4PenelopeOscillatorManager::GetOscillatorTableIonisation() " << G4endl;
337 G4cout << "Impossible to create ionisation oscillator table for " << mat->GetName() << G4endl;
338 return NULL;
339 }
340}

Referenced by Dump(), GetOscillatorIonisation(), and G4PenelopeIonisationModel::SampleSecondaries().

◆ GetPlasmaEnergySquared()

G4double G4PenelopeOscillatorManager::GetPlasmaEnergySquared ( const G4Material mat)

Returns the squared plasma energy.

Definition at line 1165 of file G4PenelopeOscillatorManager.cc.

1166{
1167 // (1) First time, create oscillatorStores and read data
1168 CheckForTablesCreated();
1169
1170 // (2) Check if the material has been already included
1171 if (plasmaSquared->count(mat))
1172 return plasmaSquared->find(mat)->second;
1173
1174 // (3) If we are here, it means that we have to create the table for the material
1175 BuildOscillatorTable(mat);
1176
1177 // (4) now, the oscillator store should be ok
1178 if (plasmaSquared->count(mat))
1179 return plasmaSquared->find(mat)->second;
1180 else
1181 {
1182 G4cout << "G4PenelopeOscillatorManager::GetPlasmaEnergySquared() " << G4endl;
1183 G4cout << "Impossible to retrieve the plasma energy for " << mat->GetName() << G4endl;
1184 return 0;
1185 }
1186}

◆ GetTotalA()

G4double G4PenelopeOscillatorManager::GetTotalA ( const G4Material mat)

Returns the total A for the molecule.

Definition at line 291 of file G4PenelopeOscillatorManager.cc.

292{
293 // (1) First time, create oscillatorStores and read data
294 CheckForTablesCreated();
295
296 // (2) Check if the material has been already included
297 if (atomicMass->count(mat))
298 return atomicMass->find(mat)->second;
299
300 // (3) If we are here, it means that we have to create the table for the material
301 BuildOscillatorTable(mat);
302
303 // (4) now, the oscillator store should be ok
304 if (atomicMass->count(mat))
305 return atomicMass->find(mat)->second;
306 else
307 {
308 G4cout << "G4PenelopeOscillatorManager::GetTotalA() " << G4endl;
309 G4cout << "Impossible to retrieve the total A for " << mat->GetName() << G4endl;
310 return 0;
311 }
312}

◆ GetTotalZ()

G4double G4PenelopeOscillatorManager::GetTotalZ ( const G4Material mat)

These are cumulative for the molecule Returns the total Z for the molecule

Definition at line 266 of file G4PenelopeOscillatorManager.cc.

267{
268 // (1) First time, create oscillatorStores and read data
269 CheckForTablesCreated();
270
271 // (2) Check if the material has been already included
272 if (atomicNumber->count(mat))
273 return atomicNumber->find(mat)->second;
274
275 // (3) If we are here, it means that we have to create the table for the material
276 BuildOscillatorTable(mat);
277
278 // (4) now, the oscillator store should be ok
279 if (atomicNumber->count(mat))
280 return atomicNumber->find(mat)->second;
281 else
282 {
283 G4cout << "G4PenelopeOscillatorManager::GetTotalZ() " << G4endl;
284 G4cout << "Impossible to retrieve the total Z for " << mat->GetName() << G4endl;
285 return 0;
286 }
287}

Referenced by G4PenelopeComptonModel::SampleSecondaries().

◆ GetVerbosityLevel()

G4int G4PenelopeOscillatorManager::GetVerbosityLevel ( )
inline

Definition at line 89 of file G4PenelopeOscillatorManager.hh.

89{return verbosityLevel;};

◆ SetVerbosityLevel()

void G4PenelopeOscillatorManager::SetVerbosityLevel ( G4int  vl)
inline

Definition at line 88 of file G4PenelopeOscillatorManager.hh.

88{verbosityLevel = vl;};

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