1 How to install HepMC on your laptop (Linux/Mac OSX) and link to Pythia
3 Note 1: Comes with no guarantee; this is what worked for me.
4 Note 2: refers to HepMC 2.04.02 and Pythia 8.125 as of June 2009,
5 but should work also for later versions.
7 1) Create a directory where you want to do the installation, e.g.
13 http://lcgapp.cern.ch/project/simu/HepMC/download
14 in a browser, scroll down to "HepMC 2.04.02" and
15 click on "source" rightmost on the line below.
17 3) In the pop-up menu pick "Save to file" and then the above hepmc directory.
18 You should now have a file "HepMC-2.04.02.tar.gz" in that directory.
21 tar -xzf HepMC-2.04.02.tar.gz
23 5) Create two new subdirectories
28 6) Configure the compilation with
29 ../HepMC-2.04.02/configure -prefix=mypath/hepmc/install -with-momentum=GEV -with-length=MM
30 all on one line, where "mypath" is the absolute path to the hepmc directory
33 7) Compile and install with
37 which takes a minute or two and an amount of output.
39 8) Now move to your pythia8125 (or later) directory and configure with
40 ./configure --with-hepmc=mypath/hepmc/install --with-hepmcversion=2.04.02
41 (Re)compile with "make" (or "gmake") as usual.
43 9) Move to the examples subdirectory and do
46 Only one of them will work, depending on which shell you use, but the other
49 10) You should now be able to make and run e.g. main32 to produce HepMC
50 output files (you can ignore compilation warnings about variables being
51 shadowed; this is harmless)
53 NOTE: HepMC 2.04 allows you to set the units of the event record,
54 i.e. to ensure that the Pythia default choice of GeV and mm (with c = 1)
55 is propagated to the HepMC event record. This feature is not available
56 in 2.03. The two test programs main31 and main32 therefore come with
57 the Units code commented out, but with instructions how to restore it.