CLAS6 Simulations with GSIM

The CLAS6 detector simulations require the running of a chain of programs. This page outlines that chain.

  • Event generator - use either a standard event generator (PYTHIA, PLUTO, LEPTO, GENIE, etc.) or write your own generator (phase space, etc.) to simulate the reactions.
  • txt2part - the CLAS6 simulation programs use the BOS file format. The txt2part program converts the events listed in a text file into a BOS file. The command line is

txt2part -o<genfile> < <input.txt>

where <genfile> is the user defined filename for the generated file in the BOS format and <input.txt> is the text input

file. Notice that <input.txt> in redirected into the program with the "<" symbol.

Here is the Help Page for txt2part.

  • gsim - the CLAS6 detector simulator is gsim. There are 2 executables, gsim_int (gsim interactive) and gsim_bat (gsim batch). The gsim_int is good for debugging since it opens a guy that displays the events in the detector geometry. The gsim_bat is used for production mode. The command line is

gsim_bat -ffread <ffread_file> -mcin <genfile> -bosout <gsim_out_file>

where <ffread_file> is a text file will a list of input parameters, <genfile> is the input file (or output from txt2part), and

<gsim_out_file> is the BOS output file.

  • gpp - the output from gsim needs to be made more realistic by smearing the particle momentum and resolution as well as incorporating inefficient detector elements. The program to do that is gpp. The command line is

gpp -P0x1f -Y -o<gpp_out_file> -a1.2 -b0.86 -c0.87 -f1. -R41147 <gsim_out_file>

where <gpp_out_file> is the BOS output file and <gsim_out_file> is the input file produced by gsim_bat.

  • user_ana - the next stage is to reconstruct the events from gsim and app with the same software that was used with the actual data. One such reconstruction program is user_ana, sometimes called recess. The command line is

user_ana -t <tcl_file>

where <tcl_file> is a tcl format file that contains the parameters to run user_ana.

  • ROOT - the final step is to convert the reconstructed BOS files into the CERN ROOT format. The ClasTool converter is WriteRootDst. The command line is

WriteRootDst <user_ana_out_file> -GSIM -o <clastool_out_file>

where <user_ana_out_File> is the BOS output file from user_ana and <clastool_out_file> is output in ROOT format .