Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPAngular.hh"
|
||||
|
||||
void G4NeutronHPAngular::Init(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPAngular::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
// G4cout << "here we are entering the Angular Init"<<G4endl;
|
||||
aDataFile >> theAngularDistributionType >> targetMass;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
|
||||
#include "G4NeutronHPThermalBoost.hh"
|
||||
G4VParticleChange * G4NeutronHPCapture::ApplyYourself(const G4Track& aTrack, G4Nucleus& aTargetNucleus)
|
||||
G4VParticleChange * G4NeutronHPCapture::ApplyYourself(const G4Track& aTrack, G4Nucleus& )
|
||||
{
|
||||
if(getenv("NeutronHPCapture")) G4cout <<" ####### G4NeutronHPCapture called"<<G4endl;
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
@@ -96,7 +96,7 @@
|
||||
index = theMaterial->GetElement(i)->GetIndex();
|
||||
if(random<=running/sum) break;
|
||||
}
|
||||
if(i==n) i=G4std::max(0, n-1);
|
||||
if(i==n) i=std::max(0, n-1);
|
||||
delete [] xSec;
|
||||
}
|
||||
return theCapture[index].ApplyYourself(aTrack);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4NeutronHPData.hh"
|
||||
|
||||
G4bool G4NeutronHPCaptureData::IsApplicable(const G4DynamicParticle*aP, const G4Element*anE)
|
||||
G4bool G4NeutronHPCaptureData::IsApplicable(const G4DynamicParticle*aP, const G4Element*)
|
||||
{
|
||||
G4bool result = true;
|
||||
G4double eKin = aP->GetKineticEnergy();
|
||||
@@ -109,7 +109,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
// MC integration loop
|
||||
G4int counter = 0;
|
||||
G4double buffer = 0;
|
||||
G4int size = G4int(G4std::max(10., aT/60*kelvin));
|
||||
G4int size = G4int(std::max(10., aT/60*kelvin));
|
||||
G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
|
||||
G4double neutronVMag = neutronVelocity.mag();
|
||||
while(counter == 0 || abs(buffer-result/counter) > 0.03*buffer)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
void G4NeutronHPCaptureFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPCaptureFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
@@ -162,7 +162,7 @@
|
||||
hasXsec = false;
|
||||
return;
|
||||
}
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
|
||||
hasFSData = theFinalStatePhotons.InitMean(theData);
|
||||
if(hasFSData)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
G4double G4NeutronHPChannel::GetXsec(G4double energy)
|
||||
{
|
||||
return G4std::max(0., theChannelData->GetXsec(energy));
|
||||
return std::max(0., theChannelData->GetXsec(energy));
|
||||
}
|
||||
|
||||
G4double G4NeutronHPChannel::GetWeightedXsec(G4double energy, G4int isoNumber)
|
||||
@@ -145,7 +145,7 @@
|
||||
if(anActive->GetEnergy(a) <= aPassive->GetEnergy(p))
|
||||
{
|
||||
G4double xa = anActive->GetEnergy(a);
|
||||
theMerge->SetData(m, xa, anActive->GetXsec(a)+G4std::max(0., aPassive->GetXsec(xa)) );
|
||||
theMerge->SetData(m, xa, anActive->GetXsec(a)+std::max(0., aPassive->GetXsec(xa)) );
|
||||
m++;
|
||||
a++;
|
||||
G4double xp = aPassive->GetEnergy(p);
|
||||
@@ -166,7 +166,7 @@
|
||||
}
|
||||
while (p!=aPassive->GetVectorLength())
|
||||
{
|
||||
if(abs(theMerge->GetEnergy(G4std::max(0,m-1))-aPassive->GetEnergy(p))/aPassive->GetEnergy(p)>0.001)
|
||||
if(abs(theMerge->GetEnergy(std::max(0,m-1))-aPassive->GetEnergy(p))/aPassive->GetEnergy(p)>0.001)
|
||||
theMerge->SetData(m++, aPassive->GetEnergy(p), aPassive->GetXsec(p));
|
||||
p++;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
|
||||
#include "G4NeutronHPThermalBoost.hh"
|
||||
G4ParticleChange * G4NeutronHPChannelList::ApplyYourself(const G4Element * anElement, const G4Track & aTrack)
|
||||
G4ParticleChange * G4NeutronHPChannelList::ApplyYourself(const G4Element * , const G4Track & aTrack)
|
||||
{
|
||||
G4NeutronHPThermalBoost aThermalE;
|
||||
G4int i, ii;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "G4NeutronHPKallbachMannSyst.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
void G4NeutronHPContAngularPar::Init(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPContAngularPar::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
aDataFile >> theEnergy >> nEnergies >> nDiscreteEnergies >> nAngularParameters;
|
||||
theEnergy *= eV;
|
||||
@@ -56,8 +56,8 @@
|
||||
}
|
||||
|
||||
G4ReactionProduct *
|
||||
G4NeutronHPContAngularPar::Sample(G4double anEnergy, G4double massCode, G4double targetMass,
|
||||
G4int angularRep, G4int interpolE)
|
||||
G4NeutronHPContAngularPar::Sample(G4double anEnergy, G4double massCode, G4double /*targetMass*/,
|
||||
G4int angularRep, G4int /*interpolE*/)
|
||||
{
|
||||
G4ReactionProduct * result = new G4ReactionProduct;
|
||||
G4int Z = static_cast<G4int>(massCode/1000);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPContEnergyAngular.hh"
|
||||
|
||||
G4ReactionProduct * G4NeutronHPContEnergyAngular::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
G4ReactionProduct * G4NeutronHPContEnergyAngular::Sample(G4double anEnergy, G4double massCode, G4double /*mass*/)
|
||||
{
|
||||
G4ReactionProduct * result;
|
||||
G4int i(0);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPDeExGammas.hh"
|
||||
|
||||
void G4NeutronHPDeExGammas::Init(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPDeExGammas::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
G4NeutronHPGamma ** theGammas = new G4NeutronHPGamma * [50];
|
||||
G4int nGammas = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "G4NeutronHPVector.hh"
|
||||
#include "G4NeutronHPLegendreStore.hh"
|
||||
|
||||
G4ReactionProduct * G4NeutronHPDiscreteTwoBody::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
G4ReactionProduct * G4NeutronHPDiscreteTwoBody::Sample(G4double anEnergy, G4double massCode, G4double )
|
||||
{ // Interpolation still only for the most used parts; rest to be Done @@@@@
|
||||
G4ReactionProduct * result = new G4ReactionProduct;
|
||||
G4int Z = static_cast<G4int>(massCode/1000);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include "G4NeutronHPThermalBoost.hh"
|
||||
|
||||
G4VParticleChange * G4NeutronHPElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& aTargetNucleus)
|
||||
G4VParticleChange * G4NeutronHPElastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& )
|
||||
{
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4NeutronHPData.hh"
|
||||
|
||||
G4bool G4NeutronHPElasticData::IsApplicable(const G4DynamicParticle*aP, const G4Element*anE)
|
||||
G4bool G4NeutronHPElasticData::IsApplicable(const G4DynamicParticle*aP, const G4Element*)
|
||||
{
|
||||
G4bool result = true;
|
||||
G4double eKin = aP->GetKineticEnergy();
|
||||
@@ -106,7 +106,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
// MC integration loop
|
||||
G4int counter = 0;
|
||||
G4double buffer = 0;
|
||||
G4int size = G4int(G4std::max(10., aT/60*kelvin));
|
||||
G4int size = G4int(std::max(10., aT/60*kelvin));
|
||||
G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
|
||||
G4double neutronVMag = neutronVelocity.mag();
|
||||
while(counter == 0 || abs(buffer-result/counter) > 0.03*buffer)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4NeutronHPDataUsed.hh"
|
||||
|
||||
void G4NeutronHPElasticFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPElasticFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
@@ -51,7 +51,7 @@
|
||||
hasXsec = false;
|
||||
return;
|
||||
}
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
theData >> repFlag >> targetMass >> frameFlag;
|
||||
if(repFlag==1)
|
||||
{
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
{
|
||||
theMerge->SetData(m, active->GetEnergy(a), active->GetXsec(a));
|
||||
G4double x = theMerge->GetEnergy(m);
|
||||
G4double y = G4std::max(0., passive->GetXsec(x));
|
||||
G4double y = std::max(0., passive->GetXsec(x));
|
||||
theMerge->SetData(m, x, theMerge->GetXsec(m)+y);
|
||||
m++;
|
||||
a++;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPFCFissionFS.hh"
|
||||
|
||||
void G4NeutronHPFCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPFCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String aString = "/FC/";
|
||||
G4NeutronHPFissionBaseFS::Init(A, Z, dirName, aString);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4LorentzVector.hh"
|
||||
#include "G4NeutronHPDataUsed.hh"
|
||||
|
||||
void G4NeutronHPFSFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPFSFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
@@ -49,11 +49,8 @@
|
||||
hasXsec = false;
|
||||
return;
|
||||
}
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
#else
|
||||
ifstream theData(filename, ios::in|ios::nocreate);
|
||||
#endif
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
|
||||
// here it comes
|
||||
G4int infoType, dataType;
|
||||
hasFSData = false;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include "G4NeutronHPThermalBoost.hh"
|
||||
|
||||
G4VParticleChange * G4NeutronHPFission::ApplyYourself(const G4Track& aTrack, G4Nucleus& aTargetNucleus)
|
||||
G4VParticleChange * G4NeutronHPFission::ApplyYourself(const G4Track& aTrack, G4Nucleus& )
|
||||
{
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
|
||||
@@ -50,11 +50,7 @@
|
||||
hasXsec = false;
|
||||
return; // no data for exactly this isotope.
|
||||
}
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
#else
|
||||
ifstream theData(filename, ios::in|ios::nocreate);
|
||||
#endif
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
G4int dummy;
|
||||
if(!(theData))
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4NeutronHPData.hh"
|
||||
|
||||
G4bool G4NeutronHPFissionData::IsApplicable(const G4DynamicParticle*aP, const G4Element*anE)
|
||||
G4bool G4NeutronHPFissionData::IsApplicable(const G4DynamicParticle*aP, const G4Element*)
|
||||
{
|
||||
G4bool result = true;
|
||||
G4double eKin = aP->GetKineticEnergy();
|
||||
@@ -105,7 +105,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
// MC integration loop
|
||||
G4int counter = 0;
|
||||
G4double buffer = 0;
|
||||
G4int size = G4int(G4std::max(10., aT/60*kelvin));
|
||||
G4int size = G4int(std::max(10., aT/60*kelvin));
|
||||
G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
|
||||
G4double neutronVMag = neutronVelocity.mag();
|
||||
while(counter == 0 || abs(buffer-result/counter) > 0.01*buffer)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPGamma.hh"
|
||||
int G4NeutronHPGamma::instancecount = 0;
|
||||
G4bool G4NeutronHPGamma::Init(G4std::ifstream & aDataFile)
|
||||
G4bool G4NeutronHPGamma::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
G4bool theResult = true;
|
||||
if(aDataFile >> levelEnergy)
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NeutronHPInelastic.cc,v 1.13 2002/12/12 19:18:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4NeutronHPInelastic.cc,v 1.14 2003/05/30 11:32:34 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#include "G4NeutronHPInelastic.hh"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
#include "G4NeutronHPThermalBoost.hh"
|
||||
|
||||
G4VParticleChange * G4NeutronHPInelastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& aTargetNucleus)
|
||||
G4VParticleChange * G4NeutronHPInelastic::ApplyYourself(const G4Track& aTrack, G4Nucleus& )
|
||||
{
|
||||
G4Material * theMaterial = aTrack.GetMaterial();
|
||||
G4int n = theMaterial->GetNumberOfElements();
|
||||
|
||||
@@ -35,16 +35,12 @@
|
||||
void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
|
||||
{
|
||||
char the[100] = {""};
|
||||
G4std::ostrstream ost(the, 100, G4std::ios::out);
|
||||
std::ostrstream ost(the, 100, std::ios::out);
|
||||
ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
|
||||
G4String * aName = new G4String(the);
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream from(*aName, G4std::ios::in);
|
||||
#else
|
||||
ifstream from(*aName, ios::in|ios::nocreate);
|
||||
#endif
|
||||
std::ifstream from(*aName, std::ios::in);
|
||||
if(!from) return; // no data found for this isotope
|
||||
G4std::ifstream theGammaData(*aName, G4std::ios::in);
|
||||
std::ifstream theGammaData(*aName, std::ios::in);
|
||||
|
||||
G4double eps = 0.001;
|
||||
theNuclearMassDifference =
|
||||
@@ -75,13 +71,9 @@ void G4NeutronHPInelasticBaseFS::Init (G4double A, G4double Z, G4String & dirNam
|
||||
hasXsec = false;
|
||||
return;
|
||||
}
|
||||
theBaseA = A;
|
||||
theBaseZ = G4int(Z+.5);
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
#else
|
||||
G4std::ifstream theData(filename, G4std::ios::in|G4std::ios::nocreate);
|
||||
#endif
|
||||
theBaseA = A;
|
||||
theBaseZ = G4int(Z+.5);
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
if(!(theData))
|
||||
{
|
||||
hasAnyData = false;
|
||||
|
||||
@@ -36,16 +36,12 @@
|
||||
void G4NeutronHPInelasticCompFS::InitGammas(G4double AR, G4double ZR)
|
||||
{
|
||||
char the[100] = {""};
|
||||
G4std::ostrstream ost(the, 100, G4std::ios::out);
|
||||
std::ostrstream ost(the, 100, std::ios::out);
|
||||
ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
|
||||
G4String * aName = new G4String(the);
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream from(*aName, G4std::ios::in);
|
||||
#else
|
||||
ifstream from(*aName, ios::in|ios::nocreate);
|
||||
#endif
|
||||
std::ifstream from(*aName, std::ios::in);
|
||||
if(!from) return; // no data found for this isotope
|
||||
G4std::ifstream theGammaData(*aName, G4std::ios::in);
|
||||
std::ifstream theGammaData(*aName, std::ios::in);
|
||||
|
||||
theGammas.Init(theGammaData);
|
||||
delete aName;
|
||||
@@ -72,13 +68,9 @@ void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirNam
|
||||
hasXsec = false;
|
||||
return;
|
||||
}
|
||||
theBaseA = A;
|
||||
theBaseZ = G4int(Z+.5);
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream theData(filename, G4std::ios::in);
|
||||
#else
|
||||
ifstream theData(filename, ios::in|ios::nocreate);
|
||||
#endif
|
||||
theBaseA = A;
|
||||
theBaseZ = G4int(Z+.5);
|
||||
std::ifstream theData(filename, std::ios::in);
|
||||
if(!theData)
|
||||
{
|
||||
hasAnyData = false;
|
||||
@@ -157,7 +149,7 @@ G4int G4NeutronHPInelasticCompFS::SelectExitChannel(G4double eKinetic)
|
||||
if(i!=0) running[i]=running[i-1];
|
||||
if(theXsection[i] != NULL)
|
||||
{
|
||||
running[i] += G4std::max(0., theXsection[i]->GetXsec(eKinetic));
|
||||
running[i] += std::max(0., theXsection[i]->GetXsec(eKinetic));
|
||||
}
|
||||
}
|
||||
G4double random = G4UniformRand();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4NeutronHPData.hh"
|
||||
|
||||
G4bool G4NeutronHPInelasticData::IsApplicable(const G4DynamicParticle*aP, const G4Element*anE)
|
||||
G4bool G4NeutronHPInelasticData::IsApplicable(const G4DynamicParticle*aP, const G4Element*)
|
||||
{
|
||||
G4bool result = true;
|
||||
G4double eKin = aP->GetKineticEnergy();
|
||||
@@ -104,7 +104,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
G4int counter = 0;
|
||||
G4int failCount = 0;
|
||||
G4double buffer = 0;
|
||||
G4int size = G4int(G4std::max(10., aT/60*kelvin));
|
||||
G4int size = G4int(std::max(10., aT/60*kelvin));
|
||||
G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
|
||||
G4double neutronVMag = neutronVelocity.mag();
|
||||
while(counter == 0 || abs(buffer-result/counter) > 0.01*buffer)
|
||||
|
||||
@@ -36,11 +36,7 @@
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, aFSType, result);
|
||||
filename = aFile.GetName();
|
||||
// if(filename=="") return false;
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
G4std::ifstream theChannel(filename);
|
||||
#else
|
||||
ifstream theChannel(filename,ios::in|ios::nocreate);
|
||||
#endif
|
||||
std::ifstream theChannel(filename);
|
||||
|
||||
if(Z==1 && (aFile.GetZ()!=Z || abs(aFile.GetA()-A)>0.0001) )
|
||||
{
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
#include "G4He3.hh"
|
||||
#include "G4Alpha.hh"
|
||||
|
||||
void G4NeutronHPIsotropic::Init(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPIsotropic::Init(std::ifstream & )
|
||||
{
|
||||
}
|
||||
|
||||
G4ReactionProduct * G4NeutronHPIsotropic::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
G4ReactionProduct * G4NeutronHPIsotropic::Sample(G4double anEnergy, G4double massCode, G4double )
|
||||
{
|
||||
G4ReactionProduct * result = new G4ReactionProduct;
|
||||
G4int Z = static_cast<G4int>(massCode/1000);
|
||||
@@ -85,7 +85,7 @@ G4ReactionProduct * G4NeutronHPIsotropic::Sample(G4double anEnergy, G4double mas
|
||||
G4double sinth = sin(theta);
|
||||
|
||||
// we need the the Q value of the reaction
|
||||
result->SetKineticEnergy(G4std::max(0.001*MeV, anEnergy+GetQValue()));
|
||||
result->SetKineticEnergy(std::max(0.001*MeV, anEnergy+GetQValue()));
|
||||
G4double mtot = result->GetTotalMomentum();
|
||||
G4ThreeVector tempVector(mtot*sinth*cos(phi), mtot*sinth*sin(phi), mtot*cos(theta) );
|
||||
result->SetMomentum(tempVector);
|
||||
|
||||
@@ -82,7 +82,7 @@ G4double G4NeutronHPKallbachMannSyst::A(G4double anEnergy)
|
||||
G4int ZA = theTargetZ;
|
||||
G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
|
||||
G4double Et1 = 130*MeV;
|
||||
G4double R1 = G4std::min(ea, Et1);
|
||||
G4double R1 = std::min(ea, Et1);
|
||||
// theProductEnergy is still in CMS!!!
|
||||
G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
|
||||
G4int AB = theResidualA;
|
||||
@@ -90,7 +90,7 @@ G4double G4NeutronHPKallbachMannSyst::A(G4double anEnergy)
|
||||
G4double eb = epsb+SeparationEnergy(Ac, Nc, AB, ZB );
|
||||
G4double X1 = R1*eb/ea;
|
||||
G4double Et3 = 41*MeV;
|
||||
G4double R3 = G4std::min(ea, Et3);
|
||||
G4double R3 = std::min(ea, Et3);
|
||||
G4double X3 = R3*eb/ea;
|
||||
G4double Ma = 1;
|
||||
G4double mb(0);
|
||||
@@ -125,9 +125,9 @@ G4double G4NeutronHPKallbachMannSyst::SeparationEnergy(G4int Ac, G4int Nc, G4int
|
||||
G4int Zc = Ac-Nc;
|
||||
result = 15.68*(Ac-AA);
|
||||
result += -28.07*((Nc-Zc)*(Nc-Zc)/Ac - (NA-ZA)*(NA-ZA)/AA);
|
||||
result += -18.56*(pow(Ac, 2./3.) - pow(AA, 2./3.));
|
||||
result += 33.22*((Nc-Zc)*(Nc-Zc)/pow(Ac, 4./3.) - (NA-ZA)*(NA-ZA)/pow(AA, 4./3.));
|
||||
result += -0.717*(Zc*Zc/pow(Ac,1./3.)-ZA*ZA/pow(AA,1./3.));
|
||||
result += -18.56*(pow(G4double(Ac), 2./3.) - pow(G4double(AA), 2./3.));
|
||||
result += 33.22*((Nc-Zc)*(Nc-Zc)/pow(G4double(Ac), 4./3.) - (NA-ZA)*(NA-ZA)/pow(G4double(AA), 4./3.));
|
||||
result += -0.717*(Zc*Zc/pow(G4double(Ac),1./3.)-ZA*ZA/pow(G4double(AA),1./3.));
|
||||
result += 1.211*(Zc*Zc/Ac-ZA*ZA/AA);
|
||||
G4double totalBinding(0);
|
||||
G4int productA = theTargetA+1-theResidualA;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPLCFissionFS.hh"
|
||||
|
||||
void G4NeutronHPLCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPLCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String aString = "/LC/";
|
||||
G4NeutronHPFissionBaseFS::Init(A, Z, dirName, aString);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4Alpha.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
void G4NeutronHPLabAngularEnergy::Init(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPLabAngularEnergy::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
aDataFile >> nEnergies;
|
||||
theManager.Init(aDataFile);
|
||||
@@ -61,7 +61,7 @@ void G4NeutronHPLabAngularEnergy::Init(G4std::ifstream & aDataFile)
|
||||
}
|
||||
}
|
||||
|
||||
G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4double massCode, G4double )
|
||||
{
|
||||
G4ReactionProduct * result = new G4ReactionProduct;
|
||||
G4int Z = static_cast<G4int>(massCode/1000);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "G4NeutronHPInterpolator.hh"
|
||||
#include "G4NeutronHPFastLegendre.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "g4std/iostream"
|
||||
#include <iostream>
|
||||
|
||||
G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
high = i0;
|
||||
if(theCoeff[i0].GetEnergy()>anEnergy) break;
|
||||
}
|
||||
low = G4std::max(0, high-1);
|
||||
low = std::max(0, high-1);
|
||||
G4NeutronHPInterpolator theInt;
|
||||
G4double x, x1, x2;
|
||||
x = anEnergy;
|
||||
@@ -89,8 +89,8 @@ G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
G4double legend = theLeg.Evaluate(l, result); // @@@ done to avoid optimization error on SUN
|
||||
v2 += (2.*l+1)/2.*theCoeff[high].GetCoeff(l)*legend;
|
||||
}
|
||||
v1 = G4std::max(0.,v1); // Workaround in case one of the distributions is fully non-physical.
|
||||
v2 = G4std::max(0.,v2);
|
||||
v1 = std::max(0.,v1); // Workaround in case one of the distributions is fully non-physical.
|
||||
v2 = std::max(0.,v2);
|
||||
value = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, v1, v2);
|
||||
random = G4UniformRand();
|
||||
if(0>=theNorm) break; // Workaround for negative cross-section values. @@@@ 31 May 2000
|
||||
@@ -113,7 +113,7 @@ G4double G4NeutronHPLegendreStore::SampleElastic (G4double anEnergy)
|
||||
high = i0;
|
||||
if(theCoeff[i0].GetEnergy()>anEnergy) break;
|
||||
}
|
||||
low = G4std::max(0, high-1);
|
||||
low = std::max(0, high-1);
|
||||
G4NeutronHPInterpolator theInt;
|
||||
G4double x, x1, x2;
|
||||
x = anEnergy;
|
||||
@@ -135,7 +135,7 @@ G4double G4NeutronHPLegendreStore::SampleElastic (G4double anEnergy)
|
||||
}
|
||||
try1 = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, try01, try02);
|
||||
try2 = theInt.Interpolate(theManager.GetScheme(high), x, x1, x2, try11, try12);
|
||||
theNorm = G4std::max(try1, try2);
|
||||
theNorm = std::max(try1, try2);
|
||||
|
||||
G4double value, random;
|
||||
G4double v1, v2;
|
||||
@@ -173,7 +173,7 @@ G4double G4NeutronHPLegendreStore::Sample (G4double energy) // still in interpol
|
||||
high = i0;
|
||||
if(theCoeff[i0].GetEnergy()>energy) break;
|
||||
}
|
||||
low = G4std::max(0, high-1);
|
||||
low = std::max(0, high-1);
|
||||
// G4cout << "G4NeutronHPLegendreStore::Sample high, low: "<<high<<", "<<low<<G4endl;
|
||||
G4NeutronHPVector theBuffer;
|
||||
G4NeutronHPInterpolator theInt;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(i==nEntries) nEntries++;
|
||||
}
|
||||
|
||||
void G4NeutronHPList::Init(G4std::ifstream & aDataFile, G4int nPar, G4double unit)
|
||||
void G4NeutronHPList::Init(std::ifstream & aDataFile, G4int nPar, G4double unit)
|
||||
{
|
||||
G4int i;
|
||||
G4double y;
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
void G4NeutronHPList::Init(G4std::ifstream & aDataFile, G4double unit)
|
||||
void G4NeutronHPList::Init(std::ifstream & aDataFile, G4double unit)
|
||||
{
|
||||
G4int total, i;
|
||||
aDataFile >> total;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.8 2002/12/12 19:18:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.9 2003/05/30 11:32:34 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
//
|
||||
#include "G4NeutronHPNBodyPhaseSpace.hh"
|
||||
#include "G4Gamma.hh"
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "Randomize.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
G4ReactionProduct * G4NeutronHPNBodyPhaseSpace::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
G4ReactionProduct * G4NeutronHPNBodyPhaseSpace::Sample(G4double anEnergy, G4double massCode, G4double )
|
||||
{
|
||||
G4ReactionProduct * result = new G4ReactionProduct;
|
||||
G4int Z = static_cast<G4int>(massCode/1000);
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/fstream"
|
||||
#include "g4std/strstream"
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
|
||||
void G4NeutronHPNInelasticFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
#include "G4NeutronHPNames.hh"
|
||||
#include "G4SandiaTable.hh"
|
||||
#include "g4std/fstream"
|
||||
#include <fstream>
|
||||
|
||||
const G4String G4NeutronHPNames::theString[99] = {"Hydrogen", "Helium",
|
||||
"Lithium", "Berylium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine",
|
||||
@@ -63,7 +63,7 @@ if(getenv("NeutronHPNames")) G4cout << "Names::GetName entered"<<G4endl;
|
||||
G4String theFileName("");
|
||||
G4int inc = 1;
|
||||
|
||||
G4std::ifstream * check = new G4std::ifstream(".dummy");
|
||||
std::ifstream * check = new std::ifstream(".dummy");
|
||||
G4bool first = true;
|
||||
if(getenv("NeutronHPNames")) G4cout << "entered GetName!!!"<<G4endl;
|
||||
do
|
||||
@@ -78,11 +78,7 @@ if(getenv("NeutronHPNames")) G4cout << "entered GetName!!!"<<G4endl;
|
||||
result.SetA(myA);
|
||||
result.SetZ(myZ);
|
||||
if(getenv("NeutronHPNames")) G4cout <<"HPWD 1 "<<*theName<<G4endl;
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
check = new G4std::ifstream(*theName);
|
||||
#else
|
||||
check = new G4std::ifstream(*theName,G4std::ios::in|G4std::ios::nocreate);
|
||||
#endif
|
||||
check = new std::ifstream(*theName);
|
||||
if(!(*check))
|
||||
{
|
||||
check->close();
|
||||
@@ -102,11 +98,7 @@ if(getenv("NeutronHPNames")) G4cout <<"HPWD 2 "<<*theName<<G4endl;
|
||||
G4double natA = myZ/G4SandiaTable::GetZtoA(myZ);
|
||||
result.SetA(natA);
|
||||
result.SetZ(myZ);
|
||||
#ifdef G4USE_STD_NAMESPACE
|
||||
check = new G4std::ifstream(*theName);
|
||||
#else
|
||||
check = new G4std::ifstream(*theName,G4std::ios::in|G4std::ios::nocreate);
|
||||
#endif
|
||||
check = new std::ifstream(*theName);
|
||||
if (!(*check))
|
||||
{
|
||||
check->close();
|
||||
|
||||
@@ -53,7 +53,7 @@ G4NeutronHPVector * G4NeutronHPPartial::GetY(G4double e1)
|
||||
G4double E2 = X[i];
|
||||
for(G4int ii=0; ii<data[i].GetVectorLength(); ii++)
|
||||
{
|
||||
x1 = data[i-1].GetX(G4std::min(i1, data[i-1].GetVectorLength()-1));
|
||||
x1 = data[i-1].GetX(std::min(i1, data[i-1].GetVectorLength()-1));
|
||||
x2 = data[i].GetX(ii);
|
||||
if(x1<x2&&i1<data[i-1].GetVectorLength())
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Poisson.hh"
|
||||
|
||||
G4bool G4NeutronHPPhotonDist::InitMean(G4std::ifstream & aDataFile)
|
||||
G4bool G4NeutronHPPhotonDist::InitMean(std::ifstream & aDataFile)
|
||||
{
|
||||
G4bool result = true;
|
||||
if(aDataFile >> repFlag)
|
||||
@@ -95,7 +95,7 @@ G4bool G4NeutronHPPhotonDist::InitMean(G4std::ifstream & aDataFile)
|
||||
return result;
|
||||
}
|
||||
|
||||
void G4NeutronHPPhotonDist::InitAngular(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPPhotonDist::InitAngular(std::ifstream & aDataFile)
|
||||
{
|
||||
G4int i, ii;
|
||||
//angular distributions
|
||||
@@ -149,7 +149,7 @@ void G4NeutronHPPhotonDist::InitAngular(G4std::ifstream & aDataFile)
|
||||
}
|
||||
|
||||
|
||||
void G4NeutronHPPhotonDist::InitEnergies(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPPhotonDist::InitEnergies(std::ifstream & aDataFile)
|
||||
{
|
||||
G4int i, energyDistributionsNeeded = 0;
|
||||
for (i=0; i<nDiscrete; i++)
|
||||
@@ -174,7 +174,7 @@ void G4NeutronHPPhotonDist::InitEnergies(G4std::ifstream & aDataFile)
|
||||
}
|
||||
}
|
||||
|
||||
void G4NeutronHPPhotonDist::InitPartials(G4std::ifstream & aDataFile)
|
||||
void G4NeutronHPPhotonDist::InitPartials(std::ifstream & aDataFile)
|
||||
{
|
||||
aDataFile >> nDiscrete >> targetMass;
|
||||
if(nDiscrete != 1)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// A prototype of the low energy neutron transport model.
|
||||
#include "G4NeutronHPSCFissionFS.hh"
|
||||
|
||||
void G4NeutronHPSCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
|
||||
void G4NeutronHPSCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String aString = "/SC/";
|
||||
G4NeutronHPFissionBaseFS::Init(A, Z, dirName, aString);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// A prototype of the low energy neutron transport model.
|
||||
#include "G4NeutronHPTCFissionFS.hh"
|
||||
|
||||
void G4NeutronHPTCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType0)
|
||||
void G4NeutronHPTCFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & )
|
||||
{
|
||||
G4String aString = "/TC/";
|
||||
G4NeutronHPFissionBaseFS::Init(A, Z, dirName, aString);
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
G4NeutronHPVector::G4NeutronHPVector(G4int n)
|
||||
{
|
||||
nPoints=G4std::max(n, 20);
|
||||
nPoints=std::max(n, 20);
|
||||
theData = new G4NeutronHPDataPoint[nPoints];
|
||||
nEntries=0;
|
||||
Verbose=0;
|
||||
@@ -313,7 +313,7 @@
|
||||
G4bool G4NeutronHPVector::IsBlocked(G4double aX)
|
||||
{
|
||||
G4bool result = false;
|
||||
G4std::vector<G4double>::iterator i;
|
||||
std::vector<G4double>::iterator i;
|
||||
for(i=theBlocked.begin(); i!=theBlocked.end(); i++)
|
||||
{
|
||||
G4double aBlock = *i;
|
||||
@@ -387,7 +387,7 @@
|
||||
{
|
||||
if(theIntegral[i]/theIntegral[GetVectorLength()-1]>0.15)
|
||||
{
|
||||
result = theData[G4std::min(i+1, GetVectorLength()-1)].GetX();
|
||||
result = theData[std::min(i+1, GetVectorLength()-1)].GetX();
|
||||
the15percentBorderCash = result;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user