TPC calibration: Run10 T0 calibration using "prompt" hits

working directory: /star/u/mnaglis/lbl/T0

needed subrirectories: log, jobs, res

 

BFC chain: run_bfc.C

options for low luminocity: "P2010a BEmcChkStat Corr4"

option for high luminocity: "P2010a BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D"

 

Run10 low luminocity run (Full Field): /star/data03/daq/2010/007/11007019/

Run10 low luminocity run (Reversed Field): /star/data03/daq/2010/XXX/XXXXXXXX

 

Condor submitter: submitter.sh M N O DAQFILE jobname

                              M - how many jobs to submit

                              N - number of the first job

                              O - number of event per job

                              DAQFILE - full path to the daq file

                              jobname - name of the job

 

To check job status:  condor_q -submitter mnaglis

 

We use code based on St_QA_Maker, located /star/u/mnaglis/lbl/T0/StRoot/St_QA_Maker

Code accumulates 2X24 two dimensinal histograms for TPC hits with Z >195 cm || Z <-195 cm:

hz_secXX  - Z vs. padrow

ht_secXX  - time bucket vs. padrow

These histograms are stored in the output tags files in /star/u/mnaglis/lbl/T0/out

Examples of the histograms are shown below:

 

To process X events from run11007019:

1) Since I don't know how many events in each segment I submit jobs for 1000 events per segment

submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_1010001.daq f1010001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_1020001.daq f1020001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_1030001.daq f1030001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_1040001.daq f1040001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_2010001.daq f2010001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_2020001.daq f2020001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_2030001.daq f2030001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_2040001.daq f2040001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_3010001.daq f3010001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_3020001.daq f3020001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_3030001.daq f3030001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_3040001.daq f3040001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_4010001.daq f4010001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_4020001.daq f4020001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_4030001.daq f4030001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_4040001.daq f4040001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_5010001.daq f5010001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_5020001.daq f5020001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_5030001.daq f5030001
submitter.sh 100 0 10 /star/data03/daq/2010/007/11007019/st_physics_11007019_raw_5040001.daq f5040001

2) hadd hbz_11007019_evt.root ./out/st*

There is a macro hadd.pl which can merge files one by one in cases when system cannot handle too many open files.

3) hardcode hbz_11007019_evt.root into the first line of fit.C

4) root fit.C

This macro slices two dimention histograms along padrow axis, and fit "prompt hits" peak with a Gaussian. Histograms and ntuple with fit paramters are stored in the res directory.

Extracted mean parameters as a function of padrow are shown below (for sectors 1-6):

5) Extract drift velosity from one of the log files:

grep StMagUtilities::DriftVel log/f1010001_1.out
StMagUtilities::DriftVel      =  5.5232 cm/microsec

6) Anode wires position is 209.6 cm for outer sectors and 209.4 cm for inner sectors. Since prompt hits do not experience much drift, we expect to see mean Z at 209.6 cm and 209.4 for outer and inner sectors, respectively. Given the RHIC Clock frequency f=9.383160 MHz, we can calculate the difference between measured and expected position of the "prompt hits" in time buckets.

If Z0 is the position of the anode wires, and Z is the measured "prompt hits" position along the beam axis,

then dt = (Z-Z0)*f/DriftVel

7) hardcode output filename into get_t0.C, then run: root get_t0.C.

This this macro will create calibration table for T0 shift.