45G4String 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");
233void 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 ";
G4DLLIMPORT 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() const
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