TWiki> Main Web>TWikiUsers>SergioGonzalez>McSoftware (revision 6)EditAttachPDF

LHAPDF (OSX 10.6.7)

  • download from
  • gfortran is needed:
  • run configure: ./configure --enable-low-memory --disable-pyext --prefix=a_path CC=/sw/bin/gcc-4 CXX=/sw/bin/g++-4 FC=/sw/bin/gfortran
    • even if with different versions of gcc/g++ with respect to gfortran the compilation succeeded (CC=/usr/bin/gcc-4.2 CXX=/usr/bin/g++-4.2 FC=/usr/local/bin/gfortran=) , I decided to use coherent binaries overall because the compilation of Whizard with /usr/local/bin/gfortran (4.5.1 20100506 (prerelease)) failed but not with /sw/bin/gfortran (4.5.0)... even using same compiler flags... no idea why...
    • where for a_path I've chosen /Users/sevilla/software/lhapdf/lhapdf-5.8.5
    • Because of the increasing numbers and complexity of new PDFs, from version 5.7.0 onwards the memory requirement declared by LHAPDF has exceeded 1GB!. A solution is to build LHAPDF in the "low memory" mode by specifying the --enable-low-memory option at configuration.
    • the --disable-pyext allows to avoid some compilation errors (unrecognized command line option "-Wno-long-double")
  • do make followed by make install.
  • optionally do make check, but if no PDF data files have been installed yet, it will fail the test. Also note it will look for data sets within share/lhapdf/PDFsets. The environment variable LHAPATH can be used to specify an alternative location.

How to install PDF sets

Due to the increasing number and size of PDF data files, LHAPDF no longer bundles PDF set data in the package tarball. The sets are instead all stored online at and you should install those that you wish to use into /Users/sevilla/software/lhapdf/lhapdf-5.8.5/share/lhapdf. The lhapdf-getdata script helps to automate the set download and installation process: before installation you will find it in the bin directory. Alternatively, download the sets by hand from the URL given above, and place them in the PDF sets directory.
export PATH=/Users/sevilla/software/lhapdf/lhapdf-5.8.5/bin/:${PATH}
cd /Users/sevilla/software/lhapdf/lhapdf-5.8.5/share/lhapdf/PDFsets
lhapdf-getdata cteq5l.LHgrid
lhapdf-getdata cteq61.LHgrid
lhapdf-getdata cteq61.LHpdf
lhapdf-getdata cteq6ll.LHpdf
lhapdf-getdata MRST2004nlo.LHgrid
lhapdf-getdata GSG961.LHgrid

HepMC (OSX 10.6.7)

Whizard installation (OSX 10.6.7)

Whizard 2.0.5

Tip, idea if O'CAML, LHAPDF are installed in non-standard places, need to specify the appropriate env variables. Example:

export OCAML=/home/sevilla/software/ocaml/ocaml-3.12.1-i686
export PATH=${OCAML}/bin:${PATH}
export LHAPDF_LIB=/afs/


  • After registering, download comphep-4.5.1.tgz from
  • untar into /Users/sevilla/software/comphep/comphep-4.5.1
  • ./configure --with-gcc4
    • could not compile with option --with-lhapdf nor --with-root, so remove the flags...
  • change contents of file CC from gcc to gcc-4
  • change contents of file FORLIBS from -lgfortran -lgcc to -L/sw/lib/gcc4.5/lib -lgfortran -lgcc
  • edit /Users/sevilla/software/comphep/comphep-4.5.1/Makefile and add at the beginning CXX=g++-4
  • make
  • if the building went ok, one should see at the end:
    * Binaries for CompHEP-4.5.1 has been successfully prepared *
    *                                                                *
    *      Create a user working directory using the command         *
    *         make setup WDIR=path_to_your_user_work_dir             *
    *  Note 1: Do not use '~' to refer to you home directory         *
    *          Use the environment variable HOME                     *
  • make setup
  • cd ~/software/comphep/comphep_4.5.1_test
  • ./comphep


status codes

  • 0 : an empty entry, with no meaningful information and therefore to be skipped unconditionally
  • 1 : a final-state particle, i.e. a particle that is not decayed further by the generator (may also include unstable particles that are to be decayed later, as part of the detector simulation). Such particles must always be labelled '1'.
  • 2: a decayed Standard Model hadron or tau or mu lepton, excepting virtual intermediate states thereof (i.e. the particle must undergo a normal decay, not e.g. a shower branching). Such particles must always be labelled '2'. No other particles can be labelled '2'.
  • 3 : a documentation entry
  • 4 : an incoming beam particle
  • 11 - 200 : an intermediate (decayed/branched/...) particle that does not fulfill the criteria of status code 2, with a generator-dependent classification of its nature

D3PD variables

  • D3PDContentMcTruthBlock
    • mc_parents: barcode of parents
    • mc_children: barcode of children
    • mc_parents_index: index of parents
    • mc_child_index: index of children

-- SergioGonzalez - 25-Nov-2011

Edit | Attach | Watch | Print version | History: r10 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2013-03-26 - SergioGonzalez
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback