56{
57 frac = frac/100.;
58
59
60
61 theZ = Z;
62 theA = A;
66 G4String base = getenv(
"G4NEUTRONHPDATA");
67 G4String base1 = base +
"/Inelastic/";
68 G4bool hasInelasticData =
false;
69 dataUsed = theNames.
GetName(A, Z, base1, rest, hasInelasticData);
74 if(hasInelasticData)
75 {
76 std::ifstream aDataSet(aName, std::ios::in);
77 aDataSet >> dummy >> dummy >> total;
78 inelasticData.
Init(aDataSet, total, eV);
79 }
80 base1 = base + "/Capture/";
81 G4bool hasCaptureData =
false;
82 dataUsed = theNames.
GetName(A, Z, base1, rest, hasCaptureData);
85 if(hasCaptureData)
86 {
87 std::ifstream aDataSet(aName, std::ios::in);
88 aDataSet >> dummy >> dummy >> total;
89 captureData.
Init(aDataSet, total, eV);
90 }
91 base1 = base + "/Elastic/";
92 G4bool hasElasticData =
false;
93 dataUsed = theNames.
GetName(A, Z, base1, rest, hasElasticData);
96 if(hasElasticData)
97 {
98 std::ifstream aDataSet(aName, std::ios::in);
99 aDataSet >> dummy >> dummy >> total;
100 elasticData.
Init(aDataSet, total, eV);
101 }
102 base1 = base + "/Fission/";
103 G4bool hasFissionData =
false;
104 if(Z>=91)
105 {
106 dataUsed = theNames.
GetName(A, Z, base1, rest, hasFissionData);
108 }
110 if(hasFissionData)
111 {
112 std::ifstream aDataSet(aName, std::ios::in);
113 aDataSet >> dummy >> dummy >> total;
114 fissionData.
Init(aDataSet, total, eV);
115 }
116 hasData = hasFissionData||hasInelasticData||hasElasticData||hasCaptureData;
118 if(hasData)
119 {
120 if(hasFissionData&&hasInelasticData)
121 {
122 merged = fissionData + inelasticData;
123 }
124 else if(hasFissionData)
125 {
126 merged = fissionData;
127 }
128 else if(hasInelasticData)
129 {
130 merged = inelasticData;
131 }
132
133 if(hasElasticData&&hasCaptureData)
134 {
135 merged1=elasticData + captureData;
136 }
137 else if(hasCaptureData)
138 {
139 merged1 = captureData;
140 }
141 else if(hasElasticData)
142 {
143 merged1 = elasticData;
144 }
145
146 if((hasElasticData||hasCaptureData)&&(hasFissionData||hasInelasticData))
147 {
148 theCrossSection = merged + merged1;
149 }
150 else if(hasElasticData||hasCaptureData)
151 {
152 theCrossSection = merged1;
153 }
154 else if(hasFissionData||hasInelasticData)
155 {
156 theCrossSection = merged;
157 }
158 theCrossSection.
Times(frac);
159 }
160
161
163 rest = "/CrossSection/";
164 base1 = base + "/IsotopeProduction/";
165 G4bool hasIsotopeProductionData;
166 dataUsed = theNames.
GetName(A, Z, base1, rest, hasIsotopeProductionData);
168 if(hasIsotopeProductionData)
169 {
170 std::ifstream aDataSet(aName, std::ios::in);
171 aDataSet>>theNumberOfProducts;
173 for(
G4int i=0; i<theNumberOfProducts; i++)
174 {
176 aDataSet >> dName;
177 aDataSet >> dummy >> dummy;
179 theProductionData[i]->
Init(aDataSet);
180 }
181 }
182 else
183 {
184 hasData = false;
185 }
191 while(lastEnergy+increment<101*MeV)
192 {
193 G4double currentEnergy = lastEnergy+increment;
197 increment+=1*MeV;
198 }
199}
void Init(std::ifstream &aDataSet)
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
void SetMaxOffSet(G4int anOffset)
void Init(std::ifstream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4int GetVectorLength() const
G4double GetX(G4int i) const
void SetData(G4int i, G4double x, G4double y)
void Times(G4double factor)
G4double GetCrossSection(G4double kineticEnergy, G4int Z, G4int A)