43const G4String G4ComponentSAIDTotalXS::fnames[13] = {
44 "",
"pp",
"np",
"pip",
"pim",
46 "gp_pi0p",
"gp_pi+n",
"gn_pi-p",
"gn_pi0n",
"gp_etap",
"gp_etapp"
57 elastdata[i] =
nullptr;
58 inelastdata[i] =
nullptr;
67 elastdata[i] =
nullptr;
70 delete inelastdata[i];
71 inelastdata[i] =
nullptr;
81 PrintWarning(part,0,Z,
G4lrint(N),
82 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
83 "Method is not implemented");
101 PrintWarning(part,0,Z,
G4lrint(N),
102 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
103 "Method is not implemented");
116 if(!inelastdata[idx]) { Initialise(tp); }
117 if(inelastdata[idx]) {
118 cross = (inelastdata[idx])->Value(kinEnergy);
129 PrintWarning(part,0,Z,
G4lrint(N),
130 "G4ComponentSAIDTotalXS::GetTotalElementCrossSection",
131 "Method is not implemented");
144 if(!elastdata[idx]) { Initialise(tp); }
146 cross = (elastdata[idx])->Value(kinEnergy);
162 if(!inelastdata[idx]) { Initialise(tp); }
163 if(inelastdata[idx]) {
164 cross = (inelastdata[idx])->Value(kinEnergy);
184 if(0 == Z && sec && 22 ==
code) {
197 }
else if(22 ==
code) {
218#ifdef G4MULTITHREADED
220 if(!inelastdata[idx]) {
224 char* path = std::getenv(
"G4SAIDXSDATA");
226 G4Exception(
"G4ComponentSAIDTotalXS::Initialise(..)",
"had013",
228 "Environment variable G4SAIDXSDATA is not defined");
234 ReadData(idx,elastdata[idx],path,
"_el.dat");
235 ReadData(idx,inelastdata[idx],path,
"_in.dat");
238 ReadData(idx,inelastdata[idx],path,
".dat");
240#ifdef G4MULTITHREADED
246void G4ComponentSAIDTotalXS::ReadData(
G4int index,
251 std::ostringstream ost;
252 ost << ss1 <<
"/" << fnames[index] << ss2;
253 std::ifstream filein(ost.str().c_str());
256 ed <<
"Data file <" << ost.str().c_str()
257 <<
"> is not opened!";
258 G4Exception(
"G4ComponentSAIDTotalXS::ReadData(..)",
"had014",
262 G4cout <<
"File " << ost.str()
263 <<
" is opened by G4ComponentSAIDTotalXS" <<
G4endl;
280 G4cout <<
"For Z= " << Z <<
" N= " << N <<
" of ";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
virtual G4double GetInelasticElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
G4double GetChargeExchangeCrossSection(const G4ParticleDefinition *prim, const G4ParticleDefinition *sec, G4double kinEnergy, G4int, G4int)
virtual G4double GetInelasticIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
virtual G4double GetElasticElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
virtual G4double GetTotalElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4double)
virtual void Description(std::ostream &) const final
virtual G4double GetTotalIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
virtual G4double GetElasticIsotopeCrossSection(const G4ParticleDefinition *, G4double kinEnergy, G4int, G4int)
virtual ~G4ComponentSAIDTotalXS()
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
virtual void ScaleVector(G4double factorE, G4double factorV)
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4int GetVerboseLevel() const