33: theCrossSection(), theNames()
35 theProductionData = NULL;
37 theNumberOfProducts = 0;
40 G4cout <<
"WARNING: G4NeutronIsoIsoCrossSections is deprecated and will be removed with Geant4 version 10"
47 for(
G4int i=0; i<theNumberOfProducts; i++)
49 delete theProductionData[i];
51 delete [] theProductionData;
66 G4String base = getenv(
"G4NEUTRONHPDATA");
67 G4String base1 = base +
"/Inelastic/";
68 G4bool hasInelasticData =
false;
69 dataUsed = theNames.
GetName(A, Z, base1, rest, hasInelasticData);
76 std::ifstream aDataSet(aName, std::ios::in);
77 aDataSet >> dummy >> dummy >> total;
78 inelasticData.
Init(aDataSet, total, eV);
80 base1 = base +
"/Capture/";
81 G4bool hasCaptureData =
false;
82 dataUsed = theNames.
GetName(A, Z, base1, rest, hasCaptureData);
87 std::ifstream aDataSet(aName, std::ios::in);
88 aDataSet >> dummy >> dummy >> total;
89 captureData.
Init(aDataSet, total, eV);
91 base1 = base +
"/Elastic/";
92 G4bool hasElasticData =
false;
93 dataUsed = theNames.
GetName(A, Z, base1, rest, hasElasticData);
98 std::ifstream aDataSet(aName, std::ios::in);
99 aDataSet >> dummy >> dummy >> total;
100 elasticData.
Init(aDataSet, total, eV);
102 base1 = base +
"/Fission/";
103 G4bool hasFissionData =
false;
106 dataUsed = theNames.
GetName(A, Z, base1, rest, hasFissionData);
112 std::ifstream aDataSet(aName, std::ios::in);
113 aDataSet >> dummy >> dummy >> total;
114 fissionData.
Init(aDataSet, total, eV);
116 hasData = hasFissionData||hasInelasticData||hasElasticData||hasCaptureData;
120 if(hasFissionData&&hasInelasticData)
122 merged = fissionData + inelasticData;
124 else if(hasFissionData)
126 merged = fissionData;
128 else if(hasInelasticData)
130 merged = inelasticData;
133 if(hasElasticData&&hasCaptureData)
135 merged1=elasticData + captureData;
137 else if(hasCaptureData)
139 merged1 = captureData;
141 else if(hasElasticData)
143 merged1 = elasticData;
146 if((hasElasticData||hasCaptureData)&&(hasFissionData||hasInelasticData))
148 theCrossSection = merged + merged1;
150 else if(hasElasticData||hasCaptureData)
152 theCrossSection = merged1;
154 else if(hasFissionData||hasInelasticData)
156 theCrossSection = merged;
158 theCrossSection.
Times(frac);
163 rest =
"/CrossSection/";
164 base1 = base +
"/IsotopeProduction/";
165 G4bool hasIsotopeProductionData;
166 dataUsed = theNames.
GetName(A, Z, base1, rest, hasIsotopeProductionData);
168 if(hasIsotopeProductionData)
170 std::ifstream aDataSet(aName, std::ios::in);
171 aDataSet>>theNumberOfProducts;
173 for(
G4int i=0; i<theNumberOfProducts; i++)
177 aDataSet >> dummy >> dummy;
179 theProductionData[i]->
Init(aDataSet);
191 while(lastEnergy+increment<101*MeV)
193 G4double currentEnergy = lastEnergy+increment;
205 result = theCrossSection.
GetY(anEnergy);
215 if(totalXSec==0)
return result;
221 for(
G4int i=0; i<theNumberOfProducts; i++)
229 if(rand > isoChangeXsec/totalXSec)
238 for(
G4int i=0; i<theNumberOfProducts; i++)
242 if(random<=running/sum)
break;
G4DLLIMPORT std::ostream G4cout
void Init(std::ifstream &aDataSet)
G4String GetProductIsotope()
G4double GetProductionCrossSection(G4double anEnergy)
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
G4double GetY(G4double x)
void SetData(G4int i, G4double x, G4double y)
void Times(G4double factor)
G4double GetCrossSection(G4double kineticEnergy, G4int Z, G4int A)
~G4NeutronIsoIsoCrossSections()
void Init(G4int A, G4int Z, G4double frac)
G4double GetCrossSection(G4double anEnergy)
G4String GetProductIsotope(G4double anEnergy)
G4NeutronIsoIsoCrossSections()