Get your customized Analysis Code and get ready to analize data in 5 minutes!!

ALERT! This is the old version of the guide, aimed to be used with the first release of ATLASWatchMan. If you are looking for the new version, go to ATLASWatchManQuickStart.

ALERT! Note! This is a quick start guide. If you don't know how to setup your ATLAS environment, checking out a package and compiling it, read this first.



Setup the environment

  • Go in your Athena working directory and set up the ATLAS environment: (more detailed info at ATLASWatchManSetting). For example:
       cd scratch0/testarea/14.2.20/
       source cmthome/setup.sh -tag=14.2.20
       

Checkout and compile the packages

  • Checkout the two packages: ATLASWatchMan and SUSYTools (inserters and formulas):
       cvs co -r ATLASWatchMan-00-01-00 groups/freiburg/SUSY/ATLASWatchMan/
       cvs co -r SUSYTools-00-02-00 groups/freiburg/SUSY/SUSYTools/
       
    ALERT! (For release 14.2.20 you have to downgrade the requirements file typing: cvs up -r SUSYTools-00-01-00 groups/freiburg/SUSY/SUSYTools/cmt/requirements )

  • Compile the two packages (see note (1)) :
       cd groups/freiburg/SUSY/SUSYTools/cmt
       cmt make
       cd -
    
       cd groups/freiburg/SUSY/ATLASWatchMan/cmt
       cmt make
       

Run the example analysis

Generate the analysis code

  • Go in the run/ directory of ATLASWatchMan:
    cd ../run

  • Here you will find an example of Steering File. In this file you can define your analysis. Remember that you can define as many channels/analyses you want at the same time. To run the example:
    python -m ATLASWatchMan/ATLASWatchMan_Parser ATLASWatchMan_AnalysisSteeringFile_benchmarkChannels
    You will get the Analysis Code automatically generated, dinamically based on the settings in the Steering File. You can find the generated analysis code in the python/ folder. You can look at it: it's a plain Python code and it is organized as a standard Athena package; it's very easy to understand indeed! The generated code is at:
    emacs ../python/ATLASWatchMan_GeneratedAnalysisLib.py
    Together with the Analysis Code, other files are dinamically generated, among them an Athena jobOption that you will use in the next step.

Run the generated analysis code

  • Now you can try to run the example code locally, for example with Athena:
    • This will run on an example AOD file in Castor (very slow!!)
      athena -c "EvtMax=500" ../share/ATLASWatchMan_Generated_jobOptionAthena.py
    • If you have a file ready to run upon (AOD, DPD, ...), you can use the standard Athena command:
      athena -c "InputCollections=['myNiceFile1', 'myNiceFile2']; EvtMax=500" ../share/ATLASWatchMan_Generated_jobOptionAthena.py

Of course the file name has to contain the full path if it's not in the run/ folder.

    • If you have a text file containing a list of files you can use it like this (custom command):
      athena -c "CollectionFiles='myNiceList.txt'; EvtMax=500" ../share/ATLASWatchMan_Generated_jobOptionAthena.py

Look into the output D3PD produced

  • Open the generated D3PD file with ROOT and look at its content:
    root -l OutputD3PD.root
    At the ROOT prompt open a TBrowser
    TBrowser b1;
    then click on ROOT files, then on the file "OutputD3PD" and then on the TTree "D3PDTree". You will get a window like this:

ATLASWatchMan_D3PDTBrowser.jpg

  • In the output TTree you have particles and other user-defined quantities (more details on them in the full documentation). The important thing to notice is that the TTree contains the output for all the analyses we define in the Steering File. Try to double-click on "channels" branch, and then on "data" method... You will get a distribution of events having passed the analyses/channels defined in the steering file. ( see note (2) )

ATLASWatchMan_channels.gif

Start changing the example file and get your own automatically generated analysis code!

  • Now you can start to edit the Steering File.
        cp ATLASWatchMan_AnalysisSteeringFile_benchmarkChannels.py ATLASWatchMan_AnalysisSteeringFile_myAnalysis.py
        emacs ATLASWatchMan_AnalysisSteeringFile_myAnalysis.py
        
    You can start changing simple things, like the required number of jets or leptons in a channel, or the value of pT in the JetPtCuts field. The name of the variables of the Python dictionary are quite self-explicative, and you can find the full documentation about the Steering File here, together with many practical examples.

  • Then run the analysis code generation with
    python -m ATLASWatchMan/ATLASWatchMan_Parser ATLASWatchMan_AnalysisSteeringFile_myAnalysis

  • And then run again the analysis as above, for example with:
    athena -c "InputCollections=["myNiceFile"]; EvtMax=500" ../share/ATLASWatchMan_Generated_jobOptionAthena.py


Notes:

  • (1) ATLASWatchMan needs to be compiled only once, to create symlinks and get the ROOT dict for vector. Even when you change your Steering File to change your analysis you don't need to compile, because almost all the code is written in Python.

  • (2) In order to use the interactive ROOT TBrowser to navigate and plots the particles 4mom , you have to use at least ROOT version 5.22. The ROOT version shipped with Athena (5.18 so far, for 14.2.20) does not handle vector< TLorentzVector > correctly. Future versions of Athena will have the right ROOT version. But you can access all the data from a ROOT macro, a C++ or a Python code, as usual. More examples in the full version of the ATLASWatchMan documentation.

-- RiccardoMariaBianchi - 28 Jan 2009 -- JanetDietrich - 20 Mar 2009

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2009-07-01 - RiccardoMariaBianchi
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback