| First Lessons | ![]() | RCF Environment | ![]() | Evaluation | ![]() | Event Display | ![]() | Useful Links |
|---|
| PYTHIA | ![]() | HIJING | ![]() | PISA | ![]() | RESPO | ![]() | RECO | ![]() | NANO |
|---|
This tutorial aims to help beginners to run through the whole dimuon analysis chain from event generation to invariant mass plot, using the PHENIX software. It was first written by Yajun Mao and is now maintained by Raphaël Granier. Comments or criticisms are very welcome !
First of all, you need an account at CCF (CCIN2P3) in the Phenix group, and to be familiar with the CCF environment.
Just create a directory to run the tutorial, for instance in your workarea. For this you :
> cd /afs/in2p3.fr/group/phenix/[your_directory]
if you have one, or merely
> cd
then, create a directory and go into it :
> mkdir work
> cd work
Set the TUTORIAL variable to the area where it is located :
> setenv TUTORIAL
/afs/in2p3.fr/throng/phenix/tutorial
As the tutorial is on an AFS area, you should first be sure that you can see it. If the result of a
> ls $TUTORIAL
is a permission denied, then type :
> klog
and enter your AFS password. (AFS Tutorial)
Then, you have to launch various scripts to go through the five steps. Each script tells you what are its output files, and uses as input the result of the main previous output.
Note : if you don't want to generate 1000 events for a first try, you can give a smaller number, as the first argument of each script.
If you want to make the same exercice with Gold-Gold events @ 200 GeV, generated by HIJING, you can use the five steps :
> $TUTORIAL/event_gen/gen_hijing 20 gold200
Here, if you want a root output of the generated quantities, type > $TUTORIAL/event_gen/hij2root
> $TUTORIAL/simu/simulate 20 gold200
> $TUTORIAL/resp/respond 20 gold200
> $TUTORIAL/preco/reconstruct 20 gold200
This will generate 20 events. The output of the various steps are the same of the jpsi lesson, with 'gold200' instead of 'jpsi'.
Before you learn more about what you just did, it might be interesting to have a look to many control histograms and ntuples that were created during the reconstruction step.
The tool we use to do such things is root (you launched it at the end of lesson 1). First of all, you need to know the basics of it. If you don't, spend some time on the following pages :
Then open the jpsi_rec.root file and explore the numerous histograms there. Here are the lists of histos and ntuples you will find, with some comments to help you a little :
You can also directly browse the dst or the nanodst, doing :
[0] gSystem->Load("libfun4all.so")
[1] TBrowser B
and then make some clicks in the browser window.
Each script you summoned in the first lesson was calling the local_setup.csh script which itself sources the /afs/in2p3.fr/throng/phenix/change_phenix_version.csh script with the argument 'pro.48'. This script sets up environment variables in order to use a given set of PHENIX libraries.
The main thing is $LD_LIBRARY_PATH, that is the path where you will grab all your libraries. It is echoed in each script in order for you to know which version of the code you're using. You can check its value outside the script typing :
> echo $LD_LIBRARY_PATH
This tells you where your commands will try to grab PHENIX libraries, if you run outside the scripts.
To see all the libraries available, look into :
> ls /afs/rhic/phenix/PHENIX_LIB/sys/i386_redhat72
for RHIC libraries
> ls /afs/in2p3.fr/home/throng/phenix/PHENIX_LIB/sys/i386_linux24 for LYON libraries
To know the status of the latest RHIC rebuilds, check the tinderbox.
To know the status of all the rebuilds, look at Laurent's nice page.
If you want to give a try to another set of libraries, you need to change the setup. Copy the local_setup.csh to your working area (the script will take this one instead of the one sitting in the TUTORIAL area) :
> cp $TUTORIAL/local_setup.csh .
Edit and modify it to point to another library, for instance the latest successfull 'new' rebuild:
source /afs/in2p3.fr/throng/phenix/change_phenix_version.csh new
Run as in the first lesson. There is no guarantee that this will succeed, as we can't guess the status of the libraries your pointing to...
Usefull trick : you can tell root to explicitly show you were it grabs its libraries by putting the Root.ShowPath to true in the your .rootrc file.
In your work area, create three directories to receive your source files, to build the software and to shelter the compiled libraries :
> mkdir Sources
> mkdir Builds
> mkdir Libraries
Go to your source directory :
> cd Sources
All Phenix code is stored and shared under CVS (Concurrent Versions System). If you don't know this utility yet, you might be interested by these two links : the CVS home page and PHENIX CVS web. The phenix_setup script settled the $CVSROOT variable for you to : /afs/rhic/phenix/PHENIX_CVS, the so-called repository.
Check-out the mut package (for instance) and have a look to the created directory :
> cvs co offline/packages/mut
> ls offline/packages/mut
See the numerous files you have now ? They correspond to the latest version of the mut software. To compile the mut library, first create a 'mut' subdirectory in your build area and generate the 'mut' Makefile:
> cd ../Builds
> mkdir mut
> cd mut
> ../../Sources/offline/packages/mut/autogen.sh --prefix=/afs/in2p3.fr/group/phenix/[yourname]/Libraries
The argument after the prefix option is the place where the library and include files will be stored.
Then you can compile in two steps :
> make
> make install
The first build the libraries in a local .libs directory, the second one installs the library in your Libraries directory. (you can skip the first step if you're sure you want to install the libraries in the target area).
You now have to add this directory to your library path. Edit the local_setup.csh and add this line after the phenix_setup.csh call :
> setenv LD_LIBRARY_PATH /phenix/workarea/[yourname]/Libraries/lib:$LD_LIBRARY_PATH
Now, if you re-run the response or the reconstruction chain, you will use your own mut library. You are ready to work on PHENIX software.
| First Lessons | ![]() | RCF Environment | ![]() | Evaluation | ![]() | Event Display | ![]() | Useful Links |
|---|
| PYTHIA | ![]() | HIJING | ![]() | PISA | ![]() | RESPO | ![]() | RECO | ![]() | NANO |
|---|