Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25 from usarica/master
Browse files Browse the repository at this point in the history
v2.1.1.b1
  • Loading branch information
usarica authored Sep 30, 2017
2 parents 4e36590 + 76fa5a8 commit 7d8604c
Show file tree
Hide file tree
Showing 12 changed files with 654 additions and 393 deletions.
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
*.pyc
__init__.py

MELA/data/*.tar.gz*
MELA/data/*/*.tar.gz*
MELA/data/*/libmcfm*.so
MELA/data/*/libjhugen*.so
MELA/data/*/libcollier*.so

MELA/src/*.o
MELA/src/*.so
Expand All @@ -13,6 +16,18 @@ MELA/interface/*.o
MELA/interface/*.so
MELA/interface/*.d

MELA/COLLIER/*.o
MELA/COLLIER/*.mod
MELA/COLLIER/*.so
MELA/COLLIER/*/*
MELA/COLLIER/*.f
MELA/COLLIER/*.F
MELA/COLLIER/*.F90
MELA/COLLIER/*.c
MELA/COLLIER/*.cc
MELA/COLLIER/*.h
MELA/COLLIER/*.hh

MELA/fortran/*.o
MELA/fortran/*.mod
MELA/fortran/*.so
Expand All @@ -29,7 +44,8 @@ MELA/test/*.out
MELA/test/*.ref
MELA/test/reference/*.out
MELA/test/*.o
MELA/test/*_c.so
MELA/test/*_c.d
MELA/test/*.a
MELA/test/*.so
MELA/test/*.d
MELA/test/*.pcm

7 changes: 6 additions & 1 deletion MELA/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<flags CPPFLAGS="-I$(CMSSW_BASE)/src/ZZMatrixElement/MELA/interface/" />
<flags CPPDEFINES="_melapkgpathstr_='std::string(std::getenv(xstr_lit(CMSSW_BASE)))+std::string(xstr_lit(/src/ZZMatrixElement/MELA/))'" />
<!--Some magic to retrieve the mcfm library over http, and link it hardcoding its path in the resulting library, so that LD_LIBRARY_PATH is not required. -->
<flags LDFLAGS="-Wl,-rpath=$(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/$(SCRAM_ARCH) $(shell $(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/retrieve.csh $(SCRAM_ARCH) mcfm_704) -L$(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/$(SCRAM_ARCH) -lmcfm_704 -ljhugenmela" />
<flags LDFLAGS="-Wl,-rpath=$(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/$(SCRAM_ARCH) $(shell $(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/retrieve.csh $(SCRAM_ARCH) mcfm_704) -L$(CMSSW_BASE)/src/ZZMatrixElement/MELA/data/$(SCRAM_ARCH) -lmcfm_704 -ljhugenmela -lcollier" />

<use name="f77compiler"/>
<use name="root"/>
Expand All @@ -22,3 +22,8 @@
<lib name="1"/>
<use name="jhugenmela"/> <!--For this to work, one needs to specify mcfm as a scram tool.-->
</export>

<export>
<lib name="1"/>
<use name="collier"/> <!--For this to work, one needs to specify mcfm as a scram tool.-->
</export>
118 changes: 118 additions & 0 deletions MELA/COLLIER/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
MAINDIR = .
AUXDIR = $(MAINDIR)/Aux
COLIDIR = $(MAINDIR)/COLI
TENSORSDIR = $(MAINDIR)/tensors
DDLIBDIR = $(MAINDIR)/DDlib
#MODULES=$(MAINDIR)/modules
#OBJECTS=$(MAINDIR)/objects
MODULES=$(MAINDIR)
OBJECTS=$(MAINDIR)
ROOFITINCLUDE =
RM = /bin/rm
INCLUDE = -I$(MAINDIR) $(ROOFITINCLUDE)
Comp = gfort

ifeq ($(Comp),ifort)
fcomp = ifort -132 -O2-lifcore -fPIC
endif
ifeq ($(Comp),gfort)
fcomp = gfortran -ffixed-line-length-132 -fno-default-integer-8 -fPIC -O2 -funroll-loops -Wtabs
endif

ifeq ($(Comp),gfort)
ccomp = gcc
endif
ifeq ($(Comp),ifort)
ccomp = icc
endif

ifeq ($(Comp),gfort)
clib = -lm -lgfortran
endif
ifeq ($(Comp),ifort)
clib = -lm -lirc
endif


LIB = libcollier.so

Deps = $(MAINDIR)/collier_global.F90 \
$(AUXDIR)/Combinatorics.F90 \
$(AUXDIR)/master.F90 \
$(COLIDIR)/coli_aux2.F90 \
$(COLIDIR)/coli_stat.F90 \
$(MAINDIR)/collier_aux.F90 \
$(AUXDIR)/cache.F90 \
$(TENSORSDIR)/InitTensors.F90 \
$(MAINDIR)/collier_init.F90 \
$(COLIDIR)/reductionAB.F90 \
$(COLIDIR)/reductionC.F90 \
$(COLIDIR)/reductionD.F90 \
$(COLIDIR)/reductionEFG.F90 \
$(COLIDIR)/reductionTN.F90 \
$(MAINDIR)/collier_coefs.F90 \
$(TENSORSDIR)/BuildTensors.F90 \
$(TENSORSDIR)/TensorReduction.F90 \
$(MAINDIR)/collier_tensors.F90 \
$(DDLIBDIR)/DD_global.F90 \
$(MAINDIR)/COLLIER.F90 \
$(COLIDIR)/coli_b0.F \
$(COLIDIR)/coli_d0.F \
$(COLIDIR)/coli_d0reg.F \
$(COLIDIR)/coli_aux.F \
$(COLIDIR)/coli_c0.F \
$(DDLIBDIR)/DD_aux.F \
$(DDLIBDIR)/DD_5pt.F \
$(DDLIBDIR)/DD_6pt.F \
$(DDLIBDIR)/DD_3pt.F \
$(DDLIBDIR)/DD_to_COLLIER.F \
$(DDLIBDIR)/DD_2pt.F

Objs = collier_global.o \
Aux_Combinatorics.o \
Aux_master.o \
COLI_coli_aux2.o \
COLI_coli_stat.o \
collier_aux.o \
Aux_cache.o \
tensors_InitTensors.o \
collier_init.o \
COLI_reductionAB.o \
COLI_reductionC.o \
COLI_reductionD.o \
COLI_reductionEFG.o \
COLI_reductionTN.o \
collier_coefs.o \
tensors_BuildTensors.o \
tensors_TensorReduction.o \
collier_tensors.o \
DDlib_DD_global.o \
COLLIER.o \
COLI_coli_b0.o \
COLI_coli_d0.o \
COLI_coli_d0reg.o \
COLI_coli_aux.o \
COLI_coli_c0.o \
DDlib_DD_aux.o \
DDlib_DD_5pt.o \
DDlib_DD_6pt.o \
DDlib_DD_3pt.o \
DDlib_DD_to_COLLIER.o \
DDlib_DD_2pt.o


${Objs}: $(Deps)
@echo " "
@echo " Compiling COLLIER dependencies"
$(fcomp) -c $(Deps)
@echo " "
@echo " Compiling COLLIER library"
g++ -Wl,-soname,$(LIB) -shared -o $(LIB) *.o

clean:
@echo " deleting object files"
rm -f *.so $(OBJECTS)/*.o $(MODULES)/*.mod


# supresses command calls
.SILENT:
49 changes: 49 additions & 0 deletions MELA/COLLIER/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

{

scriptdir=$(dirname $0)
curdir=$(pwd)

cd $scriptdir

pkgname="collier-1.2"
pkgdir="COLLIER-1.2"
tarname=$pkgname".tar.gz"
tarweb="https://www.hepforge.org/archive/collier/"$tarname
libname="libcollier.so"
tmpdir="colliertmp"

if [[ $# > 0 ]] && [[ "$1" == *"clean"* ]];then

rm -f *.so
rm -f *.o
rm -f *.mod
rm -f *.f
rm -f *.F
rm -f *.F90
for f in $(ls ./);do
if [ -d $f ];then
rm -rf $f
fi
done

rm -f "../data/"$SCRAM_ARCH"/"$libname

else

wget $tarweb
mkdir $tmpdir
tar -xvzf $tarname -C $tmpdir
rm $tarname
mv $tmpdir"/"$pkgdir"/src/"* ./
rm -rf $tmpdir

make
mv $libname "../data/"$SCRAM_ARCH"/"$libname

fi

cd $curdir

}
30 changes: 22 additions & 8 deletions MELA/fortran/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ all:
false
else

CMSROOT = ./
#MODULES=$(CMSROOT)modules/
#OBJECTS=$(CMSROOT)objects/
MODULES=$(CMSROOT)
OBJECTS=$(CMSROOT)
MAINDIR = ./
#MODULES=$(MAINDIR)modules/
#OBJECTS=$(MAINDIR)objects/
MODULES=$(MAINDIR)
OBJECTS=$(MAINDIR)
ROOFITINCLUDE =
RM = /bin/rm
INCLUDE = -I$(CMSROOT) $(ROOFITINCLUDE)
INCLUDE = -I$(MAINDIR) $(ROOFITINCLUDE)
Comp = gfort

# Linking LHAPDF
Expand All @@ -28,12 +28,26 @@ else
LHAPDFflags = -DuseLHAPDF=0
endif

# Linking the Collier library
UseCOLLIER=Yes
# directory which contains libLHAPDF.a, libLHAPDF.la, libLHAPDF.so
MyCOLLIERDir=../data/${SCRAM_ARCH}/
MyCOLLIERInc=../COLLIER/
# remember to export
# LD_LIBRARY_PATH=/.../LHAPDF-x.y.z/lib/:${LD_LIBRARY_PATH}
# LHAPDF_DATA_PATH=/.../LHAPDF-x.y.z/share/LHAPDF/:${LHAPDF_DATA_PATH}
ifeq ($(UseCOLLIER),Yes)
COLLIERflags = -L$(MyCOLLIERDir) -lcollier -DuseCollier=1 -I$(MyCOLLIERInc)
else
COLLIERflags = -DuseCollier=0
endif


ifeq ($(Comp),ifort)
fcomp = ifort -fpp -O2 -vec-report0 -Dcompiler=1 -lifcore -fPIC
fcomp = ifort -fpp -O2 -vec-report0 -Dcompiler=1 -lifcore $(LHAPDFflags) $(COLLIERflags) -fPIC
endif
ifeq ($(Comp),gfort)
fcomp = gfortran -O0 -ffree-line-length-none -Dcompiler=2 $(LHAPDFflags) -fno-automatic -fno-f2c -fPIC -g
fcomp = gfortran -O0 -ffree-line-length-none -Dcompiler=2 $(LHAPDFflags) $(COLLIERflags) -fno-automatic -fno-f2c -fPIC -g
endif

ifeq ($(Comp),gfort)
Expand Down
10 changes: 9 additions & 1 deletion MELA/fortran/mod_JHUGen.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SUBROUTINE InitFirstTime(pdftable,pdfstrlength,pdfmember)

includeInterference=.true.
includeGammaStar=.true.
MPhotonCutoff=4d0*GeV
WidthScheme=0
PDFSet=3 ! 1: CTEQ6L1 2: MRSW with best fit, 2xx: MSTW with eigenvector set xx=01..40
LHAPDFString = pdftable
Expand Down Expand Up @@ -81,6 +82,13 @@ SUBROUTINE InitFirstTime(pdftable,pdfstrlength,pdfmember)
print *,"Collider not implemented."
stop
ENDIF

#if useCollier==1
Collier_maxNLoopProps = -1
Collier_maxRank = -1
#endif
call InitCOLLIER(4,3) ! Arguments for ggZH

return

END SUBROUTINE
Expand Down Expand Up @@ -175,7 +183,7 @@ SUBROUTINE InitPDFs()
implicit none
DOUBLE PRECISION alphasPDF

call InitPDFset(trim(LHAPDFString,lenLHAPDFString)) ! Let LHAPDF handle everything
call InitPDFSetByName(trim(LHAPDFString,lenLHAPDFString)) ! Let LHAPDF handle everything
call InitPDF(LHAPDFMember)

alphas_mz=alphasPDF(zmass_pdf)
Expand Down
Loading

0 comments on commit 7d8604c

Please sign in to comment.