#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.
Definition at line 64 of file G4ShellEMDataSet.cc.
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4ShellEMDataSet::~G4ShellEMDataSet |
( |
| ) |
|
|
virtual |
Definition at line 77 of file G4ShellEMDataSet.cc.
80 if (algorithm)
delete algorithm;
void CleanUpComponents(void)
void G4ShellEMDataSet::CleanUpComponents |
( |
void |
| ) |
|
|
protected |
Definition at line 389 of file G4ShellEMDataSet.cc.
391 while (!components.empty())
393 if (components.back())
delete components.back();
394 components.pop_back();
Implements G4VEMDataSet.
Definition at line 84 of file G4ShellEMDataSet.cc.
89 std::vector<G4VEMDataSet *>::const_iterator i(components.begin());
90 std::vector<G4VEMDataSet *>::const_iterator end(components.end());
94 value += (*i)->FindValue(
energy);
const XML_Char int const XML_Char * value
G4double energy(const ThreeVector &p, const G4double m)
virtual const G4VEMDataSet* G4ShellEMDataSet::GetComponent |
( |
G4int |
componentId | ) |
const |
|
inlinevirtual |
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
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
Implements G4VEMDataSet.
Definition at line 81 of file G4ShellEMDataSet.hh.
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual const G4DataVector & GetLogData(G4int componentId) const =0
virtual const G4DataVector& G4ShellEMDataSet::GetLogEnergies |
( |
G4int |
componentId | ) |
const |
|
inlinevirtual |
Implements G4VEMDataSet.
Definition at line 80 of file G4ShellEMDataSet.hh.
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual const G4DataVector & GetLogEnergies(G4int componentId) const =0
G4double G4ShellEMDataSet::GetUnitData |
( |
| ) |
const |
|
inlineprotected |
G4double G4ShellEMDataSet::GetUnitEnergies |
( |
| ) |
const |
|
inlineprotected |
Implements G4VEMDataSet.
Definition at line 160 of file G4ShellEMDataSet.cc.
164 G4String fullFileName = FullFileName(file);
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) )
202 AddComponent(
new G4EMDataSet(shellIndex, orig_shell_energies, orig_shell_data, log_shell_energies, log_shell_data, algorithm->
Clone(), unitEnergies, unitData));
203 orig_shell_energies = 0;
205 log_shell_energies = 0;
211 if (orig_shell_energies == 0)
220 orig_shell_energies->push_back(a*unitEnergies);
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)
virtual void AddComponent(G4VEMDataSet *dataSet)
Implements G4VEMDataSet.
Definition at line 244 of file G4ShellEMDataSet.cc.
248 G4String fullFileName = FullFileName(file);
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)
296 orig_shell_energies->push_back(a*unitEnergies);
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)
virtual void AddComponent(G4VEMDataSet *dataSet)
virtual size_t G4ShellEMDataSet::NumberOfComponents |
( |
void |
| ) |
const |
|
inlinevirtual |
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;
virtual size_t NumberOfComponents(void) const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
G4GLOB_DLL std::ostream G4cout
virtual void PrintData(void) const =0
Implements G4VEMDataSet.
Definition at line 317 of file G4ShellEMDataSet.cc.
319 G4String fullFileName = FullFileName(file);
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();
350 out.setf(std::ofstream::left);
351 out << ((*i)/unitEnergies) <<
' ';
355 out.setf(std::ofstream::left);
356 out << ((*j)/unitData) << std::endl;
364 out.setf(std::ofstream::left);
369 out.setf(std::ofstream::left);
370 out << -1.f << std::endl;
377 out.setf(std::ofstream::left);
382 out.setf(std::ofstream::left);
383 out << -2.f << std::endl;
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual size_t NumberOfComponents(void) const
virtual const G4DataVector & GetData(G4int componentId) const =0
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
const XML_Char const XML_Char * data
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Implements G4VEMDataSet.
Definition at line 120 of file G4ShellEMDataSet.cc.
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Implements G4VEMDataSet.
Definition at line 138 of file G4ShellEMDataSet.cc.
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)
The documentation for this class was generated from the following files: