Import Geant4 1.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:34:16 +02:00
parent ca1c8cb059
commit 103bda00c8
2654 changed files with 29719 additions and 20203 deletions
@@ -65,7 +65,7 @@
{
if(aPoint!=nEntries)
{
G4cout <<"G4InterpolationManager::AppendScheme - "<<aPoint<<" "<<nEntries<<endl;
G4cout <<"G4InterpolationManager::AppendScheme - "<<aPoint<<" "<<nEntries<<G4endl;
G4Exception("Wrong usage of G4InterpolationManager::AppendScheme");
}
if(nEntries==0)
@@ -4,9 +4,9 @@
//
#include "G4NeutronHPAngular.hh"
void G4NeutronHPAngular::Init(ifstream & aDataFile)
void G4NeutronHPAngular::Init(G4std::ifstream & aDataFile)
{
// G4cout << "here we are entering the Angular Init"<<endl;
// G4cout << "here we are entering the Angular Init"<<G4endl;
G4int dummy;
aDataFile >> theAngularDistributionType >> targetMass;
aDataFile >> frameFlag;
@@ -57,7 +57,7 @@ void G4NeutronHPAngular::Init(ifstream & aDataFile)
else
{
theIsoFlag = false;
G4cout << "unknown distribution found for Angular"<<endl;
G4cout << "unknown distribution found for Angular"<<G4endl;
G4Exception("unknown distribution needs implementation!!!");
}
}
@@ -146,5 +146,5 @@ void G4NeutronHPAngular::SampleAndUpdate(G4ReactionProduct & aHadron)
}
aHadron.Lorentz(aHadron, -1.*theTarget);
// G4cout << aHadron.GetMomentum()<<" ";
// G4cout << aHadron.GetTotalMomentum()<<endl;
// G4cout << aHadron.GetTotalMomentum()<<G4endl;
}
@@ -23,7 +23,7 @@
if(nDistFunc==0)
{
G4cerr << "No distribution functions to sample "
<< "from in G4NeutronHPArbitaryTab::Sample"<<endl;
<< "from in G4NeutronHPArbitaryTab::Sample"<<G4endl;
G4Exception();
}
else
@@ -7,33 +7,33 @@
G4NeutronHPCapture::G4NeutronHPCapture()
{
// G4cout << "Capture : start of construction!!!!!!!!"<<endl;
// G4cout << "Capture : start of construction!!!!!!!!"<<G4endl;
if(!getenv("NeutronHPCrossSections"))
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
dirName = getenv("NeutronHPCrossSections");
G4String tString = "/Capture/";
dirName = dirName + tString;
numEle = G4Element::GetNumberOfElements();
// G4cout << "+++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
// G4cout <<"Disname="<<dirName<<" numEle="<<numEle<<endl;
// G4cout << "+++++++++++++++++++++++++++++++++++++++++++++++++"<<G4endl;
// G4cout <<"Disname="<<dirName<<" numEle="<<numEle<<G4endl;
theCapture = new G4NeutronHPChannel[numEle];
// G4cout <<"G4NeutronHPChannel constructed"<<endl;
// G4cout <<"G4NeutronHPChannel constructed"<<G4endl;
G4NeutronHPCaptureFS * theFS = new G4NeutronHPCaptureFS;
for (G4int i=0; i<numEle; i++)
{
// G4cout << "initializing theCapture "<<i<<" "<< numEle<<endl;
// G4cout << "initializing theCapture "<<i<<" "<< numEle<<G4endl;
theCapture[i].Init((*(G4Element::GetElementTable()))(i), dirName);
theCapture[i].Register(theFS);
}
delete theFS;
// G4cout << "-------------------------------------------------"<<endl;
// G4cout << "Leaving G4NeutronHPCapture::G4NeutronHPCapture"<<endl;
// G4cout << "-------------------------------------------------"<<G4endl;
// G4cout << "Leaving G4NeutronHPCapture::G4NeutronHPCapture"<<G4endl;
}
G4NeutronHPCapture::~G4NeutronHPCapture()
{
delete [] theCapture;
// G4cout << "Leaving G4NeutronHPCapture::~G4NeutronHPCapture"<<endl;
// G4cout << "Leaving G4NeutronHPCapture::~G4NeutronHPCapture"<<G4endl;
}
G4VParticleChange * G4NeutronHPCapture::ApplyYourself(const G4Track& aTrack, G4Nucleus& aTargetNucleus)
@@ -45,7 +45,7 @@ void G4NeutronHPCaptureData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
G4Exception("Attempt to use NeutronHP data for particles other than neutrons!!!");
G4cout << "G4NeutronHPCaptureData::DumpPhysicsTable still to be implemented"<<endl;
G4cout << "G4NeutronHPCaptureData::DumpPhysicsTable still to be implemented"<<G4endl;
}
G4double G4NeutronHPCaptureData::GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE)
@@ -107,7 +107,7 @@
hasXsec = false;
return;
}
ifstream theData(filename, ios::in);
G4std::ifstream theData(filename, G4std::ios::in);
hasFSData = theFinalStatePhotons.InitMean(theData);
if(hasFSData)
@@ -65,7 +65,7 @@
{
for (G4int i1=0; i1<nIsos; i1++)
{
// G4cout <<" Init: normal case"<<endl;
// G4cout <<" Init: normal case"<<G4endl;
G4int A = theElement->GetIsotope(i1)->GetN();
G4double frac = theElement->GetRelativeAbundanceVector()[i1]/perCent;
UpdateData(A, Z, count++, frac);
@@ -142,7 +142,7 @@
}
while (p!=aPassive->GetVectorLength())
{
if(abs(theMerge->GetEnergy(max(0,m-1))-aPassive->GetEnergy(p))/aPassive->GetEnergy(p)>0.001)
if(abs(theMerge->GetEnergy(G4std::max(0,m-1))-aPassive->GetEnergy(p))/aPassive->GetEnergy(p)>0.001)
theMerge->SetData(m++, aPassive->GetEnergy(p), aPassive->GetXsec(p));
p++;
}
@@ -152,7 +152,7 @@
G4ParticleChange * G4NeutronHPChannel::ApplyYourself(const G4Track & theTrack, G4int anIsotope)
{
// G4cout << "G4NeutronHPChannel::ApplyYourself+"<<niso<<endl;
// G4cout << "G4NeutronHPChannel::ApplyYourself+"<<niso<<G4endl;
if(anIsotope != -1) return theFinalStates[anIsotope]->ApplyYourself(theTrack);
G4double sum=0;
G4int it=0;
@@ -171,18 +171,18 @@
}
if(sum == 0)
{
// G4cout << "G4NeutronHPChannel::ApplyYourself theFinalState->Initialize+"<<endl;
// G4cout << "G4NeutronHPChannel::ApplyYourself theFinalState->Initialize-"<<endl;
// G4cout << "G4NeutronHPChannel::ApplyYourself theFinalState->Initialize+"<<G4endl;
// G4cout << "G4NeutronHPChannel::ApplyYourself theFinalState->Initialize-"<<G4endl;
it = niso*G4UniformRand();
}
else
{
// G4cout << "Are we still here? "<<sum<<endl;
// G4cout << "TESTHP 23 NISO="<<niso<<endl;
// G4cout << "Are we still here? "<<sum<<G4endl;
// G4cout << "TESTHP 23 NISO="<<niso<<G4endl;
G4double random = G4UniformRand();
G4double running=0;
// G4cout << "G4NeutronHPChannel::ApplyYourself Done the sum"<<niso<<endl;
// G4cout << "TESTHP 24 NISO="<<niso<<endl;
// G4cout << "G4NeutronHPChannel::ApplyYourself Done the sum"<<niso<<G4endl;
// G4cout << "TESTHP 24 NISO="<<niso<<G4endl;
for (G4int ix=0; ix<niso; ix++)
{
running += xsec[ix];
@@ -199,10 +199,10 @@
G4ParticleChange * theFinalState=NULL;
while(theFinalState==NULL)
{
// G4cout << "TESTHP 24 it="<<it<<endl;
// G4cout << "TESTHP 24 it="<<it<<G4endl;
theFinalState = theFinalStates[it]->ApplyYourself(theTrack);
}
// G4cout <<"THE IMPORTANT RETURN"<<endl;
// G4cout <<"THE IMPORTANT RETURN"<<G4endl;
return theFinalState;
}
@@ -95,9 +95,9 @@
void G4NeutronHPChannelList::Init(G4Element * anElement, const G4String & dirName)
{
theDir = dirName;
// G4cout << theDir << endl;
// G4cout << theDir << G4endl;
theElement = anElement;
// G4cout << theElement << endl;
// G4cout << theElement << G4endl;
;
}
@@ -18,7 +18,7 @@
#include "G4NeutronHPKallbachMannSyst.hh"
#include "G4ParticleTable.hh"
void G4NeutronHPContAngularPar::Init(ifstream & aDataFile)
void G4NeutronHPContAngularPar::Init(G4std::ifstream & aDataFile)
{
aDataFile >> theEnergy >> nEnergies >> nDiscreteEnergies >> nAngularParameters;
theEnergy *= eV;
@@ -11,7 +11,7 @@
{
numEle = G4Element::GetNumberOfElements();
theData = new G4NeutronHPElementData[numEle];
// G4cout << "G4NeutronHPData::G4NeutronHPData(): numEle="<<numEle<<endl;
// G4cout << "G4NeutronHPData::G4NeutronHPData(): numEle="<<numEle<<G4endl;
for (G4int i=0; i<numEle; i++)
{
theData[i].Init((*(G4Element::GetElementTable()))(i));
@@ -25,15 +25,15 @@
G4PhysicsVector * G4NeutronHPData::DoPhysicsVector(G4NeutronHPVector * theVector)
{
// G4cout << "Entered G4NeutronHPData::DoPhysicsVector."<<endl;
// G4cout << "Entered G4NeutronHPData::DoPhysicsVector."<<G4endl;
G4int len = theVector->GetVectorLength();
// G4cout <<"zahl der energie-punkte "<< len<<endl;
// G4cout <<"zahl der energie-punkte "<< len<<G4endl;
if(len==0) return new G4LPhysicsFreeVector(0, 0, 0);
G4double emin = theVector->GetX(0);
G4double emax = theVector->GetX(len-1);
// G4cout <<"zahl der energie-punkte "<< len<<" "<<emin<<" "<<emax<<endl;
// G4cout <<"zahl der energie-punkte "<< len<<" "<<emin<<" "<<emax<<G4endl;
// G4int dummy; cin >> dummy;
// G4int dummy; G4cin >> dummy;
G4bool flag;
G4LPhysicsFreeVector * theResult = new G4LPhysicsFreeVector(len, emin, emax);
@@ -4,7 +4,7 @@
//
#include "G4NeutronHPDeExGammas.hh"
void G4NeutronHPDeExGammas::Init(ifstream & aDataFile)
void G4NeutronHPDeExGammas::Init(G4std::ifstream & aDataFile)
{
G4NeutronHPGamma ** theGammas = new G4NeutronHPGamma * [50];
G4int nGammas = 0;
@@ -13,7 +13,7 @@
dirName = getenv("NeutronHPCrossSections");
G4String tString = "/Elastic/";
dirName = dirName + tString;
// G4cout <<"G4NeutronHPElastic::G4NeutronHPElastic testit "<<dirName<<endl;
// G4cout <<"G4NeutronHPElastic::G4NeutronHPElastic testit "<<dirName<<G4endl;
numEle = G4Element::GetNumberOfElements();
theElastic = new G4NeutronHPChannel[numEle];
for (G4int i=0; i<numEle; i++)
@@ -45,7 +45,7 @@ void G4NeutronHPElasticData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
G4Exception("Attempt to use NeutronHP data for particles other than neutrons!!!");
// G4cout << "G4NeutronHPElasticData::DumpPhysicsTable still to be implemented"<<endl;
// G4cout << "G4NeutronHPElasticData::DumpPhysicsTable still to be implemented"<<G4endl;
}
G4double G4NeutronHPElasticData::GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE)
@@ -29,7 +29,7 @@
hasXsec = false;
return;
}
ifstream theData(filename, ios::in);
G4std::ifstream theData(filename, G4std::ios::in);
theData >> repFlag >> targetMass >> frameFlag;
if(repFlag==1)
{
@@ -86,22 +86,22 @@
}
else
{
G4cout << "unusable number for repFlag: repFlag="<<repFlag<<endl;
G4cout << "unusable number for repFlag: repFlag="<<repFlag<<G4endl;
G4Exception("G4NeutronHPElasticFS::Init -- unusable number for repFlag");
}
}
G4ParticleChange * G4NeutronHPElasticFS::ApplyYourself(const G4Track & theTrack)
{
G4int i, ii, iii;
// G4cout << "G4NeutronHPElasticFS::ApplyYourself+"<<endl;
// G4cout << "G4NeutronHPElasticFS::ApplyYourself+"<<G4endl;
theResult.Initialize(theTrack);
G4double eKinetic = theTrack.GetKineticEnergy();
const G4DynamicParticle *incidentParticle = theTrack.GetDynamicParticle();
G4ReactionProduct theNeutron( incidentParticle->GetDefinition() );
theNeutron.SetMomentum( incidentParticle->GetMomentum() );
theNeutron.SetKineticEnergy( eKinetic );
// G4cout << "G4NeutronHPElasticFS::ApplyYourself++"<<eKinetic<<" "<<endl;
// G4cout << "CMSVALUES 0 "<<theNeutron.GetTotalMomentum()<<endl;
// G4cout << "G4NeutronHPElasticFS::ApplyYourself++"<<eKinetic<<" "<<G4endl;
// G4cout << "CMSVALUES 0 "<<theNeutron.GetTotalMomentum()<<G4endl;
G4double pold = theNeutron.GetTotalMomentum();
G4ReactionProduct theTarget;
@@ -110,7 +110,7 @@
// G4cout << "Nucleus-test"<<" "<<targetMass<<" ";
// G4cout << theTarget.GetMomentum().x()<<" ";
// G4cout << theTarget.GetMomentum().y()<<" ";
// G4cout << theTarget.GetMomentum().z()<<endl;
// G4cout << theTarget.GetMomentum().z()<<G4endl;
// neutron and target defined as reaction products.
@@ -119,7 +119,7 @@
G4ThreeVector the3Neutron = theNeutron.GetMomentum();
G4double nEnergy = theNeutron.GetTotalEnergy();
G4ThreeVector the3Target = theTarget.GetMomentum();
// cout << "@@@" << the3Target<<endl;
// cout << "@@@" << the3Target<<G4endl;
G4double tEnergy = theTarget.GetTotalEnergy();
G4ReactionProduct theCMS;
G4double totE = nEnergy+tEnergy;
@@ -150,7 +150,7 @@
}
else
{
G4cout << "unusable number for repFlag: repFlag="<<repFlag<<endl;
G4cout << "unusable number for repFlag: repFlag="<<repFlag<<G4endl;
G4Exception("G4NeutronHPElasticFS::Init -- unusable number for repFlag");
}
if(cosTh<-1.1) return NULL;
@@ -246,7 +246,7 @@
theRecoil->SetMomentum(theTarget.GetMomentum());
theResult.SetNumberOfSecondaries(1);
theResult.AddSecondary(theRecoil);
// G4cout << "G4NeutronHPElasticFS::ApplyYourself 10+"<<endl;
// G4cout << "G4NeutronHPElasticFS::ApplyYourself 10+"<<G4endl;
// postpone the tracking of the primary neutron
theResult.SetStatusChange(fSuspend);
return &theResult;
@@ -38,23 +38,23 @@
{
for (i1=0; i1<nIso; i1++)
{
// G4cout <<" Init: normal case"<<endl;
// G4cout <<" Init: normal case"<<G4endl;
G4int A = theElement->GetIsotope(i1)->GetN();
G4double frac = theElement->GetRelativeAbundanceVector()[i1]/perCent;
UpdateData(A, Z, count++, frac);
}
}else{
// G4cout <<" Init: theStableOnes case: Z="<<Z<<endl;
// G4cout <<" Init: theStableOnes case: Z="<<Z<<G4endl;
G4int first = theStableOnes.GetFirstIsotope(Z);
// G4cout <<"first="<<first<<" "<<theStableOnes.GetNumberOfIsotopes(theElement->GetZ())<<endl;
// G4cout <<"first="<<first<<" "<<theStableOnes.GetNumberOfIsotopes(theElement->GetZ())<<G4endl;
for(G4int i1=0;
i1<theStableOnes.GetNumberOfIsotopes(theElement->GetZ());
i1++)
{
// G4cout <<" Init: theStableOnes in the loop"<<endl;
// G4cout <<" Init: theStableOnes in the loop"<<G4endl;
G4int A = theStableOnes.GetIsotopeNucleonCount(first+i1);
G4double frac = theStableOnes.GetAbundance(first+i1);
// G4cout <<" Init: theStableOnes in the loop: "<<A<<endl;
// G4cout <<" Init: theStableOnes in the loop: "<<A<<G4endl;
UpdateData(A, Z, count++, frac);
}
}
@@ -67,40 +67,40 @@
void G4NeutronHPElementData::UpdateData(G4int A, G4int Z, G4int index, G4double abundance)
{
//Reads in the Data, using G4NeutronHPIsoData[], and its Init
// G4cout << "entered: ElementWiseData::UpdateData"<<endl;
// G4cout << "entered: ElementWiseData::UpdateData"<<G4endl;
theIsotopeWiseData[index].Init(A, Z, abundance);
// G4cout << "ElementWiseData::UpdateData Init finished"<<endl;
// G4cout << "ElementWiseData::UpdateData Init finished"<<G4endl;
theBuffer = theIsotopeWiseData[index].MakeElasticData();
// G4cout << "ElementWiseData::UpdateData MakeElasticData finished: "
// <<theBuffer->GetVectorLength()<<endl;
// <<theBuffer->GetVectorLength()<<G4endl;
Harmonise(theElasticData, theBuffer);
// G4cout << "ElementWiseData::UpdateData Harmonise finished: "
// <<theElasticData->GetVectorLength()<<endl;
// <<theElasticData->GetVectorLength()<<G4endl;
delete theBuffer;
theBuffer = theIsotopeWiseData[index].MakeInelasticData();
// G4cout << "ElementWiseData::UpdateData MakeInelasticData finished: "
// <<theBuffer->GetVectorLength()<<endl;
// <<theBuffer->GetVectorLength()<<G4endl;
Harmonise(theInelasticData, theBuffer);
// G4cout << "ElementWiseData::UpdateData Harmonise finished: "
// <<theInelasticData->GetVectorLength()<<endl;
// <<theInelasticData->GetVectorLength()<<G4endl;
delete theBuffer;
theBuffer = theIsotopeWiseData[index].MakeCaptureData();
// G4cout << "ElementWiseData::UpdateData MakeCaptureData finished: "
// <<theBuffer->GetVectorLength()<<endl;
// <<theBuffer->GetVectorLength()<<G4endl;
Harmonise(theCaptureData, theBuffer);
// G4cout << "ElementWiseData::UpdateData Harmonise finished: "
// <<theCaptureData->GetVectorLength()<<endl;
// <<theCaptureData->GetVectorLength()<<G4endl;
delete theBuffer;
theBuffer = theIsotopeWiseData[index].MakeFissionData();
// G4cout << "ElementWiseData::UpdateData MakeFissionData finished: "
// <<theBuffer->GetVectorLength()<<endl;
// <<theBuffer->GetVectorLength()<<G4endl;
Harmonise(theFissionData, theBuffer);
// G4cout << "ElementWiseData::UpdateData Harmonise finished: "
// <<theFissionData->GetVectorLength()<<endl;
// <<theFissionData->GetVectorLength()<<G4endl;
delete theBuffer;
// G4cout << "ElementWiseData::UpdateData finished"<endl;
@@ -112,7 +112,7 @@
G4int s = 0, n=0, i=0, m=0;
G4NeutronHPVector * theMerge = new G4NeutronHPVector;
G4bool flag;
// G4cout << "Harmonise 1: "<<theStore->GetEnergy(s)<<" "<<theNew->GetEnergy(0)<<endl;
// G4cout << "Harmonise 1: "<<theStore->GetEnergy(s)<<" "<<theNew->GetEnergy(0)<<G4endl;
while ( theStore->GetEnergy(s)<theNew->GetEnergy(0)&&s<theStore->GetVectorLength() )
{
theMerge->SetData(m++, theStore->GetEnergy(s), theStore->GetXsec(s));
@@ -122,7 +122,7 @@
G4NeutronHPVector * passive = theNew;
G4NeutronHPVector * tmp;
G4int a = s, p = n, t;
// G4cout << "Harmonise 2: "<<active->GetVectorLength()<<" "<<passive->GetVectorLength()<<endl;
// G4cout << "Harmonise 2: "<<active->GetVectorLength()<<" "<<passive->GetVectorLength()<<G4endl;
while (a<active->GetVectorLength()&&p<passive->GetVectorLength())
{
if(active->GetEnergy(a) <= passive->GetEnergy(p))
@@ -134,28 +134,28 @@
m++;
a++;
} else {
// G4cout << "swapping in Harmonise"<<endl;
// G4cout << "swapping in Harmonise"<<G4endl;
tmp = active; t=a;
active = passive; a=p;
passive = tmp; p=t;
}
}
// G4cout << "Harmonise 3: "<< a <<" "<<active->GetVectorLength()<<" "<<m<<endl;
// G4cout << "Harmonise 3: "<< a <<" "<<active->GetVectorLength()<<" "<<m<<G4endl;
while (a!=active->GetVectorLength())
{
theMerge->SetData(m++, active->GetEnergy(a), active->GetXsec(a));
a++;
}
// G4cout << "Harmonise 4: "<< p <<" "<<passive->GetVectorLength()<<" "<<m<<endl;
// G4cout << "Harmonise 4: "<< p <<" "<<passive->GetVectorLength()<<" "<<m<<G4endl;
while (p!=passive->GetVectorLength())
{
theMerge->SetData(m++, passive->GetEnergy(p), passive->GetXsec(p));
p++;
}
// G4cout <<"Harmonise 5: "<< theMerge->GetVectorLength() << " " << m << endl;
// G4cout <<"Harmonise 5: "<< theMerge->GetVectorLength() << " " << m << G4endl;
delete theStore;
theStore = theMerge;
// G4cout <<"Harmonise 6: "<< theStore->GetVectorLength() << " " << m << endl;
// G4cout <<"Harmonise 6: "<< theStore->GetVectorLength() << " " << m << G4endl;
}
G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector(G4Element * theElement,
@@ -79,7 +79,7 @@ G4ReactionProductVector * G4NeutronHPEnAngCorrelation::Sample(G4double anEnergy)
#ifdef G4_NHP_DEBUG
cout <<"G4NeutronHPEnAngCorrelation: "<<
it->at(ii)->GetTotalEnergy()<<" "<<
it->at(ii)->GetMomentum()<<endl;
it->at(ii)->GetMomentum()<<G4endl;
#endif
it->at(ii)->Lorentz(*(it->at(ii)), -1.*theCMS);
}
@@ -13,7 +13,7 @@
G4DynamicParticleVector * G4NeutronHPFCFissionFS::ApplyYourself(G4int nNeutrons)
{
G4DynamicParticleVector * aResult;
// G4cout <<"G4NeutronHPFCFissionFS::ApplyYourself +"<<endl;
// G4cout <<"G4NeutronHPFCFissionFS::ApplyYourself +"<<G4endl;
aResult = G4NeutronHPFissionBaseFS::ApplyYourself(nNeutrons);
return aResult;
}
@@ -26,8 +26,8 @@
hasXsec = false;
return;
}
#ifndef WIN32
ifstream theData(filename, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream theData(filename, G4std::ios::in);
#else
ifstream theData(filename, ios::in|ios::nocreate);
#endif
@@ -61,7 +61,7 @@
if(dataType==1) theEnergyRelease.Init(theData);
break;
default:
G4cout << "G4NeutronHPFSFissionFS::Init: unknown data type"<<dataType<<endl;
G4cout << "G4NeutronHPFSFissionFS::Init: unknown data type"<<dataType<<G4endl;
G4Exception("G4NeutronHPFSFissionFS::Init: unknown data type");
break;
}
@@ -62,7 +62,7 @@
void G4NeutronHPField::Dump()
{
G4cout << nEntries<<endl;
G4cout << nEntries<<G4endl;
for(G4int i=0; i<nEntries; i++)
{
G4cout << theData[i].GetX()<<" ";
@@ -70,7 +70,7 @@
{
G4cout << theData[i].GetY(j)<<" ";
}
G4cout << endl;
G4cout << G4endl;
}
}
@@ -81,12 +81,12 @@
{
nPoints += 50;
G4NeutronHPFieldPoint * buff = new G4NeutronHPFieldPoint[nPoints];
// G4cout << "copying 1"<<endl;
// G4cout << "copying 1"<<G4endl;
for (G4int j=0; j<nEntries; j++)
{
buff[j] = theData[j];
}
// G4cout << "copying 2"<<endl;
// G4cout << "copying 2"<<G4endl;
delete [] theData;
theData = buff;
}
@@ -28,8 +28,8 @@
hasXsec = false;
return; // no data for exactly this isotope.
}
#ifndef WIN32
ifstream theData(filename, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream theData(filename, G4std::ios::in);
#else
ifstream theData(filename, ios::in|ios::nocreate);
#endif
@@ -46,7 +46,7 @@ void G4NeutronHPFissionData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
G4Exception("Attempt to use NeutronHP data for particles other than neutrons!!!");
G4cout << "G4NeutronHPFissionData::DumpPhysicsTable still to be implemented"<<endl;
G4cout << "G4NeutronHPFissionData::DumpPhysicsTable still to be implemented"<<G4endl;
}
G4double G4NeutronHPFissionData::GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE)
@@ -129,7 +129,7 @@
}
else
{
// cout << " all = "<<all<<endl;
// cout << " all = "<<all<<G4endl;
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
theDecayConstants = new G4double[delayed];
if(Prompt==0&&delayed==0) Prompt=all;
@@ -150,7 +150,7 @@
delete theNeutrons;
}
delete [] theDecayConstants;
// cout << "all delayed "<<delayed<<endl;
// cout << "all delayed "<<delayed<<G4endl;
G4int nPhotons = 0;
if(thePhotons!=NULL)
{
@@ -165,15 +165,15 @@
// do some rotating, if that helps to conserve momentum @@@@
// finally deal with local energy depositions.
// G4cout <<"Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< endl;
// G4cout <<"Number of Prompt = "<<Prompt<<endl;
// G4cout <<"Number of delayed = "<<delayed<<endl;
// G4cout <<"Number of photons = "<<nPhotons<<endl;
// G4cout <<"Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl;
// G4cout <<"Number of Prompt = "<<Prompt<<G4endl;
// G4cout <<"Number of delayed = "<<delayed<<G4endl;
// G4cout <<"Number of photons = "<<nPhotons<<G4endl;
G4NeutronHPFissionERelease * theERelease;
theERelease = theFS.GetEnergyRelease();
G4double eDepByFragments = theERelease->GetFragmentKinetic();
theResult.SetLocalEnergyDeposit(eDepByFragments);
// cout << "local energy deposit" << eDepByFragments<<endl;
// cout << "local energy deposit" << eDepByFragments<<G4endl;
// clean up the primary neutron
theResult.SetStatusChange(fStopAndKill);
return &theResult;
@@ -4,7 +4,7 @@
//
#include "G4NeutronHPGamma.hh"
G4bool G4NeutronHPGamma::Init(ifstream & aDataFile)
G4bool G4NeutronHPGamma::Init(G4std::ifstream & aDataFile)
{
G4bool theResult = true;
if(aDataFile >> levelEnergy)
@@ -7,8 +7,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NeutronHPInelastic.cc,v 1.3 1999/07/02 12:27:15 hpw Exp $
// GEANT4 tag $Name: geant4-01-00 $
// $Id: G4NeutronHPInelastic.cc,v 1.4 1999/12/15 14:53:17 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
#include "G4NeutronHPInelastic.hh"
@@ -17,7 +17,7 @@
SetMinEnergy( 0.0 );
SetMaxEnergy( 20.*MeV );
system("echo $NeutronHPCrossSections");
// G4cout << " entering G4NeutronHPInelastic constructor"<<endl;
// G4cout << " entering G4NeutronHPInelastic constructor"<<G4endl;
if(!getenv("NeutronHPCrossSections"))
G4Exception("Please setenv NeutronHPCrossSections to point to the neutron cross-section files.");
dirName = getenv("NeutronHPCrossSections");
@@ -13,16 +13,16 @@
void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
{
char the[100] = {""};
ostrstream ost(the, 100, ios::out);
G4std::ostrstream ost(the, 100, G4std::ios::out);
ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
G4String * aName = new G4String(the);
#ifndef WIN32
ifstream from(*aName, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream from(*aName, G4std::ios::in);
#else
ifstream from(*aName, ios::in|ios::nocreate);
#endif
if(!from) return; // no data found for this isotope
ifstream theGammaData(*aName, ios::in);
G4std::ifstream theGammaData(*aName, G4std::ios::in);
G4double eps = 0.001;
theNuclearMassDifference =
@@ -52,10 +52,10 @@ void G4NeutronHPInelasticBaseFS::Init (G4double A, G4double Z, G4String & dirNam
hasXsec = false;
return;
}
#ifndef WIN32
ifstream theData(filename, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream theData(filename, G4std::ios::in);
#else
ifstream theData(filename, ios::in|ios::nocreate);
G4std::ifstream theData(filename, G4std::ios::in|G4std::ios::nocreate);
#endif
if(!(theData))
{
@@ -13,16 +13,16 @@
void G4NeutronHPInelasticCompFS::InitGammas(G4double AR, G4double ZR)
{
char the[100] = {""};
ostrstream ost(the, 100, ios::out);
G4std::ostrstream ost(the, 100, G4std::ios::out);
ost <<gammaPath<<"z"<<ZR<<".a"<<AR;
G4String * aName = new G4String(the);
#ifndef WIN32
ifstream from(*aName, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream from(*aName, G4std::ios::in);
#else
ifstream from(*aName, ios::in|ios::nocreate);
#endif
if(!from) return; // no data found for this isotope
ifstream theGammaData(*aName, ios::in);
G4std::ifstream theGammaData(*aName, G4std::ios::in);
theGammas.Init(theGammaData);
delete aName;
@@ -48,8 +48,8 @@ void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirNam
hasXsec = false;
return;
}
#ifndef WIN32
ifstream theData(filename, ios::in);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream theData(filename, G4std::ios::in);
#else
ifstream theData(filename, ios::in|ios::nocreate);
#endif
@@ -45,7 +45,7 @@ void G4NeutronHPInelasticData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
G4Exception("Attempt to use NeutronHP data for particles other than neutrons!!!");
G4cout << "G4NeutronHPInelasticData::DumpPhysicsTable still to be implemented"<<endl;
G4cout << "G4NeutronHPInelasticData::DumpPhysicsTable still to be implemented"<<G4endl;
}
G4double G4NeutronHPInelasticData::GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE)
@@ -14,8 +14,8 @@
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, aFSType, result);
filename = aFile.GetName();
// if(filename=="") return false;
#ifndef WIN32
ifstream theChannel(filename);
#ifdef G4USE_STD_NAMESPACE
G4std::ifstream theChannel(filename);
#else
ifstream theChannel(filename,ios::in|ios::nocreate);
#endif
@@ -31,10 +31,10 @@
G4int nData;
theChannel >> nData;
theChannelData->Init(theChannel, nData, eV, abundance*barn);
// G4cout << "Channel Data Statistics: "<<theChannelData->GetVectorLength()<<endl;
// G4cout << "Channel data"<<endl;
// G4cout << "Channel Data Statistics: "<<theChannelData->GetVectorLength()<<G4endl;
// G4cout << "Channel data"<<G4endl;
// G4int hpw;
// cin >> hpw;
// G4cin >> hpw;
// theChannelData->Dump();
return result;
}
@@ -69,17 +69,17 @@
theInelasticData = theChannelData;
theChannelData = NULL;
// if(theInelasticData!=NULL) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<endl;
// if(theElasticData!=NULL) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<endl;
// if(theCaptureData!=NULL) G4cout << "Capture Data Statistics: "<<theCaptureData->GetVectorLength()<<endl;
// if(theFissionData!=NULL) G4cout << "Fission Data Statistics: "<<theFissionData->GetVectorLength()<<endl;
// G4cout << "Inelastic data"<<endl;
// if(theInelasticData!=NULL) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<G4endl;
// if(theElasticData!=NULL) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<G4endl;
// if(theCaptureData!=NULL) G4cout << "Capture Data Statistics: "<<theCaptureData->GetVectorLength()<<G4endl;
// if(theFissionData!=NULL) G4cout << "Fission Data Statistics: "<<theFissionData->GetVectorLength()<<G4endl;
// G4cout << "Inelastic data"<<G4endl;
// if(theInelasticData!=NULL) theInelasticData->Dump();
// G4cout << "Elastic data"<<endl;
// G4cout << "Elastic data"<<G4endl;
// if(theElasticData!=NULL) theElasticData->Dump();
// G4cout << "Capture data"<<endl;
// G4cout << "Capture data"<<G4endl;
// if(theCaptureData!=NULL) theCaptureData->Dump();
// G4cout << "Fission data"<<endl;
// G4cout << "Fission data"<<G4endl;
// if(theFissionData!=NULL) theFissionData->Dump();
}
@@ -14,7 +14,7 @@
#include "G4He3.hh"
#include "G4Alpha.hh"
void G4NeutronHPIsotropic::Init(ifstream & aDataFile)
void G4NeutronHPIsotropic::Init(G4std::ifstream & aDataFile)
{
}
@@ -63,7 +63,7 @@ G4ReactionProduct * G4NeutronHPIsotropic::Sample(G4double anEnergy, G4double mas
G4double sinth = sin(theta);
// we need the the Q value of the reaction
result->SetKineticEnergy(max(0.001*MeV, anEnergy+GetQValue()));
result->SetKineticEnergy(G4std::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);
@@ -60,7 +60,7 @@ G4double G4NeutronHPKallbachMannSyst::A(G4double anEnergy)
G4int ZA = theTargetZ;
G4double ea = epsa+SeparationEnergy(Ac, Nc, AA, ZA);
G4double Et1 = 130*MeV;
G4double R1 = min(ea, Et1);
G4double R1 = G4std::min(ea, Et1);
// theProductEnergy is still in CMS!!!
G4double epsb = theProductEnergy*(theProductMass+theResidualMass)/theResidualMass;
G4int AB = theResidualA;
@@ -68,7 +68,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 = min(ea, Et3);
G4double R3 = G4std::min(ea, Et3);
G4double X3 = R3*eb/ea;
G4double Ma = 1;
G4double mb;
@@ -13,7 +13,7 @@
G4DynamicParticleVector * G4NeutronHPLCFissionFS::ApplyYourself(G4int NNeutrons)
{
G4DynamicParticleVector * aResult;
// G4cout <<"G4NeutronHPLCFissionFS::ApplyYourself +"<<endl;
// G4cout <<"G4NeutronHPLCFissionFS::ApplyYourself +"<<G4endl;
aResult = G4NeutronHPFissionBaseFS::ApplyYourself(NNeutrons);
return aResult;
}
@@ -14,7 +14,7 @@
#include "G4Alpha.hh"
#include "Randomize.hh"
void G4NeutronHPLabAngularEnergy::Init(ifstream & aDataFile)
void G4NeutronHPLabAngularEnergy::Init(G4std::ifstream & aDataFile)
{
aDataFile >> nEnergies;
theManager.Init(aDataFile);
@@ -7,7 +7,7 @@
#include "G4NeutronHPInterpolator.hh"
#include "G4NeutronHPFastLegendre.hh"
#include "Randomize.hh"
#include <iostream.h>
#include "g4std/iostream"
G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
{
@@ -21,7 +21,7 @@ G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
high = i0;
if(theCoeff[i0].GetEnergy()>anEnergy) break;
}
low = max(0, high-1);
low = G4std::max(0, high-1);
G4NeutronHPInterpolator theInt;
G4double lim=0.005;
G4double x, x1, x2, y1, y2, y;
@@ -89,7 +89,7 @@ G4double G4NeutronHPLegendreStore::SampleElastic (G4double anEnergy)
high = i0;
if(theCoeff[i0].GetEnergy()>anEnergy) break;
}
low = max(0, high-1);
low = G4std::max(0, high-1);
G4NeutronHPInterpolator theInt;
G4double lim=0.005;
G4double x, x1, x2, y1, y2, y;
@@ -112,7 +112,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 = max(try1, try2);
theNorm = G4std::max(try1, try2);
G4double value, random;
G4double v1, v2;
@@ -143,22 +143,22 @@ G4double G4NeutronHPLegendreStore::Sample (G4double energy) // still in interpol
{
G4int i0, i1, i2, i3, i4;
G4int low, high;
// G4cout << "G4NeutronHPLegendreStore::Sample "<<energy<<" "<<energy<<" "<<nEnergy<<endl;
// G4cout << "G4NeutronHPLegendreStore::Sample "<<energy<<" "<<energy<<" "<<nEnergy<<G4endl;
for (i0=0; i0<nEnergy; i0++)
{
// G4cout <<"theCoeff["<<i0<<"].GetEnergy() = "<<theCoeff[i0].GetEnergy()<<endl;
// G4cout <<"theCoeff["<<i0<<"].GetEnergy() = "<<theCoeff[i0].GetEnergy()<<G4endl;
high = i0;
if(theCoeff[i0].GetEnergy()>energy) break;
}
low = max(0, high-1);
// G4cout << "G4NeutronHPLegendreStore::Sample high, low: "<<high<<", "<<low<<endl;
low = G4std::max(0, high-1);
// G4cout << "G4NeutronHPLegendreStore::Sample high, low: "<<high<<", "<<low<<G4endl;
G4NeutronHPVector theBuffer;
G4NeutronHPInterpolator theInt;
G4double lim=0.005;
G4double x1, x2, y1, y2, y;
x1 = theCoeff[low].GetEnergy();
x2 = theCoeff[high].GetEnergy();
// G4cout << "the xes "<<x1<<" "<<x2<<endl;
// G4cout << "the xes "<<x1<<" "<<x2<<G4endl;
G4double costh=0;
for(i0=0; i0<601; i0++)
{
@@ -167,7 +167,7 @@ G4double G4NeutronHPLegendreStore::Sample (G4double energy) // still in interpol
y2 = Integrate(high, costh);
y = theInt.Interpolate(theManager.GetScheme(high), energy, x1, x2, y1, y2);
theBuffer.SetData(i0, costh, y);
// G4cout << "Integration "<<low<<" "<<costh<<" "<<y1<<" "<<y2<<" "<<y<<endl;
// G4cout << "Integration "<<low<<" "<<costh<<" "<<y1<<" "<<y2<<" "<<y<<G4endl;
}
G4double rand = G4UniformRand();
G4int it;
@@ -179,17 +179,17 @@ G4double G4NeutronHPLegendreStore::Sample (G4double energy) // still in interpol
// << theBuffer.GetY(i0)<<" "
// << theBuffer.GetY(600)<<" "
// << rand<<" "
// << theBuffer.GetY(i0)/theBuffer.GetY(600)<<endl;;
// << theBuffer.GetY(i0)/theBuffer.GetY(600)<<G4endl;;
}
if(it==601) it=600;
// G4cout << "G4NeutronHPLegendreStore::Sample it "<<rand<<" "<<it<<endl;
// G4cout << "G4NeutronHPLegendreStore::Sample it "<<rand<<" "<<it<<G4endl;
G4double norm = theBuffer.GetY(600);
if(norm==0) return -DBL_MAX;
x1 = theBuffer.GetY(it)/norm;
x2 = theBuffer.GetY(it-1)/norm;
y1 = theBuffer.GetX(it);
y2 = theBuffer.GetX(it-1);
// G4cout << "G4NeutronHPLegendreStore::Sample x y "<<x1<<" "<<y1<<" "<<x2<<" "<<y2<<endl;
// G4cout << "G4NeutronHPLegendreStore::Sample x y "<<x1<<" "<<y1<<" "<<x2<<" "<<y2<<G4endl;
return theInt.Interpolate(theManager.GetScheme(high), rand, x1, x2, y1, y2);
}
@@ -204,6 +204,6 @@ G4double G4NeutronHPLegendreStore::Integrate(G4int k, G4double costh) // still i
result += theCoeff[k].GetCoeff(l)*theLeg.Integrate(l, costh);
// G4cout << theCoeff[k].GetCoeff(l)<<" ";
}
// G4cout <<endl;
// G4cout <<G4endl;
return result;
}
@@ -23,7 +23,7 @@
if(i==nEntries) nEntries++;
}
void G4NeutronHPList::Init(ifstream & aDataFile, G4int nPar, G4double unit)
void G4NeutronHPList::Init(G4std::ifstream & aDataFile, G4int nPar, G4double unit)
{
G4int i;
G4double y;
@@ -34,7 +34,7 @@
}
}
void G4NeutronHPList::Init(ifstream & aDataFile, G4double unit)
void G4NeutronHPList::Init(G4std::ifstream & aDataFile, G4double unit)
{
G4int total, i;
aDataFile >> total;
@@ -48,12 +48,12 @@
G4double G4NeutronHPList::GetValue(G4int i)
{
// G4cout << "TestList "<<i<<" "<<nEntries<<endl;
// G4cout << "TestList "<<i<<" "<<nEntries<<G4endl;
if(nEntries<0)
{
// G4cout <<nPoints<<" "<<nEntries<<" "<<theData<<endl;
// G4cout <<nPoints<<" "<<nEntries<<" "<<theData<<G4endl;
// for(G4int ii=0; ii<2; ii++) G4cout << theData[ii]<<" ";
// G4cout << endl;
// G4cout << G4endl;
}
if (i<0) i=0;
if(i>=GetListLength()) i=GetListLength()-1;
@@ -8,7 +8,7 @@
// and all its terms.
//
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.2 1999/07/02 10:01:14 johna Exp $
// GEANT4 tag $Name: geant4-01-00 $
// GEANT4 tag $Name: geant4-01-01 $
//
#include "G4NeutronHPNBodyPhaseSpace.hh"
#include "G4Gamma.hh"
@@ -8,12 +8,8 @@
#include "G4Proton.hh"
#include "G4Gamma.hh"
#include "G4ios.hh"
#include <fstream.h>
#ifdef WIN32
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#include "g4std/fstream"
#include "g4std/strstream"
void G4NeutronHPNInelasticFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType)
{
@@ -28,21 +28,21 @@
{
G4NeutronHPDataUsed result;
aFlag = true;
// G4cout << "Names::GetName entered"<<endl;
// G4cout << "Names::GetName entered"<<G4endl;
G4int myA = A;
G4int myZ = Z;
G4String * theName = NULL;
G4String theFileName("");
G4int offA = 0, offZ = 0, inc = 1;
ifstream check;
G4std::ifstream check;
G4bool first = true;
// G4cout << "entered GetName!!!"<<endl;
// G4cout << "entered GetName!!!"<<G4endl;
do
{
aFlag = true;
char the1[100] = {""};
ostrstream ost1(the1, 100, ios::out);
char the1[1000] = {""};
G4std::ostrstream ost1(the1, 1000, G4std::ios::out);
ost1 <<base<<"/"<<"CrossSection/"<<myZ<<"_"<<myA<<"_"<<theString[myZ-1];
G4String * biff = new G4String(the1); // delete here as theName
if(theName!=NULL) delete theName;
@@ -50,7 +50,7 @@
result.SetName(*theName);
result.SetA(myA);
result.SetZ(myZ);
#ifndef WIN32
#ifdef G4USE_STD_NAMESPACE
check.open(*theName);
#else
check.open(*theName,ios::in|ios::nocreate);
@@ -63,8 +63,8 @@
{
aFlag = true;
first = false;
char the1[100] = {""};
ostrstream ost1(the1, 100, ios::out);
char the1[1000] = {""};
G4std::ostrstream ost1(the1, 1000, G4std::ios::out);
ost1 <<base<<"/"<<"CrossSection/"<<myZ<<"_"<<"nat"<<"_"<<theString[myZ-1];
biff = new G4String(the1); // delete here as theName
if(theName!=NULL) delete theName;
@@ -73,7 +73,7 @@
G4double natA = myZ/G4SandiaTable::GetZtoA(myZ);
result.SetA(natA);
result.SetZ(myZ);
#ifndef WIN32
#ifdef G4USE_STD_NAMESPACE
check.open(*theName);
#else
check.open(*theName,ios::in|ios::nocreate);
@@ -85,8 +85,8 @@
}
else
{
char the1[100] = {""};
ostrstream ost1(the1, 100, ios::out);
char the1[1000] = {""};
G4std::ostrstream ost1(the1, 1000, G4std::ios::out);
ost1 <<base<<"/"<<rest<<myZ<<"_"<<"nat"<<"_"<<theString[myZ-1];
biff = new G4String(the1); // delete here as theName
if(theName!=NULL) delete theName;
@@ -100,8 +100,8 @@
}
else
{
char the1[100] = {""};
ostrstream ost1(the1, 100, ios::out);
char the1[1000] = {""};
G4std::ostrstream ost1(the1, 1000, G4std::ios::out);
ost1 <<base<<"/"<<rest<<myZ<<"_"<<myA<<"_"<<theString[myZ-1];
biff = new G4String(the1); // delete here as theName
if(theName!=NULL) delete theName;
@@ -117,10 +117,10 @@
myZ = Z;
myA = A;
}else{
G4cout <<"G4NeutronHPNames: Sorry, this material does not come near to any data."<<endl;
G4cout <<"G4NeutronHPNames: Please make sure NeutronHPCrossSections points to the" << endl;
G4cout <<" directory, the neutron scattering data are located in." << endl;
G4cout << "G4NeutronHPNames: The material was: A="<<A<<", Z="<<Z<<endl;
G4cout <<"G4NeutronHPNames: Sorry, this material does not come near to any data."<<G4endl;
G4cout <<"G4NeutronHPNames: Please make sure NeutronHPCrossSections points to the" << G4endl;
G4cout <<" directory, the neutron scattering data are located in." << G4endl;
G4cout << "G4NeutronHPNames: The material was: A="<<A<<", Z="<<Z<<G4endl;
G4Exception("In case the data sets are at present not available in the neutron data library, please contact Hans-Peter.Wellisch@cern.ch");
delete theName;
theFileName = "";
@@ -136,8 +136,8 @@
}
}
while(!(check));
// G4cout << "Names::GetName: last theName proposal = "<< *theName <<" "<<A<<" "<<Z<<endl;
// G4cout << "File-name: "<<*theName<<endl;
// G4cout << "Names::GetName: last theName proposal = "<< *theName <<" "<<A<<" "<<Z<<G4endl;
// G4cout << "File-name: "<<*theName<<G4endl;
delete theName;
return result;
}
@@ -30,7 +30,7 @@ G4NeutronHPVector * G4NeutronHPPartial::GetY(G4double e1)
G4double E2 = X[i];
for(G4int ii=0; ii<data[i].GetVectorLength(); ii++)
{
x1 = data[i-1].GetX(min(i1, data[i-1].GetVectorLength()-1));
x1 = data[i-1].GetX(G4std::min(i1, data[i-1].GetVectorLength()-1));
x2 = data[i].GetX(ii);
if(x1<x2&&i1<data[i-1].GetVectorLength())
{
@@ -8,7 +8,7 @@
#include "G4NeutronHPLegendreStore.hh"
#include "G4Electron.hh"
G4bool G4NeutronHPPhotonDist::InitMean(ifstream & aDataFile)
G4bool G4NeutronHPPhotonDist::InitMean(G4std::ifstream & aDataFile)
{
G4bool result = true;
if(aDataFile >> repFlag)
@@ -63,7 +63,7 @@ G4bool G4NeutronHPPhotonDist::InitMean(ifstream & aDataFile)
}
else
{
G4cout << "Data representation in G4NeutronHPPhotonDist: "<<repFlag<<endl;
G4cout << "Data representation in G4NeutronHPPhotonDist: "<<repFlag<<G4endl;
G4Exception("G4NeutronHPPhotonDist: This data representation is not implemented.");
}
}
@@ -74,7 +74,7 @@ G4bool G4NeutronHPPhotonDist::InitMean(ifstream & aDataFile)
return result;
}
void G4NeutronHPPhotonDist::InitAngular(ifstream & aDataFile)
void G4NeutronHPPhotonDist::InitAngular(G4std::ifstream & aDataFile)
{
G4int i, ii;
//angular distributions
@@ -122,7 +122,7 @@ void G4NeutronHPPhotonDist::InitAngular(ifstream & aDataFile)
}
else
{
G4cout << "tabulation type: tabulationType"<<endl;
G4cout << "tabulation type: tabulationType"<<G4endl;
G4Exception("cannot deal with this tabulation type for angular distributions.");
}
}
@@ -130,7 +130,7 @@ void G4NeutronHPPhotonDist::InitAngular(ifstream & aDataFile)
}
void G4NeutronHPPhotonDist::InitEnergies(ifstream & aDataFile)
void G4NeutronHPPhotonDist::InitEnergies(G4std::ifstream & aDataFile)
{
G4int i, energyDistributionsNeeded = 0;
for (i=0; i<nDiscrete; i++)
@@ -155,7 +155,7 @@ void G4NeutronHPPhotonDist::InitEnergies(ifstream & aDataFile)
}
}
void G4NeutronHPPhotonDist::InitPartials(ifstream & aDataFile)
void G4NeutronHPPhotonDist::InitPartials(G4std::ifstream & aDataFile)
{
aDataFile >> nDiscrete >> targetMass;
if(nDiscrete != 1)
@@ -253,7 +253,7 @@ G4ReactionProductVector * G4NeutronHPPhotonDist::GetPhotons(G4double anEnergy)
G4double en = thePhotons->at(i)->GetTotalEnergy();
G4ThreeVector temp(en*sinth*cos(phi), en*sinth*sin(phi), en*cos(theta) );
thePhotons->at(i)->SetMomentum( temp ) ;
// G4cout << "Isotropic distribution in PhotonDist"<<temp<<endl;
// G4cout << "Isotropic distribution in PhotonDist"<<temp<<G4endl;
}
}
else
@@ -12,7 +12,7 @@
G4DynamicParticleVector * G4NeutronHPSCFissionFS::ApplyYourself(G4int NNeutrons)
{
G4DynamicParticleVector * aResult;
// G4cout <<"G4NeutronHPSCFissionFS::ApplyYourself +"<<endl;
// G4cout <<"G4NeutronHPSCFissionFS::ApplyYourself +"<<G4endl;
aResult = G4NeutronHPFissionBaseFS::ApplyYourself(NNeutrons);
return aResult;
}
@@ -12,7 +12,7 @@
G4DynamicParticleVector * G4NeutronHPTCFissionFS::ApplyYourself(G4int NNeutrons)
{
G4DynamicParticleVector * aResult;
// G4cout <<"G4NeutronHPTCFissionFS::ApplyYourself +"<<endl;
// G4cout <<"G4NeutronHPTCFissionFS::ApplyYourself +"<<G4endl;
aResult = G4NeutronHPFissionBaseFS::ApplyYourself(NNeutrons);
return aResult;
}
@@ -58,14 +58,14 @@
G4NeutronHPVector::~G4NeutronHPVector()
{
// if(Verbose==1)G4cout <<"G4NeutronHPVector::~G4NeutronHPVector"<<endl;
// if(Verbose==1)G4cout <<"G4NeutronHPVector::~G4NeutronHPVector"<<G4endl;
if(theData!=NULL)
{
delete [] theData;
}
// if(Verbose==1)G4cout <<"Vector: delete theData"<<endl;
// if(Verbose==1)G4cout <<"Vector: delete theData"<<G4endl;
if(theIntegral!=NULL) delete [] theIntegral;
// if(Verbose==1)G4cout <<"Vector: delete theIntegral"<<endl;
// if(Verbose==1)G4cout <<"Vector: delete theIntegral"<<G4endl;
isFreed = 1;
}
@@ -124,7 +124,7 @@
}
else
{
i=max(0,10*(i-1));
i=G4std::max(0,10*(i-1));
while (i<nEntries)
{
if(theData[i].GetX()>e) break;
@@ -173,39 +173,39 @@
void G4NeutronHPVector::Dump()
{
G4cout << nEntries<<endl;
G4cout << nEntries<<G4endl;
for(G4int i=0; i<nEntries; i++)
{
G4cout << theData[i].GetX()<<" ";
G4cout << theData[i].GetY()<<" ";
// if (i!=1&&i==5*(i/5)) G4cout << endl;
G4cout << endl;
// if (i!=1&&i==5*(i/5)) G4cout << G4endl;
G4cout << G4endl;
}
G4cout << endl;
G4cout << G4endl;
}
void G4NeutronHPVector::Check(G4int i)
{
// G4cout << "1: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<endl;
// G4cout << "1: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<G4endl;
if(i>nEntries) G4Exception("Skipped some index numbers in G4NeutronHPVector");
if(i==nPoints)
{
nPoints += 50;
// G4cout << "2a: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<endl;
// G4cout << "2a: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<G4endl;
G4NeutronHPDataPoint * buff = new G4NeutronHPDataPoint[nPoints];
// G4cout << "2b: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<endl;
// G4cout << "2b: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<G4endl;
if(nPoints!=50)
{
// G4cout << "copying 1: nEntries="<<nEntries<<" nPoints="<<nPoints<<endl;
// G4cout << "copying 1: nEntries="<<nEntries<<" nPoints="<<nPoints<<G4endl;
for (G4int j=0; j<nEntries; j++) buff[j] = theData[j];
// G4cout << "copying 2"<<endl;
// G4cout << "copying 2"<<G4endl;
delete [] theData;
// G4cout << "3: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<endl;
// G4cout << "3: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<G4endl;
}
theData = buff;
}
if(i==nEntries) nEntries=i+1;
// G4cout << "4: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<endl;
// G4cout << "4: i: "<<i<<" nEntries: "<<nEntries<<" nPoints: "<<nPoints<<G4endl;
}
void G4NeutronHPVector::