[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.