]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8170/README.HepMC
Ch. jets in pPb: Minor improvements
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8170 / README.HepMC
CommitLineData
63ba5337 1How to install HepMC on your laptop (Linux/Mac OSX) and link to Pythia
2
3Here are two alternative recipes, one simpler with a more recent version
4and one more flexible with an older one.
5Note: This comes with no guarantee; it is what worked for me.
6Other combinations should also work, but have not been tried.
7
8------------------------------------------------------------------------
9
10Alternative A, with HepMC 2.06.08.
11
121) Create a directory where you want to do the installation, e.g.
13 mkdir hepmc
14and move to it
15 cd hepmc
16
172) Open
18 http://lcgapp.cern.ch/project/simu/HepMC/download
19in a browser, scroll down to "HepMC 2.06.08" and pick the version relevant
20for your platform from the list to the right. If there is no match, you
21have to go for Alternative B below.
22
233) In the pop-up menu pick "Save to file" and then the above hepmc directory.
24You should now have the appropriate version in that directory,
25e.g. HepMC-2.06.08-x86_64-mac106-gcc42-opt.tar.gz on a current Mac.
26
274) Unpack with
28 tar -xzf file.tar.gz
29with "file" the name of the downloaded file. This will create a new directory,
30e.g. x86_64-mac106-gcc42-opt/, where ready-to-use libraries can be found.
31
325) Now move to your pythia8160 (or later) directory and configure with
33 ./configure --with-hepmc=mypath/hepmc/newdir --with-hepmcversion=2.06.08
34 where "mypath" is the absolute path to the hepmc directory (use pwd if
35 in doubt) and "newdir" is the name of the new directory created in step 4.
36 (Re)compile with "make" (or "gmake") as usual.
37
386) Move to the examples subdirectory and do
39 source config.sh
40 source config.csh
41Only one of them will work, depending on which shell you use, but the other
42should be harmless.
43
447) You should now be able to make and run e.g. main41 to produce HepMC
45output files.
46
47------------------------------------------------------------------------
48
49Alternative B, with HepMC 2.04.02.
50
511) Create a directory where you want to do the installation, e.g.
52 mkdir hepmc
53and move to it
54 cd hepmc
55
562) Open
57 http://lcgapp.cern.ch/project/simu/HepMC/download
58in a browser, scroll down to "HepMC 2.04.02" and
59click on "source" rightmost on the line below.
60
613) In the pop-up menu pick "Save to file" and then the above hepmc directory.
62You should now have a file "HepMC-2.04.02.tar.gz" in that directory.
63
644) Unpack with
65 tar -xzf HepMC-2.04.02.tar.gz
66
675) Create two new subdirectories
68 mkdir build install
69and move to build
70 cd build
71
726) Configure the compilation with
73 ../HepMC-2.04.02/configure -prefix=mypath/hepmc/install -with-momentum=GEV -with-length=MM
74all on one line, where "mypath" is the absolute path to the hepmc directory
75(use pwd if in doubt).
76
777) Compile and install with
78 make
79 make check
80 make install
81which takes a minute or two and an amount of output.
82
838) Now move to your pythia8160 (or later) directory and configure with
84 ./configure --with-hepmc=mypath/hepmc/install --with-hepmcversion=2.04.02
85 (Re)compile with "make" (or "gmake") as usual.
86
879) Move to the examples subdirectory and do
88 source config.sh
89 source config.csh
90Only one of them will work, depending on which shell you use, but the other
91should be harmless.
92
9310) You should now be able to make and run e.g. main41 to produce HepMC
94output files (you can ignore compilation warnings about variables being
95shadowed; this is harmless).
96
97NOTE: HepMC 2.04 allows you to set the units of the event record,
98i.e. to ensure that the Pythia default choice of GeV and mm (with c = 1)
99is propagated to the HepMC event record. This feature is not available
100in 2.03. The two test programs main31 and main32 therefore come with
101the Units code commented out, but with instructions how to restore it.