Skip to content

Commit

Permalink
Added cepgen 1.2.1patch1 to standard CMSSW tools
Browse files Browse the repository at this point in the history
- cloned from CLHEP spec-file and bzlib2-toolfile spec-file
- with interfacing libraries for HepMC2 (event output), LHAPDF (partonic photon PDF), and Pythia 6 ("legacy" proton remnant dissociation)
- requires GSL, OpenBLAS, bzlib2
  • Loading branch information
forthommel committed Mar 12, 2024
1 parent 609f61a commit 0449e06
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
33 changes: 33 additions & 0 deletions cepgen-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### RPM external cepgen-toolfile 1.0
Requires: cepgen
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/cepgen.xml
<tool name="cepgen" version="@TOOL_VERSION@">
<info url="https://cepgen.hepforge.org/"/>
<lib name="CepGen"/>
<lib name="CepGenHepMC2"/>
<lib name="CepGenLHAPDF"/>
<lib name="CepGenProcesses"/>
<lib name="CepGenPythia6"/>
<client>
<environment name="CEPGEN_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$CEPGEN_BASE/lib64"/>
<environment name="INCLUDE" default="$CEPGEN_BASE/include"/>
</client>
<runtime name="PATH" value="$CEPGEN_BASE/bin" type="path"/>
<runtime name="CEPGEN_PATH" value="$CEPGEN_BASE/share/CepGen"/>
<use name="gsl"/>
<use name="OpenBLAS"/>
<use name="hepmc"/>
<use name="lhapdf"/>
<use name="pythia6"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
39 changes: 39 additions & 0 deletions cepgen.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### RPM external cepgen 1.2.1patch1_gcc700

Source: https://github.com/cepgen/cepgen/archive/refs/tags/%{realversion}.tar.gz
Patch: cepgen_nopython_noroot

BuildRequires: cmake gmake
Requires: gsl OpenBLAS hepmc lhapdf pythia6 bz2lib zlib xz

%prep
%setup -n %{n}-%{realversion}
%patch -p1

%build
rm -rf ../build
mkdir ../build
cd ../build

export GSL_DIR=${GSL_ROOT}
export OPENBLAS_DIR=${OPENBLAS_ROOT}
export HEPMC_DIR=${HEPMC_ROOT}
export LHAPDF_PATH=${LHAPDF_ROOT}
export PYTHIA6_DIR=${PYTHIA6_ROOT}

cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX:PATH="%i" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${BZ2LIB_ROOT};${ZLIB_ROOT};${XZ_ROOT}"

make %{makeprocesses}

%install
cd ../build
make install

case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
rm -f %i/lib/libCepGen*-[A-Z]*-%realversion.$so

%post
%{relocateConfig}bin/cepgen
15 changes: 15 additions & 0 deletions cepgen_nopython_noroot.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CepGenAddOns/CMakeLists.txt b/CepGenAddOns/CMakeLists.txt
index 27ac884a..9eb9d422 100644
--- a/CepGenAddOns/CMakeLists.txt
+++ b/CepGenAddOns/CMakeLists.txt
@@ -14,10 +14,8 @@ add_subdirectory(PhotosTauolaWrapper)
add_subdirectory(ProMCWrapper)
add_subdirectory(Pythia6Wrapper)
add_subdirectory(Pythia8Wrapper)
-add_subdirectory(PythonWrapper)
add_subdirectory(REvolverWrapper)
add_subdirectory(RivetWrapper)
-add_subdirectory(ROOTWrapper)
add_subdirectory(TopdrawerWrapper)

add_subdirectory(Functionals)
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Requires: starlight-toolfile
Requires: alpgen-toolfile
Requires: boost-toolfile
Requires: bz2lib-toolfile
Requires: cepgen-toolfile
Requires: charybdis-toolfile
Requires: classlib-toolfile
Requires: clhep-toolfile
Expand Down

0 comments on commit 0449e06

Please sign in to comment.