Skip to content
Snippets Groups Projects
Commit 2636a021 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

v95r2p6

parent 15d1b05d
No related branches found
No related tags found
No related merge requests found
Showing
with 1069 additions and 78 deletions
#ifndef HadronPhysicsQGSP_BERT_HP_h
#define HadronPhysicsQGSP_BERT_HP_h 1
#include "globals.hh"
#include "G4ios.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4HadronQEDBuilder.hh"
#include "G4StoppingHadronBuilder.hh"
#include "G4MiscLHEPBuilder.hh"
#include "G4PiKBuilder.hh"
#include "G4LEPPiKBuilder.hh"
#include "G4QGSPPiKBuilder.hh"
#include "G4BertiniPiKBuilder.hh"
#include "G4ProtonBuilder.hh"
#include "G4LEPProtonBuilder.hh"
#include "G4QGSPProtonBuilder.hh"
#include "G4BertiniProtonBuilder.hh"
#include "G4NeutronBuilder.hh"
#include "G4LEPNeutronBuilder.hh"
#include "G4QGSPNeutronBuilder.hh"
#include "G4BertiniNeutronBuilder.hh"
#include "G4NeutronHPBuilder.hh"
class HadronPhysicsQGSP_BERT_HP : public G4VPhysicsConstructor
{
public:
HadronPhysicsQGSP_BERT_HP(const G4String& name ="hadron");
virtual ~HadronPhysicsQGSP_BERT_HP();
public:
virtual void ConstructParticle();
virtual void ConstructProcess();
private:
G4NeutronBuilder theNeutrons;
G4LEPNeutronBuilder theLEPNeutron;
G4QGSPNeutronBuilder theQGSPNeutron;
G4BertiniNeutronBuilder theBertiniNeutron;
G4NeutronHPBuilder theHPNeutron;
G4PiKBuilder thePiK;
G4LEPPiKBuilder theLEPPiK;
G4QGSPPiKBuilder theQGSPPiK;
G4BertiniPiKBuilder theBertiniPiK;
G4ProtonBuilder thePro;
G4LEPProtonBuilder theLEPPro;
G4QGSPProtonBuilder theQGSPPro;
G4BertiniProtonBuilder theBertiniPro;
G4MiscLHEPBuilder theMiscLHEP;
G4StoppingHadronBuilder theStoppingHadron;
G4HadronQEDBuilder theHadronQED;
};
// 2002 by J.P. Wellisch
#endif
......@@ -3,7 +3,7 @@
# Maintainer : Gloria CORTI
#============================================================================
package G4LHCblists
version v2r2
version v3r0
# Structure, i.e. directories to process.
#============================================================================
......
v2r2
v3r0
......@@ -4,6 +4,11 @@
! Purpose : Private LHCb physics lists
!-----------------------------------------------------------------------------
!======================== G4LHCblists v3r0 2013-09-16 ========================
! 2013-09-16 - Gloria Corti
- Remove obsolete header of physics list that was left over
. HadronPhysicsQGSP_BERT_HP.hh
!======================== G4LHCblists v2r2 2011-10-03 ========================
! 2011-10-03 - Gloria Corti
- Add new list with suggestion from Matt Reid for improvement of Multiple
......
# This configuration is not really for the package, but
# to build Geant4.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(G4VERBOSE OFF)
else()
set(G4VERBOSE ON)
endif()
include(ExternalProject)
ExternalProject_Add(Geant4
URL http://geant4.cern.ch/support/source/geant${Geant4_version}.tar.gz
PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Geant4/G4config/patches/patch_g4_sources.py ${CMAKE_SOURCE_DIR} ${Geant4_version}
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/toolchain.cmake
-DGEANT4_INSTALL_DATA=OFF
-DGEANT4_USE_SYSTEM_CLHEP=ON
-DGEANT4_USE_XM=ON
-DGEANT4_USE_GDML=ON
-DGEANT4_USE_OPENGL=ON
-DGEANT4_USE_OPENGL_X11=ON
-DGEANT4_USE_RAYTRACER_X11=ON
-DGEANT4_USE_NETWORKVRML=ON
-DGEANT4_USE_NETWORKDAWN=ON
-DGEANT4_USE_INVENTOR=OFF
-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/InstallArea/$ENV{CMTCONFIG}
-DCMAKE_INSTALL_INCLUDEDIR=../include
-DCMAKE_INSTALL_DATAROOTDIR=../share
-DGEANT4_BUILD_VERBOSE_CODE=${G4VERBOSE}
-DCMAKE_USE_CCACHE=${CMAKE_USE_CCACHE}
-DCMAKE_USE_DISTCC=${CMAKE_USE_DISTCC}
-DLCG_USE_NATIVE_COMPILER=${LCG_USE_NATIVE_COMPILER}
)
# Hardcoded list of external packages used by Geant4, needed to prepare the
# runtime environment.
foreach(ext CLHEP EXPAT XercesC X11 OpenGL Motif)
find_package(${ext})
endforeach()
package G4config
version v95r2p5
version v95r2p6
branches cmt doc
......@@ -11,13 +11,14 @@ use CLHEP v* LCG_Interfaces
#==============================================================================
# set versions of Geant4
#==============================================================================
set G4_native_version "9.5.p02"
set G4VERS v95r2p5
set G4_native_version "9.5.p02" \
override-geant4-version "${G4_NATIVE_VERSION}"
set G4VERS v95r2p6
# =============================================================================
# set Geant4 environment variables
#=============================================================================
set G4PATH "${SITEROOT}/sw/lcg/external/geant4"
set G4PATH "${LCG_external}/geant4"
set G4SHARE "${G4PATH}/${G4_native_version}/share"
......
v95r2p5
v95r2p6
......@@ -4,6 +4,41 @@
! Purpose : Configuration package for Geant4 build
!-----------------------------------------------------------------------------
! ======================= G4config v95r2p6 2013-12-19 ========================
! 2013-12-19 - Nigel Watson
- Updated Marco's (much improved, for cmake) source patching script
scripts for another fix in Geant4/G4processes.
! 2013-09-17 - Marco Clemencic
- Fixes for compatibility between CMake build and CMT.
! 2013-09-12 - Marco Clemencic
- Disabled Geant4 backward-compatibility and config scripts in the CMake
build (causing troubles with the nightly builds).
! 2013-09-11 - Marco Clemencic
- Splitted the top level CMakeLists.txt to better fit in the Gaudi CMake
configuration framework.
- Fixed the LD_LIBRARY_PATH for the externals.
! 2013-09-11 - Marco Clemencic
- Modified the CMake configuration to use the CLHEP granular libraries
instead of the monolithic one (importing FindCLHEP.cmake from Gaudi).
! 2013-09-10 - Marco Clemencic
- Added a script and a patch file to patch the Geant4 sources for the build
with CMake a-la LHCb.
! 2013-08-02 - Marco Clemencic
- Modified the configuration to allow overriding of the Geant4 version to
use.
To pick up a non default version, one needs to add the CMT tag
'override-geant4-version' and set the new verison in the environment
variable G4_NATIVE_VERSION. For example
export CMTEXTRATAGS=override-geant4-version,$CMTEXTRATAGS
export G4_NATIVE_VERSION=9.6.p02
! ======================= G4config v95r2p4 2013-05-16 ========================
- Latest attempt to fix FTF-related job hangs (new G4processes/diffractive)
......
# - Try to find CLHEP
# Defines:
#
# CLHEP_FOUND
# CLHEP_VERSION
# CLHEP_INCLUDE_DIR
# CLHEP_INCLUDE_DIRS (not cached)
# CLHEP_<component>_LIBRARY
# CLHEP_<component>_FOUND
# CLHEP_LIBRARIES (not cached)
# CLHEP_LIBRARY_DIRS (not cached)
#
# Note: version detection inspired by FindBoost.cmake
find_path(CLHEP_INCLUDE_DIR CLHEP/ClhepVersion.h
HINTS $ENV{CLHEP_ROOT_DIR}/include ${CLHEP_ROOT_DIR}/include)
if(CLHEP_INCLUDE_DIR)
if(NOT DEFINED CLHEP_VERSION)
file(READ "${CLHEP_INCLUDE_DIR}/CLHEP/ClhepVersion.h" _CLHEP_VERSION_H_CONTENTS)
string(REGEX REPLACE ".*static std::string String\\(\\)[^\"]*return \"([^\"]*)\".*" "\\1" CLHEP_VERSION "${_CLHEP_VERSION_H_CONTENTS}")
set(CLHEP_VERSION ${CLHEP_VERSION} CACHE INTERNAL "Detected version of CLHEP")
message(STATUS "CLHEP version: ${CLHEP_VERSION}")
endif()
endif()
set(_CLHEP_COMPONENTS Cast Evaluator Exceptions GenericFunctions Geometry Random RandomObjects RefCount Vector Matrix)
foreach(component ${_CLHEP_COMPONENTS})
find_library(CLHEP_${component}_LIBRARY NAMES CLHEP-${component}-${CLHEP_VERSION}
HINTS $ENV{CLHEP_ROOT_DIR}/lib ${CLHEP_ROOT_DIR}/lib)
if (CLHEP_${component}_LIBRARY)
set(CLHEP_${component}_FOUND 1)
list(APPEND CLHEP_LIBRARIES ${CLHEP_${component}_LIBRARY})
get_filename_component(libdir ${CLHEP_${component}_LIBRARY} PATH)
list(APPEND CLHEP_LIBRARY_DIRS ${libdir})
else()
set(CLHEP_${component}_FOUND 0)
endif()
mark_as_advanced(CLHEP_${component}_LIBRARY)
endforeach()
if(CLHEP_LIBRARY_DIRS)
list(REMOVE_DUPLICATES CLHEP_LIBRARY_DIRS)
endif()
set(CLHEP_INCLUDE_DIRS ${CLHEP_INCLUDE_DIR})
# handle the QUIETLY and REQUIRED arguments and set CLHEP_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLHEP DEFAULT_MSG CLHEP_INCLUDE_DIR CLHEP_LIBRARIES)
mark_as_advanced(CLHEP_FOUND CLHEP_INCLUDE_DIR)
# Hack for Geeant4 compatibility (we choose a random library)
set(CLHEP_LIBRARY ${CLHEP_Random_LIBRARY})
diff -urN a/geant4.9.5.p02/cmake/Modules/Geant4MakeRules_cxx.cmake b/geant4.9.5.p02/cmake/Modules/Geant4MakeRules_cxx.cmake
--- a/geant4.9.5.p02/cmake/Modules/Geant4MakeRules_cxx.cmake 2012-10-30 11:15:56.000000000 +0100
+++ b/geant4.9.5.p02/cmake/Modules/Geant4MakeRules_cxx.cmake 2013-09-10 11:49:35.564460478 +0200
@@ -120,3 +120,29 @@
# - CMake may do a reasonable job on its own here...
endif()
+# distcc and ccache support
+find_program(ccache_cmd ccache)
+find_program(distcc_cmd distcc)
+mark_as_advanced(ccache_cmd distcc_cmd)
+
+if(ccache_cmd)
+ option(CMAKE_USE_CCACHE "Use ccache to speed up compilation." OFF)
+ if(CMAKE_USE_CCACHE)
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${ccache_cmd})
+ message(STATUS "Using ccache for building")
+ endif()
+endif()
+
+if(distcc_cmd)
+ option(CMAKE_USE_DISTCC "Use distcc to speed up compilation." OFF)
+ if(CMAKE_USE_DISTCC)
+ if(CMAKE_USE_CCACHE)
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "CCACHE_PREFIX=${distcc_cmd} ${ccache_cmd}")
+ message(STATUS "Enabling distcc builds in ccache")
+ else()
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${distcc_cmd})
+ message(STATUS "Using distcc for building")
+ endif()
+ endif()
+endif()
+
diff -urN a/geant4.9.5.p02/cmake/Modules/Geant4OptionalComponents.cmake b/geant4.9.5.p02/cmake/Modules/Geant4OptionalComponents.cmake
--- a/geant4.9.5.p02/cmake/Modules/Geant4OptionalComponents.cmake 2012-10-30 11:15:57.000000000 +0100
+++ b/geant4.9.5.p02/cmake/Modules/Geant4OptionalComponents.cmake 2013-06-11 14:23:56.000000000 +0200
@@ -38,7 +38,7 @@
if(GEANT4_USE_SYSTEM_CLHEP)
# We keep this as required, because if the user chooses to use a
# system option we assume that we absolutely, positively require this.
- find_package(CLHEP 2.1.0.1 REQUIRED)
+ find_package(CLHEP REQUIRED)
set(GEANT4_USE_SYSTEM_CLHEP TRUE)
else()
set(CLHEP_FOUND TRUE)
diff -urN a/geant4.9.5.p02/source/CMakeLists.txt b/geant4.9.5.p02/source/CMakeLists.txt
--- a/geant4.9.5.p02/source/CMakeLists.txt 2012-10-30 11:20:06.000000000 +0100
+++ b/geant4.9.5.p02/source/CMakeLists.txt 2013-06-11 18:10:38.000000000 +0200
@@ -11,11 +11,8 @@
#
#------------------------------------------------------------------------------
-add_subdirectory(analysis)
add_subdirectory(digits_hits)
-add_subdirectory(error_propagation)
add_subdirectory(event)
-add_subdirectory(externals)
# Target G4g3tog4 is optional based on user selection...
if(GEANT4_USE_G3TOG4)
diff -urN a/geant4.9.5.p02/source/interfaces/basic/sources.cmake b/geant4.9.5.p02/source/interfaces/basic/sources.cmake
--- a/geant4.9.5.p02/source/interfaces/basic/sources.cmake 2012-10-30 11:16:07.000000000 +0100
+++ b/geant4.9.5.p02/source/interfaces/basic/sources.cmake 2013-06-11 18:34:18.000000000 +0200
@@ -147,6 +147,7 @@
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
+ G4UIcommon
G4global
G4intercoms
LINK_LIBRARIES
diff -urN a/geant4.9.5.p02/source/interfaces/CMakeLists.txt b/geant4.9.5.p02/source/interfaces/CMakeLists.txt
--- a/geant4.9.5.p02/source/interfaces/CMakeLists.txt 2012-10-30 11:16:09.000000000 +0100
+++ b/geant4.9.5.p02/source/interfaces/CMakeLists.txt 2013-06-11 18:33:51.000000000 +0200
@@ -18,11 +18,27 @@
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
- GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4interfaces
+# GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4interfaces
+# COMPONENTS
+# GAG/sources.cmake
+# basic/sources.cmake
+# common/sources.cmake
+#)
+
+ GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4UIcommon
COMPONENTS
- GAG/sources.cmake
- basic/sources.cmake
common/sources.cmake
-)
+ )
+
+ GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4UIbasic
+ COMPONENTS
+ basic/sources.cmake
+ )
+
+ GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4UIGAG
+ COMPONENTS
+ GAG/sources.cmake
+ )
+
endif()
diff -urN a/geant4.9.5.p02/source/interfaces/GAG/sources.cmake b/geant4.9.5.p02/source/interfaces/GAG/sources.cmake
--- a/geant4.9.5.p02/source/interfaces/GAG/sources.cmake 2012-10-30 11:16:09.000000000 +0100
+++ b/geant4.9.5.p02/source/interfaces/GAG/sources.cmake 2013-06-11 18:34:57.000000000 +0200
@@ -39,6 +39,7 @@
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
+ G4UIcommon
G4global
G4intercoms
LINK_LIBRARIES
diff -urN a/geant4.9.5.p02/source/persistency/CMakeLists.txt b/geant4.9.5.p02/source/persistency/CMakeLists.txt
--- a/geant4.9.5.p02/source/persistency/CMakeLists.txt 2012-10-30 11:20:00.000000000 +0100
+++ b/geant4.9.5.p02/source/persistency/CMakeLists.txt 2013-06-11 18:45:38.000000000 +0200
@@ -12,30 +12,17 @@
#
#------------------------------------------------------------------------------
-add_subdirectory(ascii)
-
# GDML only if required
if(GEANT4_USE_GDML)
add_subdirectory(gdml)
endif()
-add_subdirectory(mctruth)
-
-
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
if(GEANT4_USE_GDML)
GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4persistency
COMPONENTS
- ascii/sources.cmake
gdml/sources.cmake
- mctruth/sources.cmake
- )
- else()
- GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4persistency
- COMPONENTS
- ascii/sources.cmake
- mctruth/sources.cmake
)
endif()
endif()
diff -urN a/geant4.9.5.p02/source/physics_lists/builders/sources.cmake b/geant4.9.5.p02/source/physics_lists/builders/sources.cmake
--- a/geant4.9.5.p02/source/physics_lists/builders/sources.cmake 2012-10-30 11:16:57.000000000 +0100
+++ b/geant4.9.5.p02/source/physics_lists/builders/sources.cmake 2013-06-11 14:26:45.000000000 +0200
@@ -40,12 +40,6 @@
include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/decay/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/management/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/management/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/molecules/types/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/models/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/processes/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/utils/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/highenergy/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
@@ -122,8 +116,6 @@
G4DataQuestionaire.hh
G4DecayPhysics.hh
G4ElectroNuclearBuilder.hh
- G4EmDNAPhysicsChemistry.hh
- G4EmDNAPhysics.hh
G4EmExtraPhysics.hh
G4EmLivermorePhysics.hh
G4EmLivermorePolarizedPhysics.hh
@@ -254,8 +246,6 @@
G4ChipsKaonBuilder.cc
G4DecayPhysics.cc
G4ElectroNuclearBuilder.cc
- G4EmDNAPhysics.cc
- G4EmDNAPhysicsChemistry.cc
G4EmExtraPhysics.cc
G4EmLivermorePhysics.cc
G4EmLivermorePolarizedPhysics.cc
@@ -375,9 +365,6 @@
G4bosons
G4cuts
G4decay
- G4emdna-processes
- G4emdna-models
- G4emdna-utils
G4emhighenergy
G4emlowenergy
G4emstandard
diff -urN a/geant4.9.5.p02/source/physics_lists/CMakeLists.txt b/geant4.9.5.p02/source/physics_lists/CMakeLists.txt
--- a/geant4.9.5.p02/source/physics_lists/CMakeLists.txt 2012-10-30 11:17:00.000000000 +0100
+++ b/geant4.9.5.p02/source/physics_lists/CMakeLists.txt 2013-08-28 14:20:02.000000000 +0200
@@ -17,10 +17,11 @@
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
- GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4physicslists
+ GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4physics_lists
COMPONENTS
builders/sources.cmake
lists/sources.cmake
)
endif()
+add_subdirectory(LHCb)
diff -urN a/geant4.9.5.p02/source/physics_lists/LHCb/CMakeLists.txt b/geant4.9.5.p02/source/physics_lists/LHCb/CMakeLists.txt
--- a/geant4.9.5.p02/source/physics_lists/LHCb/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ b/geant4.9.5.p02/source/physics_lists/LHCb/CMakeLists.txt 2013-06-12 14:46:37.000000000 +0200
@@ -0,0 +1,20 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4LHCblists
+# Package: Geant4.src.G4physicslists.G4LHCblists
+#
+# CMakeLists.txt for single level library that may be build global or granular
+#
+# Generated on : 12/6/2013
+#
+# $Id:$
+#
+#------------------------------------------------------------------------------
+
+include(Geant4MacroLibraryTargets)
+if(GEANT4_BUILD_GRANULAR_LIBS)
+ GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
+else()
+ GEANT4_GLOBAL_LIBRARY_TARGET(COMPONENTS sources.cmake)
+endif()
+
diff -urN a/geant4.9.5.p02/source/physics_lists/LHCb/sources.cmake b/geant4.9.5.p02/source/physics_lists/LHCb/sources.cmake
--- a/geant4.9.5.p02/source/physics_lists/LHCb/sources.cmake 1970-01-01 01:00:00.000000000 +0100
+++ b/geant4.9.5.p02/source/physics_lists/LHCb/sources.cmake 2013-06-12 14:50:10.000000000 +0200
@@ -0,0 +1,210 @@
+#------------------------------------------------------------------------------
+# sources.cmake
+# Module : G4phys_lists
+# Package: Geant4.src.G4physicslists.G4phys_lists
+#
+# 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.2 2010-11-29 17:29:30 bmorgan Exp $
+# GEANT4 Tag $Name: not supported by cvs2svn $
+#
+#------------------------------------------------------------------------------
+
+# List external includes needed.
+include_directories(${CLHEP_INCLUDE_DIRS})
+include_directories(${EXPAT_INCLUDE_DIRS})
+
+# List internal includes needed.
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/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/bosons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/physics_lists/builders/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/decay/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/highenergy/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/xrays/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/binary_cascade/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/cascade/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/evaporation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/utils/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/chiral_inv_phase_space/body/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/chiral_inv_phase_space/cross_sections/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/chiral_inv_phase_space/fragmentation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/chiral_inv_phase_space/interface/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/chiral_inv_phase_space/processes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/coherent_elastic/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fission/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/gem_evaporation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/high_energy/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/im_r_matrix/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/incl/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/utils/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/incl_physics/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/interface/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/isotope_production/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lend/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/low_energy/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/neutron_hp/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/diffraction/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/hadronization/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/qgsm/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/pre_equilibrium/exciton_model/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/radioactive_decay/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/theo_high_energy/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/processes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/stopping/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/optical/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/transportation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
+
+#
+# Define the Geant4 Module.
+#
+include(Geant4MacroDefineModule)
+GEANT4_DEFINE_MODULE(NAME G4LHCblists
+ HEADERS
+ G4EmStandardPhysics_LHCbTest.hh
+ G4EmStandardPhysics_option1LHCb.hh
+ G4EmStandardPhysics_option1NoApplyCuts.hh
+ SOURCES
+ G4EmStandardPhysics_LHCbTest.cc
+ G4EmStandardPhysics_option1LHCb.cc
+ G4EmStandardPhysics_option1NoApplyCuts.cc
+ GRANULAR_DEPENDENCIES
+ G4baryons
+ G4bosons
+ G4cuts
+ G4decay
+ G4digits
+ G4emhighenergy
+ G4emlowenergy
+ G4emstandard
+ G4emutils
+ G4event
+ G4geometrymng
+ G4globman
+ G4had_im_r_matrix
+ G4had_lend
+ G4had_mod_man
+ G4had_mod_util
+ G4had_muon_nuclear
+ G4had_neu_hp
+ G4had_preequ_exciton
+ G4had_string_diff
+ G4had_string_frag
+ G4had_string_man
+ G4had_theo_max
+ G4hadronic_HE
+ G4hadronic_LE
+ G4hadronic_bert_cascade
+ G4hadronic_binary
+ G4hadronic_body_ci
+ G4hadronic_coherent_elastic
+ G4hadronic_crosec_ci
+ G4hadronic_deex_evaporation
+ G4hadronic_deex_fermi_breakup
+ G4hadronic_deex_fission
+ G4hadronic_deex_gem_evaporation
+ G4hadronic_deex_handler
+ G4hadronic_deex_management
+ G4hadronic_deex_multifragmentation
+ G4hadronic_deex_photon_evaporation
+ G4hadronic_deex_util
+ G4hadronic_fragm_ci
+ G4hadronic_hetcpp_evaporation
+ G4hadronic_hetcpp_utils
+ G4hadronic_incl_cascade
+ G4hadronic_interface_ci
+ G4hadronic_iso
+ G4hadronic_mgt
+ G4hadronic_proc
+ G4hadronic_proc_ci
+ G4hadronic_qgstring
+ G4hadronic_radioactivedecay
+ G4hadronic_stop
+ G4hadronic_util
+ G4hadronic_xsect
+ G4hits
+ G4intercoms
+ G4ions
+ G4leptons
+ G4magneticfield
+ G4materials
+ G4mesons
+ G4muons
+ G4navigation
+ G4optical
+ G4partman
+ G4phys_builders
+ G4phys_lists
+ G4procman
+ G4run
+ G4shortlived
+ G4track
+ G4tracking
+ G4transportation
+ G4volumes
+ G4xrays
+ GLOBAL_DEPENDENCIES
+ G4digits_hits
+ G4event
+ G4geometry
+ G4global
+ G4intercoms
+ G4materials
+ G4particles
+ G4processes
+ G4run
+ G4track
+ G4tracking
+ G4physics_lists
+ LINK_LIBRARIES
+)
+
+# List any source specific properties here
+
diff -urN a/geant4.9.5.p02/source/physics_lists/lists/sources.cmake b/geant4.9.5.p02/source/physics_lists/lists/sources.cmake
--- a/geant4.9.5.p02/source/physics_lists/lists/sources.cmake 2012-10-30 11:17:00.000000000 +0100
+++ b/geant4.9.5.p02/source/physics_lists/lists/sources.cmake 2013-06-11 14:26:25.000000000 +0200
@@ -43,7 +43,6 @@
include_directories(${CMAKE_SOURCE_DIR}/source/physics_lists/builders/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/decay/include)
-include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/dna/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/highenergy/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
@@ -232,7 +231,6 @@
G4cuts
G4decay
G4digits
- G4emdna
G4emhighenergy
G4emlowenergy
G4emstandard
diff -urN a/geant4.9.5.p02/source/processes/CMakeLists.txt b/geant4.9.5.p02/source/processes/CMakeLists.txt
--- a/geant4.9.5.p02/source/processes/CMakeLists.txt 2012-10-30 11:19:53.000000000 +0100
+++ b/geant4.9.5.p02/source/processes/CMakeLists.txt 2013-06-11 14:24:53.000000000 +0200
@@ -37,12 +37,6 @@
cuts/sources.cmake
decay/sources.cmake
electromagnetic/adjoint/sources.cmake
- electromagnetic/dna/processes/sources.cmake
- electromagnetic/dna/models/sources.cmake
- electromagnetic/dna/utils/sources.cmake
- electromagnetic/dna/management/sources.cmake
- electromagnetic/dna/molecules/management/sources.cmake
- electromagnetic/dna/molecules/types/sources.cmake
electromagnetic/highenergy/sources.cmake
electromagnetic/lowenergy/sources.cmake
electromagnetic/muons/sources.cmake
diff -urN a/geant4.9.5.p02/source/processes/electromagnetic/CMakeLists.txt b/geant4.9.5.p02/source/processes/electromagnetic/CMakeLists.txt
--- a/geant4.9.5.p02/source/processes/electromagnetic/CMakeLists.txt 2012-10-30 11:18:16.000000000 +0100
+++ b/geant4.9.5.p02/source/processes/electromagnetic/CMakeLists.txt 2013-06-11 14:25:00.000000000 +0200
@@ -12,7 +12,6 @@
#------------------------------------------------------------------------------
add_subdirectory(adjoint)
-add_subdirectory(dna)
add_subdirectory(highenergy)
add_subdirectory(lowenergy)
add_subdirectory(muons)
diff -urN a/geant4.9.5.p02/source/visualization/CMakeLists.txt b/geant4.9.5.p02/source/visualization/CMakeLists.txt
--- a/geant4.9.5.p02/source/visualization/CMakeLists.txt 2012-10-30 11:17:29.000000000 +0100
+++ b/geant4.9.5.p02/source/visualization/CMakeLists.txt 2013-06-12 14:34:00.000000000 +0200
@@ -12,13 +12,10 @@
#------------------------------------------------------------------------------
add_subdirectory(FukuiRenderer)
-add_subdirectory(HepRep)
add_subdirectory(RayTracer)
add_subdirectory(Tree)
add_subdirectory(VRML)
-add_subdirectory(XXX)
add_subdirectory(externals)
-add_subdirectory(gMocren)
add_subdirectory(management)
add_subdirectory(modeling)
diff -urN a/geant4.9.5.p02/source/visualization/OpenGL/sources.cmake b/geant4.9.5.p02/source/visualization/OpenGL/sources.cmake
--- a/geant4.9.5.p02/source/visualization/OpenGL/sources.cmake 2012-10-30 11:17:14.000000000 +0100
+++ b/geant4.9.5.p02/source/visualization/OpenGL/sources.cmake 2013-06-12 10:09:08.000000000 +0200
@@ -312,7 +312,8 @@
G4global
G4graphics_reps
G4intercoms
- G4interfaces
+ G4UIbasic
+ G4UIcommon
G4modeling
G4tracking
G4vis_management
diff -urN a/geant4.9.5.p02/source/visualization/OpenInventor/sources.cmake b/geant4.9.5.p02/source/visualization/OpenInventor/sources.cmake
--- a/geant4.9.5.p02/source/visualization/OpenInventor/sources.cmake 2012-10-30 11:17:19.000000000 +0100
+++ b/geant4.9.5.p02/source/visualization/OpenInventor/sources.cmake 2013-06-12 10:09:35.000000000 +0200
@@ -182,7 +182,7 @@
G4global
G4graphics_reps
G4intercoms
- G4interfaces
+ G4UIcommon
G4materials
G4modeling
G4tracking
diff -urN a/Geant4/cmake/Modules/Geant4BuildProjectConfig.cmake b/Geant4/cmake/Modules/Geant4BuildProjectConfig.cmake
--- a/Geant4/cmake/Modules/Geant4BuildProjectConfig.cmake 2012-10-30 11:15:56.000000000 +0100
+++ b/Geant4/cmake/Modules/Geant4BuildProjectConfig.cmake 2013-09-09 17:56:41.000000000 +0200
@@ -160,13 +160,13 @@
# Use ABSOLUTE paths...
set(GEANT4_INCLUDE_DIR_SETUP "
# Geant4 configured for the install tree with absolute paths, so use these
-set(Geant4_INCLUDE_DIR \"${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4\")
+set(Geant4_INCLUDE_DIR \"${CMAKE_INSTALL_FULL_INCLUDEDIR}\")
")
else()
# Use RELATIVE paths... Where we measure relative to GEANT4_CMAKE_DIR
file(RELATIVE_PATH GEANT4_RELATIVE_HEADER_PATH
${CMAKE_INSTALL_PREFIX}/${GEANT4_CMAKE_DIR}
- ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
+ ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}
)
set(GEANT4_INCLUDE_DIR_SETUP "
diff -urN a/Geant4/cmake/Modules/Geant4ConfigureConfigScript.cmake b/Geant4/cmake/Modules/Geant4ConfigureConfigScript.cmake
--- a/Geant4/cmake/Modules/Geant4ConfigureConfigScript.cmake 2012-10-30 11:15:57.000000000 +0100
+++ b/Geant4/cmake/Modules/Geant4ConfigureConfigScript.cmake 2013-09-09 17:52:56.000000000 +0200
@@ -143,7 +143,7 @@
set(GEANT4_CONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\")
set(GEANT4_CONFIG_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
- set(GEANT4_CONFIG_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}/Geant4")
+ set(GEANT4_CONFIG_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
else()
# Calculate base of self contained install based on relative path from
# CMAKE_INSTALL_FULL_BINDIR to CMAKE_INSTALL_PREFIX.
@@ -154,7 +154,7 @@
set(GEANT4_CONFIG_INSTALL_PREFIX "$scriptloc/${_bin_to_prefix}")
set(GEANT4_CONFIG_INSTALL_EXECPREFIX \"\")
set(GEANT4_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
- set(GEANT4_CONFIG_INCLUDE_DIRS "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}/Geant4")
+ set(GEANT4_CONFIG_INCLUDE_DIRS "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
# Configure the install tree script
diff -urN a/Geant4/cmake/Modules/Geant4MacroLibraryTargets.cmake b/Geant4/cmake/Modules/Geant4MacroLibraryTargets.cmake
--- a/Geant4/cmake/Modules/Geant4MacroLibraryTargets.cmake 2012-10-30 11:15:56.000000000 +0100
+++ b/Geant4/cmake/Modules/Geant4MacroLibraryTargets.cmake 2013-09-09 17:57:32.000000000 +0200
@@ -161,7 +161,7 @@
# Header install?
install(FILES ${${G4MODULENAME}_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT Development)
# Store the include path of the component so that the build tree
@@ -197,7 +197,7 @@
# Header install?
install(FILES ${${G4MODULENAME}_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT Development)
# Store the include path of the component so that the build tree
@@ -261,7 +261,7 @@
# Header install?
install(FILES ${${G4GLOBLIB_NAME}_GLOBAL_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT Development)
# Store the include path of the component so that the build tree
diff -urN a/Geant4/cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake b/Geant4/cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake
--- a/Geant4/cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake 2012-10-30 11:15:56.000000000 +0100
+++ b/Geant4/cmake/Modules/Geant4ToolchainBackwardCompatibility.cmake 2013-09-09 18:00:32.000000000 +0200
@@ -495,7 +495,7 @@
# If we are relocatable, then the structure we will have is
# +- CMAKE_INSTALL_PREFIX
# +- LIBDIR/Geant4-VERSION (G4LIB)
-# +- INCLUDEDIR/Geant4 (G4INCLUDE)
+# +- INCLUDEDIR (G4INCLUDE)
# +- DATAROOTDIR/Geant4-VERSION/
# +- geant4make (G4INSTALL!)
# +- geant4make.(c)sh
@@ -512,7 +512,7 @@
file(RELATIVE_PATH
G4MAKE_TO_INCLUDEDIR
${CMAKE_INSTALL_FULL_DATAROOTDIR}/Geant4-${Geant4_VERSION}/geant4make
- ${CMAKE_INSTALL_FULL_INCLUDEDIR}/${PROJECT_NAME}
+ ${CMAKE_INSTALL_FULL_INCLUDEDIR}
)
set(G4INCLUDE "\"`cd \$geant4make_root/${G4MAKE_TO_INCLUDEDIR}\; pwd`\"")
--- a/geant4.9.5.p02/CMakeLists.txt 2012-10-30 11:24:50.000000000 +0100
+++ b/geant4.9.5.p02/CMakeLists.txt 2013-09-12 08:54:46.000000000 +0200
@@ -113,8 +113,8 @@
# Generate any Use/Config files here once everything else has been processed
# e.g. "UseGeant4.cmake", "Geant4Config.cmake" - library dependencies etc
#
-include(Geant4ToolchainBackwardCompatibility)
-include(Geant4ConfigureConfigScript)
+#include(Geant4ToolchainBackwardCompatibility)
+#include(Geant4ConfigureConfigScript)
#----------------------------------------------------------------------------
# Create the Geant4Config files and supporting modules
#!/usr/bin/env python
'''
Script to patch Geant 4 sources for LHCb.
'''
import sys
import os
import shutil
import logging
from subprocess import call
from os.path import join
logging.basicConfig(level=logging.INFO)
log = logging.getLogger()
# root directory of the project and Geant4 version
root_dir, g4vers = sys.argv[1:]
script_dir = os.path.realpath(os.path.dirname(sys.argv[0]))
# apply patch to CMake configuration
log.info('patching Geant4 CMake configuration')
call(['patch', '-p2', '-i', join(script_dir, 'geant4.cmake.patch')])
# copy physics lists
def copydir(src, dst):
if not os.path.exists(dst):
log.info('creating directory %s', dst)
os.makedirs(dst)
for f in os.listdir(src):
if f in ('.', '..', '.svn'):
continue
if os.path.isdir(join(src, f)):
copydir(join(src, f), join(dst, f))
else:
log.info('copying %s -> %s', join(src, f), join(dst, f))
shutil.copy(join(src, f), join(dst, f))
copydir(join(root_dir, 'Geant4', 'G4LHCblists', 'G4LHCblists'),
join('source', 'physics_lists', 'LHCb', 'include'))
copydir(join(root_dir, 'Geant4', 'G4LHCblists', 'src'),
join('source', 'physics_lists', 'LHCb', 'src'))
# replace fixed files
fixes_root = join(root_dir, 'Geant4', 'G4processes', 'srcnew')
fixes_dst_root = join('source', 'processes', 'hadronic', 'models')
# (fixes is a list of pairs, src+dst)
fixes = [('G4QHadronInelasticDataSet.hh', join(fixes_dst_root, 'chiral_inv_phase_space', 'interface', 'include')),
('G4QHadronInelasticDataSet.cc', join(fixes_dst_root, 'chiral_inv_phase_space', 'interface', 'src')),
(join('diffraction', 'G4FTFModel.cc'), join(fixes_dst_root, 'parton_string', 'diffraction', 'src')),
(join('management', 'G4VPartonStringModel.cc'), join(fixes_dst_root, 'parton_string', 'management', 'src'))]
for src, dst in fixes:
log.info('copying %s to dir %s', join(fixes_root, src), dst)
shutil.copy(join(fixes_root, src), dst)
# override Geant4 cmake modules
copydir(join(script_dir, 'cmake', 'Modules'),
join('cmake', 'Modules'))
......@@ -11,11 +11,13 @@ def main():
# Dir in which we keep updated source/headers.
SRCNEW_Dir="../srcnew"
SRCNEW_diffraction_Dir="../srcnew/diffraction"
SRCNEW_management_Dir="../srcnew/management"
# Dir for original source
SRC_Dir="../hadronic/models/chiral_inv_phase_space/interface/src"
# Dir for original FTF source to be replaced
SRC_diffraction_Dir="../hadronic/models/parton_string/diffraction/src"
SRC_management_Dir="../hadronic/models/parton_string/management/src"
# Can we get cmt macro values in .python?
# Expanded by cmt to be $(GEANT4_home)/$(GEANT4_installarea_prefix)/include
......@@ -52,5 +54,18 @@ def main():
fname = os.path.join(SRCNEW_diffraction_Dir, newfile)
shutil.copy2(fname,SRC_diffraction_Dir)
# Find any files in the srcnew dir (string max. retries problem fixes)
for newfile in os.listdir(SRCNEW_management_Dir):
# Only .cc to replace for max. retries fix.
# if fnmatch.fnmatch(newfile, '*.hh'):
#Replace old headers in install areas with new.
# fname = os.path.join(SRCNEW_Dir, newfile)
# shutil.copy2(fname,INSTALLAREA_project)
# shutil.copy2(fname,INSTALLAREA_package)
# Replace old .cc with new.
if fnmatch.fnmatch(newfile, '*.cc'):
fname = os.path.join(SRCNEW_management_Dir, newfile)
shutil.copy2(fname,SRC_management_Dir)
if __name__ == "__main__":
main()
......@@ -3,7 +3,7 @@
# Maintainer : Gloria CORTI
#============================================================================
package G4processes
version v8r3p3
version v8r3p4
# Structure, i.e. directories to process.
#============================================================================
......
v8r3p3
v8r3p4
......@@ -4,6 +4,11 @@
! Purpose :
!-----------------------------------------------------------------------------
! ======================= G4processes v8r3p4 2013-12-19 ========================
! 2013-12-19 - Nigel Watson
- Updated G4VPartonStringModel.cc, increase max. attempts before exception thrown (bug found by Paul Szczypka),
should fix 0.5% of production job failures.
! ======================= G4processes v8r3p3 2013-05-16 ========================
! 2013-05-16 - Paul Szczypka
- Updated G4FTFModel.cc to include fixes from the Geant4 team. Should fix the
......
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4VPartonStringModel.cc,v 1.8 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
//
// ---------------- G4VPartonStringModel ----------------
// by Gunter Folger, May 1998.
// abstract class for all Parton String Models
// ------------------------------------------------------------
// debug switch
//#define debug_PartonStringModel
#include "G4VPartonStringModel.hh"
#include "G4ios.hh"
#include "G4ShortLivedConstructor.hh"
G4VPartonStringModel::G4VPartonStringModel() : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
{
// Make shure Shotrylived partyicles are constructed.
G4ShortLivedConstructor ShortLived;
ShortLived.ConstructParticle();
}
G4VPartonStringModel::G4VPartonStringModel(const G4VPartonStringModel &) : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::copy ctor not accessible");
}
G4VPartonStringModel::~G4VPartonStringModel()
{
}
const G4VPartonStringModel & G4VPartonStringModel::operator=(const G4VPartonStringModel &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::operator= meant to not be accessable");
return *this;
}
int G4VPartonStringModel::operator==(const G4VPartonStringModel &) const
{
return 0;
}
int G4VPartonStringModel::operator!=(const G4VPartonStringModel &) const
{
return 1;
}
G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus,
const G4DynamicParticle &aPrimary)
{
G4ExcitedStringVector * strings = NULL;
G4DynamicParticle thePrimary=aPrimary;
G4LorentzRotation toZ;
G4LorentzVector Ptmp=thePrimary.Get4Momentum();
toZ.rotateZ(-1*Ptmp.phi());
toZ.rotateY(-1*Ptmp.theta());
thePrimary.Set4Momentum(toZ*Ptmp);
G4LorentzRotation toLab(toZ.inverse());
//Nigel Watson 20131219 Increase to fix aborts in production jobs.
//Nigel Watson 20131219 G4int attempts = 0, maxAttempts=20;
G4int attempts = 0, maxAttempts=100;
while ( strings == NULL )
{
if (attempts++ > maxAttempts )
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::Scatter(): fails to generate strings");
}
theThis->Init(theNucleus,thePrimary);
strings = GetStrings();
}
G4double stringEnergy(0);
G4LorentzVector SumStringMom(0.,0.,0.,0.);
for ( unsigned int astring=0; astring < strings->size(); astring++)
{
// rotate string to lab frame, models have it aligned to z
stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
(*strings)[astring]->LorentzRotate(toLab);
SumStringMom+=(*strings)[astring]->Get4Momentum();
}
G4double InvMass=SumStringMom.mag();
//#define debug_PartonStringModel
#ifdef debug_PartonStringModel
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
// loop over wounded nucleus
G4int hits(0);
G4Nucleon * theCurrentNucleon = fancynucleus->StartLoop() ? fancynucleus->GetNextNucleon() : NULL;
while(theCurrentNucleon != NULL)
{
if(theCurrentNucleon->AreYouHit())
{
hits++;
}
theCurrentNucleon = fancynucleus->GetNextNucleon();
}
G4cout << "G4VPSM: strE, nucleons,SumStringE, inE "
<< stringEnergy << " "
<< hits << " "
<< Ptmp.e() << " "
<< SumStringMom.e() << " "
<< Ptmp.e() + 939.*hits - stringEnergy << G4endl;
#endif
// Fragment strings
G4KineticTrackVector * theResult = 0;
G4double SumMass(0.);
attempts = 0;
maxAttempts=100;
do
{
attempts++;
if(theResult != 0)
{
std::for_each(theResult->begin(), theResult->end(), DeleteKineticTrack());
delete theResult;
}
theResult = stringFragmentationModel->FragmentStrings(strings);
if(attempts > maxAttempts ) break;
//G4cout<<"G4endl<<"G4VPartonStringModel:: Final Result, Size "<<theResult->size()<<G4endl;
SumMass=0.;
//G4LorentzVector SumP(0.,0.,0.,0.);
for ( unsigned int i=0; i < theResult->size(); i++)
{
SumMass+=(*theResult)[i]->GetDefinition()->GetPDGMass();
//SumP+=(*theResult)[i]->Get4Momentum();
//G4cout<<i<<" : "<<(*theResult)[i]->GetDefinition()->GetParticleName();
//G4cout<<"p= " << (*theResult)[i]->Get4Momentum()<<" m= "<<(*theResult)[i]->Get4Momentum().mag()<<G4endl;
}
//G4cout<<"SumP "<<SumP<<G4endl;
} while(SumMass > InvMass);
std::for_each(strings->begin(), strings->end(), DeleteString() );
delete strings;
return theResult;
}
package Geant4Sys
version v95r2p5
version v95r2p6
branches cmt doc
use G4config v95r2p5 Geant4
use G4config v95r2p6 Geant4
# =============================================================================
# =========== global libraries ================================================
......@@ -13,7 +13,7 @@ use G4intercoms v4r1p1 Geant4
use G4particles v6r2p1 Geant4
use G4track v5r1p1 Geant4
use G4geometry v6r2p1 Geant4
use G4processes v8r3p3 Geant4
use G4processes v8r3p4 Geant4
use G4physics_lists v1r3 Geant4
use G4tracking v6r1p1 Geant4
use G4global v5r1p1 Geant4
......@@ -46,7 +46,7 @@ use G4UIbasic v4r3 Geant4
use G4UIGAG v4r2 Geant4
# LHCb additional package (eg. for MC11 G4LHCblists)
use G4LHCblists v2r2 Geant4
use G4LHCblists v3r0 Geant4
#=============================================================================
# ======== the end ============================================================
......
v95r2p5
v95r2p6
......@@ -3,6 +3,14 @@ Package : Geant4Sys
Package manager(s) : Gloria Corti, Hubert DeGaudenzi, Nigel Watson
Purpose : LHCb build using cmt of Geant4
!=============================================================================
!</PRE><H1><A NAME=v95r2p62013-12-19 Geant4Sys v95r2p6</A></H1><PRE>
! 2013-12-19 - Nigel Watson
- Pick up revised G4processes to fix looping events, and corresponding
fix in G4config to use this for cmake builds.
! 2013-09-16 - Gloria Corti
- Pick up a LHCbLists where unused header is removed
!=============================================================================
!</PRE><H1><A NAME=v95r2p5>2013-05-16 Geant4Sys v95r2p5</A></H1><PRE>
! 2013-05-16 - Nigel Watson
......
project GEANT4
use GAUDI GAUDI_v23r10
use GAUDI GAUDI_v24r2
build_strategy with_installarea
setup_strategy root
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment