日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux下面安装geant4,Ubuntu 12.04 下Geant4的安装

發(fā)布時間:2023/12/20 linux 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux下面安装geant4,Ubuntu 12.04 下Geant4的安装 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

系統(tǒng)Ubuntu 12.04 32位版,gcc 4.6,Geant 4.9.5p1,CLHEP

2.1.2.2

參考

Installing Geant4 Release 4.9.4.p02 on Linux

http://geant4.slac.stanford.edu/tutorial/installation/Geant4.9.4.p02/Linux/Geant4_9_4_p02_Linux_Installation.htm#_What_are_the

準(zhǔn)備編譯環(huán)境:

sudo apt-get install build-essential cmake

cmake版本2.8.7

1)安裝CLHEP

由于新版CLHEP采用cmake方式編譯,原教程不適用,參考cmake/INSTALL安裝方法如下:

mkdir ~/build

cd ~/build

cmake /home/tyllr/CLHEP/2.1.2.2/CLHEP

make

make test

sudo make install

在/usr/local/lib下得到編譯好的多個庫,成功!

2)安裝Geant4

添加低能電磁作用數(shù)據(jù)包,data files for low

energyelectromagnetic processes

解壓到Geant4目錄新建的 data 文件夾下。

tyllr@tyllr-MXC061:~/geant4_9_5_p01$ mkdir ~/geant4build

tyllr@tyllr-MXC061:~/geant4_9_5_p01$ cd ~/geant4build/

tyllr@tyllr-MXC061:~/geant4build$ cmake ../geant4_9_5_p01

-- The C compiler identification is GNU

-- The CXX compiler identification is GNU

-- Check for working C compiler: /usr/bin/gcc

-- Check for working C compiler: /usr/bin/gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- setting default compiler flags for CXX

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Could NOT find EXPAT (missing:?EXPAT_LIBRARY

EXPAT_INCLUDE_DIR)

-- The following Geant4 features are enabled:

-- Configuring done

-- Generating done

-- Build files have been written to: /home/tyllr/geant4build

找不到 EXPAT,嘗試:

sudo apt-get install libexpat-dev

cmake ../geant4_9_5_p01

結(jié)果如下:

-- setting default compiler flags for CXX

-- Found EXPAT: /usr/lib/i386-linux-gnu/libexpat.so

-- The following Geant4 features are enabled:

GEANT4_USE_SYSTEM_EXPAT: Using system install of EXPAT

-- Configuring done

-- Generating done

-- Build files have been written to: /home/tyllr/geant4build

tyllr@tyllr-MXC061:~/geant4build$ make

-j2

我是core 2

duo的cpu,所以用雙核選項。編譯很漫長,喝杯咖啡慢慢等。。。

完成后 sudo make

install,結(jié)束安裝。

3)測試?yán)?/p>

mkdir ~/g4examplebuild

cd ~/g4examplebuild

cmake ../geant4_9_5_p01/examples/novice

make

運行可執(zhí)行文件:

tyllr@tyllr-MXC061:~/g4examplebuild$ cd N01

tyllr@tyllr-MXC061:~/g4examplebuild/N01$ ./exampleN01

*************************************************************

Geant4 version Name:

geant4-09-05-patch-01?(20-March-2012)

Copyright : Geant4 Collaboration

Reference : NIM A 506 (2003), 250-303

WWW : http://cern.ch/geant4

*************************************************************

========= Table of registered couples

==============================

Index :

0?used in the geometry :

Yes?recalculation needed : No

Material : ArgonGas

Range

cuts?:?gamma?1

mm?e-?1

mm?e+?1 mm?proton 1 mm

Energy thresholds :?gamma?-1

MeV?e-?-1

MeV?e+?-1 MeV proton -1 MeV

Region(s) which use this couple :

DefaultRegionForTheWorldIndex :

1?used in the geometry :

Yes?recalculation needed : No

Material : Aluminum

Range

cuts?:?gamma?1

mm?e-?1

mm?e+?1 mm?proton 1 mm

Energy thresholds :?gamma?-1

MeV?e-?-1

MeV?e+?-1 MeV proton -1 MeV

Region(s) which use this couple :

DefaultRegionForTheWorldIndex :

2?used in the geometry :

Yes?recalculation needed : No

Material : Lead

Range

cuts?:?gamma?1

mm?e-?1

mm?e+?1 mm?proton 1 mm

Energy thresholds :?gamma?-1

MeV?e-?-1

MeV?e+?-1 MeV proton -1 MeV

Region(s) which use this couple :

DefaultRegionForTheWorld====================================================================

Start Run processing.

=====================================

G4EventManager::ProcessOneEvent()?=====================================

G4PrimaryTransformer::PrimaryVertex

(-2000(mm),0(mm),0(mm),0(nsec))

1 primaries are passed from G4EventTransformer.

!!!!!!! Now start processing an event !!!!!!!

*********************************************************************************************************

* G4Track Information:?Particle

= geantino,?Track ID =

1,?Parent ID = 0

*********************************************************************************************************

Step#?X(mm)?Y(mm)?Z(mm)

KinE(MeV)?dE(MeV) StepLeng

TrackLeng?NextVolume ProcName

0?-2e+03?0

總結(jié)

以上是生活随笔為你收集整理的linux下面安装geant4,Ubuntu 12.04 下Geant4的安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。