IAP GITLAB

Mega patch to modernise build system

OK, so here's a number of changes - mainly to build system - to make it
easier to use CRMC shared libraries in third party applications.

The changes are

- Use **CMAKE** `configure_file` macro instead of hand-crafted replacements
  This effects all files ending in `-HEPMCTEMPLATE` or `-HEPMC-TEMPLATE`
- In case ROOT is enable, do not set `-std=c++X` - ROOT will supply that
  option
- Sub-module `CMakeLists.txt` search for files not only in current source
  directory but also current binary directory.  This is needed for
  out-of-source builds (don't eat where you ... - you get the idea)
  so that **CMAKE** can find the generated files (from `configure_file`)
- Enforce that only _one_ **DPMJet** model version can be built
- Enforce, in case of static linking, that **PhoJet** and **DPMJet**
  cannot be built together
- In case of static linking, check if both C++ and Fortran compilers
  support the flag `-mcmodel=medium` and if so, pass that flag.  This
  is needed - otherwise we might get the error

      relocation truncated to fit: R_X86_64_32S against symbol ...

  from GCC (and I think other compilers too)
- Use

      set_property(SOURCE files APPEND PROPERTY COMPILER_DEFINITIONS ...)

  instead of setting `COMPILER_FLAGS` in a two step fashion.
- Some other minor code fixes

  - `src/models.F` Preprocessor guard around `PHO_PHIST` expanded
    to take into account if PhoJet is being built
  - `src/dpmjet/3.2019-1/DPMJET-19.1/src/phojet/PHO_SETPCOMB.f` - fix
    bug. Trying to format a `CHARACTER` array as `REAL`.

Some things to consider for the future:

- Perhaps EPOS should be treated like any other model
- Perhaps define own transform from `HEPEVT` to `HepMC3::GenEvent`
  procdure so that the size of the `HEPEVT` common block can be
  directly defined here
- ROOT output should really use the "standard" `TGenerator` output -
  that is, a `TClonesArray` of `TParticle` objects.  Additional
  information can still be stored in the output tree (separate branches)
parent 876b5fcc
This diff is collapsed.
......@@ -5,6 +5,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#if defined(__DPMJET06__) and defined(__DPMJET17__)
# error "DPMJet 6 and 17 both enabled - please select only one version"
#endif
#if defined(__DPMJET06__) and defined(__DPMJET19__)
# error "DPMJet 6 and 19 both enabled - please select only one version"
#endif
#if defined(__DPMJET17__) and defined(__DPMJET19__)
# error "DPMJet 17 and 19 both enabled - please select only one version"
#endif
using namespace std;
CRMCdata gCRMC_data;
......@@ -58,11 +68,9 @@ bool CRMCinterface::init(int HEmodel)
#endif
#ifdef __DPMJET06__
case 12: libname << "Dpmjet06"; break;
#endif
#ifdef __DPMJET17__
#elif defined(__DPMJET17__)
case 12: libname << "Dpmjet17"; break;
#endif
#ifdef __DPMJET19__
#elif defined(__DPMJET19__)
case 12: libname << "Dpmjet19"; break;
#endif
default: libname << "UnknownModel"; break;
......
// -*- mode: C++ -*-
#ifndef __CRMC_INTERFACE_H
#define __CRMC_INTERFACE_H
......@@ -50,7 +51,7 @@ struct CRMCdata {
void Clean() { fNParticles = 0; }
// fortran output
const static unsigned int fMaxParticles = HEPEVT_SIZE_REPLACE;
const static unsigned int fMaxParticles = @HepMC_HEPEVT_SIZE@;
int fNParticles;
double fImpactParameter;
......
......@@ -33,21 +33,21 @@ nodecay -19 !uncomment not to decay antialpha
MinDecayLength 1. !minimum c.Tau to define stable particles (cm)
fdpmjet path @CRMCROOT@/tabs/
fdpmjet dat @CRMCROOT@/tabs/dpmjet.dat
fdpmjet pho @CRMCROOT@/tabs/phojet_fitpar.dat
fqgsjet dat @CRMCROOT@/tabs/qgsjet.dat
fqgsjet ncs @CRMCROOT@/tabs/qgsjet.ncs
fqgsjetII03 dat @CRMCROOT@/tabs/qgsdat-II-03.lzma
fqgsjetII03 ncs @CRMCROOT@/tabs/sectnu-II-03
fqgsjetII dat @CRMCROOT@/tabs/qgsdat-II-04.lzma
fqgsjetII ncs @CRMCROOT@/tabs/sectnu-II-04
fname check none
fname initl @CRMCROOT@/tabs/epos.initl
fname iniev @CRMCROOT@/tabs/epos.iniev
fname inirj @CRMCROOT@/tabs/epos.inirj
fname inics @CRMCROOT@/tabs/epos.inics
fname inihy @CRMCROOT@/tabs/epos.inihy
fdpmjet path @CRMC_TABDIR@/
fdpmjet dat @CRMC_TABDIR@/dpmjet.dat
fdpmjet pho @CRMC_TABDIR@/phojet_fitpar.dat
fqgsjet dat @CRMC_TABDIR@/qgsjet.dat
fqgsjet ncs @CRMC_TABDIR@/qgsjet.ncs
fqgsjetII03 dat @CRMC_TABDIR@/qgsdat-II-03.lzma
fqgsjetII03 ncs @CRMC_TABDIR@/sectnu-II-03
fqgsjetII dat @CRMC_TABDIR@/qgsdat-II-04.lzma
fqgsjetII ncs @CRMC_TABDIR@/sectnu-II-04
fname check none
fname initl @CRMC_TABDIR@/epos.initl
fname iniev @CRMC_TABDIR@/epos.iniev
fname inirj @CRMC_TABDIR@/epos.inirj
fname inics @CRMC_TABDIR@/epos.inics
fname inihy @CRMC_TABDIR@/epos.inihy
set pytune 350 !possibility to change PYTHIA tune (for PYTHIA only !)
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/dpmjet/3.0-6")
FILE(GLOB files *.f)
set_source_files_properties( dpmjet3.0-6.f dpmjet-crmc.f phojet1.12-35c4.f pythia6115dpm3v1.f ../../crmc-aaa.f ../../models.F PROPERTIES COMPILE_FLAGS "-D __DPMJET__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __DPMJET__)
IF (__CRMCSTATIC__)
add_library(Dpmjet06 STATIC dpmjet3.0-6.f dpmjet-crmc.f phojet1.12-35c4.f pythia6115dpm3v1.f ../../crmc-aaa.f ../../models.F)
ELSE (__CRMCSTATIC__)
add_library(Dpmjet06 SHARED dpmjet3.0-6.f dpmjet-crmc.f phojet1.12-35c4.f pythia6115dpm3v1.f ../../crmc-aaa.f ../../models.F)
target_link_libraries(Dpmjet06 CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Dpmjet06 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Dpmjet06 SHARED ${base_files} ${files})
target_link_libraries(Dpmjet06 CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Dpmjet06
RUNTIME DESTINATION bin
......
C -*- mode: Fortran -*-
C*********************************************************************
C*********************************************************************
C* **
......@@ -1941,7 +1942,7 @@ C...Commonblocks.
COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
SAVE /PYJETS/,/PYDAT1/,/PYDAT2/
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/dpmjet/3.2017-1")
FILE(GLOB files *.f)
set_source_files_properties( dpmjet.f dpmjet_epos.f phojet.f pythia-6427_cors.f build.f ../../crmc-aaa.f ../../models.F PROPERTIES COMPILE_FLAGS "-D __DPMJET__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __DPMJET__)
IF (__CRMCSTATIC__)
add_library(Dpmjet17 STATIC dpmjet.f dpmjet_epos.f phojet.f pythia-6427_cors.f build.f ../../crmc-aaa.f ../../models.F)
ELSE (__CRMCSTATIC__)
add_library(Dpmjet17 SHARED dpmjet.f dpmjet_epos.f phojet.f pythia-6427_cors.f build.f ../../crmc-aaa.f ../../models.F)
target_link_libraries(Dpmjet17 CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Dpmjet17 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Dpmjet17 SHARED ${base_files} ${files})
target_link_libraries(Dpmjet17 CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Dpmjet17
RUNTIME DESTINATION bin
......
* -*- mode: Fortran -*-
*
*=== dpmini ===========================================================*
*
......@@ -17376,7 +17377,7 @@ CDECK ID>, DT_GETPJE
C standard particle data interface
INTEGER NMXHEP
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
INTEGER NEVHEP,NHEP,ISTHEP,IDHEP,JMOHEP,JDAHEP
DOUBLE PRECISION PHEP,VHEP
COMMON /POEVT1/ NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
......@@ -36016,7 +36017,7 @@ CDECK ID>, DT_SWPPHO
C standard particle data interface
INTEGER NMXHEP
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
INTEGER NEVHEP,NHEP,ISTHEP,IDHEP,JMOHEP,JDAHEP
DOUBLE PRECISION PHEP,VHEP
COMMON /POEVT1/ NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
This diff is collapsed.
C -*- mode: Fortran -*-
C...FHHIGGSCORR
C...Dummy function, to be removed when FEYNHIGGS is to be linked.
......@@ -16845,7 +16845,7 @@ C...Commonblocks.
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -23340,7 +23340,7 @@ C...Parameter statement to help give large particle numbers.
&KEXCIT=4000000,KDIMEN=5000000)
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -76958,7 +76958,7 @@ C...PYTHIA commonblocks.
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -82811,7 +82811,7 @@ C... = 1 : abort generation of current event and move to next.
SUBROUTINE UPVETO(IVETO)
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/dpmjet/3.2019-1")
FILE(GLOB files dpmjet_epos.f ../../crmc-aaa.f ../../models.F)
FILE(GLOB filesDum DPMJET-19.1/common/*.f)
FILE(GLOB filesDpm DPMJET-19.1/src/dpmjet/*.f)
FILE(GLOB filesPho DPMJET-19.1/src/phojet/*.f)
FILE(GLOB filesPyt DPMJET-19.1/src/pythia/*.f)
set_source_files_properties( ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files} PROPERTIES COMPILE_FLAGS "-cpp -mtune=native -Og -Wno-uninitialized -Wno-unused-dummy-argument -std=legacy -D __DPMJET__ -D FOR_CORSIKA " )
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*_epos.f
${CMAKE_CURRENT_SOURCE_DIR}/DPMJET-19.1/common/*.f
${CMAKE_CURRENT_SOURCE_DIR}/DPMJET-19.1/src/dpmjet/*.f
${CMAKE_CURRENT_SOURCE_DIR}/DPMJET-19.1/src/phojet/*.f
${CMAKE_CURRENT_SOURCE_DIR}/DPMJET-19.1/src/pythia/*.f)
IF (__CRMCSTATIC__)
add_library(Dpmjet19 STATIC ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files})
ELSE (__CRMCSTATIC__)
add_library(Dpmjet19 SHARED ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files})
target_link_libraries(Dpmjet19 CrmcBasic)
ENDIF (__CRMCSTATIC__)
set_source_files_properties(${base_files} ${files} PROPERTIES COMPILE_FLAGS "-cpp -mtune=native -Og -Wno-uninitialized -Wno-unused-dummy-argument -std=legacy")
set_source_files_properties(${files} PROPERTIES COMPILE_DEFINITIONS FOR_CORSIKA )
set_property(SOURCE ${base_files} APPEND PROPERTY COMPILE_DEFINITIONS __DPMJET__ __DPMJET19__)
target_include_directories( Dpmjet19 PUBLIC DPMJET-19.1/include/pythia PUBLIC DPMJET-19.1/include/phojet PUBLIC DPMJET-19.1/include/dpmjet PUBLIC DPMJET-19.1/include/flinclude )
IF (CRMC_STATIC)
add_library(Dpmjet19 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Dpmjet19 SHARED ${base_files} ${files})
target_link_libraries(Dpmjet19 CrmcBasic)
ENDIF (CRMC_STATIC)
target_include_directories(Dpmjet19 PUBLIC
DPMJET-19.1/include/pythia
PUBLIC DPMJET-19.1/include/phojet
PUBLIC DPMJET-19.1/include/dpmjet
PUBLIC DPMJET-19.1/include/flinclude )
INSTALL (TARGETS Dpmjet19
RUNTIME DESTINATION bin
......
......@@ -147,7 +147,7 @@ C (Anti-)Particle combination assumed to be known
CALL PHO_SETPAR(1,MPAr(1),0,0.D0)
CALL PHO_SETPAR(2,MPAr(2),0,0.D0)
IF ( SQSglobmax.LE.1.D0 ) THEN
WRITE (LO,'(/1X,A,E5.3)')
WRITE (LO,'(/1X,A,A)')
& 'PHO_SETPCOMB: Initialization energy too small to proceed.'
& , ' Aborting..'
CALL PHO_ABORT
......
cc -*- mode: Fortran -*-
cc ------------ dpmjet3.4 - authors: S.Roesler, R.Engel, J.Ranft -------
cc -------- phojet1.12-40 - authors: S.Roesler, R.Engel, J.Ranft -------
cc - oct'13 -------
......@@ -6,7 +7,7 @@ cc ---------------------------------------------------------------------
cc converted for use with FLUKA -------
cc - oct'13 -------
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......
c -*- mode: Fortran -*-
c---------------------------------------------------------------------------
c dimensions
c---------------------------------------------------------------------------
......@@ -9,7 +10,7 @@ c---------------------------------------------------------------------------
parameter (mmry=1) !memory saving factor
parameter (mxptl=200000/mmry) !max nr of particles in epos ptl list
parameter (nmxhep=HEPEVT_SIZE_REPLACE) !max nr of particles in hep ptl list
parameter (nmxhep=@HepMC_HEPEVT_SIZE@) !max nr of particles in hep ptl list
parameter (myptl=1000) !max nr of droplets in epos ptl list
parameter (nzeta=60) !max nr of zeta bins for droplets
parameter (nflav=6) !max nr of flavors
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/epos")
FILE(GLOB files *.f)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f)
IF (__CRMCSTATIC__)
add_library(CrmcBasic STATIC ${files}) #always needed
INSTALL (TARGETS CrmcBasic
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
ELSE (__CRMCSTATIC__)
add_library(CrmcBasic SHARED ${files}) #always needed
INSTALL (TARGETS CrmcBasic
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
add_library(Epos SHARED ../crmc-aaa.f ../models.F)
INSTALL (TARGETS Epos
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
IF (CRMC_STATIC)
add_library(CrmcBasic STATIC ${files}) #always needed
INSTALL (TARGETS CrmcBasic
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
ELSE (CRMC_STATIC)
add_library(CrmcBasic SHARED ${files}) #always needed
INSTALL (TARGETS CrmcBasic
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
add_library(Epos SHARED ${base_files})
INSTALL (TARGETS Epos
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static
)
target_link_libraries(Epos CrmcBasic)
ENDIF (__CRMCSTATIC__)
ENDIF (CRMC_STATIC)
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/gheisha")
FILE(GLOB files *.f)
set_source_files_properties( ${files} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __GHEISHA__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __GHEISHA__)
IF (__CRMCSTATIC__)
add_library(Gheisha STATIC ${files})
ELSE (__CRMCSTATIC__)
add_library(Gheisha SHARED ${files} ../crmc-aaa.f ../models.F)
target_link_libraries(Gheisha CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Gheisha STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Gheisha SHARED ${base_files} ${files})
target_link_libraries(Gheisha CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Gheisha
RUNTIME DESTINATION bin
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/hijing")
FILE(GLOB files hi*.f)
#FILE(GLOB filesPythia ../pythia/*6.4.22.f ../pythia/*epos.f)
FILE(GLOB filesPythia)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/hi*.f
${CMAKE_CURRENT_BINARY_DIR}/hi*.f)
set_source_files_properties( ${files} ${filesPythia} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __HIJING__")
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __HIJING__)
IF (__CRMCSTATIC__)
add_library(Hijing STATIC ${files} ${files2} ${filesPythia} ../crmc-aaa.f ../models.F)
ELSE (__CRMCSTATIC__)
add_library(Hijing SHARED ${files} ${files2} ${filesPythia} ../crmc-aaa.f ../models.F)
target_link_libraries(Hijing CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Hijing STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Hijing SHARED ${base_files} ${files})
target_link_libraries(Hijing CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Hijing
RUNTIME DESTINATION bin
......
c -*- mode: Fortran -*-
C
C
C
......@@ -9337,7 +9338,7 @@ C*********************************************************************
C...Purpose: to convert JETSET event record contents to or from
C...the standard event record commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
SAVE /HEPEVT/
......
......@@ -858,7 +858,7 @@ C...Format for error printout.
END
#endif
#if __PYTHIA__ || __DPMJET__
#if (__PYTHIA__ || __DPMJET__) && !__PHOJET__
c--------------------------------------------------------------------
subroutine PHO_PHIST(idum,dum)
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/phojet")
FILE(GLOB files *.f)
FILE(GLOB filesPythia ../pythia/pythia6115.f)
set_source_files_properties( ${files} ${filesPythia} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __PHOJET__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f
${CMAKE_BINARY_DIR}/src/pythia/pythia6215.f)
IF (__CRMCSTATIC__)
add_library(Phojet STATIC ${files} ${filesPythia} ../crmc-aaa.f ../models.F)
ELSE (__CRMCSTATIC__)
add_library(Phojet SHARED ${files} ${filesPythia} ../crmc-aaa.f ../models.F)
target_link_libraries(Phojet CrmcBasic)
ENDIF (__CRMCSTATIC__)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __PHOJET__)
IF (CRMC_STATIC)
add_library(Phojet STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Phojet SHARED ${base_files} ${files})
target_link_libraries(Phojet CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Phojet
RUNTIME DESTINATION bin
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/pythia")
FILE(GLOB files *6.4.*.f)
FILE(GLOB files2 *epos.f)
set_source_files_properties(${files} ${files2} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __PYTHIA__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*epos.f
${CMAKE_CURRENT_BINARY_DIR}/*6.4.*.f)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __PYTHIA__)
IF (__CRMCSTATIC__)
add_library(Pythia STATIC ${files} ${files2} ../crmc-aaa.f ../models.F)
ELSE (__CRMCSTATIC__)
add_library(Pythia SHARED ${files} ${files2} ../crmc-aaa.f ../models.F)
target_link_libraries(Pythia CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Pythia STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Pythia SHARED ${base_files} ${files})
target_link_libraries(Pythia CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Pythia
......
C -*- mode: Fortran -*-
C*********************************************************************
C*********************************************************************
C* **
......@@ -2692,7 +2693,7 @@ C...Commonblocks.
COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
SAVE /PYJETS/,/PYDAT1/,/PYDAT2/
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -17084,7 +17085,7 @@ C...PYTHIA commonblocks.
COMMON/PYINT1/MINT(400),VINT(400)
SAVE /PYJETS/,/PYPARS/,/PYINT1/
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -75904,7 +75905,7 @@ C...Parameter statement to help give large particle numbers.
&KEXCIT=4000000,KDIMEN=5000000)
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -81303,7 +81304,7 @@ C... = 1 : abort generation of current event and move to next.
SUBROUTINE UPVETO(IVETO)
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -1935,7 +1935,7 @@ C...Commonblocks.
COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
SAVE /PYJETS/,/PYDAT1/,/PYDAT2/
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
ctp -*- mode: Fortran -*-
ctp Last modification by T. Pierog 07/2003
ctp change to run with nexus : random number generato (PYR) commented
ctp change common pyjets size : 4000 -> 9990
......@@ -2396,7 +2397,7 @@ C...Commonblocks.
COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
SAVE /PYJETS/,/PYDAT1/,/PYDAT2/
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
......@@ -54616,7 +54617,7 @@ C...Parameter statement to help give large particle numbers.
&KEXCIT=4000000,KDIMEN=5000000)
C...HEPEVT commonblock.
PARAMETER (NMXHEP=HEPEVT_SIZE_REPLACE)
PARAMETER (NMXHEP=@HepMC_HEPEVT_SIZE@)
COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
&JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
DOUBLE PRECISION PHEP,VHEP
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/qgsjet")
FILE(GLOB files *.f)
set_source_files_properties( ${files} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __QGSJET01__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f)
set_source_files_properties( ${base_files} PROPERTIES COMPILE_DEFINITIONS __QGSJET01__)
IF (__CRMCSTATIC__)
add_library(Qgsjet01 STATIC ${files})
ELSE (__CRMCSTATIC__)
add_library(Qgsjet01 SHARED ${files} ../crmc-aaa.f ../models.F)
target_link_libraries(Qgsjet01 CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(Qgsjet01 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(Qgsjet01 SHARED ${base_files} ${files})
target_link_libraries(Qgsjet01 CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS Qgsjet01
RUNTIME DESTINATION bin
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/qgsjetII-04")
FILE(GLOB files *.f ../lzma-read/*.cc)
set_source_files_properties( ${files} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __QGSJETII04__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f
${CMAKE_SOURCE_DIR}/src/lzma-read/*.cc)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __QGSJETII04__)
IF (__CRMCSTATIC__)
add_library(QgsjetII04 STATIC ${files})
ELSE (__CRMCSTATIC__)
add_library(QgsjetII04 SHARED ${files} ../crmc-aaa.f ../models.F)
target_link_libraries(QgsjetII04 CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(QgsjetII04 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(QgsjetII04 SHARED ${base_files} ${files})
target_link_libraries(QgsjetII04 CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS QgsjetII04
......
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/qgsjetII")
FILE(GLOB files *.f ../lzma-read/*.cc)
set_source_files_properties( ${files} ../crmc-aaa.f ../models.F PROPERTIES COMPILE_FLAGS "-D __QGSJETII03__")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB files
${CMAKE_CURRENT_SOURCE_DIR}/*.f
${CMAKE_CURRENT_BINARY_DIR}/*.f
${CMAKE_SOURCE_DIR}/src/lzma-read/*.cc)
set_source_files_properties(${base_files} PROPERTIES COMPILE_DEFINITIONS __QGSJETII03__)
IF (__CRMCSTATIC__)
add_library(QgsjetII03 STATIC ${files})
ELSE (__CRMCSTATIC__)
add_library(QgsjetII03 SHARED ${files} ../crmc-aaa.f ../models.F)
target_link_libraries(QgsjetII03 CrmcBasic)
ENDIF (__CRMCSTATIC__)
IF (CRMC_STATIC)
add_library(QgsjetII03 STATIC ${files})
ELSE (CRMC_STATIC)
add_library(QgsjetII03 SHARED ${base_files} ${files})
target_link_libraries(QgsjetII03 CrmcBasic)
ENDIF (CRMC_STATIC)
INSTALL (TARGETS QgsjetII03
RUNTIME DESTINATION bin
......