]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8145/README.HepMC
Warnings corrected.
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8145 / README.HepMC
1 How to install HepMC on your laptop (Linux/Mac OSX) and link to Pythia
2
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.
6
7 1) Create a directory where you want to do the installation, e.g.
8      mkdir hepmc
9 and move to it
10      cd hepmc
11
12 2) Open
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.
16
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.
19
20 4) Unpack with
21     tar -xzf HepMC-2.04.02.tar.gz
22
23 5) Create two new subdirectories
24     mkdir build install
25 and move to build
26     cd build
27   
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 
31 (use pwd if in doubt)  
32
33 7) Compile and install with
34      make
35      make check
36      make install
37 which takes a minute or two and an amount of output. 
38
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.
42
43 9) Move to the examples subdirectory and do
44      source config.sh
45      source config.csh
46 Only one of them will work, depending on which shell you use, but the other
47 should be harmless
48
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)
52
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.