Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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. More...
 
G4double GetMeanExcitationEnergy (const G4Material *)
 Returns the mean excitation energy. More...
 
G4double GetPlasmaEnergySquared (const G4Material *)
 Returns the squared plasma energy. More...
 
G4double GetAtomsPerMolecule (const G4Material *)
 Returns the total number of atoms per molecule. More...
 
G4double GetNumberOfZAtomsPerMolecule (const G4Material *, G4int Z)
 

Static Public Member Functions

static
G4PenelopeOscillatorManager
GetOscillatorManager ()
 

Protected Member Functions

 G4PenelopeOscillatorManager ()
 
 ~G4PenelopeOscillatorManager ()
 

Detailed Description

Definition at line 68 of file G4PenelopeOscillatorManager.hh.

Constructor & Destructor Documentation

G4PenelopeOscillatorManager::G4PenelopeOscillatorManager ( )
protected

Definition at line 62 of file G4PenelopeOscillatorManager.cc.

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

Here is the caller graph for this function:

G4PenelopeOscillatorManager::~G4PenelopeOscillatorManager ( )
protected

Definition at line 78 of file G4PenelopeOscillatorManager.cc.

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

Here is the call graph for this function:

Member Function Documentation

void G4PenelopeOscillatorManager::Clear ( )

Definition at line 99 of file G4PenelopeOscillatorManager.cc.

100 {
101  if (verbosityLevel > 1)
102  G4cout << " G4PenelopeOscillatorManager::Clear() - Clean Oscillator Tables" << G4endl;
103 
104  //Clean up OscillatorStoreIonisation
105  for (auto& item : (*oscillatorStoreIonisation))
106  {
107  G4PenelopeOscillatorTable* table = item.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 (auto& item : (*oscillatorStoreCompton))
122  {
123  G4PenelopeOscillatorTable* table = item.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 }
G4GLOB_DLL std::ostream G4cout
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
#define G4endl
Definition: G4ios.hh:61

Here is the caller graph for this function:

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 }
G4PenelopeOscillatorTable * GetOscillatorTableIonisation(const G4Material *)
const G4String & GetName() const
Definition: G4Material.hh:178
G4PenelopeOscillatorTable * GetOscillatorTableCompton(const G4Material *)
G4GLOB_DLL std::ostream G4cout
static constexpr double eV
Definition: G4SIunits.hh:215
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4double G4PenelopeOscillatorManager::GetAtomsPerMolecule ( const G4Material mat)

Returns the total number of atoms per molecule.

Definition at line 1195 of file G4PenelopeOscillatorManager.cc.

1196 {
1197  // (1) First time, create oscillatorStores and read data
1198  CheckForTablesCreated();
1199 
1200  // (2) Check if the material has been already included
1201  if (atomsPerMolecule->count(mat))
1202  return atomsPerMolecule->find(mat)->second;
1203 
1204  // (3) If we are here, it means that we have to create the table for the material
1205  BuildOscillatorTable(mat);
1206 
1207  // (4) now, the oscillator store should be ok
1208  if (atomsPerMolecule->count(mat))
1209  return atomsPerMolecule->find(mat)->second;
1210  else
1211  {
1212  G4cout << "G4PenelopeOscillatorManager::GetAtomsPerMolecule() " << G4endl;
1213  G4cout << "Impossible to retrieve the number of atoms per molecule for "
1214  << mat->GetName() << G4endl;
1215  return 0;
1216  }
1217 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4PenelopeOscillatorManager::GetMeanExcitationEnergy ( const G4Material mat)

Returns the mean excitation energy.

Definition at line 1146 of file G4PenelopeOscillatorManager.cc.

1147 {
1148  // (1) First time, create oscillatorStores and read data
1149  CheckForTablesCreated();
1150 
1151  // (2) Check if the material has been already included
1152  if (excitationEnergy->count(mat))
1153  return excitationEnergy->find(mat)->second;
1154 
1155  // (3) If we are here, it means that we have to create the table for the material
1156  BuildOscillatorTable(mat);
1157 
1158  // (4) now, the oscillator store should be ok
1159  if (excitationEnergy->count(mat))
1160  return excitationEnergy->find(mat)->second;
1161  else
1162  {
1163  G4cout << "G4PenelopeOscillatorManager::GetMolecularExcitationEnergy() " << G4endl;
1164  G4cout << "Impossible to retrieve the excitation energy for " << mat->GetName() << G4endl;
1165  return 0;
1166  }
1167 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

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

Definition at line 1221 of file G4PenelopeOscillatorManager.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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 nullptr;
404  }
405 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4PenelopeOscillatorTable * GetOscillatorTableCompton(const G4Material *)
G4GLOB_DLL std::ostream G4cout
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

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 nullptr;
357  }
358 }
G4PenelopeOscillatorTable * GetOscillatorTableIonisation(const G4Material *)
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4PenelopeOscillatorManager * G4PenelopeOscillatorManager::GetOscillatorManager ( )
static

Definition at line 90 of file G4PenelopeOscillatorManager.cc.

91 {
92  if (!instance)
93  instance = new G4PenelopeOscillatorManager();
94  return instance;
95 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 nullptr;
386  }
387 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

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 nullptr;
339  }
340 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4PenelopeOscillatorManager::GetPlasmaEnergySquared ( const G4Material mat)

Returns the squared plasma energy.

Definition at line 1170 of file G4PenelopeOscillatorManager.cc.

1171 {
1172  // (1) First time, create oscillatorStores and read data
1173  CheckForTablesCreated();
1174 
1175  // (2) Check if the material has been already included
1176  if (plasmaSquared->count(mat))
1177  return plasmaSquared->find(mat)->second;
1178 
1179  // (3) If we are here, it means that we have to create the table for the material
1180  BuildOscillatorTable(mat);
1181 
1182  // (4) now, the oscillator store should be ok
1183  if (plasmaSquared->count(mat))
1184  return plasmaSquared->find(mat)->second;
1185  else
1186  {
1187  G4cout << "G4PenelopeOscillatorManager::GetPlasmaEnergySquared() " << G4endl;
1188  G4cout << "Impossible to retrieve the plasma energy for " << mat->GetName() << G4endl;
1189  return 0;
1190  }
1191 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

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 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

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 }
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4int G4PenelopeOscillatorManager::GetVerbosityLevel ( )
inline

Definition at line 89 of file G4PenelopeOscillatorManager.hh.

89 {return verbosityLevel;};
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: