We suggest You first go through all the steps below. Then run the program produced. This should yield an histogram file containig some plots of 1000 Z decays in DELPHI. Study these plots, and the event listing on the screen (should contain one event), to see if the results seem reasonable, possibly by downloading the sample output file sgv_jetset_test.hbook . If so, SGV has been correctly instaled, and You can go on with the customisation, chapter 3.3 .
Run the script/com-file cresgvexe.com (or .sh) on the SGV source code area. First run it without arguments. That gives You the explanation of the parameters bellow. Then run it with Your user PAM-file as an argument. If there were no errors, You are ready to run.
The help in CRESGVEXE.COM (the UNIX version is similar) :
CRESGVEXE : com-file to create an SGV EXE-file. Parameters : 1 : crecra - start by making cradle patchy - start by running patchy comp - start by compiling link - start by linking 2 : Input file : if P1 is crecra : pam-file name for user code; if it is patchy : cradle name; if it is comp : fortran-file; if it is link : object file. This name will be used for all the files created at later steps, with their appropriate extensions. 3 : options for compile. Enclose it in quotes. If You give the value "debug", suitable options for debug compilation will be used, ie. : /DEBUG/NOOPTIMIZE/CHECK=ALL on VAX /DEBUG/NOOPTIMIZE/CHECK=ALL/SEPARATE on ALPHA 4 : options for link. Enclose it in quotes.If parameter 3 = debug, then parameter 4 will be set to "/DEB" 5 : Area to store temporary files on. 6 : nopatchy - stop before patchy nocomp - stop before compiling nolink - stop before linking 7 : list of object files and/or libraries to put BEFORE the default set 8 : delphi - use delphi libraries (For users within the DELPHI collaboration only). 9 : list of libraries to add to the cernlib command. These will be search AFTER all other libraries. By default mathlib and jetset74 are used. P9 will be added before these. The logical name SGV_PAM should be defined before running. If the logical name SGV_LIB is defined, SGV libraries will be taken from there, if not, the entire program will be compiled now.
Hence, normally one would type
@SGV_PAM:CRESGVEXE crecra "the name of your user pam-file"
in VMS, or
$SGV_PAM/cresgvexe.ksh crecra "the name of your user pam-file"
in UNIX. (If You executed $SGV_PAM/sgvenv.sh (or .csh), $SGV_PAM is in Your path, and can be left-out).
Assuming that You don't delete the PATCHY command-file created by the script, You can replace 'crecra' by 'patchy' as the first argument in all subsequent invocations of the script. The PATCHY command-file has the name of Your user pam-file, but file-type "cra".
It is a good idea to inspect the cradle created, paying attention to the explanatory comments. Maybe there are things to modify ?
Note the comment at the end of the help text. (Read 'environment variable' for 'logical name' if You are working on UNIX) : If SGV_LIB is not defined, the SGV libraries are not used, and all the code of SGV is re-compiled. This clearly takes more time and disk-space, but one can see some gain in execution-speed, because the optimization done by the FORTRAN compiler might be better if it is presented with a larger chunk of code at once. 3.1 Whether this is true or not depends on the system, and only a test can tell. Keep this posibilty in mind, if You plan to launch a very long run !
You now need to assign input and output files for SGV. The VMS comfile SGVASS.COM or the UNIX shell-script sgvass.ksh (can be found on the SGV source code area as well) takes the following arguments :
When executed it will do the following assignments for You:
OUTPUT files (all on the directory sgv_scratch (arg 2)) : name unit 'generic_name'_hlis.dat 3 ( Histo statistics and errors, if any.) 'generic_name'_EVENTS.LIS 4 ( event-listings, including error reports) 'generic_name'_lund.dat 30 ( JETSET random seed backup) 'generic_name'_ranmar.dat 31 ( RANMAR random seed backup) 'generic_name'_evnb.dat 32 ( Event number at last seed backup) INPUT/OUTPUT files ( on the directory sgv_scratch (arg 2)) :) name unit 'generic_name'_sgv.hbook NTUP(VMS)( Histogram input and 99 (UNIX) output RZ-file) INPUT files ( all on the current directory) : name unit sgv.tit 17 ( SGV steering file) sgv_geo.inp 51 ( Detector description)
If XX is the unit-number, then the files are soft-linked to ftnXX (HP/UX) or fort.XX (ULTRIX, OSF/1 (aka Digital UNIX),GNU/Linux or AIX) in the current directory or assigned to FOR0XX (VMS).
Of the output-files, it's only unit 4 and the histogram-file that is normally of interest. If an SGV-run completed without errors the other ones can be deleted without further ado.
SGV reads in an HBOOK RZ-file from the file pointed to by the logical name NTUP (VMS) or the softlink ftn99/fort.99 (UNIX), so You do NOT need to define You histograms in the program. To create the histogram file, simply execute the kumac file copied in step 4 chapter 3.1 , in PAW, eg. :
$ paw . . (PAW start-up) . . PAW> exec sgv_ex PAW> exitassuming You called the kumac-file sgv_ex.kumac.
One thousand hadronic Z decays at 92 GeV centre-of-mass energy should have been produced. Check that there was no error-messages, and the event-listing on the screen seemed reasonable. The event should be listed twice: after generation, and after jet-clustering. The former contains true values, the latter seen ones. There is also a statistics print-out produced at the end.
Enter PAW, and open the file sgv.hbook. Check that the plots seems reasonable, eg. by comparing with sgv_jetset_test.hbook .