#include <G4PiData.hh>
Definition at line 35 of file G4PiData.hh.
◆ G4PiData()
Definition at line 35 of file G4PiData.cc.
37{
39
40 for( i = 0; i < nP; i++ )
41 {
42 std::pair<G4double, G4double> x;
43 x.first=aT[i]*millibarn;
44 x.second=aIn[i]*millibarn;
45 std::pair<G4double, std::pair<G4double, G4double > > aP;
46 aP.first=anE[i]*GeV;
47 aP.second=x;
48 push_back(aP);
49 }
50}
◆ ~G4PiData()
◆ AppliesTo()
Definition at line 54 of file G4PiData.cc.
55{
56 return (kineticEnergy<=back().first);
57}
◆ ElasticXSection()
Definition at line 85 of file G4PiData.cc.
86{
88 G4PiData::iterator it=begin();
89 while(it!=end()&&kineticEnergy>(*it).first) {it++;}
90 if(it==end())
91 {
93 ed << "This cross section is applied for E(MeV)= " << kineticEnergy
94 <<
" outside allowed energy interval" <<
G4endl;
96 }
97 if(it==begin()) it++;
99 e1=(*(it-1)).first;
100 x1=(*(it-1)).second.first - (*(it-1)).second.second;
101 e2=(*(it)).first;
102 x2=(*(it)).second.first - (*(it)).second.second;
103 result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
104 return result;
105}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
◆ ReactionXSection()
Definition at line 61 of file G4PiData.cc.
62{
64 G4PiData::iterator it=begin();
65 while(it!=end()&&kineticEnergy>(*it).first) {it++;}
66 if(it==end())
67 {
69 ed << "This cross section is applied for E(MeV)= " << kineticEnergy
70 <<
" outside allowed energy interval" <<
G4endl;
72 }
73 if(it==begin()) it++;
75 e1=(*(it-1)).first;
76 x1=(*(it-1)).second.second;
77 e2=(*(it)).first;
78 x2=(*(it)).second.second;
79 result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
80 return result;
81}
◆ TotalXSection()
Definition at line 109 of file G4PiData.cc.
110{
112 G4PiData::iterator it=begin();
113 while(it!=end()&&kineticEnergy>(*it).first) {it++;}
114 if(it==end())
115 {
117 ed << "This cross section is applied for E(MeV)= " << kineticEnergy
118 <<
" outside allowed energy interval" <<
G4endl;
120 }
121 if(it==begin()) it++;
123 e1=(*(it-1)).first;
124 x1=(*(it-1)).second.first;
125 e2=(*(it)).first;
126 x2=(*(it)).second.first;
127 result = std::max(0., x1 + (kineticEnergy-e1)*(x2-x1)/(e2-e1));
128 return result;
129}
The documentation for this class was generated from the following files: