forked from rjones30/HDGeant4
-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL
103 lines (78 loc) · 4.23 KB
/
INSTALL
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
# HDGeant4 - Geant4 simulation of the Hall D beam line and GlueX spectrometer
## Build options
The configuration options for the build are found near the top of the
top-level make script GNUmakefile, as defines that get appended (or not)
to CPPFLAGS. If you do not want the option, simply comment out the line
where the option is appended to CPPFLAGS. A subset of these are listed
below.
* If you want to build hdgeant4 for running multi-threaded,
requires the the Geant4 library be built with the cmake option
-DGEANT4_BUILD_MULTITHREADED=ON` selected: [on]
CPPFLAGS += -DG4MULTITHREADED
* If you want cpu time computed for major processing steps: [off]
CPPFLAGS += -DLINUX_CPUTIME_PROFILING=1
* If you want to automatically check overlaps in the geometry
as it is assembled from hdds in memory: [off]
CPPFLAGS += -DCHECK_OVERLAPS_MM=1e-4
* If you want to enable x3 speedup of drawing cutaway views
of the geometry using custom code developed for GlueX: [on]
CPPFLAGS += -DBYPASS_DRAWING_CLIPPED_VOLUMES
* If you want to be able to draw cutaway views and then use
the mouse to click points and see the coordinates and
magnetic field vector at each point: [on]
CPPFLAGS += -DLAYERED_GEOMETRY_PICKING_EXTENSIONS
* If you want to use the multi-pane control GUI instead of an
ordinary command-line terminal: [off]
CPPFLAGS += -DG4UI_USE_EXECUTIVE
* If you want to build with the OpenGL driver: [on]
CPPFLAGS += -DG4VIS_BUILD_OPENGL_DRIVER
* If you want to build with the OpenGLX driver: [on]
CPPFLAGS += -DG4VIS_BUILD_OPENGLX_DRIVER
* If you want to use the Qt graphics driver: [off]
CPPFLAGS += -I/usr/include/Qt
* If you want to override the particle type generated by the
particle gun, and make every tracked particle a geantino: [off]
CPPFLAGS += -DFORCE_PARTICLE_TYPE_CHARGED_GEANTINO
* If you want to enable special debug code in BooleanProcessor: [off]
CPPFLAGS += -DBP_DEBUG
* If you want to enable special mods tagged by author name Sponse: [off]
CPPFLAGS += -DMOD_SPONCE
* If you want to enable verbose printout during geometry building
each time a logical volume is placed in the heirarchy: [off]
CPPFLAGS += -DDEBUG_PLACEMENT
* If you want to enable verbose printout during sectionplane
processing: [off]
CPPFLAGS += -DDEBUG_SECTIONPLANE
* If you want to enable additional verbose printout during sectionplane
processing: [off]
CPPFLAGS += -DDEBUG_SECTIONPLANE_ZAVE
## Build instructions (Linux)
After editing the top-level GNUmakefile to select the desired options, as
explained above, it is time to build the executable binaries from the
distributed source files. It is assumed that the desired flavour of the
Geant4 libraries has been built and the appropriate set of environment
variables have been set to point to the G4INSTALL area in the user's
shell, and that the standard GlueX environment variables have been
initialized.
Before attempting the build, go into the src directory of the HDGeant4
distribution and create a symlink called G4fixes pointing to the directory
G4<.X.Y.P>fixes where X,Y,P are the version, release, and patch numbers
of the G4 libraries to which you will be linking in your build.
The general procedure for building hdgeant4 is:
$ cd <top_level_HDGeant4_build_dir>
$ ...setup GlueX offline environment variable...
$ make clean && make
The version of CLHEP that is needed to build hdgeant4 is the one that is
included in the Geant4 distribution. You should not have the environment
variable CLHEP_INCLUDE_DIR defined, because if undefined it is set
automatically to the correct location within the Geant4 distro tree.
This procedure automatically creates bin and lib64 directories within the
base directory of the HDGeant4 tree. The hdgeant4 binary is built and
stored in bin. The shared object libraries needed to run hdgeant4 are
located in the lib64 directory. Your shall LD_LIBRARY_PATH should include
this lib64 directory, the one in your active sim-recon tree, and the one
in your local geant4 build directory, among others.
This procedure also automatically creates the g4py directory. By adding
g4py to your PYTHONPATH you will be able to automatically find and load
all of the python modules associated with the hdgeant4 package simply
by typing "import hdgeant4".