#include <G4ShellEMDataSet.hh>
|
| G4ShellEMDataSet (G4int Z, G4VDataSetAlgorithm *algo, G4double eUnit=CLHEP::MeV, G4double dataUnit=CLHEP::barn) |
|
virtual | ~G4ShellEMDataSet () |
|
virtual G4double | FindValue (G4double energy, G4int componentId=0) const |
|
virtual void | PrintData (void) const |
|
virtual const G4VEMDataSet * | GetComponent (G4int componentId) const |
|
virtual void | AddComponent (G4VEMDataSet *dataSet) |
|
virtual size_t | NumberOfComponents (void) const |
|
virtual const G4DataVector & | GetEnergies (G4int componentId) const |
|
virtual const G4DataVector & | GetData (G4int componentId) const |
|
virtual const G4DataVector & | GetLogEnergies (G4int componentId) const |
|
virtual const G4DataVector & | GetLogData (G4int componentId) const |
|
virtual void | SetEnergiesData (G4DataVector *energies, G4DataVector *data, G4int componentId) |
|
virtual void | SetLogEnergiesData (G4DataVector *energies, G4DataVector *data, G4DataVector *log_energies, G4DataVector *log_data, G4int componentId) |
|
virtual G4bool | LoadData (const G4String &fileName) |
|
virtual G4bool | LoadNonLogData (const G4String &fileName) |
|
virtual G4bool | SaveData (const G4String &fileName) const |
|
virtual G4double | RandomSelect (G4int) const |
|
| G4VEMDataSet () |
|
virtual | ~G4VEMDataSet () |
|
Definition at line 60 of file G4ShellEMDataSet.hh.
◆ G4ShellEMDataSet() [1/3]
Definition at line 64 of file G4ShellEMDataSet.cc.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VDataSetAlgorithm * algorithm
◆ ~G4ShellEMDataSet()
G4ShellEMDataSet::~G4ShellEMDataSet |
( |
| ) |
|
|
virtual |
Definition at line 77 of file G4ShellEMDataSet.cc.
void CleanUpComponents(void)
G4VDataSetAlgorithm * algorithm
◆ G4ShellEMDataSet() [2/3]
G4ShellEMDataSet::G4ShellEMDataSet |
( |
| ) |
|
|
private |
◆ G4ShellEMDataSet() [3/3]
◆ AddComponent()
virtual void G4ShellEMDataSet::AddComponent |
( |
G4VEMDataSet * |
dataSet | ) |
|
|
inlinevirtual |
◆ CleanUpComponents()
void G4ShellEMDataSet::CleanUpComponents |
( |
void |
| ) |
|
|
protected |
◆ FindValue()
◆ FullFileName()
Definition at line 399 of file G4ShellEMDataSet.cc.
401 char* path = getenv(
"G4LEDATA");
409 std::ostringstream fullFileName;
411 fullFileName << path <<
'/' << fileName <<
z <<
".dat";
413 return G4String(fullFileName.str().c_str());
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ GetAlgorithm()
◆ GetComponent()
virtual const G4VEMDataSet* G4ShellEMDataSet::GetComponent |
( |
G4int |
componentId | ) |
const |
|
inlinevirtual |
◆ GetData()
Implements G4VEMDataSet.
Definition at line 79 of file G4ShellEMDataSet.hh.
virtual const G4DataVector & GetData(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ GetEnergies()
Implements G4VEMDataSet.
Definition at line 78 of file G4ShellEMDataSet.hh.
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ GetLogData()
Implements G4VEMDataSet.
Definition at line 81 of file G4ShellEMDataSet.hh.
virtual const G4DataVector & GetLogData(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ GetLogEnergies()
virtual const G4DataVector& G4ShellEMDataSet::GetLogEnergies |
( |
G4int |
componentId | ) |
const |
|
inlinevirtual |
Implements G4VEMDataSet.
Definition at line 80 of file G4ShellEMDataSet.hh.
virtual const G4DataVector & GetLogEnergies(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ GetUnitData()
G4double G4ShellEMDataSet::GetUnitData |
( |
| ) |
const |
|
inlineprotected |
◆ GetUnitEnergies()
G4double G4ShellEMDataSet::GetUnitEnergies |
( |
| ) |
const |
|
inlineprotected |
◆ LoadData()
Implements G4VEMDataSet.
Definition at line 160 of file G4ShellEMDataSet.cc.
165 std::ifstream
in(fullFileName);
170 message += fullFileName;
171 message +=
"\" not found";
182 G4int shellIndex = 0;
200 if ((k%nColumns == 0) && (orig_shell_energies != 0) )
203 orig_shell_energies = 0;
205 log_shell_energies = 0;
211 if (orig_shell_energies == 0)
221 log_shell_energies->push_back(std::log10(a) + std::log10(unitEnergies));
223 else if (k%nColumns == 1)
225 orig_shell_data->push_back(a*
unitData);
226 log_shell_data->push_back(std::log10(a) + std::log10(unitData));
235 delete orig_shell_energies;
236 delete orig_shell_data;
237 delete log_shell_energies;
238 delete log_shell_data;
void CleanUpComponents(void)
virtual G4VDataSetAlgorithm * Clone() const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VDataSetAlgorithm * algorithm
G4String FullFileName(const G4String &fileName) const
virtual void AddComponent(G4VEMDataSet *dataSet)
◆ LoadNonLogData()
Implements G4VEMDataSet.
Definition at line 244 of file G4ShellEMDataSet.cc.
249 std::ifstream
in(fullFileName);
253 G4String message(
"G4ShellEMDataSet::LoadData - data file \"");
254 message += fullFileName;
255 message +=
"\" not found";
264 G4int shellIndex = 0;
280 if ((k%nColumns == 0) && (orig_shell_energies != 0) )
283 orig_shell_energies = 0;
289 if (orig_shell_energies == 0)
298 else if (k%nColumns == 1)
300 orig_shell_data->push_back(a*
unitData);
309 delete orig_shell_energies;
310 delete orig_shell_data;
void CleanUpComponents(void)
virtual G4VDataSetAlgorithm * Clone() const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VDataSetAlgorithm * algorithm
G4String FullFileName(const G4String &fileName) const
virtual void AddComponent(G4VEMDataSet *dataSet)
◆ NumberOfComponents()
virtual size_t G4ShellEMDataSet::NumberOfComponents |
( |
void |
| ) |
const |
|
inlinevirtual |
◆ operator=()
◆ PrintData()
void G4ShellEMDataSet::PrintData |
( |
void |
| ) |
const |
|
virtual |
Implements G4VEMDataSet.
Definition at line 102 of file G4ShellEMDataSet.cc.
106 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
G4GLOB_DLL std::ostream G4cout
virtual void PrintData(void) const =0
virtual size_t NumberOfComponents(void) const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ RandomSelect()
◆ SaveData()
Implements G4VEMDataSet.
Definition at line 317 of file G4ShellEMDataSet.cc.
320 std::ofstream out(fullFileName);
325 message += fullFileName;
342 G4DataVector::const_iterator i = energies.begin();
343 G4DataVector::const_iterator endI = energies.end();
344 G4DataVector::const_iterator j = data.begin();
356 out << ((*j)/
unitData) << std::endl;
370 out << -1.f << std::endl;
383 out << -2.f << std::endl;
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual const G4DataVector & GetData(G4int componentId) const =0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual size_t NumberOfComponents(void) const
G4String FullFileName(const G4String &fileName) const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
◆ SetEnergiesData()
Implements G4VEMDataSet.
Definition at line 120 of file G4ShellEMDataSet.cc.
std::vector< G4VEMDataSet * > components
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ SetLogEnergiesData()
Implements G4VEMDataSet.
Definition at line 138 of file G4ShellEMDataSet.cc.
std::vector< G4VEMDataSet * > components
virtual void SetLogEnergiesData(G4DataVector *x, G4DataVector *data, G4DataVector *Log_x, G4DataVector *Log_data, G4int component=0)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ algorithm
◆ components
◆ unitData
◆ unitEnergies
G4int G4ShellEMDataSet::z |
|
private |
The documentation for this class was generated from the following files: