####################################################
# Copyright (C) 2001-2003, CompHEP Collaboration
# Author: Sherstnev Alexandre, A.Kryukov            
#---------------------------------------------------
# $Id: INSTALL,v 1.15 2004/05/10 15:59:53 kryukov Exp $
####################################################


Most fresh news about CompHEP you can find in Web:

          http://theory.sinp.msu.ru/comphep

Please send all you remarks to A.Kryukov by e-mail:

          kryukov@theory.sinp.msu.ru


Content:
========================================
0. Preliminary remarks and notations.
1. Compilation of package from source distributive.
2. Install a user directory:
3. Additional services are provided.
4. Installation from binary distributive.
5. Previous version incompatibilities.



0. Preliminary remarks and notations.
=======================================

In this document we suppose that the OS is Linux. 
So, if you have another OS on the computer, please 
adopt the procedure as you need.


Below, we use the following notations:

      XXXX - CompHEP version number;
      comphep-XXXX - directory where CompHEP files will live;
      comphep-XXXX.tgz - distributive tar-file with sources;
      comphep-XXXX-linux.tgz - distributive tar-file with binaries;


The installation from binary distributive see in section 4.


1. Compilation of package from source distributive.
=====================================================

1) Untar gzip-tar distributive archive:

      tar xzvf comphep-XXXX.tgz

   The directory with name comphep-XXXX will be created 
   with all files of CompHEP distributive.

2) Pass to the comphep-XXXX directory:

      cd comphep-XXXXX

3) Launch configure script:

     ./configure
      
4) Compile the CompHEP package:

      make
      
If the building of CompHEP is OK, then go to point 2 "Setup a user directory" below.

Some times it is necessary to correct a configure script to setup proper value of compiler options (CFLAGS) set of libraries (CLIBS) and name of compiler (CC). Default value (for Linux):
   CC = gcc
   CFLAGS = -Wall -DCOMPHEP 
   CLIBS = -L{path_to_x-libs} -L{path_to_cern_libs} 
           -I{path_to_x-includes} \
           -lisajet751 -lmathlib -lX11 -lm

NOTE:

a) {path_to_x-libs} and {path_to_x-includes} are included by CompHEP automatically.
    
b) CERNlib is used for MSSM and SUGRA models only. They do not necessary for other models. The default position for CERNlib is /cern/pro/lib. If it is not your case, please correct the value of variable CERNLIB in file configure.	   
    


2. Setup a user directory:
==========================================

To setup user directory you have to run

      make setup WDIR=path_to_user_work_directory

NOTE:

   1) The value of WDIR shoukd point to the user
   working directory (the default value is 
  ../comphep_XXXX_usr_test relatively of $COMPHEP).

   2) Do not use '~' (tilde) to point home directory. 
   Use ${HOME} variable instead of.

After installation the user directory pointed by 
WDIR variable will be created and all needed files will be copied to it.



3. Additional services are provided.
=============================================

   - Clean up CompHEP :
        make clean
	
   - make tar gzip archive of CompHEP:
        make dist

   NOTE:
       Archive will be in directory {comphep-XXXX}/.. and have name
       comphep-XXXX.tgz




4. Installation from binary distributive.
==============================================

The binary distributive  have been prepared under RedHat-7.3 Linux. To install them, it is necessary to unpack tar-file:

     tar xzf comphep-XXXX-linux.tgz
     
and setup working directory:

     cd comphep-XXXX-linux
     make setup WDIR=path_to_user_working_directory

The binary distributive include libisajetNNN.a and libmathlib.a from CERN library. These libraries are necessary for MSSM models. If you want to use another version of these libraries, please edit file comphep-XXXX-linux/CLIBS at this moment. 
     
Go to the working directory and start CompHEP as usual.


5. Previous version incompatibilities.
========================================

V.4.2.1
--------
New scheme of work with initial beams and final composite particles was introduce.

If you have a private model and want to use them with CompHEP-4.4.0, you have to copy cpart1.mdl file to cpartN.mdl file where N is a number of your model by commands:

   cd path_to_user_working_directory/model
   cp cpart1.mdl cpartN.mdl

V.4.1.10
--------
1) New models have another scheme of lepton notation. For example Electron(anti-electron): e,E instead of e1,E1

2) In debug mode the environment variable COMPHEP that define in startup scripts like ~/.cshrc can interfere with run time environment define in script comphep
