ATIMA,  BEAM,  BR_SLIT,  CALL, 
CHARGE_STATES,  COLL,  COOLER,  CROSSSECTION, 
DECAYINMAGNET,  DRIFT,  DRIFTINGAS,  END, 
EPAX,  EXPECTED_VALUES,  FRAGMENT,  HBOOK, 
INFLIGHTDECAY,  LOOPENDLOOP,  MATRIX,  MATRIXFILE, 
MATTER,  OPTION,  PRIMARY_BEAM,  RAND, 
RANDOMIZE,  REACTION_TARGET,  READ,  RESET, 
SAVE,  SHIFT,  SLIT,  STOP, 
TABLE,  TARGET,  WEDGE 
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.

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) 
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) ...... 
decay_mode  
1  alpha decay 
2  beta  decay 
3  electron capture decay 
4  beta + decay 
5  proton decay 
shape  
1  A rectangular position collimator  X0Xmax < X < X0+Xmax, Y0Ymax < Y < Y0+Ymax 
2  A rectangular angular collimator  X0Xmax < A < X0+Xmax, Y0Ymax < B < Y0+Ymax 
3  A elliptical position collimator  ((XX0)/Xmax)^{2} + ((YY0)/Ymax)^{2} < 1 
4  A special position collimator designed for FRS  X0Xmax < X < X0+Xmax, Y0Ymax < Y < Y0+Ymax, abs((XX0)(YY0)) < sig_fac^{2}/2 
At  mass of the target 
Zt  charge of target 
rho  density in mg/cm^{3} 
dist 

Af  fragment mass 
Zf  fragment charge 
thickness  target thickness in mg/cm^{2} 
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 B_{fusion}+E1 to B_{fusion}+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 S_{n}+E_{rel}. The parameters Af and Zf are not used in the mode. 3: same as Freac=2, except for fusion process occurs when E_{cm} is in the window from E1 to E2. (from MOCADI 3.5) 4 : a simple model of fusionfission (from 4.0) fusion process occurs when Ecm is in the window from B_{fu}+E1 to B_{fu}+E2, where B_{fu} 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 E_{cm} 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, F_{gold}, F_{kauf} are not used. 
E1,E2 

th_min, th_max 

At  mass of the target 
Zt  charge of target 
rho  density in mg/cm^{3} 
dist 

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/cm^{2} 
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 B_{fusion}+E1 to B_{fusion}+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 S_{n}+E_{rel}. The parameters Af and Zf are not used in the mode. 3: same as Freac=2, except for fusion process occurs when E_{cm} is in the window from E1 to E2. (from MOCADI 3.5) 4 : a simple model of fusionfission (from 4.0) fusion process occurs when Ecm is in the window from B_{fu}+E1 to B_{fu}+E2, where B_{fu} 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 E_{cm} 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, F_{gold}, F_{kauf} are not used. 
E1,E2 

th_min, th_max 

The ``WEDGE'' keyword marks to place a wedgeshaped energy degrader.
Aw  mass of degrader 
Zw  charge of degrader 
rho  density in mg/cm^{3} 
thickness  = thick0 + thick1*X + thick2*X^{2} mg/cm^{2} 
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) 
mode  para  
1  loop around selected fragment  number of loop around reference 
2  use fragment list  number of fragments in following lists 
A  mass 
Z  charge 
E  energy in MeV/nucleon 
dBrho/Brho  momentum width 
X0  xcenter in cm 
Y0  ycenter 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 
********* erwartungswerte 1 ********************************************* i_fragment = 1 tr: teilchen = 5000 wi: teilchen = 5000.000 ( 5000.000)
tr: opt = 1 tr: total = 1
yield = 1.75199e15 particle/incident particle z = 0.0000cm < x >= 1.845662e03 cm sigma x = 1.504662e01 cm max x = 2.978668e01 cm min x = 2.985561e01 cm < a >= 3.880326e02 mrad sigma a = 9.157174e+00 mrad max a = 3.433984e+01 mrad min a = 3.546690e+01 mrad < y >= 2.233547e04 cm sigma y = 1.508757e01 cm max y = 2.988374e01 cm min y = 2.982259e01 cm < b >= 7.961342e02 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.829050e05 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 < toftim >= 0.000000e+00 mu s sigma toftim = 0.000000e+00 mu s max toftim = 0.000000e+00 mu s min toftim = 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.936613e01 Tm max brho = 1.232150e+01 Tm min brho = 1.101235e+01 Tm
sigmaX  X=X+sigmaX*rand 
sigmaA  A=A+sigmaA*rand 
sigmaY  Y=Y+sigmaY*rand 
sigmaB  B=B+sigmaB*rand 
sigmaE  E=E+sigmaE*rand 
sigmaT  T=T+sigmaT*rand 
sigmaTOF  TOF=TOF+sigmaTOF*rand 
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
Am  mass of matter 
Zm  charge of matter 
rho  density in mg/cm^{3} 
thickness  matter thickness im mg/cm^{2} 
modeg  geometry input mode 
dx  shift in xdirection in cm 
dy  shift in ydirection 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/cm^{3}](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 
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  
1  x [cm] 
2  a [mrad] 
3  y [cm] 
4  b [mrad] 
5  energy [MeV/nucleon] 
6  time [microsecond] 
7  masse [amu] 
8  z 
9  electrons 
10  nf/nsf 
11  range [mg/cm^{2}] 
12  toftim [microsecond] 
13  deltae [MeV/nucleon] 
14  brho [Tm] 
15  optical transmission, no sigma value 
16  total transmission, no sigma value 
17  zposition [cm], no sigma value 
18  yield(particle/incident particle) 
option  =0  Atomic charge states are calculated in the same way as for fragments 
=1  Chargestate distribution is calculated (independent of switch in the keyword "CHARGE_STATES", but the distribution, which is defined in this element is used) 
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 % 
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 
GMOCADI(ROOT)  GMOCADI(PAW) 
The keyword defines that MOCADI uses the same formulas for energy loss,
energy straggling, and angular straggling in the layers of matter as
ATIMA1.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 ATIMA1.0 keyword  

material  A  Z 
HEs  1252  199 
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 
 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 ionoptics 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 ionoptics parameters */ return(0); /* when this particle is be lost, the return value is set to be negative */ }

gcc fPIC c test.c gcc shared Wl,soname,test.so o test.so test.o
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
mode  sigma  
0  fixed value  relative shift 
1  rectangular distribution  full width 
2  Gaussian distribution  sigma 
3  Lorentzian distribution  s 
decay_mode  
1  alpha decay 
2  beta  decay 
3  electron capture decay 
4  beta + decay 
5  proton decay 
6  neutron decay 
magnet  shape  param1  param2 
dipole(1st order)  1  rho  not used 
! comments ! Z N σ[mb] 82 126 0.3 ..........
* comments * Z A σ[mb] 82 126 0.3 ..........