This is a guide I wrote up as requested by Bodo for the setup of the analyzer package for use with N20 analysis and expanded into the GEn experiment. If you have any questions or suggestions for improvement, let me know. Seamus riordan@jlab.org ---------------------------------------------------------------------- June 9, 2005: updated the file to reflect changes in THaCodaDecoder.C Bodo Reitz ---------------------------------------------------------------------- ---------------------------------------------------------------------- May 18, 2006: Added in special tag for GEn classes in the analyzer and the separation of tracking and non tracking libraries -Seamus ---------------------------------------------------------------------- To get analyzer installed, you must first have ROOT installed. Assuming this is not done, the latest ROOT can be obtained from http://root.cern.ch/root/Availability.html in the form of precompiled binaries or source. Once these are unpacked add the path to the top level ROOT directory to the environment variable ROOTSYS (for example, this is /apps/root/4.00-08/root on ifarml1), add $ROOTSYS/bin to PATH, and $ROOTSYS/lib to LD_LIBRARY_PATH. If ROOT is already installed, this may or may not be already done. Check to make sure these variables are correct, because ROOTSYS must be defined before installing analyzer. Before using CVS set CVS_RSH to ssh. The standard analyzer package can be checked out from the CVS depository using: cvs -d :ext:username@cvs.jlab.org:/group/halla/analysis/cvs co -d myanalyzer analyzer Where $ANALYZER is the directory where analyzer is installed. The GEn experiment has a special version tagged with classes for DecData and beam. To get this (if you're reading this you probably want to) use the following line: cvs -d :ext:username@cvs.jlab.org:/group/halla/analysis/cvs co -rgen-e02013 -d myanalyzer analyzer Once this is downloaded, go into the analyzer directory and (assuming you're putting this on Linux) run gmake and grab some coffee. If you downloaded the analyzer with the -rgen-e02013 option, you also must build the libraries for GenDecData, GenBeam, etc. by going into the src directory in the analyzer and running make: cd src make This will generate these optional libraries for you. The top level directory analyzer (also now containing the program analzyer) should be added to the environment variable ANALYZER and then $ANALYZER to both your PATH and LD_LIBRARY_PATH. Once all this is done, you should be able to execute analzyer from the command line. The agen package may be checked out from CVS by: cvs -d :ext:username@cvs.jlab.org:/group/halla/analysis/cvs co -d myagenlib agen There are two separate ways to build the libarary. The first is done by: make which will create a version with drift chamber tracking disabled. To enable tracking: make DO_TRACKING=1 which will create a library called libAGen_trk.so For the most part, tracking slows down analysis time substantially, so unless you need that functionality, it is best to leave it out. The library libAGen.so can now be accessed by adding the agen directory to LD_LIBRARY_PATH or, since it is a single library, it may be more convenient to load it on a case by case basis by gSystem->Load(/libAGen.so) or gSystem->Load(/libAGen_trk.so) in ROOT/analyzer where is the path in the directory structure. Before running analzyer, you should set the DB_DIR environment variable to the directory containing the necessary databases for your analysis. Here is an example of what I have in my .login in my ifarml1 account (csh): setenv CVS_RSH ssh setenv ROOTSYS /apps/root/4.00-08/root setenv ANALYZER /work/halla/e02013/disk1/analyzer setenv PATH $PATH':'$ANALYZER':'$ROOTSYS/bin setenv LD_LIBRARY_PATH $ANALYZER':'$ANALYZER/src:'$ROOTSYS/lib setenv DB_DIR /work/halla/e02013/disk1/db and for a machine with a bash account in my .bashrc: export CVS_RSH=ssh export ROOTSYS=/home/riordan/root export ANALYZER=/home/riordan/analyzer export PATH=$PATH:$ROOTSYS/bin:$ANALYZER export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib:$ANALYZER:$ANALYZER/src export DB_DIR=/home/riordan/DB The analzyer should now be ready to run. However, one should keep in mind that the analyzer should not be run in the analyzer directory. It is best to create a directory for this purpose, usually containing the scripts one wishes to run. To execute a script you may go into that directory and from the command line run: analzyer