Instructions for Participants

Version 1.0: September 15, 2004
Ketevi A. Assamagan


Where do I get Documentation before coming to the Tutorial?

It is assumed that the user is familiar with how to use ATHENA. If that is not the case, he or she should first read this.

Documentation for doing analyses on AOD

The analysis EDM Classes:ParticleEvent, BTaggingEvent and CompositeParticleEvent

Some Analysis Example Codes

Histograms and Ntuples in ATHENA

How do I get started doing analysis on AOD?

We provide a package, UserAnalysis, to help you get started with the development of your analysis codes. This package consists of a simple Gaudi Algorithm, the AnalysisSkeleton. The user may check out this package and start implementing his/her analysis code.

What should I do before coming to the tutorial?

We will use the software Release 8.7.0 for this tuturial

I should make sure that CMT is setup correctly

1. login to lxplus

ssh myUserName@lxplus

2. Check that my $Home requirements file is set for 8.7.0

Here is Jane Doe's $Home requirements file

###################################################################
tag Tutorial 8.7.0 special
tag AOD 8.7.0 special
set CMTSITE CERN
set SITEROOT /afs/cern.ch
macro ATLAS_DIST_AREA ${SITEROOT}/atlas/software/dist
macro ATLAS_TEST_AREA "" \
Tutorial "${HOME}/scratch0/Tutorial/8.7.0" \
AOD "${HOME}/public/aod/workarea"

use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
###################################################################

3. Setup CMT

Jane Doe's working directory for this tutorial is "${HOME}/scratch0/Tutorial/8.7.0" where
${HOME}=/afs/cern.ch/user/j/janedoe/
So, Jane Doe will setup CMT by doing this
source setup.sh -tag=Tutorial,opt
Then, Jane Doe checks that the CMT path is correctly defined by doing this:
echo $CMTPATH
Something like this is printed to the screen

/afs/cern.ch/user/j/janedoe/scratch0/Tutorial/8.7.0/:/afs/cern.ch/atlas/software/dist/8.7.0:
/afs/cern.ch/atlas/offline/external/Gaudi/0.14.6.6:
/afs/cern.ch/atlas/offline/external/LCGCMT/LCGCMT_26_2c

The path to Jane Doe's working directory, to the ATLAS software distribution, to external libraries are all defined.

4. Change Directory to your working area for this tutorial

Jane Doe does the following:
cd scratch0/Tutorial/8.7.0

5. We will use UserAnalysis/UserAnalysis-00-01-04 for this tutorial

So Jane Doe checks out this package by doing this
cmt co -r UserAnalysis-00-01-04 PhysicsAnalysis/AnalysisCommon/UserAnalysis

6. Let us compile, build and test this package by doing the following

cd PhysicsAnalysis/AnalysisCommon/UserAnalysis/UserAnalysis-00-01-04/cmt/
cmt config
source setup.sh
gmake

7. Let us make sure that everything is OK and we are ready for the tutorial by doing this

cd ../run
get_files HelloWorldOptions.py
athena.py -b HelloWorldOptions.py

Stuff like this should be printed to the screen

HelloWorld INFO execute()
HelloWorld INFO An INFO message
HelloWorld WARNING A WARNING message
HelloWorld ERROR An ERROR message
HelloWorld FATAL A FATAL error message
AthenaEventLoopMgr INFO ===>>> end of event 9 <<<===
HistorySvc INFO Service finalised successfully
ChronoStatSvc.f... INFO Service finalized succesfully
ToolSvc INFO Removing all tools created by ToolSvc
ApplicationMgr INFO Application Manager Finalized successfully
ApplicationMgr INFO Application Manager Terminated successfully

If you successfuly reach this point, you are ready for the tutorial, otherwise, please seek help before Monday, you may contact me.

My first analysis code on AOD

Once the above steps are successful, you should try this before coming to the tutorial

(a) run the AnalysisSkeleton Algorithm

cd ../run
get_files AnalysisSkeleton_jobOptions.py
athena.py -b AnalysisSkeleton_jobOptions.py

This will run the user analysis skeleton algorithm which you find in the package UserAnalysis. However, it will not run because of two things:
i. The input data file specified in the job Options AnalysisSkeleton_jobOptions.py is not defined
ii. The PoolFileCatalog.xml file which defines the ID of the input data is also not there

(b) Before you run your analysis code

The input AOD data file(s) and the corresponding PoolFileCatalog.xml file must be correctly set. Let us do this now and try to run again:

i. Edit AnalysisSkeleton_jobOptions.py and replace these lines

# The AOD input file
EventSelector.InputCollections = [
"AOD_Zee.root",
"AOD_Zmm.root",
"AOD_Ztt.root"
]

by these ones

# The AOD input file
EventSelector.InputCollections = [
"/afs/cern.ch/user/k/ketevi/w0/aod/zee/dc2.002885.pyt_z_ee.g4dig805.aod870._0003.pool.root"
]

ii. The PoolFileCatalog.xml

Now, we need to get the PoolFileCatalog.xml file which defines the ID of this data file
You can copy it from here
cp /afs/cern.ch/user/k/ketevi/w0/aod/zee/PoolFileCatalog.xml .

iii. You may want to look in the PoolFileCatalog.xml to convince yourself that the path and file name of your input data in AnalysisSkeleton_jobOptions.py appear in there
iv. You can re-run the analysis skeleton as follows:
athena.py -b AnalysisSkeleton_jobOptions.py
Now it should successfully, producing a ROOT output file called AnalysisSkeleton.root.
v. Open this file in ROOT and browse the histograms

If you reach this point, congratulations! Then, edit the header file AnalysisStekeleton.h and the implementation file AnalysisSkeleton.cxx to see what this analysis code is doing. If you did not successfully reach this point, seek help, you may contact me