59 if (algorithm == 0)
G4Exception(
"G4PixeShellDataSet::G4PixeShellDataSet",
62 "interpolation == 0");
64 crossModel.push_back(modelK);
65 crossModel.push_back(modelL);
66 crossModel.push_back(modelM);
68 shellName.push_back(
"k");
69 shellName.push_back(
"l");
70 shellName.push_back(
"m");
72 std::size_t sizeK = modelK.size();
73 std::size_t sizeL = modelL.size();
74 std::size_t sizeM = modelM.size();
76 if (sizeK > 0) subShellName.push_back(
"k");
78 if (sizeK > 0 && sizeL > 0)
80 subShellName.push_back(
"l1");
81 subShellName.push_back(
"l2");
82 subShellName.push_back(
"l3");
84 if (sizeK > 0 && sizeL > 0 && sizeM >0)
86 subShellName.push_back(
"m1");
87 subShellName.push_back(
"m2");
88 subShellName.push_back(
"m3");
89 subShellName.push_back(
"m4");
90 subShellName.push_back(
"m5");
98 if (algorithm)
delete algorithm;
107 std::vector<G4IDataSet *>::const_iterator i(components.begin());
108 std::vector<G4IDataSet *>::const_iterator end(components.end());
112 value += (*i)->FindValue(energy);
123 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
141 G4IDataSet* component = components[componentId];
149 std::ostringstream message;
150 message <<
"G4PixeShellDataSet::SetEnergiesData - component " << componentId <<
" not found";
155 message.str().c_str());
165 std::size_t nShells = subShellName.size();
167 for (std::size_t subShellIndex=0; subShellIndex<nShells; ++subShellIndex)
169 G4String subName = subShellName[subShellIndex];
170 G4String fullFileName = FullFileName(file,subName);
193 while (!components.empty())
195 if (components.back())
delete components.back();
196 components.pop_back();
209 "G4PIIDATA environment variable not set");
212 G4int shellIndex = TranslateShell(subShell);
213 G4String shellString = shellName[shellIndex];
214 G4String shellModel = crossModel[shellIndex];
216 std::ostringstream fullFileName;
232 G4String test(fullFileName.str().c_str());
235 return G4String(fullFileName.str().c_str());
238G4int G4PixeShellDataSet::TranslateShell(
const G4String& subShell)
const
243 if (subShell ==
"l1" || subShell ==
"l2" || subShell ==
"l3" ) index = 1;
244 if (subShell ==
"m1" ||
248 subShell ==
"m5" ) index = 2;
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual G4bool LoadData(const G4String &fileName)=0
virtual void PrintData(void) const =0
virtual G4bool SaveData(const G4String &fileName) const
virtual size_t NumberOfComponents(void) const
G4PixeShellDataSet(G4int Z, G4IInterpolator *algo, const G4String &modelK="ecpssr", const G4String &modelL="ecpssr", const G4String &modelM="ecpssr", G4double eUnit=CLHEP::MeV, G4double dataUnit=CLHEP::barn)
virtual const G4IDataSet * GetComponent(G4int componentId) const
virtual void SetEnergiesData(G4DataVector *energies, G4DataVector *data, G4int componentId)
virtual G4bool LoadData(const G4String &fileName)
virtual void AddComponent(G4IDataSet *dataSet)
virtual G4double FindValue(G4double energy, G4int componentId=0) const
virtual ~G4PixeShellDataSet()
virtual void PrintData(void) const
void CleanUpComponents(void)