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