(For questions and comments contact Vardan Tadevosyan, tadevosn@jlab.org or Hamlet Mkrtchyan, hamlet@jlab.org)
The codes for the HMS calorimeter
calibration are located in the directory
/group/hallc/packages/cal_calibration/
The files are:
- clb-d-hms.f
the fortran code of stochastic adaptive calibration algorithm, originally
developed by Tsolak Amatuni
and adapted for experimental data by V.T.;
- net.f
an auxiliary program;
- h_prt_cal_tracks.f
a modified version of subroutine of conventional replay package which produces
an ASCII file to be
used in the calibration.
The calibration has two steps:
1. Among single track
events the electrons are extracted using cut on the signal of Gas Cherenkov
counter.
2. Then, stochastic
adaptive calibration is performed on the electrons, with additional cut
on the ratio of net calorimeter signal
to the momentum of incoming
particle.
To do the calibration several things should be done:
0. Copy net.f
and
clb-d-hms.f
to your private calibration directory and compile them ("f77 -o net
net.f" and "f77 -o clb-d-hms clb-d-hms.f").
1. Copy h_prt_cal_tracks.f
to
replay/SRC.
Be sure that you have the correct versions of h_cal.f,
h_correct_cal_neg.f,
and h_correct_cal_pos.f
in your replay/SRC (or copy from /group/hallc/packages/cal_calibration/)
2. Add
h_prt_cal_tracks to the engine Makefile.
Then "make" in SRC.
3. Set
hcal_fv_test = 1
in replay/PARAM/hcal.param
(this tells replay to examine
geometrical boundaries of the calorimeter).
4. Set
hcal_num_neg_columns = 2
in replay/PARAM/hcal.pos
(to take into account both left
and right side PMTs of modified first two layers of the calorimeter).
5. Set
hdbg_tracks_cal = 1
and hlun_dbg_cal = 66
in replay/PARAM/hdebug.param
(to call h_prt_cal_tracks
subroutine).
6. "replay run=[run_number]".
This will produce the
ASCII file fort.66 or ftn66
(platform dependent), with the necessary information for the HMS calorimeter.
7. Move the file
fort.66 (produced by engine) to your
private calibration directory.
8. "net < fort.66
> clb_hms.dat".
Here you get lower and
upper thresholds on the ratio of the net signal of the calorimeter to the
momentum of incoming particle.
The net signal is calculated
in the assumption that the calibration constants are 0.5 for the PMTs of
the first two modified layers and 1. for the rest.
The thresholds will be
used in the sequel to cut out the hadrons survived the cut on Gas Cherenkov
signal.
This must be done for
each kinematic setting, beam current and target. The program also generates
event by event ratios in the file fort.99.
It is strongly recommended
to visualize the distribution of the ratios and check the calculated thresholds
with histogram, because the thresholds
may be wrong
when there is significant hadron background.
9. "clb-d-hms
< fort.66". This calculates the calibration constants, produces
two output files:
- fort.77,
the calibration constants in the format usable in replay; can be put in
replay/PARAM/hcal.param
to be used;
- fort.88,
an auxiliary file with event by event energy deposition of the calibrated
calorimeter (in MeV), momentum of incoming particle (in MeV),
x and y coordinates
of impact point on the front surface of the calorimeter; may be used for
checking the quality of the calibration.
The last step takes several
minutes, so be patient. The program iterates through the events until the
convergence of the calibration
constants of all the modules.
Sometimes, when the peripheral modules are not elucidated enough, or when
the step size is not small enough,
the convergence
doesn't take place. In that cases the remedy is, you guess, to go to smaller
iteration steps (parameter step_size
in clb-d-hms.f).