Import Geant4 3.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:03:00 +02:00
parent cfcb558cfe
commit 137e303ecc
2843 changed files with 37082 additions and 38426 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ParticleWithCuts.cc,v 1.6 1999/12/15 14:51:14 gunter Exp $
// GEANT4 tag $Name: geant4-03-00 $
// $Id: G4ParticleWithCuts.cc,v 1.8 2001/03/12 05:58:22 kurasige Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// --------------------------------------------------------------
@@ -24,6 +24,7 @@
// remove BuildPhysicTabel() 06 June 1998 H.Kurashige
// bug in CalcEnergyCuts is corrected , 22 June 1998 L.Urban
// modify CalcEnergyCuts 09 Nov. 1998, L.Urban
// added RestoreCuts H.Kurashige 09 Mar. 2001
// ------------------------------------------------------------
#include "globals.hh"
#include "G4ParticleWithCuts.hh"
@@ -174,8 +175,9 @@ void G4ParticleWithCuts::BuildLossTable()
if (NumberOfElements ==0)
{
NumberOfElements = G4Element::GetNumberOfElements();
theLossTable = new
G4LossTable(G4Element::GetNumberOfElements());
theLossTable = new G4LossTable();
theLossTable->reserve(G4Element::GetNumberOfElements());
#ifdef G4VERBOSE
if (GetVerboseLevel()>2) {
G4cout << "G4ParticleWithCuts::BuildLossTable() ";
@@ -274,6 +276,27 @@ G4double G4ParticleWithCuts::ConvertCutToKineticEnergy(G4RangeVector* rangeVecto
}
}
// **********************************************************************
// **************************** RestoreCuts *********************************
// **********************************************************************
void G4ParticleWithCuts::RestoreCuts(G4double cutInLength,
const G4double* cutInEnergy )
{
// Set cut in stopping range
theCutInMaxInteractionLength = cutInLength;
const G4MaterialTable* materialTable = G4Material::GetMaterialTable();
// Restore the vector of cuts in energy corresponding to the range cut
if(theKineticEnergyCuts) delete [] theKineticEnergyCuts;
theKineticEnergyCuts = new G4double [materialTable->length()];
for (G4int j=0; j<materialTable->length(); j +=1) {
theKineticEnergyCuts[j] = cutInEnergy[j];
}
}
// **********************************************************************
// **************************** SetCuts *********************************
// **********************************************************************