If you have super user account, please type following commands.
BEAM
N
E0, T0, mass, charge,
electron
modeXA
maxX, maxA,
rXA,X0, A0
modeYB
maxY, maxB, rYB,
Y0, B0
modeET
maxdE, maxdT, rET,
E1, T1
N ions of the primary beam with charge, mass, and 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, sigma*=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/maxdE)2 + (dT/maxdT)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 sigmaX=maxX, sigmaA=maxA, sigmaY=maxY, sigmaB=maxB, sigmaE=maxdE, sigmaT=maxdT, (only for modeXA) |
The "READ" keyword marks to read ion coordinates from listmode file of filename instead of using the "BEAM" keyword. Note, only either "BEAM" or "READ" can be used as event generator, not both on the same file.
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) ...... |
DRIFT
length
The "DRIFT" keyword defines a distance of length[cm] along the optical axis in vacuum.
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[mg/cm2]. Fklwi and Fenstr are flags (1:on, 0:off) to calculate angular and energy straggling, respectively.
The "IN-FLIGHT-DECAY" keyword defines a drift element of length[cm] along the optical axis in vacuum. Particles with mass[amu] and nuclear charge[e] can decay with a distribution along the path according to their half-life[ms]. When half-life is set to zero, all particles must decay inside the given length. When Q-value[MeV] is set to zero or is higher than the Q-value to the ground state a new Q-value is calculated from the mass table, assuming decay to the ground state of the daughter nucleus. When turn is set to zero, the decay can occur in all turns of a loop. In case of possitive value, the decay can occur only in corresponding turn of the loop.
decay_mode | |
1 | α decay |
2 | β- decay |
3 | electron capture decay |
4 | β+ decay |
5 | proton decay |
6 | neutron decay |
or
COLL
shape, X0, Y0, Xmax,
Ymax, sig_fac
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 |
XMIN, XMAX, YMIN, YMAX
The "SLIT" keyword defines a rectangular collimator (XMIN < X < XMAX, YMIN < Y < YMAX)
or
MATRIX, filename, order1, order2, A0, Z0, E0
The "MATRIX" keyword marks to place a part of an electro-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 (GICOSY matrix is tested).
The matrix parameters up to order1th order
are used in the calculation (max. up to 3rd order).
The magnetic rigidity is
calculated from information of the reference particle, A0
[amu], Z0 , and E0 [MeV/nucleon]. Note
that this keyword moves the z-position by the length specified
in the matrix file.
The "TARGET" keyword places a target.
At | mass number of target |
Zt | nuclear charge of target |
rho | density in mg/cm3 |
distr |
|
E1,E2 |
|
θmin θmax |
|
Af | fragment mass |
Zf | fragment nuclear charge |
mode | thickness input mode
1,2 : thickness in ratio of range of reference particle 3,4 : thickness in cm 5,6 : thickness in mg/cm2 |
thickness | target thickness |
Aref | mass of reference particle |
Zref | charge of reference particle |
Eref | energy of reference particle [MeV/nucleon] |
Fklwi | small angle scattering
1 : on 0 : off |
Fenstr | energy straggling
1 : on 0 : off |
Fgold | parameter to scale the width of momentum distribution.
The usual value is 1.
|
Fwico | Coulomb scattering 1 : on 0 : off |
Fkauf | energy loss in fragmentation
0 : off 1 : Kaufman (Phys. Rev. C22, 1897) -1 :Morrissey (Phys. Rev. C39, 460) -2 :parabolic formula by Notani (Phys. Rev. C76, 044605) with e=12MeV (E<200AMeV) -3 :parabolic formula by Notani (Phys. Rev. C76, 044605) with e=8MeV |
Freact | select reaction mode
0 : fragmentation 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 : D.J. Hinde et al.'sformula (Nucl. Phys. A472 318 (1987)), considers asymmetric fission for TKE, symmetric coincides with new Viola 5 : B.D. Wilkins et al.'s formula (Phys. Rev. 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. θmin and θmax are angular range in center of mass system. -2 : a simple model of fusion evaporation reaction (from 3.5) 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. Neutrons are evaporated while excitation energy is above Sn+Erel. The parameters Af and Zf are not used in the mode. -3: same as Freact=-2, except for fusion process occurs when Ecm is in the window from E1 toE2. (from 3.5) In case of fission, two body kinematics, and fusion-evaporation, Fgold, Fkaufare not used. |
The "REACTION-TARGET" keyword places 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.
At | mass of the target | ||||
Zt | charge of target | ||||
rho | density in mg/cm3 | ||||
distr |
|
Af | fragment mass number |
Zf | fragment nuclear charge |
ID | fragment ID to select reacting particle 0: from primary beam 1: from fragment defined in the TARGET keyword, n: from full list of fragments entry number n, 1=defined in TARGET others: no reaction |
mode | thickness input mode
1,2 : thickness in ratio of range of reference particle 3,4 : thickness in cm 5,6 : thickness in mg/cm2 |
thickness | target thickness |
Aref | mass of reference particle |
Zref | charge of reference particle |
Eref | energy of reference particle [MeV/nucleon] |
Fklwi | small angle scattering
1 : on 0 : off |
Fenstr | energy straggling
1 : on 0 : off |
Fgold | parameter of scale the width of momentum distribution distr>=0, scale factor for chosen distribution, see parameter distr. distr<0, the absolute of Fgold is used to scale the width of the Morrissey distribution. The mode is automatically switched to Morrissey to be compatible with old input files. |
Fwico | Coulomb scattering
1 : on 0 : off |
Fkauf | energy loss in fragmentation
0 : off (velocity of fragment= velocity of projectile) 1 : Kaufmann (Phys. Rev. C22, 1897) -1 : Morrissey (Phys. Rev. C39, 460) -2 : parabolic formula by Notani with e=12MeV (E<200AMeV) -3 : parabolic formula by Notani with e=8MeV |
Freact | select reaction mode
0 : fragmentation 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 : D.J. Hinde et al. Nucl. Phys. A472 318 (1987), considers asymmetric fission for TKE in the symmetric case it coincides with new Viola 5 : B.D. Wilkins et al. Phys. Rev. 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. θmin and θmax are angular range in center of mass system. -2 : a simple model of fusion evaporation reaction (from 3.5). 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. Neutrons are evaporated while excitation energy is above Sn+Erel. The parameters Af and Zf are not used in the mode. -3: same as Freact=-2, except for fusion process occurs when Ecm is in the window from E1 to E2. (from 3.5) In case of fission, two body kinematics, and fusion evaporation, Fgold, Fkauf are not used. |
The "WEDGE" keyword marks to place a wedge-shaped energy degrader.
Aw | mass number of degrader material |
Zw | nuclear charge of degrader material |
rho | density in mg/cm3 |
thickness = thick0 + thick1*X + thick2*X2 |
mode | input mode of degrader thickness
1,2: thickness in fraction of the range of the reference particle 3,4: thickness in cm 5,6: thickness in mg/cm2 7,8: curved sheet thickness in cm 9,10: curved sheet thickness in mg/cm2 11,12: polynomial of curve z(x) in cm 7,9,11 defines sheet bend to +z for positive x 8,10,12 defines sheet bend to -z for positive x |
Aref | mass of reference particle |
Zref | charge of reference particle |
Eref | energy of reference particle [MeV/nucleon] |
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 |
Fchstr | charge-state straggling (from 3.3)
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) |
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 |
A | mass |
Z | charge |
E | energy in MeV/nucleon |
dBrho/Brho | momentum width in % |
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 |
********* erwartungswerte 1 ********************************************* i_fragment = 1 tr: teilchen = 5000 wi: teilchen = 5000.000 ( 5000.000)
tr: opt = 1 tr: total = 1
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 < energie >= 6.608078e+02 MeV/u sigma energie = 1.736236e+01 MeV/u max energie = 7.184377e+02 MeV/u min energie = 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
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 us.
X=X+dX
Y=Y+dY
Z=Z+dZ
X'=X'+dX'
Y'=Y'+dY'
TOF=TOF+dTOF
Am | molar mass of matter (0 = std. average molar mass) |
Zm | nuclear charge of matter |
rho | density in mg/cm3 |
mode | target thickness input mode | ||||
parameter | t1 | t2 | t3 | t4 | |
1 | reference | fraction | mass | charge | energy |
2 | cm | thickness | |||
3 | mg/cm2 | thickness |
modeg | geometry input mode | ||
parameter | 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] |
dx | shift in x-direction in cm |
dy | shift in y-direction in cm |
turn_angle | in degree around z-axis |
Fklwi | small angle scattering 1:on, 0:off |
Fenstr | energy straggling 1:on, 0:off |
Fchstr | charge-state straggling 0:off 1: (0.5 .. 1.5) built in GLOBAL x-sections, simple scaling q2*Fchstr for dE/dx(q) 2: built in GLOBAL x-sections, dE/dx(q) from special spline files -1: (-0.5 .. -1.5) ext. x-sections table, simple scaling q-2*Fchstr for dE/dx(q) -2: ext. x-sections table, dE/dx(q) from special spline files |
modeu | matter 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) |
n | number of table entry |
erwa | 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 [micro-second] |
7 | masse [amu] |
8 | z |
9 | electrons |
10 | nf/nsf |
11 | range [mg/cm2] |
12 | tof-tim [micro-second] |
13 | delta-e [MeV/nucleon] |
14 | brho [Tm] |
15 | optical transmission, no sigma value |
16 | total transmission, no sigma value |
17 | z-position [cm], no sigma value |
18 | yield(particle/incident particle) |
directory | name of the directory for matrix input |
default: current directory |
primcharge | =0 | Atomic charge states are calculated in the same way as for fragments |
=1 | Charge-state distribution is calculated (independent of switch in the keyword "CHARGE_STATES", but the distribution, which is defined in this element is used) |
n | distribution with n charge states |
offset | offset of charge states. default 0 (from version 3-5) |
prob0 | ions with offset electrons in % |
prob1 | ions with offset+1 electrons in % |
prob(n-1) | ions with offset+n-1 electrons in % |
special option:
n<0 | Z_t |
... |
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 |
The keyword defines that MOCADI uses the spline files calculated by
ATIMA for energy loss,
energy-loss straggling, and angular straggling in the layers of matter.
All material (A, Z) from Z=1 to Z=99 including isotopes,
and in addition some composite materials or materials in other state are listed in
the table below (compounds are identified by using Z higher than 200).
The isotopic composition is important for nuclear reactions and the number of
atoms in a target with given mass per area.
The standard average molar mass can be chosen with input A=0.
Note that compound materials cannot be used as a target.
From version 3.2, MOCADI uses only ATIMA spline files for energy-loss, the
older tables are not supported anymore.
a material list with the ATIMA-1.0 keyword | ||
---|---|---|
material | A | Z |
H-U | 0-238 | 1-92 |
Np-Es | 237-252 | 93-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 (3% Mg) | 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 |
CmO2 | 0 | 218 |
Suprasil2(glass) | 0 | 219 |
HAVAR | 0 | 220 |
----------------------- 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 */ }
-----------------------------------------------------------------------------
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 | width parameter | |
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 82 125 1.2 ...
mode | param1 | param2 | |
1 | <q> | σq | |
2 | Zm | Shima formula | |
3 | Zm | GLOBAL x-sections |
*.out | standard output file |
*.coll | collimator output file |
*.tab | table output file (when you use TABLE keyword in input file) |
*.hbk | HBOOK output file including NTUPLE output (when you use HBOOK or SAVE keywords in input file) |
*.lmdi | SATAN output file |
*.asc | list-mode output file in the ASCII code |
*.asc-gz | gzipped list-mode output file in the ASCII code |
*.root | ROOT/TREE list-mode output file |
% PAW ****************************************************** * * * W E L C O M E to P A W * * * * Version 2.06/00 9 November 1994 * * * ****************************************************** Workstation type (?=HELP)=1 :
Version 1.21/12 of HIGZ started PAW >
PAW > H/file 44 B8.HBK (open Hbook file B8.HBK on the unit 44) PAW > h/list ===>Directory : 1 (N) Save when you use CWN format 1 (N) Save 1 \ 2 (N) Save 2 when you use RWN format 3 (N) Save 3 / 101 (2) 1:x*y \ 102 (2) 2:x*y when you use HBOOK command 103 (2) 3:x*y /
PAW > h/plot 101 (plots a scatter plot of a 2D-histogram 101) PAW > contour 101 (draws a contour plot of a 2D-histogram 101) PAW > surface 101 (plots a scatter plot of a 2D-histogram 101 as 3 dim. view)
PAW > n/print 1 (print information at save 1) ******************************************************** * NTUPLE ID= 1 ENTRIES= 103579 Save 1 ******************************************************** * Var numb * Name * Lower * Upper * ******************************************************** * 1 * X * -.164687E+01 * 0.176604E+01 * * 2 * A * -.137222E+02 * 0.135885E+02 * * 3 * Y * -.134754E+01 * 0.136219E+01 * * 4 * B * -.629065E+01 * 0.626050E+01 * * 5 * energy * 0.256659E+03 * 0.271148E+03 * * 6 * time * 0.923414E+00 * 0.977539E+00 * * 7 * mass * 0.802461E+01 * 0.802461E+01 * * 8 * z * 0.500000E+01 * 0.500000E+01 * * 9 * electron * 0.000000E+00 * 0.000000E+00 * * 10 * nf_nsf * 0.888366E+00 * 0.896811E+00 * * 11 * range * 0.000000E+00 * 0.000000E+00 * * 12 * tof * 0.923414E+00 * 0.977539E+00 * * 13 * dE * 0.343888E+03 * 0.376508E+03 * * 14 * brho * 0.000000E+00 * 0.000000E+00 * * 15 * weight * 0.000000E+00 * 1.000000E+00 * ******************************************************** PAW > n/plot 1.x (plot an 1D-histogram of x position at save 1) PAW > n/plot 1.x%y (plot a 2D-histogram of x v.s. y of save 1) PAW > n/plot 1.x Energy>100 (plot an 1D-histogram of x gated by E>100 A MeV)
Note that units of position, angle, energy, time, and rigidity are cm, mrad, MeV/u, micro-seconds, and MeV/c, respectively.
PAW > n/print 1 (print information) ****************************************************************** * Ntuple ID = 1 Entries = 10000 SAVE ****************************************************************** * Var numb * Type * Packing * Range * Block * Name * ****************************************************************** * 1 * I*4 * * [0,15] * TEILCHEN * N * 2 * R*4 * * * TEILCHEN * X(N) * 3 * R*4 * * * TEILCHEN * A(N) * 4 * R*4 * * * TEILCHEN * Y(N) * 5 * R*4 * * * TEILCHEN * B(N) * 6 * R*4 * * * TEILCHEN * ENERGY(N) * 7 * R*4 * * * TEILCHEN * TIME(N) * 8 * R*4 * * * TEILCHEN * MASS(N) * 9 * R*4 * * * TEILCHEN * Z(N) * 10 * R*4 * * * TEILCHEN * ELNUM(N) * 11 * R*4 * * * TEILCHEN * TOF(N) * 12 * R*4 * * * TEILCHEN * DE(N) * 13 * R*4 * * * TEILCHEN * BRHO(N) * 14 * R*4 * * * TEILCHEN * WEIGHT(N) * 15 * R*4 * * * TEILCHEN * RANGE ****************************************************************** * Block * Entries * Unpacked * Packed * Packing Factor * ****************************************************************** * TEILCHEN * 10000 * 724 * Var. * Variable * * Total * --- * 724 * Var. * Variable * ****************************************************************** * Blocks = 1 Variables = 13 Max. Columns = 181 * ****************************************************************** PAW > n/plot 1.x(1) (plot an 1D-histogram of x at save 1) PAW > n/plot 1.x(2) n>=2 (plot an 1D-histogram of x at save 2) PAW > n/plot 1.x(1)%y(1) (plot a 2D-histogram of x v.s. y at save 1) PAW > n/plot 1.x(1) N>=2 (plot an 1D-histogram of x at save 1 gated by events passing though to save 2) PAW > n/plot 1.x(1)%x(2) (plot a 2D-histogram of x at save 1 and x at save 2) PAW > n/plot 1.x(1)%mass(1) ! ! ! ! box (plot transmission for each fragment) PAW > n/plot 1.z(1)%mass(1) weight(1) ! ! ! box (plot yield of each fragment) PAW > n/plot 1.x(1) z(1)=5&&mass(1)>8&&mass(1)<9&&weight(1) (plot yield of 8B as a function of x at save 1) PAW > n/plot 1.range range>0&&z(1)=5&&mass(1)>8&&mass(1)<9 (plot range of 8B in the matter described by the "stop" keyword)
Note that units of position, angle, energy, time, rigidity, weight, and range are cm, mrad, MeV/u, micro-seconds, Tm, particle/incident particle, and mg/cm2, respectively. In case you get an error message about the array index, probably the ion with a certain index was cut off due to the collimators. Try adding a condition to avoid this error, e.g. nt/plot 1.x(3) N>=3. In this case PAW looks only at ions with array at least 3 and no error will occur.
PAW > for/file 45 MOCADI.ps (open a postscript file "MOCADI.PS" on the unit 45) PAW > metafile 45 -111 (activate postscript-output on the unit 45)
PAW > close 45 (close the postscript file) PAW > shell lpr -P"printer name" MOCADI.ps (print the postscript file to the printer psaf)
PAW > opt zfl1
PAW > pic/print filename.ps PAW > shell lpr -P"printer name" filename.ps
PAW > close 44 (close hbook file for the unit number 44) PAW > exit %
TH1F *h1b= new TH1F("h1b","h1b title",80,-4,4);
(create a second 1dim. histogram)
T->Draw("x[0]>>h1b","x[0]<-4");
(plot histogram filled with x[0] and condition)
h1->Draw();
(plot old histogram "h1")
h1b->Draw("SAME");
(plot new histogram "h1b" on top of previous picture)
In this case you need a full function, which is compiled first and then
loaded from a library.
It gets the entries from the ROOT Tree, manipulates them and fills a histogram.
Here is an example which plots the nuclear charge derived from a calculated
energy loss.
.L plot.C
(compile and create library)
music("mus86-18.root",0.17);
(call function to create histograms and plot)
------------------------- the file plot.C --------------
// macro for plotting MOCADI data in root tree, file plot.C
// Helmut Weick, 01.06.2010
// first compile:
// .L plot.C++
//
// for file mus86-18.root.root with dZi=0.17
// music("mus86-18.root",0.17);
// filename = MOCADI output file
// dzi = intrinsic MUSIC resolution without charge exchange
Float_t MUSIC_Z1(Float_t e1, Float_t e2, Float_t coeff);
void music(char* filename="test.root", Double_t dzi=0.)
{
Int_t n;
Float_t x[15], a[15], y[15], b[15], energy[15], time[15], mass[15],
z[15],
elnum[15], tof[15], de[15], brho[15], weight[15], range, tpos;
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
// check file
if (f==NULL) {
cout << "Opening " << filename << endl;
f = new TFile(filename);
if (!f->IsOpen()) return;
} else {
// cout << "File " << filename << "
already opened..." <<endl;
f->ReOpen("READ");
}
// read Tree
TTree *tree = (TTree*)f->Get("T");
tree->SetBranchAddress("n",&n);
tree->SetBranchAddress("x",&x);
tree->SetBranchAddress("a",&a);
tree->SetBranchAddress("y",&y);
tree->SetBranchAddress("b",&b);
tree->SetBranchAddress("energy",&energy);
tree->SetBranchAddress("time",&time);
tree->SetBranchAddress("mass",&mass);
tree->SetBranchAddress("z",&z);
tree->SetBranchAddress("elnum",&elnum);
tree->SetBranchAddress("tof",&tof);
tree->SetBranchAddress("de",&de);
tree->SetBranchAddress("brho",&brho);
tree->SetBranchAddress("weight",&weight);
tree->SetBranchAddress("range",&range);
tree->SetBranchAddress("tpos",&tpos);
// clean the old spectra from memory
TH1F *h=NULL;
h= (TH1F*)gROOT->FindObjectAny("hz1");
if (h!=NULL) delete h;
TH1F *hz1 =new TH1F("hz1" ,"MUSIC Z1",300,80,92);
// loop to fill histograms
Int_t nentries=tree->GetEntries();
if(nentries>nplot) nentries = nplot ;
Float_t z1=0;
for(Int_t i=0; i<nentries; i++){
tree->GetEntry(i);
z1=MUSIC_Z1(energy[0],energy[1],2.184);
z1=z1 + gRandom->Gaus(0,dzi);
hz1->Fill(z1);
}
// plot histogram
hz1->Draw();
}
-------------------------------------------------------------
This page was last modified by Dr. Helmut Weick,25th May 2018,
contact h.weick(at)gsi.de,
Imprint (Impressum),
Privacy Policy (Datenschutzerklärung)