MOCADI performs Monte Carlo simulations of ion optic transport systems.
The main page is http://www-linux.gsi.de/~weick/mocadi/.
downloading & installation
If you are using MOCADI with cribbon then download cribbon first, and then stick all this stuff into cribbon/mocadi/
The download page of Herr Weick is outdated.
I suggest you download mocadi-34-32.F10R520 or mocadi-34-32.
Then you should get some data files posted by Iwasa san—sadly, there is no alternate download page, and only the direct links will work.
There is a manual online, updated regularly, along with information through the official MOCADI website. One ought to refer to these official documents for installation and general use instructions.
running the binaries
Whichever mocadi binary you are using, please make a symbolic link called 'mocadi' for cribbon.
$ ln -s mocadi-34-32.F10R520 mocadi
I put some notes here for problems I encountered running the binary. MOCADI is compiled on Fedora but I run Gentoo.
If you have trouble because of ROOT, you can edit cribbon/mocadi/crib_base.in and disable option listmode tree (comments in the MOCADI input file are an asterisk)
Personally I export my LD_LIBRARY_PATH to include gcc-4.2 which I've built root with. If you don't want to do all that, don't use a version of MOCADI built with ROOT features (notice the R520 in one of the MOCADI binary names above stands for ROOT v. 5.20).
Instead of a symlink I use this shell script to run MOCADI instead, but I'm not really going to get into gcc-config hacking and building ROOT from source code on this website.
Using the input file
cribbon will automatically generate a MOCADI input file, but the exact energy it chooses might not be correct. If you want to change the energy, here's what you want to do.
In the MOCADI input file, lines like:
GEXP001.MAT fringing field
29.984903, 16, 4.313333
are giving the mass, Z, and energy (MeV/u) of the ion. All told, there are 38 of these lines. So just find/replace the energy (be sure to use a lot of significant figures so you don't change some other number by accident). So in this case you might change 4.313333 to 4.10000 or something.
Then you just need to re-run MOCADI:
$ ./mocadi 30s_case1.in
and then probably you want to convert the results into a ROOT tree for viewing (unless you like PAW)
$ h2root 30s_case1.hbk
If you like my little plotting macro, just run ROOT and:
root  .x plotmocadi.C("30s_case1.root")
You may also want to change something like the F1 slits. In general you should probably read the MOCADI manual, but anyway, you can search the input file for "F1" and find:
The first and second values (here -1.0,1.0) are the left and right slit position for X in cm. Of course any change you make to the input file needs MOCADI to be re-run.
If you want to make any more global changes, then just make the changes in crib_base.in which my scripts use.
/ / (__)
/ PhD \ (oO)
/ | /| daid ||
* || ||------||