macro nucpi_test * Modified (blatantly stolen?)from HERMES example kumacs * (example-lambda.kumac and example-a1.kumac) written by Naomi Makins (???) * DJG 5/29/2003 * ======================================================================== * CREATE DATA VECTORS * ======================================================================== exe hallc#setup * HALL C data nbins = 2 ve/cr x1([nbins]) R 0.209 0.469 ve/cr y1([nbins]) R 0.901 1.087 ve/cr e1([nbins]) R 0.05397 0.10821 ve/cre esys([nbins]) R 0.1223 0.14731 ve/cre eth([nbins]) R 0.028 0.065 * ======================================================================== * PLOT THE DATA * ======================================================================== dot = 25 dotsize = 0.3 zone 1 1 null 0.08 0.6 0.3 1.5 * Plot data * ... plot, WITHOUT horizontal error bars ve/cr zero([nbins]) R [nbins]*0. * ... plot statistical errors with horizontal lines on end of error bars graphics/hplot/errors x1 y1 zero e1 [nbins] [dot] [dotsize] e1 * ... plot systematic errors without horizontal lines on end graphics/hplot/errors x1 y1 zero esys [nbins] [dot] [dotsize] * Write axis labels * ... write the labels (use square brackets for units) atitle 'k "M#GeV/c"N#' 'R^exp!?&&&L !/R^qf!?&&&&L' * ======================================================================== * PLOT A CURVE * ======================================================================== * Theoretical prediction * ... set line type, width, and fill area colour for function set dmod 1 Set lwid 6 set plci 4 ve/read k,ratio deut_ratio.dat np = $vlen(k,1) * ... plot it graph [np] k ratio SC * ======================================================================== * DRAW A DOTTED LINE * ======================================================================== ypos = 1 set dmod 2 *GAW set lwid 6 set plci 1 line 0 [ypos] 0.8 [ypos] set dmod 1 * ======================================================================== * PLOT ERROR BAND * ======================================================================== * First, define some vectors ve/cre sys(2); ve/cre syse(2); ve/cre sysb(2) r 2*0. ve/cre cb(2) r * Normalization factor (to plot the syst error in log scale) is norm=0.4 * fill 2 vectors (to plot syst. err.) do j=1,[nbins] * ! parametrization for the systematic error aaa=eth([j])+[norm] ab1=([aaa]-[norm])/2.+[norm] ab2=([aaa]-[norm])/2. ve/input sys([j]) [ab1] ve/input syse([j]) [ab2] enddo * lets plot the error on the quasifree correction set htyp -3 graphics/hplot/err x1 sys sysb syse [nbins] 20 0.0000001 03 * ------------------------------------------------------------------------ * WRITE ADDITIONAL TEXT * ------------------------------------------------------------------------ * Redefine this normalization transformation (NT) before writing text opt linx; opt liny null 0 1 0 1 as * First line: Write E91003 with data symbol * ... draw the polymarker corresponding to the data ypos = 0.93 v/create x(1) R 0.25 v/create y(1) R [ypos] set mtyp [dot] pmarker 1 x y * ... write each word with different colour set txci 1 itx .3 [ypos] 'E91003' set txci 2 itx .52 [ypos] 'D/H ([p]^+!)' * Second line: describe theory curve * ... draw a small line segment, with the same colour and width as theory ypos = 0.85 set plci 4 *GAW set lwid 6 dline .23 .27 [ypos] [ypos] * ... write text set txci 4 itx .3 [ypos] 'S?L!(k)' exe hallc#print nucpi_test return