hosted by CEDAR HepForge
HZTool :: HepForge

Writing and testing an HZTool routine

This page provides instructions on how to write and test your own HZTool routine.The HZSteer package is used to run the routine to test the changes, feel free to use your own main program to do this if you prefer.

Firstly you need to download the relevant packages, the tarballs of which can be found here. You will need pdflib, Herwig, Pythia, HZTool and HZSteer. Unpack each package with:

> tar xvfz {package_tarball}

Once each package is downloaded do:

> cd {package_dir}
> ./configure --prefix={install_dir}
> make
> make install

where {install_dir} is the full path of the directory you want to install the packages in. If you install all the packages in the same directory this should work fine and executables will be created in {install_dir}/bin/
If you would prefer to do something more complicated you can type:

> ./configure --help

in the HZSteer directory to get an up-to-date list of configure options which allows you to use the packages when installed in different directories.

The current HZTool routines are in {HZTool_dir}/src/ where there are different directories for the different accelerators (hera, lc, lep, lhc, sps and tevatron). The HZTool manual (hztool.ps) is located in {HZTool_dir}/doc/manual/
A template HZTool routine can be found in {HZTool_dir}/src/hztemplate.F which can be edited to contain the routine for your paper. It is worth noting that it may also be useful to look at one of the current routines that is similar to the routine you are writing. The HZTool manual contains documentation for all these routines. Once you have written your routine:

> cd {HZTool_dir}/src/
> make
> make install
> cd {HZSteer_dir}/src/
> make clean
> make
> make install

will update the executables in {install_dir}/bin/
In order to run the executable use one of the .input files in {HZSteer_dir}/run where there are different directories for the different accelerators.

> mkdir {your_run_dir}
> cd {your_run_dir}
> cp {HZSteer_dir}/run/{accel_dir}/{runfile_name.input} .

Now edit {runfile_name.input} so that the template routine is being called (set TEST = TRUE and comment out all the ROUTINE x = TRUE lines). You also need to set the generator parameters to ensure that the correct process for your routine is being generated. See the generator manuals for information on process codes etc. You are now ready to run the executable:

> {install_dir}/bin/{exe_name} {runfile_name}

Make sure you leave the .input part of the {runfile_name} off!

Please check the output of your HZTool routine with both Herwig and Pythia before submitting your file.

Last updated: Wed Jul 27 15:47:16 2005