Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
+18
View File
@@ -0,0 +1,18 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4cuts
# Package: Geant4.src.G4processes.G4cuts
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:51:51 bmorgan Exp $
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+7 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.33 2009/11/12 00:20:03 kurasige Exp $
$Id: History,v 1.35 2010/10/07 15:33:46 kurasige Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,12 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Oct. 7th, 2010 - H.Kurashige (procuts-V09-03-01)
- Fixed a possible memory leak soource
Jan. 22th, 2010 - H.Kurashige (procuts-V09-03-00)
- Fixed G4ProductionCutTable to solve problems with zero range for protons
Nov. 12th, 2009 - H.Kurashige (procuts-V09-02-08)
- Correfct spelling of /cuts/setMaxCutEnergy command
+76
View File
@@ -0,0 +1,76 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4cuts
# Package: Geant4.src.G4processes.G4cuts
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
# $Id: sources.cmake,v 1.1 2010/09/29 18:52:00 bmorgan Exp $
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4cuts
HEADERS
G4MCCIndexConversionTable.hh
G4MaterialCutsCouple.hh
G4PhysicsTableHelper.hh
G4ProductionCuts.hh
G4ProductionCutsTable.hh
G4ProductionCutsTableMessenger.hh
G4RToEConvForElectron.hh
G4RToEConvForGamma.hh
G4RToEConvForPositron.hh
G4RToEConvForProton.hh
G4VRangeToEnergyConverter.hh
SOURCES
G4MCCIndexConversionTable.cc
G4MaterialCutsCouple.cc
G4PhysicsTableHelper.cc
G4ProductionCuts.cc
G4ProductionCutsTable.cc
G4ProductionCutsTableMessenger.cc
G4RToEConvForElectron.cc
G4RToEConvForGamma.cc
G4RToEConvForPositron.cc
G4RToEConvForProton.cc
G4VRangeToEnergyConverter.cc
GRANULAR_DEPENDENCIES
G4geometrymng
G4globman
G4intercoms
G4materials
G4partman
G4procman
GLOBAL_DEPENDENCIES
G4geometry
G4global
G4intercoms
G4materials
G4particles
LINK_LIBRARIES
)
# List any source specific properties here
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4PhysicsTableHelper.cc,v 1.6 2009/08/01 07:57:13 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4PhysicsTableHelper.cc,v 1.7 2010/10/07 15:27:56 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -142,6 +142,7 @@ G4bool G4PhysicsTableHelper::RetrievePhysicsTable(G4PhysicsTable* physTable,
G4cerr << "Fail to retreive from "<< fileName << G4endl;
}
#endif
delete tempTable;
return false;
}
@@ -160,6 +161,7 @@ G4bool G4PhysicsTableHelper::RetrievePhysicsTable(G4PhysicsTable* physTable,
G4cerr << G4endl;
}
#endif
delete tempTable;
return false;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ProductionCutsTable.cc,v 1.25 2009/11/11 03:20:22 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4ProductionCutsTable.cc,v 1.27 2010/01/22 11:10:26 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04-beta-01 $
//
//
// --------------------------------------------------------------
@@ -251,9 +251,9 @@ void G4ProductionCutsTable::UpdateCoupleTable(G4VPhysicalVolume* currentWorld)
}
if (verboseLevel>2) {
timer.Stop();
std::cout << "G4ProductionCutsTable::UpdateCoupleTable "
G4cout << "G4ProductionCutsTable::UpdateCoupleTable "
<< " elapsed time for calculation of energy cuts " << G4endl;
std::cout << timer <<G4endl;
G4cout << timer <<G4endl;
}
// resize Range/Energy cuts double vectors if new couple is made
@@ -290,7 +290,8 @@ G4double G4ProductionCutsTable::ConvertRangeToEnergy(
if (material ==0) return -1.0;
// check range
if (range <=0.0) return -1.0;
if (range ==0.0) return 0.0;
if (range <0.0) return -1.0;
// check particle
G4int index = G4ProductionCuts::GetIndex(particle);
@@ -921,9 +922,12 @@ G4ProductionCutsTable::CheckMaterialCutsCoupleInfo(const G4String& directory,
G4ProductionCuts* aCut = aCouple->GetProductionCuts();
G4bool fRatio = true;
for (size_t j=0; j< NumberOfG4CutIndex; j++) {
G4double ratio = cutValues[j]/aCut->GetProductionCut(j);
fRatio = fRatio && (0.999<ratio) && (ratio<1.001) ;
}
// check ratio only if values are not the same
if (cutValues[j] != aCut->GetProductionCut(j)) {
G4double ratio = cutValues[j]/aCut->GetProductionCut(j);
fRatio = fRatio && (0.999<ratio) && (ratio<1.001) ;
}
}
if (!fRatio) continue;
// MCC matched
fOK = true;