Difference between revisions of "NIKHEF PAT workshop Oct2006"
Jump to navigation
Jump to search
Line 130: | Line 130: | ||
*Now run the AnalysisSkeleton_jobOptions.py. It should produce a file called AnalysisSkeleton.aan.root which contains some ROOT histograms and an AthenaAwareNTuple: | *Now run the AnalysisSkeleton_jobOptions.py. It should produce a file called AnalysisSkeleton.aan.root which contains some ROOT histograms and an AthenaAwareNTuple: | ||
<pre> | <pre> | ||
− | athena.py | + | athena.py AnalysisSkeleton_jobOptions.py | tee athenaout.log |
</pre> | </pre> | ||
*You've just produced the AthenaAwareNTuple in a standalone way, directly on the AOD, or the ESD or even on the RDO. For Further details on how to produce the AthenaAwareNTuple in this way, follow this link: AthenaAwareNTuple. | *You've just produced the AthenaAwareNTuple in a standalone way, directly on the AOD, or the ESD or even on the RDO. For Further details on how to produce the AthenaAwareNTuple in this way, follow this link: AthenaAwareNTuple. |
Revision as of 13:24, 22 September 2006
Set up CMT
- Login to lxplus at CERN and create a working directory called "Tutorial". We will use the release 12.0.2 this tutorial:
ssh lxplus.cern.ch cd scratch0 mkdir Tutorial cd Tutorial mkdir 12.0.2
- Create a file called "requirements" and setup CMT. My requirements file looks like this where my working area for 12.0.2 is ${HOME}/scratch0/Workshop/12.0.2:
set CMTSITE CERN set SITEROOT /afs/cern.ch macro ATLAS_DIST_AREA ${SITEROOT}/atlas/software/dist macro ATLAS_GROUP_AREA "/afs/cern.ch/atlas/groups/PAT/Tutorial" macro ATLAS_TEST_AREA "" \ 12.0.2 "${HOME}/scratch0/Workshop/12.0.2" apply_tag oneTest use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
- Then do the following:
source /afs/cern.ch/sw/contrib/CMT/v1r18p20060301/mgr/setup.sh cmt config
Setup for the release 12.0.2
- Do the following:
source setup.sh -tag=12.0.2
- Check that the CMT path is correct by doing this
echo $CMTPATH
- Stuff like this should be printed to your screen:
/afs/cern.ch/user/o/ordonez/scratch0/Workshop/12.0.2: /afs/cern.ch/atlas/software/builds/AtlasOffline/12.0.2
- You see that the path to your working directory, the path to the release directory and the external are set correctly - do not proceed unless this is done correctly.
Run Time Setup
- Go to your working area and check out the follow package:
cd 12.0.2 cmt co -r UserAnalysis-00-08-05 PhysicsAnalysis/AnalysisCommon/UserAnalysis
- Now compile everything as follows:
cd PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt cmt config source setup.sh cmt broadcast gmake cd ../run
- To test that everything has been done correctly, do:
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
The Next Time You Login
- The next time you login, just do the following:
cd ${HOME}/scratch0/Workshop source setup.sh -tag=12.0.2 cd 12.0.2/PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt source setup.sh cd ../run
Get The Necessary Files
- We will use inclusive Z to mumu events (sample 4202), digitized in 11.0.41 but the ESD and AOD produced in the release 12.0.1. Copy the PoolFileCatalog.xml for the AOD, ESD and Raw Data (RDO) into your UserAnalysis "run" directory:
cp ~ordonez/scratch0/Workshop/12.0.2/data/PoolFileCatalog.xml . cp ~ordonez/scratch0/Workshop/12.0.2/data/*.py .
Run the AnalysisSkeleton for 500 Events
- get the necessary job options file from the release:
get_files AnalysisSkeleton_jobOptions.py
- Edit AnalysisSkeleton_jobOptions.py and specify the input data to be the AOD files that you just copied in the previous step: to do this, replace these lines
EventSelector.InputCollections = [ "AOD.pool.root" ]
- with this line
include( "mc11.004201.ZeeJimmy.recon.AOD.v11000401.py" )
- Check that in AnalysisSkeleton_jobOptions.py, the number of events to run is set to 500:
# Number of Events to process theApp.EvtMax = 500
- Now run the AnalysisSkeleton_jobOptions.py. It should produce a file called AnalysisSkeleton.aan.root which contains some ROOT histograms and an AthenaAwareNTuple:
athena.py AnalysisSkeleton_jobOptions.py | tee athenaout.log
- You've just produced the AthenaAwareNTuple in a standalone way, directly on the AOD, or the ESD or even on the RDO. For Further details on how to produce the AthenaAwareNTuple in this way, follow this link: AthenaAwareNTuple.
- Now, you may look at the the AnalysisSkeleton.h, the AnalysisSkeleton.cxx and AnalysisSkeleton_jobOptions.py to see how the ROOT histograms and the AthenaAwareNTuple of the output file AnalysisSkeleton.aan.root are defined, filled and saved: Follow this link to the AnalysisSkeleton. For further details on how to produces ROOT histograms and Tuples in ATHENA, look at the THistSvc.
- You should open the output file AnalysisSkeleton.aan.root in ROOT and browse the histograms and the AthenaAwareNTuple:
root AnalysisSkeleton.aan.root new TBrowser
- You will notice that beside the user-defined NTuple, the AthenaAwareNTuple tools add references to the AOD, ESD and Raw Data, in addition the RunNumber and the EventNumber.
More Information
- For further details on the analysis tools, look at the PhysicsAnalysisTools. Details on the content of the ESD, the AOD and the TAG are on StoregateKeysForESD, StoregateKeysForAOD and TagForEventSelection.
- If you successfully reach this point, you are ready for the tutorial, otherwise seek help. For true beginners, we will go through this Introduction to the ATLAS software.