<<back

Getting Started with Athena

Set up your for ATLAS software according to Setting Up Account. Because we are running from a Kit rather than at CERN, you do not need a cmthome directory. It's advised not to create one, in fact.

Checking out Athena and Running Athena !HelloWorld*

/usr/kerberos/bin/kinit [email protected]

Note: CERN.CH is case sensitive. You will need a lxplus account for “username” is your lxplus account. (if you're having problems, try _kinit -4 [email protected]_)

If your name at CERN different, you should create a file “config” inside “.ssh” directory and add:

  Host svn.cern.ch
  User USER_NAME_AT_CERN
  GSSAPIAuthentication yes
  GSSAPIDelegateCredentials yes
  Protocol 2
  ForwardX11 no

(replace USER_NAME_AT_CERN by your actual user name at CERN). Create, and go to your test area, e.g. ~/testarea/RELEASE (e.g. 14.5.1)

cmt show versions PhysicsAnalysis/AnalysisCommon/UserAnalysis

will return a string containing a “tag collector” number which will look like _UserAnalysis-nn-nn-nn_. (For 14.2.20, it is UserAnalysis-00-13-06) Issue the command

 cmt co -r UserAnalysis-nn-nn-nn PhysicsAnalysis/AnalysisCommon/UserAnalysis

This can take a minute or two to complete. Go to the CMT directory of the newly-checked out package by issuing the command

cd PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt

Setup the package by issuing the command:

source setup.sh

Go to the run directory “cd ../run” Execute the following command to get the runtime files

 get_files -jo HelloWorldOptions.py

Run athena: issue the command:

athena.py HelloWorldOptions.py

The algorithm will first initialize and will then run ten times (during each run it will print various messages and echo the values given in the job options file). Then it will finalize, and stop. You should see something that includes this:

HelloWorld INFO initialize()
HelloWorld INFO MyInt = 42
HelloWorld INFO MyBool = 1
HelloWorld INFO MyDouble = 3.14159
HelloWorld INFO MyStringVec[0] = Welcome
HelloWorld INFO MyStringVec[1] = to
HelloWorld INFO MyStringVec[2] = Athena
HelloWorld INFO MyStringVec[3] = Framework
HelloWorld INFO MyStringVec[4] = Tutorial

…If so you have successfully run Athena !HelloWorld.

Running AnalysisSkeleton on an AOD file

This is basically same as the instructions in the ATLAS twiki page here.

 AnalysisSkeleton.DoTrigger = False

Using external database from BNL:

## EXTERNAL DB 
from AthenaCommon.GlobalFlags import GlobalFlags 
GlobalFlags.DetGeo.set_atlas() GlobalFlags.DataSource.set_data() 
from IOVDbSvc.CondDB import conddb

Sergei Chekanov 2011/03/09 17:16