-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_started.html
487 lines (440 loc) · 25.9 KB
/
get_started.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<!--#include FILE="./header.inc"-->
<body>
<!--#include FILE="./navigation.inc"-->
<div id="MainIn2ColumnPage">
<div CLASS="clsInsidePageHeader"> Get started with the GENIE/Generator </div>
<br />
This page includes a basic descriptions of the steps required to obtain the GENIE/Generator source code
(and the required 3rd party software packages),
configure it, build it, and run a few simple post-installation tests. For more details, please see the
<A href="https://genie-docdb.pp.rl.ac.uk/cgi-bin/ShowDocument?docid=2">GENIE Physics & User manual</A>.
Please report any problems to the authors.
<br />
<br />
<div id="InsidePageSectionHeader">
Obtaining the GENIE/Generator source code
</div>
<div id="InsidePageSectionBody">
You can obtain the GENIE/Generator source code from its official repository in the <A href="https://github.com/GENIE-MC">GENIE GitHub organization</A>.
Detailed instructions are provided in the GENIE GitHub page.
For example, to obtain the GENIE trunk (master) version, type:
<br />
<br />
<div id="terminal">
<b>shell%</b> git clone https://github.com/GENIE-MC/Generator.git
</div>
</div>
<br />
<div id="InsidePageSectionHeader">
Third-party software packages
</div>
<div id="InsidePageSectionBody">
This section contains information for building 3rd party (external) software used by GENIE.
If you encounter problems building the 3rd party software please contact the
package authors or your local system administrators.
<br />
<br />
For a typical GENIE installation you need:
<br />
<UL>
<LI> <A href="http://root.cern.ch" target="_top">
ROOT</A>
<LI> <A href="http://www.gnu.org/software/gsl/" target="_top">
GNU Scientific Library (GSL)</A>
<LI> <A href="http://www.thep.lu.se/~torbjorn/Pythia.html" target="_top">
PYTHIA6</A>
<LI> <A href="http://projects.hepforge.org/lhapdf/" target="_top">
LHAPDF5 or LHAPDF6 </A> [Both of which are optional in GENIE v3.0.0 and above]
<LI> <A href="http://sourceforge.net/projects/log4cpp" target="_top">
log4cpp</A>
<LI> <A href="http://www.xmlsoft.org" target="_top">
libxml2</A>
</UL>
</div>
<br />
<div id="InsidePageSectionHeader">
Installation of external packages in UNIX (incl. LINUX, MAC OS X)
</div>
<div id="InsidePageSectionBody">
<br />
<div id="InsidePageSubSectionHeader">
<B> log4cpp </B>
</div>
<div id="InsidePageSubSectionBody">
<b>Description:</b> Message/Error logging library for C++
<br />
<b>Recommended version:</b>
<br />
<b>Web-site:</b>
<A href="http://sourceforge.net/projects/log4cpp" target="_top">
http://sourceforge.net/projects/log4cpp</A>
<br />
<br />
<b>Installing development version from source: </b>
<br />
Get the source code from the sourceforge.net CVS repository:
<DIV id="terminal">
<b>shell$</b> cd /your/software/area/
<br />
<b>shell$</b> cvs -d :pserver:anonymous@log4cpp.cvs.sourceforge.net:/cvsroot/log4cpp login
<br />
<I>(passwd: just press enter)</I>
<br />
<b>shell$</b> cvs -d :pserver:anonymous@log4cpp.cvs.sourceforge.net:/cvsroot/log4cpp -z3 co log4cpp
<br />
<b>shell$</b> cd log4cpp
<BR>
<b>shell$</b> ./autogen.sh
<BR>
<b>shell$</b> ./configure --prefix=[location]
<BR>
<b>shell$</b> gmake
<BR>
<b>shell$</b> gmake install
</DIV>
<br />
<div id="InstSubSectionNotes">
<b>Notes:</b>
<br />
- log4cpp may already exist in your system (look for a liblog4cpp library)
<br />
- Precompiled binaries are also readily available on LINUX (eg using yum: `yum install log4cpp')
and MAC OS X (eg. using DarwinPorts: `sudo port install log4cpp').
</div>
</div>
<br />
<div id="InsidePageSubSectionHeader">
<B> libxml2 </B>
</div>
<div id="InsidePageSubSectionBody">
<b>Description:</b> XML parser.
<br />
<b>Recommended version:</b> any reasonably new
<br />
<b>Web-site:</B>
<A href="http://www.xmlsoft.org" target="_top"> http://www.xmlsoft.org</A>
<br />
<br />
<b>Installing development version from source:</b>
<br />
<DIV id="terminal">
<b>shell$</b> cd /your/software/area/
<br />
<b>shell$</b> svn co https://svn.gnome.org/svn/libxml2/trunk libxml2
<BR>
<b>shell$</b> cd libxml2
<BR>
<b>shell$</b> ./autogen.sh --prefix=[location]
<BR>
<b>shell$</b> gmake
<BR>
<b>shell$</b> gmake install
</DIV>
<br />
<b>Notes:</b>
<br />
- libxml2 is most likely already installed at your system (look for a libxml2 library)
<br />
- Precompiled binaries are also readily available on LINUX (eg using yum: `yum install libxml2')
and MAC OS X (eg. using DarwinPorts: `sudo port install libxml2').
</div>
<br />
<div id="InsidePageSubSectionHeader">
<B> LHAPDF </B>
</div>
<div id="InsidePageSubSectionBody">
<b>Description:</b> The Les Houches Accord PDF Interface
<br />
<b>Recommended version:</b> Optional in v3.0.0 and above
<br />
<b>Web-site:</b> <A href="http://projects.hepforge.org/lhapdf/" target="_top">
http://projects.hepforge.org/lhapdf/</A>
<br />
<br />
<b>Installing version x.y.z from source:</b>
<br />
<DIV id="terminal">
<b>shell$</b> cd /your/software/area/
<br />
<b>shell$</b> wget http://www.hepforge.org/archive/lhapdf/lhapdf-<i>x.y.z</i>.tar.gz
<br />
<b>shell$</b> tar xzvf lhapdf-<i>x.y.z</i>.tar.gz
<br />
<b>shell$</b> cd lhapdf
<br />
<b>shell$</b> ./configure --prefix=[location]
<br />
<b>shell$</b> gmake
<br />
<b>shell$</b> gmake install
<br />
</DIV>
</div>
<br />
<div id="InsidePageSubSectionHeader">
<B> PYTHIA6 and ROOT/PYTHIA thin wrapper library </B>
</div>
<div id="InsidePageSubSectionBody">
<b>Description:</b> LUND Monte Carlo (used by GENIE for hadronizing the high-W fraction of neutrino events)
<br />
<b>Recommended version:</b>
Do not use the precompiled PYTHIA version that comes with CERNLIB.
<br />
<b>Web-site:</b>
<A href="http://www.thep.lu.se/~torbjorn/Pythia.html" target="_top">
http://www.thep.lu.se/~torbjorn/Pythia.html </A>
<br />
<br />
<b>Installing from source:</b>
<br />
There is a number of steps in order to build PYTHIA for GENIE.
Downloading, tweaking and building PYTHIA is automated using Robert Hatcher's
<A href="https://github.com/GENIE-MC/Generator/tree/master/src/scripts/build/ext/build_pythia6.sh">build_pythia6.sh</i></A> script.
Please read the script documentation.
It would download all the required source files, modify them as needed and build them. So you only need to do:
<br />
<DIV id="terminal">
<b>shell$</b> cd /your/software/area/
<br />
<b>shell$</b> source build_pythia6.sh
<br />
</DIV>
<br />
<div id="InsidePageSubSectionNotes">
<B>Notes:</B>
<br />
- build_pythia6.shneeds to access the internet to download the source code. If you access the internet through a proxy
server and not directly then remember to set the <b>http_proxy</b> environmental variable.
<br />
- build_pythia6.sh accepts a PYTHIA6 version as an argument.
For example, in order to build v6.4.12 then type: `source build_pythia6.sh 6412'.
Read the script documentation for details.
<br />
- If you are using a recent version of ROOT and have problems with undefined pytune_ symbols, then move to a recent version of PYTHIA6.
</div>
</div>
<br />
<div id="InsidePageSubSectionHeader">
<B> ROOT Class Libraries </B>
</div>
<div id="InsidePageSubSectionBody">
<b>Recommended version:</b> Please get a recent ROOT6 version. ROOT5 should still work but is no longer supported by GENIE.
<br />
<b>Web-site:</b>
<A href="http://root.cern.ch" target="_top"> http://root.cern.ch</A>
<br />
<br />
Detailed installation instructions are given in
<A href="http://root.cern.ch/root/Install.html" target="_top">http://root.cern.ch/root/Install.html</A>
<br />
<br />
For a standard GENIE installation the only extra ROOT configuration options you need are the ones
required for enabling GSL (via MathMore) and the ROOT/PYTHIA interface.
When configuring ROOT, add:
`<b>--enable-pythia6</b>', `<b>--enable-mathmore</b>' and
`<b>--with-pythia6-libdir=</b>/path/to/pythia/lib'
<br />
</div>
</div>
<br />
<div id="InsidePageSectionHeader">
Configuring and building GENIE
</div>
<div id="InsidePageSectionBody">
If all external dependencies are installed, then in order to configure and build GENIE you just need to:
<br />
<div id="terminal">
<b>shell%</b> configure [options] <br />
<b>shell%</b> gmake <br />
<b>shell%</b> gmake install <i>(*optional*, see below)</i> <br />
</div>
<br />
<table border="0" cellpadding="1" cellspacing="2">
<tr CLASS="clsConfigureTableBody"> <td> FLAG </td><td> DESCRIPTION </td><td> DEFAULT </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>--prefix</b> </td><td> installation location (for 'gmake install') </td><td> /usr/local </td></tr>
<tr CLASS="clsConfigureTableBody"> <td colspan="3">
<br />
<tr>
<tr CLASS="clsConfigureTableBody"> <td colspan="3">
enable/disable options with either --enable- or --disable- (eg --enable-lhapdf --disable-flux-drivers)
</td></tr>
<tr CLASS="clsConfigureTableBody"> <td colspan="3">
<br />
<tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>profiler </b> </td><td> GENIE code profiling using Google perftools </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>doxygen-doc </b> </td><td> Generate doxygen documentation at build time </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>dylibversion </b> </td><td> Adds version number in dynamic lib names </td><td> default: enabled (recommended) </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>lowlevel-mesg </b> </td><td> Disable (rather than filter out at run time) some prolific
debug/info level messages known to slow GENIE down </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>debug </b> </td><td> Adds -g in the compiler options to request debug info </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>lhapdf </b> </td><td> Use the LHAPDF parton density function library, requires libLHAPDF </td><td> default: enabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>cernlib </b> </td><td> Use the PDFLIB parton density function library, requires CERNLIB </td><td> default: disabled (LHAPDF is preferred) </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>flux-drivers </b> </td><td> Built-in flux drivers </td><td> default: enabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>geom-drivers </b> </td><td> Built-in detector geometry drivers </td><td> default: enabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>mueloss </b> </td><td> Muon energy loss modeling (for atm. upgoing muon sim.) </td><td> default: enabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>vle-extension </b> </td><td> GENIE very low energy (1 MeV - 100 MeV) extension </td><td> default: disabled (experimental)</td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>validation-tools </b> </td><td> GENIE physics model validation tools </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>test </b> </td><td> Test programs </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>t2k </b> </td><td> Enables T2K-specific generation app </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>fnal </b> </td><td> Enables FNAL experiment-specific event generation app </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>atmo </b> </td><td> Atmospheric neutrino event generation app </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>nucleon-decay </b> </td><td> Nucleon decay event generation app </td><td> default: disabled </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>masterclass </b> </td><td> GENIE neutrino masterclass app </td><td> default: disabled (in devel) </td></tr>
<tr CLASS="clsConfigureTableBody"> <td colspan="3">
<br />
<tr>
<tr CLASS="clsConfigureTableBody"> <td colspan="3">
with options for 3rd party software, prefix with --with- (eg --with-lhapdf-lib=/some/path/)
</td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>optimiz-level </b> </td><td> Compiler optimization level (O,O2,O3,OO,Os) </td><td> default: O2 </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>profiler-lib </b> </td><td> Path to profiler library </td><td> needed if you --enable-profiler </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>doxygen-path </b> </td><td> Doxygen binary path </td><td> needed if you --enable-doxygen </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>pythia6-lib </b> </td><td> PYTHIA6 library path </td><td> always needed / auto-detected afterchecking for $PYTHIA6 env.var. </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>cern-lib </b> </td><td> CERN libraries path </td><td> needed if you --enable-cern / auto-detected after checking for $CERNLIB env.var.</td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>lhapdf-inc </b> </td><td> Path to LHAPDF includes </td><td> needed if you --enable-lhapdf / auto-detected after checking for $LHAPDF_INC env.var.</td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>lhapdf-lib </b> </td><td> Path to LHAPDF libraries </td><td> needed if you --enable-lhapdf / auto-detected after checking for $LHAPDF_LIB env.var.</td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>libxml2-inc </b> </td><td> Path to libxml2 includes </td><td> always needed / auto-detected </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>libxml2-lib </b> </td><td> Path to libxml2 library </td><td> always needed / auto-detected </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>log4cpp-inc </b> </td><td> Path to log4cpp includes </td><td> always needed / auto-detected </td></tr>
<tr CLASS="clsConfigureTableBody"> <td> <b>log4cpp-lib </b> </td><td> Path to log4cpp library </td><td> always needed / auto-detected </td></tr>
</table>
<br />
<br />
Below, is an example of how I typically build the GENIE/Generator:
<br />
<div id="terminal">
<b>shell%</b> cd $GENIE <br />
<b>shell%</b> ./configure <br />
--prefix=<i>/some/installation/path</i> <br />
--disable-profiler <br />
--disable-validation-tools <br />
--disable-cernlib <br />
--enable-lhapdf <br />
--enable-flux-drivers <br />
--enable-geom-drivers <br />
--disable-doxygen <br />
--enable-test <br />
--enable-mueloss <br />
--enable-dylibversion <br />
--enable-t2k <br />
--enable-fnal <br />
--enable-atmo <br />
--enable-nucleon-decay <br />
--disable-masterclass <br />
--disable-debug <br />
--with-optimiz-level=O2 <br />
--with-pythia6-lib=<i>/full/path/to/my/libPythia6/</i> <br />
--with-lhapdf-inc=<i>/full/path/to/my/lhapdf/includes/</i> <br />
--with-lhapdf-lib=<i>/full/path/to/my/lhapdf/library/</i> <br />
--with-libxml2-inc=<i>/full/path/to/my/libml2/includes/</i> <br />
--with-libxml2-lib=<i>/full/path/to/my/libxml2/library/</i> <br />
--with-log4cpp-inc=<i>/full/path/to/my/log4cpp/includes/</i> <br />
--with-log4cpp-lib=<i>/full/path/to/my/log4cpp/library/</i> <br />
<b>shell%</b> gmake <br />
<br />
</div>
<br />
<b>Further notes: </b>
<ul>
<li>
The configure script has defaults for all the enable/disable options and auto-detection capabilities for
figuring out the paths. It is likely that a simple './configure' (no arguments) would work in your system.
However, we recommend you staying in control of the build configuration and supply all the required inputs.
</li>
<li>
You can run 'gmake install' to
to copy binaries, libraries and headers under $DIR/bin, $DIR/lib and $DIR/include respectivelly,
where $DIR is the installation location specified with --prefix at the GENIE configuration step.
I usually skip that and just pick the GENIE binaries, libraries and headers from
$GENIE/bin, $GENIE/lib and $GENIE/src respectivelly.
</li>
<li>
Before following the installation instructions given above and and/or before running GENIE, make sure that:
<ul>
<li>
You have defined $GENIE to point at your top level GENIE directory
</li>
<li>
You have defined $ROOTSYS to point at your ROOT installation
</li>
<li>
All your library paths ($ROOTSYS/lib, $GENIE/lib, /path/to/pyhia6, /path/to/libxml2/lib, /path/to/log4cpp/lib, ...)
are listed in $LD_LIBRARY_PATH (of $DYLD_LIBRARY_PATH on Mac OS X)
</li>
<li>
All your binary paths ($ROOTSYS/bin, $GENIE/bin) are listed in $PATH
</li>
</ul>
</li>
<li>
When using old versions of gcc (< 4) don't use optimizations above the O2 level as it generates a seekoff overload problem.
See <A href="http://gcc.gnu.org/ml/gcc-prs/2003-02/msg00485.html">this email</A> at the gnu-gcc mailing list.
</li>
</ul>
</div>
<br />
<div id="InsidePageSectionHeader">
What to do next - Testing your installation
</div>
<div id="InsidePageSectionBody">
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR>
<TD width="20%">
<CENTER>
<IMG src="./images/genie/genie_unleashed.jpg" valign="top">
<BR>
</CENTER>
</TD>
<TD>
</TD>
<TD valign="top">
<div CLASS="clsTableEntryMain">
If the installation was successfull you should find a bunch of libraries in $GENIE/lib
and some applications in $GENIE/bin. Here is a set of instructions, for running a few simple apps,
and making sure there is no major issue with your GENIE installation.
<BR />
<BR />
First, download pre-computed cross-sections, from nu_mu+O^16 interactions, from
<A href="http://scisoft.fnal.gov/scisoft/packages/genie_xsec"> here </A>.
Download datafiles corresponding to the version of GENIE and the physics tune you plan on using.
If you want to generate these cross-sections by yourself, see the GENIE User and Physics manual.
<BR />
<BR />
Generate a 100k event sample of nu_mu+O^16 interactions between 0 and 10 GeV using a simple
analytical (x*exp(-x)) numu flux description <I>(Note: pdg_code(nu_mu)=14, pdg_code(O^16)=1000080160)</I>:
<div id="terminal">
<B>shell&</B> <A href="https://github.com/GENIE-MC/Generator/tree/master/src/Apps/gEvGen.cxx">gevgen</A>
-n 100000 -p 14 -t 1000080160 -e 0,10 -f 'x*exp(-x)' --run 1000 --seed 1721827
--cross-sections /path/to/downladed/cross_sections.xml
--tune <A href="tunes.html">tune_name</A>
</div>
<BR />
Print-out the first 50 events from the GHEP (GENIE's native event format)
event file generated during the previous step (there should be a file named `gntp.1000.ghep.root'):
<div id="terminal">
<B>shell&</B> <A href="https://github.com/GENIE-MC/Generator/tree/master/src/Apps/gEvDump.cxx">gevdump</A>
-n 50 -f gntp.1000.ghep.root
</div>
<BR />
Generate a 10k event sample of pi^{+}+16O interactions for pi^{+}'s of 200 MeV kinetic energy:
<div id="terminal">
<B>shell&</B> <A href="https://github.com/GENIE-MC/Generator/tree/master/src/Apps/gEvGenHadronNucleus.cxx">gevgen_hadron</A>
-n 10000 -p 211 -t 1000080160 -k 0.2 --seed 65431
</div>
<BR />
If everything seems to work then the GENIE is really out of the bottle.
Read the Physics and User manual for further instructions
and information on GENIE tools. Have fun...
</div>
</TD>
</TR>
</TABLE>
</div>
</div> <!-- main -->
<!--#include FILE="./footer.inc"-->
</body>
</html>