Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.18 2006/06/09 00:50:20 kurasige Exp $
$Id: History,v 1.19 2007/03/15 04:06:40 kurasige Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,9 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
March 15th, 2007 - H.Kurashige (procuts-V08-02-00)
- Add G4ProductionCutsTable::ConvertRangeToEnergy
June 9th, 2006 - H.Kurashige (procuts-V08-00-03)
- Fix memory leak in G4ProductionCutsTable and G4PhysicsTableHelper
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProductionCutsTable.hh,v 1.7 2006/06/29 19:29:50 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4ProductionCutsTable.hh,v 1.8 2007/03/15 04:06:40 kurasige Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// ------------------------------------------------------------
@@ -92,6 +92,7 @@ class G4ProductionCutsTable
G4double GetHighEdgeEnergy() const;
// These methods get the limits of energy cuts for all particles.
void DumpCouples() const;
// Display a list of registored couples
@@ -156,7 +157,14 @@ class G4ProductionCutsTable
G4ProductionCuts* GetDefaultProductionCuts() const;
// This method returns the default production cuts.
G4double ConvertRangeToEnergy(const G4ParticleDefinition* particle,
const G4Material* material,
G4double range );
// This method gives energy corresponding to range value
//
// -1 is returned if particle or material is not found.
private:
void ScanAndSetCouple(G4LogicalVolume* aLV,
G4MaterialCutsCouple* aCouple,
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProductionCutsTable.cc,v 1.15 2006/06/29 19:30:16 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4ProductionCutsTable.cc,v 1.16 2007/03/15 04:06:40 kurasige Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// --------------------------------------------------------------
@@ -242,6 +242,41 @@ void G4ProductionCutsTable::UpdateCoupleTable(G4VPhysicalVolume* currentWorld)
}
}
G4double G4ProductionCutsTable::ConvertRangeToEnergy(
const G4ParticleDefinition* particle,
const G4Material* material,
G4double range
)
{
// This method gives energy corresponding to range value
// check material
if (material ==0) return -1.0;
// check range
if (range <=0.0) return -1.0;
// check particle
G4int index = -1;
if (particle->GetParticleName() == "gamma") index = 0;
if (particle->GetParticleName() == "e-") index = 1;
if (particle->GetParticleName() == "e+") index = 2;
if (index<0) {
#ifdef G4VERBOSE
if (verboseLevel >1) {
G4cout << "G4ProductionCutsTable::ConvertRangeToEnergy" ;
G4cout << particle->GetParticleName() << " has no cut value " << G4endl;
}
#endif
return -1.0;
}
return converters[index]->Convert(range, material);
}
void G4ProductionCutsTable::SetEnergyRange(G4double lowedge, G4double highedge)
{
G4VRangeToEnergyConverter::SetEnergyRange(lowedge,highedge);