Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -46,6 +46,7 @@ G4ExcitedString::G4ExcitedString(G4Parton* Color, G4Parton* AntiColor, G4int Dir
|
||||
{
|
||||
thePartons.push_back(Color);
|
||||
thePartons.push_back(AntiColor);
|
||||
theTimeOfCreation = 0.; // Uzhi 15.05.08
|
||||
thePosition = Color->GetPosition();
|
||||
theDirection = Direction;
|
||||
theTrack=0;
|
||||
@@ -56,6 +57,7 @@ G4ExcitedString::G4ExcitedString(G4Parton* Color, G4Parton* Gluon, G4Parton* An
|
||||
thePartons.push_back(Color);
|
||||
thePartons.push_back(Gluon);
|
||||
thePartons.push_back(AntiColor);
|
||||
theTimeOfCreation = 0.; // Uzhi 15.05.08
|
||||
thePosition = Color->GetPosition();
|
||||
theDirection = Direction;
|
||||
theTrack=0;
|
||||
@@ -63,6 +65,7 @@ G4ExcitedString::G4ExcitedString(G4Parton* Color, G4Parton* Gluon, G4Parton* An
|
||||
|
||||
G4ExcitedString::G4ExcitedString(G4KineticTrack * track)
|
||||
{
|
||||
theTimeOfCreation = track->GetFormationTime(); // Uzhi 15.05.08
|
||||
thePosition = track->GetPosition();
|
||||
theTrack= track;
|
||||
theDirection=0;
|
||||
|
||||
@@ -36,12 +36,13 @@
|
||||
#include "G4Fancy3DNucleus.hh"
|
||||
#include "G4NuclearFermiDensity.hh"
|
||||
#include "G4NuclearShellModelDensity.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <algorithm>
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
|
||||
G4Fancy3DNucleus::G4Fancy3DNucleus()
|
||||
: nucleondistance(0.8*fermi)
|
||||
{
|
||||
@@ -130,11 +131,43 @@ const std::vector<G4Nucleon *> & G4Fancy3DNucleus::GetNucleons()
|
||||
return theRWNucleons;
|
||||
}
|
||||
|
||||
bool G4Fancy3DNucleusHelperForSortInZ(const G4Nucleon* nuc1, const G4Nucleon* nuc2)
|
||||
{
|
||||
return nuc1->GetPosition().z() < nuc2->GetPosition().z();
|
||||
}
|
||||
|
||||
void G4Fancy3DNucleus::SortNucleonsInZ()
|
||||
{
|
||||
|
||||
GetNucleons(); // make sure theRWNucleons is initialised
|
||||
|
||||
if (theRWNucleons.size() < 2 ) return;
|
||||
|
||||
sort( theRWNucleons.begin(),theRWNucleons.end(),G4Fancy3DNucleusHelperForSortInZ);
|
||||
|
||||
// now copy sorted nucleons to theNucleons array. TheRWNucleons are pointers in theNucleons
|
||||
// so we need to copy to new, and then swap.
|
||||
G4Nucleon * sortedNucleons = new G4Nucleon[myA];
|
||||
for ( unsigned int i=0; i<theRWNucleons.size(); i++ )
|
||||
{
|
||||
sortedNucleons[i]= *(theRWNucleons[i]);
|
||||
}
|
||||
|
||||
theRWNucleons.clear(); // about to delete array these point to....
|
||||
delete [] theNucleons;
|
||||
|
||||
theNucleons=sortedNucleons;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
G4double G4Fancy3DNucleus::BindingEnergy()
|
||||
{
|
||||
return G4NucleiPropertiesTable::GetBindingEnergy(myZ,myA);
|
||||
return G4NucleiProperties::GetBindingEnergy(myA,myZ);
|
||||
}
|
||||
|
||||
|
||||
G4double G4Fancy3DNucleus::GetNuclearRadius()
|
||||
{
|
||||
return GetNuclearRadius(0.5);
|
||||
@@ -260,7 +293,7 @@ void G4Fancy3DNucleus::ChoosePositions()
|
||||
places.reserve(myA);
|
||||
G4bool freeplace;
|
||||
static G4double nd2 = sqr(nucleondistance);
|
||||
G4double maxR=GetNuclearRadius(0.01); // there are no nucleons at a
|
||||
G4double maxR=GetNuclearRadius(0.001); // there are no nucleons at a
|
||||
// relative Density of 0.01
|
||||
G4int jr=0;
|
||||
G4int jx,jy;
|
||||
|
||||
@@ -91,16 +91,16 @@ G4Fragment::G4Fragment(const G4int A, const G4int Z, const G4LorentzVector aMome
|
||||
theExcitationEnergy = theMomentum.mag() -
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()
|
||||
->GetIonMass( G4lrint(theZ), G4lrint(theA) );
|
||||
if( theExcitationEnergy < 0.0 )
|
||||
if( theExcitationEnergy > -10.0 * eV || 0==G4lrint(theA))
|
||||
if (theExcitationEnergy < 0.0) {
|
||||
if (theExcitationEnergy > -10.0 * eV || 0 == G4lrint(theA)) {
|
||||
theExcitationEnergy = 0.0;
|
||||
else
|
||||
{
|
||||
} else {
|
||||
G4cout << "A, Z, momentum, theExcitationEnergy"<<
|
||||
A<<" "<<Z<<" "<<aMomentum<<" "<<theExcitationEnergy<<G4endl;
|
||||
G4String text = "G4Fragment::G4Fragment Excitation Energy < 0.0!";
|
||||
throw G4HadronicException(__FILE__, __LINE__, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,28 +200,26 @@ std::ostream& operator << (std::ostream &out, const G4Fragment &theFragment)
|
||||
|
||||
G4double G4Fragment::CalculateExcitationEnergy(const G4LorentzVector value) const
|
||||
{
|
||||
static G4int errCount(0);
|
||||
G4double theMaxGroundStateMass = theZ*G4Proton::Proton()->GetPDGMass()+
|
||||
static G4int errCount(0);
|
||||
G4double theMaxGroundStateMass = theZ*G4Proton::Proton()->GetPDGMass()+
|
||||
(theA-theZ)*G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double U = value.m() - std::min(theMaxGroundStateMass, GetGroundStateMass());
|
||||
if( U < 0.0 )
|
||||
if( U > -10.0 * eV || 0==G4lrint(theA))
|
||||
U = 0.0;
|
||||
else
|
||||
{
|
||||
if ( errCount < 10 )
|
||||
{
|
||||
G4cerr << "G4Fragment::CalculateExcitationEnergy(): Excitation Energy ="
|
||||
<<U << " for A = "<<theA<<" and Z= "<<theZ<<G4endl
|
||||
<< ", mass= " << GetGroundStateMass() << " maxMass= "<<theMaxGroundStateMass<<G4endl; ;
|
||||
errCount++;
|
||||
if (errCount == 10 ) G4cerr << "G4Fragment::CalculateExcitationEnergy():"
|
||||
<< " further warnings on negative excitation will be supressed" << G4endl;
|
||||
}
|
||||
|
||||
U=0.0;
|
||||
}
|
||||
return U;
|
||||
G4double U = value.m() - std::min(theMaxGroundStateMass, GetGroundStateMass());
|
||||
if( U < 0.0 ) {
|
||||
if( U > -10.0 * eV || 0==G4lrint(theA)){
|
||||
U = 0.0;
|
||||
} else {
|
||||
if ( errCount < 10 ) {
|
||||
G4cerr << "G4Fragment::CalculateExcitationEnergy(): Excitation Energy ="
|
||||
<<U << " for A = "<<theA<<" and Z= "<<theZ<<G4endl
|
||||
<< ", mass= " << GetGroundStateMass() << " maxMass= "<<theMaxGroundStateMass<<G4endl; ;
|
||||
errCount++;
|
||||
if (errCount == 10 ) G4cerr << "G4Fragment::CalculateExcitationEnergy():"
|
||||
<< " further warnings on negative excitation will be supressed" << G4endl;
|
||||
}
|
||||
U=0.0;
|
||||
}
|
||||
}
|
||||
return U;
|
||||
}
|
||||
|
||||
G4ThreeVector G4Fragment::IsotropicRandom3Vector(const G4double Magnitude) const
|
||||
|
||||
Reference in New Issue
Block a user