GMOCADI (GUI for MOCADI) version 4.0

Naohito IWASA
Department of Physics, Tohoku University
Sendai, Miyagi, 980-8578, Japan

20th Dec. 2013

  1. Introduction
  2. Download
  3. How to use GMOCADI
  4. Elements in GMOCADI
  5. ATIMA, BEAM, BR_SLIT, CALL,
    CHARGE_STATES, COLL, COOLER, CROSS-SECTION,
    DECAY-IN-MAGNET, DRIFT, DRIFT-IN-GAS, END,
    EPAX, EXPECTED_VALUES, FRAGMENT, HBOOK,
    IN-FLIGHT-DECAY, LOOP-ENDLOOP, MATRIX, MATRIXFILE,
    MATTER, OPTION, PRIMARY_BEAM, RAND,
    RANDOMIZE, REACTION_TARGET, READ, RESET,
    SAVE, SHIFT, SLIT, STOP,
    TABLE, TARGET, WEDGE
  6. Plot histogram

1. Introduction

The Monte Carlo code MOCADI is an excellent tool for studying beam properties and luminosity, separation quality, implantation profiles, optimization of experimental setup, and transmission. GMOCADI was developed as a graphical user interface to MOCADI, which use GTK+2.0 library. GMOCADI version 4.0 is graphical user interface of MOCADI version 4.0.

2. Download

GMOCADI uses GTK+2.0, GLib and Pango shared libraries. If these packages were not installed in your computer, please install them. Executable files of GMOCADI can be downloaded here. After downloading, please rename the files to gmocadi. MOCADI is also necessary. Please read MOCADI manual.

3. How to use GMOCADI

When you cannot copy MOCADI to /usr/local/mocadi/exe/mocadi, you should set environment variable MOCADI_EXE using following command, when MOCADI installed at /home/user/mocadi/exe/mocadi.

setenv MOCADI_EXE /home/user/mocadi/exe/mocadi (for csh)
export MOCADI_EXE="/home/user/mocadi/exe/mocadi" (for ksh)

When you type the command "./gmocadi", a new window appears.

File->New: delete all elements.
File->Open: read GMOCADI input file(*.moc)
File->Save: store to GMOCADI input file (*.moc)
File->Import: read MOCADI input file (*.in)
File->Exit: exit GMOCADI

Edit->Delete: delete selected element.

View->Command window: show the command window as
View->Section window: show the section window
View->spectrometer_drawing: show spectrometer drawing as

Calculate->tune_field_with_MOCADI: make a MOCADI input file (mocadi-work.in) only for matter and target elements, group same optical elements as section, calculate mean field values with MOCADI, and set them to the corresponding sections. Note that, this command assumed fully stripped a particle. When you want to tune the section for different charge state, please change by yourself.
Calculate->calculation_with_MOCADI: make a MOCADI input file(mocadi-work.in) for all element, and simulate using MOCADI, and show MOCADI output file mocadi-work.out.
Calculate->total_length: calculate total length of spectrometer.

Plot -> HBOOK: plot histograms in mocadi-work.hbk
Plot -> ASCII: make histograms from ascii-formatted list-mode file mocadi-work.asc, and plot the histograms.
Plot -> GZASCII: make histograms from gzipped-ascii-formatted list-mode file mocadi-work.asc.gz, and plot the histograms.

Insert -> *: insert an element after the selected element.

Help -> about GMOCADI: show information about GMOCADI

3.1 How to add elements and modify parameters

When you select the "Insert->beam" or click "beam" button in the command window, insert a beam element after the selected element, and the parameters in the beam element can be specified, appears. After editing the parameters and clicking the set button, the parameters are stored to the element.
When you want to modify parameters of an element, click the element in a list of elements.

3.2 How to delete elements

When you want to delete an element, after selecting the element, the "Edit->Delete" is selected or the "delete" button is clicked.

3.3 Section

In GMOCADI, magnetic or electric field in MATRIX elements can be set by each element or section. In the parameter window of the MATRIX element, there are radio-buttons labeled by the section names and A, Z, E entries. When you want to set the field by section, the radio-button for the relevant section is clicked. If by section, the "other" button is clicked and the values in A, Z, E entries should be specified. When you select the section, background color of MATRIX entry is set.
section color name
0th section LightSlateBlue
1st section red
2nd section green
3rd section yellow
4th section cyan
5th section magenta
6th section LightGray
7th section orange
8th section LawnGreen
9th section pink
10th section chocolate
11th section SkyBlue
12th section purple
13th section goldenrod
14th section red
15th section green
16th section LightSlateBlue
17th section yellow
18th section cyan
19th section magenta
20th section LightGray
21st section orange
22nd section LawnGreen
23rd section pink
24th section chocolate
25th section SkyBlue
26th section purple
27th section goldenrod
28th section red
29th section green
30th section LightSlateBlue
When you want to change the field value of the section, please select "View -> Section window" and click button for related section in the section window. Then a window which you can modify the field appears.
When you want to set field value from Z, A and Energy, Z and A is specified, the "mass" button is clicked, and Energy is specified and the "set" button is clicked. The method to set from Z, A and Brho is similar. When you click the "copy them to following section", this field value is copied to later sections.
The name of the section also can be changed in the section window.

3.4 save GMOCADI input file

Before calculating the ion optical system, we recommend you to store the data to GMOCADI input file. When the "save" button is clicked, save-input-file window appears. The name of file is specified and the "OK" button is clicked. This data in the input file can be read by clicking the "open" button.

4. Elements in GMOCADI

4.1 END

The "END" keyword marks the end of an input file. The keyword should be written at least once in a MOCADI input file. Keywords that follow the "END" keyword are ignored.

4.2 BEAM

The "BEAM" keyword marks the beginning of Monte Carlo simulation. This keyword or the "READ" keyword described latter should be written once as the first keyword in a MOCADI input file.

N ions of the primary beam with charge, mass, electrons are produced with initial position distribution (X, Y), angular distribution (A, B), energy distribution (E) and time distribution (T). The initial distributions are calculated event by event as follows. (The r parameter is not used up to now.)

X=X0+dX
A=A0+dA
Y=Y0+dY
B=B0+dB
E=E0*(1+(E1+dE)/100)
T=T0*(1+(T1+dT)/100)

where distributions dX, dA, dY, dB, dE, and dT are calculated from mode*, max* and r* parameters.
mode
0 fixed. d=max
1 uniform distribution, -max* < d* < +max*
2 Gaussian distribution, σ*=max*
4 uniform distribution in the Ellipse (d1/max1)2+(d2/max2)2<= 1
6 uniform distribution in the 6 dimensional Ellipse (only for modeXA), (dX/maxX)2 + (dA/maxA)2 + (dY/maxY)2 + (dB/maxB)2 + (dE/maxE)2 + (dT/maxT)2 <= 1
7 uniform distribution in the 4 dimensional Ellipse (only for modeXA), (dX/maxX)2 + (dA/maxA>)2 + (dY/maxY)2 + (dB/maxB>)2 <= 1
8 uniform distribution in the 2 dimensional Ellipse (only for modeXA), (dX/maxX)2 + (dY/maxY)2 <=1, (dA/maxA)2 + (dB/maxB)2 <= 1
9 Gaussian distribution with σX=maxX, σA=maxA, σY=maxY, σB=maxB, σE=maxE, σT=maxT, (only for mode>XA)
The units of energy(E), time(T), position(X, Y), and angle(A, B) are MeV/u, micro-second, centimeter, and milli-radian, respectively.

4.3 READ

The "READ" keyword marks to read beam parameters from listmode file of filename instead of using the "BEAM" keyword. Note that the keyword cannot be used together with the "TARGET" keyword.
format 5: ASCII format
6: gzipped ASCII format
isave 1: first save point
2: second save point
.........
fragment 0:primary beam
1:fragment 1 (fragment written in TARGET card)
2-:fragment 2- (fragment written in FRAGMENT card)
......

4.4 DRIFT

The ``DRIFT'' keyword defines a distance of length[cm] along the optical axis in vacuum.

4.5 DRIFT-IN-GAS

The ``DRIFT-in-gas'' keyword defines an element of length[cm] along the optical axis in a gas specified as mass and charge with a certain thickness of thickness[mg/cm2]. Fklwi and Fenstr are flags (1:on, 0:off) to calculate angular and energy straggling, respectively.

4.6 IN-FLIGHT-DECAY

The ``IN-FLIGHT-DECAY'' keyword defines an element of length[cm] along the optical axis in vacuum. The particles with mass[amu] and nuclear charge[e] can be decay with half-life[ms]. When half-life is set to zero, it decays with sufficient long half-life, but all the particles decays in the element. When Q-value[MeV] is set to zero or higher than Q value to the ground state, Q value is calculated from the mass table, assuming decay to the ground state of daughter nuclei. When turn is not set zero, the decay occurs only in a turn in the loop. In case of zero, the decay occurs the all turns in the loop.
decay_mode
1 alpha decay
2 beta - decay
3 electron capture decay
4 beta + decay
5 proton decay

4.7 COLL

The ``COLL'' keyword marks to place a collimator. The possible collimator shapes are given in the table. The units of X0, Y0, Xmax, Ymax, sig_fac are centimeters.
shape
1 A rectangular position collimator X0-Xmax < X < X0+Xmax, Y0-Ymax < Y < Y0+Ymax
2 A rectangular angular collimator X0-Xmax < A < X0+Xmax, Y0-Ymax < B < Y0+Ymax
3 A elliptical position collimator ((X-X0)/Xmax)2 + ((Y-Y0)/Ymax)2 < 1
4 A special position collimator designed for FRS X0-Xmax < X < X0+Xmax, Y0-Ymax < Y < Y0+Ymax, abs((X-X0)(Y-Y0)) < sig_fac2/2 

4.8 SLIT

The ``SLIT'' keyword defines a rectangular collimator (XMIN < X < XMIN, YMIN < Y < YMIN)

4.9 MATRIX

The ``MATRIX'' keyword marks to place a part of a magnetic ion-optical system described by a transfer matrix.
The matrix parameters of the system should be written in filename in the directory which is marked by the ``MATRIXFILE'' keyword. MOCADI can read output files by GIOS, TRANSPORT and GICOSY (I tested only GICOSY matrix). The matrix parameters up to order1th order are used in the calculation (max. up to 3rd order). When the name of a section is selected, the magnetic rigidity in the section is used for calculation. In case of selecting "other", the rigidity is calculated from information of the reference particle, A0 [amu], Z0 , and E0 [MeV/nucleon]. Note that the drift length of the element is copied from the matrix file.

4.10 SAVE

The ``SAVE'' keyword sets that MOCADI stores a list-mode output file with all particle coordinates (positions, directions, energies and so on) by event by event. Output filename and Format are chosen by using the "OPTION LISTMODE" keyword.

4.11 TARGET

The ``TARGET'' keyword marks to place here a target.
At mass of the target
Zt charge of target
rho density in mg/cm3
dist
Freac=0
formula for momentum distribution of fragment
0: determined by Fgold
1: Goldhaber (Phys. Lett. 53B, 306)
2: Morrissey (Phys. Rev. C39, 460)
3: Lorentzian
4: zero width
Freac=-2,3
formula for energy distribution of evaporation neutron (from MOCADI 3.5)
1: fixed EN=1.7MeV+VCoulomb
2: fixed EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
3: fixed EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
11: Maxwell-Boltzmann distribution with EN=1.7MeV+VCoulomb
12: Maxwell-Boltzmann distribution with EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
13: Maxwell-Boltzmann distribution with EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
21: Eexp(-E/T) distribution with EN=1.7MeV+VCoulomb
22: Eexp(-E/T) distribution with EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
23: Eexp(-E/T) distribution with EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
where VCoulomb=1.4*Zr*Ze/1.87/(Ar1/3+Ae1/3),
and (Ze,Ae):evaporation particle, (Zr,Ar):residual particle.
Freac=-4,-5
formula for calculating TKE of fission fragment
1: Viola with parameters of R. Vandenbosch
2: BROSA-FORMEL NUCL.PHYS.A502 (1989) 423C, 190402 HWE
3: D.J. Hinde et al., Nucl. Phys. A472 (1987) 318
4: K.-H. Schmidt et al., Nucl. Phys. A665 (2000) 221, B.D. Wilkins et al., Phys Rev.C 14 (1976) 1832
Af fragment mass
Zf fragment charge
thickness target thickness in mg/cm2
Fklwi small angle scattering
1 : on
0 : off
Fenstr energy straggling
1 : on
0 : off
Fgold parameter of momentum distribution
if dist=0
1 : Goldhaber (Phys. Lett. 53B, 306)
-1 : Morrissey (Phys. Rev. C39, 460)
0 : no fragmentation
if dist=1
scale factor from Goldhaber distribution (Phys. Lett. 53B, 306)
if dist=2
scale factor from Morrissey distribution (Phys. Rev. C39, 460)
if dist=3
dP//=dPt MeV/c for Lorentzian distribution
Fwico Coulomb scattering
1 : on
0 : off
Fkauf energy loss in fragmentation
1 : Kaufmann (Phys. Rev. C22, 1897)
0 : off
-1 :Morrisay (Phys. Rev. C39, 460)
-2 :parabolic formula with e=12MeV (E<200AMeV)
-2 :parabolic formula with e=8MeV (Phys. Rev. C76, 044605)
Freac
or
Freac
fragment production by fission
0 : off
1 : fission energy from table of M.Bernas
2 : old original Viola systematics from 1966
3 : Brosa formula (Nucl .Phys. A502 423C (1989)); Viola style formula but based on theory
4 : Hinde formula (Nucl. Phys. A472 318 (1987)), considers asymmetric fission for TKE in the symmetric case it coincides with new Viola
5 : Wilkins formula (Nucl. Phys. C14, 1832 (1976)) as used by K.-H. Schmidt, considers asymmetric fission
6 : new article by Viola (Phys. Rev. C31, 1550 (1985))
-1 : two body kinematics (from 3.3) excitation energies of fragment and residue are defined by E1 and E2. theta_min and theta_max are angular range in center of mass system.
-2 : simple model of fusion evaporation reaction (from MOCADI 3.5) fusion process occurs when Ecm is in the window from Bfusion+E1 to Bfusion+E2. When E1<0, E1 is set to 0. When E2≶0, E2 is set to 10. Neutrons are evaporated while excitation energy is above Sn+Erel. The parameters Af and Zf are not used in the mode.
-3: same as Freac=-2, except for fusion process occurs when Ecm is in the window from E1 to E2. (from MOCADI 3.5)
-4 : a simple model of fusion-fission (from 4.0) fusion process occurs when Ecm is in the window from Bfu+E1 to Bfu+E2, where Bfu is fusion barrier in MeV. When E1<0, E1 is set to 0 MeV. When E2<0, E2 is set to 10 MeV. And fission fragment of Af and Zf is measured.
-5: same as Freac=-4, except for fusion process occurs when Ecm is in the window from E1 to E2. (from 4.0)
-100: a simple model of radiative capture reaction.
In case of fission, two body kinematics and fusion evaporation, Fgold, Fkauf are not used.
E1,E2
Freac=-1
excitation energies of outgoing and residual particles in MeV respectively.
Freac=-2,-3,-4,-5
energy window of fusion reaction in the center of mass system in MeV (see Freac)
th_min, th_max
Freac=-1
angular range to consider in calculation of two body kinematics, isotropic between th_min and th_max in the center of mass system in degree
Material list are described in subsection mocadi manual 3-25.

4.12 REACTION-TARGET

The "REACTION-TARGET" keyword marks to place a secondary target. The difference from the "TARGET" keyword is following.
1) The beam particles impinge on a target material (At, Zt) with the thickness. All the particles defined by the fragment identifier ID (0: primary beam, 1: secondary beam defined by the TARGET, 2-: secondary beam defined by the FRAGMENT keyword) change to another particle (Af,Zf) by the reaction (100%). The other particles pass through the material without a change.
2) The reaction probability of 100% is not realistic. Please multiply the real reaction probability to the yield.
The other parameters were described as follows. (velocity of fragment= velocity of projectile) non integer values can be used for scaling.
At mass of the target
Zt charge of target
rho density in mg/cm3
dist
Freac=-2,3
formula for momentum distribution of fragment
0: determined by Fgold
1: Goldhaber (Phys. Lett. 53B, 306)
2: Morrissey (Phys. Rev. C39, 460)
3: Lorentzian 4: zero width
Freac=-2,3
formula for energy distribution of evaporation neutron (from MOCADI 3.5)
1: fixed EN=1.7MeV+VCoulomb
2: fixed EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
3: fixed EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
11: Maxwell-Boltzmann distribution with EN=1.7MeV+VCoulomb
12: Maxwell-Boltzmann distribution with EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
13: Maxwell-Boltzmann distribution with EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
21: Eexp(-E/T) distribution with EN=1.7MeV+VCoulomb
22: Eexp(-E/T) distribution with EN=2*sqrt(E**10/mass(A,Z))+VCoulomb
23: Eexp(-E/T) distribution with EN=2*sqrt(11(E*-Sn)/A)+VCoulomb
where VCoulomb=1.4*Zr*Ze/1.87/(Ar1/3+Ae1/3),
and (Ze,Ae):evaporation particle, (Zr,Ar):residual particle.
Freac=-4,-5
formula for calculating TKE of fission fragment
1: Viola with parameters of R. Vandenbosch
2: BROSA-FORMEL NUCL.PHYS.A502 (1989) 423C, 190402 HWE
3: D.J. Hinde et al., Nucl. Phys. A472 (1987) 318
4: K.-H. Schmidt et al., Nucl. Phys. A665 (2000) 221, B.D. Wilkins et al., Phys Rev.C 14 (1976) 1832
Af fragment mass
Zf fragment charge
ID fragment ID to select reacting particle
0: projectile,
1:fragment defined in the TARGET keyword,
2-:fragment defined the FRAGMENT keyword
thickness target thickness in mg/cm2
Fklwi small angle scattering
1 : on
0 : off
Fenstr energy straggling
1 : on
0 : off
Fgold parameter of scale momentum distribution
if dist=0
1 : Goldhaber (Phys. Lett. 53B, 306)
-1 : Morrissey (Phys. Rev. C39, 460)
0 : no fragmentation
if dist=1
scale factor for Goldhaber distribution (Phys. Lett. 53B, 306)
if dist=2
scale factor for Morrissey distribution (Phys. Rev. C39, 460)
if dist=3
dP//=dPt MeV/c for Lorentzian distribution
Fwico Coulomb scattering
1 : on
0 : off
Fkauf energy loss in fragmentation
1 : Kaufmann (Phys. Rev. C22, 1897)
-1 : Morrissey (Phys. Rev. C39, 460)
0 : off
Freac fragment production by fission
0 : off
1 : fission energy from table of M.Bernas
2 : old original Viola systematics from 1966
3 : Brosa formula (Nucl .Phys. A502 423C (1989)); Viola style formula but based on theory
4 : Hinde formula (Nucl. Phys. A472 318 (1987)), considers asymmetric fission for TKE in the symmetric case it coincides with new Viola
5 : Wilkins formula (Nucl. Phys. C14, 1832 (1976)) as used by K.-H. Schmidt, considers asymmetric fission
6 : new article by Viola (Phys. Rev. C31, 1550 (1985)) >-1 : two body kinematics (from 3.3) excitation energies of fragment and residue are defined by E1 and E2. theta_min and theta_max are angular range in center of mass system.
-2 : simple model of fusion evaporation reaction (from MOCADI 3.5) fusion process occurs when Ecm is in the window from Bfusion+E1 to Bfusion+E2. When E1<0, E1 is set to 0. When E2≶0, E2 is set to 10. Neutrons are evaporated while excitation energy is above Sn+Erel. The parameters Af and Zf are not used in the mode.
-3: same as Freac=-2, except for fusion process occurs when Ecm is in the window from E1 to E2. (from MOCADI 3.5)
-4 : a simple model of fusion-fission (from 4.0) fusion process occurs when Ecm is in the window from Bfu+E1 to Bfu+E2, where Bfu is fusion barrier in MeV. When E1<0, E1 is set to 0 MeV. When E2<0, E2 is set to 10 MeV. And fission fragment of Af and Zf is measured.
-5: same as Freac=-4, except for fusion process occurs when Ecm is in the window from E1 to E2. (from 4.0)
-100: a simple model of radiative capture reaction.
In case of fission, two body kinematics and fusion evaporation, Fgold, Fkauf are not used.
E1,E2
Freac=-1
excitation energies of outgoing and residual particles in MeV respectively.
Freac=-2,-3,-4,-5
energy window of fusion reaction in the center of mass system in MeV (see Freac)
th_min, th_max
Freac=-1
angular range to consider in calculation of two body kinematics, isotropic between th_min and th_max in the center of mass system in degree
The material list is described in subsection MOCADI manual 3-25.

4.13 WEDGE

The ``WEDGE'' keyword marks to place a wedge-shaped energy degrader.
   
Aw mass of degrader
Zw charge of degrader
rho density in mg/cm3
thickness = thick0 + thick1*X + thick2*X2 mg/cm2
Fklwi small angle scattering
1 :on;
0 :off
Fenstr energy straggling
1 :on
0 :off
Fgold empirical momentum distribution of fragments
1 :Goldhaber (Phys. Lett. 536, 306)
-1 :Morrissey (Phys. Rev. C39, 460)
0 :off
Fwico Coulomb scattering
1:on
0:off
modeu wedge thickness random mode;
0 :degrader thickness fixed
1 :rectangular distribution
2 :Gaussian distribution
thicku0 thick0 = thick0 * (1 + rnd * thicku0)
thicku1 thick1 = thick1 * (1 + rnd * thicku1)
thicku2 thick2 = thick2 * (1 + rnd * thicku2)
The material list is described in subsection mocadi manual 3-25.

4.14 FRAGMENT

calculation of many fragments
mode para
1 loop around selected fragment number of loop around reference
2 use fragment list number of fragments in following lists

4.15 BR_SLIT

Only particles within the specified Brho,X,Y,A,Bgate are transmitted.
A mass
Z charge
E energy in MeV/nucleon
dBrho/Brho momentum width
X0 x-center in cm
Y0 y-center in cm
Xmax horizontal position acceptance in cm
Ymax vertical position acceptance in cm
A0 horizontal angular center in X in mrad
B0 vertical angular center in Y in mrad
Amax horizontal angular acceptance in mrad
Bmax vertical angular acceptance in mrad

4.16 EXPECTED_VALUES

creates an output in the .out file and gives mean values and deviations at the point as follows.
When one use inside of loop, expected-values only for the first and final turn is printed.
  ********* erwartungswerte   1 *********************************************
   i_fragment  =         1
   tr: teilchen  =       5000 wi: teilchen  =        5000.000 (      5000.000)
The values of ``tr: teilchen'' and `` wi: teilchen'' are the number of particles out of the initial number "N" defined in the "BEAM" keyword, which reaches the position with and without reaction loss in matter, respectively. The number in the bracket is normalized by production ratio of the first fragment.
      tr: opt    =          1    tr: total =          1
The values of ``tr: opt'' and `` tr: total'' are optical and total transmission, respectively.
      yield  =     1.75199e-15 particle/incident particle
                       z   =          0.0000cm

     <     x     >=  1.845662e-03 cm     sigma     x     =  1.504662e-01 cm
   max     x      =  2.978668e-01 cm       min     x     = -2.985561e-01 cm

     <     a     >=  3.880326e-02 mrad   sigma     a     =  9.157174e+00 mrad
   max     a      =  3.433984e+01 mrad     min     a     = -3.546690e+01 mrad

     <     y     >= -2.233547e-04 cm     sigma     y     =  1.508757e-01 cm
   max     y      =  2.988374e-01 cm       min     y     = -2.982259e-01 cm

     <     b     >= -7.961342e-02 mrad   sigma     b     =  9.101841e+00 mrad
   max     b      =  2.994561e+01 mrad     min     b     = -2.841818e+01 mrad

     <  energy   >=  6.608078e+02 MeV/u  sigma  energy   =  1.736236e+01 MeV/u
   max  energy    =  7.184377e+02 MeV/u    min  energy   =  6.011868e+02 MeV/u

     <   time    >=  0.000000e+00 mu s   sigma   time    =  0.000000e+00 mu s
   max   time     =  0.000000e+00 mu s     min   time    =  0.000000e+00 mu s

     <  mass     >=  7.594830e+01  u     sigma  mass     =  2.829050e-05  u
   max  mass      =  7.594830e+01  u       min  mass     =  7.594830e+01  u

     <    z      >=  2.800000e+01        sigma    z      =  0.000000e+00
   max    z       =  2.800000e+01          min    z      =  2.800000e+01

     < electrons >=  0.000000e+00        sigma electrons =  0.000000e+00
   max electrons  =  0.000000e+00          min electrons =  0.000000e+00

     <  nf/nsf   >=  1.000000e+00        sigma  nf/nsf   =  0.000000e+00
   max  nf/nsf    =  1.000000e+00          min  nf/nsf   =  1.000000e+00

     <  tof-tim  >=  0.000000e+00 mu s   sigma  tof-tim  =  0.000000e+00 mu s
   max  tof-tim   =  0.000000e+00 mu s     min  tof-tim  =  0.000000e+00 mu s

     <  delta e  >=  8.212329e+03 MeV    sigma  delta e  =  3.961656e+03 MeV
   max  delta e   =  1.522776e+04 MeV      min  delta e  =  1.336284e+03 MeV

     <   brho    >=  1.168379e+01  Tm    sigma   brho    =  1.936613e-01  Tm
   max   brho     =  1.232150e+01  Tm      min   brho    =  1.101235e+01  Tm

4.17 STOP

The ``STOP'' keyword stops the beam and the remaining flight length in matter with mass A and charge Z is calculated. The material list is described in subsection mocadi manual3-25.

4.18 RESET

The ``RESET'' keyword defines the start of the TOF measurement.

4.19 RAND

A Gaussian distribution is randomly added to each variables.
sigma X=X+sigmaX*rand
sigma A=A+sigmaA*rand
sigma Y=Y+sigmaY*rand
sigma B=B+sigmaB*rand
sigma E=E+sigmaE*rand
sigma T=T+sigmaT*rand
sigmaTOF TOF=TOF+sigmaTOF*rand

4.20 SHIFT

The ``SHIFT'' keyword shifts all the ions coordinates by -dX cm, -dY cm, -dZ cm, -dX' mrad, -dY'mrad -dTOF ns.

X=X+dX
Y=Y+dY
Z=Z+dZ
X'=X'+dX'
Y'=Y'+dY'
TOF=TOF+dTOF

4.21 MATTER

Am mass of matter
Zm charge of matter
rho density in mg/cm3
thickness matter thickness im mg/cm2
modeg geometry input mode
dx shift in x-direction in cm
dy shift in y-direction in cm
angle turn angle in degree
Fklwi small angle scattering 1:on, 0:off
Fenstr energy straggling 1:on, 0:off
modeu matter thickness random mode
thicku0 thick0=thick0*(1+rnd*thicku0)
thicku1 thick1=thick1*(1+rnd*thicku1)
thicku2 thick2=thick2*(1+rnd*thicku2)
modeg function g1 g2
0 homogeneous matter
1 degrader slope
[/cm](mode=1)
[](mode=2)
[mg/cm3](mode=3)
2 round wire distance [cm]
3 rectangular wire distance [cm] strip width[cm]
4 hole target hole radius [cm]
modeu
0 degrader thickness fixed
1 rectangular distribution
2 Gaussian distribution
All angles are measured counter clockwise form y-axis.
Additional parameters as follows are calculated from above parameters.
turn_angle_mrad, lr, thick0, thick1, thick2
The material list are described in subsection mocadi manual3-25.

4.22 TABLE

To generate a table with the determined values.
numberof table entry number of table entry
ev* number of"EXPECTED_VALUES" in the input file (e.g. when 3, a value of the 3rd EXPECTED_VALUES is printed)
element* key number from list below
element
1x [cm]
2a [mrad]
3y [cm]
4b [mrad]
5energy [MeV/nucleon]
6time [micro-second]
7masse [amu]
8z
9electrons
10nf/nsf
11range [mg/cm2]
12tof-tim [micro-second]
13delta-e [MeV/nucleon]
14brho [Tm]
15optical transmission, no sigma value
16total transmission, no sigma value
17z-position [cm], no sigma value
18yield(particle/incident particle)
for sigma value, add 100 to respective key number.

4.23 MATRIXFILE

The ``MATRIXFILE'' keyword sets the path name to the directory where the matrix files are read from using the ``MATRIX'' keyword. Please don't forget '/' at the end of the name

4.24 PRIMARY_BEAM

The "PRIMARY_BEAM" keyword is a flag to primary beam as well.
option =0 Atomic charge states are calculated in the same way as for fragments
=1Charge-state distribution is calculated (independent of switch in the keyword "CHARGE_STATES", but the distribution, which is defined in this element is used)

4.25 CHARGE_STATES

The charge-state distribution is calculated. Each ion is randomly assigned a new charge state according to the given probabilities.
number of charge states distribution with n charge states
0offset offset of charge states
0e ions with offset electrons in %
1e ions with offset+1 electrons in %
ne ions with offset+n electrons in %
The fraction missing to 100% is filled up with ions with n-1 electrons The "CHARGE-STATES" keywords can be used up to 9.

4.26 HBOOK1 & HBOOK2

The keyword marks to produces HBook histogram from all ion data at this point,
variables type
xid, yid integer ID number of information which you want to see. 1:x, 2:a, 3:y, 4:b, 5:energy, 6:time, 7:mass, 8:charge, 9:electrons, 10:nf/nst, 11:range, 12:ToF_time, 13:dE, 14:Brho 
xbin, ybin integer number of channels for x and y axis
xmin, xmax real lower and upper edges of X channels
ymin, ymax real lower and upper edges of Y channels

4.27 OPTION

GMOCADI(ROOT)GMOCADI(PAW)
Available options are follows.

4.27.1 PMATRIX

The keyword sets that all matrix elements of all magnets is written to the standard output file "*.out". The order of matrix printed is determined by the order2 parameter set in the ``MATRIX'' keywords.

4.27.2 PCOLL

The keyword sets that the number of particles after passing through each collimator is written to the standard output file ``*.out'' and to a collimator output file ``*.coll''.

4.27.3 LISTMODE

The keyword defines filename and format of the list-mode output. When you select the "TREE" option, MOCADI makes an ROOT entry "T" with a TREE format in an ROOT output file ``*.root''.
In the case of the "NTUPLE" option selected, MOCADI makes NTUPLE entries for all save points with an Row-Wised Ntuple format in the ROOT output file.
When you select the "CWN" option, MOCADI makes an NTUPLE entry "1" with a CWN format in an HBOOK output file ``*.hbk''.
In the case of the "RWN" option selected, MOCADI makes NTUPLE entries for all save points with an RWN format in the HBOOK output file.
The "ASCII" option gives ascii tables. GZASCII is the same but gzipped.
The "TREE" option can be used in the special version of MOCADI. Using this option, MOCADI makes Tree entries of ROOT for all save points. (from version 3-2)
In the case of the ``NONE'' option, MOCADI does not create any list-mode outputs (the "save" keyword is ignored).

4.27.4 ELECTRIC

From version 3.x, matrix elements for electric fields made by GICOSY also can be used in the calculation. To preserve compatibility, this option for electric field calculation was introduced.
When this option is set in the input file and transfer matrix is calculated by GICOSY, the additional matrix elements for the electric field (e.g. [*,M*]) will be used.

4.27.5 ORDER of MATRIX

From version 3.6, the calculation order of all matrix elements specified by the "MATRIX" element can be set. When you select "as written in the matrix cards", the calculation orders specified by the "MATRIX" element is used as same as previous version. When you select "1st", "2nd", "3rd", "4th" and "5th" orders, the orders specified by the "MATRIX" card are ignored and calculation is performed using specified order in the "OPTION" element.

4.28 ATIMA

The keyword defines that MOCADI uses the same formulas for energy loss, energy straggling, and angular straggling in the layers of matter as ATIMA-1.0. (P. Malzacher and C. Scheidenberger, private communications) All material (A,Z) from Z=1 to Z=92 including isotopes, and composite materials or materials in the liquid state are listed in the table below (compounds are identified by using Z higher than 200). Note that the compound materials cannot be used as a target.
a material list with
the ATIMA-1.0 keyword
material AZ
H-Es 1-252 1-99
plastic 0 201
air 0 202
polyethylene 0 203
liquid Hydrogen 0 204
liquid Deuterium 0 205
water 0 206
diamond 0 207
glass 0 208
AlMg3 0 209
Ar_CO2_30 0 210
CF4 0 211
Isobutene 0 212
Kapton 0 213
Mylar 0 214
NaF 0 215
P10_gas 0 216
Polyolefin 0 217

4.29 EPAX

This keyword defines version number of the empirical formula, EPAX, which calculates production cross section of projectile fragments.
c.f.
EPAX-1: K.Sümmerer, et al., Phys. Rev. C 42, 2546 (1990)
EPAX-2: K.Sümmerer, B.Blank, Phys. Rev. C 61, 34607 (2000)
EPAX-3: K.Sümmerer, Phys. Rev. C 86, 014601 (2012).
Using the EPAX1 empirical formula, the fragmentation reaction cross section σ is calculated as
σ = y(Afrag) * exp(-r(Zprob-Zfrag)u) * sqr(r/3.1415926)
where u=1.5 for Zprob > Zfrag and Aproj>33, and u=2.0 for the others.
The keyword can be used to make small modification of the formula
σ = p1 * y(Afrag) * exp(-r(Zprob-Zfrag)u) * sqr(r/3.1415926)
where u=p3 for zprob > Zf and proj>33 and u=p2 for the others.
The projectile fragmentation cross sections was systematically studied by using an 40Ar primary beam impinging on Be and Ta targets at RIKEN. The results suggest to modify the parameter set, p1=0.667, p2=2.0, and p3=1.7. (A. Ozawa, private communications.) Please use this keyword on your own risk.

4.30 RANDOMIZE

The keyword sets initial seed for random number generator.

4.31 LOOP-ENDLOOP

The "LOOP" and "ENDLOOP" elements are used for multi-turn ion-optical system like a storage ring. Number of loops is specified in the "LOOP" card.

4.32 CALL

The "CALL" keyword marks to use an external user function named as name in a shared library (*.so). Note that library should be specified as a full-path name. The function is called with 15 double parametersdpar* and a string (120 characters)option. The source code for the library could look as below in test.c. In the test program, the ion coordinates(out[i]) are defined event by event. If the return value of ext_beam is negative the particle is lost. The maximal number of external functions in a MOCADI input file is 100.

----------------------- test.c --------------------------------------------

int ext_beam(double *in, double *out, double *dpar, char *option)
{
  /* in[0]=X [cm]   in[4]=energy[AMeV] in[8]=electron       in[12]=deltaE[MeV]
     in[1]=X'[mrad] in[5]=time  [us]   in[9]=nf/nsf         in[13]=reserved
     in[2]=Y [cm]   in[6]=mass  [amu]  in[10]=range[mg/c2]  in[13]=reserved
     in[3]=Y'[mrad] in[7]=z            in[11]=tof  [us]
     the element range is valid after the "stop" keyword
     the element deltaE is valid behind energy loss materials
                                          (matter, wedge etc.)
  */
  int i;
  for(i=0;i<14;i++)
    printf("%le\t",in[i]);     /* print all ion-optics parameters */ 
  printf("\n");
  for(i=0;i<15;i++)
    printf("%le\t",dpar[i]);  /* print all numerical parameters */
  printf("\n");
  printf("%s\n",option);       /* print option */
  for(i=0;i<14;i++)
    out[i]=i*10;               /* change ion-optics parameters */ 
  return(0);                   /* when this particle is be lost, the
                                  return value is set to be negative */
}

-----------------------------------------------------------------------------

To create a shared library (e.g. test.so) from a source file (e.g.test.c) the following commands are used.
   gcc -fPIC -c test.c
   gcc -shared -Wl,-soname,test.so -o test.so test.o
the function can be used using a following keyword.
   call /home/iwasa/mocadi/work/test.so ext_beam
   9 4 1.8 19 6 5 100 1 1 1 1 1 0 0 0             
   parameters                                     

4.33 COOLER

redefines the longitudinal and transversal momentum distribution and resets the mean energy as specified by the energy parameter.
modesigma
0 fixed valuerelative shift
1 rectangular distributionfull width
2 Gaussian distributionsigma
3 Lorentzian distributions

4.34 DECAY-IN-MAGNET

The "DECAY-IN-MAGNET" element is an optical element of length[cm] (length) along the optical axis in vacuum. The particles with mass[amu](A)) and nuclear charge[e](Z) can be decay with half-life[ms](half life). When half-life is set to zero, the life-time is infinitely long, but all the particles must decay inside of the element. When Q-value[MeV](Q) is set to zero or higher than Q value to the ground state, Q value is calculated from the mass table, assuming decay to the ground state of daughter nucleus. When turn (turn when the decay occurs)is set to zero, the decay occurs in all turns in a loop. When it is larger than zero, the decay occurs in specified turn only. Presently, only shape=1 (dipole magnet in first order) can be used. Rho value [cm] of dipole magnet is specified to param1. The magnetic rigidity is calculated from information of the reference particle, A_ref [amu], Z_ref , and E_ref [MeV/nucleon]. Note that this keyword moves the z-position by the length specified in the matrix file.
decay_mode
1 alpha decay
2 beta - decay
3 electron capture decay
4 beta + decay
5 proton decay
6 neutron decay
magnetshapeparam1param2
dipole(1st order)1rhonot used

4.35 CROSS-SECTION

Production cross sections of RI beams are read from a file or specified by the table. (from version 3.6). When the mode "read from sigma1.cs" is selected, cross sections read from the "sigma1.cs" in the current directory are used for the MOCADI calculation. The format of "sigma1.cs" is same as LISE++ as follows
! comments
! Z  N  σ[mb]
 82 126 0.3
..........
When the mode "read from a file" is selected and the name of file is specified in the filename entry, cross sections read from the file are used for the MOCADI calculation. The format of the file is as follows
 
* comments
* Z  A  σ[mb]
 82 126 0.3
..........
When the mode "set by parameters" is selected, cross sections specidled Z, A, sigma are set and used for the MOCADI calculation. The number of cross section used should be specified by the number of xsection entry.

5. Plot histograms

One- and two-dimensional histograms produced from ASCII and GZ-ASCII list mode data can be plotted using PLOT->ASCII or PLOT->GZ-ASCII command in the menu. Following windows appears.

To crick "plot" button after filling parameters, histograms can be seen without using PAW or root.

APPENDIX
1. GMOCADI input file

FRS-S4(TA2)
FRS-CaveC(TA2)