1 |
formato |
1.1 |
Last update: V. Formato |
2 |
|
|
|
3 |
|
|
@ PREAMBLE |
4 |
|
|
This text will help you in installation of PamVMC simulator. This document will be |
5 |
|
|
updated after next release of tools. |
6 |
|
|
Installation was done on a SL5 machine, kernel 2.6.18-348.18.1.el5, |
7 |
|
|
gcc version 4.7.0 |
8 |
|
|
Everything was compiled under ROOT v. 5.34. PAMELA software (9th reduction) was corrected |
9 |
|
|
to be compiled (see list of changes below). PAMELA libraries were compiled, but executables, |
10 |
|
|
like chewbacca still doesn't work (need to be corrected). Anyway, PamVMC needs only the libraries |
11 |
|
|
to get information about the magnetic field. To proceess data, you should have |
12 |
|
|
a standard PAMELA SW installaton under previous version of ROOT (5.26). @ |
13 |
|
|
|
14 |
|
|
This is a list of tools for the installation: |
15 |
|
|
GEANT 4.9.6.p01 |
16 |
|
|
ROOT v. 5.34 |
17 |
|
|
VGM v.3.06 |
18 |
|
|
xerces-c-3.1.1 |
19 |
|
|
PAMELA 9th reduction software (should be corrected by yourself if any problems) |
20 |
|
|
|
21 |
|
|
In /scripts directory you will find examples of scripts that does an export of |
22 |
|
|
ALL enviroment variables for this installation. Please check them with yours. |
23 |
|
|
|
24 |
|
|
1) @install GEANT 4.9.6.p01@ (also includes CHLEP) |
25 |
|
|
mkdir cern |
26 |
|
|
cd /cern |
27 |
|
|
tar -xvf geant4.9.6.p01.tar.gz |
28 |
|
|
mkdir geant4.9.6.p01-build |
29 |
|
|
mkdir geant4.9.6.p01-install |
30 |
|
|
ln -s geant4.9.6.p01-install G4 |
31 |
|
|
cd geant4.9.6.p01-build |
32 |
|
|
export CFLAGS=-m32 |
33 |
|
|
export CXXFLAGS=-m32 |
34 |
|
|
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../geant4.9.6.p01-install/ -DGEANT4_INSTALL_DATA=ON ../geant4.9.6.p01 |
35 |
|
|
ccmake ../geant4.9.6.p01 |
36 |
|
|
@@@ Enable the following flags: |
37 |
|
|
- GEANT4_USE_G3TOG4 |
38 |
|
|
- GEANT4_USE_GDML |
39 |
|
|
- GEANT4_USE_OPENGL_X11 |
40 |
|
|
- GEANT4_USE_SYSTEM_EXPAT |
41 |
|
|
make -j4 |
42 |
|
|
make install |
43 |
|
|
cd geant4.9.6.p01-install |
44 |
|
|
ln -s bin/geant4.sh env.sh |
45 |
|
|
cd .. |
46 |
|
|
|
47 |
|
|
2) @ installation of ROOT v. 5.34 @ |
48 |
|
|
@ put root_v5.34.04.source.tar.gz in /cern @ |
49 |
|
|
cd /cern |
50 |
|
|
tar -zxvf root_v5.34.04.source.tar.gz |
51 |
|
|
mv root root_v5.34 |
52 |
|
|
ln -s root_v5.34 root |
53 |
|
|
source G4/env.sh |
54 |
|
|
export ROOTSYS=$PWD/root |
55 |
|
|
./configure linux --all --enable-builtin-pcre --disable-castor |
56 |
|
|
make |
57 |
|
|
|
58 |
|
|
3) @installation of xerces v.3.1.1@ |
59 |
|
|
tar -xvf xerces-c-3.1.1.tar.gz |
60 |
|
|
./configure --build=i686 --prefix $PWD |
61 |
|
|
make |
62 |
|
|
make install |
63 |
|
|
|
64 |
|
|
4) @installation of VGM v.3.06@ |
65 |
|
|
@Note: VGM is needed to convert ROOT-defined geomery in GEANT4. So, you need |
66 |
|
|
install VGM only if you plan to use in RunConfiguration of your application |
67 |
|
|
an option "geomRootToGeant4" - geometry defined in Root, but GEANT4 navigation. |
68 |
|
|
By default, in PamVMC option "geomRoot" was defined because GEANT4 has no |
69 |
|
|
option ONLY/MANY, so if I use "geomRootToGeant4" translation could be wrong (WARNING!). |
70 |
|
|
But if you wish to do some run-time visualization, like showers, you should use |
71 |
|
|
VGM libraries and option "geomRootToGeant4" in PamVMC Run configuration.@ |
72 |
|
|
|
73 |
|
|
@ get archive from http://ivana.home.cern.ch/ivana/VGM.html and put in in /cern @ |
74 |
|
|
cd /cern |
75 |
|
|
tar zxf v3-06.tar.gz |
76 |
|
|
mkdir vgm.3.06-build |
77 |
|
|
mkdir vgm.3.06-install |
78 |
|
|
ln -s vgm.3.06-install VGM |
79 |
|
|
emacs -nw VGM/config/geant4.gmk |
80 |
|
|
@ correct line 23: CPPFLAGS += -I$(G4INCLUDE) on some machines @ |
81 |
|
|
cd VGM |
82 |
|
|
./autoconf/configure --with-clhep-include=$PWD/../geant4.9.6.p01-install/include/Geant4/ --with-clhep-libdir=$PWD/../geant4.9.6.p01-install/lib/ --with-geant4=/$PWD/../geant4.9.6.p01-install/ --with-xerces=$PWD/../xerces-c-3.1.1/ --with-root=$PWD/../root/ |
83 |
|
|
make |
84 |
|
|
|
85 |
|
|
5) Installation of PAMELA software |
86 |
|
|
|
87 |
|
|
@ Follow the standard instructions for the installation of PAMELA software |
88 |
|
|
|
89 |
|
|
|
90 |
|
|
6) Installation of geant4_vmc |
91 |
|
|
|
92 |
|
|
@get source ftp://root.cern.ch/root/vmc/geant4_vmc.2.14a.tar.gz and put in /cern @ |
93 |
|
|
cd /cern |
94 |
|
|
tar -zxvf geant4_vmc.2.14a.tar.gz |
95 |
|
|
cd geant4_vmc |
96 |
|
|
@edit `root-config --etcdir`/vmc/Makefile.linux and add the -m32 flag to the OPT variable and empty the variable SHLIB@ |
97 |
|
|
make |
98 |
|
|
|
99 |
|
|
7) Installation of PamVMC |
100 |
|
|
|
101 |
|
|
@Before you start, do an export of PAM_VMC env. variable to the source directory |
102 |
|
|
In case if you wish to use PamVMC with GEANT4 you should go to $(PAM_VMC)/PamG4RunConfiguration @ |
103 |
|
|
make clean |
104 |
|
|
make |
105 |
|
|
@ this will produce a libPamG4RunConfiguration.so library in $(PAM_VMC)/lib/tgt_$(PLATFORM) @ |
106 |
|
|
cd $(PAM_VMC) |
107 |
|
|
make |
108 |
|
|
@ after this step an application library $(PAM_VMC)/lib/tgt_$(PLATFORM)/libPamVMC_fc.so will be compiled |
109 |
|
|
and some calibration files will be copied from $(PAM_VMC)/aux@ |
110 |
|
|
@ do an export |
111 |
|
|
export LD_LIBRARY_PATH=$(PAM_VMC)/lib/tgt_$(PLATFORM):$(LD_LIBRARY_PATH) |
112 |
|
|
|
113 |
|
|
@ in $(PAM_VMC)/examples you can find an example of usage @ |
114 |
|
|
@ For more details please look inside $(PAM_VMC)/include PamVMCPrimaryGenerator.h and PamVMCDetectorHit.h @ |
115 |
|
|
|
116 |
|
|
|
117 |
|
|
@From here on old instructions: |
118 |
|
|
|
119 |
|
|
/////////////EXTERNAL DIGITIZER///////////////// |
120 |
|
|
In aux/PamVMVDigitizer you can find a source code of stand-alone digitizer. Just do make. |
121 |
|
|
There are only 3 parameters: input root-file name, output raw-filename and integer random seed. |
122 |
|
|
If you specify 0, then TRandom3(0) object will be created. All digitizers use this object. |
123 |
|
|
Please note, that current version of digidaizer could be not compatible with root-files generated |
124 |
|
|
with previous versions of PamVMC due to addtitonal variables in PamVMCDetectorHit class |
125 |
|
|
|
126 |
|
|
|
127 |
|
|
/////////////SPGECTRA GENERATOR///////////////// |
128 |
|
|
@ spectra_generator is a tool which allow you to generate tracks above the apparatus |
129 |
|
|
isotropically and save initial kinematic parameters (X0,Y0,Z0=110., P, Theta, Phi) |
130 |
|
|
"good" tracks in output root-file. After this, file could be used to do simulations. |
131 |
|
|
The condition to accept tracks is satisfaction to 14 acceptance planes, defined by |
132 |
|
|
TrkParams in Level2. This tool is based on DoTrack method of Level2. |
133 |
|
|
To save data in root-file PrimaryInfo class was developed and compiled in library. |
134 |
|
|
If later you wish to develop your own script to work with data stored threre, |
135 |
|
|
you need just load libPrimaryInfo.so shared library @ |
136 |
|
|
|
137 |
|
|
1) @ To compile library you need change your .rootlogon.C file. One example is provided |
138 |
|
|
in directory /aux/spectra_generator. Please check your enviroment variables. All pathes |
139 |
|
|
in this file completetly dependent on your enviroment @ |
140 |
|
|
2) cd /aux/spectra_generator |
141 |
|
|
make clean |
142 |
|
|
make |
143 |
|
|
@ After this you should find a library: libPrimaryInfo.so, and executable: sp_gen @ |
144 |
|
|
|
145 |
|
|
@+++SPECTRA GENERATOR HOWTO +++@ |
146 |
|
|
@ There are 3 different regimes in which sp_gen could work, and application recognize in |
147 |
|
|
which way you wish it work by number and type of parameters which you specify to launch it: |
148 |
|
|
|
149 |
|
|
1) Fixed rigidity mode: Shooting isotropically with fixed rigitity tracks |
150 |
|
|
PARAMETERS: |
151 |
|
|
(INTEGER) Number of "good" track that you wish to have finally |
152 |
|
|
(INTEGER) Charge of particle in (e+ units) |
153 |
|
|
(INTEGER) PDG of particle, see NOTE below |
154 |
|
|
(DOUBLE) Fiducial value (cm) that you wish to cut each side from all of |
155 |
|
|
14 acceptance planes. (0. - nominal acceptance) |
156 |
|
|
(DOUBLE) Rigidity (GV) of tracks. |
157 |
|
|
(STRING) Name of output file (ex. out.root) where you wish to store your |
158 |
|
|
"good" tracks. |
159 |
|
|
|
160 |
|
|
exampale: ./sp_gen 10000 1 2212 0.15 2.0 out.root |
161 |
|
|
Generates 10000 monoenergetic protons with rigidity 2 GV in fiducial acceptance |
162 |
|
|
cutting 0.15 cm on each side. Result will be put into out.root file. |
163 |
|
|
|
164 |
|
|
2) Flat spectra mode: Shooting isotropically with uniform distributed [Rmin, Rmax] |
165 |
|
|
rigitity tracks |
166 |
|
|
PARAMETERS: |
167 |
|
|
(INTEGER) Number of "good" track that you wish to have finally |
168 |
|
|
(INTEGER) Charge of particle in (e+ units) |
169 |
|
|
(INTEGER) PDG of particle, see NOTE below |
170 |
|
|
(DOUBLE) Fiducial value (cm) that you wish to cut each side from all of |
171 |
|
|
14 acceptance planes. (0. - nominal acceptance) |
172 |
|
|
(DOUBLE) Minimal Rigidity (GV) of tracks. |
173 |
|
|
(DOUBLE) Maximal Rigidity (GV) of tracks. |
174 |
|
|
(STRING) Name of output file (ex. out.root) where you wish to store your |
175 |
|
|
"good" tracks. |
176 |
|
|
|
177 |
|
|
example: /sp_gen 10000 1 2212 0.15 2.0 3.0 out.root |
178 |
|
|
Generates 10000 protons with flat spectra and with rigidity 2-3 |
179 |
|
|
GV in fiducial acceptance cutting 0.15 cm on each side. Result will be put into out.root file |
180 |
|
|
|
181 |
|
|
3) Full spectra mode: Shooting isotropically with all spectra which differrential |
182 |
|
|
profile defined in input file. |
183 |
|
|
PARAMETERS: |
184 |
|
|
(INTEGER) Number of "good" track that you wish to have finally |
185 |
|
|
(INTEGER) Charge of particle in (e+ units) |
186 |
|
|
(INTEGER) PDG of particle, see NOTE below |
187 |
|
|
(DOUBLE) Fiducial value (cm) that you wish to cut each side from all of |
188 |
|
|
14 acceptance planes. (0. - nominal acceptance) |
189 |
|
|
(STRING) Name of INPUT file (ex. input.root) where you stored your |
190 |
|
|
TGraphAsymmErrors object with diffrerntial spectra profile. |
191 |
|
|
Please note, that application suppose that name of graph is |
192 |
|
|
"gflux". Of course, you can define your own. See sp_gen.C, line 170. |
193 |
|
|
(STRING) Name of output file (ex. out.root) where you wish to store your |
194 |
|
|
"good" tracks. |
195 |
|
|
|
196 |
|
|
example: /sp_gen 10000 1 2212 0.15 input_flux.root out.root |
197 |
|
|
Generates 10000 protons with rigidity distributed accroding TGrapAsymmErorrs |
198 |
|
|
in input_flux.root in fiducial acceptance cutting 0.15 cm on each side. |
199 |
|
|
Result will be putt into out.root file |
200 |
|
|
|
201 |
|
|
!!!NOTE: Use http://pdg.lbl.gov/2007/reviews/montecarlorpp.pdf document to define your |
202 |
|
|
particle according PDG numeration scheme. |