#!/bin/tcsh # Script to extract the XYZ of the vertices, per event # from an event generator-produced file, with subsequent # generation of "phase space" events with same vertex coordinates. # These events can then be used for mixing with the original # event file # # Maxim Potekhin, potekhin@bnl.gov # Form filenames: set zfile=`basename $1` # grab the filename set zfile=`echo $zfile | sed -e 's/\..*//g'` # lose extenstion set vertex_file=$zfile.vertex # output file (z coordinates) -- intermediate set phase_file=$zfile.phase # output file (phase space events) echo Starting vertex production # Produce the "vertex file" staf -w 0 -b zxtract $1 -c quit | grep "^[ ][ ]*1[ ]*[\-]*[0-9]*[\.][0-9]*[ ]*[\-]*[0-9]*[\.][0-9]*[ ]*[\-]*[0-9]*[\.][0-9]*[ ]" | awk '{print $2 " " $3 " " $4}' > $vertex_file