45 G4String G4ComponentSAIDTotalXS::fnames[13] = {
46 "",
"pp",
"np",
"pip",
"pim",
48 "gp_pi0p",
"gp_pi+n",
"gn_pi-p",
"gn_pi0n",
"gp_etap",
"gp_etapp"
59 for(
G4int i=0; i<numberOfSaidXS; ++i) {
65 delete inelastdata[i];
76 PrintWarning(part,0,Z,
G4lrint(N),
77 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
78 "Method is not implemented");
96 PrintWarning(part,0,Z,
G4lrint(N),
97 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
98 "Method is not implemented");
111 if(!inelastdata[idx]) { Initialise(tp); }
112 if(inelastdata[idx]) {
113 cross = (inelastdata[idx])->Value(kinEnergy);
124 PrintWarning(part,0,Z,
G4lrint(N),
125 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
126 "Method is not implemented");
139 if(!elastdata[idx]) { Initialise(tp); }
141 cross = (elastdata[idx])->Value(kinEnergy);
157 if(!inelastdata[idx]) { Initialise(tp); }
158 if(inelastdata[idx]) {
159 cross = (inelastdata[idx])->Value(kinEnergy);
180 if(0 == Z && sec && 22 == code) {
193 }
else if(22 == code) {
200 if(2212 == code) { type =
saidPP; }
201 else if(2112 == code) { type =
saidNP; }
202 else if(211 == code) { type =
saidPIPP; }
203 else if(-211 == code) { type =
saidPINP; }
216 char* path = getenv(
"G4SAIDXSDATA");
219 "G4SAIDXSDATA environment variable not defined");
225 ReadData(idx,elastdata[idx],path,
"_el.dat");
226 ReadData(idx,inelastdata[idx],path,
"_in.dat");
229 ReadData(idx,inelastdata[idx],path,
".dat");
233 void G4ComponentSAIDTotalXS::ReadData(
G4int index,
238 std::ostringstream ost;
239 ost << ss1 <<
"/" << fnames[
index] << ss2;
240 std::ifstream filein(ost.str().c_str());
242 G4cout << ost.str() <<
" is not opened by G4ComponentSAIDTotalXS"
248 "chech that G4SAIDXSDATA correctly set");
252 G4cout <<
"File " << ost.str()
253 <<
" is opened by G4ComponentSAIDTotalXS" <<
G4endl;
270 G4cout <<
"For Z= " << Z <<
" N= " << N <<
" of ";