/[PAMELA software]/PamVMC/HOWTO_VMC_and_PAMELA
ViewVC logotype

Annotation of /PamVMC/HOWTO_VMC_and_PAMELA

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Jul 13 15:05:46 2009 UTC (15 years, 4 months ago) by pam-rm2
Branch: MAIN
Changes since 1.1: +10 -0 lines
----------------------------------------------------------------------

1 pam-rm2 1.1 @ PREAMBLE
2     This text will help you in installation of PamVMC simulator. This document will be
3     updated after next release of tools.
4     Installation was done on Debian machine, kernel 2.6.26-2-686,
5     gcc version 3.4.6 (Debian 3.4.6-5)
6     Everything was compiled under ROOT v. 5.23. PAMELA software (8th reduction) was corrected
7     to be compiled (see list of changes below). PAMELA libraries was compiled, but executables,
8     like chewbacca still doesn't work (need to be corrected). Anyway, PamVMC needs only libraries
9     for getting information about real magnetic field. To proceess data, I prefer now to have
10     also standard (second) PAMELA SW installaton under previous version of ROOT (5.20). @
11    
12     This is a list of tools to do simulation:
13     CLHEP 2.0.4.2
14     GEANT 4.9.2.p01
15     ROOT v. 5.23.04
16     VGM v.3.02
17     PAMELA 8th reduction (should be corrected by yourself if any problems)
18    
19     In /scripts directory you will find examples of scripts that does an export of
20     ALL enviroment variables for this installation. Please check them with yours.
21    
22     1) @installed packages mesa-libGLU mesa-libGLU-devel gcc-g77 libXi libXi-devel@
23     2) @set gcc and g++ and f77 @
24     3) @install CLHEP 2.0.4.2@
25     mkdir /cern
26     cd /cern
27     wget <source>
28     tar zxf clhep-2.0.4.2.tgz
29     ln -s /cern/2.0.4.2 CLHEP
30     cd CLHEP
31     ./configure --prefix=/cern/CLHEP
32     make
33     make test
34     make install
35     4) @install GEANT 4.9.2.p01@
36     cd /cern
37     mkdir G4
38     cd G4
39     mkdir data
40     @copy all cross-section data files in /cern/G4/data and untar them@
41     cd /cern
42     @copy geant4 sorce tar file in /cern and untar@
43     cd /cern/geant4.9.2.p01
44     ./Configure -build
45     @ Would you like to see the instructions? [n] @
46     @ [Press [Enter] for default settings] @
47     @ Do you expect to run these scripts and binaries on multiple machines? [n] @
48     @ Where is Geant4 source installed? [/cern/geant4.9.2.p01] @
49     @ Specify the path where Geant4 libraries and source files should be installed. [/cern/G4] @
50     @ Do you want to copy all Geant4 headers in one directory? [y] @
51     @ Specify the path where are the Geant4 data libraries
52     PhotonEvaporation2.0 RadioactiveDecay3.2 G4EMLOW6.2 G4NDL3.13 G4ABLA3.0
53     are installed. For now, a flat directory structure is assumed, and this can
54     be customized at the next step if needed. [/cern/G4/data] @
55     @ Please, specify where CLHEP is installed. [/cern/CLHEP] @
56     @ You can customize paths and library name of you CLHEP installation:
57     1) CLHEP_INCLUDE_DIR: /cern/CLHEP/include
58     2) CLHEP_LIB_DIR: /cern/CLHEP/lib
59     3) CLHEP_LIB: CLHEP
60     To modify default settings, select number above (e.g. 2)
61     [Press [Enter] for default settings] @
62     @ By default 'static' (.a) libraries are built.
63     Do you want to build 'shared' (.so) libraries? [y] @
64     @ You selected to build 'shared' (.so) libraries.
65     Do you want to build 'static' (.a) libraries too? [n] @
66     @ Do you want to build 'global' compound libraries? [n] @
67     @ Do you want to compile libraries in DEBUG mode (-g)? [n] @
68     @ G4UI_NONE
69     If this variable is set, no UI sessions nor any UI libraries are built.
70     This can be useful when running a pure batch job or in a user framework
71     having its own UI system.
72     Do you want to set this variable ? [n] @
73     @ G4UI_BUILD_XAW_SESSION
74     G4UI_USE_XAW
75     Specifies to include and use the XAW interfaces in the
76     application to be built.
77     The XAW (X11 Athena Widget set) extensions are required to activate
78     and build this driver. [n] @
79     @ G4UI_BUILD_XM_SESSION
80     G4UI_USE_XM
81     Specifies to include and use the XM Motif based user interfaces.
82     The XM Motif extensions are required to activate and build this
83     driver. [n] @
84     @ G4UI_BUILD_QT_SESSION
85     G4UI_USE_QT
86     Setting these variables will enable the building of the G4 Qt based
87     user interface module and the use of this module in your applications
88     respectively.
89     The Qt3 or Qt4 headers, libraries and moc application are required to enable
90     the building of this module.
91     Do you want to enable build and use of this module? [n] @
92     @ G4VIS_NONE
93     If this variable is set, no visualization drivers will be built or used.
94     Do you want to set this variable ? [n] @
95     @ G4VIS_BUILD_OPENGLX_DRIVER
96     G4VIS_USE_OPENGLX
97     It is an interface to the de facto standard 3D graphics library,
98     OpenGL. It is well suited for real-time fast visualization
99     and prototyping. The X11 version of the OpenGL libraries is required. [y] @
100     @ G4VIS_BUILD_OPENGLXM_DRIVER
101     G4VIS_USE_OPENGLXM
102     It is an interface to the de facto standard 3D graphics library,
103     OpenGL. It is well suited for real-time fast visualization
104     and prototyping. The X11 version of the OpenGL libraries and
105     the Motif Xm extension is required. [n] @
106     @ G4VIS_BUILD_DAWN_DRIVER
107     G4VIS_USE_DAWN
108     DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is
109     a vectorized 3D PostScript processor suited to prepare technical
110     high quality outputs for presentation and/or documentation. [n] @
111     @ G4VIS_BUILD_OIX_DRIVER
112     G4VIS_USE_OIX
113     The OpenInventor driver is based on OpenInventor technology
114     for scientific visualization.
115     The X11 version of OpenInventor is required. [n] @
116     @ G4VIS_BUILD_RAYTRACERX_DRIVER
117     G4VIS_USE_RAYTRACERX
118     Allows for interactive ray-tracing graphics through X11.
119     The X11 package is required. [n] @
120     @ G4VIS_BUILD_VRML_DRIVER
121     G4VIS_USE_VRML
122     These driver generate VRML files, which describe 3D scenes to be
123     visualized with a proper VRML viewer. [n] @
124     @ OGLHOME/include
125     OGLHOME/lib
126     You have selected to use OpenGL driver.
127     Specify the correct path (OGLHOME) where OpenGL is installed in your system.
128     It was found in /usr. Press [Enter] to set this path or type the correct one.
129     You can set '-' (without quotation) to CANCEL the OpenGL flag at all: [/usr]
130     "here you need to specify path to your OpenGL headers and libraries.
131     Please note, that you have to install development version of OpenGL to have headers" @
132     @ G4UI_BUILD_OPENGLQT_DRIVER
133     G4UI_USE_OPENGLQT
134     Setting these variables will enable the building of the G4 OpenGL Qt based
135     visualisation driver and the use of this driver in your applications
136     respectively.
137     The Qt3 or Qt4 headers, libraries and moc application are required to enable
138     the building of this module.
139     Do you want to enable build and use of this module? [n] @
140     @ G4LIB_BUILD_GDML
141     Setting this variable will enable building of the GDML plugin module embedded
142     in Geant4 for detector description persistency.
143     It requires your system to have the XercesC library and headers installed.
144     Do you want to set this variable? [n] @
145     @ G4LIB_BUILD_G3TOG4
146     The utility module 'g3tog4' will be built by setting this
147     variable. NOTE: it requires a valid FORTRAN compiler to be
148     installed on your system and the 'cernlib' command in the
149     path, in order to build the ancillary tools!
150     Do you want to build 'g3tog4' ? [y] @
151     @ G4LIB_BUILD_ZLIB
152     Do you want to activate compression for output files
153     generated by the HepRep visualization driver? [y] @
154     @ G4ANALYSIS_USE
155     Activates the configuration setup for allowing plugins to
156     analysis tools based on AIDA (Astract Interfaces for Data
157     Analysis). In order to use AIDA features and compliant analysis
158     tools, the proper environment for these tools will have to be
159     set (see documentation for the specific analysis tools). [n] @
160     @ end of configuration phase.
161     Creating configuration setup file...
162     WARNING: the generated configuration file
163     can be edited if necessary!
164     You can introduce any change to the configuration file
165     /cern/geant4.9.2.p01/.config/bin/Linux-g++/config.sh before the final installation.
166     To do so, use a shell escape now (e.g. !vi /cern/geant4.9.2.p01/.config/bin/Linux-g++/config.sh).
167     Press [Enter] to start installation or use a shell escape to edit config.sh: @
168    
169     @ Finally,@
170     ./Configure - install
171     @script to setup enviroment: /cern//geant4.9.2.p01/.config/bin/Linux-g++/env.sh @
172    
173     6) @ install PYTHIA6 @
174     @ get archive ftp://root.cern.ch/root/pythia6.tar.gz and put it in /cern @
175     tar zxf pythia6.tar.gz
176     cd pythia6
177     makePythia6.linux
178     5) @ installation of ROOT v. 5.23.04 @
179     @ put root_v5.23.04.source.tar.gz in /cern @
180     cd /cern
181     tar zxf root_v5.23.04.source.tar.gz
182     mv root root_v5.23.04
183     ln -s root_v5.23.04 ROOT
184     cd ROOT/lib
185     ln -s /cern/pythia6/libPythia6.so libPythia6.so
186     cd /cern/ROOT
187     source /cern//geant4.9.2.p01/.config/bin/Linux-g++/env.sh
188     export ROOTSYS=/cern/ROOT
189     ./configure linux --disable-afs --enable-cern --enable-mysql --disable-cintex
190     --disable-globus --enable-roofit --enable-g4root
191     --with-g4-incdir=$G4INCLUDE --with-g4-libdir=$G4LIB/Linux-g++
192     --with-clhep-incdir=$CLHEP_BASE_DIR/include
193     --with-f77=g77 --enable-pythia6 --with-pythia6-libdir=/cern/pythia6
194     make
195    
196     6) @installation of VGM v.3.02@
197     @Note: VGM is needed to convert ROOT-defined geomery in GEANT4. So, you need
198     install VGM only if you plan to use in RunConfiguration of your application
199     an option "geomRootToGeant4" - geometry defined in Root, but GEANT4 navigation.
200     By default, in PamVMC option "geomRoot" was defined because GEANT4 has no
201     option ONLY/MANY, so if I use "geomRootToGeant4" translation could be wrong (WARNING!).
202     But if you wish to do some run-time visualization, like showers, you should use
203     VGM libraries and option "geomRootToGeant4" in PamVMC Run configuration.@
204    
205     @ get archive from http://ivana.home.cern.ch/ivana/VGM.html and put in in /cern @
206     cd /cern
207     tar zxf v3-02.tar.gz
208     ln -s /cern/v3-02 /cern/VGM
209     emacs -nw VGM/config/geant4.gmk
210     @ correct line 23: CPPFLAGS += -I$(G4INCLUDE) on some machines @
211     cd /VGM/packages
212     make
213     @ after you should fin in /cern/VGM/lib/Linux-g++ libaries:
214     libBaseVGM.so libClhepVGM.so libGeant4GM.so libRootGM.so libXmlVGM.so @
215    
216     7) Installation of PAMELA software
217    
218     @ create a symbolic link to cint includes: (needed for Darth Vader with ROOT 5.23)
219     for ROOT 5.20 you don't need to do it@
220     cd /cern/ROOT/include
221     ln -s ../cint/cint/inc/ cint
222    
223    
224     8) Installation of geant4_vmc
225    
226     @ get source ftp://root.cern.ch/root/vmc/geant4_vmc.2.6.tar.gz and put in /cern @
227     cd /cern
228     tar zxf geant4_vmc.2.6.tar.gz
229     ln -s /cern/geant4_vmc_2.6 /cern/geant4_vmc
230     cd /geant4_vmc/source
231     make
232    
233     9) Installation of PamVMC
234    
235     @Before you start, do an export of PAM_VMC env. variable to source directory
236     In case if you wish to use PamVMC with GEANT4 you should go to $(PAM_VMC)/PamG4RunConfiguration @
237     make clean
238     make
239     @ this will produce a libPamG4RunConfiguration.so library in $(PAM_VMC)/lib/tgt_$(PLATFORM) @
240     cd $(PAM_VMC)
241     make
242     @ after this step an application library $(PAM_VMC)/lib/tgt_$(PLATFORM)/libPamVMC_fc.so will be compiled
243     and some calibration files will be copied from $(PAM_VMC)/aux@
244 pam-rm2 1.2 @ do an export
245     export LD_LIBRARY_PATH=$(PAM_VMC)/lib/tgt_$(PLATFORM):$(LD_LIBRARY_PATH)
246 pam-rm2 1.1
247     @ in $(PAM_VMC)/examples you can find an example of usage @
248     @ For more details please look inside $(PAM_VMC)/include PamVMCPrimaryGenerator.h and PamVMCDetectorHit.h @
249    
250 pam-rm2 1.2 /////////////EXTERNAL DIGITIZER/////////////////
251     In aux/PamVMVDigitizer you can find a source code of stand-alone digitizer. Just do make.
252     There are only 3 parameters: input root-file name, output raw-filename and integer random seed.
253     If you specify 0, then TRandom3(0) object will be created. All digitizers use this object.
254     Please note, that current version of digidaizer could be not compatible with root-files generated
255     with previous versions of PamVMC due to addtitonal variables in PamVMCDetectorHit class
256    
257    
258 pam-rm2 1.1 /////////////SPGECTRA GENERATOR/////////////////
259     @ spectra_generator is a tool which allow you to generate tracks above the apparatus
260     isotropically and save initial kinematic parameters (X0,Y0,Z0=110., P, Theta, Phi)
261     "good" tracks in output root-file. After this, file could be used to do simulations.
262     The condition to accept tracks is satisfaction to 14 acceptance planes, defined by
263     TrkParams in Level2. This tool is based on DoTrack method of Level2.
264     To save data in root-file PrimaryInfo class was developed and compiled in library.
265     If later you wish to develop your own script to work with data stored threre,
266     you need just load libPrimaryInfo.so shared library @
267    
268     1) @ To compile library you need change your .rootlogon.C file. One example is provided
269     in directory /aux/spectra_generator. Please check your enviroment variables. All pathes
270     in this file completetly dependent on your enviroment @
271     2) cd /aux/spectra_generator
272     make clean
273     make
274     @ After this you should find a library: libPrimaryInfo.so, and executable: sp_gen @
275    
276     @+++SPECTRA GENERATOR HOWTO +++@
277     @ There are 3 different regimes in which sp_gen could work, and application recognize in
278     which way you wish it work by number and type of parameters which you specify to launch it:
279    
280     1) Fixed rigidity mode: Shooting isotropically with fixed rigitity tracks
281     PARAMETERS:
282     (INTEGER) Number of "good" track that you wish to have finally
283     (INTEGER) Charge of particle in (e+ units)
284     (INTEGER) PDG of particle, see NOTE below
285     (DOUBLE) Fiducial value (cm) that you wish to cut each side from all of
286     14 acceptance planes. (0. - nominal acceptance)
287     (DOUBLE) Rigidity (GV) of tracks.
288     (STRING) Name of output file (ex. out.root) where you wish to store your
289     "good" tracks.
290    
291     exampale: ./sp_gen 10000 1 2212 0.15 2.0 out.root
292     Generates 10000 monoenergetic protons with rigidity 2 GV in fiducial acceptance
293     cutting 0.15 cm on each side. Result will be put into out.root file.
294    
295     2) Flat spectra mode: Shooting isotropically with uniform distributed [Rmin, Rmax]
296     rigitity tracks
297     PARAMETERS:
298     (INTEGER) Number of "good" track that you wish to have finally
299     (INTEGER) Charge of particle in (e+ units)
300     (INTEGER) PDG of particle, see NOTE below
301     (DOUBLE) Fiducial value (cm) that you wish to cut each side from all of
302     14 acceptance planes. (0. - nominal acceptance)
303     (DOUBLE) Minimal Rigidity (GV) of tracks.
304     (DOUBLE) Maximal Rigidity (GV) of tracks.
305     (STRING) Name of output file (ex. out.root) where you wish to store your
306     "good" tracks.
307    
308     example: /sp_gen 10000 1 2212 0.15 2.0 3.0 out.root
309     Generates 10000 protons with flat spectra and with rigidity 2-3
310     GV in fiducial acceptance cutting 0.15 cm on each side. Result will be put into out.root file
311    
312     3) Full spectra mode: Shooting isotropically with all spectra which differrential
313     profile defined in input file.
314     PARAMETERS:
315     (INTEGER) Number of "good" track that you wish to have finally
316     (INTEGER) Charge of particle in (e+ units)
317     (INTEGER) PDG of particle, see NOTE below
318     (DOUBLE) Fiducial value (cm) that you wish to cut each side from all of
319     14 acceptance planes. (0. - nominal acceptance)
320     (STRING) Name of INPUT file (ex. input.root) where you stored your
321     TGraphAsymmErrors object with diffrerntial spectra profile.
322     Please note, that application suppose that name of graph is
323     "gflux". Of course, you can define your own. See sp_gen.C, line 170.
324     (STRING) Name of output file (ex. out.root) where you wish to store your
325     "good" tracks.
326    
327     example: /sp_gen 10000 1 2212 0.15 input_flux.root out.root
328     Generates 10000 protons with rigidity distributed accroding TGrapAsymmErorrs
329     in input_flux.root in fiducial acceptance cutting 0.15 cm on each side.
330     Result will be putt into out.root file
331    
332     !!!NOTE: Use http://pdg.lbl.gov/2007/reviews/montecarlorpp.pdf document to define your
333     particle according PDG numeration scheme.

  ViewVC Help
Powered by ViewVC 1.1.23