[This a test page for now. Soon to be edited.]
The calibration began with ntuples generated from a preproduction:
/star/data57/reco/AuAu200_production/FullField/P10ih_calib1/2010/*/* log files on /star/rcf/prodlog/P10ih_calib1/log/daq
The ntuples can be found:
28 files (61810 events): /star/data05/scratch/rderradi/run10/TofCalib/ntuples/200GeV_1/out/ 316 files (2398210 events): /star/data05/scratch/rderradi/run10/TofCalib/ntuples/200GeV_2/out/ 77 files (497944 events) - not properly closed: /star/data05/scratch/rderradi/run10/TofCalib/ntuples/200GeV_3/out/
The 77 files not properly closed were merged with hadd to properly close them.
Then the ntuples were used for the start side(vpd) calibration. The code package used for this is attached and can be found here:
To run the start side calibration: ./doCalib filelist traynumber
Tray number for start side can be any tray number, I recommend 0. Start side calibration used a 20% outlier cut. This can be selected in doCalib.cpp and changing the value pCut =0.20.
The outlier removes the upper 20% of slowest hits--highest leading edge times.
Produced from the start side calibration is pvpdCali.dat and pvpdCali.root. These files are used to shift the vpdvz offset between the east and west vpd, and ultimately, the vpd's calibration parameters that are loaded into the database. To shift the offset, perform a Gaussian fit to VzCorr2->ProjectionY() and take that mean value. This is the VzOffset. Apply it to the convertVpd.C macro (http://drupal.star.bnl.gov/STAR/system/files/convertVpd.tar_.gz) on the line: 2454.21696153-VzOffset. This macro generates pvpdCali_4DB.dat. These are the parameters loaded into the database.
Now apply the shift to pvpdCali.root so that T0's are properly corrected for the stop side(TOF) calibration. This is done with the code in this package:
To run the code: use ./doCalib filelist traynumber . The traynumber does not matter, use 0 again. Be sure this is the same file list as before and that the generated pvpdCali.root and pvpdCali_4DB.dat files are in the same directory. This way the VzOffset is applied. An updated pvpdCali.root is produced.
Typically, the pvpdCali.root is then used in the stop side calibration. But because we are doing a cell based calibration, we wanted to increase statistics. This caused an increase in IO from disk and delayed calibration since data for all trays is cycled over regardless of which tray is being calibrated. To get around this, we used a splitting macro that reads in the ntuples and pvpdCali.root, and then it splits the ntuples into TDIG based files with the startside information stored with it. The splitting macro is attached to this page here:
The board based ntuples are then used to calibrate on a cell level for each board. This is done with this code package:
To run it: ./doCalib filelist traynumber boardnumber. Here tray number is 0-119 and board number is 0-959. It is important that the proper board is selected from the given tray number. For example tray 0 has boards 0-7, tray 1 has boards 8-15 and so on.
Produced among other files are tray_$tray#_board_$board#_$iteration#.dat files. These files are added together for all trays and create the parameter files used for the database. To add them together, the macros addZtdig.C, addT0Ttdig.C, and addt0tig.C were used(http://drupal.star.bnl.gov/STAR/system/files/addstopsidemacros.tar_.gz) and generated zCali_4DB.dat, totCali_4DB.dat, and t0_4DB.dat respectively.
To check the produced calibration parameters, use a check macro that reads in matchmaker produced ntuples and applies the parameters (http://drupal.star.bnl.gov/STAR/system/files/simpleQAmacro.tar_.gz). The result is a .root file that can be used QA checking. The macro needs to be edited to find the proper parameters and the proper name for an output file. It works with './checknew filelist_location' In addition, there are other methods for QA checking.
The calibration was performed over:
Run # -events > > 11004071 -623835 > 11009017 -497717 > 11015019 -499030 > 11020023 -500001 > 11026034 -500001 > 11035026 -699977 > > total:3320561 events.
---Issues that came up during the calibration procedure---
First off is the outlier rejection. Not inserting the outlier rejection in all stages of the start side calibration caused issues. This was seen when shifting the T0s for the stopside calibration and in comparing different QA checking macros. This can lead to 40ps differences in the time. Also, there is a slight difference in the way the outlier is handled in the calibration procedure versus the vpdcalibmaker. This difference of T0s averages out over events to be on the order of 2-3 ps. We kept this difference in place for 200, because this method used in the production of 39 earlier in the year.
Other differences include the selection criteria for events. Needed to replace dcaZ with vertexZ since in heavy ion the primary vertex is filled and more reliable(dcaZ was used in pp where the primary vertex was not always filled). Same with dcaX and dcaY to vertexX and vertexY respectively. Also dropped the if(sqrt(pow(tofr->vertexX,2)+pow(tofr->vertexY,2))>rCut) cut. This is because by selecting a primary vertex with vertexZ, this should have already been applied in order to be a primary vertex.
Another minor one was in the QA macro calculating the vpdMean. Turns out it was being handled incorrectly, but okay now. Originally it looked like (bad structure):
And with the fix, it became:
Place holder. Two samples used.
Place holder. Board+cell based calibration.
Place holder. 40ns.
BToF time resolution for Startless mode is around 0.06ns and is 0.14ns (11.5GeV), 0.16ns(9.2GeV) for Vpdstart mode.
Run20 FXT Calibrations: 5p75/7p3/9p8 GeV
11.5 GeV Calibrations
9.2 GeV Calibrations
AuAu 7.7 GeV Calibrations
Here is documentation on how to determine the trigger windows for ToFs 120 trays and the 2 start detectors.
I determined the trigger windows on run 13037090. To do this, I used StRoot.tar.gz and extracted it to my work directory. Then changed directory to StRoot/RTS/src/RTS_EXAMPLE and ran Rts_Example.sh. This creates the executable rts_example from rts_example.C. Both Rts_Example.sh and rts_example.C have been customized from the typical StRoot version to translate information given in a .daq file into a useful .root file. To run rts_example, I use run_test.csh. This is essentially:
starver SL11e
rts_example -o tof_13037090.root -D tof inputfilepath/st_physics_13037090_raw_1010001.daq
where tof_run#.root is your output file and .daq is your input file.
Then the trigger windows are determined from the .root file by running over it with plot_trgwindow.C.
To do this:
root
.x plot_trgwindow.C("run#");
run number is important because this is how the script knows to read in tof_run#.root.
Produced is a .dat file that lists the high and low limits for each tray's trigger window and a postscript that shows the new limits in blue for each tray and if defined inside plot_trgwindow.C, red lines for the old trigger window limits(testrun11.dat in this example).
Attached to this page is the StRoot.tar.gz package, run_test.csh, plot_trgwindow.C, old trigger window limits, new trigger window limits, and a postscript displaying the limits on top of the data. (I put them in zip containers due to the file attachment restrictions.)
At the sc5.starp station, there are two GUIs on the upVPD monitor:
"large GUI" shows all the channel values, and where one powers them on/off...
"small GUI" selects between different gain sets A, B, C, & default...
start with the VPD HV **off**
once there is a decent non-VPD-based trigger and stable beam:
1. on small GUI, click "! upVPD HV A" button
2. on large GUI, click in lower left corner to power on upVPD HV
3. wait until all channels are "green" (~20 sec).
4. make sure the values (upper left corner of large GUI,
leftmost column) are as expected
5. wait ~1min for PMTs to settle (or take some other test run)
6. start run: TRG+DAQ+TOF only, 300k events.
use string "upVPD HV A" in the shiftlog entry
7. power off HV (large GUI lower left corner)
8. wait until channels reach 0 (~20 sec)
9. on small GUI, click "! upVPD HV B" button
10. on large GUI, click in lower left corner to power on upVPD HV
11. wait until all channels are "green" (~20 sec).
12. make sure the values (upper left corner of large GUI,
leftmost column) are as expected
13. wait ~1min for PMTs to settle (or take some other test run)
14. start run: TRG+DAQ+TOF only, 300k events.
use string "upVPD HV B" in the shiftlog entry
15. power off HV (large GUI lower left corner)
16. on small GUI, click "! upVPD HV C" button
17. on large GUI, click in lower left corner to power on upVPD HV
18. wait until all channels are "green" (~20 sec).
19. make sure the values (upper left corner of large GUI,
leftmost column) are as expected
20. wait ~1min for PMTs to settle (or take some other test run)
21. start run: TRG+DAQ+TOF only, 300k events.
use string "upVPD HV C" in the shiftlog entry
22. power off HV (large GUI lower left corner)
23. on small GUI, click "! DEFAULT" button.
24. power on the VPD HV.
Do not use the small GUI anymore. In fact, feel free to close it!
At this point, I will get the data from HPSS, calculate the new gains, and then upload them to sc5.
1. Data should be taken using a VPD based trigger
2. For AuAu collisions ~ 100K minimum events are needed
3. For pp200 ~200K events were needed
4. As soon as the data is acquired (or even before ) make arrangments with Lidia for the fast offline production to be started. It needs to start immediately
1. Plot the TAC{East} - TAC{West} + 4096 vs. TPC vz to determine the TAC to ps conversion factor. Bbq and Mxq are not neccessarily the same - so check both.
2. Create calibration tuples from MuDsts - these contain just the VPD data, TPC z vertex etc. that we need.
Current tuple maker is at : /star/institutions/rice/jdb/calib/ntupler/
3. Setup a config file for slewing corrections - set data uri, bbq or mxq datasource and output filenames for qa and parameters
4. Run the slewing jobs
5. Check the QA and if there is time before uploading have Shuai check the resolution.
6. Upload parameter files to startrg.starp.bnl.gov in the ~staruser/ location with names like (m)vpd_slew_corr.<date>.txt for bbq (mxq)
7. check the md5sums of the two files you just made and compare them to the original parameter files - sometimes the line-endings get scrambled
7. Make a soft link from (m)vpd_slew_corr.<date>.txt to (m)vpd_slew_corr.txt for bbq (mxq).
8. Have Jack run the script to write slewing corrections to crates.