Introduction to Athena and the Atlas Computing Model

This session will introduce Athena and how to do a basic analysis. It will not go into this in depth at all as that is beyond the scope of the tutorial and so it is highly recommended to go to one of the rolling ATLAS CERN tutorials or the UK tutorial at the end of January.

Setting up Athena

Though it is easy to setup the Athena environment at Oxford to run 'vanilla' Athena, to demonstrate building and altering the UserAnalysis? package, we need to do things slightly differently. Note that many people have their own ways of doing this and maybe combine the actions below into a script or two (see and in my user area!) but essentially, these steps have to be followed one way or another and it may be instructive to go through it the long way first so you have a better idea what everything means!

To start with, we must setup a cmt directory. CMT is the package and environment manager and this directory will hold your personal CMT settings:

cd $HOME
mkdir cmthome
cd cmthome

Now within this directory, we will create a requrements file that holds your settings. Copy the following into a file called 'requirements':

set SITEROOT /opt/atlas_software/SL4/i386/14.2.20_release/
macro ATLAS_DIST_AREA /opt/atlas_software/SL4/i386/14.2.20_release/
macro ATLAS_TEST_AREA /home/slater/Athena
use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)

Note that you should change the ATLAS_DIST_AREA to the version that you wish to run on and ATLAS_TEST_AREA to where you want to run.

We can now properly setup cmt using these requirements:

source /opt/atlas_software/SL4/i386/14.2.20_release/CMT/v1r20p20080222/mgr/
cmt config

Finally, we can setup athena. This is the only step that needs to be done each time you logon:

cd $HOME
source cmthome/ -tag=14.2.20,32,setup

Note that you may get some warnings about the test area not being present, but that will be fixed as we proceed through the session.

Running Athena

Now that athena is setup, we can try to run a basic 'Hello World' example in the straight 'vanilla' mode. To start with, we need to add the appropriate directories:

mkdir -p Athena/AtlasOffline-14.2.20/run
cd Athena/AtlasOffline-14.2.20/run

We will now download the job options for the Hello World example. The Job Options file is a python based configuration file that 'steers' Athena and can be used to control the modules used, algorithms run, settings applied, etc. To download into the run directory, do the following:

get_files -jo

And now we invoke Athena using these job options:


If all is well, you should see a lot of output showing that Athena ran successfully!

Downloading and Modifying External Packages

Now that we have athena running, we can move on to a more realistic situation. For this, we will use the 'UserAnalysis' package which is provided as a framework for a typical analysis. Essentially, it will run over the given file and for each event, pass through the 'execute' method. In here you can access the information provided by the event and save or plot what you are interested in in a ROOT file.

The first step to this is to download the UserAnalysis? package. To do this, run the following (noting to change the CERN userid):

export CVSROOT=""
export CVS_RSH="ssh"
cd $TestArea
cmt co -r UserAnalysis-00-13-06 PhysicsAnalysis/AnalysisCommon/UserAnalysis

Again, it is worth noting that this version of the UserAnalysis? has been tagged for this version of Athena. Be careful blindly downloading packages from CVS as they could be incompatible with the version of Athena you are using.

Next, we need to setup and build the package:

cd $TestArea/PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt
cmt config
cmt make

The package will now build and be installed in your own Install Area. The libraries placed here will override those standard ones. To check everything is still OK, we will run over an AOD file in my userarea using the basic AnalysisSkeleton? job options:

cd ../run
ln -s /home/slater/AOD.023788._00073.pool.root.2 AOD.pool.root
cp ../share/ .

Again, if all is well, you should see a lot of Athena output ending with 'successful run'.


Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 09 Dec 2008 - _47C_61UK_47O_61eScience_47OU_61Birmingham_47L_61ParticlePhysics_47CN_61mark_32slater?
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback