Code setup

Initial setup

  • Connect to pc2012 and obtain CERN kerberos ticket for SVN authentication:
    $ ssh -XY
    $ 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://
    $ source setup/
    $ ln -s PhysicsNtuple/PhysicsProject/macros/setup/ .

Setup on

  • 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

  • Run over 100k ttbar events to select simple analysis regions and make plots:
    $ tag="410000"; python $TestArea/PhysicsNtuple/PhysicsProject/macros/ /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/ /pc2012-data3/rustem/data/tth/v4_mc_data/${tag}.root -n 100000 -o hist_${tag}.root

    $ python $TestArea/PhysicsNtuple/PhysicsProject/macros/ /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/ 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/
    • 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/ status

  • Update to server SVN:

    $ source $TestArea/ update

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

    $ source $TestArea/ light-compile

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

    $ source $TestArea/ 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
    $ eos ls root://
    $ eos cp 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-2020 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