Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -31,6 +31,8 @@
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4LorentzRotation.hh"
G4Absorber::G4Absorber(G4double cutOnP)
@@ -208,17 +210,17 @@ G4bool G4Absorber::FindProducts(G4KineticTrack & kt)
G4LorentzVector momCMS = toCMSFrame*momLab;
// Evaluate the final momentum of products
G4double m1 = prod1->GetPDGMass();
G4double m2 = prod2->GetPDGMass();
G4double ms1 = prod1->GetPDGMass();
G4double ms2 = prod2->GetPDGMass();
G4double e0 = momCMS.e();
G4double squareP = (e0*e0*e0*e0-2*e0*e0*(m1*m1+m2*m2)+
(m2*m2-m1*m1)*(m2*m2-m1*m1))/(4*e0*e0);
G4double squareP = (e0*e0*e0*e0-2*e0*e0*(ms1*ms1+ms2*ms2)+
(ms2*ms2-ms1*ms1)*(ms2*ms2-ms1*ms1))/(4*e0*e0);
// if(squareP < 0) // should never happen
// squareP = 0;
G4ThreeVector mom1CMS = GetRandomDirection();
mom1CMS = std::sqrt(squareP)*mom1CMS;
G4LorentzVector final4Mom1CMS(mom1CMS, std::sqrt(squareP+m1*m1));
G4LorentzVector final4Mom2CMS((-1)*mom1CMS, std::sqrt(squareP+m2*m2));
G4LorentzVector final4Mom1CMS(mom1CMS, std::sqrt(squareP+ms1*ms1));
G4LorentzVector final4Mom2CMS((-1)*mom1CMS, std::sqrt(squareP+ms2*ms2));
// Go back to the lab frame
G4LorentzVector mom1 = toLabFrame*final4Mom1CMS;
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4AntiProtonField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -54,26 +57,6 @@ G4AntiProtonField::~G4AntiProtonField()
{ }
const G4AntiProtonField & G4AntiProtonField::operator=(const G4AntiProtonField & )
{
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator= meant not to be accessible");
return *this;
}
G4int G4AntiProtonField::operator==(const G4AntiProtonField & ) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator== meant not to be accessible");
return 0;
}
G4int G4AntiProtonField::operator!=(const G4AntiProtonField & ) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4AntiProtonField::operator!= meant not to be accessible");
return 1;
}
G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -26,18 +26,4 @@
#include "G4FieldPropagation.hh"
#include "G4HadronicException.hh"
const G4FieldPropagation & G4FieldPropagation::operator=(const G4FieldPropagation &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4FieldPropagation::operator= meant to be private");
return *this;
}
int G4FieldPropagation::operator==(const G4FieldPropagation &) const
{
return 1;
}
int G4FieldPropagation::operator!=(const G4FieldPropagation &) const
{
return 0;
}
G4FieldPropagation::~G4FieldPropagation() {}
@@ -23,21 +23,25 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4GeneratorPrecompoundInterface.cc,v 1.11 2010-11-10 17:04:35 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// -----------------------------------------------------------------------------
// GEANT 4 class file
//
// History: first implementation
// HPW, 10DEC 98, the decay part originally written by Gunter Folger
// HPW, 10DEC 98, the decay part originally written by Gunter Folger
// in his FTF-test-program.
//
// M.Kelsey, 28 Jul 2011 -- Replace loop to decay input secondaries
// with new utility class, simplify cleanup loops
// -----------------------------------------------------------------------------
#include <algorithm>
#include <vector>
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4DynamicParticleVector.hh"
#include "G4KineticTrackVector.hh"
#include "G4Proton.hh"
@@ -50,175 +54,202 @@
#include "G4PreCompoundModel.hh"
#include "G4ExcitationHandler.hh"
#include "G4DecayKineticTracks.hh"
#include <algorithm>
#include <vector>
#include "G4HadronicInteractionRegistry.hh"
G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel* p)
: CaptureThreshold(10*MeV)
G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel* preModel)
: CaptureThreshold(10*MeV)
{
proton = G4Proton::Proton();
neutron = G4Neutron::Neutron();
if(p) { SetDeExcitation(p); }
else { SetDeExcitation(new G4PreCompoundModel(new G4ExcitationHandler())); }
proton = G4Proton::Proton();
neutron = G4Neutron::Neutron();
if(preModel) { SetDeExcitation(preModel); }
else {
G4HadronicInteraction* hadi =
G4HadronicInteractionRegistry::Instance()->FindModel("PRECO");
G4VPreCompoundModel* pre = static_cast<G4VPreCompoundModel*>(hadi);
if(!pre) { pre = new G4PreCompoundModel(); }
SetDeExcitation(pre);
}
}
G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface()
{}
{
}
// choose to calculate excitation energy from energy balance
//---------------------------------------------------------------------
// choose to calculate excitation energy from energy balance
#define exactExcitationEnergy
//#define G4GPI_debug_excitation
G4ReactionProductVector* G4GeneratorPrecompoundInterface::
Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
{
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
// decay the strong resonances
G4DecayKineticTracks decay(theSecondaries);
// decay the strong resonances
G4DecayKineticTracks decay(theSecondaries);
// prepare the fragment
G4int anA=theNucleus->GetMassNumber();
G4int aZ=theNucleus->GetCharge();
G4int numberOfEx = 0;
G4int numberOfCh = 0;
G4int numberOfHoles = 0;
G4double exEnergy = 0.0;
G4double R = theNucleus->GetNuclearRadius();
G4ThreeVector exciton3Momentum(0.,0.,0.);
// prepare the fragment
G4int anA=theNucleus->GetMassNumber();
G4int aZ=theNucleus->GetCharge();
G4int numberOfEx = 0;
G4int numberOfCh = 0;
G4int numberOfHoles = 0;
G4double exEnergy = 0.0;
G4double R = theNucleus->GetNuclearRadius();
G4ThreeVector exciton3Momentum(0.,0.,0.);
G4ThreeVector captured3Momentum(0.,0.,0.);
G4ThreeVector wounded3Momentum(0.,0.,0.);
// loop over secondaries
unsigned int amax = theSecondaries->size();
// loop over secondaries
#ifdef exactExcitationEnergy
G4LorentzVector secondary4Momemtum(0,0,0,0);
#endif
for(unsigned int list=0; list<amax; ++list)
{
G4KineticTrack *aTrack = (*theSecondaries)[list];
G4ParticleDefinition* part = aTrack->GetDefinition();
G4double e = aTrack->Get4Momentum().e();
G4double mass = aTrack->Get4Momentum().mag();
G4ThreeVector mom = aTrack->Get4Momentum().vect();
if((part != proton && part != neutron) ||
(e > mass + CaptureThreshold) ||
(aTrack->GetPosition().mag() > R)) {
G4ReactionProduct * theNew = new G4ReactionProduct(part);
theNew->SetMomentum(mom);
theNew->SetTotalEnergy(e);
theTotalResult->push_back(theNew);
G4LorentzVector secondary4Momemtum(0,0,0,0);
#endif
G4KineticTrackVector::iterator iter;
for(iter=theSecondaries->begin(); iter !=theSecondaries->end(); ++iter)
{
G4ParticleDefinition* part = (*iter)->GetDefinition();
G4double e = (*iter)->Get4Momentum().e();
G4double mass = (*iter)->Get4Momentum().mag();
G4ThreeVector mom = (*iter)->Get4Momentum().vect();
if((part != proton && part != neutron) ||
(e > mass + CaptureThreshold) ||
((*iter)->GetPosition().mag() > R)) {
G4ReactionProduct * theNew = new G4ReactionProduct(part);
theNew->SetMomentum(mom);
theNew->SetTotalEnergy(e);
theTotalResult->push_back(theNew);
#ifdef exactExcitationEnergy
secondary4Momemtum += aTrack->Get4Momentum();
#endif
} else {
// within the nucleus, neutron or proton
// now calculate A, Z of the fragment, momentum, number of exciton states
++anA;
++numberOfEx;
G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
aZ += Z;
numberOfCh += Z;
exciton3Momentum += mom;
exEnergy += (e - mass);
}
delete aTrack;
}
delete theSecondaries;
secondary4Momemtum += (*iter)->Get4Momentum();
#endif
} else {
// within the nucleus, neutron or proton
// now calculate A, Z of the fragment, momentum, number of exciton states
++anA;
++numberOfEx;
G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
aZ += Z;
numberOfCh += Z;
captured3Momentum += mom;
exEnergy += (e - mass);
}
delete (*iter);
}
delete theSecondaries;
// loop over wounded nucleus
G4Nucleon * theCurrentNucleon =
theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
while(0 != theCurrentNucleon) {
if(theCurrentNucleon->AreYouHit()) {
++numberOfHoles;
++numberOfEx;
--anA;
aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/eplus + 0.1);
exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
exEnergy += theCurrentNucleon->GetBindingEnergy();
}
theCurrentNucleon = theNucleus->GetNextNucleon();
}
// loop over wounded nucleus
G4Nucleon * theCurrentNucleon =
theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
while(theCurrentNucleon) {
if(theCurrentNucleon->AreYouHit()) {
++numberOfHoles;
++numberOfEx;
--anA;
aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/eplus + 0.1);
wounded3Momentum += theCurrentNucleon->Get4Momentum().vect();
//G4cout << "hit nucleon " << theCurrentNucleon->Get4Momentum() << G4endl;
exEnergy += theCurrentNucleon->GetBindingEnergy();
}
theCurrentNucleon = theNucleus->GetNextNucleon();
}
exciton3Momentum = captured3Momentum - wounded3Momentum;
if(0!=anA && 0!=aZ) {
G4double fMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
#ifdef exactExcitationEnergy
// recalculate exEnergy from Energy balance....
const G4HadProjectile * primary = GetPrimaryProjectile();
G4double Einitial= primary->Get4Momentum().e()
+ G4NucleiProperties::GetNuclearMass(theNucleus->GetMassNumber(),theNucleus->GetCharge());
G4double Efinal = fMass + secondary4Momemtum.e();
if ( (Einitial - Efinal) > 0 ) {
// G4cout << "G4GPI::Propagate() : positive exact excitation Energy "
// << (Einitial - Efinal)/MeV << " MeV, exciton estimate " << exEnergy/MeV << " MeV" << G4endl;
exEnergy=Einitial - Efinal;
}
else {
// G4cout << "G4GeneratorPrecompoundInterface::Propagate() : negative exact excitation Energy "
// << (Einitial - Efinal)/MeV << " MeV, using exciton estimate " << exEnergy/MeV << " MeV" << G4endl;
exEnergy=0.;
}
#endif
fMass += exEnergy;
#ifdef exactExcitationEnergy
G4LorentzVector exciton4Momentum(exciton3Momentum, fMass);
if(anA>0 && aZ>0) {
G4double fMass = G4NucleiProperties::GetNuclearMass(anA, aZ);
#ifdef exactExcitationEnergy
// recalculate exEnergy from Energy balance....
const G4HadProjectile * primary = GetPrimaryProjectile();
G4double Einitial= primary->Get4Momentum().e()
+ G4NucleiProperties::GetNuclearMass(theNucleus->GetMassNumber(),theNucleus->GetCharge());
G4double Efinal = fMass + secondary4Momemtum.e();
if ( (Einitial - Efinal) > 0 ) {
// G4cout << "G4GPI::Propagate() : positive exact excitation Energy "
// << (Einitial - Efinal)/MeV << " MeV, exciton estimate " << exEnergy/MeV << " MeV" << G4endl;
exEnergy=Einitial - Efinal;
}
else {
// G4cout << "G4GeneratorPrecompoundInterface::Propagate() : negative exact excitation Energy "
// << (Einitial - Efinal)/MeV << " MeV, setting excitation to 0 MeV" << G4endl;
exEnergy=0.;
}
#endif
fMass += exEnergy;
G4ThreeVector balance=primary->Get4Momentum().vect() - secondary4Momemtum.vect() - exciton3Momentum;
#ifdef G4GPI_debug_excitation
G4cout << "momentum balance init/final " << balance << " value " << balance.mag() << G4endl
<< "primary / secondaries "<< primary->Get4Momentum() << " / "
<< secondary4Momemtum << " captured/wounded: " << captured3Momentum << " / " << wounded3Momentum
<< " exciton " << exciton3Momentum << G4endl
<< secondary4Momemtum.vect() + exciton3Momentum << G4endl;
#endif
#ifdef exactExcitationEnergy
G4LorentzVector exciton4Momentum(exciton3Momentum, fMass);
#else
G4LorentzVector exciton4Momentum(exciton3Momentum,
std::sqrt(exciton3Momentum.mag2() + fMass*fMass));
#endif
if ( exEnergy > 0.0 ) { // Need to de-excite the remnant nucleus only if excitation energy > 0.
G4Fragment anInitialState(anA, aZ, exciton4Momentum);
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
anInitialState.SetNumberOfCharged(numberOfCh);
anInitialState.SetNumberOfHoles(numberOfHoles);
G4LorentzVector exciton4Momentum(exciton3Momentum,
std::sqrt(exciton3Momentum.mag2() + fMass*fMass));
#endif
if ( exEnergy > 0.0 ) { // Need to de-excite the remnant nucleus only if excitation energy > 0.
G4Fragment anInitialState(anA, aZ, exciton4Momentum);
anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
anInitialState.SetNumberOfCharged(numberOfCh);
anInitialState.SetNumberOfHoles(numberOfHoles);
G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(anInitialState);
G4ReactionProductVector * aPrecoResult = theDeExcitation->DeExcite(anInitialState);
// fill pre-compound part into the result, and return
theTotalResult->insert(theTotalResult->end(),aPrecoResult->begin(),aPrecoResult->end() );
delete aPrecoResult;
// fill pre-compound part into the result, and return
unsigned int amax = aPreResult->size();
for(unsigned int ll=0; ll<amax; ++ll) {
theTotalResult->push_back(aPreResult->operator[](ll));
}
delete aPreResult;
} else { // No excitation energy, we only need to create the remnant nucleus
G4ParticleDefinition* theKindOfFragment = 0;
if (anA == 1 && aZ == 0) {
theKindOfFragment = G4Neutron::NeutronDefinition();
} else if (anA == 1 && aZ == 1) {
theKindOfFragment = G4Proton::ProtonDefinition();
} else if (anA == 2 && aZ == 1) {
theKindOfFragment = G4Deuteron::DeuteronDefinition();
} else if (anA == 3 && aZ == 1) {
theKindOfFragment = G4Triton::TritonDefinition();
} else if (anA == 3 && aZ == 2) {
theKindOfFragment = G4He3::He3Definition();
} else if (anA == 4 && aZ == 2) {
theKindOfFragment = G4Alpha::AlphaDefinition();;
} else {
theKindOfFragment =
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(aZ,anA,0.0);
}
if (theKindOfFragment != 0) {
G4ReactionProduct * theNew = new G4ReactionProduct(theKindOfFragment);
theNew->SetMomentum(exciton3Momentum);
theNew->SetTotalEnergy(fMass);
//theNew->SetFormationTime(??0.??);
theTotalResult->push_back(theNew);
}
}
}
} else { // No/negative excitation energy, we only need to create the remnant nucleus
// energy is not conserved, ignore exciton momentum, i.e. remnant nucleus will be at rest
G4ParticleDefinition* theKindOfFragment = 0;
if (anA == 1 && aZ == 0) {
theKindOfFragment = G4Neutron::NeutronDefinition();
} else if (anA == 1 && aZ == 1) {
theKindOfFragment = G4Proton::ProtonDefinition();
} else if (anA == 2 && aZ == 1) {
theKindOfFragment = G4Deuteron::DeuteronDefinition();
} else if (anA == 3 && aZ == 1) {
theKindOfFragment = G4Triton::TritonDefinition();
} else if (anA == 3 && aZ == 2) {
theKindOfFragment = G4He3::He3Definition();
} else if (anA == 4 && aZ == 2) {
theKindOfFragment = G4Alpha::AlphaDefinition();;
} else {
theKindOfFragment =
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(aZ,anA,0.0);
}
if (theKindOfFragment != 0) {
G4ReactionProduct * theNew = new G4ReactionProduct(theKindOfFragment);
theNew->SetMomentum(G4ThreeVector(0.,0.,0.));
theNew->SetTotalEnergy(fMass);
//theNew->SetFormationTime(??0.??);
theTotalResult->push_back(theNew);
}
}
}
return theTotalResult;
return theTotalResult;
}
G4HadFinalState* G4GeneratorPrecompoundInterface::
ApplyYourself(const G4HadProjectile &, G4Nucleus & )
{
G4cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
<< G4endl;
G4cout << "This class is only a mediator between generator and precompound"<<G4endl;
G4cout << "Please remove from your physics list."<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
return new G4HadFinalState;
G4cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
<< G4endl;
G4cout << "This class is only a mediator between generator and precompound"<<G4endl;
G4cout << "Please remove from your physics list."<<G4endl;
throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
return new G4HadFinalState;
}
void G4GeneratorPrecompoundInterface::PropagateModelDescription(std::ostream& outFile) const
{
outFile << "G4GeneratorPrecompoundInterface interfaces a high\n"
<< "energy model through the wounded nucleus to precompound de-excition.\n"
<< "Low energy protons and neutron present among secondaries produced by \n"
<< "the high energy generator and within the nucleus are captured. The wounded\n"
<< "nucleus and the captured particles form an excited nuclear fragment. This\n"
<< "fragment is passed to the Geant4 pre-compound model for de-excitation.\n"
<< "Nuclear de-excitation:\n";
// preco
}
@@ -39,6 +39,7 @@
#include "G4KM_NucleonEqRhs.hh"
#include "G4VNuclearDensity.hh"
#include "G4PhysicalConstants.hh"
G4KM_NucleonEqRhs::G4KM_NucleonEqRhs(G4KM_DummyField *field,
G4V3DNucleus * nucleus) :
@@ -37,11 +37,11 @@
// -------------------------------------------------------------------
#include "G4KM_OpticalEqRhs.hh"
#include "G4PhysicalConstants.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4HadTmpUtil.hh"
G4KM_OpticalEqRhs::G4KM_OpticalEqRhs(G4KM_DummyField *field,
G4V3DNucleus * nucleus) :
G4Mag_EqRhs(field), theNucleus(nucleus)
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4KaonMinusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -53,28 +56,6 @@ G4KaonMinusField::~G4KaonMinusField()
{ }
const G4KaonMinusField & G4KaonMinusField::operator=(const G4KaonMinusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonMinusField::operator==(const G4KaonMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonMinusField::operator!=(const G4KaonMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonMinusField::operator!= meant not to be accessible");
return 1;
}
G4double G4KaonMinusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4KaonPlusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -52,29 +55,6 @@ G4KaonPlusField::G4KaonPlusField(G4V3DNucleus * nucleus, G4double coeff)
G4KaonPlusField::~G4KaonPlusField()
{ }
const G4KaonPlusField & G4KaonPlusField::operator=(const G4KaonPlusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonPlusField::operator==(const G4KaonPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonPlusField::operator!=(const G4KaonPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonPlusField::operator!= meant not to be accessible");
return 1;
}
G4double G4KaonPlusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,7 +35,9 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4KaonZeroField.hh"
#include "G4PhysicalConstants.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -52,29 +54,6 @@ G4KaonZeroField::G4KaonZeroField(G4V3DNucleus * nucleus, G4double coeff)
G4KaonZeroField::~G4KaonZeroField()
{ }
const G4KaonZeroField & G4KaonZeroField::operator=(const G4KaonZeroField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonZeroField::operator==(const G4KaonZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonZeroField::operator!=(const G4KaonZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4KaonZeroField::operator!= meant not to be accessible");
return 1;
}
G4double G4KaonZeroField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,11 +35,13 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4NeutronField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
G4NeutronField::G4NeutronField(G4V3DNucleus * aNucleus) :
G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
{
@@ -75,28 +77,6 @@ G4NeutronField::G4NeutronField(G4V3DNucleus * aNucleus) :
G4NeutronField::~G4NeutronField()
{ }
const G4NeutronField & G4NeutronField::operator=(const G4NeutronField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator= meant not to be accessible");
return *this;
}
G4int G4NeutronField::operator==(const G4NeutronField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator== meant not to be accessible");
return 0;
}
G4int G4NeutronField::operator!=(const G4NeutronField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4NeutronField::operator!= meant not to be accessible");
return 1;
}
G4double G4NeutronField::GetField(const G4ThreeVector & aPosition)
{
G4double x = aPosition.mag();
@@ -110,8 +90,6 @@ G4double G4NeutronField::GetField(const G4ThreeVector & aPosition)
return -1*(fermiMom*fermiMom)/(2*neutron_mass_c2);
}
G4double G4NeutronField::GetBarrier()
{
/*
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4PionMinusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -52,28 +55,6 @@ G4PionMinusField::G4PionMinusField(G4V3DNucleus * nucleus, G4double coeff)
G4PionMinusField::~G4PionMinusField()
{ }
const G4PionMinusField & G4PionMinusField::operator=(const G4PionMinusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4PionMinusField::operator==(const G4PionMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4PionMinusField::operator!=(const G4PionMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionMinusField::operator!= meant not to be accessible");
return 1;
}
G4double G4PionMinusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,14 +35,16 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4PionPlusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
#include "G4PionPlus.hh"
#include "G4HadTmpUtil.hh"
G4PionPlusField::G4PionPlusField(G4V3DNucleus * nucleus, G4double coeff)
: G4VNuclearField(nucleus)
{
@@ -53,28 +55,6 @@ G4PionPlusField::G4PionPlusField(G4V3DNucleus * nucleus, G4double coeff)
G4PionPlusField::~G4PionPlusField()
{ }
const G4PionPlusField & G4PionPlusField::operator=(const G4PionPlusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4PionPlusField::operator==(const G4PionPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4PionPlusField::operator!=(const G4PionPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionPlusField::operator!= meant not to be accessible");
return 1;
}
G4double G4PionPlusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,14 +35,15 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4PionZeroField.hh"
#include "G4PhysicalConstants.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
#include "G4PionZero.hh"
#include "G4HadTmpUtil.hh"
G4PionZeroField::G4PionZeroField(G4V3DNucleus * nucleus, G4double coeff)
: G4VNuclearField(nucleus)
{
@@ -53,28 +54,6 @@ G4PionZeroField::G4PionZeroField(G4V3DNucleus * nucleus, G4double coeff)
G4PionZeroField::~G4PionZeroField()
{ }
const G4PionZeroField & G4PionZeroField::operator=(const G4PionZeroField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4PionZeroField::operator==(const G4PionZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4PionZeroField::operator!=(const G4PionZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4PionZeroField::operator!= meant not to be accessible");
return 1;
}
G4double G4PionZeroField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4ProtonField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
#include "G4V3DNucleus.hh"
@@ -77,28 +80,6 @@ G4ProtonField::G4ProtonField(G4V3DNucleus * aNucleus) :
G4ProtonField::~G4ProtonField()
{ }
const G4ProtonField & G4ProtonField::operator=(const G4ProtonField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator= meant not to be accessible");
return *this;
}
G4int G4ProtonField::operator==(const G4ProtonField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator== meant not to be accessible");
return 0;
}
G4int G4ProtonField::operator!=(const G4ProtonField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4ProtonField::operator!= meant not to be accessible");
return 1;
}
G4double G4ProtonField::GetField(const G4ThreeVector & aPosition)
{
//G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
@@ -115,8 +96,6 @@ G4double G4ProtonField::GetField(const G4ThreeVector & aPosition)
return y;
}
G4double G4ProtonField::GetBarrier()
{
G4double coulombBarrier = (1.44/1.14) * MeV * theZ / (1.0 + std::pow(theA,1./3.));
@@ -128,5 +107,3 @@ G4double G4ProtonField::GetBarrier()
*/
return bindingEnergy/theA+coulombBarrier;
}
@@ -25,6 +25,8 @@
//
// G4RKFieldIntegrator
#include "G4RKFieldIntegrator.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4FermiMomentum.hh"
#include "G4NuclearFermiDensity.hh"
@@ -64,8 +66,7 @@ G4double G4RKFieldIntegrator::CalculateTotalEnergy(const G4KineticTrackVector& B
for(G4int c2 = c1 + 1; c2 < nBarion; c2++)
{
G4KineticTrack* p2 = Barions.operator[](c2);
G4ThreeVector rv = p1->GetPosition() - p2->GetPosition();
G4double r12 = std::sqrt(rv*rv)*fermi;
G4double r12 = (p1->GetPosition() - p2->GetPosition()).mag()*fermi;
// Esk2
Etot += t1*std::pow(Alpha/pi, 3/2)*std::exp(-Alpha*r12*r12);
@@ -84,8 +85,7 @@ G4double G4RKFieldIntegrator::CalculateTotalEnergy(const G4KineticTrackVector& B
for(G4int c3 = c2 + 1; c3 < nBarion; c3++)
{
G4KineticTrack* p3 = Barions.operator[](c3);
G4ThreeVector rv = p1->GetPosition() - p3->GetPosition();
G4double r13 = std::sqrt(rv*rv)*fermi;
G4double r13 = (p1->GetPosition() - p3->GetPosition()).mag()*fermi;
// Esk3
Etot = tGamma*std::pow(4*Alpha*Alpha/3/pi/pi, 1.5)*std::exp(-Alpha*(r12*r12 + r13*r13));
File diff suppressed because it is too large Load Diff
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4SigmaMinusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -51,29 +54,6 @@ G4SigmaMinusField::G4SigmaMinusField(G4V3DNucleus * nucleus, G4double coeff)
G4SigmaMinusField::~G4SigmaMinusField()
{ }
const G4SigmaMinusField & G4SigmaMinusField::operator=(const G4SigmaMinusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaMinusField::operator==(const G4SigmaMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaMinusField::operator!=(const G4SigmaMinusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaMinusField::operator!= meant not to be accessible");
return 1;
}
G4double G4SigmaMinusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -93,7 +73,6 @@ G4double G4SigmaMinusField::GetField(const G4ThreeVector & aPosition)
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
}
G4double G4SigmaMinusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
@@ -35,7 +35,10 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4SigmaPlusField.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -52,29 +55,6 @@ G4SigmaPlusField::G4SigmaPlusField(G4V3DNucleus * nucleus, G4double coeff)
G4SigmaPlusField::~G4SigmaPlusField()
{ }
const G4SigmaPlusField & G4SigmaPlusField::operator=(const G4SigmaPlusField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaPlusField::operator==(const G4SigmaPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaPlusField::operator!=(const G4SigmaPlusField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaPlusField::operator!= meant not to be accessible");
return 1;
}
G4double G4SigmaPlusField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -94,7 +74,6 @@ G4double G4SigmaPlusField::GetField(const G4ThreeVector & aPosition)
return -2.*pi*hbarc*hbarc/reducedMass*(2.0)*theCoeff*density+GetBarrier();
}
G4double G4SigmaPlusField::GetBarrier()
{
G4double A = theNucleus->GetMassNumber();
@@ -35,7 +35,9 @@
//
// Creation date: 5 June 2000
// -------------------------------------------------------------------
#include "G4SigmaZeroField.hh"
#include "G4PhysicalConstants.hh"
#include "G4NucleiProperties.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
@@ -48,33 +50,9 @@ G4SigmaZeroField::G4SigmaZeroField(G4V3DNucleus * nucleus, G4double coeff)
theCoeff = coeff;
}
G4SigmaZeroField::~G4SigmaZeroField()
{ }
const G4SigmaZeroField & G4SigmaZeroField::operator=(const G4SigmaZeroField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaZeroField::operator==(const G4SigmaZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaZeroField::operator!=(const G4SigmaZeroField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4SigmaZeroField::operator!= meant not to be accessible");
return 1;
}
G4double G4SigmaZeroField::GetField(const G4ThreeVector & aPosition)
{
// Field is 0 out of the nucleus!
@@ -47,30 +47,3 @@ G4VFieldPropagation::G4VFieldPropagation(const G4VFieldPropagation &)
G4VFieldPropagation::~G4VFieldPropagation()
{ }
const G4VFieldPropagation & G4VFieldPropagation::operator=(const G4VFieldPropagation &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator= meant not to be accessible");
return *this;
}
G4int G4VFieldPropagation::operator==(const G4VFieldPropagation &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator== meant not to be accessible");
return 0;
}
G4int G4VFieldPropagation::operator!=(const G4VFieldPropagation &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4VFieldPropagation::operator!= meant not to be accessible");
return 1;
}
@@ -37,46 +37,17 @@
// -------------------------------------------------------------------
#include "G4VNuclearField.hh"
#include "globals.hh"
#include "G4SystemOfUnits.hh"
G4VNuclearField::G4VNuclearField(G4V3DNucleus * aNucleus) :
theNucleus(aNucleus),
radius(aNucleus->GetOuterRadius() + 4*fermi)
{
}
{}
G4VNuclearField::G4VNuclearField(const G4VNuclearField &right) :
theNucleus(right.theNucleus),
radius(right.radius)
{
}
{}
G4VNuclearField::~G4VNuclearField()
{
}
const G4VNuclearField & G4VNuclearField::operator=(const G4VNuclearField &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator= meant not to be accessible");
return *this;
}
G4int G4VNuclearField::operator==(const G4VNuclearField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator== meant not to be accessible");
return 0;
}
G4int G4VNuclearField::operator!=(const G4VNuclearField &) const
{
throw G4HadronicException(__FILE__, __LINE__, "G4VNuclearField::operator!= meant not to be accessible");
return 1;
}
{}