
This text presents  binary and script CalcHEP commands. 

s_calchep   - main CalcHEP code used for Feynman diagram generation, 
              their  symbolic calculation and presentation results 
              in  C, REDUCE, and MATHEMATICA formats. The user calls it 
              via ./calchep script.  
        

calc        - numerical scientific calculator. 
              Usage:  calc " formula"
              'formula'  can contains numbers and standard mathematic 
              functions. PI is user for pi constant.
              Example:      
              calc "sqrt(4*PI/128)"


      Work with plots generated by CalcHEP.
      -------------------------------------
During numerical session CalcHEP generates two types of files which 
store histograms. distr_N contains all histograms which are calculated 
in  Monte Carlo sessions. N is the  number of session. tab_n.txt 
is a text file which presents single plot or histogram. Here 'n' doesn't 
corresponds to session number.  There are several programs which help 
to user to work with  plots produced by CalcHEP. In the examples presented 
below we assume that they are launched from directory 'results'


plot_view   - is used for graphical presentation of single plot generated by
CalcHEP:
             ../bin/plot_view  file_name 
There is a way to use GNUPLOT and PAW programs to display 'file_name'
family files  produced by CalcHEP. The corresponding code which 
should be moved to GNUPLOT and PAW scripts is marked by #GNUPLOT and #PAW 
correspondingly. 

show_distr - display all plots generated by Vegas.
             ../bin/show_distr distr_1 

sum_distr  - allows to create a sum of distributions obtained in precious
             numerical sessions. It is assumed that all this sessions have 
             the same list of outgoing particles. 
             ../bin/sum_distr distr_1 distr_2 distr_3 > dist_sum  
       

   Symbolic BATCH program s_blind
   ------------------------------
Has to be launched from user working directory
    ./bin/s_blind N Process Output
It select models 'N' form the list of available models,
calculates symbolically 'Process' and writes down results.
Process has not contains "*x" in specification of out particles 
as well as a composite input state. 'Output' has to be 'C , 'REDUCE', or 
'MATHEMATICA'. Example 
     ./bin/s_blind 1 "u,U->W+,W-" C
   
  Batches for numerical calculations  
  ----------------------------------
They are allow to continue numerical calculations in not-interactive, 
regime. These programs has to be launched from directory 'results'.
Being launched without parameters they explain  which parameters are expected 

   set_momenta   -changes momenta of incoming particles  
   set_param     -change value of one or several parameters 
   set_vegas     -set parameters of two loops Vegas  calculations:
                  it1,nCall1,it2,nCall2 nCubes. Note that parameters of second
                  loop can not be defined in graphic interface mode. The
                  parameters are stored in 'session.dat' file. nCubes fixed
                  number of sub-cubes used for fitting integrand for
                  subsequent  event generation.
 
   run_vegas     -launches Vegas Monte Carlo  session.  It makes it1 Vegas
                  sessions with nCall1 integrand calls in each session.
                  Interrelation grid is improved step by step. After that all
                  obtained results are discarded and next it2xnCall2
                  sessions are started to get the final results. If it2==0 
                  then only the firt cycle takes place.

   pcm_cycle     -organize Vegas cycle over momenta of center of mass.
   name_cycle    -organize Vegas cycle over some model parameter   
   gen_events    -launches generator of events.
   subproc_cycle -performs cycle over subprocess with events generation, 
                  summation of cross sections, and summation of histograms. 
   par_scan      -cycle calculation for sets of parameters stored in file.
                  Call of program has to be done from results directory, 
                  data file should be passed as input 
                    $CALCHEP/bin/data_cycle  < data_file 
                  Data file structure has to be 
                       name1  name2  ....    nameN
                        val11   val12  ....  val1N
                        val21   val12  ....  val1N
                  ........................
                  Output file have addition column with calculated cross
                                                                 section

 

   par_scan_sum  The same  command as par_scan but with summation over subprocesses.

   make_main    script for compilation of  C-code which generates and uses
                squared matrix elements.

  Library generation
  -------------------
Two functions for generate libraries of matrix elements. They have to be
launched from 'results' directory after generation of C code.
 
  mkLibstat     - generates static library proclib_<suffix>.f where  in all 
                  global names _ext is replaced on _<suffix>. 'suffix' has to 
                  passed as a parameter.
  mkLibshared   - generates shared library proclib_<suffix>.so. 'suffix' again
                  is the first parameter of this command. The second parameter
                  has to be a destination of library in the runtime.  It can be 
                  omitted. 


 Fast test of generated events
 ----------------------------- 

events2tab      - reads  events generated by CalcHEP and creates a distribution
                  of some kinematic variable. The program needs the following 
                  parameters: 1- name of variable, 2- minimum limit,3- maximum
                  limit,4- number of bins(<=300). For example:
               ../bin/events2tab T3 1 100 200 < events_1.txt >tab.txt 
