diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index b9ec2ea806f61bb832e9b50a695ff57ed10b2cc3..0000000000000000000000000000000000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5) - -set(Geant4_version 4.9.5.p02) - -if(DEFINED ENV{G4_NATIVE_VERSION}) - # Override the version of Geant4 from the variable - set(Geant4_version $ENV{G4_NATIVE_VERSION}) - if(NOT Geant4_version MATCHES "^4\\.") - # G4_NATIVE_VERSION might not contain the initial '4.' that we need - # see https://its.cern.ch/jira/browse/LHCBGAUSS-43 - set(Geant4_version 4.${Geant4_version}) - endif() -endif() - -find_package(GaudiProject) -gaudi_project(Geant4 v95r2p6) - -file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../include ${CMAKE_INSTALL_PREFIX}/include) - -# FIXME: hack for compatibility with CMT build -file(WRITE ${CMAKE_BINARY_DIR}/dummy.cpp "") -link_directories(${CMAKE_INSTALL_PREFIX}/lib) -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed") - -macro(back_comp_lib name) - add_library(${name} SHARED ${CMAKE_BINARY_DIR}/dummy.cpp) - add_dependencies(${name} Geant4) - target_link_libraries(${name} ${ARGN}) - install(TARGETS ${name} DESTINATION lib) -endmacro() - -back_comp_lib(G4processeshad G4processes) -back_comp_lib(G4externals G4zlib G4gl2ps) diff --git a/Geant4/G4analysis/cmt/Makefile b/Geant4/G4analysis/cmt/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3 --- /dev/null +++ b/Geant4/G4analysis/cmt/Makefile @@ -0,0 +1,4 @@ +include $(CMTROOT)/src/Makefile.header + +include $(CMTROOT)/src/constituents.make + diff --git a/Geant4/G4analysis/cmt/requirements b/Geant4/G4analysis/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..24aed60d72109a40ab62b0909badac41ea317b33 --- /dev/null +++ b/Geant4/G4analysis/cmt/requirements @@ -0,0 +1,30 @@ +#============================================================================ +# Created : 2014-03-06 +# Maintainer : James Mccarthy +#============================================================================ +package G4analysis +version v1r0 + +#============================================================================ +# Structure, i.e. directories to process. +#============================================================================ +branches cmt doc G4analysis +#============================================================================ +# Used packages. Specify the version, * at the end specifies 'any revision' +# Put as many lines as needed, with all packages, without the '#' +#============================================================================ + use G4run v* Geant4 + +#============================================================================ +# Component library building rule +#============================================================================ +library G4analysis ../src/*.cc + +# ============================================================================= +# ============ apply all mandatory patterns =================================== +# ============================================================================= +apply_pattern G4AllCMTpatterns + +private +apply_pattern G4_copy_source +end_private \ No newline at end of file diff --git a/Geant4/G4analysis/cmt/version.cmt b/Geant4/G4analysis/cmt/version.cmt new file mode 100644 index 0000000000000000000000000000000000000000..cf3d02387ac052f893a7da9b5aa1c793620c633e --- /dev/null +++ b/Geant4/G4analysis/cmt/version.cmt @@ -0,0 +1 @@ +v1r0 diff --git a/Geant4/G4analysis/doc/release.notes b/Geant4/G4analysis/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..29c064a1590307db471eb9c14c84eb1734c15162 --- /dev/null +++ b/Geant4/G4analysis/doc/release.notes @@ -0,0 +1,12 @@ +!----------------------------------------------------------------------------- +! Package : Geant4/G4analysis +! Responsible : James Mccarthy +! Purpose : Definition of analysis used in G4examples +!----------------------------------------------------------------------------- + +!===================== Geant4/G4analysis v1r0 2014-07-25 ===================== + +! 2014-03-06 - James Mccarthy + - Added package to build library required for G4examples in Geant4 9.6 + +!============================================================================= diff --git a/Geant4/G4config/CMakeLists.txt b/Geant4/G4config/CMakeLists.txt index 84de7d4c4d211b41d047ffe4217b42f5b49384d1..5c137861292662c677bd87f11ed55178e45fdee0 100644 --- a/Geant4/G4config/CMakeLists.txt +++ b/Geant4/G4config/CMakeLists.txt @@ -13,7 +13,7 @@ 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} + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/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 @@ -39,3 +39,9 @@ ExternalProject_Add(Geant4 foreach(ext CLHEP EXPAT XercesC X11 OpenGL Motif) find_package(${ext}) endforeach() + +# Copy the Geant4 sources as it was done with CMT +set(G4SRC ${CMAKE_CURRENT_BINARY_DIR}/Geant4-prefix/src/Geant4/source) +set(G4DST ${CMAKE_SOURCE_DIR}/Geant4) +configure_file(copy_sources.cmake.in copy_sources.cmake @ONLY) +install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/copy_sources.cmake) diff --git a/Geant4/G4config/cmt/copy_examples_source.csh b/Geant4/G4config/cmt/copy_examples_source.csh new file mode 100755 index 0000000000000000000000000000000000000000..2e5999ae7c6b8de367892ebc9700b4a040be6f1f --- /dev/null +++ b/Geant4/G4config/cmt/copy_examples_source.csh @@ -0,0 +1,49 @@ +#!/usr/bin/env csh + +# JM 17/5/2013 +# copy source code from Geant4 examples packages +# Currently only uses extended examples Hadr00, TestEM7, TestEM9. Can be extended to copy others + +set G4EXAM = 'examples/extended' + +set here = $PWD + +set pack = `cmt -quiet show macro_value package | tr -d "G4"` +set parent=`cmt -quiet show macro_value package | tr -d "G4" | tr -d '[:digit:]'` + +echo ${parent} + +if( ${parent} == 'Hadr' ) then + set G4Dir="hadronic/"${pack} +else if( ${parent} == 'TestEm' ) then + set G4Dir="electromagnetic/"${pack} +else + echo 'Warning! Unkown package: '${pack} + set G4Dir="" +endif + +set p = 'src' +set q = 'include' + +cd $here/.. + +if !( -d ${p} ) then + mkdir -p ${p} + $G4_UNIX_COPY ${G4SHARE}/${G4EXAM}/${G4Dir}/${p}/*.* ${p}/. + $G4_UNIX_COPY ${G4SHARE}/${G4EXAM}/${G4Dir}/*.cc ./. + echo ' source files have been copied from '${G4SHARE}/${G4EXAM}/${G4Dir} +else + echo ''${p}' exists - skip copy' +endif + +#copy local version of include files + +if !( -d ${q}) then + mkdir -p ${q} + $G4_UNIX_COPY ${G4SHARE}/${G4EXAM}/${G4Dir}/include/*.* ${q}/. + echo ' include files have been copied from '${G4SHARE}/${G4EXAM}/${G4Dir} +else + echo ''${q}' exists - skip copy' +endif + +cd $here diff --git a/Geant4/G4config/cmt/copy_include.csh b/Geant4/G4config/cmt/copy_include.csh index e1e020acd4b3726e77d2700a40b1609ebb35e0da..bd1a2dd47b7d0d4ba67f2b064a55d1ed0ab78d6e 100755 --- a/Geant4/G4config/cmt/copy_include.csh +++ b/Geant4/G4config/cmt/copy_include.csh @@ -9,10 +9,21 @@ cd ../../.. set incl_dir = $G4SHARE/include/ if !( -d InstallArea/include ) then - if !( -d InstallArea ) mkdir -p InstallArea + mkdir -p InstallArea cd InstallArea + $G4_UNIX_COPY ${incl_dir} . + + # MCl: there may be a symlink called 'Geant4' and pointing to '.' + # we need to avoid that it is dereferenced, but we need to preserve the structure + if ( -e include/Geant4 ) then + rm -rf include/Geant4 + mkdir -p include/Geant4 + $G4_UNIX_COPY ${incl_dir}. include/Geant4/. + rm -rf include/Geant4/Geant4 + endif + echo ' include files have been copied from '${incl_dir} else echo ' include files exist - NO copy from '${incl_dir} diff --git a/Geant4/G4config/cmt/copy_source.csh b/Geant4/G4config/cmt/copy_source.csh index 8affa65ee26ee9e032a3d0bfdbc74bdb67900cb2..77add26b2aaf00e3ca6ebb3b182d22db88328eac 100755 --- a/Geant4/G4config/cmt/copy_source.csh +++ b/Geant4/G4config/cmt/copy_source.csh @@ -53,11 +53,12 @@ endif cd $here +# NKW 22/02/2014 #Not pretty but will work. -if ( $pack == "processes" ) then - echo "Copying patched CHIPS sources" - ./copyPatchedSource.py -endif +#if ( $pack == "processes" ) then +# echo "Copying patched CHIPS sources" +# ./copyPatchedSource.py +#endif unset echo diff --git a/Geant4/G4config/cmt/copy_vis_source.csh b/Geant4/G4config/cmt/copy_vis_source.csh index 1a598cae03cb4b58c038f507feaf968c2c399974..a1e8c821890823308473ff6fdcf5bf6c7e830e01 100755 --- a/Geant4/G4config/cmt/copy_vis_source.csh +++ b/Geant4/G4config/cmt/copy_vis_source.csh @@ -33,7 +33,10 @@ if !( -d $p) then if ( $p != 'externals' ) then $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/*.* ${p}/. $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/../include/*.* G4${pack}/. +#nkw Pick up any headers that are missing from the default share/include + $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/../include/*.* ../../InstallArea/include/ echo ' source files have been copied from '${G4SRC}'/'${G4Dir} + echo ' and headers also copied to InstallArea' else cd ${G4SRC}/${G4Dir}/$p set list = `find . -name src -print | sed -e 's;^./;;' | sed -e 's/\/src//g'` diff --git a/Geant4/G4config/cmt/copy_vis_source.sh b/Geant4/G4config/cmt/copy_vis_source.sh index 9ca73d154eb4a4bffe6fc31e70a8dbbda2b23ed2..a5e3183928289e251e91fceb436fe3a56c5ed019 100755 --- a/Geant4/G4config/cmt/copy_vis_source.sh +++ b/Geant4/G4config/cmt/copy_vis_source.sh @@ -30,7 +30,10 @@ if [ ! -d $p ] mkdir -p $p $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/*.* ${p}/. $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/../include/*.* G4${pack}/. +#nkw Pick up any headers that are missing from the default share/include + $G4_UNIX_COPY ${G4SRC}/${G4Dir}/${p}/../include/*.* ../../InstallArea/include/ echo ' source files have been copied from '${G4SRC}'/'${G4Dir} + echo ' and headers also copied to InstallArea' else echo ${G4Dir}/${p} ' exists - skip copy' fi diff --git a/Geant4/G4config/cmt/requirements b/Geant4/G4config/cmt/requirements index eed2652cb95b5328a35ea7daf4b9bd00df4119d2..9798b6fa8f490be6a8daf961ae3491a04c744b63 100755 --- a/Geant4/G4config/cmt/requirements +++ b/Geant4/G4config/cmt/requirements @@ -1,5 +1,5 @@ package G4config -version v95r2p6 +version v95r2p7 branches cmt doc @@ -13,12 +13,12 @@ use CLHEP v* LCG_Interfaces #============================================================================== set G4_native_version "9.5.p02" \ override-geant4-version "${G4_NATIVE_VERSION}" -set G4VERS v95r2p6 +set G4VERS v95r2p7 # ============================================================================= # set Geant4 environment variables #============================================================================= -set G4PATH "${LCG_external}/geant4" +set G4PATH "/afs/cern.ch/sw/lcg/external/geant4" set G4SHARE "${G4PATH}/${G4_native_version}/share" @@ -87,6 +87,9 @@ pattern G4_copy_hadlists_source \ pattern G4_copy_gdml_source \ apply_pattern G4_copy_pattern type=gdml +pattern G4_copy_examples_source \ + apply_pattern G4_copy_pattern type=examples + private action G4config_copy_include "$(G4CONFIGROOT)/cmt/copy_include.csh" WIN32 "$(G4CONFIGROOT)\cmt\copy_include.bat" diff --git a/Geant4/G4config/cmt/version.cmt b/Geant4/G4config/cmt/version.cmt index 92641fe40528585d3c2fc71a455da4fe25017dbc..de6213929501556a800a75b69f5b4478261cda89 100644 --- a/Geant4/G4config/cmt/version.cmt +++ b/Geant4/G4config/cmt/version.cmt @@ -1 +1 @@ -v95r2p6 +v95r2p7 diff --git a/Geant4/G4config/copy_sources.cmake.in b/Geant4/G4config/copy_sources.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..d52b48d7447e61a5e7a2788ff84218c59a86e391 --- /dev/null +++ b/Geant4/G4config/copy_sources.cmake.in @@ -0,0 +1,78 @@ +# Normal packages +foreach(pack analysis digits_hits event geometry global graphics_reps intercoms + materials parmodels particles physics_lists processes readout run + track tracking) + message(STATUS "Copying ${pack} sources") + execute_process(COMMAND find ( -type d -a -name src + -a -not ( -path "*test/*" -o -path "*/abla/*" ) ) + #-printf "copying ${pack}/%p\\n" + -exec mkdir -p "@G4DST@/G4${pack}/{}" ";" + -exec cp -r "{}/." "@G4DST@/G4${pack}/{}" ";" + WORKING_DIRECTORY @G4SRC@/${pack}) + execute_process(COMMAND find ( -type d -a -name include + -a -not ( -path "*test/*" -o -path "*/abla/*" ) ) + #-printf "copying ${pack}/%p\\n" + -exec mkdir -p "@G4DST@/G4${pack}/G4${pack}" ";" + -exec cp -r "{}/." "@G4DST@/G4${pack}/G4${pack}" ";" + WORKING_DIRECTORY @G4SRC@/${pack}) +endforeach() + +# UI packages +foreach(pack basic common GAG) + message(STATUS "Copying interfaces/${pack} sources") + execute_process(COMMAND mkdir -p @G4DST@/G4UI${pack}/${pack}/src + @G4DST@/G4UI${pack}/G4UI${pack}) + execute_process(COMMAND cp -r @G4SRC@/interfaces/${pack}/src/. + @G4DST@/G4UI${pack}/${pack}/src) + execute_process(COMMAND cp -r @G4SRC@/interfaces/${pack}/include/. + @G4DST@/G4UI${pack}/G4UI${pack}) +endforeach() + +# Vis packages +foreach(pack FukuiRenderer modeling OpenGL RayTracer Tree + management VRML) + if(pack STREQUAL "FukuiRenderer") + set(local_pack G4FR) + elseif(pack STREQUAL "management") + set(local_pack G4vis_management) + else() + set(local_pack G4${pack}) + endif() + message(STATUS "Copying visualization/${pack} sources") + execute_process(COMMAND mkdir -p @G4DST@/${local_pack}/${pack}/src + @G4DST@/${local_pack}/${local_pack}) + execute_process(COMMAND cp -r @G4SRC@/visualization/${pack}/src/. + @G4DST@/${local_pack}/${pack}/src) + execute_process(COMMAND cp -r @G4SRC@/visualization/${pack}/include/. + @G4DST@/${local_pack}/${local_pack}) +endforeach() + +set(pack externals) +message(STATUS "Copying visualization/${pack} sources") +execute_process(COMMAND find ( -type d -a -name src + -a -not ( -path "*test/*" -o -path "*/abla/*" ) ) + #-printf "copying ${pack}/%p\\n" + -exec mkdir -p "@G4DST@/G4${pack}/{}" ";" + -exec cp -r "{}/." "@G4DST@/G4${pack}/{}" ";" + WORKING_DIRECTORY @G4SRC@/visualization/${pack}) +execute_process(COMMAND find ( -type d -a -name include + -a -not ( -path "*test/*" -o -path "*/abla/*" ) ) + #-printf "copying ${pack}/%p\\n" + -exec mkdir -p "@G4DST@/G4${pack}/G4${pack}" ";" + -exec cp -r "{}/." "@G4DST@/G4${pack}/G4${pack}" ";" + WORKING_DIRECTORY @G4SRC@/visualization/${pack}) + + +# Vis packages +set(pack gdml) +message(STATUS "Copying persistency/${pack} sources") +set(local_pack G4GDML) +execute_process(COMMAND mkdir -p @G4DST@/${local_pack}/src + @G4DST@/${local_pack}/schema + @G4DST@/${local_pack}/${local_pack}) +execute_process(COMMAND cp -r @G4SRC@/persistency/${pack}/src/. + @G4DST@/${local_pack}/src) +execute_process(COMMAND cp -r @G4SRC@/persistency/${pack}/schema/. + @G4DST@/${local_pack}/schema) +execute_process(COMMAND cp -r @G4SRC@/persistency/${pack}/include/. + @G4DST@/${local_pack}/${local_pack}) diff --git a/Geant4/G4config/doc/release.notes b/Geant4/G4config/doc/release.notes index 6aac9314baafd6a34fb8f50126b9975cabaae791..d8c0e3a6b9b98c9a46c5c984e2a21ac6d585b9ad 100755 --- a/Geant4/G4config/doc/release.notes +++ b/Geant4/G4config/doc/release.notes @@ -4,6 +4,34 @@ ! Purpose : Configuration package for Geant4 build !----------------------------------------------------------------------------- +! ======================= G4config v95r2p7 2014-07-25 ======================== +! 2014-06-27 - Gloria Corti + - Put explicit afs directory for Geant4 sources to fix issue with LCG68 while + still making it work for earlier LCG version. For details refer to + https://its.cern.ch/jira/browse/LHCBGAUSS-221 + - Put back version 9.5.p02 as source, since for 9.6 tests and nightlies builds + that is done via the 'override-geant4-version' mechanism setup up by + Marco Cl. + +! 2014-03-12 - Marco Clemencic + - Implemented an extra install step to emulate in CMake the way the sources + are copied to the source directories. + +! 2014-03-04 - Nigel Watson + - Re-assert suppress copying of local sources. + +! 2014-02-27 - James Mccarthy + - Added copy_examples_source for G4examples package + +! 2014-02-26 - Nigel Watson + - Update for g4 9.6 tests, suppress copying of local sources. + +! 2014-02-19 - Marco Clemencic + - Modified copy_include.csh to avoid problems with the recursive symlink + 'Geant4' that appeared in 'include' starting from Geant4 9.6. + (note taht the .sh and .bat versions were not modified, since they are not + used) + ! ======================= G4config v95r2p6 2013-12-19 ======================== ! 2013-12-19 - Nigel Watson - Updated Marco's (much improved, for cmake) source patching script diff --git a/Geant4/G4examples/Makefile b/Geant4/G4examples/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..46d73c68f3df6967e814db62956a2464090989fb --- /dev/null +++ b/Geant4/G4examples/Makefile @@ -0,0 +1 @@ +include ${LBCONFIGURATIONROOT}/data/Makefile diff --git a/Geant4/G4examples/cmt/requirements b/Geant4/G4examples/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..760a537142cda59cda7b93921ab8d6a41099cf1e --- /dev/null +++ b/Geant4/G4examples/cmt/requirements @@ -0,0 +1,29 @@ +#============================================================================ +# Created : 2014-03-03 +# Maintainer : James Mccarthy +#============================================================================ +package G4examples +version v4r1 + +#============================================================================ +# Structure, i.e. directories to process. +#============================================================================ +branches cmt doc extended +#============================================================================ +# Used packages. Specify the version, * at the end specifies 'any revision' +# Put as many lines as needed, with all packages, without the '#' +#============================================================================ +use G4Hadr00 v* Geant4/G4examples/extended/hadronic +use G4TestEm7 v* Geant4/G4examples/extended/electromagnetic +use G4TestEm9 v* Geant4/G4examples/extended/electromagnetic + + +include_path none +#============================================================================ +# Component library building rule +#============================================================================ +#library G4examples ../src/*.cpp +#============================================================================ +# define component library link options +#============================================================================ +#apply_pattern component_library library=G4examples diff --git a/Geant4/G4examples/cmt/version.cmt b/Geant4/G4examples/cmt/version.cmt new file mode 100644 index 0000000000000000000000000000000000000000..318ea395e61f24d201b2113eb528b8fa11d901b2 --- /dev/null +++ b/Geant4/G4examples/cmt/version.cmt @@ -0,0 +1 @@ +v4r1 diff --git a/Geant4/G4examples/doc/release.notes b/Geant4/G4examples/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..3bb6018c8ce582abbc1efa0733178a6cac5a8e5d --- /dev/null +++ b/Geant4/G4examples/doc/release.notes @@ -0,0 +1,25 @@ +!----------------------------------------------------------------------------- +! Package : Geant4/G4examples +! Responsible : James Mccarthy +! Purpose : Examples packages provided my Geant4, used as standalone tests +!----------------------------------------------------------------------------- + +!===================== Geant4/G4examples v4r1 2014-07-25 ===================== +! 2014-07-24 - Gloria Corti + - Modify requirements of subpackages to remove src and include directory + otherwise made by cmt and copy is not done since directories exist + +! 2014-07-17 - Marco Clemencic + - Removed files that were not meant to be committed. + +! 2014-07-16 - Gloria Corti + - Modified all requirements files to use pattern linker_library instead of + appending library to XXX_use_linkopts. This fixes compilation issues on + slc5, see details on https://its.cern.ch/jira/browse/LHCBGAUSS-193 + +!===================== Geant4/G4examples v4r0 2014-07-11 ===================== + +! 2014-03-27 - Nigel Watson + - Adapted requirements for nightly builds, following Marco Cl.'s + recommendations. +!============================================================================= diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm7/cmt/requirements b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/cmt/requirements new file mode 100755 index 0000000000000000000000000000000000000000..0092e370f66ca83455a46d840f08ae08dfe2caf4 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/cmt/requirements @@ -0,0 +1,41 @@ +package G4TestEm7 + +version v4r0 +branches cmt doc scripts + +################################################## +# Package to run extended Geant4 example TestEm7 # +################################################## + +use G4physics_lists v* Geant4 +use G4analysis v* Geant4 + +include_dirs ../include + +#------ Example TestEm7- ------- + +#------ Building the library ------- + +library G4TestEm7 $(G4LibraryFlags) ../src/*.cc +apply_pattern linker_library library=G4TestEm7 + +#------ Building the application --- + +application testEm7 ../TestEm7.cc + +#======================================================================== + +private +apply_pattern G4_copy_examples_source +macro_append testEm7_dependencies " G4TestEm7 " +end_private + + + + + + + + + + diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/README b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/README new file mode 100644 index 0000000000000000000000000000000000000000..d052e8f78d4eb4a5712bc683313967ce9c61a81d --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/README @@ -0,0 +1,171 @@ +$Id: README,v 1.23 2010-09-17 18:45:43 maire Exp $ +------------------------------------------------------------------- + + ========================================================= + Geant4 - an Object-Oriented Toolkit for Simulation in HEP + ========================================================= + + TestEm7 + ------- + + How to produce a Bragg curve in a water phantom. + How to compute the dose in 'test volumes' called tallies. + How to define a maximum step size. + + 1- GEOMETRY DEFINITION + + The geometry consists of a single block of a homogenous material, + placed in a world. + + Three parameters define the geometry : + - the material of the box, + - the thickness of the box (sizeX), + - the tranverse dimension of the box (sizeYZ). + + The default is 20 cm of water. + + In addition a transverse uniform magnetic field can be applied. + + The default geometry is constructed in DetectorConstruction class, + but all of the above parameters can be changed interactively via + the commands defined in the DetectorMessenger class. + + The size, matter, positions of several test-volumes (tallies) can be + defined via UI commands : /testem/det/tally... + + 2- PHYSICS LIST + + Physics lists can be local (eg. in this example) or from G4 kernel + physics_lists subdirectory. + + Local physics lists: + - "local" standard EM physics with current 'best' options setting. + these options are explicited in PhysListEmStandard + - "standardSS" standard EM physics with single Coulomb scattering + instead of multiple scattering; + - "standardNR" standard EM physics with single Coulomb scattering + process G4ScreenedNuclearRecoil instead of the + multiple scattering for ions with energy less than + 100 MeV/nucleon; the new process was developed + by M.H. Mendenhall and R.A. Weller from Vanderbuilt + University and published in NIM B 277 (2005) 420. + In later Geant4 releases the process will be a part + of Geant4 source, currently it is released together + with its mathematical tool c2_functions in current + + + From geant4/source/physics_lists/builders: + - "emstandard_opt0" recommended standard EM physics for LHC + - "emstandard_opt1" best CPU performance standard physics for LHC + - "emstandard_opt2" + - "emstandard_opt3" best current advanced EM options. + analog to "local" above + - "emlivermore" low-energy EM physics using Livermore data + - "empenelope" low-energy EM physics implementing Penelope models + + Optional components can be added: + - "elastic" elastic scattering of hadrons + - "HElastic" + - "QElastic" + - "binary" QBBC configuration of hadron inelastic models + - "binary_ion" Binary ion inelastic models + + Physics lists and options can be (re)set with UI commands + + Please, notice that options set through G4EmProcessOPtions are global, eg + for all particle types. In G4 builders, it is shown how to set options per + particle type. + + 3- AN EVENT : THE PRIMARY GENERATOR + + The primary kinematic consists of a single particle which hits the + block perpendicular to the input face. The type of the particle + and its energy are set in the PrimaryGeneratorAction class, and can + changed via the G4 build-in commands of ParticleGun class (see + the macros provided with this example). + The default is proton 160 MeV + + In addition one can define randomly the impact point of the incident + particle. The corresponding interactive command is built in + PrimaryGeneratorMessenger class. + + A RUN is a set of events. + + + 4- DOSE IN 'TEST-VOLUMES' + + The energy deposited in the test-volumes (tallies) defined in + DetectorConstruction are printed at EndOfRun, both in MeV and gray. + + 5- VISUALIZATION + + The Visualization Manager is set in the main(). + The initialisation of the drawing is done via the command + > /control/execute vis.mac + + The detector has a default view which is a longitudinal view of the box. + + The tracks are drawn at the end of event, and erased at the end of run. + Optionaly one can choose to draw all particles, only the charged one, + or none. This command is defined in EventActionMessenger class. + + + 6- HOW TO START ? + + - compile and link to generate an executable + % cd geant4/examples/extended/electromagnetic/TestEm7 + % gmake + + - execute Test in 'batch' mode from macro files + % TestEm7 proton.mac + + - execute Test in 'interactive mode' with visualization + % TestEm7 + .... + Idle> type your commands + .... + Idle> exit + + + 7- HISTOGRAM OF THE BRAGG PEAK + + Testem7 computes the total energy deposited along the trajectory of + the incident particle : the so-called Bragg peak. + + In order to control the accuracy of the deposition, the user can limit + the maximum allowed for the step size of charged particles. + (command /testem/stepMax ) + + The result is a 1D histogram, which is the total energy deposited + along the trajectory of the incident particle. + + The bin size is egal to stepMax. The number of bins is determined by + the thickness of the absorber (with a minimum of 100 bins). + The total energy deposited is plotted in MeV/mm per incident particle. + + The next histogram allows to have a zoom around the Bragg peak. Its bining + should be defined via UI command: + /testem/histo/setHisto 2 nbins xmin xmax unit + + The last histogram shows the projectile range. Its bining should be defined + similary by the UI command: + /testem/histo/setHisto 3 nbins xmin xmax unit + + 8- USING HISTOGRAMS + + By default the histograms are not activated. To activate histograms + the environment variable G4ANALYSIS_USE should be defined. For instance + uncomment the flag G4ANALYSIS_USE in GNUmakefile. + + To use histograms, at least one of the AIDA implementations should be + available. See InstallAida.txt + + Before compilation of the example it is optimal to clean up old files: + gmake histclean + gmake + + One can choose the format of the histogram file (hbook, root, XML): + /testem/histo/setFileType root + + The default name "testem7" can be changed: + /testem/histo/setFileName myname diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/release.notes b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..8239e43e736da9cb8d196a99985b675741718c2b --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/doc/release.notes @@ -0,0 +1,15 @@ +!----------------------------------------------------------------------------- +! Package : Geant4/G4examples +! Responsible : James Mccarthy +! Purpose : Examples packages provided my Geant4, used as standalone tests +!----------------------------------------------------------------------------- + +! 2014-07-24 - Gloria Corti + - Modify requirements to remove src and include directory + otherwise made by cmt and copy is not done since directories exist + +! 2014-07-17 - Marco Clemencic + - Removed files that were not meant to be committed. + +! 2014-03-27 - Nigel Watson + - Adapted requirements for nightly builds, following Marco Cl.'s recommendations. diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/TestEm7.in b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/TestEm7.in new file mode 100644 index 0000000000000000000000000000000000000000..8ea4fbcc8c46901827ed43ad8b2e112c93d99fe3 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/TestEm7.in @@ -0,0 +1,75 @@ +# $Id: TestEm7.in,v 1.20 2008-11-20 20:34:50 vnivanch Exp $ +# +# Macro file for "TestEm7.cc" +# (can be run in batch, without graphic) +# +# +/control/verbose 1 +/run/verbose 1 +# +/testem/det/setMat G4_WATER +/testem/det/setSizeX 20 cm +/testem/det/setSizeYZ 20 cm +# +/testem/det/tallyNumber 4 +/testem/det/tallyDefinition 1 G4_WATER 2. 2. 2. mm +/testem/det/tallyDefinition 2 G4_WATER 2. 2. 2. mm +/testem/det/tallyDefinition 3 G4_WATER 2. 2. 2. mm +/testem/det/tallyDefinition 4 G4_WATER 2. 2. 2. mm +/testem/det/tallyPosition 1 -9.9 0. 0. cm +/testem/det/tallyPosition 2 -5. 0. 0. cm +/testem/det/tallyPosition 3 0. 0. 0. cm +/testem/det/tallyPosition 4 5. 0. 0. cm +# +/testem/phys/addPhysics emstandard_opt3 +# +/run/initialize +# +/gun/particle proton +/gun/energy 160 MeV +# beam size +/testem/gun/rndm 3 mm +# +/testem/stepMax 1 mm +# +/testem/event/printModulo 1000 +# +/run/beamOn 10000 +# +/gun/particle ion +/gun/ion 6 12 6 +/gun/energy 3.5 GeV +# +/testem/stepMax 100 mm +# +/run/beamOn 1000 +# +/testem/det/setMat G4_Cu +/testem/det/tallyNumber 0 +/testem/det/update +# +/gun/particle kaon+ +/gun/energy 100 MeV +/run/beamOn 1000 +# +/testem/det/setMat TechVacuum +/testem/det/update +# +/gun/particle alpha +/gun/energy 0.265 keV +/run/beamOn 100 +# +/testem/det/setMat G4_WATER +/testem/det/update +# +/gun/particle alpha +/gun/energy 100 MeV +/run/beamOn 100 +# +/testem/det/setMat Water_1.05 +/gun/particle proton +/gun/energy 160 MeV +/testem/stepMax 1 mm +/tracking/verbose 0 +/run/beamOn 1000 +# diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/run_single.csh b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/run_single.csh new file mode 100644 index 0000000000000000000000000000000000000000..62f01171c34a06665cb9cfd3597ddc7ff481335d --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm7/scripts/run_single.csh @@ -0,0 +1,11 @@ +#/bin/csh +#================================================ +# Macro file for hadr00 run over all Physics Lists +# 26.06.2009 V.Ivanchneko +#================================================ +#Run with: source run_single.csh TestEm7 + +rm -f $1.out +$G4CONFIGROOT/../G4examples/extended/electromagnetic/G4TestEm7/$CMTCONFIG/testEm7.exe $1.in >& $1_test.out + +# diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/cmt/requirements b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/cmt/requirements new file mode 100755 index 0000000000000000000000000000000000000000..e596f7b2526098491c7e01c4050451927aa26ff3 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/cmt/requirements @@ -0,0 +1,40 @@ +package G4TestEm9 + +version v4r0 +branches cmt doc scripts + +################################################## +# Package to run extended Geant4 example TestEm9 # +################################################## + +use G4physics_lists v* Geant4 +use G4analysis v* Geant4 + +include_dirs ../include + +#------ Example TestEm9- ------- +#------ Building the library ------- + +library G4TestEm9 $(G4LibraryFlags) ../src/*.cc +apply_pattern linker_library library=G4TestEm9 + +#------ Building the application --- + +application testEm9 ../TestEm9.cc + +#======================================================================== + +private +apply_pattern G4_copy_examples_source +macro_append testEm9_dependencies " G4TestEm9 " +end_private + + + + + + + + + + diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/README b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/README new file mode 100644 index 0000000000000000000000000000000000000000..0f83c2e24f87a4763f17183a457ac28bcbc424fd --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/README @@ -0,0 +1,118 @@ +$Id: README,v 1.12 2008-08-22 14:35:12 vnivanch Exp $ +------------------------------------------------------------------- + + ========================================================= + Geant4 - an Object-Oriented Toolkit for Simulation in HEP + ========================================================= + + TestEm9 + ------- + Demonstrate electromagnetic physics in crystal calorimeters. + How to define cut-per-region. + + 1- GEOMETRY DEFINITION + + The geometry consists of the vertex detector (VD), the electromagnetic + calorimeter (EM), and the muon identifier (MU). Detector layout along + the axis Z. + + VD consisted of 3 layers of Si with pads structured along the axis X. + Between VD and EM there are 2 active absorbers (scintillators). + EM is the matrix 5x5 of heavy crystals. MU consist of 2 active absorbers + (scintillators) and the iron plate between. + + 2 additional to the World regions are defined: VertexDetector and + MuonDetector. For testing purposes first absorber of MU is included in + the region of VD. + + Material of calorimiter and absorber can be choosen: + Air Water lAr Al Fe BGO PbWO4 Pb. + eg: /testem/det/CalMat PbWO4 + /testem/det/AbsMat Al + + The size of the detector can be changed also. + + eg: /testem/det/EcalLength 20 cm + /testem/det/EcalWidth 5 cm + /testem/det/update ---> rebuild the geometry + + 2- PHYSICS LISTS + + Physics Lists are based on modular design. Few modules are instantiated: + 1. Transporatation + 2. EM physics + 3. Decays + 4. StepMax - for steplimitation + + The following options for EM physics using builders from physics_lists + sub-package are available: + - "emstandard" (default) + - "emstandard_opt1" (EMV) + - "emstandard_opt2" (EMX) + - "emstandard_opt3" recommended for medical and space applications + + There are local to this example variants of EM physics: + - "emstandard_local" close to opt3 + - "standardIG" close to opt2 + - "standardLPM" relativistic bremsstrahlung model added to opt1 + - "Livermore" low-energy EM physics using Livermore data + - "Penelope" low-energy EM physics implementing Penelope models + + Optional components can be added: + - "elastic" elastic scattering of hadrons + - "binary" QBBC configuration of hadron/ion inelastic models + - "gamma_nuc" gamma- and electro-nuclear processes + - "stopping" stopping processes + + 3- AN EVENT : THE PRIMARY GENERATOR + + The primary kinematic consists of a single particle which hits the + cylinder perpendicular to the input face. The type of the particle + and its energy are set in the PrimaryGeneratorAction class, and can + changed via the G4 build-in commands of ParticleGun class. + + 4- OUTPUT + + The batch regime of simulation can be started + $G4WORKDIR/bin/$G4SYSTEM/TestEm9 TestEm9.in + where TestEm9.in is the example of macro file for batch job. + + As a result of simulation the number of secondaries produced + in different regions are averaged. The average energy depositions + in active absorbers and EM as well as RMS of these values are shown. + The number of hits in pads of VD is printed out. + + 5- VISUALISATION + + To use visualisation the environment variable G4_VIS_USE should be + defined. An interactive session starts if no macro file is specified + in the command line: + $G4WORKDIR/bin/$G4SYSTEM/TestEm9 + + To start visualisation one can issur + >/control/execute vis.mac + >/run/beamOn 1 + + 6- ANALYSIS + + To create histograms/ntuple for further analysis one should define + environment variable G4ANALYSIS_USE and setup local AIDA implementation. + The example should be recompiled: + + gmake histclean + gmake + + The macro file csi.mac can be used as exmple of macro for analysis. It + can be executed in the following way: + $G4WORKDIR/bin/$G4SYSTEM/TestEm9 csi.mac + + + 7- Using histograms + ------------------- + + By default the histograms are not activated. To activate histograms + the environment variable G4ANALYSIS_USE should be defined. For instance + uncomment the flag G4ANALYSIS_USE in GNUmakefile. + + To use histograms any of implementations of AIDA interfaces should + be available. See InstallAida.txt diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/release.notes b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..618f973a5b77eec67cc680909a0d65e11c2915de --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/doc/release.notes @@ -0,0 +1,6 @@ + +! 2014-07-24 - Gloria Corti + - Modify requirements to remove src and include directory + otherwise made by cmt and copy is not done since directories exist + - MOdify requirements the same way as in TestEm7, otherwise executable not + makde diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9.in b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9.in new file mode 100644 index 0000000000000000000000000000000000000000..7d50d6afe4b44717860292bd647bab826b0df594 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9.in @@ -0,0 +1,42 @@ +# $Id: TestEm9.in,v 1.19 2011-01-06 15:56:39 vnivanch Exp $ +# GEANT4 tag $Name: not supported by cvs2svn $ +# +# Macro file for TestEm9 - Crystal Calorimeter +# V.Ivanchenko +# +# +/control/verbose 2 +/run/verbose 1 +#/tracking/verbose 1 +# +# select EM PhysicsList +# +/testem/phys/addPhysics emstandard_opt1 +# +/testem/phys/setCuts 0.3 mm +/testem/phys/VertexCuts 0.01 mm +/testem/phys/MuonCuts 10.0 mm +/testem/stepMax 100 mm +# +/testem/det/acceptance1 0.8271 0.02974 2.5 +/testem/det/acceptance9 0.9570 0.01286 2.5 +/testem/det/acceptance25 0.9793 0.00884 2.5 +# +/run/initialize +#/process/em/applyCuts true +# +#/testem/histo/fileName e_pr.root +#/testem/histo/fileType root +/gun/particle e- +/gun/energy 1 GeV +/run/beamOn 100 +# +/testem/det/acceptance1 0.0136 0.0001 500 +/testem/det/acceptance9 0.0139 0.0001 500 +/testem/det/acceptance25 0.0139 0.0001 500 +# +/gun/particle mu- +/gun/energy 20 GeV +/run/beamOn 1000 +# + diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9_test.out b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9_test.out new file mode 100644 index 0000000000000000000000000000000000000000..3e8763ee7b97c7a9c8deee2e10da5470264ab9e7 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/TestEm9_test.out @@ -0,0 +1,495 @@ + +************************************************************* + Geant4 version Name: geant4-09-05-patch-02 (22-October-2012) + Copyright : Geant4 Collaboration + Reference : NIM A 506 (2003), 250-303 + WWW : http://cern.ch/geant4 +************************************************************* + +/run/verbose 1 +#/tracking/verbose 1 +# +# select EM PhysicsList +# +/testem/phys/addPhysics emstandard_opt1 +PhysicsList::Set emstandard_opt1 EM physics +# +/testem/phys/setCuts 0.3 mm +/testem/phys/VertexCuts 0.01 mm +/testem/phys/MuonCuts 10.0 mm +/testem/stepMax 100 mm +# +/testem/det/acceptance1 0.8271 0.02974 2.5 +/testem/det/acceptance9 0.9570 0.01286 2.5 +/testem/det/acceptance25 0.9793 0.00884 2.5 +# +/run/initialize +Ecal is 36 cm of G4_CESIUM_IODIDE +Absorber is 2 mm of G4_Al +Vertex is 3 cm of 3 layers of Si of 100 um npads= 601 +### New geometry is constructed +#/process/em/applyCuts true +# +#/testem/histo/fileName e_pr.root +#/testem/histo/fileType root +/gun/particle e- +/gun/energy 1 GeV +/run/beamOn 100 + +phot: for gamma, applyCuts: 1 SubType= 12 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + PhotoElectric : Emin= 0 eV Emax= 10 TeV FluoActive + +compt: for gamma, applyCuts: 1 SubType= 13 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + Klein-Nishina : Emin= 0 eV Emax= 10 TeV + +conv: for gamma, applyCuts: 1 SubType= 14 + Lambda tables from 1.022 MeV to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + BetheHeitler : Emin= 0 eV Emax= 10 TeV + +msc: for e- SubType= 10 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + UrbanMsc95 : Emin= 0 eV Emax= 10 TeV + +eIoni: for e- SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 1, dRoverRange= 0.8, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + MollerBhabha : Emin= 0 eV Emax= 10 TeV + +eBrem: for e- SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + LPM flag: 1 for E > 1 GeV + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + eBremSB : Emin= 0 eV Emax= 1 GeV AngularGenUrban + eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban + +eIoni: for e+ SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 1, dRoverRange= 0.8, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + MollerBhabha : Emin= 0 eV Emax= 10 TeV + +eBrem: for e+ SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + LPM flag: 1 for E > 1 GeV + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + eBremSB : Emin= 0 eV Emax= 1 GeV AngularGenUrban + eBremLPM : Emin= 1 GeV Emax= 10 TeV AngularGenUrban + +annihil: for e+, applyCuts: 1 SubType= 5 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + eplus2gg : Emin= 0 eV Emax= 10 TeV + +msc: for proton SubType= 10 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + UrbanMsc90 : Emin= 0 eV Emax= 10 TeV + +hIoni: for proton SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + Bragg : Emin= 0 eV Emax= 2 MeV + BetheBloch : Emin= 2 MeV Emax= 10 TeV + +hBrems: for proton SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hBrem : Emin= 0 eV Emax= 10 TeV + +hPairProd: for proton SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hPairProd : Emin= 0 eV Emax= 10 TeV + +msc: for GenericIon SubType= 10 + RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 0 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + UrbanMsc90 : Emin= 0 eV Emax= 10 TeV + +ionIoni: for GenericIon SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.01, dRoverRange= 0.1, integral: 1, fluct: 1, linLossLimit= 0.02 + Stopping Power data for 17 ion/material pairs + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + BraggIon : Emin= 0 eV Emax= 2 MeV + BetheBloch : Emin= 2 MeV Emax= 10 TeV + +hIoni: for anti_proton SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + ICRU73QO : Emin= 0 eV Emax= 2 MeV + BetheBloch : Emin= 2 MeV Emax= 10 TeV + +msc: for kaon+ SubType= 10 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + UrbanMsc90 : Emin= 0 eV Emax= 10 TeV + +hIoni: for kaon+ SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + Bragg : Emin= 0 eV Emax= 1.05231 MeV + BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV + +hBrems: for kaon+ SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hBrem : Emin= 0 eV Emax= 10 TeV + +hPairProd: for kaon+ SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hPairProd : Emin= 0 eV Emax= 10 TeV + +hIoni: for kaon- SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + ICRU73QO : Emin= 0 eV Emax= 1.05231 MeV + BetheBloch : Emin= 1.05231 MeV Emax= 10 TeV + +hBrems: for kaon- SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hBrem : Emin= 0 eV Emax= 10 TeV + +hPairProd: for kaon- SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hPairProd : Emin= 0 eV Emax= 10 TeV + +muMsc: for mu+ SubType= 10 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + RangeFactor= 0.2, step limit type: 0, lateralDisplacement: 1, polarAngleLimit(deg)= 180 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + WentzelVIUni : Emin= 0 eV Emax= 10 TeV + +muIoni: for mu+ SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + Bragg : Emin= 0 eV Emax= 200 keV + BetheBloch : Emin= 200 keV Emax= 1 GeV + MuBetheBloch : Emin= 1 GeV Emax= 10 TeV + +muBrems: for mu+ SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + MuBrem : Emin= 0 eV Emax= 10 TeV + +muPairProd: for mu+ SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + muPairProd : Emin= 0 eV Emax= 10 TeV + +CoulombScat: for mu+, applyCuts: 1 SubType= 1 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + 180 < Theta(degree) < 180; pLimit(GeV^1)= 0.139531 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + eCoulombScattering : Emin= 0 eV Emax= 10 TeV + +muIoni: for mu- SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + ICRU73QO : Emin= 0 eV Emax= 200 keV + BetheBloch : Emin= 200 keV Emax= 1 GeV + MuBetheBloch : Emin= 1 GeV Emax= 10 TeV + +muBrems: for mu- SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + MuBrem : Emin= 0 eV Emax= 10 TeV + +muPairProd: for mu- SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + muPairProd : Emin= 0 eV Emax= 10 TeV + +CoulombScat: for mu-, applyCuts: 1 SubType= 1 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + 180 < Theta(degree) < 180; pLimit(GeV^1)= 0.139531 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + eCoulombScattering : Emin= 0 eV Emax= 10 TeV + +hIoni: for pi+ SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + Bragg : Emin= 0 eV Emax= 297.505 keV + BetheBloch : Emin= 297.505 keV Emax= 10 TeV + +hBrems: for pi+ SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hBrem : Emin= 0 eV Emax= 10 TeV + +hPairProd: for pi+ SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hPairProd : Emin= 0 eV Emax= 10 TeV + +msc: for pi- SubType= 10 + Lambda tables from 100 eV to 10 TeV in 77 bins, spline: 1 + RangeFactor= 0.2, stepLimitType: 0, latDisplacement: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + UrbanMsc90 : Emin= 0 eV Emax= 10 TeV + +hIoni: for pi- SubType= 2 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + finalRange(mm)= 0.1, dRoverRange= 0.2, integral: 1, fluct: 1, linLossLimit= 0.01 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + ICRU73QO : Emin= 0 eV Emax= 297.505 keV + BetheBloch : Emin= 297.505 keV Emax= 10 TeV + +hBrems: for pi- SubType= 3 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hBrem : Emin= 0 eV Emax= 10 TeV + +hPairProd: for pi- SubType= 4 + dE/dx and range tables from 100 eV to 10 TeV in 77 bins + Lambda tables from threshold to 10 TeV in 77 bins, spline: 1 + ===== EM models for the G4Region DefaultRegionForTheWorld ====== + hPairProd : Emin= 0 eV Emax= 10 TeV + +========= Table of registered couples ============================== + +Index : 0 used in the geometry : Yes recalculation needed : No + Material : G4_AIR + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 1 used in the geometry : Yes recalculation needed : No + Material : G4_CESIUM_IODIDE + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 18.2919 keV e- 291.524 keV e+ 281.891 keV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 2 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 3.92577 keV e- 258.31 keV e+ 253.154 keV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 3 used in the geometry : Yes recalculation needed : No + Material : G4_AIR + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 4 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 34.1725 keV e+ 33.9436 keV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 5 used in the geometry : Yes recalculation needed : No + Material : G4_Si + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 31.9516 keV e+ 31.7376 keV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 6 used in the geometry : Yes recalculation needed : No + Material : G4_Fe + Range cuts : gamma 1 cm e- 1 cm e+ 1 cm proton 0 fm + Energy thresholds : gamma 60.499 keV e- 13.0779 MeV e+ 12.2279 MeV proton 0 eV + Region(s) which use this couple : + MuonDetector + +Index : 7 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 1 cm e- 1 cm e+ 1 cm proton 0 fm + Energy thresholds : gamma 20.3682 keV e- 4.52289 MeV e+ 4.28616 MeV proton 0 eV + Region(s) which use this couple : + MuonDetector + +==================================================================== + +### Run 0 start +HistoManager: Histograms are booked and run has been started +Start Run processing. +Run terminated. +Run Summary + Number of events processed : 100 + User=0.79s Real=0.79s Sys=0.01s +RunAction: End of run actions are started +HistoManager: End of run actions are started RunID# 0 +================================================================= +Number of events 100 +Average number of e- 400.2 +Average number of gamma 642.2 +Average number of e+ 47.79 +Average number of steps 2930 +Edep 1x1 = 0.833 +- 0.002632 res= 3.16 % +Edep 3x3 = 0.9578 +- 0.001119 res= 1.151 % +Edep 5x5 = 0.9798 +- 0.0008623 res= 0.8623 % +=========== Mean values without trancating ===================== +Edep 1x1 = 0.833 +- 0.002632 res= 3.16 % +Edep 3x3 = 0.9568 +- 0.001231 res= 1.286 % +Edep 5x5 = 0.9787 +- 0.0009936 res= 1.015 % +=========== Ratios without trancating =========================== + E1/E9 = 0.8706 +- 0.0024 + E1/E25 = 0.8512 +- 0.002633 + E9/E25 = 0.9776 +- 0.0008815 +Beam Energy 1 GeV +================================================================== + + +<<<<<ACCEPTANCE>>>>> 100 events for Crystal Calorimeter +Edep1x1: 0.833 delEdep1x1= 0.005927 nrms= 1.993 +Erms1x1: 0.02632 delErms1x1= -0.00342 nrms= -1.15 +Edep3x3: 0.9578 delEdep3x3= 0.0008294 nrms= 0.645 +Erms3x3: 0.01102 delErms3x3= -0.001838 nrms= -1.429 +Edep5x5: 0.9798 delEdep5x5= 0.0005223 nrms= 0.5908 +Erms5x5: 0.008449 delErms5x5= -0.0003912 nrms= -0.4426 +<<<<<END>>>>> IS ACCEPTED + + Z bremsstrahlung photoeffect compton conversion + 13 0 0 158 0 + 53 263 40 0 45 + 55 282 48 0 48 +# +/testem/det/acceptance1 0.0136 0.0001 500 +/testem/det/acceptance9 0.0139 0.0001 500 +/testem/det/acceptance25 0.0139 0.0001 500 +# +/gun/particle mu- +/gun/energy 20 GeV +/run/beamOn 1000 + +========= Table of registered couples ============================== + +Index : 0 used in the geometry : Yes recalculation needed : No + Material : G4_AIR + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 1 used in the geometry : Yes recalculation needed : No + Material : G4_CESIUM_IODIDE + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 18.29 keV e- 291.5 keV e+ 281.9 keV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 2 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 300 um e- 300 um e+ 300 um proton 1 mm + Energy thresholds : gamma 3.926 keV e- 258.3 keV e+ 253.2 keV proton 100 keV + Region(s) which use this couple : + DefaultRegionForTheWorld + +Index : 3 used in the geometry : Yes recalculation needed : No + Material : G4_AIR + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 4 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 34.17 keV e+ 33.94 keV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 5 used in the geometry : Yes recalculation needed : No + Material : G4_Si + Range cuts : gamma 10 um e- 10 um e+ 10 um proton 0 fm + Energy thresholds : gamma 990 eV e- 31.95 keV e+ 31.74 keV proton 0 eV + Region(s) which use this couple : + VertexDetector + +Index : 6 used in the geometry : Yes recalculation needed : No + Material : G4_Fe + Range cuts : gamma 1 cm e- 1 cm e+ 1 cm proton 0 fm + Energy thresholds : gamma 60.5 keV e- 13.08 MeV e+ 12.23 MeV proton 0 eV + Region(s) which use this couple : + MuonDetector + +Index : 7 used in the geometry : Yes recalculation needed : No + Material : G4_Al + Range cuts : gamma 1 cm e- 1 cm e+ 1 cm proton 0 fm + Energy thresholds : gamma 20.37 keV e- 4.523 MeV e+ 4.286 MeV proton 0 eV + Region(s) which use this couple : + MuonDetector + +==================================================================== + +### Run 1 start +HistoManager: Histograms are booked and run has been started +Start Run processing. +Run terminated. +Run Summary + Number of events processed : 1000 + User=1.17s Real=1.17s Sys=0s +RunAction: End of run actions are started +HistoManager: End of run actions are started RunID# 1 +================================================================= +Number of events 1000 +Average number of e- 68.7 +Average number of gamma 61.57 +Average number of e+ 3.392 +Average number of steps 393.1 +Edep 1x1 = 0.014 +- 0.0001577 res= 159.1 % +Edep 3x3 = 0.01421 +- 0.000162 res= 160.9 % +Edep 5x5 = 0.01426 +- 0.0001649 res= 163.1 % +=========== Mean values without trancating ===================== +Edep 1x1 = 0.01417 +- 0.0002008 res= 200.4 % +Edep 3x3 = 0.01449 +- 0.0002221 res= 216.7 % +Edep 5x5 = 0.01455 +- 0.0002255 res= 219.2 % +=========== Ratios without trancating =========================== + E1/E9 = 0.9842 +- 0.0007035 + E1/E25 = 0.9816 +- 0.0007942 + E9/E25 = 0.9973 +- 0.0001768 +Beam Energy 20 GeV +================================================================== + +# +G4 kernel has come to Quit state. diff --git a/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/run_single.csh b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/run_single.csh new file mode 100644 index 0000000000000000000000000000000000000000..a1553d10a098e92fb181ad9ed918e98fb23b1246 --- /dev/null +++ b/Geant4/G4examples/extended/electromagnetic/G4TestEm9/scripts/run_single.csh @@ -0,0 +1,11 @@ +#/bin/csh +#================================================ +# Macro file for hadr00 run over all Physics Lists +# 26.06.2009 V.Ivanchneko +#================================================ +#Run with: source run_single.csh TestEm9 + +rm -f $1.out +$G4CONFIGROOT/../G4examples/extended/electromagnetic/G4TestEm9/$CMTCONFIG/testEm9.exe $1.in >& $1_test.out + +# diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/cmt/requirements b/Geant4/G4examples/extended/hadronic/G4Hadr00/cmt/requirements new file mode 100755 index 0000000000000000000000000000000000000000..f5eadb9f9a762318b3bc63a4e74e0945ec2dba73 --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/cmt/requirements @@ -0,0 +1,31 @@ +package G4Hadr00 + +version v4r0 +branches cmt doc scripts + +################################################# +# Package to run extended Geant4 example Hadr00 # +################################################# + +use G4physics_lists v* Geant4 +use G4analysis v* Geant4 + +include_dirs ../include + +#------ Example Hadr00- extracting cross-sections from physics lists ------- + +#------ Building the library ------- + +library G4Hadr00 $(G4LibraryFlags) ../src/*.cc +apply_pattern linker_library library=G4Hadr00 + +#------ Building the application --- + +application hadr00 ../hadr00.cc + +#======================================================================== + +private +apply_pattern G4_copy_examples_source +macro_append hadr00_dependencies " G4Hadr00 " +end_private diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/README b/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/README new file mode 100644 index 0000000000000000000000000000000000000000..d18b16fd8f83a90615c84e24abdb0c8fa55002bd --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/README @@ -0,0 +1,121 @@ + ========================================================= + Geant4 - an Object-Oriented Toolkit for Simulation in HEP + ========================================================= + + + HADR00 + + V.Ivanchenko + CERN, Geneva, Switzerland + + +This example demonstrates a usage of G4PhysListFactory to build +Physics List and G4HadronicProcessStore to access cross sections. + + GEOMETRY + +The Target volume is a cylinder placed inside the World volume. Following +UI commands are available to modify the geometry: + +/testhadr/TargetMat G4_Pb +/testhadr/WorldMat G4_AIR +/testhadr/TargetRadius 10 mm +/testhadr/TargetLength 20 cm + +If geometry was changed between two runs, then the following command need to +be executed: + +/testhadr/update + +By default beam direction coincides with the target axis and is Z axis +in the global coordinate system. The beam starts in the middle of the target. +G4ParticleGun is used as a primary generator. The energy and the type of +the beam can be defined via standard UI commands + +/gun/energy 15 GeV +/gun/particle proton + + PHYSICS + +Physics List is defined by the PHYSLIST environment variable. By default +QGSP_BERT Physics List will be instantiated. + + + CROSS SECTION + +At the end of any run the set of cross sections is built and can be printed +out for a given projectile particle and a target element, which can be +defined via UI commands: + +/testhadr/particle pi+ +/testhadr/targetElm Pb +/testhadr/verbose 1 + +The level verbosity above zero provides printout of the cross section table. +The energy/momentum limits and number of bins can be set via UI commands: + +/testhadr/nBinsE 900 +/testhadr/nBinsP 700 +/testhadr/minEnergy 1 keV +/testhadr/maxEnergy 1 TeV +/testhadr/minMomentum 1 MeV +/testhadr/maxMOmentum 10 TeV + + VISUALIZATION + +For interactive mode G4 visualization options and variables should be +defined, then the example should be recompiled: + +gmake visclean +gmake + +The vis.mac file can be used an example of visualization. The following +command can be used: + +/testhadr/DrawTracks charged +/testhadr/DrawTracks neutral +/testhadr/DrawTracks all + + HISTOGRAMS + +All histograms are provided in decimal logarithmic scale (log10(E/MeV) +and log10(p/GeV)) for one projectile particle and one target element. +The element is taken from the Geant4 NIST database, natural isotope +composition is assumed. + +To use histograms any of implementations of AIDA interfaces should +be available (see http://aida.freehep.org). + +For example, if iAIDA is installed and compiled at SLC4 Linux + +setenv AIDA_DIR $MYPACKAGES/analysis/iAIDA/install/slc4_amd64_gcc34_root +setenv PATH ${PATH}:${AIDA_DIR}/bin + +Before compilation of the example it is optimal to clean up old +object files: + +gmake histclean +setenv G4ANALYSIS_USE 1 +gmake + +It is possible to choose the format of the output file with +histograms using UI command: + +/testhadr/HistoName name +/testhadr/HistoType type +/testhadr/HistoOption "uncompress" + +The following types are available: hbook, root, aida. They will be +stored in the file "name.hbook", "name.root", or "name.aida". + +To show the content of a histogram ID=i the commands may be applied: + +/testhadr/HistoPrint i + +!!! +Please put '/run/initialize' after '/testhadr/' commands and before +'/run/beamOn ' command: + +/testhadr/.. +/run/initialize +/run/beamOn 0 diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/release.notes b/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..1c362ecf48efa462b27dae10783def7413010394 --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/doc/release.notes @@ -0,0 +1,21 @@ +!----------------------------------------------------------------------------- +! Package : Geant4/G4examples +! Responsible : James Mccarthy +! Purpose : Examples packages provided my Geant4, used as standalone tests +!----------------------------------------------------------------------------- + +! 2014-07-24 - Gloria Corti + - Modify requirements to remove src and include directory + otherwise made by cmt and copy is not done since directories exist + +! 2014-07-17 - Marco Clemencic + - Removed files that were not meant to be committed. + +! 2014-07-11 - James Mccarthy + - Updated requirements file to be compatible with Geant4 9.6 + +! 2014-07-11 - James Mccarthy + - Updated requirements file to be compatible with Geant4 9.5 for tagged release + +! 2014-03-27 - Nigel Watson + - Adapted requirements for nightly builds, following Marco Cl.'s recommendations. diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/createHisto.C b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/createHisto.C new file mode 100644 index 0000000000000000000000000000000000000000..6254de291c0d2755bfe253307e834af60a8b9ac6 --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/createHisto.C @@ -0,0 +1,106 @@ +void createHisto(string fileName) +{ + + ifstream infile( (fileName+".out").c_str()); + + if(!infile) + { + cout<<"Error opening inputfile: "<<fileName<<endl; + return; + } + + char line[256]; + + string search_end="HistoManager: End of run actions are started"; + string search_nbins="/testhadr/nBinsE "; + + int nLines=0; + int maxLines=10000; + + int nBins(0); + + while(true) + { + infile.getline(line,256); + + string str_line(line); + + if(str_line.find(search_end)!=std::string::npos) + { + cout<<line<<endl; + break; + } + + if(str_line.find(search_nbins)!=std::string::npos) + { + string str_bins=str_line.replace(str_line.find(search_nbins), search_nbins.length(), ""); + nBins=atoi(str_bins.c_str()); + } + + + nLines++; + if(nLines>maxLines){ + cout<<"Manually breaking the loop"<<endl; + break; + } + + } + + cout<<"nBins= "<<nBins<<endl; + + string dummy, particle, target; + infile>>dummy>>dummy>>dummy>>dummy>>dummy>>particle>>dummy>>target; + + cout<<"Creating histogram for "<<particle<<" interacting with "<<target<<endl; + + for(int i=0; i<4; i++) + { + infile.getline(line,256); + } + + int* N = new int[nBins]; + double* energy = new double[nBins]; + double* elastic = new double[nBins]; + double* inelastic = new double[nBins]; + double* total = new double[nBins]; + + int N_2; + double energy_2, elastic_2, inelastic_2, total_2; + + for(int i=0; i<nBins; i++) + { + infile>>N[i]>>energy[i]>>elastic[i]>>inelastic[i]>>total[i]; + } + + /*TCanvas* c1= new TCanvas("c1","c1",0,0,800,500); + c1->SetLogx(); + c1->SetGridx(); + */ + TFile* output = new TFile( (fileName+".root").c_str() , "RECREATE"); + + TGraph* gr_elastic=new TGraph(nBins, energy, elastic); + gr_elastic->SetName("Elastic"); + gr_elastic->SetTitle( ("Elastic cross section for "+particle+" interacting with "+target).c_str() ); + gr_elastic->GetXaxis()->SetTitle("Energy (MeV)"); + gr_elastic->GetYaxis()->SetTitle("Elastic cross section (b)"); + gr_elastic->SetLineWidth(2); + gr_elastic->Write(); + + TGraph* gr_inelastic=new TGraph(nBins, energy, inelastic); + gr_inelastic->SetName("Inelastic"); + gr_inelastic->SetTitle( ("Inelastic cross section for "+particle+" interacting with "+target).c_str() ); + gr_inelastic->GetXaxis()->SetTitle("Energy (MeV)"); + gr_inelastic->GetYaxis()->SetTitle("Inelastic cross section (b)"); + gr_inelastic->SetLineWidth(2); + gr_inelastic->Write(); + + TGraph* gr_total=new TGraph(nBins, energy, total); + gr_total->SetName("Total"); + gr_total->SetTitle( ("Total cross section for "+particle+" interacting with "+target).c_str() ); + gr_total->GetXaxis()->SetTitle("Energy (MeV)"); + gr_total->GetYaxis()->SetTitle("Total cross section (b)"); + gr_total->SetLineWidth(2); + gr_total->Write(); + + +} diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/hadr00_template b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/hadr00_template new file mode 100644 index 0000000000000000000000000000000000000000..c6dae37a49f3189abc424270fe0aa46308120152 --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/hadr00_template @@ -0,0 +1,35 @@ +#================================================ +# Macro file for hadr00 +# 06.06.2008 V.Ivanchneko +#================================================ +/control/verbose 1 +/run/verbose 1 +/tracking/verbose 0 +# +/testhadr/TargetMat G4_Al +/testhadr/TargetRadius 2 cm +/testhadr/TargetLength 50 cm +/testhadr/PrintModulo 10 +# +/testhadr/particle _particleZ +/testhadr/targetElm _targetZ +/testhadr/verbose 1 +/testhadr/nBinsE 900 +/testhadr/nBinsP 700 +/testhadr/minEnergy 1 keV +/testhadr/maxEnergy 1 TeV +/testhadr/minMomentum 1 MeV +/testhadr/maxMomentum 10 TeV +# +/testhadr/HistoType root +/testhadr/HistoName test +/testhadr/verbose 1 +/testhadr/HistoPrint 1 +/run/initialize +# +#/run/setCut 1 km +#/gun/particle proton +#/gun/energy 20. GeV +# +/run/beamOn 0 +# diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run.sh b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..a4f34b85f3ca4ade5a2d4737e300210bf7f04b6f --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run.sh @@ -0,0 +1,19 @@ +phys_lists=('FTFP' 'FTFP_BERT' 'QGSP_BERT' 'QGSP_FTFP_BERT') +particles=('pi+' 'pi-' 'kaon+' 'kaon-' 'proton' 'anti_proton') +targets=('Al' 'Be' 'Si') + +#phys_lists=('FTFP') +#particles=('pi+') +#targets=('Al') + +for phys_list in "${phys_lists[@]}" +do + for particle in "${particles[@]}" + do + for target in "${targets[@]}" + do + cat hadr00_template | sed "s|_particleZ|${particle}|g" | sed "s|_targetZ|${target}|g" > hadr00.in + source run_single.csh ${phys_list} hadr00 ${phys_list}_${particle}_${target} + done + done +done \ No newline at end of file diff --git a/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run_single.csh b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run_single.csh new file mode 100644 index 0000000000000000000000000000000000000000..8d43da9aae5c5475d0fffecdcc6b58d9f7145386 --- /dev/null +++ b/Geant4/G4examples/extended/hadronic/G4Hadr00/scripts/run_single.csh @@ -0,0 +1,11 @@ +#/bin/csh +#================================================ +# Macro file for hadr00 run over all Physics Lists +# 26.06.2009 V.Ivanchneko +#================================================ + +rm -f $3.out +$G4CONFIGROOT/../G4examples/extended/hadronic/G4Hadr00/$CMTCONFIG/hadr00.exe $2.in $1 >& $3.out +#cat $3.out +root -l -q createHisto.C\(\"$3\"\) +# diff --git a/Geant4Sys/cmt/requirements b/Geant4Sys/cmt/requirements index d64f24e31b86155f3aa1955a7ce3cb7e88cdfa7d..501d983602f20a0bb81fe4e73d6188a6cfde887c 100755 --- a/Geant4Sys/cmt/requirements +++ b/Geant4Sys/cmt/requirements @@ -1,9 +1,9 @@ package Geant4Sys -version v95r2p6 +version v95r2p7 branches cmt doc -use G4config v95r2p6 Geant4 +use G4config v95r2p7 Geant4 # ============================================================================= # =========== global libraries ================================================ @@ -48,6 +48,10 @@ use G4UIGAG v4r2 Geant4 # LHCb additional package (eg. for MC11 G4LHCblists) use G4LHCblists v3r0 Geant4 +# G4 examples package - for checks +use G4analysis v1r0 Geant4 +use G4examples v4r1 Geant4 + #============================================================================= # ======== the end ============================================================ # ============================================================================= diff --git a/Geant4Sys/cmt/version.cmt b/Geant4Sys/cmt/version.cmt index 92641fe40528585d3c2fc71a455da4fe25017dbc..de6213929501556a800a75b69f5b4478261cda89 100644 --- a/Geant4Sys/cmt/version.cmt +++ b/Geant4Sys/cmt/version.cmt @@ -1 +1 @@ -v95r2p6 +v95r2p7 diff --git a/Geant4Sys/doc/release.notes b/Geant4Sys/doc/release.notes index 89f701ea3a1f8950c18397030b2fe99d85559c16..0a20baa183cd2935da45316f41ec8a0903780ef0 100755 --- a/Geant4Sys/doc/release.notes +++ b/Geant4Sys/doc/release.notes @@ -4,13 +4,128 @@ 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> +!</PRE><H1><A NAME=v95r2p7>2014-07-25 Geant4Sys v95r2p7</A></H1><PRE> + +! 2014-07-25 - Gloria Corti + - Switch on package G4examples and G4analysis as they will work with all + future releases + +! 2014-03-07 - Gloria Corti + - Switch off the new packaages sicne they are added to the nighlty slot + explicitely + +! 2014-03-06 - James Mccarthy + - Added G4analysis package to list of dependencies + +! 2014-02-25 - James Mccarthy + - Added G4examples package to list of dependencies + +! ======================= G4config v95r2p7 2014-07-25 ======================== +! 2014-06-27 - Gloria Corti + - Put explicit afs directory for Geant4 sources to fix issue with LCG68 while + still making it work for earlier LCG version. For details refer to + https://its.cern.ch/jira/browse/LHCBGAUSS-221 + - Put back version 9.5.p02 as source, since for 9.6 tests and nightlies builds + that is done via the 'override-geant4-version' mechanism setup up by + Marco Cl. + +! 2014-03-12 - Marco Clemencic + - Implemented an extra install step to emulate in CMake the way the sources + are copied to the source directories. + +! 2014-03-04 - Nigel Watson + - Re-assert suppress copying of local sources. + +! 2014-02-27 - James Mccarthy + - Added copy_examples_source for G4examples package + +! 2014-02-26 - Nigel Watson + - Update for g4 9.6 tests, suppress copying of local sources. + +! 2014-02-19 - Marco Clemencic + - Modified copy_include.csh to avoid problems with the recursive symlink + 'Geant4' that appeared in 'include' starting from Geant4 9.6. + (note taht the .sh and .bat versions were not modified, since they are not + used) + +!===================== Geant4/G4examples v4r1 2014-07-25 ===================== +! 2014-07-24 - Gloria Corti + - Modify requirements of subpackages to remove src and include directory + otherwise made by cmt and copy is not done since directories exist + +! 2014-07-17 - Marco Clemencic + - Removed files that were not meant to be committed. + +! 2014-07-16 - Gloria Corti + - Modified all requirements files to use pattern linker_library instead of + appending library to XXX_use_linkopts. This fixes compilation issues on + slc5, see details on https://its.cern.ch/jira/browse/LHCBGAUSS-193 + +!===================== Geant4/G4examples v4r0 2014-07-11 ===================== +! 2014-03-27 - Nigel Watson + - Adapted requirements for nightly builds, following Marco Cl.'s + recommendations. + +!===================== Geant4/G4analysis v1r0 2014-07-25 ===================== +! 2014-03-06 - James Mccarthy + - Added package to build library required for G4examples in Geant4 9.6 + +!============================================================================= +!</PRE><H1><A NAME=v95r2p6>2013-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 +! ======================= 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 + +! ======================= 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. + +!======================== G4LHCblists v3r0 2013-09-16 ======================== +! 2013-09-16 - Gloria Corti + - Remove obsolete header of physics list that was left over + . HadronPhysicsQGSP_BERT_HP.hh + !============================================================================= !</PRE><H1><A NAME=v95r2p5>2013-05-16 Geant4Sys v95r2p5</A></H1><PRE> ! 2013-05-16 - Nigel Watson @@ -43,7 +158,7 @@ Purpose : LHCb build using cmt of Geant4 ! ======================= G4processes v8r3p1 2013-02-14 ======================== ! 2013-02-14 - Nigel Watson - - Remove copyPatchedIncludes.py, add copyPatchedSource.py, replaces .cc/.hh from ../srcnew + - Remove copyPatchedIncludes.py, add copyPatchedSource.py, replaces .cc/.hh fro m ../srcnew (private version of G4 sources) into the InstallArea and package's include area. ! 2013-02-09 - Nigel Watson @@ -88,7 +203,7 @@ Purpose : LHCb build using cmt of Geant4 ! 2012-07-27 - Nigel Watson - Removed redundant copying of headers in copy_include scripts, changed -permissions. + permissions. ! 2012-07-26 - Nigel Watson - Removed G4externalslcg, using LCG_Interfaces instead. @@ -97,7 +212,6 @@ permissions. - Added copy pattern for G4GDML and copy scripts. ! 2012-06-19 - James McCarthy - - Added include path for new files in G4 9.5 ! 2012-04-27 - Nigel Watson diff --git a/cmt/project.cmt b/cmt/project.cmt index 4bf1cbf278624cd5131d76f4e26e0fc59f2ebc1a..142826d56610cdbaf5697fe6bcc617cc278039f6 100755 --- a/cmt/project.cmt +++ b/cmt/project.cmt @@ -1,6 +1,6 @@ project GEANT4 -use GAUDI GAUDI_v24r2 +use GAUDI GAUDI_v23r6 build_strategy with_installarea setup_strategy root diff --git a/toolchain.cmake b/toolchain.cmake deleted file mode 100644 index 8601ebbdf7b9d3f9409bff63d4eea82809e40606..0000000000000000000000000000000000000000 --- a/toolchain.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Special wrapper to load the declared version of the heptools toolchain. -set(heptools_version 65a) - -find_file(use_heptools_module UseHEPTools.cmake - HINTS ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -# this check is needed because the toolchain seem to be called a second time -# without the proper cache -if(use_heptools_module) - include(${use_heptools_module}) - use_heptools(${heptools_version}) -endif()