Learning How to Use Athena

Athena is a program somewhat similar to ROOT that allows you to run C++ programs (or python using pyAthena), to generate events or look at files such as AOD's or D2PDs. D3PDs are in ROOT format and may be looked at using ROOT. If you are generating MC or using non-D3PD files, you will need to know how to use Athena.

Set up Athena for release 16 and later

Athena set up has changed now. Here is an example (release 16.6.0) for setting up a release 16 version on the tier three, with a directory to put the athena stuff into.
  • Add two lines to your bashrc:

export AtlasSetup=/cvmfs/atlas.cern.ch/repo/sw/software/17.3.4/AtlasSetup/
alias asetup='source $AtlasSetup/scripts/asetup.sh'

  • make a .asetup file in your home directory with the following lines

releasesarea =  /cvmfs/atlas.cern.ch/repo/sw/software/17.3.4/
testarea: ${HOME}/Athena

Testarea is the directory you want to put athena files. Note that the setup does specify 17.3.4, but this only points to a setup script, so these configuration files will allow you to setup any version as demonstrated below WITHOUT modifying the above configuration files.

Now that you have everything ready, you can execute the setup command and set an important SVN variable
asetup <version number>
export SVNROOT=svn+ssh://username@svn.cern.ch/reps/atlasoff 

where username is your CER username. You only need to do this if your tierthree and cern username's are different

Now you are setup and can use co -r, etc commands to get files as described at the end of the twiki

Accessing Athena:

At MSU, Athena is on the tier three, so if you don't have a tier three account, you must set this up first. After your account is set up, follow the instructions on https://hep.pa.msu.edu/twiki/bin/view/AGLT2/UsingAtlasSoftware These instructions are also (for the most part) duplicated on https://twiki.cern.ch/twiki/bin/view/Atlas/WorkBookSetAccount If you are using version 15.0 of Athena, you may need to use SVN, which means you may need to add the following line to your requirements file (or athena_setup.sh)
 export SVNROOT=svn+ssh://<CERN NICE username>@svn.cern.ch/reps/atlasoff 

This line will allow you to check out packages later on. You will have two requests for your password when using this method while checking packages out.

Using Athena:

Once everything is set up properly, you will want to try using Athena. It is highly recommended to start with the computing workbook. This will take you step by step through the process. It is relatively extensive, but worth the time: https://twiki.cern.ch/twiki/bin/view/Atlas/WorkBook If you have figured out all of the things in this workbook, you can also take a look at the analysis workbook, or other tutorials for the specific project you want to work on https://twiki.cern.ch/twiki/bin/view/AtlasProtected/PhysicsAnalysisWorkBookRel15

You may also find the offline computing tutorial useful. It can be found at https://twiki.cern.ch/twiki/bin/view/Atlas/RegularComputingTutorial#Checking_out_modifying_compiling and a twiki page has also been set up about it, ATLASOfflineTutorial

Notes for future use:

Here are some notes for users who have set up Athena already. Each time you want to use Athena, you will need to type the following:
kinit -5 <CERN NICE username>@CERN.CH
source <athena version directory>/athena_setup.sh

When you compile packages, you must both source and make in the cmt directory, as in
cd cmt
source setup.sh

If you want to check out a package and you need to know what version will work with your version of athena, do the following to find the version and check it out (using Analysis Example for an example):
cmt show versions PhysicsAnalysis/AnalysisCommon/AnalysisExample
cmt co -r AnalysisExample-ver-ver Physics Analysis/AnalysisCommon/AnalysisExample

where AnalysisExample-ver-ver is the version the first line output to the screen.

The share directory in each package contains python scripts that you will probably run. These scripts have a line that will specify the input file. If your input file is not soft linked to the main directory of the package as AOD.root.pool, you will need to change the name in this file or the program will not find the file when running and crash.

-- JennyHolzbauer - 28 Sep 2009
Topic revision: r7 - 18 Dec 2012, JamesKoll

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback