For communication and asking your questions, please contact me via this email. I usually check this email faster than the blog messages themselves.
Contact me: geant4.toolkit.zabihiATgmail.com
GEANT4 installation on Ubuntu
There are several ways to install Geant4 on your computer. Which one is available or best for you depends on both your operating system and usage requirements. In all cases, always use the most recent Geant4 release to ensure use of the latest bug fixes, features, and help the developers and community to provide quick user support. Here, I describe my way:)
To install Geant4 there are several steps. Just follow them carefully.
Step 1 – Update and Upgrade :
First of all, you must update and upgrade your Ubuntu platform. For doing that, it's better to change Ubuntu update center's setting. So follow bellow steps:
- sudo apt-get update
- sudo apt-get upgrade
Step 2 – Software Required to Build Geant4
Enter bellow commands in terminal one by one and wait to complete (Be sure have seen "done" for each one).
Note: pay attention about the probable error and notification, all of the processes should be finished correctly.
* sudo apt-get install g++
* sudo apt-get install libxmu-dev
* sudo apt-get install freeglut3-dev
* sudo apt-get install mesa-common-dev
* sudo apt-get install mesa-utils
* sudo apt-get install libglu1-mesa
* sudo apt-get install libgl1-mesa-dev
* sudo apt-get install libgl1-mesa-dri
* sudo apt-get install libxi-dev
* sudo apt-get install libxerces-c-dev
* sudo apt-get install expat
* sudo apt-get install libexpat-ocaml
* sudo apt-get install libexpat-ocaml-dev
Step 3 – install CMake 3.3 or higher.
Geant4 uses CMake to configure a build system for compiling and installing the toolkit headers, libraries and support tools. In this step we must install CMake compiler on our platform. First go to cmake page and download the Uinx/Linux Source with .tar.gz format. (Source distributions:)
Then unpack downloaded file and copy the folder in your home page or any directory you want. Now open cmake folder and open terminal in the same folder (directory). Then write three bellow commands one by one. Wait to complete the configuring and making installation. When configuring complete you must face with comment like this: ''CMake has bootstrapped. Now run make''
- ./configure (If the downloaded file is complete, just type two frist letters then click the tap key. It must be filled out)
- make -j6 (6 is number of core of your system)
- make install
Step 4 – install QT
After download, just extract source file and leave data files compact and then copy both folder (data and geant4-source) to ''/usr/local/include/'' . Before copying the files, please type this command on terminal
Replace 'geant4.10.07' with your version.
Note: pay attention to see ''configuring done''
Then type:
• make -jn
If your computer has n core you should enter n after j. The last command for installing geant4 is mentioned here:
• make install
Step6 – Configuring the Environment
Step7 – Run an example
To run a project first go to example's directory in
/usr/local/include/geant4.10.7_install/share/Geant410.7
and copy'' examples'' folders in home page. Now open example in home directory an then choose one of three folders (Basic/B1 )
Then create a Build folder inside the B1 folder. Go to the Build folder and open terminal and type:
cmake ..
then
make -jn
then
./exampleB1
Download PDF file (Geant4 Installation Guide).
Geant4 First Steps Course: John Apostolakis
Google it: geant4 site:videos.cern.ch |
برای نصب Geant4 در ویندوز می توانید از این فایل که دوستی (خانم آرایش نیا) تجربه ش را داشته اند و به اشتراک گذاشتند، استفاده نمایید. من خودم تجربه ای ندارم.
راهنمای اجرای مجازی Geant4
برای شروع کار با ابزار Geant4 استفاده از این روش پیشنهاد می گردد. فرآیند نصب زمان کمتری نیاز دارد و بسیار آسان تر از نصب واقعی آن در محیط لینوکس است. فقط باید یک اینترنت پرسرعت برای دانلود فایل اصلی داشته باشید و کمی حوصله!
شکل 1
شکل 2
شکل 3
نصب geant4 بر روی سیستم عامل لینوکس
نصب پیشنیازها
دانلود Geant4
نصب Geant4
برای مشاهدهی فایل های C++ می توانید برنامه ویرایش متن geany را با دستور sudo apt-get install geany نصب کنید.
اما پیشنهاد می کنم حتماْ ویراستار eclipse را به عنوان ادیتورتان انتخاب کنید تا بتوانید حرفه ای تر کار کنید.
حال نصب برنامه شما با موفقیت انجام شده است.
برای اطمینان از نصب کامل و در ست برنامه، به این لینک بروید و یک مثال را اجرا کنید.