44 const G4String G4ComponentSAIDTotalXS::fnames[13] = {
45 "",
"pp",
"np",
"pip",
"pim",
47 "gp_pi0p",
"gp_pi+n",
"gn_pi-p",
"gn_pi0n",
"gp_etap",
"gp_etapp"
80 PrintWarning(part,0,Z,
G4lrint(N),
81 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
82 "Method is not implemented");
100 PrintWarning(part,0,Z,
G4lrint(N),
101 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
102 "Method is not implemented");
115 if(!inelastdata[idx]) { Initialise(tp); }
116 if(inelastdata[idx]) {
117 cross = (inelastdata[idx])->Value(kinEnergy);
128 PrintWarning(part,0,Z,
G4lrint(N),
129 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
130 "Method is not implemented");
143 if(!elastdata[idx]) { Initialise(tp); }
145 cross = (elastdata[idx])->Value(kinEnergy);
161 if(!inelastdata[idx]) { Initialise(tp); }
162 if(inelastdata[idx]) {
163 cross = (inelastdata[idx])->Value(kinEnergy);
184 if(0 == Z && sec && 22 == code) {
197 }
else if(22 == code) {
204 if(2212 == code) { type =
saidPP; }
205 else if(2112 == code) { type =
saidNP; }
206 else if(211 == code) { type =
saidPIPP; }
207 else if(-211 == code) { type =
saidPINP; }
220 char* path = getenv(
"G4SAIDXSDATA");
222 G4Exception(
"G4ComponentSAIDTotalXS::Initialise(..)",
"had013",
224 "Environment variable G4SAIDXSDATA is not defined");
230 ReadData(idx,elastdata[idx],path,
"_el.dat");
231 ReadData(idx,inelastdata[idx],path,
"_in.dat");
234 ReadData(idx,inelastdata[idx],path,
".dat");
238 void G4ComponentSAIDTotalXS::ReadData(
G4int index,
243 std::ostringstream ost;
244 ost << ss1 <<
"/" << fnames[index] << ss2;
245 std::ifstream filein(ost.str().c_str());
248 ed <<
"Data file <" << ost.str().c_str()
249 <<
"> is not opened!";
250 G4Exception(
"G4ComponentSAIDTotalXS::ReadData(..)",
"had014",
254 G4cout <<
"File " << ost.str()
255 <<
" is opened by G4ComponentSAIDTotalXS" <<
G4endl;
272 G4cout <<
"For Z= " << Z <<
" N= " << N <<
" of ";
virtual G4double GetTotalElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
virtual G4double GetInelasticIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
std::ostringstream G4ExceptionDescription
G4int GetVerboseLevel() const
virtual G4double GetElasticIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
virtual void Description() const
virtual G4double GetInelasticElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
G4GLOB_DLL std::ostream G4cout
virtual void ScaleVector(G4double factorE, G4double factorV)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4double GetTotalIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
virtual ~G4ComponentSAIDTotalXS()
virtual G4double GetElasticElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
G4double GetChargeExchangeCrossSection(const G4ParticleDefinition *prim, const G4ParticleDefinition *sec, G4double kinEnergy, G4int, G4int)