--- PamVMC/HOWTO_VMC_and_PAMELA 2009/07/13 15:05:46 1.2 +++ PamVMC/HOWTO_VMC_and_PAMELA 2014/02/27 08:24:41 1.3 @@ -1,199 +1,69 @@ +Last update: V. Formato + @ PREAMBLE This text will help you in installation of PamVMC simulator. This document will be updated after next release of tools. - Installation was done on Debian machine, kernel 2.6.26-2-686, - gcc version 3.4.6 (Debian 3.4.6-5) - Everything was compiled under ROOT v. 5.23. PAMELA software (8th reduction) was corrected - to be compiled (see list of changes below). PAMELA libraries was compiled, but executables, - like chewbacca still doesn't work (need to be corrected). Anyway, PamVMC needs only libraries - for getting information about real magnetic field. To proceess data, I prefer now to have - also standard (second) PAMELA SW installaton under previous version of ROOT (5.20). @ - - This is a list of tools to do simulation: - CLHEP 2.0.4.2 - GEANT 4.9.2.p01 - ROOT v. 5.23.04 - VGM v.3.02 - PAMELA 8th reduction (should be corrected by yourself if any problems) + Installation was done on a SL5 machine, kernel 2.6.18-348.18.1.el5, + gcc version 4.7.0 + Everything was compiled under ROOT v. 5.34. PAMELA software (9th reduction) was corrected + to be compiled (see list of changes below). PAMELA libraries were compiled, but executables, + like chewbacca still doesn't work (need to be corrected). Anyway, PamVMC needs only the libraries + to get information about the magnetic field. To proceess data, you should have + a standard PAMELA SW installaton under previous version of ROOT (5.26). @ + + This is a list of tools for the installation: + GEANT 4.9.6.p01 + ROOT v. 5.34 + VGM v.3.06 + xerces-c-3.1.1 + PAMELA 9th reduction software (should be corrected by yourself if any problems) In /scripts directory you will find examples of scripts that does an export of ALL enviroment variables for this installation. Please check them with yours. -1) @installed packages mesa-libGLU mesa-libGLU-devel gcc-g77 libXi libXi-devel@ -2) @set gcc and g++ and f77 @ -3) @install CLHEP 2.0.4.2@ - mkdir /cern +1) @install GEANT 4.9.6.p01@ (also includes CHLEP) + mkdir cern cd /cern - wget - tar zxf clhep-2.0.4.2.tgz - ln -s /cern/2.0.4.2 CLHEP - cd CLHEP - ./configure --prefix=/cern/CLHEP - make - make test + tar -xvf geant4.9.6.p01.tar.gz + mkdir geant4.9.6.p01-build + mkdir geant4.9.6.p01-install + ln -s geant4.9.6.p01-install G4 + cd geant4.9.6.p01-build + export CFLAGS=-m32 + export CXXFLAGS=-m32 + cmake -DCMAKE_INSTALL_PREFIX=$PWD/../geant4.9.6.p01-install/ -DGEANT4_INSTALL_DATA=ON ../geant4.9.6.p01 + ccmake ../geant4.9.6.p01 + @@@ Enable the following flags: + - GEANT4_USE_G3TOG4 + - GEANT4_USE_GDML + - GEANT4_USE_OPENGL_X11 + - GEANT4_USE_SYSTEM_EXPAT + make -j4 make install -4) @install GEANT 4.9.2.p01@ - cd /cern - mkdir G4 - cd G4 - mkdir data - @copy all cross-section data files in /cern/G4/data and untar them@ - cd /cern - @copy geant4 sorce tar file in /cern and untar@ - cd /cern/geant4.9.2.p01 - ./Configure -build - @ Would you like to see the instructions? [n] @ - @ [Press [Enter] for default settings] @ - @ Do you expect to run these scripts and binaries on multiple machines? [n] @ - @ Where is Geant4 source installed? [/cern/geant4.9.2.p01] @ - @ Specify the path where Geant4 libraries and source files should be installed. [/cern/G4] @ - @ Do you want to copy all Geant4 headers in one directory? [y] @ - @ Specify the path where are the Geant4 data libraries - PhotonEvaporation2.0 RadioactiveDecay3.2 G4EMLOW6.2 G4NDL3.13 G4ABLA3.0 - are installed. For now, a flat directory structure is assumed, and this can - be customized at the next step if needed. [/cern/G4/data] @ - @ Please, specify where CLHEP is installed. [/cern/CLHEP] @ - @ You can customize paths and library name of you CLHEP installation: - 1) CLHEP_INCLUDE_DIR: /cern/CLHEP/include - 2) CLHEP_LIB_DIR: /cern/CLHEP/lib - 3) CLHEP_LIB: CLHEP - To modify default settings, select number above (e.g. 2) - [Press [Enter] for default settings] @ - @ By default 'static' (.a) libraries are built. - Do you want to build 'shared' (.so) libraries? [y] @ - @ You selected to build 'shared' (.so) libraries. - Do you want to build 'static' (.a) libraries too? [n] @ - @ Do you want to build 'global' compound libraries? [n] @ - @ Do you want to compile libraries in DEBUG mode (-g)? [n] @ - @ G4UI_NONE - If this variable is set, no UI sessions nor any UI libraries are built. - This can be useful when running a pure batch job or in a user framework - having its own UI system. - Do you want to set this variable ? [n] @ - @ G4UI_BUILD_XAW_SESSION - G4UI_USE_XAW - Specifies to include and use the XAW interfaces in the - application to be built. - The XAW (X11 Athena Widget set) extensions are required to activate - and build this driver. [n] @ - @ G4UI_BUILD_XM_SESSION - G4UI_USE_XM - Specifies to include and use the XM Motif based user interfaces. - The XM Motif extensions are required to activate and build this - driver. [n] @ - @ G4UI_BUILD_QT_SESSION - G4UI_USE_QT - Setting these variables will enable the building of the G4 Qt based - user interface module and the use of this module in your applications - respectively. - The Qt3 or Qt4 headers, libraries and moc application are required to enable - the building of this module. - Do you want to enable build and use of this module? [n] @ - @ G4VIS_NONE - If this variable is set, no visualization drivers will be built or used. - Do you want to set this variable ? [n] @ - @ G4VIS_BUILD_OPENGLX_DRIVER - G4VIS_USE_OPENGLX - It is an interface to the de facto standard 3D graphics library, - OpenGL. It is well suited for real-time fast visualization - and prototyping. The X11 version of the OpenGL libraries is required. [y] @ - @ G4VIS_BUILD_OPENGLXM_DRIVER - G4VIS_USE_OPENGLXM - It is an interface to the de facto standard 3D graphics library, - OpenGL. It is well suited for real-time fast visualization - and prototyping. The X11 version of the OpenGL libraries and - the Motif Xm extension is required. [n] @ - @ G4VIS_BUILD_DAWN_DRIVER - G4VIS_USE_DAWN - DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is - a vectorized 3D PostScript processor suited to prepare technical - high quality outputs for presentation and/or documentation. [n] @ - @ G4VIS_BUILD_OIX_DRIVER - G4VIS_USE_OIX - The OpenInventor driver is based on OpenInventor technology - for scientific visualization. - The X11 version of OpenInventor is required. [n] @ - @ G4VIS_BUILD_RAYTRACERX_DRIVER - G4VIS_USE_RAYTRACERX - Allows for interactive ray-tracing graphics through X11. - The X11 package is required. [n] @ - @ G4VIS_BUILD_VRML_DRIVER - G4VIS_USE_VRML - These driver generate VRML files, which describe 3D scenes to be - visualized with a proper VRML viewer. [n] @ - @ OGLHOME/include - OGLHOME/lib - You have selected to use OpenGL driver. - Specify the correct path (OGLHOME) where OpenGL is installed in your system. - It was found in /usr. Press [Enter] to set this path or type the correct one. - You can set '-' (without quotation) to CANCEL the OpenGL flag at all: [/usr] - "here you need to specify path to your OpenGL headers and libraries. - Please note, that you have to install development version of OpenGL to have headers" @ - @ G4UI_BUILD_OPENGLQT_DRIVER - G4UI_USE_OPENGLQT - Setting these variables will enable the building of the G4 OpenGL Qt based - visualisation driver and the use of this driver in your applications - respectively. - The Qt3 or Qt4 headers, libraries and moc application are required to enable - the building of this module. - Do you want to enable build and use of this module? [n] @ - @ G4LIB_BUILD_GDML - Setting this variable will enable building of the GDML plugin module embedded - in Geant4 for detector description persistency. - It requires your system to have the XercesC library and headers installed. - Do you want to set this variable? [n] @ - @ G4LIB_BUILD_G3TOG4 - The utility module 'g3tog4' will be built by setting this - variable. NOTE: it requires a valid FORTRAN compiler to be - installed on your system and the 'cernlib' command in the - path, in order to build the ancillary tools! - Do you want to build 'g3tog4' ? [y] @ - @ G4LIB_BUILD_ZLIB - Do you want to activate compression for output files - generated by the HepRep visualization driver? [y] @ - @ G4ANALYSIS_USE - Activates the configuration setup for allowing plugins to - analysis tools based on AIDA (Astract Interfaces for Data - Analysis). In order to use AIDA features and compliant analysis - tools, the proper environment for these tools will have to be - set (see documentation for the specific analysis tools). [n] @ - @ end of configuration phase. - Creating configuration setup file... - WARNING: the generated configuration file - can be edited if necessary! - You can introduce any change to the configuration file - /cern/geant4.9.2.p01/.config/bin/Linux-g++/config.sh before the final installation. - To do so, use a shell escape now (e.g. !vi /cern/geant4.9.2.p01/.config/bin/Linux-g++/config.sh). - Press [Enter] to start installation or use a shell escape to edit config.sh: @ - - @ Finally,@ - ./Configure - install - @script to setup enviroment: /cern//geant4.9.2.p01/.config/bin/Linux-g++/env.sh @ - -6) @ install PYTHIA6 @ - @ get archive ftp://root.cern.ch/root/pythia6.tar.gz and put it in /cern @ - tar zxf pythia6.tar.gz - cd pythia6 - makePythia6.linux -5) @ installation of ROOT v. 5.23.04 @ - @ put root_v5.23.04.source.tar.gz in /cern @ + cd geant4.9.6.p01-install + ln -s bin/geant4.sh env.sh + cd .. +1a)@source the geant4 environmental variables! + source G4/env.sh + +2) @ installation of ROOT v. 5.34 @ + @ put root_v5.34.04.source.tar.gz in /cern @ cd /cern - tar zxf root_v5.23.04.source.tar.gz - mv root root_v5.23.04 - ln -s root_v5.23.04 ROOT - cd ROOT/lib - ln -s /cern/pythia6/libPythia6.so libPythia6.so - cd /cern/ROOT - source /cern//geant4.9.2.p01/.config/bin/Linux-g++/env.sh - export ROOTSYS=/cern/ROOT - ./configure linux --disable-afs --enable-cern --enable-mysql --disable-cintex - --disable-globus --enable-roofit --enable-g4root - --with-g4-incdir=$G4INCLUDE --with-g4-libdir=$G4LIB/Linux-g++ - --with-clhep-incdir=$CLHEP_BASE_DIR/include - --with-f77=g77 --enable-pythia6 --with-pythia6-libdir=/cern/pythia6 + tar -zxvf root_v5.34.04.source.tar.gz + mv root root_v5.34 + ln -s root_v5.34 root + source G4/env.sh + export ROOTSYS=$PWD/root + ./configure linux --all --enable-builtin-pcre --disable-castor make -6) @installation of VGM v.3.02@ +3) @installation of xerces v.3.1.1@ + tar -xvf xerces-c-3.1.1.tar.gz + ./configure --build=i686 --prefix $PWD + make + make install + +4) @installation of VGM v.3.06@ @Note: VGM is needed to convert ROOT-defined geomery in GEANT4. So, you need install VGM only if you plan to use in RunConfiguration of your application an option "geomRootToGeant4" - geometry defined in Root, but GEANT4 navigation. @@ -204,35 +74,33 @@ @ get archive from http://ivana.home.cern.ch/ivana/VGM.html and put in in /cern @ cd /cern - tar zxf v3-02.tar.gz - ln -s /cern/v3-02 /cern/VGM + tar zxf v3-06.tar.gz + mkdir vgm.3.06-build + mkdir vgm.3.06-install + ln -s vgm.3.06-install VGM emacs -nw VGM/config/geant4.gmk @ correct line 23: CPPFLAGS += -I$(G4INCLUDE) on some machines @ - cd /VGM/packages + cd VGM + ./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/ make - @ after you should fin in /cern/VGM/lib/Linux-g++ libaries: - libBaseVGM.so libClhepVGM.so libGeant4GM.so libRootGM.so libXmlVGM.so @ -7) Installation of PAMELA software +5) Installation of PAMELA software - @ create a symbolic link to cint includes: (needed for Darth Vader with ROOT 5.23) - for ROOT 5.20 you don't need to do it@ - cd /cern/ROOT/include - ln -s ../cint/cint/inc/ cint + @ Follow the standard instructions for the installation of PAMELA software and source the enviroment @ -8) Installation of geant4_vmc +6) Installation of geant4_vmc - @ get source ftp://root.cern.ch/root/vmc/geant4_vmc.2.6.tar.gz and put in /cern @ - cd /cern - tar zxf geant4_vmc.2.6.tar.gz - ln -s /cern/geant4_vmc_2.6 /cern/geant4_vmc - cd /geant4_vmc/source - make + @get source ftp://root.cern.ch/root/vmc/geant4_vmc.2.14a.tar.gz and put in /cern @ + cd /cern + tar -zxvf geant4_vmc.2.14a.tar.gz + cd geant4_vmc + @edit `root-config --etcdir`/vmc/Makefile.linux and add the -m32 flag to the OPT variable and empty the variable SHLIB@ + make -9) Installation of PamVMC +7) Installation of PamVMC - @Before you start, do an export of PAM_VMC env. variable to source directory + @Before you start, do an export of PAM_VMC env. variable to the source directory In case if you wish to use PamVMC with GEANT4 you should go to $(PAM_VMC)/PamG4RunConfiguration @ make clean make @@ -247,6 +115,9 @@ @ in $(PAM_VMC)/examples you can find an example of usage @ @ For more details please look inside $(PAM_VMC)/include PamVMCPrimaryGenerator.h and PamVMCDetectorHit.h @ + +@From here on old instructions: + /////////////EXTERNAL DIGITIZER///////////////// In aux/PamVMVDigitizer you can find a source code of stand-alone digitizer. Just do make. There are only 3 parameters: input root-file name, output raw-filename and integer random seed.