Note on the procedures how the calibration constants are determined from the sample data taken at the beginning of the run. Jan. 2005 This note instructs how to obtain the necessary parameters for the online data taking for RHIC pC polarimeters and how to generate those files with half-automatically. The description here is valid for the data in Run-04 and might be obsolete in Run-05 new data format. ============================================================= Instruction of the calibration procedure for RHIC CNI RUN-04 ============================================================= The base directory is assumed to be pc2pc.rhic.bnl.gov:/home/e950/pol2004-offl/Macro in the following explanations. (1) Dead layer estimation [1] need to create the histograms (TOF vs. Edeposit) use script "dlayergen.pl" > ./dlayergen.pl ex. =3615.003 this will create the root format file in ./Douts directory ./Douts/.root [2] use script "dlayercal.pl" to fit with two parameters (Dlayer, T0) > ./dlayercal.pl if the values are correct, then type "y" after some time, the new files are generated - Dlayer/.fittemp.ps ... fit of 2D each strip - Dlayer/.summarytemp.ps ... summary of all strips - Dlayer/.temp.dat ... 1st raw -- Strip 2nd raw -- dlayer (ug/cm2) for detector 3rd raw -- Tzero (ns) for fixed dlayer 4th raw -- Tzero error 5th raw -- dlayer for strip 6th raw -- dlayer error for strip 7th raw -- Tzero for strip 8th raw -- Tzero error for strip 9th raw -- Reduced Chi Square 10th raw -- NDF 11th raw -- Fit Status 12th raw -- Const 13th raw -- Slope 14th raw -- coef(0) 15th raw -- coef(1) 16th raw -- coef(2) 17th raw -- coef(3) 18th raw -- coef(4) (2) Energy calibration (Am) [1] need to create the histograms (ADC spectrums) use script "calibgen.pl" > ./calibgen.pl ex. =004_b if the data file is 004_b.dat this will create the root format file in ./Douts directory i.e. ./Douts/.calib.root [2] use script "calibcal.pl" to fit with gaussian > ./calibcal.pl new file will be created in ./Calib directory .fit.log .fittemp.ps ... strip by strip .summarytemp.ps ... whole strips .fittemp.dat ... the result ascii 1st, 2nd raws are strip number (0-71) and Energy Coefficient Others are less important (3) Integral vs. Amplitude Correlations [1] the converted files are already made at (1)[1] with dlayer [2] use script "integcal.pl" to fit with linear function > ./integcal.pl ex. =3615.003 the new files will be created in ./Integ directory .fit.log .fittemp.ps ... strip by strip .summarytemp.ps ... whole strips .fittemp.dat ... the result ascii 1st ... strip number (0-71) 2nd ... A0 3rd ... A1 4th ... A0E 5th ... A1E Integ (0-4000) = A0 + A1 * Amp (0-250) (4) Convine above results into one parameter file Check and Modify the script "ParamConvine.pl" for used parameter files in it. ./ParamConvine.pl this will create the convined file "config.dat"