From 32a7f7493e2e7b85dcc591d6430636c396d5ed55 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 10 Jan 2023 13:48:57 +0100 Subject: [PATCH 1/7] Add basic .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0ba45dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/build/ +/install/ From 73caed4b9eee6c4d2432e3ba7425d14b515b8e55 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 10 Jan 2023 14:27:47 +0100 Subject: [PATCH 2/7] Use modern cmake approach to get downstream usability Define targets properly and export and install them such, that they are easily usable with find_package --- CMakeLists.txt | 31 +++++++------------------------ cmake/PhyssimConfig.cmake.in | 25 +++++++++++++++++++++++++ cmake/PhyssimCreateConfig.cmake | 25 +++++++++++++++++++++++++ src/CMakeLists.txt | 26 ++++++++++++++++++-------- 4 files changed, 75 insertions(+), 32 deletions(-) create mode 100644 cmake/PhyssimConfig.cmake.in create mode 100644 cmake/PhyssimCreateConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 60734fc..eb78f75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,10 +2,9 @@ # cmake file for building KalFit libraries # @author Jan Engels, DESY # @author F. Gaede, DESY -CMAKE_MINIMUM_REQUIRED( VERSION 2.6 FATAL_ERROR ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.15 FATAL_ERROR ) ######################################################## - # project name PROJECT( Physsim ) @@ -14,11 +13,11 @@ SET( ${PROJECT_NAME}_VERSION_MAJOR 0 ) SET( ${PROJECT_NAME}_VERSION_MINOR 4 ) SET( ${PROJECT_NAME}_VERSION_PATCH 2 ) +SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" ) - -# project version - -cmake_policy(SET CMP0008 NEW) +#--- Define basic build settings ----------------------------------------------- +# Provides install directory variables as defined for GNU software +include(GNUInstallDirs) ### DEPENDENCIES ############################################################ @@ -28,24 +27,12 @@ FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES REQUIRED ) INCLUDE( ilcsoft_default_settings ) -FIND_PACKAGE( ROOT REQUIRED ) - +FIND_PACKAGE( ROOT 6.14 REQUIRED COMPONENTS Physics ) # macros for generating root dict sources with rootcint SET( ROOT_DICT_CINT_DEFINITIONS "-DHANDLE_DICT_EXCEPTIONS=IGNORED_FOR_CINT" ) INCLUDE( "${ILCUTIL_ROOT}/cmakemodules/MacroRootDict.cmake" ) - - -### LIBRARY AND TOOLS ####################################################### - - -# require proper c++ -#ADD_DEFINITIONS( "-Wall -ansi -pedantic" ) -#----- need long long for int64 for now ------ -#ADD_DEFINITIONS( "-Wno-long-long -fno-strict-aliasing" ) - - # Physsim library ADD_SUBDIRECTORY( ./src ) @@ -58,11 +45,7 @@ ADD_SUBDIRECTORY( ./src ) #ADD_SUBDIRECTORY( ./examples/kaltest ) # ---------------------------------------------------------------------------- - - # display some variables and write them to cache DISPLAY_STD_VARIABLES() -# generate and install following configuration files -GENERATE_PACKAGE_CONFIGURATION_FILES( PhyssimConfig.cmake PhyssimConfigVersion.cmake PhyssimLibDeps.cmake ) - +include(cmake/PhyssimCreateConfig.cmake) diff --git a/cmake/PhyssimConfig.cmake.in b/cmake/PhyssimConfig.cmake.in new file mode 100644 index 0000000..8a8a1ab --- /dev/null +++ b/cmake/PhyssimConfig.cmake.in @@ -0,0 +1,25 @@ +############################################################### +# Physsim CMAKE CONFIG +# +# Exported Targets +# +# Physsim::Physsim The Physsim library +############################################################### +@PACKAGE_INIT@ + +# set_and_check(Physsim_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") +# set_and_check(Physsim_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") + +include(CMakeFindDependencyMacro) +find_dependency(ROOT @ROOT_VERSION@) + +if (NOT TARGET Physsim::Physsim) + include("${CMAKE_CURRENT_LIST_DIR}/PhyssimTargets.cmake") +endif() + +check_required_components(Physsim) + +# Print the default "Found" message and check library location +include(FindPackageHandleStandardArgs) +get_property(TEST_PHYSSIM_LIBRARY TARGET Physsim::Physsim PROPERTY LOCATION) +find_package_handle_standard_args(Physsim DEFAULT_MSG CMAKE_CURRENT_LIST_FILE TEST_PHYSSIM_LIBRARY) diff --git a/cmake/PhyssimCreateConfig.cmake b/cmake/PhyssimCreateConfig.cmake new file mode 100644 index 0000000..f7173f3 --- /dev/null +++ b/cmake/PhyssimCreateConfig.cmake @@ -0,0 +1,25 @@ +set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + +include(CMakePackageConfigHelpers) + +# Version file is same wherever we are +write_basic_package_version_file(${PROJECT_BINARY_DIR}/PhyssimConfigVersion.cmake + VERSION ${Physsim_VERSION} + COMPATIBILITY SameMajorVersion ) + +# Build tree config +# export(EXPORT PhyssimTargets NAMESPACE Physsim:: FILE ${PROJECT_BINARY_DIR}/PhyssimTargets.cmake) + +# Install tree config +configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/PhyssimConfig.cmake.in + ${PROJECT_BINARY_DIR}/PhyssimConfig.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_CMAKEDIR} + ) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PhyssimConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/PhyssimConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_CMAKEDIR}) + +install(EXPORT PhyssimTargets + DESTINATION ${CMAKE_INSTALL_CMAKEDIR} + NAMESPACE Physsim::) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6b6076..26baeae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,26 +15,36 @@ FOREACH( lib_input_dir ${lib_input_dirs} ) PREPARE_ROOT_DICT_HEADERS( ${lib_input_dir} ) - INSTALL_DIRECTORY( ${lib_input_dir}/ DESTINATION "include/physsim" + INSTALL_DIRECTORY( ${lib_input_dir}/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/physsim FILES_MATCHING PATTERN "*.h" PATTERN "LinkDef.h" EXCLUDE ) GEN_ROOT_DICT_SOURCES( ${lib_input_dir}Dict.cxx ) - INSTALL(FILES ${ROOT_DICT_OUTPUT_DIR}/${lib_input_dir}Dict_rdict.pcm DESTINATION lib) + INSTALL(FILES ${ROOT_DICT_OUTPUT_DIR}/${lib_input_dir}Dict_rdict.pcm + DESTINATION ${CMAKE_INSTALL_LIBDIR}) LIST( APPEND lib_sources ${ROOT_DICT_OUTPUT_SOURCES} ) ENDFOREACH() -INCLUDE_DIRECTORIES( ${ROOT_DICT_INCLUDE_DIRS} ) -INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIRS} ) +ADD_SHARED_LIBRARY(Physsim SHARED ${lib_sources}) +TARGET_INCLUDE_DIRECTORIES(Physsim + PUBLIC + $ + $ + PRIVATE + $ + ) +TARGET_LINK_LIBRARIES(Physsim PUBLIC ROOT::Physics) -#MESSAGE( STATUS "Physsim lib sources: ${lib_sources}" ) -ADD_SHARED_LIBRARY( Physsim ${lib_sources} ) -INSTALL_SHARED_LIBRARY( Physsim DESTINATION lib ) -TARGET_LINK_LIBRARIES( Physsim ${ROOT_LIBRARIES} ) +INSTALL(TARGETS + Physsim + EXPORT PhyssimTargets + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) IF( APPLE ) #---- need special linker flags for ROOT dictionary on MacOS SET_TARGET_PROPERTIES( Physsim PROPERTIES From 573784cf657f4f5a788dac4f4fb0ea443584d9c6 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 10 Jan 2023 14:42:35 +0100 Subject: [PATCH 3/7] Make examples build again --- example_stdhep/CMakeLists.txt | 21 ++++++++++---------- example_stdhep/src/MEMExampleEEHProcessor.cc | 2 -- example_stdhep/src/MEMExampleProcessor.cc | 2 -- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/example_stdhep/CMakeLists.txt b/example_stdhep/CMakeLists.txt index 17256f9..540538b 100644 --- a/example_stdhep/CMakeLists.txt +++ b/example_stdhep/CMakeLists.txt @@ -1,7 +1,7 @@ ######################################################## # cmake file for building Marlin example Package # @author Jan Engels, Desy IT -CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) +CMAKE_MINIMUM_REQUIRED(VERSION 3.15 FATAL_ERROR) ######################################################## @@ -14,25 +14,19 @@ SET( ${PROJECT_NAME}_VERSION_MAJOR 0 ) SET( ${PROJECT_NAME}_VERSION_MINOR 1 ) SET( ${PROJECT_NAME}_VERSION_PATCH 0 ) - +SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" ) ### DEPENDENCIES ############################################################ FIND_PACKAGE( ILCUTIL REQUIRED COMPONENTS ILCSOFT_CMAKE_MODULES ) -FIND_PACKAGE( ROOT REQUIRED ) +FIND_PACKAGE( ROOT 6.14 REQUIRED ) +FIND_PACKAGE( Physsim REQUIRED) # load default settings from ILCSOFT_CMAKE_MODULES INCLUDE( ilcsoft_default_settings ) FIND_PACKAGE( Marlin 1.0 REQUIRED ) # minimum required Marlin version -INCLUDE_DIRECTORIES( ${Marlin_INCLUDE_DIRS} ) -LINK_LIBRARIES( ${Marlin_LIBRARIES} ) -ADD_DEFINITIONS( ${Marlin_DEFINITIONS} ) - -INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIRS} ) - -INCLUDE_DIRECTORIES( /home/ilc/tianjp/analysis/PostDBD/MEM/include ) # optional package #FIND_PACKAGE( AIDA ) @@ -70,8 +64,13 @@ INCLUDE_DIRECTORIES( ./include ) # add library AUX_SOURCE_DIRECTORY( ./src library_sources ) ADD_SHARED_LIBRARY( ${PROJECT_NAME} ${library_sources} ) +TARGET_LINK_LIBRARIES( ${PROJECT_NAME} PUBLIC Physsim::Physsim ${Marlin_LIBRARIES} ROOT::Tree) +TARGET_INCLUDE_DIRECTORIES( ${PROJECT_NAME} PUBLIC + $ + ${Marlin_INCLUDE_DIRS} ) + + INSTALL_SHARED_LIBRARY( ${PROJECT_NAME} DESTINATION lib ) # display some variables and write them to cache DISPLAY_STD_VARIABLES() - diff --git a/example_stdhep/src/MEMExampleEEHProcessor.cc b/example_stdhep/src/MEMExampleEEHProcessor.cc index 7402dfe..b9cfc61 100644 --- a/example_stdhep/src/MEMExampleEEHProcessor.cc +++ b/example_stdhep/src/MEMExampleEEHProcessor.cc @@ -29,8 +29,6 @@ #include "TMath.h" #include "TLorentzVector.h" -#include "Utilities.h" - //#include "physsim/LCMEEEH.h" using namespace lcio ; diff --git a/example_stdhep/src/MEMExampleProcessor.cc b/example_stdhep/src/MEMExampleProcessor.cc index 5206505..3b144a4 100644 --- a/example_stdhep/src/MEMExampleProcessor.cc +++ b/example_stdhep/src/MEMExampleProcessor.cc @@ -29,8 +29,6 @@ #include "TMath.h" #include "TLorentzVector.h" -#include "Utilities.h" - //#include "physsim/LCMEZHH.h" using namespace lcio ; From 180b6e23a8075f482dbfbc86993d2816416de7db Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 11 Jan 2023 16:59:37 +0100 Subject: [PATCH 4/7] Cleanup dictionary generation and libray building - Remove duplicated headers - Fix include paths - Merge LinkDef.h files into one and remove individual ones - Explicitly state library source files - Use CMake macro provided by root --- include/physsim/ANL4DVector.h | 5 +- include/physsim/GENLib.h | 4 +- include/physsim/HELLib.h | 2 +- include/physsim/LCMEBase.h | 2 +- include/physsim/LCMEEEH.h | 6 +- include/physsim/LCMEEEZ.h | 6 +- include/physsim/LCMENNH.h | 6 +- include/physsim/LCMENNHH.h | 6 +- include/physsim/LCMEWW.h | 6 +- include/physsim/LCMEZH.h | 6 +- include/physsim/LCMEZHH.h | 6 +- include/physsim/LCMEZZ.h | 6 +- include/physsim/LCMEZZH.h | 6 +- include/physsim/LCMEZZZ.h | 6 +- include/physsim/ZHHBases.h | 4 +- src/CMakeLists.txt | 84 +++++---- src/LCME/LCMEBase.cxx | 2 +- src/LCME/LCMEBase.h | 97 ---------- src/LCME/LCMEEEH.cxx | 4 +- src/LCME/LCMEEEH.h | 120 ------------- src/LCME/LCMEEEZ.cxx | 4 +- src/LCME/LCMEEEZ.h | 125 ------------- src/LCME/LCMENNH.cxx | 4 +- src/LCME/LCMENNH.h | 114 ------------ src/LCME/LCMENNHH.cxx | 4 +- src/LCME/LCMENNHH.h | 120 ------------- src/LCME/LCMEWW.cxx | 4 +- src/LCME/LCMEWW.h | 124 ------------- src/LCME/LCMEZH.cxx | 4 +- src/LCME/LCMEZH.h | 127 -------------- src/LCME/LCMEZHH.cxx | 4 +- src/LCME/LCMEZHH.h | 128 -------------- src/LCME/LCMEZZ.cxx | 4 +- src/LCME/LCMEZZ.h | 141 --------------- src/LCME/LCMEZZH.cxx | 4 +- src/LCME/LCMEZZH.h | 139 --------------- src/LCME/LCMEZZZ.cxx | 4 +- src/LCME/LCMEZZZ.h | 143 --------------- src/LCME/LinkDef.h | 19 -- src/LinkDef.h | 42 +++++ src/anlib/ANL4DVector.cxx | 2 +- src/anlib/ANL4DVector.h | 155 ---------------- src/anlib/LinkDef.h | 11 -- src/genlib/GENLib.cxx | 4 +- src/genlib/GENLib.h | 322 ---------------------------------- src/genlib/GENNumCon.h | 57 ------ src/genlib/LinkDef.h | 18 -- src/hellib/HELLib.cxx | 2 +- src/hellib/HELLib.h | 296 ------------------------------- src/hellib/LinkDef.h | 13 -- src/utils/LinkDef.h | 9 - src/utils/TAttLockable.cxx | 2 +- src/utils/TAttLockable.h | 40 ----- 53 files changed, 158 insertions(+), 2415 deletions(-) delete mode 100644 src/LCME/LCMEBase.h delete mode 100644 src/LCME/LCMEEEH.h delete mode 100644 src/LCME/LCMEEEZ.h delete mode 100644 src/LCME/LCMENNH.h delete mode 100644 src/LCME/LCMENNHH.h delete mode 100644 src/LCME/LCMEWW.h delete mode 100644 src/LCME/LCMEZH.h delete mode 100644 src/LCME/LCMEZHH.h delete mode 100644 src/LCME/LCMEZZ.h delete mode 100644 src/LCME/LCMEZZH.h delete mode 100644 src/LCME/LCMEZZZ.h delete mode 100644 src/LCME/LinkDef.h create mode 100644 src/LinkDef.h delete mode 100644 src/anlib/ANL4DVector.h delete mode 100644 src/anlib/LinkDef.h delete mode 100644 src/genlib/GENLib.h delete mode 100644 src/genlib/GENNumCon.h delete mode 100644 src/genlib/LinkDef.h delete mode 100644 src/hellib/HELLib.h delete mode 100644 src/hellib/LinkDef.h delete mode 100644 src/utils/LinkDef.h delete mode 100644 src/utils/TAttLockable.h diff --git a/include/physsim/ANL4DVector.h b/include/physsim/ANL4DVector.h index bebefda..18a2c8b 100644 --- a/include/physsim/ANL4DVector.h +++ b/include/physsim/ANL4DVector.h @@ -23,10 +23,9 @@ // #include #include "TLorentzVector.h" -#if 1 #include "TMath.h" -#endif -#include "TAttLockable.h" +#include "TString.h" +#include "physsim/TAttLockable.h" //#include "ANL3DVector.h" using namespace std; diff --git a/include/physsim/GENLib.h b/include/physsim/GENLib.h index b7eb567..104586a 100644 --- a/include/physsim/GENLib.h +++ b/include/physsim/GENLib.h @@ -13,9 +13,9 @@ //* //***************************************************************************** -#include "ANL4DVector.h" #include "TObjArray.h" -#include "TAttLockable.h" +#include "physsim/ANL4DVector.h" +#include "physsim/TAttLockable.h" class GENPDTEntry; class GENPDTWBoson; diff --git a/include/physsim/HELLib.h b/include/physsim/HELLib.h index eac6e08..a3a2d4a 100644 --- a/include/physsim/HELLib.h +++ b/include/physsim/HELLib.h @@ -13,7 +13,7 @@ //* //***************************************************************************** -#include "ANL4DVector.h" +#include "physsim/ANL4DVector.h" #include typedef std::complex Complex_t; diff --git a/include/physsim/LCMEBase.h b/include/physsim/LCMEBase.h index 30f3ed9..ceec144 100644 --- a/include/physsim/LCMEBase.h +++ b/include/physsim/LCMEBase.h @@ -14,7 +14,7 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" +#include "physsim/HELLib.h" //_______________________________________________________________________ // ===================== diff --git a/include/physsim/LCMEEEH.h b/include/physsim/LCMEEEH.h index 1078a76..8b89c2f 100644 --- a/include/physsim/LCMEEEH.h +++ b/include/physsim/LCMEEEH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEEEH diff --git a/include/physsim/LCMEEEZ.h b/include/physsim/LCMEEEZ.h index b48df1f..cee11d5 100644 --- a/include/physsim/LCMEEEZ.h +++ b/include/physsim/LCMEEEZ.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEEEZ diff --git a/include/physsim/LCMENNH.h b/include/physsim/LCMENNH.h index 713147e..fb1b32b 100644 --- a/include/physsim/LCMENNH.h +++ b/include/physsim/LCMENNH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMENNH diff --git a/include/physsim/LCMENNHH.h b/include/physsim/LCMENNHH.h index 5e811c1..dbfc5ab 100644 --- a/include/physsim/LCMENNHH.h +++ b/include/physsim/LCMENNHH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMENNHH diff --git a/include/physsim/LCMEWW.h b/include/physsim/LCMEWW.h index 4782d10..18b3943 100644 --- a/include/physsim/LCMEWW.h +++ b/include/physsim/LCMEWW.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEWW diff --git a/include/physsim/LCMEZH.h b/include/physsim/LCMEZH.h index 2351991..c5be372 100644 --- a/include/physsim/LCMEZH.h +++ b/include/physsim/LCMEZH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEZH diff --git a/include/physsim/LCMEZHH.h b/include/physsim/LCMEZHH.h index c96f348..4120910 100644 --- a/include/physsim/LCMEZHH.h +++ b/include/physsim/LCMEZHH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEZHH diff --git a/include/physsim/LCMEZZ.h b/include/physsim/LCMEZZ.h index fcfdb85..0d39b28 100644 --- a/include/physsim/LCMEZZ.h +++ b/include/physsim/LCMEZZ.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEZZ diff --git a/include/physsim/LCMEZZH.h b/include/physsim/LCMEZZH.h index 129e884..2358490 100644 --- a/include/physsim/LCMEZZH.h +++ b/include/physsim/LCMEZZH.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEZZH diff --git a/include/physsim/LCMEZZZ.h b/include/physsim/LCMEZZZ.h index 6dca6a8..2f68bb1 100644 --- a/include/physsim/LCMEZZZ.h +++ b/include/physsim/LCMEZZZ.h @@ -16,10 +16,10 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //_______________________________________________________________________ // ===================== // class LCMEZZZ diff --git a/include/physsim/ZHHBases.h b/include/physsim/ZHHBases.h index 6be8d48..e672ab7 100644 --- a/include/physsim/ZHHBases.h +++ b/include/physsim/ZHHBases.h @@ -16,8 +16,8 @@ #include "TNamed.h" #include "TLorentzVector.h" -#include "HELLib.h" -#include "GENLib.h" +#include "physsim/HELLib.h" +#include "physsim/GENLib.h" //_______________________________________________________________________ // ===================== diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 26baeae..35909b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,44 +1,53 @@ # build Physsim library -SET( lib_input_dirs genlib hellib anlib utils LCME) - -FOREACH( lib_input_dir ${lib_input_dirs} ) - LIST( APPEND ROOT_DICT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${lib_input_dir} ) -ENDFOREACH() - -#MESSAGE( STATUS "ROOT_DICT_INCLUDE_DIRS: ${ROOT_DICT_INCLUDE_DIRS}" ) - - -FOREACH( lib_input_dir ${lib_input_dirs} ) - - AUX_SOURCE_DIRECTORY( ${lib_input_dir} lib_sources ) - - PREPARE_ROOT_DICT_HEADERS( ${lib_input_dir} ) - - INSTALL_DIRECTORY( ${lib_input_dir}/ - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/physsim - FILES_MATCHING PATTERN "*.h" PATTERN "LinkDef.h" EXCLUDE +LIST(APPEND ROOT_DICT_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/include) + +SET(lib_sources + anlib/ANL4DVector.cxx + genlib/GENLib.cxx + hellib/HELLib.cxx + LCME/LCMEBase.cxx + LCME/LCMEEEH.cxx + LCME/LCMEEEZ.cxx + LCME/LCMENNH.cxx + LCME/LCMENNHH.cxx + LCME/LCMEWW.cxx + LCME/LCMEZH.cxx + LCME/LCMEZHH.cxx + LCME/LCMEZZ.cxx + LCME/LCMEZZH.cxx + LCME/LCMEZZZ.cxx + utils/TAttLockable.cxx ) - GEN_ROOT_DICT_SOURCES( ${lib_input_dir}Dict.cxx ) - - INSTALL(FILES ${ROOT_DICT_OUTPUT_DIR}/${lib_input_dir}Dict_rdict.pcm - DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - LIST( APPEND lib_sources ${ROOT_DICT_OUTPUT_SOURCES} ) - -ENDFOREACH() - -ADD_SHARED_LIBRARY(Physsim SHARED ${lib_sources}) +SET(headers + ${CMAKE_SOURCE_DIR}/include/physsim/ANL4DVector.h + ${CMAKE_SOURCE_DIR}/include/physsim/GENLib.h + ${CMAKE_SOURCE_DIR}/include/physsim/GENNumCon.h + ${CMAKE_SOURCE_DIR}/include/physsim/HELLib.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEBase.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEEEH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEEEZ.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMENNH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMENNHH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEWW.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEZH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEZHH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEZZ.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEZZH.h + ${CMAKE_SOURCE_DIR}/include/physsim/LCMEZZZ.h + ${CMAKE_SOURCE_DIR}/include/physsim/TAttLockable.h + ${CMAKE_SOURCE_DIR}/include/physsim/ZHHBases.h +) + +ADD_SHARED_LIBRARY(Physsim ${lib_sources}) TARGET_INCLUDE_DIRECTORIES(Physsim PUBLIC $ $ - PRIVATE - $ ) -TARGET_LINK_LIBRARIES(Physsim PUBLIC ROOT::Physics) - +TARGET_LINK_LIBRARIES(Physsim PUBLIC ROOT::Core ROOT::Tree ROOT::Physics ROOT::RIO) +ROOT_GENERATE_DICTIONARY(Physsim_dict ${headers} MODULE Physsim LINKDEF LinkDef.h) INSTALL(TARGETS Physsim @@ -46,6 +55,17 @@ INSTALL(TARGETS DESTINATION ${CMAKE_INSTALL_LIBDIR} ) +INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/libPhyssim_rdict.pcm + ${CMAKE_CURRENT_BINARY_DIR}/libPhyssim.rootmap + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + +INSTALL(DIRECTORY + ${CMAKE_SOURCE_DIR}/include/physsim + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + IF( APPLE ) #---- need special linker flags for ROOT dictionary on MacOS SET_TARGET_PROPERTIES( Physsim PROPERTIES LINK_FLAGS "-single_module -undefined dynamic_lookup -bind_at_load" diff --git a/src/LCME/LCMEBase.cxx b/src/LCME/LCMEBase.cxx index 2dc0e5d..50cebcd 100644 --- a/src/LCME/LCMEBase.cxx +++ b/src/LCME/LCMEBase.cxx @@ -10,7 +10,7 @@ //* 2014/02/17 J.Tian Original version. //***************************************************************************** -#include "LCMEBase.h" +#include "physsim/LCMEBase.h" //#include //#include diff --git a/src/LCME/LCMEBase.h b/src/LCME/LCMEBase.h deleted file mode 100644 index 30f3ed9..0000000 --- a/src/LCME/LCMEBase.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef LCMEBase_H -#define LCMEBase_H -//***************************************************************************** -//* ===================== -//* LCMEBase -//* ===================== -//* -//* (Description) -//* Base class of e+e- -> XX Matrix Element -//* -//* (Update Record) -//* 2014/02/17 J.Tian Original version. -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" -#include "HELLib.h" - -//_______________________________________________________________________ -// ===================== -// class LCMEBase -// ===================== -//----------------------------------------------------------------------- -namespace lcme { - class LCMEBase{ - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEBase(const char *name, const char *title, - Double_t polE = 0., - Double_t polP = 0.); - LCMEBase(const char *name, const char *title, - Double_t polE, - Double_t polP, - Int_t typeME); - virtual ~LCMEBase(); - - // ---------------------- - // Getters and Setters - // ---------------------- - - // ---------------------- - // Base class methods - // ---------------------- - virtual Double_t GetMatrixElement2() = 0; // matrix element squared with weighted helicities - virtual Double_t GetMatrixElement2(Int_t vHel[]) = 0; // matrix element squared with specified helicities - virtual void SetMomentumFinal(TLorentzVector vLortz[]) = 0; // set four-momenta of final states - void SetBeamPol(Double_t polE, Double_t polP); // set beam polarisations - inline Double_t GetBeamPolE() {return fPolElectron;}; // get electron beam polarisation - inline Double_t GetBeamPolP() {return fPolPositron;}; // get positron beam polarisation - inline void SetMEType(Int_t i) {fMEType = i;}; // set fMEType to return matrix element or different cross section - inline Int_t GetMEType() {return fMEType;}; // get fMEType - inline Int_t GetPropagatorType() {return fPropagatorType;}; // get fPropatatorType - inline void SetPropagatorType(Int_t i) {fPropagatorType = i;}; // set fPropatatorType - - // ---------------------- - // Utility methods - // ---------------------- - virtual void Initialize() = 0; // Bases initialization - virtual Double_t DSigmaDX () = 0; - virtual Complex_t FullAmplitude() = 0; - Double_t Beta2(Double_t x1, Double_t x2); - Double_t Beta(Double_t x1, Double_t x2); - void GetVariablesInRestFrame(TLorentzVector v1, TLorentzVector v2, - Double_t &q2, Double_t &costheta, Double_t &phi); - virtual void SetHelicities(Int_t vHel[]) = 0; - inline void SetHiggsMass(Double_t mass) {fMass = mass;}; - inline Double_t GetHiggsMass() {return fMass;}; - inline void SetHiggsWidth(Double_t width) {fWidth = width;}; - inline Double_t GetHiggsWidth() {return fWidth;}; - Complex_t GetHiggsPropagator(Double_t q2); - Complex_t GetBosonPropagator(Double_t q2, Double_t mass, Double_t width); - - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Beam polarisations - Double_t fPolElectron, fPolPositron; - - // ---------------- - // Higgs - // ---------------- - Double_t fMass; // m_h : mass of H - Double_t fWidth; // w_h : total width of H - - Int_t fMEType; // 1: return differential cross section; 2: matrix element squared - Int_t fPropagatorType; // 1: Relatistic Breit-Wigner; 2: Effective Gaussian with Detector Resolution - - ClassDef(LCMEBase, 1) // Base Matrix Element for e+e- -> XX process - }; -} -#endif diff --git a/src/LCME/LCMEEEH.cxx b/src/LCME/LCMEEEH.cxx index 3f68da9..d489eb5 100644 --- a/src/LCME/LCMEEEH.cxx +++ b/src/LCME/LCMEEEH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEEEH.h" +#include "physsim/LCMEEEH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEEEH) diff --git a/src/LCME/LCMEEEH.h b/src/LCME/LCMEEEH.h deleted file mode 100644 index 1078a76..0000000 --- a/src/LCME/LCMEEEH.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef LCMEEEH_H -#define LCMEEEH_H -//***************************************************************************** -//* ===================== -//* LCMEEEH -//* ===================== -//* -//* (Description) -//* e+e- -> EEH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/02/18 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEEEH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEEEH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEEEH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMEEEH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetQ2EEH () const { return fQ2EEH; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2EE () const { return fQ2EE; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetAnomalous(Double_t a1, Double_t a2, Double_t a3); // set anomalous HZZ coupling - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoEEH (const HELFermion &em, - const HELFermion &ep, - const HELFermion &e, - const HELFermion &eb, - const HELScalar &hs); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzE1,fLortzE2; // two electrons - TLorentzVector fLortzH; // Higgs - - // ---------------- - // Particle Data - // ---------------- - GENPDTZBoson *fZBosonPtr; //! PD table entry of "Z" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [2]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[3]; // [0,1,2] = [h, e-, e+] - Double_t fM[3]; // [0,1,2] = [mh,me , me ] - - Double_t fMass; // m_h : mass of H - Double_t fQ2EEH; // q^2 of EEHH system - Double_t fQ2EE; // q^2 of final state EE - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaF; // cos(theta_N) in EE frame - Double_t fPhiF; // phi_N in EE frame - - Bool_t iAnomalous; // switch of anomalous hzz coupling - Double_t fA1; - Double_t fA2; - Double_t fA3; - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMEEEH, 1) // Matrix Element for e+e- -> EEH process - }; -} -#endif diff --git a/src/LCME/LCMEEEZ.cxx b/src/LCME/LCMEEEZ.cxx index 91fa612..789df12 100644 --- a/src/LCME/LCMEEEZ.cxx +++ b/src/LCME/LCMEEEZ.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEEEZ.h" +#include "physsim/LCMEEEZ.h" #include #include @@ -20,7 +20,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEEEZ) diff --git a/src/LCME/LCMEEEZ.h b/src/LCME/LCMEEEZ.h deleted file mode 100644 index b48df1f..0000000 --- a/src/LCME/LCMEEEZ.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef LCMEEEZ_H -#define LCMEEEZ_H -//***************************************************************************** -//* ===================== -//* LCMEEEZ -//* ===================== -//* -//* (Description) -//* e+e- -> EEZ Matrix Element -//* -//* (Update Record) -//* 2012/03/30 K.Fujii Original version. -//* 2014/04/08 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEEEZ -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEEEZ : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEEEZ(const char *name, const char *title, - Double_t polE = 0., - Double_t polP = 0., - Bool_t iNoDecay = 0); - virtual ~LCMEEEZ(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetQ2EEZ () const { return fQ2EEZ; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2EE () const { return fQ2EE; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetMomentumFinalNoDecay(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode = 1); // set Z decay mode - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoEEZ (const HELFermion &em, - const HELFermion &ep, - const HELFermion &e, - const HELFermion &eb, - const HELVector &zf); - void SetHelicities(Int_t vHel[]); - void SetHelicitiesNoDecay(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzE1,fLortzE2; // two electrons - TLorentzVector fLortzZ; // Z - TLorentzVector fLortzZf1,fLortzZf2; // two fermions from Z decay - - // ---------------- - // Particle Data - // ---------------- - Int_t fZDecayMode; // Z decay mode; - GENPDTZBoson *fZBosonPtr; //! PD table entry of "Z" - GENDecayMode *fZModePtr; // point to Z decay mode - GENPDTEntry *f3Ptr; // point to 1st Z daughter - GENPDTEntry *f4Ptr; // point to 2nd Z daughter - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [4]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[4]; // [0,1,2,3] = [e-, e+, f, fb] - Double_t fM[4]; // [0,1,2,3] = [me, me, mf, mf] - - Double_t fQ2EEZ; // q^2 of EEZ system - Double_t fQ2EE; // q^2 of final state EE - Double_t fCosTheta; // cos(theta_Z) in cm frame - Double_t fPhi; // phi_Z in cm frame - Double_t fCosThetaE; // cos(theta_E) in EE frame - Double_t fPhiE; // phi_E in EE frame - Double_t fQ2Z; // q^2 of final state Z - Double_t fCosThetaF; // cos(theta_f) in Z frame - Double_t fPhiF; // phi_f in Z frame - Double_t fPhi1; // phi_1 for e- -> e- - Double_t fPhi2; // phi_2 for e+ -> e+ - Double_t fSh1; // sh1=sin(theta/2) - Double_t fCh1; // ch1=cos(theta/2) - Double_t fSh2; // sh2 - Double_t fCh2; // ch2 - Bool_t fNoDecay; // z decays or not - - ClassDef(LCMEEEZ, 1) // Matrix Element for e+e- -> EEZ process - }; -} -#endif diff --git a/src/LCME/LCMENNH.cxx b/src/LCME/LCMENNH.cxx index b3d2bf5..d80a947 100644 --- a/src/LCME/LCMENNH.cxx +++ b/src/LCME/LCMENNH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMENNH.h" +#include "physsim/LCMENNH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMENNH) diff --git a/src/LCME/LCMENNH.h b/src/LCME/LCMENNH.h deleted file mode 100644 index 713147e..0000000 --- a/src/LCME/LCMENNH.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef LCMENNH_H -#define LCMENNH_H -//***************************************************************************** -//* ===================== -//* LCMENNH -//* ===================== -//* -//* (Description) -//* e+e- -> NNH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/02/18 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMENNH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMENNH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMENNH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMENNH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetQ2NNH () const { return fQ2NNH; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2NN () const { return fQ2NN; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoNNH (const HELFermion &em, - const HELFermion &ep, - const HELFermion &ne, - const HELFermion &neb, - const HELScalar &hs); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzN1,fLortzN2; // two neutrinos - TLorentzVector fLortzH; // Higgs - - // ---------------- - // Particle Data - // ---------------- - GENPDTWBoson *fWBosonPtr; //! PD table entry of "W" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [2]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[3]; // [0,1,2] = [h, ne, neb] - Double_t fM[3]; // [0,1,2] = [mh,mn ,mn ] - - Double_t fMass; // m_h : mass of H - Double_t fQ2NNH; // q^2 of NNH system - Double_t fQ2NN; // q^2 of final state NN - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaF; // cos(theta_N) in NN frame - Double_t fPhiF; // phi_N in NN frame - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMENNH, 1) // Matrix Element for e+e- -> NNH process - }; -} -#endif diff --git a/src/LCME/LCMENNHH.cxx b/src/LCME/LCMENNHH.cxx index d6bc0c1..d113cde 100644 --- a/src/LCME/LCMENNHH.cxx +++ b/src/LCME/LCMENNHH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMENNHH.h" +#include "physsim/LCMENNHH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMENNHH) diff --git a/src/LCME/LCMENNHH.h b/src/LCME/LCMENNHH.h deleted file mode 100644 index 5e811c1..0000000 --- a/src/LCME/LCMENNHH.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef LCMENNHH_H -#define LCMENNHH_H -//***************************************************************************** -//* ===================== -//* LCMENNHH -//* ===================== -//* -//* (Description) -//* e+e- -> NNHH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/02/17 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMENNHH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMENNHH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMENNHH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMENNHH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetQ2NNHH () const { return fQ2NNHH; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2NN () const { return fQ2NN; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - Double_t GetQ2HH () const { return fQ2HH; } - Double_t GetCosThetaH() const { return fCosThetaH; } - Double_t GetPhiH () const { return fPhiH; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoNNHH (const HELFermion &em, - const HELFermion &ep, - const HELFermion &ne, - const HELFermion &neb, - const HELScalar &h1, - const HELScalar &h2); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzN1,fLortzN2; // two neutrinos - TLorentzVector fLortzH1,fLortzH2; // two H - - // ---------------- - // Particle Data - // ---------------- - GENPDTWBoson *fWBosonPtr; //! PD table entry of "W" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [4]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[4]; // [0,1,2,3] = [ne, neb, h1, h2] - Double_t fM[4]; // [0,1,2,3] = [mn, mn , mh, mh] - - Double_t fMass; // m_h : mass of H - Double_t fQ2NNHH; // q^2 of NNHH system - Double_t fQ2NN; // q^2 of final state NN - Double_t fQ2HH; // q^2 of final state HH - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaF; // cos(theta_N) in NN frame - Double_t fPhiF; // phi_N in NN frame - Double_t fCosThetaH; // cos(theta_H) in HH frame - Double_t fPhiH; // phi_H in HH frame - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMENNHH, 1) // Matrix Element for e+e- -> NNHH process - }; -} -#endif diff --git a/src/LCME/LCMEWW.cxx b/src/LCME/LCMEWW.cxx index 4766859..66c65d4 100644 --- a/src/LCME/LCMEWW.cxx +++ b/src/LCME/LCMEWW.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEWW.h" +#include "physsim/LCMEWW.h" #include #include @@ -20,7 +20,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEWW) diff --git a/src/LCME/LCMEWW.h b/src/LCME/LCMEWW.h deleted file mode 100644 index 4782d10..0000000 --- a/src/LCME/LCMEWW.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef LCMEWW_H -#define LCMEWW_H -//***************************************************************************** -//* ===================== -//* LCMEWW -//* ===================== -//* -//* (Description) -//* e+e- -> WW Matrix Element -//* -//* (Update Record) -//* 2012/03/30 K.Fujii Original version. -//* 2014/10/28 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEWW -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEWW : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEWW(const char *name, const char *title, - Double_t polE = 0., - Double_t polP = 0., - Int_t iNoDecay = 0); - virtual ~LCMEWW(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetQ2WW () const { return fQ2WW; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2Wm () const { return fQ2Wm; } - Double_t GetCosThetaWmF() const { return fCosThetaWmF; } - Double_t GetPhiWmF () const { return fPhiWmF; } - Double_t GetQ2Wp () const { return fQ2Wp; } - Double_t GetCosThetaWpF() const { return fCosThetaWpF; } - Double_t GetPhiWpF () const { return fPhiWpF; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetWDecayMode(Int_t iDecayMode1, Int_t iDecayMode2); // set W decay mode - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoWW (const HELFermion &em, - const HELFermion &ep, - const HELVector &wm, - const HELVector &wp); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzWm,fLortzWp; // Wm,Wp - TLorentzVector fLortzWmf1,fLortzWmf2; // two fermions from Wm decay - TLorentzVector fLortzWpf1,fLortzWpf2; // two fermions from Wp decay - - // ---------------- - // Particle Data - // ---------------- - Int_t fWmDecayMode; // Wm decay mode; - Int_t fWpDecayMode; // Wp decay mode; - GENPDTWBoson *fWmBosonPtr; //! PD table entry of "Wm" - GENDecayMode *fWmModePtr; // pointer to Wm decay mode - GENPDTEntry *f1Ptr; // point to 1st Wm daughter - GENPDTEntry *f2Ptr; // point to 2nd Wm daughter - GENPDTWBoson *fWpBosonPtr; //! PD table entry of "Wp" - GENDecayMode *fWpModePtr; // pointer to Wp decay mode - GENPDTEntry *f3Ptr; // point to 1st Wp daughter - GENPDTEntry *f4Ptr; // point to 2nd Wp daughter - GENPDTZBoson *fZBosonPtr; //! PD table entry of "Z0" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [4]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[4]; // [0,1,2,3] = [fwm1,fwm2, fwp1,fwp2] - Double_t fM[4]; // [0,1,2,3] = [ m1, m2, m3, m4] - - Double_t fQ2WW; // q^2 of WW system - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fQ2Wm; // q^2 of final state Wm - Double_t fCosThetaWmF; // cos(theta_f) in Wm frame - Double_t fPhiWmF; // phi_f in Wm frame - Double_t fQ2Wp; // q^2 of final state Wp - Double_t fCosThetaWpF; // cos(theta_f) in Wp frame - Double_t fPhiWpF; // phi_f in Wp frame - - ClassDef(LCMEWW, 1) // Matrix Element for e+e- -> WW process - }; -} -#endif diff --git a/src/LCME/LCMEZH.cxx b/src/LCME/LCMEZH.cxx index a68a55d..7a4f712 100644 --- a/src/LCME/LCMEZH.cxx +++ b/src/LCME/LCMEZH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEZH.h" +#include "physsim/LCMEZH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEZH) diff --git a/src/LCME/LCMEZH.h b/src/LCME/LCMEZH.h deleted file mode 100644 index 2351991..0000000 --- a/src/LCME/LCMEZH.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef LCMEZH_H -#define LCMEZH_H -//***************************************************************************** -//* ===================== -//* LCMEZH -//* ===================== -//* -//* (Description) -//* e+e- -> ZH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/02/17 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEZH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEZH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEZH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMEZH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetQ2ZH () const { return fQ2ZH; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2Z () const { return fQ2Z; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode = 1); // set Z decay mode - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoZH (const HELFermion &em, - const HELFermion &ep, - const HELScalar &h, - const HELVector &zf); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzZf1,fLortzZf2; // two fermions from Z - TLorentzVector fLortzH; // Higgs - - // ---------------- - // Z decay mode - // ---------------- - Int_t fZDecayMode; // Z decay mode; - GENDecayMode *fZModePtr; // point to Z decay mode - GENPDTEntry *f3Ptr; // point to 1st Z daughter - GENPDTEntry *f4Ptr; // point to 2nd Z daughter - - // ---------------- - // Particle Data - // ---------------- - GENPDTZBoson *fZBosonPtr; //! PD table entry of "Z" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [2]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[3]; // [0,1,2] = [h, fz1, fz2] - Double_t fM[3]; // [0,1,2] = [mh,m3 , m4 ] - - Double_t fMass; // m_h : mass of H - Double_t fQ2ZH; // q^2 of ZH system - Double_t fQ2Z; // q^2 of final state Z - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaF; // cos(theta_f) in Z frame - Double_t fPhiF; // phi_f in Z frame - - Bool_t iAnomalous; // switch of anomalous hzz coupling - Double_t fA1; - Double_t fA2; - Double_t fA3; - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMEZH, 1) // Matrix Element for e+e- -> ZH process - }; -} -#endif diff --git a/src/LCME/LCMEZHH.cxx b/src/LCME/LCMEZHH.cxx index b8489a0..9c63291 100644 --- a/src/LCME/LCMEZHH.cxx +++ b/src/LCME/LCMEZHH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEZHH.h" +#include "physsim/LCMEZHH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEZHH) diff --git a/src/LCME/LCMEZHH.h b/src/LCME/LCMEZHH.h deleted file mode 100644 index c96f348..0000000 --- a/src/LCME/LCMEZHH.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef LCMEZHH_H -#define LCMEZHH_H -//***************************************************************************** -//* ===================== -//* LCMEZHH -//* ===================== -//* -//* (Description) -//* e+e- -> ZHH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2013/10/03 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEZHH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEZHH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEZHH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMEZHH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetQ2ZHH () const { return fQ2ZHH; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2Z () const { return fQ2Z; } - Double_t GetCosThetaF() const { return fCosThetaF; } - Double_t GetPhiF () const { return fPhiF; } - Double_t GetQ2HH () const { return fQ2HH; } - Double_t GetCosThetaH() const { return fCosThetaH; } - Double_t GetPhiH () const { return fPhiH; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode = 1); // set Z decay mode - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoZHH (const HELFermion &em, - const HELFermion &ep, - const HELScalar &h1, - const HELScalar &h2, - const HELVector &zf); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzZf1,fLortzZf2; // two fermions from Z - TLorentzVector fLortzH1,fLortzH2; // two H - - // ---------------- - // Z decay mode - // ---------------- - Int_t fZDecayMode; // Z decay mode; - GENDecayMode *fZModePtr; // point to Z decay mode - GENPDTEntry *f3Ptr; // point to 1st Z daughter - GENPDTEntry *f4Ptr; // point to 2nd Z daughter - - // ---------------- - // Particle Data - // ---------------- - GENPDTZBoson *fZBosonPtr; //! PD table entry of "Z" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [4]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[4]; // [0,1,2,3] = [h1, h2, fz1, fz2] - Double_t fM[4]; // [0,1,2,4] = [mh, mh, m3 , m4 ] - - Double_t fMass; // m_h : mass of H - Double_t fQ2ZHH; // q^2 of ZHH system - Double_t fQ2Z; // q^2 of final state Z - Double_t fQ2HH; // q^2 of final state HH - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaF; // cos(theta_f) in Z frame - Double_t fPhiF; // phi_f in Z frame - Double_t fCosThetaH; // cos(theta_H) in HH frame - Double_t fPhiH; // phi_H in HH frame - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMEZHH, 1) // Matrix Element for e+e- -> ZHH process - }; -} -#endif diff --git a/src/LCME/LCMEZZ.cxx b/src/LCME/LCMEZZ.cxx index 75679dc..741fce8 100644 --- a/src/LCME/LCMEZZ.cxx +++ b/src/LCME/LCMEZZ.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEZZ.h" +#include "physsim/LCMEZZ.h" #include #include @@ -20,7 +20,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEZZ) diff --git a/src/LCME/LCMEZZ.h b/src/LCME/LCMEZZ.h deleted file mode 100644 index fcfdb85..0000000 --- a/src/LCME/LCMEZZ.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef LCMEZZ_H -#define LCMEZZ_H -//***************************************************************************** -//* ===================== -//* LCMEZZ -//* ===================== -//* -//* (Description) -//* e+e- -> ZZ Matrix Element -//* -//* (Update Record) -//* 2012/03/30 K.Fujii Original version. -//* 2014/10/28 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEZZ -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEZZ : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEZZ(const char *name, const char *title, - Double_t polE = 0., - Double_t polP = 0., - Int_t iNoDecay = 0); - virtual ~LCMEZZ(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetQ2ZZ () const { return fQ2ZZ; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2Z1 () const { return fQ2Z1; } - Double_t GetCosThetaZ1F() const { return fCosThetaZ1F; } - Double_t GetPhiZ1F () const { return fPhiZ1F; } - Double_t GetQ2Z2 () const { return fQ2Z2; } - Double_t GetCosThetaZ2F() const { return fCosThetaZ2F; } - Double_t GetPhiZ2F () const { return fPhiZ2F; } - Bool_t GetNoDecay () const { return fNoDecay; } - Double_t GetPropagator () const { return fPropagator; } - Double_t GetZ1Width () const { return fZ1Width; } - Double_t GetZ2Width () const { return fZ2Width; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetMomentumFinalNoDecay(TLorentzVector vLortz[]); // set four-momenta of final states - void SetMomentumFinalNoDecay2(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode); // set Z decay mode - void SetZDecayMode(Int_t iDecayMode1, Int_t iDecayMode2); // set Z decay mode - void SetNoDecay(Int_t i) {fNoDecay = i;}; - void SetPropagator(Bool_t i) {fPropagator = i;}; - void SetZ1Width(Double_t w) { fZ1Width = w;}; - void SetZ2Width(Double_t w) { fZ2Width = w;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoZZ (const HELFermion &em, - const HELFermion &ep, - const HELVector &z1, - const HELVector &z2); - void SetHelicities(Int_t vHel[]); - void SetHelicitiesNoDecay(Int_t vHel[]); - void SetHelicitiesNoDecay2(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // ---------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzZ1,fLortzZ2; // Z1,Z2 - TLorentzVector fLortzZ1f1,fLortzZ1f2; // two fermions from Z1 decay - TLorentzVector fLortzZ2f1,fLortzZ2f2; // two fermions from Z2 decay - - // ---------------- - // Particle Data - // ---------------- - Int_t fZ1DecayMode; // Z1 decay mode; - Int_t fZ2DecayMode; // Z2 decay mode; - GENPDTZBoson *fZ1BosonPtr; //! PD table entry of "Z1" - GENDecayMode *fZ1ModePtr; // pointer to Z1 decay mode - GENPDTEntry *f1Ptr; // point to 1st Z1 daughter - GENPDTEntry *f2Ptr; // point to 2nd Z1 daughter - GENPDTZBoson *fZ2BosonPtr; //! PD table entry of "Z2" - GENDecayMode *fZ2ModePtr; // pointer to Z2 decay mode - GENPDTEntry *f3Ptr; // point to 1st Z2 daughter - GENPDTEntry *f4Ptr; // point to 2nd Z2 daughter - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [4]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[4]; // [0,1,2,3] = [e-, e+, f, fb] - Double_t fM[4]; // [0,1,2,3] = [me, me, mf, mf] - - Double_t fQ2ZZ; // q^2 of ZZ system - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fQ2Z1; // q^2 of final state Z1 - Double_t fCosThetaZ1F; // cos(theta_f) in Z1 frame - Double_t fPhiZ1F; // phi_f in Z1 frame - Double_t fQ2Z2; // q^2 of final state Z2 - Double_t fCosThetaZ2F; // cos(theta_f) in Z2 frame - Double_t fPhiZ2F; // phi_f in Z2 frame - - Int_t fNoDecay; // 0: both decay; 1: one Z decay; 2: both not decay - Bool_t fPropagator; // including B-W if Z not decay - Double_t fZ1Width; // width of Z (set according to measurement) - Double_t fZ2Width; // width of Z (set according to measurement) - - ClassDef(LCMEZZ, 1) // Matrix Element for e+e- -> ZZ process - }; -} -#endif diff --git a/src/LCME/LCMEZZH.cxx b/src/LCME/LCMEZZH.cxx index 6530268..af62f11 100644 --- a/src/LCME/LCMEZZH.cxx +++ b/src/LCME/LCMEZZH.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEZZH.h" +#include "physsim/LCMEZZH.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEZZH) diff --git a/src/LCME/LCMEZZH.h b/src/LCME/LCMEZZH.h deleted file mode 100644 index 129e884..0000000 --- a/src/LCME/LCMEZZH.h +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef LCMEZZH_H -#define LCMEZZH_H -//***************************************************************************** -//* ===================== -//* LCMEZZH -//* ===================== -//* -//* (Description) -//* e+e- -> ZZH Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/12/08 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEZZH -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEZZH : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEZZH(const char *name, const char *title, - Double_t massHiggs = 125., - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMEZZH(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetMass () const { return fMass; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2ZZ () const { return fQ2ZZ; } - Double_t GetCosThetaZ () const { return fCosThetaZ; } - Double_t GetPhiZ () const { return fPhiZ; } - Double_t GetQ2Z1 () const { return fQ2Z1; } - Double_t GetCosThetaZ1F() const { return fCosThetaZ1F; } - Double_t GetPhiZ1F () const { return fPhiZ1F; } - Double_t GetQ2Z2 () const { return fQ2Z2; } - Double_t GetCosThetaZ2F() const { return fCosThetaZ2F; } - Double_t GetPhiZ2F () const { return fPhiZ2F; } - Double_t GetQ2ZZH () const { return fQ2ZZH; } - Bool_t GetPropagator () const { return fPropagator; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMass (Double_t m ) { fMass = m; } - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode1, Int_t iDecayMode2); // set Z decay mode - void SetPropagator(Bool_t i) {fPropagator = i;}; - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoZZH (const HELFermion &em, - const HELFermion &ep, - const HELVector &z1, - const HELVector &z2, - const HELScalar &hs); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzZ1f1,fLortzZ1f2; // two fermions from Z1 - TLorentzVector fLortzZ2f1,fLortzZ2f2; // two fermions from Z1 - TLorentzVector fLortzZ1,fLortzZ2; // Z1, Z2 - TLorentzVector fLortzH; // H - - // ---------------- - // Z decay mode - // ---------------- - Int_t fZ1DecayMode,fZ2DecayMode; // Z decay mode; - GENDecayMode *fZ1ModePtr,*fZ2ModePtr; // point to Z decay mode - GENPDTEntry *f1Ptr; // point to 1st Z1 daughter - GENPDTEntry *f2Ptr; // point to 2nd Z1 daughter - GENPDTEntry *f3Ptr; // point to 1st Z2 daughter - GENPDTEntry *f4Ptr; // point to 2nd Z2 daughter - - // ---------------- - // Particle Data - // ---------------- - GENPDTZBoson *fZ1BosonPtr,*fZ2BosonPtr; //! PD table entry of "Z" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [5]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[5]; // [0,1,2,3,4] = [h , fz11,fz12, fz21,fz22] - Double_t fM[5]; // [0,1,2,3,4] = [mh, m1, m2, m3, m4] - - Double_t fMass; // m_h : mass of H - Double_t fQ2ZZH; // q^2 of ZZH system - Double_t fQ2Z1; // q^2 of final state Z1 - Double_t fQ2Z2; // q^2 of final state Z2 - Double_t fQ2ZZ; // q^2 of final state ZZ - Double_t fQ2H; // q^2 of final state H - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaZ1F; // cos(theta_f) in Z1 frame - Double_t fPhiZ1F; // phi_f in Z1 frame - Double_t fCosThetaZ2F; // cos(theta_f) in Z2 frame - Double_t fPhiZ2F; // phi_f in Z2 frame - Double_t fCosThetaZ; // cos(theta_Z1) in ZZ frame - Double_t fPhiZ; // phi_Z1 in ZZ frame - - Bool_t fPropagator; // including B-W of Higgs - - ClassDef(LCMEZZH, 1) // Matrix Element for e+e- -> ZZH process - }; -} -#endif diff --git a/src/LCME/LCMEZZZ.cxx b/src/LCME/LCMEZZZ.cxx index 0de17f7..cc24b0d 100644 --- a/src/LCME/LCMEZZZ.cxx +++ b/src/LCME/LCMEZZZ.cxx @@ -12,7 +12,7 @@ //* //***************************************************************************** -#include "LCMEZZZ.h" +#include "physsim/LCMEZZZ.h" #include #include @@ -23,7 +23,7 @@ //*---------------------------------------------------------------------- //* Numerical and Natural Constants //*---------------------------------------------------------------------- -#include "GENNumCon.h" +#include "physsim/GENNumCon.h" ClassImp(lcme::LCMEZZZ) diff --git a/src/LCME/LCMEZZZ.h b/src/LCME/LCMEZZZ.h deleted file mode 100644 index 6dca6a8..0000000 --- a/src/LCME/LCMEZZZ.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef LCMEZZZ_H -#define LCMEZZZ_H -//***************************************************************************** -//* ===================== -//* LCMEZZZ -//* ===================== -//* -//* (Description) -//* e+e- -> ZZZ Matrix Element -//* -//* (Update Record) -//* 2007/03/29 K.Fujii Original version. -//* 2014/12/08 J.Tian modified for MEM in Marlin -//***************************************************************************** - -#include "TNamed.h" -#include "TLorentzVector.h" - -#include "HELLib.h" -#include "GENLib.h" - -#include "LCMEBase.h" -//_______________________________________________________________________ -// ===================== -// class LCMEZZZ -// ===================== -//----------------------------------------------------------------------- -namespace lcme{ - class LCMEZZZ : public LCMEBase { - public: - // -------------------------------------------------------------------- - // Member Functions - // -------------------------------------------------------------------- - // ---------------------- - // C-tor and D-tor - // ---------------------- - LCMEZZZ(const char *name, const char *title, - Double_t polE = 0., - Double_t polP = 0.); - virtual ~LCMEZZZ(); - - // ---------------------- - // Getters and Setters - // ---------------------- - Double_t GetQ2ZZZ () const { return fQ2ZZZ; } - Double_t GetCosTheta () const { return fCosTheta; } - Double_t GetPhi () const { return fPhi; } - Double_t GetQ2ZZ () const { return fQ2ZZ; } - Double_t GetCosThetaZ1 () const { return fCosThetaZ1; } - Double_t GetPhiZ1 () const { return fPhiZ1; } - Double_t GetQ2Z1 () const { return fQ2Z1; } - Double_t GetCosThetaZ1F() const { return fCosThetaZ1F; } - Double_t GetPhiZ1F () const { return fPhiZ1F; } - Double_t GetQ2Z2 () const { return fQ2Z2; } - Double_t GetCosThetaZ2F() const { return fCosThetaZ2F; } - Double_t GetPhiZ2F () const { return fPhiZ2F; } - Double_t GetQ2Z () const { return fQ2Z; } - Double_t GetCosThetaZF () const { return fCosThetaZF; } - Double_t GetPhiZF () const { return fPhiZF; } - - // ---------------------- - // Base class methods - // ---------------------- - Double_t GetMatrixElement2(); // matrix element squared with weighted helicities - Double_t GetMatrixElement2(Int_t vHel[]); // matrix element squared with specified helicities - void SetMomentumFinal(TLorentzVector vLortz[]); // set four-momenta of final states - void SetZDecayMode(Int_t iDecayMode1, Int_t iDecayMode2, Int_t iDecayMode); // set Z decay mode - - // ---------------------- - // Utility methods - // ---------------------- - private: - void Initialize(); // Bases initialization - Double_t DSigmaDX (); - Complex_t FullAmplitude(); - Complex_t AmpEEtoZZZ (const HELFermion &em, - const HELFermion &ep, - const HELVector &wm, - const HELVector &wp, - const HELVector &zf); - Complex_t AmpEEtoZZ (const HELFermion &em, - const HELFermion &ep, - const HELVector &z1, - const HELVector &z2); - void SetHelicities(Int_t vHel[]); - - private: - // -------------------------------------------------------------------- - // Data Members - // -------------------------------------------------------------------- - // Lorentz Vector of final state particle - TLorentzVector fLortzZ1f1,fLortzZ1f2; // two fermions from Z1 - TLorentzVector fLortzZ2f1,fLortzZ2f2; // two fermions from Z1 - TLorentzVector fLortzZ1,fLortzZ2; // Z1, Z2 - TLorentzVector fLortzZf1,fLortzZf2,fLortzZ; // Z - - // ---------------- - // Z decay mode - // ---------------- - Int_t fZ1DecayMode,fZ2DecayMode,fZDecayMode; // Z decay mode; - GENDecayMode *fZ1ModePtr,*fZ2ModePtr,*fZModePtr; // point to Z decay mode - GENPDTEntry *f1Ptr; // point to 1st Z1 daughter - GENPDTEntry *f2Ptr; // point to 2nd Z1 daughter - GENPDTEntry *f3Ptr; // point to 1st Z2 daughter - GENPDTEntry *f4Ptr; // point to 2nd Z2 daughter - GENPDTEntry *f5Ptr; // point to 1st Z daughter - GENPDTEntry *f6Ptr; // point to 2nd Z daughter - - // ---------------- - // Particle Data - // ---------------- - GENPDTZBoson *fZ1BosonPtr,*fZ2BosonPtr,*fZBosonPtr; //! PD table entry of "Z" - - // ---------------- - // Event info - // ---------------- - Int_t fHelInitial[2]; // initial state helicities - Int_t fHelFinal [6]; // final state helicities - ANL4DVector fK[2]; // [0,1] = [e-, e+] - ANL4DVector fP[6]; // [0,1,2,3,4,5] = [fz11,fz22, fz21,fz22, fz1, fz2] - Double_t fM[6]; // [0,1,2,3,4,5] = [ m1, m2, m3, m4, m5, m6] - - Double_t fQ2ZZZ; // q^2 of ZZZ system - Double_t fQ2Z1; // q^2 of final state Z1 - Double_t fQ2Z2; // q^2 of final state Z2 - Double_t fQ2ZZ; // q^2 of final state ZZ - Double_t fQ2Z; // q^2 of final state Z - Double_t fCosTheta; // cos(theta_x) in cm frame - Double_t fPhi; // phi_x in cm frame - Double_t fCosThetaZ1F; // cos(theta_f) in Z1 frame - Double_t fPhiZ1F; // phi_f in Z1 frame - Double_t fCosThetaZ2F; // cos(theta_f) in Z2 frame - Double_t fPhiZ2F; // phi_f in Z2 frame - Double_t fCosThetaZ1; // cos(theta_Z1) in ZZ frame - Double_t fPhiZ1; // phi_Z1 in ZZ frame - Double_t fCosThetaZF; // cos(theta_f) in Z frame - Double_t fPhiZF; // phi_f in Z frame - - - ClassDef(LCMEZZZ, 1) // Matrix Element for e+e- -> ZZZ process - }; -} -#endif diff --git a/src/LCME/LinkDef.h b/src/LCME/LinkDef.h deleted file mode 100644 index bfc01c5..0000000 --- a/src/LCME/LinkDef.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class lcme::LCMEBase+; -#pragma link C++ class lcme::LCMEZHH+; -#pragma link C++ class lcme::LCMEZH+; -#pragma link C++ class lcme::LCMENNHH+; -#pragma link C++ class lcme::LCMENNH+; -#pragma link C++ class lcme::LCMEEEH+; -#pragma link C++ class lcme::LCMEEEZ+; -#pragma link C++ class lcme::LCMEZZ+; -#pragma link C++ class lcme::LCMEZZH+; -#pragma link C++ class lcme::LCMEZZZ+; -#pragma link C++ class lcme::LCMEWW+; - -#endif diff --git a/src/LinkDef.h b/src/LinkDef.h new file mode 100644 index 0000000..7d9c1db --- /dev/null +++ b/src/LinkDef.h @@ -0,0 +1,42 @@ +// $Id: LinkDef.h,v 1.3 2007/01/18 15:51:30 fujiik Exp $ + +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class ANL4DVector; + +#pragma link C++ class GENBranch+; +#pragma link C++ class GENFrame+; +#pragma link C++ class GENPhase2+; +#pragma link C++ class GENDecayMode+; +#pragma link C++ class GENModePicker+; +#pragma link C++ class GENPDTEntry+; +#pragma link C++ class GENPDTWBoson+; +#pragma link C++ class GENPDTZBoson+; +#pragma link C++ class GENPDTPhoton+; +#pragma link C++ class GENPDTGluon+; + +#pragma link C++ class TVectorC+; +#pragma link C++ class HELFermion+; +#pragma link C++ class HELVector+; +#pragma link C++ class HELScalar+; +#pragma link C++ class HELVertex+; + +#pragma link C++ class lcme::LCMEBase+; +#pragma link C++ class lcme::LCMEZHH+; +#pragma link C++ class lcme::LCMEZH+; +#pragma link C++ class lcme::LCMENNHH+; +#pragma link C++ class lcme::LCMENNH+; +#pragma link C++ class lcme::LCMEEEH+; +#pragma link C++ class lcme::LCMEEEZ+; +#pragma link C++ class lcme::LCMEZZ+; +#pragma link C++ class lcme::LCMEZZH+; +#pragma link C++ class lcme::LCMEZZZ+; +#pragma link C++ class lcme::LCMEWW+; + +#pragma link C++ class lcme::TAttLockable+; + +#endif diff --git a/src/anlib/ANL4DVector.cxx b/src/anlib/ANL4DVector.cxx index 81a44a0..85671d4 100644 --- a/src/anlib/ANL4DVector.cxx +++ b/src/anlib/ANL4DVector.cxx @@ -20,7 +20,7 @@ //* $Id: ANL4DVector.cxx,v 1.1.1.1 2005/02/15 02:14:56 fujiik Exp $ //************************************************************************* // -#include "ANL4DVector.h" +#include "physsim/ANL4DVector.h" //_____________________________________________________________________ // ---------------- // Lockable LVector diff --git a/src/anlib/ANL4DVector.h b/src/anlib/ANL4DVector.h deleted file mode 100644 index a21260a..0000000 --- a/src/anlib/ANL4DVector.h +++ /dev/null @@ -1,155 +0,0 @@ -#ifndef __ANLLVECTOR__ -#define __ANLLVECTOR__ -//************************************************************************* -//* =================== -//* ANL4DVector Class -//* =================== -//* -//* (Description) -//* A very primitive lockable Lorentz vector class. -//* (Requires) -//* class TLorentzVector -//* class TAttLockable -//* class ANL3DVector -//* (Provides) -//* class ANL4DVector -//* (Update Recored) -//* 1999/09/05 K.Ikematsu Original version. -//* 2000/03/23 K.Ikematsu Added Get3D method. -//* 2000/03/23 K.Ikematsu Added GetTheta method. -//* 2000/03/28 K.Ikematsu Added Acol method. -//* -//************************************************************************* -// -#include -#include "TLorentzVector.h" -#include "TMath.h" -#include "TString.h" -#include "TAttLockable.h" -//#include "ANL3DVector.h" - -using namespace std; - -//_____________________________________________________________________ -// ----------------------- -// Lockable TLorentzVector -// ----------------------- -// -class ANL4DVector : public TLorentzVector, public lcme::TAttLockable { -public: - ANL4DVector(Double_t e=0., Double_t px=0., Double_t py=0., Double_t pz=0.) - : TLorentzVector(px,py,pz,e) {} - ANL4DVector(Float_t e, Float_t px=0., Float_t py=0., Float_t pz=0.) { - TLorentzVector::operator[](kT) = e; - TLorentzVector::operator[](kX) = px; - TLorentzVector::operator[](kY) = py; - TLorentzVector::operator[](kZ) = pz; - } - // ANL4DVector(const TVector &q) { - // TLorentzVector::operator[](kT) = q(0); - // TLorentzVector::operator[](kX) = q(1); - // TLorentzVector::operator[](kY) = q(2); - // TLorentzVector::operator[](kZ) = q(3); - // } - - ANL4DVector(const TLorentzVector &q) : TLorentzVector(q) {} - ANL4DVector(const ANL4DVector &q) : TLorentzVector(q), lcme::TAttLockable(q) {} - - virtual ~ANL4DVector() {} - - inline Double_t & E() { return TLorentzVector::operator[](kT); } - inline Double_t & Px() { return TLorentzVector::operator[](kX); } - inline Double_t & Py() { return TLorentzVector::operator[](kY); } - inline Double_t & Pz() { return TLorentzVector::operator[](kZ); } - inline Double_t & T() { return TLorentzVector::operator[](kT); } - inline Double_t & X() { return TLorentzVector::operator[](kX); } - inline Double_t & Y() { return TLorentzVector::operator[](kY); } - inline Double_t & Z() { return TLorentzVector::operator[](kZ); } - inline Double_t & operator()(Int_t i) { - return TLorentzVector::operator[]((i>0 ? i-1 : 3)); - } - - inline Double_t E() const { return TLorentzVector::operator[](kT); } - inline Double_t Px() const { return TLorentzVector::operator[](kX); } - inline Double_t Py() const { return TLorentzVector::operator[](kY); } - inline Double_t Pz() const { return TLorentzVector::operator[](kZ); } - inline Double_t T() const { return TLorentzVector::operator[](kT); } - inline Double_t X() const { return TLorentzVector::operator[](kX); } - inline Double_t Y() const { return TLorentzVector::operator[](kY); } - inline Double_t Z() const { return TLorentzVector::operator[](kZ); } - inline Double_t operator()(Int_t i) const { - return TLorentzVector::operator[]((i>0 ? i-1 : 3)); - } - - inline friend ANL4DVector operator+ (const ANL4DVector &q1, - const ANL4DVector &q2) { - ANL4DVector ans = q1; ans += q2; return ans; - } - inline friend ANL4DVector operator- (const ANL4DVector &q1, - const ANL4DVector &q2) { - ANL4DVector ans = q1; ans -= q2; return ans; - } - inline friend ANL4DVector operator+ (const ANL4DVector &q1) { return q1; } - inline friend ANL4DVector operator- (const ANL4DVector &q1) { - ANL4DVector ans(-q1(0),-q1(1),-q1(2),-q1(3)); return ans; - } - inline friend Double_t operator* (const ANL4DVector &q1, - const ANL4DVector &q2) { - return ( q1(0)*q2(0) - q1(1)*q2(1) - q1(2)*q2(2) - q1(3)*q2(3) ); - } - - // inline ANL3DVector Get3D() const { - // ANL3DVector vec(operator()(1),operator()(2),operator()(3)); - // return vec; - // } - - inline Double_t GetPt2() const { return ( operator()(1)*operator()(1) - + operator()(2)*operator()(2) ); } - inline Double_t GetMag2() const { return ( GetPt2() - + operator()(3)*operator()(3) ); } - inline Double_t GetPt() const { return TMath::Sqrt( GetPt2() ); } - inline Double_t GetMag() const { return TMath::Sqrt( GetMag2() ); } - inline Double_t GetMass2() const { return ( operator()(0)*operator()(0) - - GetMag2() ); } - inline Double_t GetMass() const { - return ( GetMass2() < 0 ? (-TMath::Sqrt(-GetMass2())) - : ( TMath::Sqrt( GetMass2())) ); - } - inline Double_t GetTheta() const { return (180.*(TMath::ACos(CosTheta()))/TMath::Pi()); } - inline Double_t GetTheta(const ANL4DVector &q) const { - return (180.*(TMath::ACos(CosTheta(q)))/TMath::Pi()); - } - inline Double_t Acol(const ANL4DVector &q) const { - return (180.*(TMath::Pi()-TMath::ACos(CosTheta(q)))/TMath::Pi()); - } - inline Double_t Acop(const ANL4DVector &q) const { - Double_t c = (operator()(1)*q(1)+operator()(2)*q(2)) - /(GetPt()*q.GetPt()); - return (180.*(TMath::Pi()-TMath::ACos(c))/TMath::Pi()); - } -#if 0 - inline Double_t CosTheta() const { return TLorentzVector::CosTheta(); } -#else - inline Double_t CosTheta() const { - return (GetMag() == 0. ? 1.0 : operator()(3)/GetMag()); - } -#endif - inline Double_t CosTheta(const ANL4DVector &q) const { - return (operator()(1)*q(1)+operator()(2)*q(2)+operator()(3)*q(3)) - /(GetMag()*q.GetMag()); - } - - inline virtual void DebugPrint(const Char_t *opt = "Brief") const { - cerr << "p = " << operator()(0) << " " << operator()(1) << " " - << operator()(2) << " " << operator()(3) << endl; - if (TString(opt).Contains("Detailed")) { - cerr << "pt = " << GetPt() << endl; - cerr << "ap = " << GetMag() << endl; - cerr << "mass = " << GetMass() << endl; - } - } - - ClassDef(ANL4DVector,1) // Lockable Lorentz vector class -}; - -#endif diff --git a/src/anlib/LinkDef.h b/src/anlib/LinkDef.h deleted file mode 100644 index 7715fbe..0000000 --- a/src/anlib/LinkDef.h +++ /dev/null @@ -1,11 +0,0 @@ -// $Id: LinkDef.h,v 1.3 2007/01/18 15:51:30 fujiik Exp $ - -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class ANL4DVector; - -#endif diff --git a/src/genlib/GENLib.cxx b/src/genlib/GENLib.cxx index 82df5ff..9422c2c 100644 --- a/src/genlib/GENLib.cxx +++ b/src/genlib/GENLib.cxx @@ -11,8 +11,8 @@ //* //***************************************************************************** -#include "GENLib.h" -#include "GENNumCon.h" +#include "physsim/GENLib.h" +#include "physsim/GENNumCon.h" #include #include diff --git a/src/genlib/GENLib.h b/src/genlib/GENLib.h deleted file mode 100644 index b7eb567..0000000 --- a/src/genlib/GENLib.h +++ /dev/null @@ -1,322 +0,0 @@ -#ifndef GENLIB_H -#define GENLIB_H -//***************************************************************************** -//* ===================== -//* GENLib -//* ===================== -//* -//* (Description) -//* Class library for event generators. -//* -//* (Update Record) -//* 2007/01/27 K.Fujii Original version. -//* -//***************************************************************************** - -#include "ANL4DVector.h" -#include "TObjArray.h" -#include "TAttLockable.h" - -class GENPDTEntry; -class GENPDTWBoson; -class GENPDTZBoson; -class GENPDTPhoton; -class GENPDTGluon; -class GENBranch; - -//_______________________________________________________________________ -// ===================== -// class GENDecayMode -// ===================== -//----------------------------------------------------------------------- -class GENDecayMode : public TObjArray, public lcme::TAttLockable { -friend class GENModePicker; -public: - GENDecayMode(Double_t gm = 0.) : fGamma(gm), fBR(0.), fCumBR(0.) {} - virtual ~GENDecayMode() {} - - inline Double_t GetGamma() { return fGamma; } - inline Double_t GetBR () { return fBR; } - inline void SetGamma(Double_t gm ) { fGamma = gm; } - inline void SetBR (Double_t br ) { fBR = br; } - - void DebugPrint(const Option_t *opt =""); - -private: - Double_t fGamma; // partial width - Double_t fBR; // branching fraction - Double_t fCumBR; // cumulative branching fraction - - ClassDef(GENDecayMode, 1) // Decay mode class -}; - -//_______________________________________________________________________ -// ===================== -// class GENModePicker -// ===================== -//----------------------------------------------------------------------- -class GENModePicker : public TObjArray { -public: - GENModePicker() : fGamma(0.), fBRsum(0.), fDone(kFALSE) {} - virtual ~GENModePicker() {} - - using TObjArray::Add; - virtual void Add (GENDecayMode *mp); - - GENDecayMode *PickMode(Double_t x, - Double_t &weight, - Int_t &mode); - - const GENDecayMode *GetMode (Int_t m) const; - GENDecayMode *GetMode (Int_t m); - Double_t GetWidth() { if(!fDone) Update(); return fGamma; } - -protected: - virtual void Update(); - -private: - Double_t fGamma; // total width [GeV] - Double_t fBRsum; // BR sum of unlocked modes - Bool_t fDone; // true if updated - - ClassDef(GENModePicker, 1) // Decay mode picker class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPDTEntry -// ===================== -//----------------------------------------------------------------------- -class GENPDTEntry: public GENModePicker { -public: - GENPDTEntry() {} - GENPDTEntry(const Char_t *name, - Int_t pid, - Double_t charge, - Double_t spin, - Double_t mass, - Int_t gen = 0, - Double_t ispin = 0., - Double_t color = 1.); - virtual ~GENPDTEntry(); - - inline TString & GetName () { return fName; } - inline Int_t GetPID () { return fPID; } - inline Double_t GetCharge() { return fCharge; } - inline Double_t GetMass () { return fMass; } - inline Int_t GetGenNo () { return fGen; } - inline Double_t GetISpin () { return fIsoSpin; } - inline Double_t GetColor () { return fColor; } - - Double_t GetQ2BW (Double_t qmin, // Q_min - Double_t qmax, // Q_max - Double_t x, // integration variable - Double_t &weight); // Jacobian weight - - void SetQ2BW (Double_t qmin, // Q_min - Double_t qmax, // Q_max - Double_t q2, // Q2 - Double_t &weight); // Jacobian weight - - void DebugPrint(const Option_t *opt = ""); - -protected: - TString fName; // name - Int_t fPID; // PDG ID code - Double_t fCharge; // charge - Double_t fSpin; // spin - Double_t fMass; // mass [GeV] - Int_t fGen; // generation - Double_t fIsoSpin; // (0, 1, 2) = (0, up, down) - Double_t fColor; // color factor - - ClassDef(GENPDTEntry, 1) // PD table entry class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPDTWBoson -// ===================== -//----------------------------------------------------------------------- -class GENPDTWBoson: public GENPDTEntry { -public: - GENPDTWBoson(); - ~GENPDTWBoson(); - -private: - void Initialize(); - Double_t GamToFF(Double_t mu, Double_t md, Double_t vff, Double_t color); - - ClassDef(GENPDTWBoson, 1) // W boson class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPDTZBoson -// ===================== -//----------------------------------------------------------------------- -class GENPDTZBoson: public GENPDTEntry { -public: - GENPDTZBoson(); - ~GENPDTZBoson(); - -private: - void Initialize(); - Double_t GamToFF(Double_t t3, Double_t qf, Double_t cf, Double_t m); - - ClassDef(GENPDTZBoson, 1) // Z boson class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPDTPhoton -// ===================== -//----------------------------------------------------------------------- -class GENPDTPhoton: public GENPDTEntry { -public: - GENPDTPhoton(); - ~GENPDTPhoton(); - -private: - void Initialize(); - - ClassDef(GENPDTPhoton, 1) // Photon class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPDTGluon -// ===================== -//----------------------------------------------------------------------- -class GENPDTGluon: public GENPDTEntry { -public: - GENPDTGluon(); - ~GENPDTGluon(); - -private: - void Initialize(); - - ClassDef(GENPDTGluon, 1) // Gluon class -}; - -//_______________________________________________________________________ -// ===================== -// class GENBranch -// ===================== -//----------------------------------------------------------------------- -class GENBranch { -public: - GENBranch(Double_t q2 = 0., - Double_t costh = 0., - Double_t phi = 0., - Double_t m12 = 0., - Double_t m22 = 0.); - - GENBranch(Double_t q2, - Double_t costh, - Double_t phi, - GENBranch *br1p, - GENBranch *br2p); - - GENBranch(Double_t q2, - Double_t costh, - Double_t phi, - GENBranch *br1p, - Double_t m22); - - GENBranch(Double_t q2, - Double_t costh, - Double_t phi, - Double_t m12, - GENBranch *br2p); - - virtual ~GENBranch() {} - - inline Double_t GetQ2 () { return fQ2; } - inline Double_t GetCosTheta() { return fCosTheta; } - inline Double_t GetPhi () { return fPhi; } - inline Double_t GetM12 () { return fM12; } - inline Double_t GetM22 () { return fM22; } - inline Double_t GetBetaBar () { return fBetaBar; } - - inline void SetQ2 (Double_t q2) { fQ2 = q2; } - inline void SetCosTheta(Double_t cs) { fCosTheta = cs; } - inline void SetPhi (Double_t fi) { fPhi = fi; } - - inline GENBranch * GetBranchPtr(Int_t i) { return i ? fBR2Ptr - : fBR1Ptr; } - -private: - Double_t fQ2; // q^2 - Double_t fCosTheta; // cos(theta) - Double_t fPhi; // phi - Double_t fM12; // m1*m1 - Double_t fM22; // m2*m2 - GENBranch *fBR1Ptr; // 1st daughter branch if any - GENBranch *fBR2Ptr; // 2nd daughter branch if any - Double_t fBetaBar; // beta_bar - - ClassDef(GENBranch, 1) // Branch class -}; - -//_______________________________________________________________________ -// ===================== -// class GENFrame -// ===================== -//----------------------------------------------------------------------- -class GENFrame { -public: - GENFrame(); - GENFrame(const ANL4DVector &q, const GENFrame &eb); - virtual ~GENFrame() {} - - ANL4DVector Transform(const ANL4DVector &pb); - -private: - TVector3 fEV[3]; // axis vectors - - ClassDef(GENFrame, 1) // Reference frame class -}; - -//_______________________________________________________________________ -// ===================== -// class GENPhase2 -// ===================== -//----------------------------------------------------------------------- -class GENPhase2 { -public: - GENPhase2() {} - GENPhase2(const ANL4DVector &q, - Double_t m12, - Double_t m22, - const GENFrame &eb, - Double_t costh, - Double_t phi, - Int_t mode = 0); - virtual ~GENPhase2() {} - - ANL4DVector GetFourMomentum(Int_t i); - GENFrame GetFrame(Int_t i = 1); - Double_t GetBetaBar(); - -private: - Double_t Beta2(Double_t x1, Double_t x2); - void Update(); - -private: - ANL4DVector fQ; // parent 4-momentum - Double_t fM12; // 1st dauter mass^2 - Double_t fM22; // 2nd dauter mass^2 - GENFrame fEb; // Eb: original frame - GENFrame fEa; // Ea: parent's helicity frame - Double_t fCosTheta; // cos(theta_1) in Ea - Double_t fPhi; // phi_1 in Ea - ANL4DVector fP1; // 1st daughter 4-momentum in Eb - ANL4DVector fP2; // 2nd daughter 4-momentum in Eb - Double_t fBetaBar; // beta_bar - Int_t fMode; // (0,1)=(no transf, transf) - Bool_t fDone; // true if updated - - ClassDef(GENPhase2, 1) // 2-body phase space class -}; -#endif diff --git a/src/genlib/GENNumCon.h b/src/genlib/GENNumCon.h deleted file mode 100644 index 0b8e259..0000000 --- a/src/genlib/GENNumCon.h +++ /dev/null @@ -1,57 +0,0 @@ -// 2013/04/25 Alpha and Sin2W changed to the values used in Whizard -// --- Junping Tian & Keisuke Fujii -// 2014/11/25 AlphaS changed to value in Whizard (0.11780) -// - -#ifndef GENNUMCON_H -#define GENNUMCON_H -#include "TMath.h" -//*---------------------------------------------------------------------- -//* Numerical and Natural Constants -//*---------------------------------------------------------------------- -static const Double_t kSqh = TMath::Sqrt(0.5); // sqrt(1/2) -static const Double_t kPi = TMath::Pi(); // Pi -static const Double_t k2Pi = 2*TMath::Pi(); // 2*Pi -static const Double_t k4Pi = 4*TMath::Pi(); // 4*Pi -static const Double_t k8Pi = 8*TMath::Pi(); // 8*Pi -static const Double_t kGeV2fb = 0.389379292e12; // GeV to fb - -//static const Double_t kAlpha = 1./132.50495; // alpha(mz) -static const Double_t kAlpha = 1./128.; // alpha(mz) -static const Double_t kAlpha0 = 1./137.0359895; // alpha(q=0) = 1/137. -static const Double_t kAlphaS = 0.11780; // alphaS(mz) = 0.12 -//static const Double_t kAlphaS = 0.12; // alphaS(mz) = 0.12 -//static const Double_t kSin2W = 0.222249945; // sin^2(theta_W) -static const Double_t kSin2W = 0.230; // sin^2(theta_W) -static const Double_t kSinW = TMath::Sqrt(kSin2W); // sin(theta_W) -static const Double_t kCos2W = (1. - kSinW)*(1. + kSinW); // cos^2(theta_W) -static const Double_t kCosW = TMath::Sqrt(kCos2W); // cos(theta_W) -static const Double_t kSinCosW = kSinW*kCosW; // sin(2theta_W)/2 -static const Double_t kGe = TMath::Sqrt(k4Pi*kAlpha); // e -static const Double_t kGw = kGe/kSinW; // gw -static const Double_t kGz = kGw/kCosW; // gz - -static const Double_t kM_e = 0.510998902e-3; // electron mass [GeV] -static const Double_t kM_z = 91.188; // Z mass [GeV] -static const Double_t kM_w = kM_z*kCosW; // W mass [GeV] -static const Char_t *kName[2][2][3] = {{{"nu_e", "nu_mu" , "nu_tau"}, - {"e" , "mu" , "tau" }}, - {{"up" , "charm" , "top" }, - {"down", "strange", "bottom"}}}; -static const Int_t kPID [2][2][3] = {{{ 12, 14, 16}, - { 11, 13, 15}}, - {{ 2, 4, 6}, - { 1, 3, 5}}}; -static const Double_t kChrg[2][2][3] = {{{ 0., 0., 0.}, - { -1., -1., -1.}}, - {{ 2/3., 2/3., 2/3.}, - { -1/3., -1/3., -1/3.}}}; - -static const Double_t kMass[2][2][3] = {{{0.000000, 0.00000, 0.0000}, - {0.511e-3, 0.10566, 1.7770}}, - {{0.04 , 1.5 , 175. }, - {0.04 , 0.1 , 4.7 }}}; -static const Double_t kVkm [3][3] = {{0.975, 0.222, 0.010}, - {0.222, 0.974, 0.043}, - {0.010, 0.043, 0.999}}; -#endif diff --git a/src/genlib/LinkDef.h b/src/genlib/LinkDef.h deleted file mode 100644 index 4738d34..0000000 --- a/src/genlib/LinkDef.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class GENBranch+; -#pragma link C++ class GENFrame+; -#pragma link C++ class GENPhase2+; -#pragma link C++ class GENDecayMode+; -#pragma link C++ class GENModePicker+; -#pragma link C++ class GENPDTEntry+; -#pragma link C++ class GENPDTWBoson+; -#pragma link C++ class GENPDTZBoson+; -#pragma link C++ class GENPDTPhoton+; -#pragma link C++ class GENPDTGluon+; - -#endif diff --git a/src/hellib/HELLib.cxx b/src/hellib/HELLib.cxx index 0881b3b..ece3b7e 100644 --- a/src/hellib/HELLib.cxx +++ b/src/hellib/HELLib.cxx @@ -11,7 +11,7 @@ //* //***************************************************************************** -#include "HELLib.h" +#include "physsim/HELLib.h" #include #include diff --git a/src/hellib/HELLib.h b/src/hellib/HELLib.h deleted file mode 100644 index eac6e08..0000000 --- a/src/hellib/HELLib.h +++ /dev/null @@ -1,296 +0,0 @@ -#ifndef HELLIB_H -#define HELLIB_H -//***************************************************************************** -//* ===================== -//* HELLib Classes -//* ===================== -//* -//* (Description) -//* Class library for helicity amplitude calculations. -//* -//* (Update Record) -//* 2007/01/27 K.Fujii Original version. -//* -//***************************************************************************** - -#include "ANL4DVector.h" - -#include -typedef std::complex Complex_t; - -class HELFermion; -class HELScalar; -class HELVector; - -//_______________________________________________________________________ -// ===================== -// class TVectorC -// ===================== -//----------------------------------------------------------------------- -class TVectorC : public TObject { -public: -#if 0 - TVectorC(Int_t n = 4) : fData(n) {} -#else - TVectorC(Int_t n = 4) { fData[0]=0.; fData[1]=0.; fData[2]=0.; fData[3]=0.; } -#endif - // TVectorC(const TVectorC &src) : fData(src.fData) {} - // fg: the above does not compile, e.g. on clang - TVectorC(const TVectorC &src) { fData[0]=src[0]; fData[1]=src[1]; fData[2]=src[2]; fData[3]=src[3]; } - - Complex_t operator[](Int_t i) const { return fData[i]; } - Complex_t &operator[](Int_t i) { return fData[i]; } - -private: -#if 0 - std::vector fData; // data -#else - Complex_t fData[4]; // data -#endif - - ClassDef(TVectorC, 1) // Complex vector class -}; - -//_______________________________________________________________________ -// ===================== -// class HELFermion -// ===================== -//----------------------------------------------------------------------- -class HELFermion : public TVectorC { -friend class HELVector; -friend class HELScalar; -friend class HELVertex; -public: -#if 0 - HELFermion() : TVectorC(4) {} -#else - HELFermion() {} -#endif - HELFermion(const ANL4DVector &p, - Double_t m, - Int_t hel, - Int_t nsf = 1, - Bool_t isincom = kFALSE); - HELFermion(const HELFermion &f, - const HELVector &v, - Double_t gl, - Double_t gr, - Double_t m, - Double_t gam); - virtual ~HELFermion() {} - - inline const ANL4DVector &GetFourMomentum() const { return fP; } - inline Double_t GetMass () const { return fM; } - inline Int_t GetHelicity () const { return fHel; } - inline Int_t GetNSF () const { return fNSF; } - -private: - ANL4DVector fP; // 4-momentum * fNSF - Double_t fM; // mass - Int_t fHel; // (-1,+1) = (-1/2,+1/2) - Int_t fNSF; // (-1,+1) = (antiparticle, particle) - Bool_t fIsIncoming; // true if incoming - - ClassDef(HELFermion, 1) // Incoming fermion class -}; - -//_______________________________________________________________________ -// ===================== -// class HELVector -// ===================== -//----------------------------------------------------------------------- -class HELVector: public TVectorC { -friend class HELFermion; -friend class HELScalar; -friend class HELVertex; -public: -#if 0 - HELVector() : TVectorC(4) {} -#else - HELVector() {} -#endif - HELVector(const ANL4DVector &p, - Double_t m, - Int_t hel, - Int_t nsv = 1); - HELVector(const HELFermion &fin, - const HELFermion &fout, - Double_t gl, - Double_t gr, - Double_t m, - Double_t gm); - HELVector(const HELFermion &fin, - const HELFermion &fout, - Double_t gla, - Double_t gra, - Double_t glz, - Double_t grz, - Double_t m, - Double_t gm); - HELVector(const HELVector &v, - const HELScalar &sc, - Double_t g, - Double_t m, - Double_t gm); - HELVector(const HELVector &v1, - const HELVector &v2, - Double_t g, - Double_t m, - Double_t gm); - HELVector (Double_t ebm, - Double_t eef, - Double_t sh, - Double_t ch, - Double_t fi, - Int_t helbm, - Int_t helef, - Int_t nsf, - Double_t ge = TMath::Sqrt(4.*TMath::Pi()/128.), - Double_t me = 0.510998902e-3); - HELVector (Complex_t v0, - Complex_t v1, - Complex_t v2, - Complex_t v3, - const ANL4DVector &p); - - virtual ~HELVector() {} - - inline const ANL4DVector &GetFourMomentum() const { return fP; } - inline Double_t GetMass () const { return fM; } - inline Int_t GetHelicity () const { return fHel; } - inline Int_t GetNSV () const { return fNSV; } -#if 1 - void DebugPrint() const; -#endif - -private: - ANL4DVector fP; // 4-momentum * fNSV - Double_t fM; // mass - Int_t fHel; // helicity - Int_t fNSV; // (-1,1) = (initial, final) - - ClassDef(HELVector, 1) // Vector boson class -}; - -//_______________________________________________________________________ -// ===================== -// class HELScalar -// ===================== -//----------------------------------------------------------------------- -class HELScalar: public Complex_t { -friend class HELFermion; -friend class HELVector; -friend class HELVertex; -public: - HELScalar(const ANL4DVector &p, - Int_t nss = 1); - HELScalar(const HELVector &vc, - const HELScalar &sc, - Double_t g, - Double_t m, - Double_t gm); - HELScalar(const HELScalar &s1, - const HELScalar &s2, - Double_t g, - Double_t m, - Double_t gm); - HELScalar(const HELVector &v1, - const HELVector &v2, - Double_t g, - Double_t m, - Double_t gm); - HELScalar(const HELVector &v1, - const HELVector &v2, - Double_t g1, - Double_t g2, - Double_t g3, - Double_t m, - Double_t gm); - HELScalar(const HELFermion &in, - const HELFermion &out, - Complex_t gl, - Complex_t gr, - Double_t m, - Double_t gm); - - virtual ~HELScalar() {} - - inline const ANL4DVector &GetFourMomentum() const { return fP; } - inline Int_t GetNSS () const { return fNSS; } - -private: - ANL4DVector fP; // 4-momentum * fNSS - Int_t fNSS; // (-1,1) = (initial, final) - - ClassDef(HELScalar, 1) // Scalar boson class -}; - -//_______________________________________________________________________ -// ===================== -// class HELVertex -// ===================== -//----------------------------------------------------------------------- -class HELVertex: public Complex_t { -public: - HELVertex(Complex_t val = 0.) : Complex_t(val) {} - HELVertex(const HELFermion &in, - const HELFermion &out, - const HELVector &v, - Double_t gl, - Double_t gr); - HELVertex(const HELVector &v1, - const HELVector &v2, - const HELScalar &sc, - Double_t g); - HELVertex(const HELVector &v1, - const HELVector &v2, - const HELScalar &sc, - Double_t g1, - Double_t g2, - Double_t g3); - HELVertex(const HELVector &v1, - const HELVector &v2, - const HELVector &v3, - Double_t g); - HELVertex(const HELVector &wm, - const HELVector &w31, - const HELVector &wp, - const HELVector &w32, - Double_t g31, - Double_t g32, - Double_t mw, - Double_t gamw, - Bool_t mode); - HELVertex(const HELVector &wm1, - const HELVector &wp1, - const HELVector &wm2, - const HELVector &wp2, - Double_t gwwa, - Double_t gwwz, - Double_t mz, - Double_t gamz); - HELVertex(const HELVector &v1, - const HELVector &v2, - const HELVector &v3, - const HELVector &v4, - Double_t g); - HELVertex(const HELVector &vc, - const HELScalar &s1, - const HELScalar &s2, - Double_t g); - HELVertex(const HELVector &v1, - const HELVector &v2, - const HELScalar &s1, - const HELScalar &s2, - Double_t g); - HELVertex(const HELFermion &in, - const HELFermion &out, - const HELScalar &sc, - Complex_t gl, - Complex_t gr); - - virtual ~HELVertex() {} - - ClassDef(HELVertex, 1) // Vertex class -}; -#endif diff --git a/src/hellib/LinkDef.h b/src/hellib/LinkDef.h deleted file mode 100644 index 5dc036b..0000000 --- a/src/hellib/LinkDef.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class TVectorC+; -#pragma link C++ class HELFermion+; -#pragma link C++ class HELVector+; -#pragma link C++ class HELScalar+; -#pragma link C++ class HELVertex+; - -#endif diff --git a/src/utils/LinkDef.h b/src/utils/LinkDef.h deleted file mode 100644 index b89c4f9..0000000 --- a/src/utils/LinkDef.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class lcme::TAttLockable+; - -#endif diff --git a/src/utils/TAttLockable.cxx b/src/utils/TAttLockable.cxx index ce83ec0..2b03498 100644 --- a/src/utils/TAttLockable.cxx +++ b/src/utils/TAttLockable.cxx @@ -14,7 +14,7 @@ //* //************************************************************************* // -#include "TAttLockable.h" +#include "physsim/TAttLockable.h" //_____________________________________________________________________ // ------------------------------ // Base Class for Lockale Objects diff --git a/src/utils/TAttLockable.h b/src/utils/TAttLockable.h deleted file mode 100644 index caa7268..0000000 --- a/src/utils/TAttLockable.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __TATTLOCKABLE__ -#define __TATTLOCKABLE__ -//************************************************************************* -//* =================== -//* TAttLockable Class -//* =================== -//* -//* (Description) -//* TAttLockable class adds lockable attribute to an object. -//* (Requires) -//* none -//* (Provides) -//* class Lockable -//* (Update Recored) -//* 1999/06/05 K.Fujii Original very primitive version. -//* -//************************************************************************* -// -#include -//_____________________________________________________________________ -// ------------------------------ -// Base Class for Lockale Objects -// ------------------------------ -// -namespace lcme{ -class TAttLockable { -public: - TAttLockable() : fStatus(kFALSE) {} - virtual ~TAttLockable() {} - - inline virtual Bool_t IsLocked() const { return fStatus; } - inline virtual void Lock() { fStatus = kTRUE; } - inline virtual void Unlock() { fStatus = kFALSE; } -private: - Bool_t fStatus; // lock byte - - ClassDef(TAttLockable,1) // Base class for lockable objects -}; -} -#endif From b784da1658596265cf4a23c5d87c70480416abb8 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 11 Jan 2023 17:32:48 +0100 Subject: [PATCH 5/7] Update README with build instructions --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 3fe3647..72b426d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,48 @@ Physsim is distributed under the [GPLv3 License](http://www.gnu.org/licenses/gpl [![License](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) +## Building Physsim and the example processors + +In order to build Physsim the easiest way to satisfy all dependencies is to either use a Key4hep or a recent iLCSoft release. The instructions are very similar for both, the major difference is in the invokation of the `cmake` command, where `-C ${ILCSOFT}/ILCSoft.cmake` has to be replaced by `-DCMAKE_CXX_STANDARD=17` when using a Key4hep release. + +- Setup a recent iLCSoft release, e.g. +```bash +source /cvmfs/ilc.desy.de/sw/x86_64_gcc103_centos7/v02-03-01/init_ilcsoft.sh +``` + +- Clone the Physsim repository +```bash +git clone https://github.com/iLCSoft/Physsim +cd Physsim +``` + +- Build and install Physsim +```bash +mkdir build +cd build +cmake -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_INSTALL_PREFIX=../install .. +make install # use -j to build with N proceses in parallel +``` + +- Setup the environment to use the Physsim that you have just built (assuming you are still in the build directory). **Note that the `lib64` folder might be called `lib` depending on the OS you are using, please change accordingly** +```bash +cd ../install +export CMAKE_PREFIX_PATH=$(pwd):$CMAKE_PREFIX_PATH +export LD_LIBRARY_PATH=$(pwd)/lib64:$LD_LIBRARY_PATH +cd .. +``` + +- Build the example processors (assuming that you start from the `Physsim` top-level directory) +```bash +cd example_stdhep +mkdir build +cd build +cmake -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_INSTALL_PREFIX=../install .. +make install # use -j to build with N processes in parallel +``` + +- Afterwards, the usual steps of adding the processors to `MARLIN_DLL` are necessary in order for Marlin to be able to find them + ## License and Copyright Copyright (C) 2005-2017, Physsim Authors From ff5a593a4ec318397f7720919db70a6b206f7bd7 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 11 Jan 2023 11:30:11 +0100 Subject: [PATCH 6/7] Add github actions CI workflows --- .github/workflows/key4hep.yml | 41 ++++++++++++++++++++++++++++++++ .github/workflows/linux.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/workflows/key4hep.yml create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml new file mode 100644 index 0000000..672993f --- /dev/null +++ b/.github/workflows/key4hep.yml @@ -0,0 +1,41 @@ +name: keyh4ep +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: aidasoft/run-lcg-view@v4 + with: + container: centos7 + view-path: /cvmfs/sw-nightlies.hsf.org/key4hep + run: | + mkdir build + cd build + echo "::group::Run CMake" + cmake -GNinja \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + echo "::endgroup::" && echo "::group::Build" + ninja -k0 + echo "::endgroup::" && echo "::group::Install" + ninja install + echo "::endgroup::" && echo "::group::Build example processors" + cd ../install + export CMAKE_PREFIX_PATH=$(pwd):${CMAKE_PREFIX_PATH} + cd ../example_stdhep + mkdir build + cd build + cmake -GNinja \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + ninja -k0 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..80b2bb4 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,44 @@ +name: linux +on: [push, pull_request] + +jobs: + centos7: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + COMPILER: [gcc10, clang11] + LCG: [100] + + steps: + - uses: actions/checkout@v3 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: aidasoft/run-lcg-view@v4 + with: + view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/${{ matrix.LCG }}/nightly/x86_64-centos7-${{ matrix.COMPILER }}-opt" + setup-script: "init_ilcsoft.sh" + run: | + mkdir build + cd build + echo "::group::Run CMake" + cmake -GNinja \ + -C ${ILCSOFT}/ILCSoft.cmake \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + echo "::endgroup::" && echo "::group::Build" + ninja -k0 + echo "::endgroup::" && echo "::group::Install" + ninja install + echo "::endgroup::" && echo "::group::Build example processors" + cd ../install + export CMAKE_PREFIX_PATH=$(pwd):${CMAKE_PREFIX_PATH} + cd ../example_stdhep + mkdir build + cd build + cmake -GNinja \ + -C ${ILCSOFT}/ILCSoft.cmake \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + ninja -k0 From 07d3e5784916c5f3295a436b0c0ce7d4445eb730 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 11 Jan 2023 11:43:18 +0100 Subject: [PATCH 7/7] Remove travis-ci configuration --- .travis-ci.d/compile_and_test.sh | 12 ------ .travis-ci.d/coverity_scan.sh | 12 ------ .travis.yml | 66 -------------------------------- 3 files changed, 90 deletions(-) delete mode 100755 .travis-ci.d/compile_and_test.sh delete mode 100755 .travis-ci.d/coverity_scan.sh delete mode 100644 .travis.yml diff --git a/.travis-ci.d/compile_and_test.sh b/.travis-ci.d/compile_and_test.sh deleted file mode 100755 index 1f4971e..0000000 --- a/.travis-ci.d/compile_and_test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} -source $ILCSOFT/init_ilcsoft.sh - -cd /Package -mkdir build -cd build -cmake -GNinja -C $ILCSOFT/ILCSoft.cmake -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" .. && \ -ninja && \ -ninja install && \ -ctest --output-on-failure diff --git a/.travis-ci.d/coverity_scan.sh b/.travis-ci.d/coverity_scan.sh deleted file mode 100755 index 8ee8bf1..0000000 --- a/.travis-ci.d/coverity_scan.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} -source $ILCSOFT/init_ilcsoft.sh - -cd /Package -mkdir build -cd build -cmake -C $ILCSOFT/ILCSoft.cmake -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" .. && \ -export PATH=/Package/cov-analysis-linux64/bin:$PATH && \ -cov-build --dir cov-int make -j2 && \ -tar czvf myproject.tgz cov-int diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9e8c27b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,66 +0,0 @@ -sudo: required -dist: trusty - -services: - - docker - -language: cpp - -env: - matrix: - - COMPILER=gcc - - COMPILER=llvm - - -before_install: - - wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb - - sudo dpkg -i cvmfs-release-latest_all.deb - - sudo apt-get update - - sudo apt-get install cvmfs cvmfs-config-default - - rm -f cvmfs-release-latest_all.deb - - wget https://lcd-data.web.cern.ch/lcd-data/CernVM/default.local - - sudo mkdir -p /etc/cvmfs - - sudo mv default.local /etc/cvmfs/default.local - - sudo /etc/init.d/autofs stop - - sudo cvmfs_config setup - - sudo mkdir -p /cvmfs/clicdp.cern.ch - - sudo mkdir -p /cvmfs/geant4.cern.ch - - sudo mkdir -p /cvmfs/sft.cern.ch - - sudo mount -t cvmfs clicdp.cern.ch /cvmfs/clicdp.cern.ch - - sudo mount -t cvmfs geant4.cern.ch /cvmfs/geant4.cern.ch - - sudo mount -t cvmfs sft.cern.ch /cvmfs/sft.cern.ch - - ls /cvmfs/clicdp.cern.ch - - ls /cvmfs/geant4.cern.ch - - ls /cvmfs/sft.cern.ch/lcg - -# command to install dependencies -install: - - shopt -s extglob dotglob - - mkdir Package - - mv !(Package) Package - - shopt -u dotglob - - export PKGDIR=${PWD}/Package - - export description=`date` - - export COVERITY_REPO=`echo ${TRAVIS_REPO_SLUG} | sed 's/\//\%2F/g'` - - if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]]; - then wget https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_SCAN_TOKEN}&project=${COVERITY_REPO}" -O Package/coverity_tool.tgz; cd Package; mkdir cov-analysis-linux64; tar -xf coverity_tool.tgz -C cov-analysis-linux64 --strip-components=1; - fi - -# command to run tests -script: - - docker run -it --name CI_container -v $PKGDIR:/Package -e COMPILER=$COMPILER -v /cvmfs:/cvmfs -d clicdp/cc7-lcg /bin/bash - - if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]]; - then docker exec -it CI_container /bin/bash -c "./Package/.travis-ci.d/coverity_scan.sh"; - elif [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "llvm" ]]; - then echo "Running the weekly Coverity Scan, no LLVM/Clang build this time"; - else docker exec -it CI_container /bin/bash -c "./Package/.travis-ci.d/compile_and_test.sh"; - fi - - if [[ "${TRAVIS_EVENT_TYPE}" == "cron" && "${COMPILER}" == "gcc" ]]; - then curl --form token=${COVERITY_SCAN_TOKEN} --form email=noreply@cern.ch --form file=@${PKGDIR}/build/myproject.tgz --form version="master" --form description="${description}" https://scan.coverity.com/builds?project=${COVERITY_REPO} ; - fi - -# Don't send e-mail notifications -notifications: - email: - on_success: never - on_failure: always