RS Light Yield and Attenuation Length Calculations
General Description
This study is a part of the TD energy calibration.
It was originally done by Millind.
If you would like to know some backgrounds about this study, you can
find his tech note in E787 TN-362.
For the use of E949, some modifications were made which were mainly the
change of RS layers (21 layers to 19 layers)
and the use of RS TDCs for a track finding. The recent modification was
that a track which pass through the layer 19
was allowed in the fcn_trkrng.F. This modification made the correct
range calculation in layer 19 possible.
Utilities
- For ntuple creation
- pass2_anal_tdcal.csh : PASS2 run script
The utilities below are available here.
- For histogram creation
- run_km22_2002.kumac : kumac to run the script
- infiles_km22_2002.kumac : kumac to "nt/loop"
- km22_2002.f : main comis function to analyze ntuples
- load_km22_2002.kumac : kumac to define histograms
- myfunc_dir/*.f : comis functions
- For plots and calib. files creation
- plot_att.kumac : kumac to calculate attenuation length
- result_gain.txt : list of gain correction factor counter by
counter
- result_att.txt : list of attenuation length counter by counter
- plot_npe.kumac : kumac to calculate light yield
- result_pe_all.txt : list of light yield counter by counter
- att_years.kumac : kumac to plot year dependence of attenuation
length
- attXX.txt : lists of attenuation length counter by counter
for year XX
- npe_years.kumac : kumac to plot year dependence of light yield
- npeXX.txt : lists of light yield counter by counter for
year XX
How to do the study?
In order to create ntuples for this study, some
special subroutines other than the standard
PASS2 code are needed. You need to copy the
files below into your PASS2 source directory and
modify your 'Makefile' to include these
subroutines.
- eboth96.F : calculate path length in
each track counter.
- fcn_trkrng.F : special trkrng to
allow a track to pass through layer 19. (if you want to use)
Once your own executable is created, you should run
it on ## km22 ## monitor data.
A run script 'pass2_anal_tdcal.csh'
is available here. The script has
three arguments.
<< usage >>
%
pass2_anal_tdcal.csh [data directory] [output directory] [# of jobs]
For example,
% pass2_anal_tdcal.csh /data1/e949/data/km22 ./nt 4
<< Arguments >>
data directory : Directory containing raw data to run
output directory : Directory to put ntuples and log files
# of jobs : The maximum number of jobs allowed to run
simulteneously on a machine.
You
should type a value less than the number of CPUs on a machine.
After your PASS2 job is finished, you should run the
paw job. If the ntuples are distributed on
many machines and you want to run the paw job on each machine, you can
use 'distributed paw jobs'.
The instruction can be found in a Joe's
message. You can use a script run_dist_paw.csh,
but
you need to modify it based on your machine
environment.
At first, you need to create an include file pass2nt.inc.
% uwfunc
Enter ntuple file name: [km22_50218.nt.001, for example]
Enter ntuple # [ 1]: [return]
Enter generated file name [uwfunc]: [pass2nt, for example]
Open input file: km22_50218.nt.001
An include file 'pass2nt.P' will be created.
You should rename it.
% mv pass2nt.P pass2nt.inc
You can then run paw jobs by manual or the script.
<< By manual >>
% paw <
km22_2002.input
or
% paw <
km22_2002.input >& logfile
==> output histogram file : histfile.km22_2002.xxx (xxx is 3 digit
number like 001)
<< By the script >>
% run_dist_paw.csh
km22_2002
==> output histogram files : histfile.km22_2002.xxx.machine
('machine' means the machine's hostname)
Note that the comis function 'km22_2002.f' does not use any tight
cuts. If you want to use them,
you should modify km22_2002.f.
In the next, you should create calibration files for light yield and attenuation
length.
In paw, you need to type commands as follows,
PAW >
hist/file 1 histfile.km22_2002.001
if you ran paw
jobs on several machines, chain all of them.
PAW > chain f histfile.km22_2002.001.machine1
PAW > chain f histfile.km22_2002.001.machine2
....
PAW > cd //f
Then, execute kumac files.
PAW > exec plot_att
==> result_att.txt and result_gain.txt will be created.
PAW > exec
plot_npe
==> result_pe_all.txt will be created.
You should confirm that values in the output
text files are correct.
Sometimes fittings of histograms are bad and calculations screw up.
In this case, you should fit the histograms by hand.
Finally, you create some plots to see the year
dependence of the light yield and attenuation length.
What you do is just to execute the scripts att_years.kumac and npe_years.kumac in paw.
PAW > exec
att_years
PAW > exec
npe_years
Then you can see the plots on the display (attenuation
length and light yield).
If you want to add new
data points, you need to modify the kumac files.
I think you can easily modify the kumac in the same way as done there.
T. Sekiguchi. 07/29/2004