diff --git a/CMakeLists.txt b/CMakeLists.txt index daa1b5f..e2c33b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,111 +1,121 @@ # Top level CMakeLists.txt for EvtGen # Enforce an out-of-source build. # Should be the first action in the top level CMakeLists.txt if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(STATUS "EvtGen requires an out-of-source build.") message(STATUS "Please remove the following files from ${CMAKE_BINARY_DIR}:") message(STATUS " CMakeCache.txt") message(STATUS " CMakeFiles") message(STATUS "Once these files are removed, create a separate directory") message(STATUS "and run CMake from there, pointing it to:") message(STATUS " ${CMAKE_SOURCE_DIR}") message(FATAL_ERROR "in-source build detected") endif() # Also require a minimum version of CMake cmake_minimum_required(VERSION 3.11.0) # Project setup if(${CMAKE_VERSION} VERSION_LESS 3.12.0) project(EvtGen VERSION 2.0.0 DESCRIPTION "Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons." ) else() project(EvtGen VERSION 2.0.0 DESCRIPTION "Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons." HOMEPAGE_URL "https://evtgen.hepforge.org" ) endif() # Prepend this project's custom module path(s) to CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH}) # Include needed modules to perform any custom setup # Install paths include(GNUInstallDirs) # Compilation/linking flags and related settings include(CompilerFlags) # EvtGen external dependencies option(EVTGEN_PYTHIA "Enable/disable linking with Pythia8" OFF) option(EVTGEN_PHOTOS "Enable/disable linking with Photos++" OFF) option(EVTGEN_TAUOLA "Enable/disable linking with Tauola++" OFF) option(EVTGEN_HEPMC3 "Enable/disable linking with HepMC3" ON) if (EVTGEN_HEPMC3) message(STATUS "EvtGen: Linking with HepMC3") else() message(STATUS "EvtGen: Linking with HepMC2") endif() message(STATUS "EvtGen: Optional linking with Pythia8 EVTGEN_PYTHIA ${EVTGEN_PYTHIA}") message(STATUS "EvtGen: Optional linking with Photos++ EVTGEN_PHOTOS ${EVTGEN_PHOTOS}") message(STATUS "EvtGen: Optional linking with Tauola++ EVTGEN_TAUOLA ${EVTGEN_TAUOLA}") message(STATUS "EvtGen: Optional linking with HepMC3 EVTGEN_HEPMC3 ${EVTGEN_HEPMC3}") include(ExternalDependencies) # Now build the library add_subdirectory(src) # Copy the particle property and decay tables configure_file(DECAY.DEC ${CMAKE_CURRENT_BINARY_DIR}/DECAY.DEC COPYONLY) configure_file(DECAY.XML ${CMAKE_CURRENT_BINARY_DIR}/DECAY.XML COPYONLY) configure_file(evt.pdl ${CMAKE_CURRENT_BINARY_DIR}/evt.pdl COPYONLY) +# Copy the older particle property and decay tables +configure_file(DECAY_2009.DEC ${CMAKE_CURRENT_BINARY_DIR}/DECAY_2009.DEC COPYONLY) +configure_file(DECAY_2009.XML ${CMAKE_CURRENT_BINARY_DIR}/DECAY_2009.XML COPYONLY) +configure_file(DECAY_2010.DEC ${CMAKE_CURRENT_BINARY_DIR}/DECAY_2010.DEC COPYONLY) +configure_file(DECAY_2010.XML ${CMAKE_CURRENT_BINARY_DIR}/DECAY_2010.XML COPYONLY) # Build the executables in the test and validation directories +option(EVTGEN_BUILD_DOC "Enable/disable building of documentation in 'doc' directory" OFF) option(EVTGEN_BUILD_TESTS "Enable/disable building of executables in 'test' directory" OFF) option(EVTGEN_BUILD_VALIDATIONS "Enable/disable building of executables in 'validation' directory" OFF) -message(STATUS "EvtGen: Building of executables in 'test' directory EVTGEN_BUILD_TESTS ${EVTGEN_BUILD_TESTS}") +message(STATUS "EvtGen: Building of documentation in 'doc' directory EVTGEN_BUILD_DOC ${EVTGEN_BUILD_DOC}") +message(STATUS "EvtGen: Building of executables in 'test' directory EVTGEN_BUILD_TESTS ${EVTGEN_BUILD_TESTS}") message(STATUS "EvtGen: Building of executables in 'validation' directory EVTGEN_BUILD_VALIDATIONS ${EVTGEN_BUILD_VALIDATIONS}") +if(${EVTGEN_BUILD_DOC}) + add_subdirectory(doc) +endif() if(${EVTGEN_BUILD_TESTS}) add_subdirectory(test) endif() if(${EVTGEN_BUILD_VALIDATIONS}) add_subdirectory(validation) endif() # Install the include directories install(DIRECTORY EvtGen DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(DIRECTORY EvtGenBase DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(DIRECTORY EvtGenExternal DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(DIRECTORY EvtGenModels DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # Install the particle properties and decay tables -install(FILES DECAY.DEC DECAY.XML evt.pdl DESTINATION ${CMAKE_INSTALL_DATADIR}/EvtGen) +install(FILES DECAY.DEC DECAY.XML evt.pdl DECAY_2010.XML DECAY_2010.DEC DECAY_2009.XML DECAY_2009.DEC DESTINATION ${CMAKE_INSTALL_DATADIR}/EvtGen) # Generate CMake config files, which can be used by other projects include(CMakePackageConfigHelpers) set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) configure_package_config_file(cmake/Templates/EvtGenConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/EvtGenConfig.cmake INSTALL_DESTINATION cmake PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR ) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/EvtGenConfigVersion.cmake COMPATIBILITY AnyNewerVersion ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/EvtGenConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/EvtGenConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/EvtGen/cmake ) install( EXPORT "EvtGenTargets" NAMESPACE "EvtGen::" DESTINATION ${CMAKE_INSTALL_DATADIR}/EvtGen/cmake ) diff --git a/cmake/Templates/EvtGenConfig.cmake.in b/cmake/Templates/EvtGenConfig.cmake.in index 623935b..5d5094f 100644 --- a/cmake/Templates/EvtGenConfig.cmake.in +++ b/cmake/Templates/EvtGenConfig.cmake.in @@ -1,8 +1,9 @@ @PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/EvtGenTargets.cmake") set_and_check(EVTGEN_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set_and_check(EVTGEN_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@") +set_and_check(EVTGEN_DATA_DIR "@PACKAGE_DATA_INSTALL_DIR@") check_required_components("@PROJECT_NAME@") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..e01eca4 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,36 @@ +find_program(LATEX NAMES latex HINTS ${LATEX} PATHS $ENV{PATH} /usr/bin/ /usr/local/bin ) +find_program(BIBTEX NAMES bibtex HINTS ${BIBTEX} PATHS $ENV{PATH} /usr/bin/ /usr/local/bin ) +find_program(MAKEINDEX NAMES makeindex HINTS ${MAKEINDEX} PATHS $ENV{PATH} /usr/bin/ /usr/local/bin ) +find_program(DVIPS NAMES dvips HINTS ${DVIPS} PATHS $ENV{PATH} /usr/bin/ /usr/local/bin ) + +if ( LATEX AND BIBTEX AND MAKEINDEX AND DVIPS ) +MESSAGE(STATUS "EvtGen doc: Using LATEX=${LATEX} BIBTEX=${BIBTEX} MAKEINDEX=${MAKEINDEX} DVIPS=${DVIPS}.") + +file(GLOB EVTGEN_DOC_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/*.tex + ${CMAKE_CURRENT_SOURCE_DIR}/*.eps + ${CMAKE_CURRENT_SOURCE_DIR}/*.fig + ${CMAKE_CURRENT_SOURCE_DIR}/*.pdf + ${CMAKE_CURRENT_SOURCE_DIR}/*.bib + ) + +foreach ( s ${EVTGEN_DOC_SOURCES} ) +configure_file(${s} ${CMAKE_CURRENT_BINARY_DIR}/ COPYONLY) +endforeach ( s ${EVTGEN_DOC_SOURCES} ) +ADD_CUSTOM_COMMAND(OUTPUT guide.ps +COMMAND ${LATEX} guide +COMMAND ${BIBTEX} guide +COMMAND ${LATEX} guide +COMMAND ${MAKEINDEX} guide +COMMAND ${LATEX} guide +COMMAND ${DVIPS} guide.dvi -o guide.ps +DEPENDS ${EVTGEN_DOC_SOURCES} +WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) +ADD_CUSTOM_TARGET(GUIDE ALL DEPENDS guide.ps) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/guide.ps DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc) +else() +MESSAGE(STATUS "EvtGen doc: some of the required programs were not found: LATEX=${LATEX} BIBTEX=${BIBTEX} MAKEINDEX=${MAKEINDEX} DVIPS=${DVIPS}. The documentation will not be generated.") +endif() + + diff --git a/doc/do_latex b/doc/do_latex deleted file mode 100755 index f2979e0..0000000 --- a/doc/do_latex +++ /dev/null @@ -1,2 +0,0 @@ -latex guide; bibtex guide; latex guide; makeindex guide; latex guide; latex guide; dvips guide.dvi -o guide.ps - diff --git a/doc/guide.bib b/doc/guide.bib index 45d5e3f..90b4a62 100644 --- a/doc/guide.bib +++ b/doc/guide.bib @@ -1,299 +1,295 @@ @misc{Ryd97a,note={ A. Ryd, "Form Factor Measurements in B and D Decays", in Proceedings of the 2nd International Conference on B Physics and CP Violation, Honolulu, 1997. }} @misc{Ryd97b,note={ A. Ryd, "Form Factors in B and D Decays", Contributed to the 7th International Symposium on Heavy Flavor Physics, Santa Barbara, 1997. }} @misc{Ryd98a,note={ A. Ryd and D. Lange, "The EvtGen package for simulating particle decays", Contributed to the International Conference on Computing in High Energy Physics (CHEP'98), Chicago, 1998. }} @misc{Goity95a,note={ J.L. Goity and W. Roberts, Phys. Rev. {\bf D51} 3459-3477 (1995) }} @misc{Adler87,note={ J.Adler {\it et al.},(MARK III),Phys. Lett. {\bf B196}, 107 (1987).}} - -@misc{Adler87,note={ -J.Adler {\it et al.},(MARK III),Phys. Lett. {\bf B196}, 107 (1987).}} - @misc{Akers95,note={ R. Akers {\it et al.}, (OPAL), ``A study of Charm Meson Production in Semileptonic B Decays'', CERN Preprint No. CERN-PPE/95-02 (1995) (unpublished).}} @misc{Albrecht89,note={ H. Albrecht {\it et al.}, (ARGUS), Nucl. Inst. Meth. {\bf A275}, 1 (1989).}} @misc{Albrecht93,note={ H. Albrecht {\it et al.}, (ARGUS), Z. Phys. {\bf C57}, 533 (1993).}} @misc{Altarelli82,note={ G. Altarrelli {\it et al.}, Nucl. Phys. {\bf B208}, 365 (1982).}} @misc{Anjos90,note={ J.C. Anjos {\it et al.}, (E691), Phys. Rev. Lett. {\bf 65}, 2630 (1990).}} @misc{Anjos93,note={ J.C. Anjos {\it et al.}, (E691), Phys. Rev. {\bf D48}, 56 (1993).}} @misc{Avery94,note={ P. Avery {\it et al.}, (CLEO), Phys. Lett. {\bf B331}, 236 (1994).}} @misc{Barish95,note={ B. Barish {\it et al.}, (CLEO), Phys. Rev. {\bf D51}, 1014 (1995).}} @misc{Barish96,note={ B. Barish {\it et al.}, (CLEO), Phys. Rev. Lett. {\bf 76}, 1570 (1996).}} @misc{Bonn71,note={ I have lost this reference... }} @misc{Booth94,note={ S.P.~Booth, {{\it et al.}}\ (UKQCD), Phys.~Rev.~Lett.~{\bf 72}, 462 (1994); C.~Bernard, Y.~Shen, and A.~Soni, Phys.~Lett.~B {\bf 317}, 164 (1993); B.~Blok and M.~Shifman, Phys.~Rev.~D {\bf 47}, 2949 (1993); other predictions are summarized in Ref.~\cite{Richman95}.}} @misc{Buskulic95,note={ D. Buskulic {\it et al.}, (ALEPH), Phys. Lett. {\bf B345}, 103 (1995).}} @misc{Close94,note={ F.E. Close and A. Wambach, Nucl. Phys. {\bf B412}, 169 (1994).}} @misc{Duni91,note={ I. Dunietz, H. Quinn, A. Snyder, W Toki, and H.J. Lipkin, Phys. Rev. {\bf D43}, 2193 (1991).}} @misc{Dubo96,note={ J.E. Duboscq {\it et al.}, (CLEO) Phys. Rev. LEtt. {\bf 76}, 3898 (1996).}} @misc{Cap98,note={ I. Caprini {\it et al.}, Nucl.~Phys.~B~{\bf 530}, 153 (1998).}} @misc{Abe02,note={ K. Abe {\it et al.}, (Belle) Phys.~Lett.~B~{\bf 526}, 247 (2002).}} @misc{Aliev97,note={ T.M. Aliev, M. Savci and A. Ozpineci, Phys. Rev. {\bf D56}, 4260 (1997).}} @misc{Colangelo96,note={ P.Colangelo, F. De Fazio, P. Santorelli and E. Scrimieri Phys. Rev. {\bf D53}, 3672 (1996).}} @misc{Eadi88,note={ See W.T. Eadie {\it et al.}, {\it Statistical Methods in Experimental Physics}, Elsevier, New York (1988).}} @misc{Fox78,note={ G.C. Fox and S. Wolfram, Phys. Rev. Lett. {\bf 41}, 1581 (1978).}} @misc{Gilman90,note={ F.J. Gilman and R.L. Singleton, Phys. Rev. {\bf D41}, 142 (1990).}} @misc{Gangof4,note={ Gangof4. }} @misc{AlephRho,note={ The ALEPH collaboration, {\bf CERN-PPE/97013}}} @misc{3piNote,note={ S. Versill\'e, F. Le Diberder, {CP-Fitting of $B \rightarrow 3\pi$ events (BaBar Note in preparation)}}} @misc{3piBook,note={ $3\pi$ section of the BaBar Book}} @misc{AliGreub,note={ A.Ali and C.Greub, Phys.~Lett.~B~{\bf 361}, 146 (1995).}} @misc{KaganNeubert,note={ A.Kagan and M.Neubert, Euro.~Phys.~Jour~{\bf 7}, 5 1999.}} @misc{Isgur89a,note={ N. Isgur, D. Scora, B. Grinstein, and M.B. Wise, Phys. Rev. {\bf D39}, 799 (1989).}} @misc{Isgur89b,note={ N. Isgur and M.B. Wise, Phys. Lett. {\bf B232}, 113 (1989).}} @misc{Isgur90,note={ N. Isgur and M.B. Wise, Phys. Lett. {\bf B237}, 527 (1990).}} @misc{Jack64,note={ J. D. Jackson, in {\it Les Houches Lectures in High Energy Physics}, 1965 C. DeWitt and M. Jacob, eds. (Goordon and Breach, New York), 1966.}} @misc{Jaco59,note={ M. Jacob and G. C. Wick, Ann. Phys. {\bf 7}, 404 (1959).}} @misc{Korner88,note={ J.G. K\"orner and G.A. Schuler, Z. Phys. {\bf C38}, 511 (1988).}} @misc{Kubota92,note={ Y. Kubota {\it et al.}, (CLEO), Nucl. Instr. and Meth. {\bf A320}, 66 (1992).}} @misc{Lange96,note={ D. Lange and A. Ryd, CLEO Internal Note, CBX 96-6 CSN 95-345 (1996) (unpublished).}} @misc{Luke90,note={ M.E. Luke, Phys. Lett. {\bf B252}, 447 (1990).}} @misc{Menary92,note={ S. Menary, CLEO Internal Note, CBX 92-103 (1992) (unpublished).}} @misc{Neubert91,note={ M. Neubert, Phys. Lett. {\bf B264}, 455 (1991).}} @misc{Neubert92,note={ M. Neubert and V. Rieckert, Nucl. Phys. {\bf B382}, 97 (1992).}} @misc{Neubert93,note={ M. Neubert, Phys. Rep. {\bf 245}, 259 (1993).}} @misc{Renton90,note={ See P. Renton, {\it Electroweak Interactions}, Cambridge University, New York (1990).}} @misc{Rich84,note={ J.D. Richman, Cal. Tech. Preprint CALT-68-1148, (1984) (unpublished).}} @misc{Richman95,note={ J.D. Richman and P. Burchat, Rev. Mod. Phys. {\bf 67}, 893 (1995).}} @misc{Sanghera93,note={ S. Sanghera {\it et al.}, (CLEO), Phys. Rev. {\bf D47}, 791 (1993).}} @misc{Schmidt92,note={ D.M. Schmidt, ``Measurement of Charm Semileptonic Form Factors'', Ph. D. Thesis, University of California Santa Barbara (1992) (unpublished).}} @misc{Sakurai,notes={ J. J. Sakurai, {\it Modern Quantum Mechanics}, (Addison-Wesley Publishing Company, Inc.), (1985).}} @misc{Schmidt93,note={ D.M. Schmidt, R.M. Morrison, and M. Witherell, Nucl. Instr. and Meth. {\bf A328}, 547 (1993).}} @misc{Scora95,note={ D. Scora and N. Isgur, Phys. Rev. {\bf D52}, 2783 (1995).}} @misc{Voloshin92,note={ M.B. Voloshin, Phys. Rev. {\bf D46}, 3062 (1992).}} @misc{Wirbel85,note={ M. Wirbel {\it et al.}, Z. Phys. {\bf C29}, 637 (1985).}} @misc{Was92,note={ E. Richter-Was, Phys. Lett. {\bf B303}, 163, (1993). }} @misc{trksim,note={ TRKSIM is a fast Monte Carlo that uses measured efficiencies and resolutions to generate parametrized detector response for events.}} @misc{hadronic,note={ Hadronic events are identified as having atleast three charged tracks and 0.15 $E_{\rm cm}$ energy deposited in the calorimeter.}} @misc{CKM,note={ N. Cabibbo, Phys. Rev. Lett. {\bf 10}, 531 (1963); M. Kobayashi and T. Maskawa, Prog. Theor. Phys. {\bf 49}, 652 (1973).}} @misc{bdlnu,note={ CLEO Collaboration, CLEO-CONF-95-10, EPS0166 (1995).}} @misc{pdg,note={ Phys. Rev. D 50, 1253 (1994).}} @misc{pdgckm,note={ Phys. Rev. D 50, 1315 (1994) and references therein.}} @misc{Kutschke94,note={ R. Kutschke, CLEO Internal Note, CSN 94-334 (1992) (unpublished).}} @misc{Kutschke96a,note={ R. Kutschke and A. Ryd, CLEO Internal Note, CBX 96-XYZ (1996) (unpublished).}} @misc{geane,note={ Reference to the GEANE package.}} @misc{geant,note={ GEANT Detector Description and Simulation Tool, Version 3.15, CERN Program Library W5103, CERN (1993) (unpublished).}} @misc{Kutschke96b,note={ R. Kutschke and A.Ryd, CLEO Internal Note, CBX 96-20 (1996) (unpublished).}} @misc{Avery91,note={ P. Avery, CLEO Internal Note, CBX 91-74 (1991) (unpublished).}} @misc{Fruhwirth88,note={ R. Fruhwirth, HEPHY-PUB-516/88, ``Application of Filter Methods to the Reconstruction of Tracks and Vertices in Events of Experimental High Energy Physics'', Ph. D. Thesis (1988) (unpublished).}} @misc{Billoir83,note={ P. Billoir, Nucl. Instr. Meth. {\bf 225}, 352 (1983).}} @misc{Billoir90,note={ P. Billoir and S. Qian, Nucl. Instr. Meth. {\bf A225}, 219 (1990).}} @misc{Kalman61,note={ R.E. Kalman, J. Basic Eng. {\bf 82}, 34 (1961); R.E. Kalman and R.S. Bucy, ibid., 95 (1961).}} @misc{Avery92,note={ P. Avery, CLEO Internal Note, CBX 92-40 (1992) (unpublished).}} @misc{Jones96,note={ S.L. Jones, ``Semileptonic B Meson to Excited Charm Meson Decay'', Ph. D. Thesis, Cornell University (1996) (unpublished).}} @misc{Korchemsky00,note={ G.P.\ Korchemsky, D.\ Pirjol, and T. \ Yan, {\em Phys. Rev.\/} {\bf D61}, 114510 (2000).}} @misc{jetset,note={ T. Sj\"ostrand, Computer Physics Commun. {\bf 82} 74 (1994).}} @misc{qq,note={ See http://www.lns.cornell.edu/public/CLEO/soft/QQ. }} @misc{clhep,note={ What can be referenced for CLHEP? }} @misc{root,note={ http://root.cern.ch/ }} diff --git a/setupEvtGen.sh b/setupEvtGen.sh index 5057a00..1581855 100644 --- a/setupEvtGen.sh +++ b/setupEvtGen.sh @@ -1,158 +1,172 @@ #!/bin/bash # This script installs EvtGen with all external dependencies. The variable VERSION specifies the # tag of EvtGen you want to use. The list of available tags can be found by either going to the url # https://phab.hepforge.org/source/evtgen/tags/master # or issuing the command (without the need to clone the git repository) # git ls-remote --tags http://phab.hepforge.org/source/evtgen.git | cut -d '/' -f3 # Note that some earlier EvtGen versions will not be compatible with all external dependency # versions given below, owing to C++ interface differences; see the specific tagged version of # the EvtGen/README file for guidance. # To obtain this script use the "Download File" option on the right of the webpage: # https://phab.hepforge.org/source/evtgen/browse/master/setupEvtGen.sh?view=raw # Version or tag number. No extra spaces on this line! -VERSION=cmake +VERSION=smallerissuesav2 # Pythia version number with no decimal points, e.g. 8230 corresponds to version 8.230. This # follows the naming convention of Pythia install tar files. Again, no extra spaces allowed -PYTHIAVER=8230 +PYTHIAVER=8243 PYTHIAPKG="pythia"$PYTHIAVER PYTHIATAR=$PYTHIAPKG".tgz" echo Pythia version set to $PYTHIAVER, package tar name $PYTHIATAR HEPMCMAJORVERSION="3" +#This is for systems with cmake and cmake3 +if command -v cmake3; then +CMAKE=cmake3 +else +CMAKE=cmake +fi + mkdir -p EvtGen cd EvtGen INSTALL_BASE=`pwd` echo Will setup EvtGen $VERSION in $INSTALL_BASE echo Downloading EvtGen from GIT git clone https://phab.hepforge.org/source/evtgen.git evtgen.git cd evtgen.git #git checkout -b $VERSION $VERSION git checkout $VERSION cd $INSTALL_BASE # Replace the above lines with the following one for the "head" version #git clone http://phab.hepforge.org/source/evtgen.git evtgen.git osArch=`uname` echo Downloading external dependencies mkdir -p external cd external # Recommended versions of the external packages. HepMC is mandatory. # Later versions should be OK as well, assuming their C++ interfaces do not change curl -O http://hepmc.web.cern.ch/hepmc/releases/hepmc2.06.10.tgz curl -O http://hepmc.web.cern.ch/hepmc/releases/HepMC3-3.2.0.tar.gz curl -O http://home.thep.lu.se/~torbjorn/pythia8/$PYTHIATAR curl -O http://photospp.web.cern.ch/photospp/resources/PHOTOS.3.64/PHOTOS.3.64.tar.gz curl -O http://tauolapp.web.cern.ch/tauolapp/resources/TAUOLA.1.1.8/TAUOLA.1.1.8.tar.gz echo Extracting external dependencies tar -xzf hepmc2.06.10.tgz tar -xzf HepMC3-3.2.0.tar.gz tar -xzf $PYTHIATAR -tar -xzf PHOTOS.3.61.tar.gz -tar -xzf TAUOLA.1.1.6c.tar.gz +tar -xzf PHOTOS.3.64.tar.gz +tar -xzf TAUOLA.1.1.8.tar.gz # Patch TAUOLA and PHOTOS on Darwin (Mac) if [ "$osArch" == "Darwin" ] then patch -p0 < $INSTALL_BASE/evtgen.git/platform/tauola_Darwin.patch patch -p0 < $INSTALL_BASE/evtgen.git/platform/photos_Darwin.patch fi - - - - - - if [ "$HEPMCMAJORVERSION" -lt "3" ] then echo Installing HepMC in $INSTALL_BASE/external/HepMC mkdir -p HepMC mkdir -p HepMC.build cd HepMC.build -cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/external/HepMC $INSTALL_BASE/external/hepmc2.06.10 -Dmomentum:STRING=GEV -Dlength:STRING=MM +$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/external/HepMC $INSTALL_BASE/external/HepMC-2.06.10 -Dmomentum:STRING=GEV -Dlength:STRING=MM make make install echo Installing pythia8 in $INSTALL_BASE/external/$PYTHIAPKG cd ../$PYTHIAPKG -if [ "$PYTHIAVER" -lt "8200" ] +if [ "$PYTHIAVER" -lt "8300" ] then - ./configure --with-hepmc=$INSTALL_BASE/external/HepMC --with-hepmcversion=2.06.10 --enable-shared -else - ./configure --with-hepmc2=$INSTALL_BASE/external/HepMC --enable-shared + ./configure --enable-shared --prefix=$INSTALL_BASE/external/$PYTHIAPKG fi +if [ "$PYTHIAVER" -ge "8300" ] +then + ./configure --enable-shared --prefix=$INSTALL_BASE/external/$PYTHIAPKG +fi + make +make install echo Installing PHOTOS in $INSTALL_BASE/external/PHOTOS cd ../PHOTOS -./configure --with-hepmc=$INSTALL_BASE/external/HepMC +./configure --with-hepmc3= --with-hepmc=$INSTALL_BASE/external/HepMC --prefix=$INSTALL_BASE/external/PHOTOS make +make install echo Installing TAUOLA in $INSTALL_BASE/external/TAUOLA cd ../TAUOLA -./configure --with-hepmc=$INSTALL_BASE/external/HepMC +./configure --without-hepmc3 --with-hepmc=$INSTALL_BASE/external/HepMC --prefix=$INSTALL_BASE/external/TAUOLA make +make install + else echo Installing HepMC3 in $INSTALL_BASE/external/HepMC3 mkdir -p HepMC3 mkdir -p HepMC3.build cd HepMC3.build -cmake -DHEPMC3_ENABLE_ROOTIO=OFF -DHEPMC3_ENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/external/HepMC3 $INSTALL_BASE/external/HepMC3-3.2.0 +$CMAKE -DHEPMC3_ENABLE_ROOTIO=OFF -DHEPMC3_ENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/external/HepMC3 $INSTALL_BASE/external/HepMC3-3.2.0 make make install echo Installing pythia8 in $INSTALL_BASE/external/$PYTHIAPKG cd ../$PYTHIAPKG -if [ "$PYTHIAVER" -lt "8200" ] +if [ "$PYTHIAVER" -lt "8300" ] then - ./configure --enable-shared -else - ./configure --with-hepmc3=$INSTALL_BASE/external/HepMC3 --enable-shared + ./configure --enable-shared --prefix=$INSTALL_BASE/external/$PYTHIAPKG fi +if [ "$PYTHIAVER" -ge "8300" ] +then + ./configure --prefix=$INSTALL_BASE/external/$PYTHIAPKG +fi + make echo Installing PHOTOS in $INSTALL_BASE/external/PHOTOS cd ../PHOTOS -./configure --with-hepmc3=$INSTALL_BASE/external/HepMC3 +./configure --with-hepmc3=$INSTALL_BASE/external/HepMC3 --prefix=$INSTALL_BASE/external/PHOTOS make +make install echo Installing TAUOLA in $INSTALL_BASE/external/TAUOLA cd ../TAUOLA -./configure --with-hepmc3=$INSTALL_BASE/external/HepMC3 +./configure --with-hepmc3=$INSTALL_BASE/external/HepMC3 --prefix=$INSTALL_BASE/external/TAUOLA make +make install fi echo Building EvtGen cd $INSTALL_BASE mkdir -p evtgen.build mkdir -p evtgen cd evtgen.build if [ "$HEPMCMAJORVERSION" -lt "3" ] then -cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/evtgen $INSTALL_BASE/evtgen.git -DEVTGEN_PYTHIA=ON -DEVTGEN_PHOTOS=ON -DEVTGEN_TAUOLA=ON -DEVTGEN_HEPMC3=OFF +$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/evtgen $INSTALL_BASE/evtgen.git -DEVTGEN_BUILD_TESTS=ON -DEVTGEN_PYTHIA=ON -DEVTGEN_PHOTOS=ON -DEVTGEN_TAUOLA=ON -DEVTGEN_HEPMC3=OFF else -cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/evtgen $INSTALL_BASE/evtgen.git -DEVTGEN_PYTHIA=ON -DEVTGEN_PHOTOS=ON -DEVTGEN_TAUOLA=ON +$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_BASE/evtgen $INSTALL_BASE/evtgen.git -DEVTGEN_BUILD_TESTS=ON -DEVTGEN_PYTHIA=ON -DEVTGEN_PHOTOS=ON -DEVTGEN_TAUOLA=ON -DEVTGEN_HEPMC3=ON -DHepMC3_DIR=$INSTALL_BASE/external/HepMC3/share/HepMC3/cmake/ fi make make install +ctest . cd $INSTALL_BASE/evtgen echo Setup done. echo To complete, set the Pythia8 data path: if [ "$PYTHIAVER" -lt "8200" ] then echo PYTHIA8DATA=$INSTALL_BASE/external/$PYTHIAPKG/xmldoc else echo PYTHIA8DATA=$INSTALL_BASE/external/$PYTHIAPKG/share/Pythia8/xmldoc fi