Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
@@ -84,7 +84,7 @@ G4bool G4Absorber::FindAbsorbers(G4KineticTrack & kt,
G4double charge0 = kt.GetDefinition()->GetPDGCharge();
G4ThreeVector pos = kt.GetPosition();
G4std::vector<G4KineticTrack *>::iterator iter;
std::vector<G4KineticTrack *>::iterator iter;
for(iter = tgt.begin(); iter != tgt.end(); ++iter)
{
G4KineticTrack * curr = *iter;
@@ -50,21 +50,21 @@ G4AntiProtonField::~G4AntiProtonField()
{ }
const G4AntiProtonField & G4AntiProtonField::operator=(const G4AntiProtonField & right)
const G4AntiProtonField & G4AntiProtonField::operator=(const G4AntiProtonField & )
{
G4Exception("G4AntiProtonField::operator= meant not to be accessible");
return *this;
}
G4int G4AntiProtonField::operator==(const G4AntiProtonField & right) const
G4int G4AntiProtonField::operator==(const G4AntiProtonField & ) const
{
G4Exception("G4AntiProtonField::operator== meant not to be accessible");
return 0;
}
G4int G4AntiProtonField::operator!=(const G4AntiProtonField & right) const
G4int G4AntiProtonField::operator!=(const G4AntiProtonField & ) const
{
G4Exception("G4AntiProtonField::operator!= meant not to be accessible");
return 1;
@@ -80,9 +80,9 @@ G4double G4AntiProtonField::GetField(const G4ThreeVector & aPosition)
G4ParticleDefinition *anAntiProton = G4AntiProton::AntiProtonDefinition();
G4double antiProtonMass = anAntiProton->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(G4int(Z), G4int(A));
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = antiProtonMass*nucleusMass/(antiProtonMass+nucleusMass);
@@ -48,7 +48,7 @@
#include "G4PreCompoundModel.hh"
#include "G4ExcitationHandler.hh"
#include "g4std/algorithm"
#include <algorithm>
#include "G4ShortLivedConstructor.hh"
//
// C O N S T R U C T O R S A N D D E S T R U C T O R S
@@ -78,7 +78,7 @@ G4BinaryCascade::G4BinaryCascade() : G4VIntraNuclearTransportModel()
}
G4BinaryCascade::G4BinaryCascade(const G4BinaryCascade& right)
G4BinaryCascade::G4BinaryCascade(const G4BinaryCascade& ) : G4VIntraNuclearTransportModel()
{
}
@@ -239,7 +239,8 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
ClearAndDestroy(&theSecondaryList);
ClearAndDestroy(&theProjectileList);
ClearAndDestroy(&theFinalState);
G4std::vector<G4KineticTrack *>::iterator iter, jter;
std::vector<G4KineticTrack *>::iterator iter, jter;
G4int trialcount(0);
if(nucleus->GetMassNumber() == 1) // 1H1 is special case
{
G4ParticleDefinition * aHTarg = G4Proton::ProtonDefinition();
@@ -252,14 +253,15 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
// G4cout << "the lovely "<< mom << " "<<aHTarg->GetPDGMass()<<G4endl;
G4KineticTrack aTarget(aHTarg, 0., pos, mom);
G4bool done(false);
while(!done)
while(!done && trialcount<1000)
{
if(secs)
{
G4std::for_each(secs->begin(), secs->end(), DeleteKineticTrack());
std::for_each(secs->begin(), secs->end(), DeleteKineticTrack());
delete secs;
}
secs = theScatterer->Scatter(*(*secondaries).front(), aTarget);
trialcount++;
for(size_t ss=0; secs && ss<secs->size(); ss++)
{
if((*secs)[ss]->GetDefinition()->IsShortLived()) done = true;
@@ -420,7 +422,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4int nsec=0;
G4double minTimeStep = 1.e-12*ns; // about 30*fermi/(0.1*c_light);1.e-12*ns
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
for(i = theSecondaryList.begin(); i != theSecondaryList.end(); ++i)
{
G4KineticTrack * kt = *i;
@@ -489,7 +491,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
#endif
// add left secondaries to FinalSate
G4std::vector<G4KineticTrack *>::iterator iter;
std::vector<G4KineticTrack *>::iterator iter;
for ( iter =theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
{
theFinalState.push_back(*iter);
@@ -513,7 +515,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
if ( counter > 100 && theCollisionMgr->Entries() == 0) // no collision, and stepping a while....
{
#ifdef debug_1_KineticCascade
PrintKTVector(&theSecondaryList,G4std::string("stepping 100 steps"));
PrintKTVector(&theSecondaryList,std::string("stepping 100 steps"));
#endif
FindCollisions(&theSecondaryList);
counter=0;
@@ -532,7 +534,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
G4cerr << "G4BinaryCascade: Warning, have active particles at end" << G4endl;
#endif
// add left secondaries to FinalSate
G4std::vector<G4KineticTrack *>::iterator iter;
std::vector<G4KineticTrack *>::iterator iter;
for ( iter =theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
{
theFinalState.push_back(*iter);
@@ -594,8 +596,8 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
#ifdef debug_G4BinaryCascade
G4cerr << "G4BinaryCascade-Warning: negative excitation energy ";
G4cerr <<ExcitationEnergy<<G4endl;
PrintKTVector(&theFinalState,G4std::string("FinalState"));
PrintKTVector(&theCapturedList,G4std::string("captured"));
PrintKTVector(&theFinalState,std::string("FinalState"));
PrintKTVector(&theCapturedList,std::string("captured"));
G4cout << "negative ExE:Final 4Momentum .mag: " << GetFinal4Momentum()
<< " "<< GetFinal4Momentum().mag()<< G4endl
<< "negative ExE:FinalNucleusMom .mag: " << GetFinalNucleusMomentum()
@@ -690,7 +692,7 @@ G4ReactionProductVector * G4BinaryCascade::Propagate(
// add precompound products to products
if ( precompoundProducts )
{
G4std::vector<G4ReactionProduct *>::iterator j;
std::vector<G4ReactionProduct *>::iterator j;
for(j = precompoundProducts->begin(); j != precompoundProducts->end(); ++j)
{
// boost back to system of moving nucleus
@@ -741,7 +743,7 @@ G4double G4BinaryCascade::GetExcitationEnergy()
#endif
G4int finalZ = 0;
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
for(i = theTargetList.begin(); i != theTargetList.end(); ++i)
{
if((*i)->GetDefinition() == G4Proton::Proton())
@@ -902,7 +904,7 @@ void G4BinaryCascade::FindCollisions(G4KineticTrackVector * secondaries)
* G4cout << " FindCollisions start" << endl;
* theCollisionMgr->Print();
*/
for(G4std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
for(std::vector<G4KineticTrack *>::iterator i = secondaries->begin();
i != secondaries->end(); ++i)
{
pkt = *i;
@@ -910,7 +912,7 @@ void G4BinaryCascade::FindCollisions(G4KineticTrackVector * secondaries)
// G4cerr << "G4BinaryCascade::ApplyCollision pre-collision time"
// <<pkt->Get4Momentum()<<" "<<pkt->Get4Momentum().boostVector().mag()<<" " <<pkt->GetDefinition()->GetParticleName()
// <<G4endl;
for(G4std::vector<G4KineticTrack *>::iterator j = theTargetList.begin();
for(std::vector<G4KineticTrack *>::iterator j = theTargetList.begin();
j != theTargetList.end(); ++j)
{
tkt = *j;
@@ -1036,7 +1038,7 @@ G4bool G4BinaryCascade::ApplyCollision(G4CollisionInitialState * collision)
*/
// debug block
#ifdef debug_1_KineticCascade
PrintKTVector(products,G4std::string(" Scatterer products"));
PrintKTVector(products,std::string(" Scatterer products"));
#endif
// G4cout << " ======Survive Pauli =====" << G4endl;
@@ -1075,7 +1077,7 @@ G4bool G4BinaryCascade::Absorb()
// Build the vector of G4KineticTracks that must be absorbed
G4KineticTrackVector absorbList;
G4std::vector<G4KineticTrack *>::iterator iter;
std::vector<G4KineticTrack *>::iterator iter;
G4double radius = theOuterRadius+3*fermi;
for(iter = theSecondaryList.begin();
iter != theSecondaryList.end(); ++iter)
@@ -1140,7 +1142,7 @@ G4bool G4BinaryCascade::Capture()
{
G4KineticTrackVector captured;
G4bool capture = false;
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
G4double radius = theOuterRadius + 3*fermi;
G4RKPropagation * RKprop=(G4RKPropagation *)thePropagator;
@@ -1365,7 +1367,7 @@ void G4BinaryCascade::UpdateTracksAndCollisions(
G4KineticTrackVector * oldTarget,
G4KineticTrackVector * newSecondaries)
{
G4std::vector<G4KineticTrack *>::iterator iter1, iter2;
std::vector<G4KineticTrack *>::iterator iter1, iter2;
// remove old secondaries from the secondary list
if(oldSecondaries != NULL)
@@ -1375,7 +1377,7 @@ void G4BinaryCascade::UpdateTracksAndCollisions(
for(iter1 = oldSecondaries->begin(); iter1 != oldSecondaries->end();
++iter1)
{
iter2 = G4std::find(theSecondaryList.begin(), theSecondaryList.end(),
iter2 = std::find(theSecondaryList.begin(), theSecondaryList.end(),
*iter1);
theSecondaryList.erase(iter2);
}
@@ -1390,7 +1392,7 @@ void G4BinaryCascade::UpdateTracksAndCollisions(
{
for(iter1 = oldTarget->begin(); iter1 != oldTarget->end(); ++iter1)
{
iter2 = G4std::find(theTargetList.begin(), theTargetList.end(),
iter2 = std::find(theTargetList.begin(), theTargetList.end(),
*iter1);
theTargetList.erase(iter2);
}
@@ -1421,9 +1423,9 @@ G4bool G4BinaryCascade::DoTimeStep(G4double theTimeStep)
G4bool success=true;
// G4cerr <<"G4BinaryCascade::DoTimeStep: enter "<<G4endl;
// G4cout << "be4 trsprt....."<< G4endl;
// PrintKTVector(&theSecondaryList, G4std::string("DoTimeStep - theSecondaryList"));
// PrintKTVector(&theTargetList, G4std::string("DoTimeStep - theTargetList"));
G4std::vector<G4KineticTrack *>::iterator iter;
// PrintKTVector(&theSecondaryList, std::string("DoTimeStep - theSecondaryList"));
// PrintKTVector(&theTargetList, std::string("DoTimeStep - theTargetList"));
std::vector<G4KineticTrack *>::iterator iter;
G4double nucleusSize=theOuterRadius + 3*fermi;
// Count particles in nucleus
G4int secondaryBarions=0;
@@ -1453,7 +1455,7 @@ G4bool G4BinaryCascade::DoTimeStep(G4double theTimeStep)
thePropagator->Transport(theSecondaryList, dummy, theTimeStep);
//------
// PrintKTVector(&theSecondaryList,G4std::string("aft trsprt....."));
// PrintKTVector(&theSecondaryList,std::string("aft trsprt....."));
// anything went into the nucleus, counting back numbers to find differ
for ( iter =theSecondaryList.begin(); iter != theSecondaryList.end(); ++iter)
@@ -1544,7 +1546,7 @@ G4bool G4BinaryCascade::DoTimeStep(G4double theTimeStep)
// G4cerr <<" Exited "<<G4endl;
// if(addFinals.size() !=0) PrintKTVector(&addFinals,G4std::string("addfinals"));
// if(addFinals.size() !=0) PrintKTVector(&addFinals,std::string("addfinals"));
for ( iter = addFinals.begin(); iter != addFinals.end(); ++iter)
{
if(thePrimaryEscape || thePrimaryType != (*iter)->GetDefinition())
@@ -1558,8 +1560,8 @@ G4bool G4BinaryCascade::DoTimeStep(G4double theTimeStep)
}
theFinalState.push_back(*iter);
}
// if(addFinals.size() !=0) PrintKTVector(&addFinals,G4std::string("addfinals corrected"));
// PrintKTVector(&theFinalState,G4std::string("FinalState"));
// if(addFinals.size() !=0) PrintKTVector(&addFinals,std::string("addfinals corrected"));
// PrintKTVector(&theFinalState,std::string("FinalState"));
// now update currentZ,A as the change happened to the nucleus.
if (n_out > 0 )
{
@@ -1798,7 +1800,7 @@ G4ThreeVector G4BinaryCascade::GetSpherePoint(
void G4BinaryCascade::ClearAndDestroy(G4KineticTrackVector * ktv)
//----------------------------------------------------------------------------
{
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
for(i = ktv->begin(); i != ktv->end(); ++i)
delete *i;
ktv->clear();
@@ -1808,20 +1810,20 @@ void G4BinaryCascade::ClearAndDestroy(G4KineticTrackVector * ktv)
void G4BinaryCascade::ClearAndDestroy(G4ReactionProductVector * rpv)
//----------------------------------------------------------------------------
{
G4std::vector<G4ReactionProduct *>::iterator i;
std::vector<G4ReactionProduct *>::iterator i;
for(i = rpv->begin(); i != rpv->end(); ++i)
delete *i;
rpv->clear();
}
//----------------------------------------------------------------------------
void G4BinaryCascade::PrintKTVector(G4KineticTrackVector * ktv, G4std::string comment)
void G4BinaryCascade::PrintKTVector(G4KineticTrackVector * ktv, std::string comment)
//----------------------------------------------------------------------------
{
if (comment.size() > 0 ) G4cout << comment << G4endl;
G4cout << " vector: " << ktv << ", number of tracks: " << ktv->size()
<< G4endl;
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
G4int count;
for(count = 0, i = ktv->begin(); i != ktv->end(); ++i, ++count)
@@ -1898,7 +1900,7 @@ G4bool G4BinaryCascade::CheckDecay(G4KineticTrackVector * products)
void G4BinaryCascade::PrintWelcomeMessage()
{
G4cout <<"Thank you for using G4KineticCascade. "<<G4endl;
G4cout <<"Thank you for using G4BinaryCascade. "<<G4endl;
}
@@ -22,18 +22,18 @@
//
#include "G4FieldPropagation.hh"
const G4FieldPropagation & G4FieldPropagation::operator=(const G4FieldPropagation &right)
const G4FieldPropagation & G4FieldPropagation::operator=(const G4FieldPropagation &)
{
G4Exception("G4FieldPropagation::operator= meant to be private");
return *this;
}
int G4FieldPropagation::operator==(const G4FieldPropagation &right) const
int G4FieldPropagation::operator==(const G4FieldPropagation &) const
{
return 1;
}
int G4FieldPropagation::operator!=(const G4FieldPropagation &right) const
int G4FieldPropagation::operator!=(const G4FieldPropagation &) const
{
return 0;
}
@@ -29,11 +29,11 @@
//
G4VParticleChange* G4GeneratorPrecompoundInterface::
ApplyYourself(const G4Track& aTrack, G4Nucleus& theNucleus)
ApplyYourself(const G4Track& , G4Nucleus& )
{
G4std::cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."<< G4endl;
G4std::cout << "This class is only a mediator between generator and precompound"<<G4endl;
G4std::cout << "Please remove from your physics list."<<G4endl;
std::cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."<< G4endl;
std::cout << "This class is only a mediator between generator and precompound"<<G4endl;
std::cout << "Please remove from your physics list."<<G4endl;
G4Exception("SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
return new G4ParticleChange;
}
@@ -71,7 +71,7 @@
delete secondaries;
}
}
G4std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
delete result1;
@@ -177,7 +177,7 @@
}
// now return
G4std::for_each(result->begin(), result->end(), DeleteKineticTrack());
std::for_each(result->begin(), result->end(), DeleteKineticTrack());
delete result;
return theTotalResult;
}
@@ -49,7 +49,7 @@ G4KM_NucleonEqRhs::G4KM_NucleonEqRhs(G4KM_DummyField *field,
void G4KM_NucleonEqRhs::EvaluateRhsGivenB(const G4double y[],
const G4double B[3],
const G4double * ,
G4double dydx[]) const
{
G4double yMod = sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]);
@@ -49,8 +49,8 @@ G4KM_OpticalEqRhs::G4KM_OpticalEqRhs(G4KM_DummyField *field,
void G4KM_OpticalEqRhs::SetFactor(G4double mass, G4double opticalParameter)
{
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = mass*nucleusMass/(mass+nucleusMass);
@@ -64,7 +64,7 @@ void G4KM_OpticalEqRhs::SetFactor(G4double mass, G4double opticalParameter)
}
void G4KM_OpticalEqRhs::EvaluateRhsGivenB(const G4double y[], const G4double B[3],
void G4KM_OpticalEqRhs::EvaluateRhsGivenB(const G4double y[], const G4double *,
G4double dydx[]) const
{
G4double yMod = sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]);
@@ -49,21 +49,21 @@ G4KaonMinusField::~G4KaonMinusField()
{ }
const G4KaonMinusField & G4KaonMinusField::operator=(const G4KaonMinusField & right)
const G4KaonMinusField & G4KaonMinusField::operator=(const G4KaonMinusField & )
{
G4Exception("G4KaonMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonMinusField::operator==(const G4KaonMinusField & right) const
G4int G4KaonMinusField::operator==(const G4KaonMinusField & ) const
{
G4Exception("G4KaonMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonMinusField::operator!=(const G4KaonMinusField & right) const
G4int G4KaonMinusField::operator!=(const G4KaonMinusField & ) const
{
G4Exception("G4KaonMinusField::operator!= meant not to be accessible");
return 1;
@@ -78,8 +78,8 @@ G4double G4KaonMinusField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonMinus::KaonMinus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -49,21 +49,21 @@ G4KaonPlusField::~G4KaonPlusField()
{ }
const G4KaonPlusField & G4KaonPlusField::operator=(const G4KaonPlusField & right)
const G4KaonPlusField & G4KaonPlusField::operator=(const G4KaonPlusField & )
{
G4Exception("G4KaonPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonPlusField::operator==(const G4KaonPlusField & right) const
G4int G4KaonPlusField::operator==(const G4KaonPlusField & ) const
{
G4Exception("G4KaonPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonPlusField::operator!=(const G4KaonPlusField & right) const
G4int G4KaonPlusField::operator!=(const G4KaonPlusField & ) const
{
G4Exception("G4KaonPlusField::operator!= meant not to be accessible");
return 1;
@@ -78,8 +78,8 @@ G4double G4KaonPlusField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonPlus::KaonPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -49,21 +49,21 @@ G4KaonZeroField::~G4KaonZeroField()
{ }
const G4KaonZeroField & G4KaonZeroField::operator=(const G4KaonZeroField & right)
const G4KaonZeroField & G4KaonZeroField::operator=(const G4KaonZeroField & )
{
G4Exception("G4KaonZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4KaonZeroField::operator==(const G4KaonZeroField & right) const
G4int G4KaonZeroField::operator==(const G4KaonZeroField & ) const
{
G4Exception("G4KaonZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4KaonZeroField::operator!=(const G4KaonZeroField & right) const
G4int G4KaonZeroField::operator!=(const G4KaonZeroField & ) const
{
G4Exception("G4KaonZeroField::operator!= meant not to be accessible");
return 1;
@@ -78,8 +78,8 @@ G4double G4KaonZeroField::GetField(const G4ThreeVector & aPosition)
G4double kaonMass = G4KaonZero::KaonZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
@@ -74,21 +74,21 @@ G4NeutronField::~G4NeutronField()
{ }
const G4NeutronField & G4NeutronField::operator=(const G4NeutronField & right)
const G4NeutronField & G4NeutronField::operator=(const G4NeutronField & )
{
G4Exception("G4NeutronField::operator= meant not to be accessible");
return *this;
}
G4int G4NeutronField::operator==(const G4NeutronField & right) const
G4int G4NeutronField::operator==(const G4NeutronField & ) const
{
G4Exception("G4NeutronField::operator== meant not to be accessible");
return 0;
}
G4int G4NeutronField::operator!=(const G4NeutronField & right) const
G4int G4NeutronField::operator!=(const G4NeutronField & ) const
{
G4Exception("G4NeutronField::operator!= meant not to be accessible");
return 1;
@@ -98,7 +98,7 @@ G4int G4NeutronField::operator!=(const G4NeutronField & right) const
G4double G4NeutronField::GetField(const G4ThreeVector & aPosition)
{
G4double x = aPosition.mag();
G4int index = static_cast<G4int>(x/(0.3*fermi) );
size_t index = static_cast<size_t>(x/(0.3*fermi) );
if(index+2>theFermiMomBuffer.size()) return theFermiMomBuffer.back();
G4double y1 = theFermiMomBuffer[index];
G4double y2 = theFermiMomBuffer[index+1];
@@ -49,21 +49,21 @@ G4PionMinusField::~G4PionMinusField()
{ }
const G4PionMinusField & G4PionMinusField::operator=(const G4PionMinusField & right)
const G4PionMinusField & G4PionMinusField::operator=(const G4PionMinusField & )
{
G4Exception("G4PionMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4PionMinusField::operator==(const G4PionMinusField & right) const
G4int G4PionMinusField::operator==(const G4PionMinusField & ) const
{
G4Exception("G4PionMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4PionMinusField::operator!=(const G4PionMinusField & right) const
G4int G4PionMinusField::operator!=(const G4PionMinusField & ) const
{
G4Exception("G4PionMinusField::operator!= meant not to be accessible");
return 1;
@@ -75,8 +75,8 @@ G4double G4PionMinusField::GetField(const G4ThreeVector & aPosition)
// Field is 0 out of the nucleus!
if(aPosition.mag() >= radius) return 0.0;
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double pionMinusMass = G4PionMinus::PionMinus()->GetPDGMass();
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
@@ -50,21 +50,21 @@ G4PionPlusField::~G4PionPlusField()
{ }
const G4PionPlusField & G4PionPlusField::operator=(const G4PionPlusField & right)
const G4PionPlusField & G4PionPlusField::operator=(const G4PionPlusField & )
{
G4Exception("G4PionPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4PionPlusField::operator==(const G4PionPlusField & right) const
G4int G4PionPlusField::operator==(const G4PionPlusField & ) const
{
G4Exception("G4PionPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4PionPlusField::operator!=(const G4PionPlusField & right) const
G4int G4PionPlusField::operator!=(const G4PionPlusField & ) const
{
G4Exception("G4PionPlusField::operator!= meant not to be accessible");
return 1;
@@ -77,9 +77,8 @@ G4double G4PionPlusField::GetField(const G4ThreeVector & aPosition)
if(aPosition.mag() >= radius) return 0.0;
G4double pionPlusMass = G4PionPlus::PionPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = pionPlusMass*nucleusMass/(pionPlusMass+nucleusMass);
@@ -50,21 +50,21 @@ G4PionZeroField::~G4PionZeroField()
{ }
const G4PionZeroField & G4PionZeroField::operator=(const G4PionZeroField & right)
const G4PionZeroField & G4PionZeroField::operator=(const G4PionZeroField & )
{
G4Exception("G4PionZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4PionZeroField::operator==(const G4PionZeroField & right) const
G4int G4PionZeroField::operator==(const G4PionZeroField & ) const
{
G4Exception("G4PionZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4PionZeroField::operator!=(const G4PionZeroField & right) const
G4int G4PionZeroField::operator!=(const G4PionZeroField & ) const
{
G4Exception("G4PionZeroField::operator!= meant not to be accessible");
return 1;
@@ -77,8 +77,8 @@ G4double G4PionZeroField::GetField(const G4ThreeVector & aPosition)
if(aPosition.mag() >= radius) return 0.0;
G4double pionZeroMass = G4PionZero::PionZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
@@ -76,21 +76,21 @@ G4ProtonField::~G4ProtonField()
{ }
const G4ProtonField & G4ProtonField::operator=(const G4ProtonField & right)
const G4ProtonField & G4ProtonField::operator=(const G4ProtonField & )
{
G4Exception("G4ProtonField::operator= meant not to be accessible");
return *this;
}
G4int G4ProtonField::operator==(const G4ProtonField & right) const
G4int G4ProtonField::operator==(const G4ProtonField & ) const
{
G4Exception("G4ProtonField::operator== meant not to be accessible");
return 0;
}
G4int G4ProtonField::operator!=(const G4ProtonField & right) const
G4int G4ProtonField::operator!=(const G4ProtonField & ) const
{
G4Exception("G4ProtonField::operator!= meant not to be accessible");
return 1;
@@ -101,7 +101,7 @@ G4double G4ProtonField::GetField(const G4ThreeVector & aPosition)
{
//G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
G4double x = aPosition.mag();
G4int index = static_cast<G4int>(x/(0.3*fermi) );
size_t index = static_cast<size_t>(x/(0.3*fermi) );
if(index+2>theFermiMomBuffer.size()) return theFermiMomBuffer.back();
G4double y1 = theFermiMomBuffer[index];
G4double y2 = theFermiMomBuffer[index+1];
@@ -174,7 +174,7 @@ G4double G4RKFieldIntegrator::GetExcitationEnergy(const G4KineticTrackVector &th
//*************************************************************************************************************************************
//This is a simplified method to get excitation energy of a residual
// nucleus with nHitNucleons.
G4double G4RKFieldIntegrator::GetExcitationEnergy(G4int nHitNucleons, const G4KineticTrackVector &theParticles)
G4double G4RKFieldIntegrator::GetExcitationEnergy(G4int nHitNucleons, const G4KineticTrackVector &)
{
const G4double MeanE = 50;
G4double Sum = 0;
@@ -228,7 +228,7 @@ const G4double G4RKFieldIntegrator::a_antiproton = 1.53;
// methods for calculating potentials for different types of particles
// aPosition is relative to the nucleus center
G4double G4RKFieldIntegrator::GetNeutronPotential(G4double radius)
G4double G4RKFieldIntegrator::GetNeutronPotential(G4double )
{
/*
const G4double Mn = 939.56563 * MeV; // mass of nuetron
@@ -255,7 +255,7 @@ G4double G4RKFieldIntegrator::GetNeutronPotential(G4double radius)
return 0.0;
}
G4double G4RKFieldIntegrator::GetProtonPotential(G4double radius)
G4double G4RKFieldIntegrator::GetProtonPotential(G4double )
{
/*
// calculate Coulomb barrier value
@@ -285,7 +285,7 @@ G4double G4RKFieldIntegrator::GetProtonPotential(G4double radius)
return 0.0;
}
G4double G4RKFieldIntegrator::GetAntiprotonPotential(G4double radius)
G4double G4RKFieldIntegrator::GetAntiprotonPotential(G4double )
{
/*
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
@@ -315,7 +315,7 @@ G4double G4RKFieldIntegrator::GetAntiprotonPotential(G4double radius)
return 0.0;
}
G4double G4RKFieldIntegrator::GetKaonPotential(G4double radius)
G4double G4RKFieldIntegrator::GetKaonPotential(G4double )
{
/*
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
@@ -345,7 +345,7 @@ G4double G4RKFieldIntegrator::GetKaonPotential(G4double radius)
return 0.0;
}
G4double G4RKFieldIntegrator::GetPionPotential(G4double radius)
G4double G4RKFieldIntegrator::GetPionPotential(G4double )
{
/*
//G4double theM = G4NucleiProperties::GetAtomicMass(theA, theZ);
@@ -131,7 +131,7 @@ void G4RKPropagation::Init(G4V3DNucleus * nucleus)
theNucleus = nucleus;
theOuterRadius = theNucleus->GetOuterRadius();
theFieldMap = new G4std::map <G4int, G4VNuclearField*, G4std::less<G4int> >;
theFieldMap = new std::map <G4int, G4VNuclearField*, std::less<G4int> >;
(*theFieldMap)[G4Proton::Proton()->GetPDGEncoding()] = new G4ProtonField(theNucleus);
(*theFieldMap)[G4Neutron::Neutron()->GetPDGEncoding()] = new G4NeutronField(theNucleus);
@@ -146,7 +146,7 @@ void G4RKPropagation::Init(G4V3DNucleus * nucleus)
(*theFieldMap)[G4SigmaMinus::SigmaMinus()->GetPDGEncoding()] = new G4SigmaMinusField(theNucleus);
(*theFieldMap)[G4SigmaZero::SigmaZero()->GetPDGEncoding()] = new G4SigmaZeroField(theNucleus);
theEquationMap = new G4std::map <G4int, G4Mag_EqRhs*, G4std::less<G4int> >;
theEquationMap = new std::map <G4int, G4Mag_EqRhs*, std::less<G4int> >;
// theField needed by the design of G4Mag_eqRhs
theField = new G4KM_DummyField; //Field not needed for integration
@@ -247,13 +247,13 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
// Loop over tracks
G4std::vector<G4KineticTrack *>::iterator i;
std::vector<G4KineticTrack *>::iterator i;
for(i = active.begin(); i != active.end(); ++i)
{
G4double currTimeStep = timeStep;
G4KineticTrack * kt = *i;
G4int encoding = kt->GetDefinition()->GetPDGEncoding();
G4std::map <G4int, G4VNuclearField*, G4std::less<G4int> >::iterator fieldIter= theFieldMap->find(encoding);
std::map <G4int, G4VNuclearField*, std::less<G4int> >::iterator fieldIter= theFieldMap->find(encoding);
G4VNuclearField* currentField=0;
if ( fieldIter != theFieldMap->end() ) currentField=fieldIter->second;
@@ -382,7 +382,7 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
{
G4double velocity=kt->Get4Momentum().vect().mag()/kt->Get4Momentum().e()*c_light;
G4double t_min=0.1*fermi/velocity;
t_out=G4std::max(abs(t_out),t_min); // avoid transport by 0 step not taking it out..
t_out=std::max(abs(t_out),t_min); // avoid transport by 0 step not taking it out..
if(t_in < 0 && t_out >= 0) //still inside, transport safely out.
{
G4ThreeVector savePos = kt->GetPosition();
@@ -467,7 +467,7 @@ G4bool G4RKPropagation::FieldTransport(G4KineticTrack * kt, const G4double timeS
// G4cout << "currTimeStep = " << currTimeStep << G4endl;
if(!driver->AccurateAdvance(track, timeStep, eps))
{ // cannot track this particle
G4std::cerr << "G4RKPropagation::FieldTransport() warning: integration error."
std::cerr << "G4RKPropagation::FieldTransport() warning: integration error."
<< G4endl << "position " << kt->GetPosition() << " 4mom " <<kt->Get4Momentum()
<<G4endl << " timestep " <<timeStep
<< G4endl;
@@ -577,11 +577,11 @@ G4bool G4RKPropagation::GetSphereIntersectionTimes(const G4KineticTrack * kt,
//----------------------------------------------------------------------------
void G4RKPropagation::delete_FieldsAndMap(
//----------------------------------------------------------------------------
G4std::map <G4int, G4VNuclearField *, G4std::less<G4int> > * aMap)
std::map <G4int, G4VNuclearField *, std::less<G4int> > * aMap)
{
if(aMap)
{
G4std::map <G4int, G4VNuclearField *, G4std::less<G4int> >::iterator cur;
std::map <G4int, G4VNuclearField *, std::less<G4int> >::iterator cur;
for(cur = aMap->begin(); cur != aMap->end(); ++cur)
delete (*cur).second;
@@ -594,11 +594,11 @@ void G4RKPropagation::delete_FieldsAndMap(
//----------------------------------------------------------------------------
void G4RKPropagation::delete_EquationsAndMap(
//----------------------------------------------------------------------------
G4std::map <G4int, G4Mag_EqRhs *, G4std::less<G4int> > * aMap)
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> > * aMap)
{
if(aMap)
{
G4std::map <G4int, G4Mag_EqRhs *, G4std::less<G4int> >::iterator cur;
std::map <G4int, G4Mag_EqRhs *, std::less<G4int> >::iterator cur;
for(cur = aMap->begin(); cur != aMap->end(); ++cur)
delete (*cur).second;
@@ -48,21 +48,21 @@ G4SigmaMinusField::~G4SigmaMinusField()
{ }
const G4SigmaMinusField & G4SigmaMinusField::operator=(const G4SigmaMinusField & right)
const G4SigmaMinusField & G4SigmaMinusField::operator=(const G4SigmaMinusField & )
{
G4Exception("G4SigmaMinusField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaMinusField::operator==(const G4SigmaMinusField & right) const
G4int G4SigmaMinusField::operator==(const G4SigmaMinusField & ) const
{
G4Exception("G4SigmaMinusField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaMinusField::operator!=(const G4SigmaMinusField & right) const
G4int G4SigmaMinusField::operator!=(const G4SigmaMinusField & ) const
{
G4Exception("G4SigmaMinusField::operator!= meant not to be accessible");
return 1;
@@ -77,8 +77,8 @@ G4double G4SigmaMinusField::GetField(const G4ThreeVector & aPosition)
G4double sigmaMinusMass = G4SigmaMinus::SigmaMinus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaMinusMass*nucleusMass/(sigmaMinusMass+nucleusMass);
@@ -49,21 +49,21 @@ G4SigmaPlusField::~G4SigmaPlusField()
{ }
const G4SigmaPlusField & G4SigmaPlusField::operator=(const G4SigmaPlusField & right)
const G4SigmaPlusField & G4SigmaPlusField::operator=(const G4SigmaPlusField & )
{
G4Exception("G4SigmaPlusField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaPlusField::operator==(const G4SigmaPlusField & right) const
G4int G4SigmaPlusField::operator==(const G4SigmaPlusField & ) const
{
G4Exception("G4SigmaPlusField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaPlusField::operator!=(const G4SigmaPlusField & right) const
G4int G4SigmaPlusField::operator!=(const G4SigmaPlusField & ) const
{
G4Exception("G4SigmaPlusField::operator!= meant not to be accessible");
return 1;
@@ -78,8 +78,8 @@ G4double G4SigmaPlusField::GetField(const G4ThreeVector & aPosition)
G4double sigmaPlusMass = G4SigmaPlus::SigmaPlus()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaPlusMass*nucleusMass/(sigmaPlusMass+nucleusMass);
@@ -49,21 +49,21 @@ G4SigmaZeroField::~G4SigmaZeroField()
{ }
const G4SigmaZeroField & G4SigmaZeroField::operator=(const G4SigmaZeroField & right)
const G4SigmaZeroField & G4SigmaZeroField::operator=(const G4SigmaZeroField & )
{
G4Exception("G4SigmaZeroField::operator= meant not to be accessible");
return *this;
}
G4int G4SigmaZeroField::operator==(const G4SigmaZeroField & right) const
G4int G4SigmaZeroField::operator==(const G4SigmaZeroField & ) const
{
G4Exception("G4SigmaZeroField::operator== meant not to be accessible");
return 0;
}
G4int G4SigmaZeroField::operator!=(const G4SigmaZeroField & right) const
G4int G4SigmaZeroField::operator!=(const G4SigmaZeroField & ) const
{
G4Exception("G4SigmaZeroField::operator!= meant not to be accessible");
return 1;
@@ -78,8 +78,8 @@ G4double G4SigmaZeroField::GetField(const G4ThreeVector & aPosition)
G4double sigmaZeroMass = G4SigmaZero::SigmaZero()->GetPDGMass();
G4double A = theNucleus->GetMassNumber();
G4double Z = theNucleus->GetCharge();
G4int A = static_cast<G4int>(theNucleus->GetMassNumber()+.1);
G4int Z = static_cast<G4int>(theNucleus->GetCharge()+.1);
G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
G4double reducedMass = sigmaZeroMass*nucleusMass/(sigmaZeroMass+nucleusMass);
@@ -38,25 +38,25 @@
G4VFieldPropagation::G4VFieldPropagation()
{ }
G4VFieldPropagation::G4VFieldPropagation(const G4VFieldPropagation &right)
G4VFieldPropagation::G4VFieldPropagation(const G4VFieldPropagation &)
{ }
G4VFieldPropagation::~G4VFieldPropagation()
{ }
const G4VFieldPropagation & G4VFieldPropagation::operator=(const G4VFieldPropagation & right)
const G4VFieldPropagation & G4VFieldPropagation::operator=(const G4VFieldPropagation & )
{
G4Exception("G4VFieldPropagation::operator= meant not to be accessible");
return *this;
}
G4int G4VFieldPropagation::operator==(const G4VFieldPropagation & right) const
G4int G4VFieldPropagation::operator==(const G4VFieldPropagation & ) const
{
G4Exception("G4VFieldPropagation::operator== meant not to be accessible");
return 0;
}
G4int G4VFieldPropagation::operator!=(const G4VFieldPropagation & right) const
G4int G4VFieldPropagation::operator!=(const G4VFieldPropagation & ) const
{
G4Exception("G4VFieldPropagation::operator!= meant not to be accessible");
return 1;
@@ -51,19 +51,19 @@ G4VNuclearField::~G4VNuclearField()
{
}
const G4VNuclearField & G4VNuclearField::operator=(const G4VNuclearField & right)
const G4VNuclearField & G4VNuclearField::operator=(const G4VNuclearField & )
{
G4Exception("G4VNuclearField::operator= meant not to be accessible");
return *this;
}
G4int G4VNuclearField::operator==(const G4VNuclearField & right) const
G4int G4VNuclearField::operator==(const G4VNuclearField & ) const
{
G4Exception("G4VNuclearField::operator== meant not to be accessible");
return 0;
}
G4int G4VNuclearField::operator!=(const G4VNuclearField & right) const
G4int G4VNuclearField::operator!=(const G4VNuclearField & ) const
{
G4Exception("G4VNuclearField::operator!= meant not to be accessible");
return 1;