Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
G4NeutronHPCapture::G4NeutronHPCapture()
|
||||
{
|
||||
// G4cout << "Capture : start of construction!!!!!!!!"<<endl;
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
dirName = getenv("NeutronHPCrossSections");
|
||||
G4String tString = "/Capture/";
|
||||
dirName = dirName + tString;
|
||||
@@ -38,7 +40,7 @@
|
||||
{
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
xSec = new G4double(n);
|
||||
xSec = new G4double[n];
|
||||
G4double sum=0;
|
||||
G4int i, index;
|
||||
for (i=0; i<n; i++)
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
G4NeutronHPElastic::G4NeutronHPElastic()
|
||||
{
|
||||
G4NeutronHPElasticFS * theFS = new G4NeutronHPElasticFS;
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
dirName = getenv("NeutronHPCrossSections");
|
||||
G4String tString = "/Elastic/";
|
||||
dirName = dirName + tString;
|
||||
@@ -32,7 +34,7 @@
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
G4int it = n-1;
|
||||
xSec = new G4double(n);
|
||||
xSec = new G4double[n];
|
||||
G4double sum=0;
|
||||
G4int i, index;
|
||||
for (i=0; i<n; i++)
|
||||
|
||||
@@ -122,19 +122,10 @@
|
||||
{
|
||||
if(active->GetEnergy(a) <= passive->GetEnergy(p))
|
||||
{
|
||||
// G4cout << "Harmoniseing 1: "<<a<<" "<<p<<" "<<active->GetEnergy(a)<<" "<<passive->GetEnergy(p)<<endl;
|
||||
theMerge->SetData(m, active->GetEnergy(a), active->GetXsec(a));
|
||||
// addiere passiv. interpoliert auf demn punkt theMerge.GetLowEdgeEnergy(m)
|
||||
// G4cout << "Harmoniseing 2: "<<a<<" "<<p<<" "<<active->GetEnergy(a)<<" "<<passive->GetEnergy(p)<<endl;
|
||||
G4double x = theMerge->GetEnergy(m);
|
||||
G4double x1 = passive->GetEnergy(p);
|
||||
G4double x2 = passive->GetEnergy(p+1);
|
||||
G4double y1 = passive->GetXsec(x1);
|
||||
G4double y2 = passive->GetXsec(x2);
|
||||
G4double y = passive->GetXsec(x);
|
||||
// G4cout << "Harmoniseing 3: "<<a<<" "<<p<<" "<<active->GetEnergy(a)<<" "<<passive->GetEnergy(p)<<endl;
|
||||
theMerge->SetData(m, x, theMerge->GetXsec(m)+y);
|
||||
// G4cout << "Harmoniseing 4: "<<a<<" "<<p<<" "<<active->GetEnergy(a)<<" "<<passive->GetEnergy(p)<<endl;
|
||||
m++;
|
||||
a++;
|
||||
} else {
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
{
|
||||
SetMinEnergy( 0.0 );
|
||||
SetMaxEnergy( 20.*MeV );
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
dirName = getenv("NeutronHPCrossSections");
|
||||
G4String tString = "/Fission/";
|
||||
dirName = dirName + tString;
|
||||
@@ -33,7 +35,7 @@
|
||||
{
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
xSec = new G4double(n);
|
||||
xSec = new G4double[n];
|
||||
G4double sum=0;
|
||||
G4int i, it, index;
|
||||
for (i=0; i<n; i++)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NeutronHPInelastic.cc,v 2.9 1998/12/01 17:43:57 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4NeutronHPInelastic.cc,v 1.3 1999/07/02 12:27:15 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
#include "G4NeutronHPInelastic.hh"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
SetMaxEnergy( 20.*MeV );
|
||||
system("echo $NeutronHPCrossSections");
|
||||
// G4cout << " entering G4NeutronHPInelastic constructor"<<endl;
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
dirName = getenv("NeutronHPCrossSections");
|
||||
G4String tString = "/Inelastic/";
|
||||
dirName = dirName + tString;
|
||||
|
||||
@@ -31,6 +31,8 @@ void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
|
||||
void G4NeutronHPInelasticBaseFS::Init (G4double A, G4double Z, G4String & dirName, G4String & bit)
|
||||
{
|
||||
gammaPath = "/Inelastic/Gammas/";
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
G4String tBase = getenv("NeutronHPCrossSections");
|
||||
gammaPath = tBase+gammaPath;
|
||||
G4String tString = dirName;
|
||||
|
||||
@@ -27,6 +27,8 @@ void G4NeutronHPInelasticCompFS::InitGammas(G4double AR, G4double ZR)
|
||||
void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
{
|
||||
gammaPath = "/Inelastic/Gammas/";
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
G4String tBase = getenv("NeutronHPCrossSections");
|
||||
gammaPath = tBase+gammaPath;
|
||||
G4String tString = dirName;
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
void G4NeutronHPIsoData::Init(G4int A, G4int Z, G4double abun) //fill PhysicsVector for this Isotope
|
||||
{
|
||||
G4String dirName;
|
||||
if(!getenv("NeutronHPCrossSections"))
|
||||
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
|
||||
G4String baseName = getenv("NeutronHPCrossSections");
|
||||
dirName = baseName+"/Fission";
|
||||
if(Z>89)
|
||||
@@ -48,15 +50,19 @@
|
||||
theChannelData = new G4NeutronHPVector;
|
||||
}
|
||||
theFissionData = theChannelData;
|
||||
theChannelData = NULL; // fast fix for double delete; revisit later. @@@@@@@
|
||||
dirName = baseName+"/Capture";
|
||||
Init(A, Z, abun, dirName, "/CrossSection/");
|
||||
theCaptureData = theChannelData;
|
||||
theChannelData = NULL;
|
||||
dirName = baseName+"/Elastic";
|
||||
Init(A, Z, abun, dirName, "/CrossSection/");
|
||||
theElasticData = theChannelData;
|
||||
theChannelData = NULL;
|
||||
dirName = baseName+"/Inelastic";
|
||||
Init(A, Z, abun, dirName, "/CrossSection/");
|
||||
theInelasticData = theChannelData;
|
||||
theChannelData = NULL;
|
||||
|
||||
// if(theInelasticData!=NULL) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<endl;
|
||||
// if(theElasticData!=NULL) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<endl;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "G4NeutronHPInterpolator.hh"
|
||||
#include "G4NeutronHPFastLegendre.hh"
|
||||
#include "Randomize.hh"
|
||||
#include <iostream.h>
|
||||
|
||||
G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
{
|
||||
G4double result;
|
||||
@@ -58,11 +60,13 @@ G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
result = 2.*G4UniformRand()-1.;
|
||||
for(l=0; l<theCoeff[low].GetNumberOfPoly() ; l++)
|
||||
{
|
||||
v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(l)*theLeg.Evaluate(l, result);
|
||||
G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
|
||||
v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(l)*legend;
|
||||
}
|
||||
for(l=0; l<theCoeff[high].GetNumberOfPoly() ; l++)
|
||||
{
|
||||
v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(l)*theLeg.Evaluate(l, result);
|
||||
G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
|
||||
v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(l)*legend;
|
||||
}
|
||||
value = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, v1, v2);
|
||||
random = G4UniformRand();
|
||||
@@ -119,11 +123,13 @@ G4double G4NeutronHPLegendreStore::SampleElastic (G4double anEnergy)
|
||||
result = 2.*G4UniformRand()-1.;
|
||||
for(l=0; l<theCoeff[low].GetNumberOfPoly() ; l++)
|
||||
{
|
||||
v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(l)*theLeg.Evaluate(l, result);
|
||||
G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
|
||||
v1 += (2.*l+1)/2.*theCoeff[low].GetCoeff(l)*legend;
|
||||
}
|
||||
for(l=0; l<theCoeff[high].GetNumberOfPoly() ; l++)
|
||||
{
|
||||
v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(l)*theLeg.Evaluate(l, result);
|
||||
G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
|
||||
v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(l)*legend;
|
||||
}
|
||||
value = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, v1, v2);
|
||||
random = G4UniformRand();
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
{
|
||||
if(i<0)
|
||||
{
|
||||
G4int dummy; cin >> dummy;
|
||||
G4int dummy;
|
||||
G4Exception("G4NeutronHPList::Check(G4int) called with negative index");
|
||||
}
|
||||
if(i>nEntries) G4Exception("Skipped some index numbers in G4NeutronHPList");
|
||||
if(i==nPoints)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 2.2 1998/11/21 10:34:10 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.2 1999/07/02 10:01:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
#include "G4NeutronHPNBodyPhaseSpace.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
result.SetA(myA);
|
||||
result.SetZ(myZ);
|
||||
}
|
||||
if (abs(myZ-Z)>5||myZ==0||myA==0)
|
||||
if (abs(myZ-Z)>theMaxOffSet||myZ==0||myA==0)
|
||||
if(inc>0)
|
||||
{
|
||||
inc*= -1;
|
||||
@@ -116,7 +116,7 @@
|
||||
theFileName = "";
|
||||
return result;
|
||||
}
|
||||
if (abs(myA-A)>5)
|
||||
if (abs(myA-A)>theMaxOffSet)
|
||||
{
|
||||
first = true;
|
||||
myA = A;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
for (ii=0; ii<nEntries/10+1; ii++) // von null weg, weil sonst <10 im argen liegt.
|
||||
{
|
||||
i = ii;
|
||||
if(theData[10*i].GetX()+eps>e) break;
|
||||
if(10*i==nEntries || theData[10*i].GetX()+eps>e) break;
|
||||
}
|
||||
// if(Verbose==1) G4cout << low<<" "<<high<<" "<<i<<" "<<nEntries<<" ";
|
||||
if(i!=(nEntries/10))
|
||||
@@ -220,7 +220,7 @@
|
||||
current++ ;
|
||||
}
|
||||
aBuff[count] = theData[GetVectorLength()-1];
|
||||
delete theData;
|
||||
delete [] theData;
|
||||
theData = aBuff;
|
||||
nEntries = count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user