Skip to content

Instantly share code, notes, and snippets.

@lmoureaux
Last active November 23, 2018 11:10
Show Gist options
  • Save lmoureaux/342b3dfb050663d173ec9a0b24f75cb9 to your computer and use it in GitHub Desktop.
Save lmoureaux/342b3dfb050663d173ec9a0b24f75cb9 to your computer and use it in GitHub Desktop.

Get a CMSSW environment

TMDlib

Download the stuff (adapt to your version)

wget https://tmdlib.hepforge.org/downloads/?f=tmdlib-1.0.7.tar.gz

Unpack it

tar -xzf tmdlib-1.0.7.tar.gz

Create installation directory

mkdir install

Configure

cd tmdlib-1.0.7
./configure --prefix=$(readlink -f ../install/) --with-lhapdf=$(readlink -f $LHAPDF_DATA_PATH/..)

You may get many warnings

Build

make

Install

make install

You're done! Pay attention to the output of make install for how to use the library

Katie

Download stuff at the following pages

There's also a zip with TMDlib grid files that we got but was removed

Unzip all the zip files.

Configure the software

cd hameren-katie-bb490399c5b4/

Modify paths in the settings file (you need the absolute path for avhlib and TMDlib):

vim settings.py

to

# Path to the AVHLIB directory
AVHLIBpath = '/storage_mnt/storage/user/lmoureau/tmdlib/hameren-avhlib-0f34e76d465e/'

# Path to the directory where libLHAPDF.a (or libLHAPDF.so) is
LHAPDFpath = '/cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/lhapdf/6.1.6-giojec7/lib'

# Fortran compiler with flags
FC = 'gfortran -fcheck=bounds'

# Optional paths if you have TMDlib avialable and want to use it:
#
# Path to the directory where libTMDlib.a (or libTMDlib.so) is
TMDLIBpath = '/storage_mnt/storage/user/lmoureau/tmdlib/install/lib'
#
# Path to the directory where libgsl.a (or libgsl.so) is
#GSLpath = '/usr/lib'

Run

./config.py lib

Start running...

Create FIFO

export HEPMCOUT=/tmp/$(whoami)-mypfile.hepmc
mkfifo $HEPMCOUT
./work.sh pp_to_Zjj work-pp2Zjj
cd work-pp2Zjj
vim input

Comment out

include file = incl_d.dat

Important settings:

  • Nflavors: Number of active quark flavours
  • switch flags: withQCD, withQED, withWeak
  • pNonQCD: couplings for non-QCD processes
  • lhaSet: LHAPDF PDF set
  • TMDlibSet: TMDlib set (disabled for the tutorial, using tmdTableDir instead)
  • tmdTableDir and tmdpdf: Let Katie do the interpolation itself from TMD tables. We used the ones we downloaded from Bitbucket. I have them at /storage_mnt/storage/user/lmoureau/tmdlib/hameren-pdfgrids-9b7ccde45f4f/MRW-CT10nlo/
  • offshell: (didn't understand why you can have off-shell ISP)
  • Ecm: Center-of-mass energy
  • cut: Cuts, see docs in the file. In our example 1 and 2 are initial state, 3 and 4 are final state partons. It's even possible to set up asymmetric cuts
  • scale: Process scale
  • Noptim: Could be that we need to increase this if the uncertainty is too large

Prepare for run

We need to compile something again. There's a script for that.

./run.sh prepare input Run01

where Run01 is the target directory that will be created.

Then we go to Run01:

cd Run01

There's an optimization step to run first:

./optimize.sh Nparallel=4

And we can finally generate events:

./main.out seed=82347

Create LHE file:

cd ..
./run.sh lhef Run01/raw82347.dat

(note: may need to set LD_LIBRARY_PATH for TMDlib)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment