Some hints on running CMOP
Here is a quick way to get the
CMOP code running and fitting:
(I never tested this, some things
might have changed I.N.)
the code only runs on the HPs.
(hopefully this will change soon)
1. If you want
to refit an existing set of MEs you have to convert the set of MEs into
the CMOP-format by using the
program hms_ma/CONVERSION/convert_replay2cmop.
It does convert hms_recon_coeff.dat
into matrixelements.conv.
NOTE It does not convert 0th order MEs nor wire-chamber offsets. You have to change these parameters manually.
Here are the offsets I used (only the first read in by the code):
<y_det> -1.100000000
1.000000000 .0000000000E+00 .0000000000E+00
<drift> 127.7000000
1.000000000 .0000000000E+00 .0000000000E+00
<theta|> 1.5765395437E-03
.0000000000E+00 .0000000000E+00 .0000000000E+00
<y|> .0000000000E+00
.0000000000E+00 .0000000000E+00 .0000000000E+00
<phi|> 1.0955620974E-03
.0000000000E+00 .0000000000E+00 .0000000000E+00
<p|> -8.9475869300E-04
.0000000000E+00 .0000000000E+00 .0000000000E+00
2. Since
this is one of the 3 input files for CMOP you have to copy it to hms_ma/matrixelements.db
or
create a link
to it (which is what I usually do).
3. The 2nd input file for CMOP is called sieveslit.db. It contains the positions of the holes and the slit offsets.
4. The third input
file is target.db. To get an
idea which events you select for the fitting by the variables
test_theta0 = 0.005
; center hole
test_theta1 = 0.0065
; other holes
test_phi0 = 0.005
; center hole
test_phi1 = 0.009565 ;
other holes
you can run the kumac-macro plot_sieve.kumac.
It overlays ellipses with the given two radius on an existing plot
(units are inches).
5. Run the CMOP executable
hms.matrix. When the paw-windows are
up run the macro do_mapping.kumac to
simply
do a mapping with the chosen MEs or run do_all.kumac
to do a fit. Without changes the do_all - macro
does a fit in CMOP-phi
(in-plane-angle).
The macro opens the ntuple hms.slantgood_yp_magn3,
reads in the three input-files, reads in the matrixelements that are
free for fitting and starts the fitting procedure. In
order to see which events are really chosen for the fit, I
added some lines that create a file called hms_accepted.dat,
which contains the y and x position at the slit (in inch) of
the selected events.
6. The code also creates
a file hms_fit_matrix.db that
contains the fitted MEs. For the replay you need to
convert it back with hms_ma/CONVERSION/convert_cmop2replay.
This code takes matrixelements.new
as input and converts
it into "hms_recon_coeff.new".
7. The problem I had
was that I did not have the correct encoder values for the target-position
for the runs I merged and that
I did not have control over which events were selected
for the fitting. The encoder-positions can be found in the file
hms_ma/SRC/target_displacements.f.
If you decide to use another set of runs than I did
you need to set the correct numbers in there and recompile
the code (say "make" after changing to "hms_ma/".
NOTE A fit usually
takes 1-2 hours if you get a 50%-100% CPU-time on ifarmh4 for example.
(need updated numbers)