Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
G4InterpolationScheme G4InterpolationManager::MakeScheme(G4int it)
|
||||
{
|
||||
G4InterpolationScheme result;
|
||||
G4InterpolationScheme result(LINLIN);
|
||||
switch(it)
|
||||
{
|
||||
case 1:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
{
|
||||
if(anEnergy<theDistFunc[i].GetLabel()) break; // that is the energy we need
|
||||
}
|
||||
G4int low, high;
|
||||
G4int low(0), high(0);
|
||||
if(i==nDistFunc)
|
||||
{
|
||||
low = i-2;
|
||||
|
||||
@@ -93,7 +93,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
G4double theA = anE->GetN();
|
||||
G4double theZ = anE->GetZ();
|
||||
G4double eleMass;
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(theZ+eps, theA+eps)-
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))-
|
||||
theZ*G4Electron::ElectronDefinition()->GetPDGMass()
|
||||
) / G4Neutron::Neutron()->GetPDGMass();
|
||||
|
||||
@@ -116,9 +116,9 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
boosted.Lorentz(theNeutron, aThermalNuc);
|
||||
G4double theEkin = boosted.GetKineticEnergy();
|
||||
aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);
|
||||
// velocity correction.
|
||||
// velocity correction, or luminosity factor...
|
||||
G4ThreeVector targetVelocity = 1./aThermalNuc.GetMass()*aThermalNuc.GetMomentum();
|
||||
aXsection *= (targetVelocity+neutronVelocity).mag()/neutronVMag;
|
||||
aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;
|
||||
result += aXsection;
|
||||
}
|
||||
size += size;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
G4Nucleus aNucleus;
|
||||
G4double eps = 0.0001;
|
||||
if(targetMass<500*MeV)
|
||||
targetMass = ( G4NucleiPropertiesTable::GetAtomicMass(theBaseZ+eps, theBaseA+eps)-
|
||||
targetMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))-
|
||||
theBaseZ* G4Electron::Electron()->GetPDGMass() ) /
|
||||
G4Neutron::Neutron()->GetPDGMass();
|
||||
G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
|
||||
@@ -72,7 +72,7 @@
|
||||
{
|
||||
G4ThreeVector aCMSMomentum = theNeutron.GetMomentum()+theTarget.GetMomentum();
|
||||
G4LorentzVector p4(aCMSMomentum, theTarget.GetTotalEnergy() + theNeutron.GetTotalEnergy());
|
||||
G4Fragment nucleus(theBaseA+1, theBaseZ ,p4);
|
||||
G4Fragment nucleus(static_cast<G4int>(theBaseA+1), static_cast<G4int>(theBaseZ) ,p4);
|
||||
G4PhotonEvaporation photonEvaporation;
|
||||
G4FragmentVector* products = photonEvaporation.BreakItUp(nucleus);
|
||||
G4FragmentVector::iterator i;
|
||||
@@ -84,7 +84,7 @@
|
||||
G4ParticleTable* theTable = G4ParticleTable::GetParticleTable();
|
||||
if((*i)->GetMomentum().mag() > 10*MeV)
|
||||
theOne->SetDefinition(
|
||||
theTable->FindIon(theBaseZ, theBaseA+1, 0, theBaseZ) );
|
||||
theTable->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ)) );
|
||||
theOne->SetMomentum( (*i)->GetMomentum().vect() ) ;
|
||||
theOne->SetTotalEnergy( (*i)->GetMomentum().t() );
|
||||
thePhotons->push_back(theOne);
|
||||
@@ -112,7 +112,7 @@
|
||||
{
|
||||
G4DynamicParticle * theOne = new G4DynamicParticle;
|
||||
G4ParticleDefinition * aRecoil = G4ParticleTable::GetParticleTable()
|
||||
->FindIon(theBaseZ, theBaseA+1, 0, theBaseZ);
|
||||
->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0, static_cast<G4int>(theBaseZ));
|
||||
theOne->SetDefinition(aRecoil);
|
||||
// Now energy;
|
||||
// Can be done slightly better @
|
||||
@@ -151,7 +151,7 @@
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, tString, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), dirName, tString, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
theBaseA = A;
|
||||
theBaseZ = G4int(Z+.5);
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
G4NeutronHPThermalBoost aThermalE;
|
||||
G4int i, ii;
|
||||
// decide on the isotope
|
||||
G4int numberOfIsos;
|
||||
G4int numberOfIsos(0);
|
||||
for(ii=0; ii<nChannels; ii++)
|
||||
{
|
||||
numberOfIsos = theChannels[ii]->GetNiso();
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
{
|
||||
result->SetDefinition(G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z));
|
||||
}
|
||||
G4int i;
|
||||
G4int it;
|
||||
G4double fsEnergy;
|
||||
G4double cosTh;
|
||||
G4int i(0);
|
||||
G4int it(0);
|
||||
G4double fsEnergy(0);
|
||||
G4double cosTh(0);
|
||||
if(angularRep==1)
|
||||
{
|
||||
G4double random = G4UniformRand();
|
||||
@@ -205,7 +205,7 @@
|
||||
// cash the mean energy in this distribution
|
||||
currentMeanEnergy = weighted/running[nEnergies-1];
|
||||
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
G4double randkal = G4UniformRand();
|
||||
for(i=0; i<nEnergies; i++)
|
||||
{
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
G4ReactionProduct * G4NeutronHPContEnergyAngular::Sample(G4double anEnergy, G4double massCode, G4double mass)
|
||||
{
|
||||
G4ReactionProduct * result;
|
||||
G4int i;
|
||||
G4int it;
|
||||
G4int i(0);
|
||||
G4int it(0);
|
||||
for(i=0;i<nEnergy;i++)
|
||||
{
|
||||
it = i;
|
||||
@@ -68,7 +68,7 @@ G4ReactionProduct * G4NeutronHPContEnergyAngular::Sample(G4double anEnergy, G4do
|
||||
G4double G4NeutronHPContEnergyAngular::
|
||||
MeanEnergyOfThisInteraction()
|
||||
{
|
||||
G4double result;
|
||||
G4double result(0);
|
||||
if(currentMeanEnergy<-1)
|
||||
{
|
||||
G4Exception("G4NeutronHPContEnergyAngular: Logical error in Product class");
|
||||
|
||||
@@ -77,8 +77,8 @@ G4ReactionProduct * G4NeutronHPDiscreteTwoBody::Sample(G4double anEnergy, G4doub
|
||||
}
|
||||
|
||||
// get cosine(theta)
|
||||
G4int i, it;
|
||||
G4double cosTh;
|
||||
G4int i(0), it(0);
|
||||
G4double cosTh(0);
|
||||
for(i=0; i<nEnergy; i++)
|
||||
{
|
||||
it = i;
|
||||
|
||||
@@ -96,7 +96,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
G4double theA = anE->GetN();
|
||||
G4double theZ = anE->GetZ();
|
||||
G4double eleMass;
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(theZ+eps, theA+eps)-
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))-
|
||||
theZ*G4Electron::ElectronDefinition()->GetPDGMass()
|
||||
) / G4Neutron::Neutron()->GetPDGMass();
|
||||
|
||||
@@ -121,7 +121,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);
|
||||
// velocity correction.
|
||||
G4ThreeVector targetVelocity = 1./aThermalNuc.GetMass()*aThermalNuc.GetMomentum();
|
||||
aXsection *= (targetVelocity+neutronVelocity).mag()/neutronVMag;
|
||||
aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;
|
||||
result += aXsection;
|
||||
}
|
||||
size += size;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, tString, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), dirName, tString, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
theBaseA = aFile.GetA();
|
||||
theBaseZ = aFile.GetZ();
|
||||
@@ -274,7 +274,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
theRecoil->SetDefinition(G4ParticleTable::GetParticleTable()->FindIon(theBaseZ, theBaseA, 0, theBaseZ));
|
||||
theRecoil->SetDefinition(G4ParticleTable::GetParticleTable()
|
||||
->FindIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA), 0, static_cast<G4int>(theBaseZ)));
|
||||
}
|
||||
theRecoil->SetMomentum(theTarget.GetMomentum());
|
||||
theResult.SetNumberOfSecondaries(1);
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{
|
||||
G4int count = theElement->GetNumberOfIsotopes();
|
||||
if(count == 0) count +=
|
||||
theStableOnes.GetNumberOfIsotopes(theElement->GetZ());
|
||||
theStableOnes.GetNumberOfIsotopes(static_cast<G4int>(theElement->GetZ()));
|
||||
theIsotopeWiseData = new G4NeutronHPIsoData[count];
|
||||
// filename = ein data-set je isotope.
|
||||
count = 0;
|
||||
@@ -70,7 +70,7 @@
|
||||
G4int first = theStableOnes.GetFirstIsotope(Z);
|
||||
// G4cout <<"first="<<first<<" "<<theStableOnes.GetNumberOfIsotopes(theElement->GetZ())<<G4endl;
|
||||
for(G4int i1=0;
|
||||
i1<theStableOnes.GetNumberOfIsotopes(theElement->GetZ());
|
||||
i1<theStableOnes.GetNumberOfIsotopes(static_cast<G4int>(theElement->GetZ()) );
|
||||
i1++)
|
||||
{
|
||||
// G4cout <<" Init: theStableOnes in the loop"<<G4endl;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
{
|
||||
G4String tString = "/FS/";
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, tString, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), dirName, tString, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
if(!dbool)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
{
|
||||
G4String tString = dirName;
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, tString, bit, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), tString, bit, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
theBaseA = aFile.GetA();
|
||||
theBaseZ = aFile.GetZ();
|
||||
|
||||
@@ -95,7 +95,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
G4double theA = anE->GetN();
|
||||
G4double theZ = anE->GetZ();
|
||||
G4double eleMass;
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(theZ+eps, theA+eps)-
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))-
|
||||
theZ*G4Electron::ElectronDefinition()->GetPDGMass()
|
||||
) / G4Neutron::Neutron()->GetPDGMass();
|
||||
|
||||
@@ -120,7 +120,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);
|
||||
// velocity correction.
|
||||
G4ThreeVector targetVelocity = 1./aThermalNuc.GetMass()*aThermalNuc.GetMomentum();
|
||||
aXsection *= (targetVelocity+neutronVelocity).mag()/neutronVMag;
|
||||
aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;
|
||||
result += aXsection;
|
||||
}
|
||||
size += size;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4NeutronHPInelastic.cc,v 1.12 2001/10/19 11:54:51 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#include "G4NeutronHPInelastic.hh"
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ void G4NeutronHPInelasticBaseFS::InitGammas(G4double AR, G4double ZR)
|
||||
|
||||
G4double eps = 0.001;
|
||||
theNuclearMassDifference =
|
||||
G4NucleiPropertiesTable::GetBindingEnergy(ZR+eps,AR+eps) -
|
||||
G4NucleiPropertiesTable::GetBindingEnergy(theBaseZ+eps, theBaseA+eps);
|
||||
G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(ZR+eps),static_cast<G4int>(AR+eps)) -
|
||||
G4NucleiPropertiesTable::GetBindingEnergy(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps));
|
||||
theGammas.Init(theGammaData);
|
||||
delete aName;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ void G4NeutronHPInelasticBaseFS::Init (G4double A, G4double Z, G4String & dirNam
|
||||
gammaPath = tBase+gammaPath;
|
||||
G4String tString = dirName;
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, tString, bit, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), tString, bit, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
theBaseA = aFile.GetA();
|
||||
theBaseZ = aFile.GetZ();
|
||||
@@ -167,7 +167,7 @@ void G4NeutronHPInelasticBaseFS::BaseApply(const G4Track & theTrack,
|
||||
// prepare target
|
||||
G4double targetMass;
|
||||
G4double eps = 0.0001;
|
||||
targetMass = ( G4NucleiPropertiesTable::GetAtomicMass(theBaseZ+eps, theBaseA+eps)-
|
||||
targetMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))-
|
||||
theBaseZ*G4Electron::ElectronDefinition()->GetPDGMass() ) /
|
||||
G4Neutron::Neutron()->GetPDGMass();
|
||||
if(theEnergyAngData!=NULL)
|
||||
|
||||
@@ -60,7 +60,7 @@ void G4NeutronHPInelasticCompFS::Init (G4double A, G4double Z, G4String & dirNam
|
||||
gammaPath = tBase+gammaPath;
|
||||
G4String tString = dirName;
|
||||
G4bool dbool;
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, tString, aFSType, dbool);
|
||||
G4NeutronHPDataUsed aFile = theNames.GetName(static_cast<G4int>(A), static_cast<G4int>(Z), tString, aFSType, dbool);
|
||||
G4String filename = aFile.GetName();
|
||||
theBaseA = aFile.GetA();
|
||||
theBaseZ = aFile.GetZ();
|
||||
@@ -192,7 +192,7 @@ void G4NeutronHPInelasticCompFS::CompositeApply(const G4Track & theTrack, G4Part
|
||||
for(i=0; i<50; i++) if(theXsection[i] != NULL) break;
|
||||
G4double targetMass=0;
|
||||
G4double eps = 0.0001;
|
||||
targetMass = ( G4NucleiPropertiesTable::GetNuclearMass(theBaseZ+eps, theBaseA+eps)) /
|
||||
targetMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(theBaseZ+eps), static_cast<G4int>(theBaseA+eps))) /
|
||||
G4Neutron::Neutron()->GetPDGMass();
|
||||
// if(theEnergyAngData[i]!=NULL)
|
||||
// targetMass = theEnergyAngData[i]->GetTargetMass();
|
||||
@@ -209,7 +209,7 @@ void G4NeutronHPInelasticCompFS::CompositeApply(const G4Track & theTrack, G4Part
|
||||
G4double residualMass=0;
|
||||
G4double residualZ = theBaseZ - aDefinition->GetPDGCharge();
|
||||
G4double residualA = theBaseA - aDefinition->GetBaryonNumber()+1;
|
||||
residualMass = ( G4NucleiPropertiesTable::GetNuclearMass(residualZ+eps, residualA+eps) ) /
|
||||
residualMass = ( G4NucleiPropertiesTable::GetNuclearMass(static_cast<G4int>(residualZ+eps), static_cast<G4int>(residualA+eps)) ) /
|
||||
G4Neutron::Neutron()->GetPDGMass();
|
||||
|
||||
// prepare energy in target rest frame
|
||||
@@ -451,7 +451,8 @@ void G4NeutronHPInelasticCompFS::CompositeApply(const G4Track & theTrack, G4Part
|
||||
|
||||
aHadron.Lorentz(aHadron, theTarget);
|
||||
G4ReactionProduct theResidual;
|
||||
theResidual.SetDefinition(G4ParticleTable::GetParticleTable()->GetIon(residualZ, residualA, 0));
|
||||
theResidual.SetDefinition(G4ParticleTable::GetParticleTable()
|
||||
->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0));
|
||||
theResidual.SetKineticEnergy(aHadron.GetKineticEnergy()*aHadron.GetMass()/theResidual.GetMass());
|
||||
theResidual.SetMomentum(-1.*aHadron.GetMomentum());
|
||||
theResidual.Lorentz(theResidual, -1.*theTarget);
|
||||
@@ -482,7 +483,8 @@ void G4NeutronHPInelasticCompFS::CompositeApply(const G4Track & theTrack, G4Part
|
||||
if(needsSeparateRecoil && residualZ!=0)
|
||||
{
|
||||
G4ReactionProduct theResidual;
|
||||
theResidual.SetDefinition(G4ParticleTable::GetParticleTable()->GetIon(residualZ, residualA, 0));
|
||||
theResidual.SetDefinition(G4ParticleTable::GetParticleTable()
|
||||
->GetIon(static_cast<G4int>(residualZ), static_cast<G4int>(residualA), 0));
|
||||
G4double resiualKineticEnergy = theResidual.GetMass()*theResidual.GetMass();
|
||||
resiualKineticEnergy += totalMomentum*totalMomentum;
|
||||
resiualKineticEnergy = sqrt(resiualKineticEnergy) - theResidual.GetMass();
|
||||
|
||||
@@ -93,7 +93,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
G4double theA = anE->GetN();
|
||||
G4double theZ = anE->GetZ();
|
||||
G4double eleMass;
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(theZ+eps, theA+eps)-
|
||||
eleMass = ( G4NucleiPropertiesTable::GetAtomicMass(static_cast<G4int>(theZ+eps), static_cast<G4int>(theA+eps))-
|
||||
theZ*G4Electron::ElectronDefinition()->GetPDGMass()
|
||||
) / G4Neutron::Neutron()->GetPDGMass();
|
||||
|
||||
@@ -118,7 +118,7 @@ GetCrossSection(const G4DynamicParticle* aP, const G4Element*anE, G4double aT)
|
||||
aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);
|
||||
// velocity correction.
|
||||
G4ThreeVector targetVelocity = 1./aThermalNuc.GetMass()*aThermalNuc.GetMomentum();
|
||||
aXsection *= (targetVelocity+neutronVelocity).mag()/neutronVMag;
|
||||
aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;
|
||||
result += aXsection;
|
||||
}
|
||||
size += size;
|
||||
|
||||
@@ -93,7 +93,7 @@ G4double G4NeutronHPKallbachMannSyst::A(G4double anEnergy)
|
||||
G4double R3 = G4std::min(ea, Et3);
|
||||
G4double X3 = R3*eb/ea;
|
||||
G4double Ma = 1;
|
||||
G4double mb;
|
||||
G4double mb(0);
|
||||
G4int productA = theTargetA+1-theResidualA;
|
||||
G4int productZ = theTargetZ-theResidualZ;
|
||||
if(productZ==0)
|
||||
@@ -129,7 +129,7 @@ G4double G4NeutronHPKallbachMannSyst::SeparationEnergy(G4int Ac, G4int Nc, G4int
|
||||
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 += 1.211*(Zc*Zc/Ac-ZA*ZA/AA);
|
||||
G4double totalBinding;
|
||||
G4double totalBinding(0);
|
||||
G4int productA = theTargetA+1-theResidualA;
|
||||
G4int productZ = theTargetZ-theResidualZ;
|
||||
if(productZ==0&&productA==1) totalBinding=0;
|
||||
|
||||
@@ -102,7 +102,7 @@ G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4dou
|
||||
|
||||
// get theta, E
|
||||
G4double cosTh, secEnergy;
|
||||
G4int i, it;
|
||||
G4int i, it(0);
|
||||
// find the energy bin
|
||||
for(i=0; i<nEnergies; i++)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4dou
|
||||
running[i]+=theData[it][i].GetIntegral(); // Does interpolated integral.
|
||||
}
|
||||
G4double random = running[nCosTh[it]-1]*G4UniformRand();
|
||||
G4int ith;
|
||||
G4int ith(0);
|
||||
for(i=0;i<nCosTh[it]; i++)
|
||||
{
|
||||
ith = i;
|
||||
@@ -221,7 +221,7 @@ G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4dou
|
||||
theThVec.Merge(&thBuff1 ,&thBuff2); // takes care of interpolation
|
||||
G4double random = (theThVec.GetY(theThVec.GetVectorLength()-1)
|
||||
-theThVec.GetY(0)) *G4UniformRand();
|
||||
G4int ith;
|
||||
G4int ith(0);
|
||||
for(i=1;i<theThVec.GetVectorLength(); i++)
|
||||
{
|
||||
ith = i;
|
||||
@@ -238,7 +238,7 @@ G4ReactionProduct * G4NeutronHPLabAngularEnergy::Sample(G4double anEnergy, G4dou
|
||||
cosTh = theInt.Interpolate(theSecondManager[it].GetScheme(ith),
|
||||
x, x1,x2,y1,y2);
|
||||
}
|
||||
G4int i1, i2;
|
||||
G4int i1(0), i2(0);
|
||||
// get the indixes of the vectors close to theta for low energy
|
||||
// first it-1 !!!! i.e. low in energy
|
||||
for(i=0; i<nCosTh[it-1]; i++)
|
||||
|
||||
@@ -36,7 +36,7 @@ G4double G4NeutronHPLegendreStore::SampleMax (G4double anEnergy)
|
||||
G4double result;
|
||||
|
||||
G4int i0;
|
||||
G4int low, high;
|
||||
G4int low(0), high(0);
|
||||
G4NeutronHPFastLegendre theLeg;
|
||||
for (i0=0; i0<nEnergy; i0++)
|
||||
{
|
||||
@@ -165,7 +165,7 @@ G4double G4NeutronHPLegendreStore::SampleElastic (G4double anEnergy)
|
||||
G4double G4NeutronHPLegendreStore::Sample (G4double energy) // still in interpolation; do not use
|
||||
{
|
||||
G4int i0;
|
||||
G4int low, high;
|
||||
G4int low(0), high(0);
|
||||
// G4cout << "G4NeutronHPLegendreStore::Sample "<<energy<<" "<<energy<<" "<<nEnergy<<G4endl;
|
||||
for (i0=0; i0<nEnergy; i0++)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
running[i]+=theGammas[i]->GetWeight();
|
||||
}
|
||||
sum = running[nGammas-1];
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
G4double random = G4UniformRand();
|
||||
for(i=0; i<nGammas; i++)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.6 2001/10/04 20:00:38 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4NeutronHPNBodyPhaseSpace.cc,v 1.7 2002/06/07 15:30:57 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#include "G4NeutronHPNBodyPhaseSpace.hh"
|
||||
#include "G4Gamma.hh"
|
||||
@@ -81,7 +81,7 @@ G4ReactionProduct * G4NeutronHPNBodyPhaseSpace::Sample(G4double anEnergy, G4doub
|
||||
// P = Cn*sqrt(E')*(Emax-E')**(3*n/2-4)
|
||||
G4double maxE = GetEmax(anEnergy, result->GetMass());
|
||||
G4double energy;
|
||||
G4double max;
|
||||
G4double max(0);
|
||||
if(theTotalCount<=3)
|
||||
{
|
||||
max = maxE/2.;
|
||||
|
||||
@@ -296,7 +296,7 @@ G4ReactionProductVector * G4NeutronHPPhotonDist::GetPhotons(G4double anEnergy)
|
||||
else if(tabulationType==1)
|
||||
{
|
||||
// legendre polynomials
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
for (iii=0; iii<nNeu[ii-nIso]; iii++) // find the neutron energy
|
||||
{
|
||||
it = iii;
|
||||
@@ -317,7 +317,7 @@ G4ReactionProductVector * G4NeutronHPPhotonDist::GetPhotons(G4double anEnergy)
|
||||
else
|
||||
{
|
||||
// tabulation of probabilities.
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
for (iii=0; iii<nNeu[ii-nIso]; iii++) // find the neutron energy
|
||||
{
|
||||
it = iii;
|
||||
@@ -392,7 +392,7 @@ G4ReactionProductVector * G4NeutronHPPhotonDist::GetPhotons(G4double anEnergy)
|
||||
else if(tabulationType==1)
|
||||
{
|
||||
// legendre polynomials
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
for (iii=0; iii<nNeu[ii-nIso]; iii++) // find the neutron energy
|
||||
{
|
||||
it = iii;
|
||||
@@ -413,7 +413,7 @@ G4ReactionProductVector * G4NeutronHPPhotonDist::GetPhotons(G4double anEnergy)
|
||||
else
|
||||
{
|
||||
// tabulation of probabilities.
|
||||
G4int it;
|
||||
G4int it(0);
|
||||
for (iii=0; iii<nNeu[ii-nIso]; iii++) // find the neutron energy
|
||||
{
|
||||
it = iii;
|
||||
|
||||
@@ -412,7 +412,6 @@
|
||||
G4int i;
|
||||
G4double x = 0.5;
|
||||
result = theData[GetVectorLength()-1].GetX();
|
||||
G4NeutronHPInterpolator theLin;
|
||||
for(i=0;i<GetVectorLength();i++)
|
||||
{
|
||||
if(theIntegral[i]/theIntegral[GetVectorLength()-1]>x)
|
||||
|
||||
Reference in New Issue
Block a user