60 if (algorithm == 0)
G4Exception(
"G4PixeShellDataSet::G4PixeShellDataSet",
63 "interpolation == 0");
65 crossModel.push_back(modelK);
66 crossModel.push_back(modelL);
67 crossModel.push_back(modelM);
69 shellName.push_back(
"k");
70 shellName.push_back(
"l");
71 shellName.push_back(
"m");
73 size_t sizeK = modelK.size();
74 size_t sizeL = modelL.size();
75 size_t sizeM = modelM.size();
77 if (sizeK > 0) subShellName.push_back(
"k");
79 if (sizeK > 0 && sizeL > 0)
81 subShellName.push_back(
"l1");
82 subShellName.push_back(
"l2");
83 subShellName.push_back(
"l3");
85 if (sizeK > 0 && sizeL > 0 && sizeM >0)
87 subShellName.push_back(
"m1");
88 subShellName.push_back(
"m2");
89 subShellName.push_back(
"m3");
90 subShellName.push_back(
"m4");
91 subShellName.push_back(
"m5");
99 if (algorithm)
delete algorithm;
108 std::vector<G4IDataSet *>::const_iterator i(components.begin());
109 std::vector<G4IDataSet *>::const_iterator end(components.end());
113 value += (*i)->FindValue(energy);
124 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
142 G4IDataSet* component = components[componentId];
150 std::ostringstream message;
151 message <<
"G4PixeShellDataSet::SetEnergiesData - component " << componentId <<
" not found";
156 message.str().c_str());
166 G4int nShells = subShellName.size();
168 for (
G4int subShellIndex=0; subShellIndex<nShells; subShellIndex++)
170 G4String subName = subShellName[subShellIndex];
171 G4String fullFileName = FullFileName(file,subName);
194 while (!components.empty())
196 if (components.back())
delete components.back();
197 components.pop_back();
205 char* path = getenv(
"G4PIIDATA");
210 "G4PIIDATA environment variable not set");
213 G4int shellIndex = TranslateShell(subShell);
214 G4String shellString = shellName[shellIndex];
215 G4String shellModel = crossModel[shellIndex];
217 std::ostringstream fullFileName;
236 return G4String(fullFileName.str().c_str());
239 G4int G4PixeShellDataSet::TranslateShell(
const G4String& subShell)
const
244 if (subShell ==
"l1" || subShell ==
"l2" || subShell ==
"l3" ) index = 1;
245 if (subShell ==
"m1" ||
249 subShell ==
"m5" ) index = 2;
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual void SetEnergiesData(G4DataVector *energies, G4DataVector *data, G4int componentId)
virtual G4double FindValue(G4double energy, G4int componentId=0) const
void CleanUpComponents(void)
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)
G4GLOB_DLL std::ostream G4cout
virtual ~G4PixeShellDataSet()
virtual const G4IDataSet * GetComponent(G4int componentId) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool LoadData(const G4String &fileName)=0
virtual G4bool LoadData(const G4String &fileName)
const XML_Char int const XML_Char * value
virtual void PrintData(void) const
virtual void PrintData(void) const =0
virtual G4bool SaveData(const G4String &fileName) const
virtual void AddComponent(G4IDataSet *dataSet)
const XML_Char const XML_Char * data
virtual size_t NumberOfComponents(void) const