Hands-on Advanced Training Session on Jet Substructure

This is the 2013 exercise. The 2014 exercise can be found here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideHATSJetSubstructure2014

Contents for short exercise:
  • Introduction

  • Pre-exercise - How to start using jets in your analysis

  • Session 1 - Jet clustering algorithms
  • Session 2 - Jet Substructure
  • List of materials for the HATS


        What this set of exercises is trying to do ?

        Give you a hands-on experience on jet substructure.

        • Make you familiar with jet substructure variables and jet grooming techniques, and how to use them in your analysis.
        • Walk you through common sub-structure techniques used to enhance signal for boosted objects, e.g., W-tagging, top-tagging.
        • Illustrate each exercise using real life example scripts.
        • Give you a comprehensive reference to more advanced workbook examples, additional resources, and pedagogical documentation in one place.

        What we expect from you ?

        • To get an LPC unix account (if you haven't already done so), Kerberize your laptop, and bring it for the tutorial session. Follow the instructions on the CMSDAS jet short exercise twiki before coming to this tutorial:
          We will go through some of these in our two "pre-exercises" below in order to refresh our memory.
        • To complete quiz at the end of each exercise.

      During the May 29th tutorial we will follow the presentation found on the indico page, not this TWIKI.

      Link to the tutorial indico page: https://indico.cern.ch/conferenceDisplay.py?confId=251174

      Pre-exercise - Set up software and dataset

      NOTE! This analysis will be using PAT-tuples created with the workflow described in this TWiki. The user is not required to run this, but the steps are there for pedagogical purposes.

        Step 0: Login to the right machine

        ssh -Y lxplus5.cern.ch       (for running this exercise at CERN only)
        ssh -Y cmslpc-sl5.fnal.gov       (at Fermilab LPC only)

        Step 1: Checkout a current CMS software release and set up your local environment

        Here is a quick recipe:

        source /uscmst1/prod/sw/cms/cshrc prod       (at Fermilab LPC only)
        scram project CMSSW CMSSW_5_3_7
        cd CMSSW_5_3_7/src/

        Step 2: Checkout additional software package needed for jet analysis exercise

        kserver_init     (at Fermilab LPC only)
        (you will be prompted to type your CERN username and password)
        setenv CVSROOT ":gserver:isscvs.cern.ch/local/reps/CMSSW"
        export CVSROOT=":gserver:isscvs.cern.ch/local/reps/CMSSW"    (zsh users)
        addpkg RecoJets/JetAnalyzers V00-06-cmshats2013-08
        cvs co -d JetSubstructure UserCode/ntran/JetSubstructure

        Now compile everything:

        scram   b   -j4

        Step 3: Run a simple jet analysis job

        cd     RecoJets/JetAnalyzers/test/

        The files are local at FNAL: /uscms_data/d1/jdolen/HATS/

        The files are also located on LXPLUS: /afs/cern.ch/work/n/ntran/public/HATS/

        If running at LXPLUS you'll have to edit /RecoJets/JetAnalyzers/test/JetSubstructurePloteExample.py to point to the files

        The samples include QCD background, standard model top anti-top, Z'->ttbar, and RS Gluon -> WW

        Then run the following python configuration:

        cmsRun   JetSubstructurePlotsExample.py

        This will produce a ROOT file containing histograms. The analysis is done by the template class JetSubstructurePlotsExample.cc. The code loops over a configurable number (which is set to 2000 in the example script we just ran) of events, makes some basic histograms, and writes them to the output ROOT file.

        By default the config file runs over a sample of Z'->ttbar. Lets run again over a sample of a heavy resonance decaying to WW. Modify JetSubstructurePlotsExample.py such that it looks like this:

        #isQCDMC = True
        isQCDMC = False
        #isZprimeMC = True
        isZprimeMC = False
        #isTTbarMC = True
        isTTbarMC = False
        isRStoWW = True
        #isRStoWW = False

        We could run this again over QCD MC. This requires a larger sample, so just grab this file:

        cp /uscms_data/d2/jdolen/HATS/jetSubstructurePlotsExample_QCDMC.root .

        While you're at it, we've already run these files over a large number of events. Grab them if you are interested:

        cp /uscms_data/d2/jdolen/HATS/jetSubstructurePlotsExample_RStoWW.root .
        cp /uscms_data/d2/jdolen/HATS/jetSubstructurePlotsExample_ZprimeMC.root .

        Session 1 - Jet clustering algorithms

        • Comparison of jet areas
        • Jet mass
        • Jet grooming techniques

        Exercise 1.a - basic jet plots

        We've provided you with script to compare histograms from our root files. Run the script as follows:

        python -i plot_Compare2Histos.py --inputFile1=jetSubstructurePlotsExample_QCDMC.root

        Answer questions from the presentation. Try it again with other input files. Use this script to compare the same histogram from two files:

        python -i plot_Compare2Files.py --inputFile1=jetSubstructurePlotsExample_RStoWW.root --inputFile2=jetSubstructurePlotsExample_QCDMC.root

        Exercise 1.b - jet mass pT dependance

        The root files we made contain 2-D hisrograms of Jet Mass vs Jet pT: "h2AK5JetMassPt" for AK5 jets and "h2CA8JetMassPt" for CA8 jets. Draw 2D histos by opening file in editor and drawing colz

        Now lets make some TProfile plots to compare average jet mass as a function of pT.

        root -x plot_mass_vs_pt.cpp

        Exercise 1.c - grooming

        Open up plot_Compare2Histos.py and un-comment section 1c. Run it again to and answer the questions from the presentation about groomed jets.

        You can also compare signal and background with plot_Compare2Files.py. Un-comment Exercise 1c.

        Exercise 1d - jet mass dependence on pt and nvtx for groomed jets

        root -x plot_mass_vs_pt_groomed.cpp

        root -x plot_mass_vs_nvtx.cpp

        Exercise 1e - vary grooming parameters (if we have time)

        Try experimenting with changing the jet grooming parameters. Edit RecoJets/JetAnalyzers/src/JetSubstructurePlotsExample.cc, starting around line 306

        Examples of things to try. Try increasing the pT fraction requirement of trimmed jets (float ptfrac = 0.07;). Try varying the pruned jet zcut. Try decreasing the reclustering distance parameter for pruned jets (rfilt).

        Also edit /test/JetSubstructurePlotsExample.py to change the output file name. scram b and cmsRun.

        Session 2 - Jet substructure

        • Subjets
        • Jet substructure variables
        • Mass drop + filtering
        • N-subjettiness
        • Q-jets
        • Jet-charge
        • W tagging
        • Top tagging

        2a W tagging

        Compare jet substructure variable comparisons for W jets and QCD.

        Use the following script to compare a 1 TeV WW resonance and QCD background. You'll have to un-comment Exercise 2

        python -i plot_Compare2Files.py --inputFile1=jetSubstructurePlotsExample_RStoWW.root --inputFile2=jetSubstructurePlotsExample_QCDMC.root

        The variables you should look at in particular are:

        • Jet mass
        • Groomed jet mass
        • Tau1
        • Tau2
        • Tau21
        • Mass drop + for pruned jets
        • Subjet Asymmetry + for pruned jets
        • Q-jets volatility

        How can these variables be used to tag boosted Ws? Which has better data-background separation, jet mass or groomed jet mass?

        [] .L plot_ROC_wtag.cpp
        [] run()

        2b Top tagging

        Compare jet substructure variable comparisons for top jets and QCD.

        Use the following script to compare a 2 TeV ttbar resonance and QCD background:

        python -i plot_Compare2Files.py --inputFile1=jetSubstructurePlotsExample_ZprimeMC.root --inputFile2=jetSubstructurePlotsExample_QCDMC.root

        The variables you should look at in particular are:

        • Jet mass
        • Groomed jet mass
        • Tau2
        • Tau3
        • Tau32
        • Q-jets volatility
        • CMS Top Tagger MinMass
        • CMS Top Tagger Nsubjets

        How can these variables be used to tag boosted tops?

        [] .L plot_ROC_toptag.cpp
        [] run()

      List of materials for the HATS

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf HATS_session1.pdf r2 r1 manage 1714.7 K 2013-05-29 - 19:28 NhanTran  
PDFpdf HATS_session2.pdf r1 manage 2628.0 K 2013-05-29 - 19:28 NhanTran  
PDFpdf JS_HATS_intro.pdf r3 r2 r1 manage 4152.5 K 2013-05-29 - 18:22 KalanandMishra  
Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r20 - 2014-06-17 - JamesDolen
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic 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