Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * authors in the GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
@@ -126,8 +126,8 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
// Secondary interactions
|
||||
|
||||
G4DynamicParticle* thePion;
|
||||
G4int i;
|
||||
for(i = 0; i < absorptionProducts->length(); i++)
|
||||
unsigned int i;
|
||||
for(i = 0; i < absorptionProducts->size(); i++)
|
||||
{
|
||||
thePion = (*absorptionProducts)[i];
|
||||
if (thePion->GetDefinition() == G4PionMinus::PionMinus()
|
||||
@@ -136,7 +136,8 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
{
|
||||
if (AbsorbPionByNucleus(thePion))
|
||||
{
|
||||
absorptionProducts->remove(thePion);
|
||||
absorptionProducts->erase(absorptionProducts->begin()+i);
|
||||
i--;
|
||||
delete thePion;
|
||||
if (verboseLevel > 1)
|
||||
G4cout << "G4KaonMinusAbsorption::AtRestDoIt: Pion absorbed in Nucleus"
|
||||
@@ -147,7 +148,7 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
|
||||
G4DynamicParticle* theSigma;
|
||||
G4DynamicParticle* theLambda;
|
||||
for (i = 0; i < absorptionProducts->length(); i++)
|
||||
for (i = 0; i < absorptionProducts->size(); i++)
|
||||
{
|
||||
theSigma = (*absorptionProducts)[i];
|
||||
if (theSigma->GetDefinition() == G4SigmaMinus::SigmaMinus()
|
||||
@@ -156,9 +157,10 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
{
|
||||
theLambda = SigmaLambdaConversion(theSigma);
|
||||
if (theLambda != 0){
|
||||
absorptionProducts->remove(theSigma);
|
||||
absorptionProducts->erase(absorptionProducts->begin()+i);
|
||||
i--;
|
||||
delete theSigma;
|
||||
absorptionProducts->append(theLambda);
|
||||
absorptionProducts->push_back(theLambda);
|
||||
|
||||
if (verboseLevel > 1)
|
||||
G4cout << "G4KaonMinusAbsorption::AtRestDoIt: SigmaLambdaConversion Done"
|
||||
@@ -171,11 +173,9 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
|
||||
G4double productEnergy = 0.;
|
||||
G4ThreeVector pProducts(0.,0.,0.);
|
||||
G4int nN = 0;
|
||||
G4int nP = 0;
|
||||
|
||||
G4int nAbsorptionProducts = 0;
|
||||
if (absorptionProducts != 0) nAbsorptionProducts = absorptionProducts->entries();
|
||||
unsigned int nAbsorptionProducts = 0;
|
||||
if (absorptionProducts != 0) nAbsorptionProducts = absorptionProducts->size();
|
||||
|
||||
for ( i = 0; i<nAbsorptionProducts; i++)
|
||||
{
|
||||
@@ -225,8 +225,8 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
|
||||
G4ReactionProductVector* fragmentationProducts = stopDeexcitation.DoBreakUp(newA,newZ,energyDeposit,pNucleus);
|
||||
|
||||
G4int nFragmentationProducts = 0;
|
||||
if (fragmentationProducts != 0) nFragmentationProducts = fragmentationProducts->entries();
|
||||
unsigned int nFragmentationProducts = 0;
|
||||
if (fragmentationProducts != 0) nFragmentationProducts = fragmentationProducts->size();
|
||||
|
||||
//Initialize ParticleChange
|
||||
aParticleChange.Initialize(track);
|
||||
@@ -242,12 +242,12 @@ G4VParticleChange* G4KaonMinusAbsorptionAtRest::AtRestDoIt
|
||||
for(i=0; i<nFragmentationProducts; i++)
|
||||
{
|
||||
G4DynamicParticle * aNew =
|
||||
new G4DynamicParticle(fragmentationProducts->at(i)->GetDefinition(),
|
||||
fragmentationProducts->at(i)->GetTotalEnergy(),
|
||||
fragmentationProducts->at(i)->GetMomentum());
|
||||
G4double newTime = aParticleChange.GetGlobalTime(fragmentationProducts->at(i)->GetFormationTime());
|
||||
new G4DynamicParticle((*fragmentationProducts)[i]->GetDefinition(),
|
||||
(*fragmentationProducts)[i]->GetTotalEnergy(),
|
||||
(*fragmentationProducts)[i]->GetMomentum());
|
||||
G4double newTime = aParticleChange.GetGlobalTime((*fragmentationProducts)[i]->GetFormationTime());
|
||||
aParticleChange.AddSecondary(aNew, newTime);
|
||||
delete fragmentationProducts->at(i);
|
||||
delete (*fragmentationProducts)[i];
|
||||
}
|
||||
if (fragmentationProducts != 0) delete fragmentationProducts;
|
||||
|
||||
@@ -426,14 +426,14 @@ G4DynamicParticleVector* G4KaonMinusAbsorptionAtRest::KaonNucleonReaction()
|
||||
theReactionKinematics.TwoBodyScattering( &modifiedHadron, &aNucleon,
|
||||
producedBaryon, producedMeson);
|
||||
|
||||
products->append(producedBaryon);
|
||||
products->append(producedMeson);
|
||||
products->push_back(producedBaryon);
|
||||
products->push_back(producedMeson);
|
||||
|
||||
if (verboseLevel > 1)
|
||||
{
|
||||
G4cout
|
||||
<< "G4KaonMinusAbsorption::KaonNucleonReaction: Number of primaries = "
|
||||
<< products->entries()
|
||||
<< products->size()
|
||||
<< ": " <<producedMesonDef->GetParticleName()
|
||||
<< ", " <<producedBaryonDef->GetParticleName() << G4endl;
|
||||
}
|
||||
@@ -534,9 +534,9 @@ G4DynamicParticle* G4KaonMinusAbsorptionAtRest::SigmaLambdaConversion(G4DynamicP
|
||||
// -G4NucleiPropertiesTable::GetAtomicMass(newZ,A)
|
||||
// -nucleonMass;
|
||||
// equivalent to -'initialBindingEnergy+nucleus.GetBindingEnergy' !
|
||||
G4double massDifference =
|
||||
-G4NucleiPropertiesTable::GetBindingEnergy(Z,A)
|
||||
+G4NucleiPropertiesTable::GetBindingEnergy(newZ,A);
|
||||
//G4double massDifference =
|
||||
// -G4NucleiPropertiesTable::GetBindingEnergy(Z,A)
|
||||
// +G4NucleiPropertiesTable::GetBindingEnergy(newZ,A);
|
||||
|
||||
|
||||
// Add energy and momentum to nucleus, change Z,A
|
||||
|
||||
Reference in New Issue
Block a user