Code setup

Initial setup

  • Connect to pc2012 and obtain CERN kerberos ticket for SVN authentication:
    $ ssh -XY pc2012.hep.manchester.ac.uk
    $ kinit -f -r7d -A YOUR_CERN_USER_NAME@CERN.CH

  • Commands to check out and compile code for the first time:
    $ mkdir -p /pc2012-data3/${USER}/testarea/MPhysProject
    $ cd /pc2012-data3/${USER}/testarea/MPhysProject

    $ svn co svn+ssh://svn.cern.ch/reps/manc/PhysicsNtuple/PhysicsProject/trunk/macros/setup
    $ source setup/setup_code_first_time.sh
    $ ln -s PhysicsNtuple/PhysicsProject/macros/setup/setup_atlas_release_cvmfs.sh .

Setup on higgs.hep.manchester.ac.uk

  • Replace "pc2012-data3" with "higgs-data4"
  • Replace "pc2012 with "higgs"
  • Use this data path when running code below: /higgs-data4/rustem/data/tth/v4_mc_data

Run analysis example

  • Setup release:

    $ cd /pc2012-data3/${USER}/testarea/MPhysProject
    $ source setup_atlas_release_cvmfs.sh

  • Run over 100k ttbar events to select simple analysis regions and make plots:
    $ tag="410000"; python $TestArea/PhysicsNtuple/PhysicsProject/macros/runMPhys.py /pc2012-data1/rustem/data/tth/25ns_MC_v2/${tag}.root -n 100000 -o hist_${tag}.root
  • old Ntuples:
    $ tag="410000"; python $TestArea/PhysicsNtuple/PhysicsProject/macros/runMPhys.py /pc2012-data3/rustem/data/tth/v4_mc_data/${tag}.root -n 100000 -o hist_${tag}.root

    $ python $TestArea/PhysicsNtuple/PhysicsProject/macros/runMPhys.py /pc2012-data3/rustem/data/tth/v4_mc_data/410000.root -n 50 --print-vars

  • How to make plots
    • Double click on canvas to advance to advance to a next plot
    • Plotting command:
       $ python macros/plotHists.py hist_410000.root --rkey=.*nocut -o plots -s -w

Analysis flow

  • Top level module is ReadNtuple class
    • Reads ROOT ntuple
    • Creates RecoEvent which contains raw reconstructed objects: muons, electrons, jets and hadronic tau candidates
    • Creates and executes children algorithms that are described next
    • It should not be necessary to modify this class

  • PrepCand class creates candidate event
    • Select reconstructed objects using kinematic and particle identification information
    • Apply overlap removal between objects (eg electrons should not overlap with particle jets)
    • Create CandEvent to represent candidate event containing selected objects
    • It should not be necessary to modify this class

  • PrepTopEvent class computes analysis variables
    • Code for new CandEvent variables should be added here

  • PlotCand class plots variables stored with candidate event in a selected analysis region
    • Select candidate events with desired properties, for example: "2 leptons" OR "1 lepton and 1 hadronic tau"
    • Plot event variables defined in histogram files
    • It should not be necessary to modify this class

  • Analysis job is configured in python module python/PhysicsProjectMPhys.py
    • Mapping between variables in ROOT ntuples and variables used by this analysis code
    • Define flow of algorithms that will be executed for every event
    • Configuration for object selection to create CandEvent
    • Configuration for event selection to plot CandEvent variables
    • Changes to object and event selection should go here

How to create and plot a new event variable

  • Main analysis package is PhysicsProject - this is where all work should be done
    • Use "NJet" and "Mll" variables as an example.

Brief framework documentation

How to update code after initial setup

  • Check SVN status - make sure that there no conflicts (C):

    $ source $TestArea/setup_atlas_release_cvmfs.sh status

  • Update to server SVN:

    $ source $TestArea/setup_atlas_release_cvmfs.sh update

  • Recompile code (if no new files are added):

    $ source $TestArea/setup_atlas_release_cvmfs.sh light-compile

  • When new files are added, packages have to be rebuilt from scratch:

    $ source $TestArea/setup_atlas_release_cvmfs.sh compile

How to download new ntuples from CERN

  • Ntuples are stored on EOS mass storage at CERN
  • Latest version is v4 with small changes with respect to previous version
  • MC ntuples are organised by process id - described here
  • First copy ntuples to tmp area on lxplus and then copy them to Manchester

    $ ssh lxplus.cern.ch
    $ eos ls root://eospublic.cern.ch//eos/escience/UniTexas/HSG8/multileptons_ntuple_run2/25ns_v4/Nominal/
    $ eos cp root://eospublic.cern.ch//eos/escience/UniTexas/HSG8/multileptons_ntuple_run2/25ns_v4/Nominal/410000.root /tmp/$USER/

To-do items

Paper references

ATLAS references

Edit | Attach | Watch | Print version | History: r16 | r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r12 - 2016-03-03 - RustemOspanov
 
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback