]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8145/README.HepMC
Coverity fixes
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8145 / README.HepMC
CommitLineData
9419eeef 1How to install HepMC on your laptop (Linux/Mac OSX) and link to Pythia
2
3Note 1: Comes with no guarantee; this is what worked for me.
4Note 2: refers to HepMC 2.04.02 and Pythia 8.125 as of June 2009,
5 but should work also for later versions.
6
71) Create a directory where you want to do the installation, e.g.
8 mkdir hepmc
9and move to it
10 cd hepmc
11
122) Open
13 http://lcgapp.cern.ch/project/simu/HepMC/download
14in a browser, scroll down to "HepMC 2.04.02" and
15click on "source" rightmost on the line below.
16
173) In the pop-up menu pick "Save to file" and then the above hepmc directory.
18You should now have a file "HepMC-2.04.02.tar.gz" in that directory.
19
204) Unpack with
21 tar -xzf HepMC-2.04.02.tar.gz
22
235) Create two new subdirectories
24 mkdir build install
25and move to build
26 cd build
27
286) Configure the compilation with
29 ../HepMC-2.04.02/configure -prefix=mypath/hepmc/install -with-momentum=GEV -with-length=MM
30all on one line, where "mypath" is the absolute path to the hepmc directory
31(use pwd if in doubt)
32
337) Compile and install with
34 make
35 make check
36 make install
37which takes a minute or two and an amount of output.
38
398) 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.
42
439) Move to the examples subdirectory and do
44 source config.sh
45 source config.csh
46Only one of them will work, depending on which shell you use, but the other
47should be harmless
48
4910) You should now be able to make and run e.g. main32 to produce HepMC
50output files (you can ignore compilation warnings about variables being
51shadowed; this is harmless)
52
53NOTE: HepMC 2.04 allows you to set the units of the event record,
54i.e. to ensure that the Pythia default choice of GeV and mm (with c = 1)
55is propagated to the HepMC event record. This feature is not available
56in 2.03. The two test programs main31 and main32 therefore come with
57the Units code commented out, but with instructions how to restore it.