Garfield++

Useful links

The official web site

It says Garfield++ offers up-to-date treatment of electron transport. Therefore, I have chosen it over the old Garfield-9.

Installation

Follow the instruction on the official website. Below are my summary.

> export GARFIELD_HOME=/home/mydir/garfield
> git clone https://gitlab.cern.ch/garfield/garfieldpp.git $GARFIELD_HOME
> mkdir build; cd build
> cmake $GARFIELD_HOME
> cd $GARFIELD_HOME; make
> export HEED_DATABASE=$GARFIELD_HOME/Heed/heed++/database

cmake may fail due to missing FindROOT.cmake
Solution:

Find "FindROOT.cmake" location. It maybe in $ROOTSYS/etc/root/cmake
Add the following line in CMakeLists.txt (Just after the PROJECT line will do)
SET(CMAKE_MODULE_PATH $ENV{ROOTSYS}/etc/root/cmake)

The garfield++ files will be prepared at $GARFIELD_HOME. Garfield++ is a collection of libraries. Users need to make main function and link it with the libraries.
Prepare setup.sh which sets the two environmental variables.

Examples

Heed

cd $GARFIELD_HOME/Examples/Heed
make
./edep

in my laptop, it ends up with segmentation fault. Removing TApplication related lines works in my case.

Garfield

Installation

The easiest way to do the simulation is to download binary from here.
(Follow the link "source files".)

Input file

Example file:

heed_CF4_4mm.garf


./garfield-9 < heed_CF4_4mm.garf

Results

GAS:CF4, 4mm gap
Projectile: Ekin=870MeV, p=1 GeV/c

heed_stat_piminus_870MeV.pdf


Garfield覚書
Garfield++ Web Site