ANL GEBSort and Analysis Codes

From GammaSphere DAQ
Revision as of 19:56, October 18, 2021 by Copp (talk | contribs)
Jump to navigation Jump to search

README.bin_dgs October, 2021

This is copied from the README.bin_dgs written by Torben in October, 2021 to incorporate Shaofei's latest Pole Zero correction algorithm.

Intro

Bin_dgs.c has three algorithms from Shaofei: 0, 1 and 2. You specify which one to use in the chatfile.

Algo 0 is the one we have used so far and requires m1begin...m2end data to be in the header. That is true for header types 3/4 and 5/6. The new data format 7/8 will not have this information; but algo's 2 and 3 should work just fine.

Instructions for using algo 0 is on the wiki and will not be discussed here (go to analysis codes). Here we discuss algo 2 first. The instructions will be rather terse; but you should be able to copy/paste most of it to get a good start.

To get the GEBSort package

git clone https://gitlab.phy.anl.gov/tlauritsen/GEBSort.git

GEBSort chat file:

# parameters for bin_dgs
# algo 0: old SZ. Requires: header type 3/4 or 5/6
# algo 1: simple SZ algo. Requires: dgs_PZ
# algo 2: high rate algo. Requires: dgs_PZ, dgs_factor, t1 and t2 
#         extrapolation below t2. Factor sampled bt t2...t1 (t1>t2)
dgs_algo    2
dgs_MM      200
dgs_KK      141
dgs_SZ_t1   50
dgs_SZ_t2   20
dgs_PZ      dgs_pz.cal
dgs_ecal    dgs_ehi.cal
dgs_factor  dgs_factor.dat

to find M and K, look in the .save file of your data. Here is an example:

caput GLBL:DIG:d_window 0.06
caput GLBL:DIG:k_window 0.20
caput GLBL:DIG:m_window 2.00
caput GLBL:DIG:k0_window 0.80
caput GLBL:DIG:d3_window 0.20
# fe 0.06+0.20+0.80+0.20+0.15 = 1.41 or 141 10ns unit
                         ^
                         +------ this one is extra

Source/cal sort:

Make a link to where the data is, and where to find GEBSORT

rm GTDATA;  ln -s /run/media/tl/20200719_1530/user/gsfma370/100 GTDATA
rm GEBSORT; ln -s /home/tl/d6/GEBSort GEBSORT

Clean so we don't find old stuff

rm *.spe *.var
rm dgs_pz.cal
rm dgs_ehi.cal
rm dgs_factor.dat
rm test.root

Find basic PZ. You may want to edit the file if you know better than the SZ_basic_PZ program. The first argument to the program is 1/lambda. 200 is the M we are using here.

GEBSORT/SZ_basic_PZ 3251.342285 200 1.000 > dgs_pz.cal

Find the extrapolation factor values (content of go_one.sh is below)

./go_one.sh
GEBSORT/SZ_factor test.root factor dgs_factor.dat

Energy calibration. You may have to find the coefficients for some detectors by hand (blame the detector)

./go_one.sh
rootn.exe
dload("test.root")
.x GEBSORT/get_eraw.cc
.q
GEBSORT/dgs_ecal dgs_ehi.cal 207Bi 900 1.0

Final sort with PZ, ecal, and factor

./go_one.sh
rootn.exe
dload("test.root")
d2("EhiCln")
pjx("EhiCln","xx")
d1("xx",0,1200)
d2("vdcXsum1_081")
d2("eXdtev")
d2("dtev")
d3("vdcXsum1")
d2("factor")
.x GEBSORT/get_ecln.cc
.q

Use gf3 and d_ecal.cmd to see all detectors that are enabled and verify their spectra look good.

Go back to