Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -14,16 +14,13 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4AntiNeutronAnnihilationAtRest.cc,v 1.2.8.2 2001/06/28 20:20:07 gunter Exp $
// GEANT4 tag $Name: $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
// CERN Geneva Switzerland
@@ -171,15 +168,14 @@ G4VParticleChange* G4AntiNeutronAnnihilationAtRest::AtRestDoIt(
// probabilities are included.
if (random<=runningSum)
{
targetCharge = G4double((*theElementVector)(i2)->GetZ());
targetAtomicMass = (*theElementVector)(i2)->GetN();
targetCharge = G4double( ((*theElementVector)[i2])->GetZ());
targetAtomicMass = (*theElementVector)[i2]->GetN();
}
}
if (random>runningSum)
{
targetCharge = G4double((*theElementVector)(numberOfElements-1)->GetZ());
targetAtomicMass = (*theElementVector)(numberOfElements-1)->GetN();
targetCharge = G4double( ((*theElementVector)[numberOfElements-1])->GetZ());
targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
}
if (verboseLevel>1) {
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4AntiProtonAnnihilationAtRest.cc,v 1.2.8.2 2001/06/28 20:20:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4AntiProtonAnnihilationAtRest.cc,v 1.5 2001/10/19 11:55:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -171,14 +171,14 @@ G4VParticleChange* G4AntiProtonAnnihilationAtRest::AtRestDoIt(
// probabilities are included.
if (random<=runningSum)
{
targetCharge = G4double((*theElementVector)(i2)->GetZ());
targetAtomicMass = (*theElementVector)(i2)->GetN();
targetCharge = G4double((*theElementVector)[i2]->GetZ());
targetAtomicMass = (*theElementVector)[i2]->GetN();
}
}
if (random>runningSum)
{
targetCharge = G4double((*theElementVector)(numberOfElements-1)->GetZ());
targetAtomicMass = (*theElementVector)(numberOfElements-1)->GetN();
targetCharge = G4double((*theElementVector)[numberOfElements-1]->GetZ());
targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4DistributionGenerator.cc,v 1.4.8.2 2001/06/28 20:20:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4DistributionGenerator.cc,v 1.8 2001/10/05 16:09:44 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -45,38 +45,38 @@
// Constructor
G4DistributionGenerator::G4DistributionGenerator(G4RWTValOrderedVector<G4double>& x,
G4RWTValOrderedVector<G4double>& values)
G4DistributionGenerator::G4DistributionGenerator(G4std::vector<G4double>& x,
G4std::vector<G4double>& values)
{
_x = x;
// Check boundaries: must be size(x) = size(values) + 1
if (x.entries() != (values.entries() + 1))
if (x.size() != (values.size() + 1))
{ G4cout << " Inconsistent parameters in G4DistributionGenerator "
<< G4endl;
}
assert (x.entries() == (values.entries() + 1));
assert (x.size() == (values.size() + 1));
G4double tot = 0.;
int i;
for (i=0; i<values.entries(); i++) { tot += values[i]; }
unsigned int i;
for (i=0; i<values.size(); i++) { tot += values[i]; }
assert (tot > 0.);
_cumProb.insert(0.);
// _cumProb.insert(values[0] / tot);
_cumProb.push_back(0.);
// _cumProb.push_back(values[0] / tot);
G4double sum = 0.;
for (i=0; i<values.entries(); i++)
for (i=0; i<values.size(); i++)
{
sum += values[i];
_cumProb.insert(sum / tot); }
_cumProb.push_back(sum / tot); }
// Debugging
/*
for (i=0; i<values.entries(); i++)
for (i=0; i<values.size(); i++)
{ G4cout << values[i] << " " ; }
G4cout << " Integral = " << tot << G4endl;
for (i=0; i<_cumProb.entries(); i++)
for (i=0; i<_cumProb.size(); i++)
{
G4cout << "Variable " << _x[i]
<< " --- cumProb = " << _cumProb[i] << G4endl;
@@ -97,9 +97,9 @@ G4double G4DistributionGenerator::Generate(G4double ranflat)
{
G4double xRandom = _x[0];
G4int bin = _cumProb.entries() - 1;
int i;
for (i=1; i<_cumProb.entries(); i++)
G4int bin = _cumProb.size() - 1;
unsigned int i;
for (i=1; i<_cumProb.size(); i++)
{
if (ranflat >= _cumProb[i-1] && ranflat < _cumProb[i])
{
@@ -107,7 +107,7 @@ G4double G4DistributionGenerator::Generate(G4double ranflat)
}
}
if (bin >= 0 && bin < (_cumProb.entries()-1) && bin < (_x.entries()-1))
if (bin >= 0 && bin < static_cast<G4int>(_cumProb.size()-1) && bin < static_cast<G4int>(_x.size()-1))
{
G4double coeff = (ranflat - _cumProb[bin]) * (_x[bin+1] - _x[bin]) /
(_cumProb[bin+1] - _cumProb[bin]);
@@ -121,12 +121,12 @@ G4double G4DistributionGenerator::Generate(G4double ranflat)
}
else
{
{
// Debugging
/*
G4cout << "Bin " << bin << " "
<< _cumProb.entries() << " "
<< _x.entries()
<< _cumProb.size() << " "
<< _x.size()
<< G4endl;
*/
// End of debugging
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4KaonMinusAbsorption.cc,v 1.2.8.2 2001/06/28 20:20:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4KaonMinusAbsorption.cc,v 1.5 2001/10/19 11:55:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -169,14 +169,14 @@ G4VParticleChange* G4KaonMinusAbsorption::AtRestDoIt(
// probabilities are included.
if (random<=runningSum)
{
targetCharge = G4double((*theElementVector)(i2)->GetZ());
targetAtomicMass = (*theElementVector)(i2)->GetN();
targetCharge = G4double( ((*theElementVector)[i2])->GetZ());
targetAtomicMass = (*theElementVector)[i2]->GetN();
}
}
if (random>runningSum)
{
targetCharge = G4double((*theElementVector)(numberOfElements-1)->GetZ());
targetAtomicMass = (*theElementVector)(numberOfElements-1)->GetN();
targetCharge = G4double((*theElementVector)[numberOfElements-1]->GetZ());
targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
}
@@ -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
@@ -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. *
@@ -94,7 +94,7 @@ G4double G4MuMinusCaptureCascade::GetKShellEnergy(G4double Z)
G4double Xuser)
{
G4double Yuser = 0.0;
G4int i;
size_t i;
if(N < 1) return Yuser;
@@ -228,7 +228,7 @@ void G4MuMinusCaptureCascade::DoBoundMuonMinusDecay(G4double Z, G4double massA,
{
// Simulation on Decay of mu- on a K-shell of the muonic atom
G4double Energy, r, x;
G4double Energy, x;
G4double xmax = ( 1.0 + Emass*Emass/ (MuMass*MuMass) );
G4double KEnergy = GetKShellEnergy(Z);
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4MuonMinusCaptureAtRest.cc,v 1.5.8.2 2001/06/28 20:20:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4MuonMinusCaptureAtRest.cc,v 1.7 2001/08/01 17:12:31 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4NeutronCaptureAtRest.cc,v 1.2.8.2 2001/06/28 20:20:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NeutronCaptureAtRest.cc,v 1.5 2001/10/19 11:55:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -162,14 +162,14 @@ G4VParticleChange* G4NeutronCaptureAtRest::AtRestDoIt(
// probabilities are included.
if (random<=runningSum)
{
targetCharge = G4double((*theElementVector)(i2)->GetZ());
targetAtomicMass = (*theElementVector)(i2)->GetN();
targetCharge = G4double((*theElementVector)[i2]->GetZ());
targetAtomicMass = (*theElementVector)[i2]->GetN();
}
}
if (random>runningSum)
{
targetCharge = G4double((*theElementVector)(numberOfElements-1)->GetZ());
targetAtomicMass = (*theElementVector)(numberOfElements-1)->GetN();
targetCharge = G4double((*theElementVector)[numberOfElements-1]->GetZ());
targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusAbsorptionAtRest.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusAbsorptionAtRest.cc,v 1.9 2001/10/19 11:55:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -104,20 +104,20 @@ G4VParticleChange* G4PiMinusAbsorptionAtRest::AtRestDoIt(const G4Track& track, c
G4double Z;
G4double random = G4UniformRand();
const G4ElementVector* theElementVector = material->GetElementVector();
G4int i;
unsigned int i;
G4double sum = 0;
G4double totalsum=0;
for(i=0; i<material->GetNumberOfElements(); ++i)
{
if((*theElementVector)(i)->GetZ()!=1) totalsum+=material->GetFractionVector()[i];
if((*theElementVector)[i]->GetZ()!=1) totalsum+=material->GetFractionVector()[i];
}
for (i = 0; i<material->GetNumberOfElements(); ++i)
{
if((*theElementVector)(i)->GetZ()!=1) sum += material->GetFractionVector()[i];
if((*theElementVector)[i]->GetZ()!=1) sum += material->GetFractionVector()[i];
if ( sum/totalsum > random )
{
A = (*theElementVector)(i)->GetA()*mole/g;
Z = (*theElementVector)(i)->GetZ();
A = (*theElementVector)[i]->GetA()*mole/g;
Z = (*theElementVector)[i]->GetZ();
break;
}
}
@@ -146,13 +146,13 @@ G4VParticleChange* G4PiMinusAbsorptionAtRest::AtRestDoIt(const G4Track& track, c
G4double pNucleus = (stopAbsorption.RecoilMomentum()).mag();
G4ReactionProductVector* fragmentationProducts = stopDeexcitation.DoBreakUp(newA,newZ,excitation,pNucleus);
G4int nAbsorptionProducts = 0;
unsigned int nAbsorptionProducts = 0;
if (absorptionProducts != 0)
{ nAbsorptionProducts = absorptionProducts->entries(); }
{ nAbsorptionProducts = absorptionProducts->size(); }
G4int nFragmentationProducts = 0;
unsigned int nFragmentationProducts = 0;
if (fragmentationProducts != 0)
{ nFragmentationProducts = fragmentationProducts->entries(); }
{ nFragmentationProducts = fragmentationProducts->size(); }
if (verboseLevel>0)
{
@@ -167,18 +167,18 @@ G4VParticleChange* G4PiMinusAbsorptionAtRest::AtRestDoIt(const G4Track& track, c
aParticleChange.SetNumberOfSecondaries(G4int(nAbsorptionProducts + nFragmentationProducts));
for (i = 0; i<nAbsorptionProducts; i++)
{ aParticleChange.AddSecondary(absorptionProducts->at(i)); }
{ aParticleChange.AddSecondary((*absorptionProducts)[i]); }
// for (i = 0; i<nFragmentationProducts; i++)
// { aParticleChange.AddSecondary(fragmentationProducts->at(i)); }
for(i=0; i<nFragmentationProducts; i++)
{
G4DynamicParticle * aNew =
new G4DynamicParticle(fragmentationProducts->at(i)->GetDefinition(),
fragmentationProducts->at(i)->GetMomentum());
G4double newTime = aParticleChange.GetGlobalTime(fragmentationProducts->at(i)->GetFormationTime());
new G4DynamicParticle((*fragmentationProducts)[i]->GetDefinition(),
(*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;
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopAbsorption.cc,v 1.6.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopAbsorption.cc,v 1.10 2001/10/05 16:09:44 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -40,9 +40,7 @@
#include "G4PiMinusStopAbsorption.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -83,14 +81,14 @@ G4PiMinusStopAbsorption::~G4PiMinusStopAbsorption()
G4DynamicParticleVector* G4PiMinusStopAbsorption::DoAbsorption()
{
G4RWTPtrOrderedVector<G4ParticleDefinition>* defNucleons = _materialAlgo->DefinitionVector();
G4std::vector<G4ParticleDefinition*>* defNucleons = _materialAlgo->DefinitionVector();
G4double newA = _nucleusA;
G4double newZ = _nucleusZ;
if (defNucleons != 0)
{
for (G4int i=0; i<defNucleons->entries(); i++)
for (unsigned int i=0; i<defNucleons->size(); i++)
{
if ( (*defNucleons)[i] == G4Proton::Proton())
{
@@ -106,15 +104,15 @@ G4DynamicParticleVector* G4PiMinusStopAbsorption::DoAbsorption()
G4double mass = G4NucleiProperties::GetNuclearMass(newA,newZ);
G4RWTPtrOrderedVector<G4LorentzVector>* p4Nucleons = _materialAlgo->P4Vector(binding,mass);
G4std::vector<G4LorentzVector*>* p4Nucleons = _materialAlgo->P4Vector(binding,mass);
if (defNucleons != 0 && p4Nucleons != 0)
{
int nNucleons = p4Nucleons->entries();
unsigned int nNucleons = p4Nucleons->size();
G4double seen = _materialAlgo->FinalNucleons() / 2.;
G4int maxN = nNucleons;
if (defNucleons->entries() < nNucleons) { maxN = defNucleons->entries(); }
if (defNucleons->size() < nNucleons) { maxN = defNucleons->size(); }
for (G4int i=0; i<maxN; i++)
{
@@ -126,7 +124,7 @@ G4DynamicParticleVector* G4PiMinusStopAbsorption::DoAbsorption()
G4double ranflat = G4UniformRand();
if (ranflat < seen)
{ _absorptionProducts->append(product); }
{ _absorptionProducts->push_back(product); }
else
{ delete product; }
}
@@ -140,7 +138,7 @@ G4ThreeVector G4PiMinusStopAbsorption::RecoilMomentum()
{
G4ThreeVector pProducts(0.,0.,0.);
for (G4int i = 0; i< _absorptionProducts->entries(); i++)
for (unsigned int i = 0; i< _absorptionProducts->size(); i++)
{
pProducts = pProducts + (*_absorptionProducts)[i]->GetMomentum();
}
@@ -151,7 +149,7 @@ G4ThreeVector G4PiMinusStopAbsorption::RecoilMomentum()
G4int G4PiMinusStopAbsorption::NProtons()
{
G4int n = 0;
G4int entries = _absorptionProducts->entries();
G4int entries = _absorptionProducts->size();
for (int i = 0; i<entries; i++)
{
if ((*_absorptionProducts)[i]->GetDefinition() == G4Proton::Proton())
@@ -164,7 +162,7 @@ G4int G4PiMinusStopAbsorption::NProtons()
G4int G4PiMinusStopAbsorption::NNeutrons()
{
G4int n = 0;
G4int entries = _absorptionProducts->entries();
G4int entries = _absorptionProducts->size();
for (int i = 0; i<entries; i++)
{
if ((*_absorptionProducts)[i]->GetDefinition() == G4Neutron::Neutron())
@@ -183,7 +181,7 @@ G4double G4PiMinusStopAbsorption::Energy()
G4int nP = 0;
G4int nAbsorptionProducts = _absorptionProducts->entries();
G4int nAbsorptionProducts = _absorptionProducts->size();
for (int i = 0; i<nAbsorptionProducts; i++)
{
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopAl.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopAl.cc,v 1.7 2001/10/04 20:00:41 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,10 +42,6 @@
#include "G4PiMinusStopAl.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "globals.hh"
#include "Randomize.hh"
#include "G4Proton.hh"
@@ -107,28 +103,28 @@ G4PiMinusStopAl::G4PiMinusStopAl()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopC.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopC.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopC.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -123,28 +121,28 @@ G4PiMinusStopC::G4PiMinusStopC()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopCo.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopCo.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopCo.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -109,28 +107,28 @@ G4PiMinusStopCo::G4PiMinusStopCo()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopCu.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopCu.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopCu.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -108,28 +106,28 @@ G4PiMinusStopCu::G4PiMinusStopCu()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition* >();
_momenta = new G4std::vector<G4LorentzVector* >();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopLi.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopLi.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopLi.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -113,28 +111,28 @@ G4PiMinusStopLi::G4PiMinusStopLi()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopMaterial.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopMaterial.cc,v 1.8 2001/10/05 16:09:44 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopMaterial.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -65,8 +63,6 @@
G4PiMinusStopMaterial::G4PiMinusStopMaterial()
{
// _definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
// _momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = 0;
_momenta = 0;
_distributionE = 0;
@@ -83,29 +79,29 @@ G4PiMinusStopMaterial::~G4PiMinusStopMaterial()
if (_definitions != 0) delete _definitions;
_definitions = 0;
_momenta->clearAndDestroy();
for(unsigned int i=0; i<_momenta->size(); i++) delete(*_momenta)[i];
if (_momenta != 0) delete _momenta;
delete _distributionE;
delete _distributionAngle;
}
G4RWTPtrOrderedVector<G4ParticleDefinition>* G4PiMinusStopMaterial::DefinitionVector()
G4std::vector<G4ParticleDefinition*>* G4PiMinusStopMaterial::DefinitionVector()
{
_definitions->append(G4Neutron::Neutron());
_definitions->push_back(G4Neutron::Neutron());
G4double ranflat = G4UniformRand();
if (ranflat < theR)
{ _definitions->append(G4Proton::Proton()); }
{ _definitions->push_back(G4Proton::Proton()); }
else
{ _definitions->append(G4Neutron::Neutron()); }
{ _definitions->push_back(G4Neutron::Neutron()); }
return _definitions;
}
G4RWTPtrOrderedVector<G4LorentzVector>* G4PiMinusStopMaterial::P4Vector(const G4double binding,
G4std::vector<G4LorentzVector*>* G4PiMinusStopMaterial::P4Vector(const G4double binding,
const G4double massNucleus)
{
@@ -164,8 +160,8 @@ G4RWTPtrOrderedVector<G4LorentzVector>* G4PiMinusStopMaterial::P4Vector(const G4
} while ((eKin1 + eKin2 + eRecoil) > availableE);
_momenta->append(new G4LorentzVector(p1));
_momenta->append(new G4LorentzVector(p2));
_momenta->push_back(new G4LorentzVector(p1));
_momenta->push_back(new G4LorentzVector(p2));
return _momenta;
@@ -192,7 +188,7 @@ G4double G4PiMinusStopMaterial::RecoilEnergy(const G4double mass)
{
G4ThreeVector p(0.,0.,0.);
for (G4int i = 0; i< _momenta->entries(); i++)
for (unsigned int i = 0; i< _momenta->size(); i++)
{
p = p + (*_momenta)[i]->vect();
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopN.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopN.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopN.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -107,28 +105,28 @@ G4PiMinusStopN::G4PiMinusStopN()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopO.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopO.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopO.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -107,28 +105,28 @@ G4PiMinusStopO::G4PiMinusStopO()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopPb.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopPb.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopPb.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -107,28 +105,28 @@ G4PiMinusStopPb::G4PiMinusStopPb()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PiMinusStopTa.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PiMinusStopTa.cc,v 1.7 2001/10/04 20:00:42 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,7 @@
#include "G4PiMinusStopTa.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -107,28 +105,28 @@ G4PiMinusStopTa::G4PiMinusStopTa()
// R ratio
theR = 1. / (1. + npRatio);
_definitions = new G4RWTPtrOrderedVector<G4ParticleDefinition>();
_momenta = new G4RWTPtrOrderedVector<G4LorentzVector>();
_definitions = new G4std::vector<G4ParticleDefinition*>();
_momenta = new G4std::vector<G4LorentzVector*>();
G4RWTValOrderedVector<double> eKinVector;
G4RWTValOrderedVector<double> eKinDataVector;
G4std::vector<double> eKinVector;
G4std::vector<double> eKinDataVector;
int i;
for (i=0; i<eKinEntries; i++)
{
eKinVector.insert(eKin[i]);
eKinDataVector.insert(eKinData[i]);
eKinVector.push_back(eKin[i]);
eKinDataVector.push_back(eKinData[i]);
}
eKinVector.insert(eKin[eKinEntries]);
eKinVector.push_back(eKin[eKinEntries]);
_distributionE = new G4DistributionGenerator(eKinVector,eKinDataVector);
G4RWTValOrderedVector<double> angleVector;
G4RWTValOrderedVector<double> angleDataVector;
G4std::vector<double> angleVector;
G4std::vector<double> angleDataVector;
for (i=0; i<angleEntries; i++)
{
angleVector.insert(angle[i]);
angleDataVector.insert(angleData[i]);
angleVector.push_back(angle[i]);
angleDataVector.push_back(angleData[i]);
}
angleVector.insert(angle[angleEntries]);
angleVector.push_back(angle[angleEntries]);
_distributionAngle = new G4DistributionGenerator(angleVector,angleDataVector);
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4PionMinusAbsorptionAtRest.cc,v 1.2.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PionMinusAbsorptionAtRest.cc,v 1.6 2001/10/19 11:55:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// --------------------------------------------------------------
// GEANT 4 class implementation file --- Copyright CERN 1998
@@ -51,9 +51,9 @@
G4PionMinusAbsorptionAtRest::G4PionMinusAbsorptionAtRest(const G4String& processName)
: G4VRestProcess (processName), // initialization
massPionMinus(G4PionMinus::PionMinus()->GetPDGMass()/GeV),
pdefPionMinus(G4PionMinus::PionMinus()),
pdefGamma(G4Gamma::Gamma()),
pdefPionZero(G4PionZero::PionZero()),
pdefPionMinus(G4PionMinus::PionMinus()),
pdefProton(G4Proton::Proton()),
pdefNeutron(G4Neutron::Neutron()),
pdefDeuteron(G4Deuteron::Deuteron()),
@@ -164,14 +164,14 @@ G4VParticleChange* G4PionMinusAbsorptionAtRest::AtRestDoIt(
// probabilities are included.
if (random<=runningSum)
{
targetCharge = G4double((*theElementVector)(i2)->GetZ());
targetAtomicMass = (*theElementVector)(i2)->GetN();
targetCharge = G4double((*theElementVector)[i2]->GetZ());
targetAtomicMass = (*theElementVector)[i2]->GetN();
}
}
if (random>runningSum)
{
targetCharge = G4double((*theElementVector)(numberOfElements-1)->GetZ());
targetAtomicMass = (*theElementVector)(numberOfElements-1)->GetN();
targetCharge = G4double((*theElementVector)[numberOfElements-1]->GetZ());
targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
}
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4StopDeexcitation.cc,v 1.4.8.2 2001/06/28 20:20:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StopDeexcitation.cc,v 1.7 2001/10/04 20:00:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -40,9 +40,7 @@
#include "G4StopDeexcitation.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "g4rw/cstring.h"
#include "g4std/vector"
#include "globals.hh"
#include "Randomize.hh"
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4StopDummyDeexcitation.cc,v 1.4.8.2 2001/06/28 20:20:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StopDummyDeexcitation.cc,v 1.7 2001/10/04 20:00:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -42,9 +42,6 @@
#include "G4StopDummyDeexcitation.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "globals.hh"
#include "G4DynamicParticleVector.hh"
#include "G4ThreeVector.hh"
@@ -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. *
@@ -75,14 +75,14 @@ G4Element* G4StopElementSelector::GetElement(const G4Material* aMaterial)
const G4int numberOfElements = aMaterial->GetNumberOfElements();
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
if(1 == numberOfElements) return (*theElementVector)(0);
if(1 == numberOfElements) return (*theElementVector)[0];
const G4double* theAtomicNumberDensity = aMaterial->GetAtomicNumDensityVector();
G4double sum = 0.0;
for ( i=0; i < numberOfElements; i++ ) {
Z = (*theElementVector)(i)->GetZ();
Z = (*theElementVector)[i]->GetZ();
// Halogens
if( (9.0 == Z) || (17.0 == Z) || (35.0 == Z) || (53.0 == Z) || (85.0 == Z) ) {
@@ -105,7 +105,7 @@ G4Element* G4StopElementSelector::GetElement(const G4Material* aMaterial)
// Selection of element
do {
i++;
Z = (*theElementVector)(i)->GetZ();
Z = (*theElementVector)[i]->GetZ();
// Galogens
if( (9.0 == Z) || (17.0 == Z) || (35.0 == Z) || (53.0 == Z) || (85.0 == Z) ) {
@@ -121,7 +121,7 @@ G4Element* G4StopElementSelector::GetElement(const G4Material* aMaterial)
}
} while ( (sum < random) && (i < numberOfElements - 1) );
return (*theElementVector)(i);
return (*theElementVector)[i];
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -198,7 +198,7 @@ G4double G4StopElementSelector::GetMuonCaptureRate(G4double Z, G4double A)
(2.0 * (A - Z) / Z + abs(a2ze - 1.) ) * b0c / (A * 4.) );
// == Mu capture data are taken if exist
for (G4int j = 0; j < ListZE; j++) {
for (unsigned int j = 0; j < ListZE; j++) {
if( ListZExp[j] == i + 1) {
lambda = ListCaptureVel[j] / microsecond;
break;
@@ -14,15 +14,15 @@
// * 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. *
// ********************************************************************
//
//
// $Id: G4StopTheoDeexcitation.cc,v 1.4.8.2 2001/06/28 20:20:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4StopTheoDeexcitation.cc,v 1.7 2001/10/04 20:00:43 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1998
@@ -44,9 +44,6 @@
#include "G4StopTheoDeexcitation.hh"
#include "g4rw/tpordvec.h"
#include "g4rw/tvordvec.h"
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"