FTPC Calibration Maker



StFtpcCalibMaker

The StFtpcCalibMaker programs and macros analyze the data in a special root file which is produced by StFtpcClusterMaker/StFtpcClusterDebug.cc when the option "fdbg" is included in the bfc.C chain. To produce this file - create an input file named debug.ini with one line containing 3 options: fname drawclhisto drawvertexhisto fname is a string which is used to create the name of the output root file "run_%d_%s.root",run,fname For example when checking the laser we usually set fname to laser_test if drawclhisto and/or drawvertexhisto are non-zero the cluster and/or vertex histograms are filled and output to the root file There is an example debug.ini in the StRoot/StFtpcCalibMaker/examples sub-directory which you can copy into your working directory with cp StRoot/StFtpcCalibMaker/examples/debug.ini . Then, using laser run 6082062 as an example - reconstruct a minimum of 200 laser events with the following chain bfc.C(200,"fdbg flaser ftpc db globT detDb tpcDb dbutil in dst event", "/star/data03/daq/ftpc/st_laser_6082062_raw_1090001.daq") This will produce a root file named run_6082062_laser_test.root which can then be analyzed using the StFtpcCalibMaker macros:
Analysis Macros for Laser Runs
NOTE: It is no longer necessary to set t0 = "0.000001" if t0=gas="0" when calling the laser analysis macros. In STAR library versions SL06g->SL09f,the macro automatically sets delta t0 = "0.000001" to avoid problems. Starting with STAR library version SL09g, the problem which caused a seg. fault when t0=gas="0" has been corrected. lasertest_single.C(TString filename,int ftpc, int lsec, int straight, int gfit, char* t0, char* gas, float gastemp, float mbfield) filename = "run_6082062_laser_test" ftpc = 1 FTPC West 2 FTPC East lsec = 0 all laser sectors 1 sectors 2, 8,14,20,26 for FTPC West sectors 32,38,44,50,56 for FTPC East 2 sectors 4,10,16,22,28 for FTPC West sectors 34,40,46,52,58 for FTPC East 3 sectors 6,12,18,24,30 for FTPC West sectors 36,42,48,54,60 for FTPC East straight = 0 first inclined laser ("_s") 1 straight lasers ("_g") 2 second inclined laser ("_s2") 3 all lasers ("_all") gfit = 0 no gauss fit 1 gauss fit t0 = "0" delta t0 gas = "0" delta gas gastemp = 0 delta gas temperature mbfield = 1 full field positive 0.5 half field positive 0 zero field -0.5 half field negative -1 full field negative Runs for the one specified delta t0, delta gas, delta gas temperature value For example: lasertest_single.C("run_6082062_laser_test",1,2,1,1,"0","0",0,1) produces the following 6 files run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0.log run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0_padpos2.log run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0_padpos.log run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0.ps run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0_res.log run_6082062_laser_test-pos_w_lsec_2_g_dt0_dg0_dT0.root lasertest.C has the same arguments as lasertest_single.C but it loops over a range of delta t0 and delta gas values for the specified delta gas temperature value and produces a set of the 6 output files for each delta t0/delta gas setting. IMPORTANT: Always delete all run_*res.log files in your working directory BEFORE running the lasertest.C macro. For example: lasertest.C("run_6082062_laser_test",1,2,1,1,"0","0",0,1) produces 156 sets of the 6 files listed for lasertest_single.C; one set for each delta t0 from -0.50<=deltat0<=0.60 with each deltaGas from -0.50<=deltaGas<=0.70 (12 deltat0 * 13 deltaGas) The following macros analyze the *_res.log files produced by lasertest.C Copy the *_res.log files into one file with touch res.log cat *_res.log >> res.log laser_2d_pos(int ftpc, int lsec,TString a,char *opt) laser_2d_pos reads res.log file and draws the reconstructed position histograms Inputs to macro: ftpc - 1 Ftpc West 2 Ftpc East lsec - laser sector a - select value(s) to be histogrammed "a" Laser I - straight track at lpos1 "b" Laser II - straight track at lpos2 "c" Laser III - straight track at lpos3 "d" all 3 straight lasers opt - set Draw Options (usually "colz") (see ftp://root.cern.ch/root/doc/chapter3.pdf, pages 5-6) laser_2d_opt.C(TString a,char *opt) laser_2d_opt reads the res.log file and draws the histograms for the residuals Inputs to macro: a - select value(s) to be histogrammed "x" resx "y" resy "r" resrad "p" resphi "c" c2 "e" rad3-28.56 "a" resx, resy, resrad, resphi opt - set Draw Options (usually "colz") (see ftp://root.cern.ch/root/doc/chapter3.pdf, pages 5-6) res_laser.C res_laser plots the rms width of the residual distribution in radius and in phi vs. charge in gas composition delta Ar. gasTemp.C has the same arguments as lasertest.C but it loops over a range of delta gas and delta gas temperature values for the specified delta t0 value and produces a set of the 6 output files for each delta gas/delta gas temperature setting. IMPORTANT: Always delete all run_*res.log files in your working directory BEFORE running the gasTemp.C macro. For example: gasTemp.C("run_6082062_laser_test",1,2,1,1,"0","0",0,0,1) produces 169 sets of the 6 files each; one set for each delta gas from -0.5<=deltaGas<=0.7 with each deltaT from deltaT-0.2<=deltaT<=deltaT+4.5 in steps of deltaT+= 0.5 VERY IMPORTANT: The first time you run the gasTemp.C,gasTemp_2d_pos macros set deltaT = 0. If the 2D histogram bin for deltaGas=0, color=0.0 is outside the deltaT range (this happened the first time for the 2009 run), rerun BOTH macros setting deltaT~=4.0. The following macro analyzes the *_res.log files produced by gasTemp.C Copy the *_res.log files into one file with touch res.log cat *_res.log >> res.log gasTemp_2d_pos(int ftpc, int lsec, float deltaT, TString a, char *opt) gasTemp_2d_pos reads the res.log file and draws the reconstructed position histograms Inputs to macro: ftpc - 1 Ftpc West 2 Ftpc East lsec - laser sector deltaT - delta gas temperature DeltaT is plotted on the x-axis of the 2-D gas composition vs. gas temperature histogram. Originally the x-axis limits were set from -2 to +4 but for the 2009 run the necessary temperature change in FTPC West was larger than +4 degrees. In order to have more flexibility in setting the axis scale, this argument was added. The x-axis limits are now set from deltaT-2 to deltaT+4. a - select value(s) to be histogrammed "a" Laser I - straight track at lpos1 "b" Laser II - straight track at lpos2 "c" Laser III - straight track at lpos3 "d" all 3 straight lasers opt - set Draw Options (usually "colz") (see ftp://root.cern.ch/root/doc/chapter3.pdf, pages 5-6)
Analysis Macros for Physics Runs
Create an input file named debug.ini with one line containing 3 options: data_test drawclhisto drawvertexhisto For data run analysis, drawclhisto drawvertexhisto should both be set to 1. Then, using data run 8348091 as an example - reconstruct a minimum of 200 events with the following chain bfc.C(200,"fdbg ftpc db globT detDb tpcDb dbutil in dst event", "/star/data03/daq/2007/348/8348091/st_physics_8348091_raw_1040002.daq") This will produce a root file named run_8348091_data_test.root To study effect of changing t0 and/or gas composition on the FTPC radial step use: t0_single.C(TString filename, char* t0, char* gas, float mbfield) filename = "run_8344094_data_test" t0 = "0" delta t0 gas = "0" delta gas mbfield = 1 full field positive 0.5 half field positive 0 zero field -0.5 half field negative -1 full field negative Runs for the one specified delta t0, delta gas value For example: t0_single.C("run_8344094_data_test","0","0",1) produces the following 2 files run_8348091_data_test_0_0_t0.ps run_8348091_data_test_0_0_t0.root t0.C has the same arguments as t0_single.C but it loops over a range of delta t0 and delta gas values and produces a set of the 2 output files for each delta t0/delta gas setting. t0_ana.C(TString filename) Reads the *.root files produced by t0.C and produces a set of comparison plots with which you use to find the optimal t0, gas compostion. To study the FTPC vertex extrapolation step use: vertex.C(TString filename,int evt) filename = "run_8344094_data_test" evt = event number for which you want the FTPC vertex extrapolation histograms. You can get the event number from the "Done with Event" line in the reconstruction job log file Reads in the FTPC data root file writen out by the reconstruction program when the "fdbg" option is selected, and produces 2 plots of the vertex extrapolation which should be written out in a *.ps file. NOTE: Currently this macro only works in the interactive mode. To study FTPC hit reconstruction and cluster tuning use: hits2cluster_all.C(TString filename,int evt) filename = "run_8344094_data_test" evt = event number Produces a ps file which contains a set of plots (1 plot per hardware row and hardware sector) display all cluster color-coded with their iflag. will only work if drawclhisto and/or drawvertexhisto activated in debug.ini file used to produce run*_laser_test.root file Reads in the FTPC data root file writen out by the reconstruction program when the "fdbg" option is selected, and produces 2 plots of the vertex extrapolation which are written out in a *.ps file. hits2cluster_laser.C(TString filename,int evt,int laser_sec) filename = "run_8344094_data_test" evt = event number laser_sec = laser sector NOTE: Doesn't work yet test_magF.C read in and run over the magnetic field map grid For a more detailed explanation of the FTPC laser analysis and sample output consult the FTPC Software and Calibration Overview writeup.

This page was created by Janet Seyboth on December 16, 2005
This page was last updated by Janet Seyboth on Mar 15, 2010