Installation¶
Prerequisites¶
These software packages should be installed in the order presented before you attempt to build RAT. Take note of the version numbers as many of these packages make incompatible changes between releases.
Python 2.7.X with development headers -
on Scientific Linux – run the following commands in [InstallDir] where [InstallDir] is the location you are installing python:
# Python 2.7.6: wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz tar xf Python-2.7.6.tar.xz cd Python-2.7.6 ./configure --prefix=[InstallDir]/python --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath=[InstallDir]/python/lib" make && make altinstall #you will need to add [InstallDir]/python/Python-2.7.6 to the PATH, this can be done on the command line, or in your .bashrc file PATH=[InstallDir]/python/Python-2.7.6:$PATH #you will need to add [InstallDir]/python/lib to the LD_LIBRARY_PATH, this can be done on the command line, or in your .bashrc file LD_LIBRARY_PATH=[InstallDir]/python/lib:$LD_LIBRARY_PATHNOTE: The PATH and LD_LIBRARY_PATH will need to be set in this manner whenever you are using rat-pac
on Ubuntu: … …
sudo apt-get install python-dev
on SUSE Linux: …
sudo zypper install python-devel
- ROOT 5.34 - Used for object serialization and network processors. (other versions of ROOT 5 are okay too). RAT-PAC requires the python development libraries and Minuit2 minimization libraries thus when configuring the root make use the
--enable-python --enable-minuit2
options i.e.
./configure --enable-python --enable-minuit2
GEANT4 10.01.p02 tar file- Toolkit used by the Monte Carlo simulation. When running
cmake
to configure GEANT4, be sure to use-DGEANT4_INSTALL_DATA=ON
to download the interaction cross-section files (or download them manually).For begining GEANT4 users: In the directory you want to install Geant4 (referenced as
[InstallDir]
below), type the following commands:The geant4 enviroment variable files referenced below will be located in [InstallDir]/geant4.10.01.p02-build/InstallTreeFiles/
SCons - Using common package managers, type
- on Scientific Linux:
sudo yum install scons
- on Ubuntu: … …
sudo apt-get install scons
Build Steps¶
Make sure that you have setup your environment variables:
- Source the GEANT4 enviroment variable files
- for bash shell
geant4.sh
- for C shell
geant4.csh
- Source the ROOT enviroment variable files
- for bash shell
thisroot.sh
- for C shell
thisroot.csh
If you do not know where to find these files, type
- Replacing [fileName] with the file you wish to locate. If the file path does not appear, type
- Download RAT from GitHub
Move to the directory you wish to install rat-pac in [rat-pacWorkingDIR] hinceforth. For Anonymous Users type
For Developers type
Build rat-pac Starting from [rat-pacWorkingDIR] type
- Source the newly generated rat-pac enviroment variable files :Note: You will also need to source this file in the future before running rat-pac.
- for bash shell type
env.sh
- for C shell type
env.csh
- Build the rat-pac development package by typing
Test Drive¶
- Run an interactive session by typing
Here’s a sample of what you might see (type
exit
to exit the interactive rat-pac terminal):Run a macro example job by typing
This will simulate 1000 – 10 MeV electrons in a cylindrical detector.
Now you can start ROOT to analyze the events you just created by typing
You should get a plot of particle x coordinates similar to the plot below.
Note: | that with the RAT environment sourced, you are getting a special copy of ROOT that automatically loads the RAT ROOT event library. |
---|