Electron Tag-and-Probe

Introduction
Workflow description
Useful Links

Introduction

This twiki is a users’ guide to use the tag & probe tool to compute electron reconstruction, identification and triggering efficiency. The starting point is the TagAndProbe package, which provides the infrastructure and tools for computing data-driven lepton efficiency. The most widely used calibration source is the decay of well-established narrow resonances into two leptons, e.g., Z → l+l,   J/ψ → l+l,   or Υ → l+l (where l = e, μ, τ). The TagAndProbe package is designed to help to compute these efficiencies as a function of the variable(s) of interest with minimal effort and maximum flexibility.

Recommended for 2018-2017-2016: Workflow Description for CMSSW_10_2_X (CMSSW_10_2_10 or higher)

The workflow to make the tag and probe measurement is split into two steps. But before anything you need to install the code.

  • Step 0: Make a CMSSW release and check out the necessary software
  • cmsrel CMSSW_10_2_10
    cd CMSSW_10_2_10/src
    cmsenv
    git clone -b RunIIfinal https://github.com/tomcornelis/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    scram b -j8
    

    Please check the README for more details on running the TnPTreeProducer and submitting crab jobs.

    Recommended for 2018-2017-2016: Workflow Description in 10_2_X

    The workflow to make the tag and probe measurement is split into two steps. But before anything you need to install the code.

  • Step 0: Make a CMSSW release and check out the necessary software
  • Latest version for prompt/ of 2018 data and MC 2018 for the time being. Note EgammaPostReco tools is not necessary here, E/gamma post reco tools just helps run the setup for the IDs and scale & smearings in way which is easier for the users. However the TnP package is maintained by us so we set it up manually ourselves in the config. Due to the design of VID, the two outputs are guaranteed to be identical.

    cmsrel CMSSW_10_2_5
    cd CMSSW_10_2_5/src
    cmsenv
    git cms-merge-topic cms-egamma:EgammaID_1023 #if you want the V2 IDs, otherwise skip
    git cms-init
    scram b -j8
    
    cd $CMSSW_BASE/src
    

    Depending on the year you want to analyze pick a different branch (the code is basically the same, triggers, global-tag, datasets are different).

    For 2018: For "Moriond 19" dataset (i.e. ReReco ABC + Prompt D for data and Autumn18 MC):

    git clone -b Nm1 https://github.com/swagata87/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    

    For Prompt Reco and Fall18:

    git clone -b v2018.09.24_10_2_X_prelim https://github.com/lsoffi/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    

    For 2017:

    git clone -b IDv2_2017sample https://github.com/swagata87/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    

    For 2016:

    git clone -b IDv2_2016sample_miniaod https://github.com/swagata87/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    

    Compile:

    scram b -j8
    

    NB: Make sure to follow the instructions here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Step1TagAndProbe to update your PU weights for 2018 data.

    Recommended for 2017: Workflow Description in 94X

    The workflow to make the tag and probe measurement is split into two steps. But before anything you need to install the code

  • Step 0: Make a CMSSW release and check out the necessary software
  • Latest version for prompt/re reco of 2017 data and MC

    cmsrel CMSSW_9_4_10
    cd CMSSW_9_4_10/src
    cmsenv
    git cms-init
    git cms-merge-topic cms-egamma:EgammaID_949
    git clone -b CMSSW_9_4_X https://github.com/cms-analysis/EgammaAnalysis-TnPTreeProducer.git EgammaAnalysis/TnPTreeProducer
    scram b -j8
    

    NB: Make sure to follow the instructions here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Step1TagAndProbe to update your PU weights for 2017 data.

    Workflow Description in 92X

    The workflow to make the tag and probe measurement is split into two steps. But before anything you need to install the code

  • Step 0: Make a CMSSW release and check out the necessary software
  • Latest version for prompt/re reco of 2017 data and MC V1 for the time being

    cmsrel CMSSW_9_2_14
    cd CMSSW_9_2_14/src
    cmsenv
    git cms-init
    git cms-merge-topic lsoffi:CMSSW_9_2_X_TnP
    
    cd $CMSSW_BASE/src
    git clone -b v2017.12.04_92X_prelim  https://github.com/lsoffi/EgammaAnalysis-TnPTreeProducer.git EgammaAnalysis/TnPTreeProducer
    scram b -j8
    

    NB: Make sure to follow the instructions here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Step1TagAndProbe to update your PU weights for 2017 data.

    Workflow Description in 80X

    The workflow to make the tag and probe measurement is split into two steps. But before anything you need to install the code

  • Step 0: Make a CMSSW release and check out the necessary software
  • (Latest version for legacy rereco of 2016 data, still under development! ) Does not include yet 80X photon ID (which is not in the release)

    cmsrel CMSSW_8_0_27
    cd CMSSW_8_0_27/src
    cmsenv
    git cms-init
    git cms-merge-topic cms-egamma:EGM_gain_v1
    cd EgammaAnalysis/ElectronTools/data
    git clone -b Moriond17_gainSwitch_unc https://github.com/ECALELFS/ScalesSmearings.git
    cd $CMSSW_BASE/src
    git clone -b v2017.05.23_legacy80X_prelim https://github.com/cms-analysis/EgammaAnalysis-TnPTreeProducer EgammaAnalysis/TnPTreeProducer
    scram b -j8
    

  • Step 1: Production of a flat tree for tag and probe measurement
  • The output will be a root file, which will be used to produce efficiency plots. The producer requires the definition of tag and probe (and truth matching in case of Monte Carlo). Please remember that the flexibility of this package allows you to modify parameters, add your own modules, filters, producers etc to get the efficiencies for your own analysis.
    The current setup is quite general and can be used in many cases though. Three parameters allow you to add info for HLT, Reco or ID measurement (multiple choices are allowed). All information are available in:

    => Step 1: Store all necessary "tag", "probe" information in the ROOT tree

  • Step 2: The tnp Fitter: getting the efficiencies
  • After getting the output ROOT file from the previous step, a fitter is used to measure the efficiencies Since Ichep2016, EGM has a new fitter which allows to handle all systematic automatically and which is much faster than the cmssw fitter:

    The most updated branch, used for 2018 Data production can be found here, detailed instructions are available in the README: =>https://github.com/lsoffi/egm_tnp_analysis/tree/egm_tnp_Prompt2018_102X_09062018

    Other branches used for 2017 and 2016 production: =>https://github.com/swagata87/EgammaAnalysis-TnPTreeProducer/tree/IDv2_2017sample =>https://github.com/swagata87/EgammaAnalysis-TnPTreeProducer/tree/IDv2_2016sample_miniaod

    The cmssw version (more pedestrian) is still available but not maintained anymore. The information in the following pages are still interesting for the description of fitting parameters for instance:

    => Step 2: Fitting tag and probe tree old method

    Older versions of code

    (Moriond 2017 recommendations)

    cmsrel CMSSW_8_0_20
    cd CMSSW_8_0_20/src
    cmsenv
    git cms-init
    git cms-merge-topic fcouderc:tnp_egm_80X_Moriond17_v1.0
    scram b -j 4
    git clone -b egm_id_80X_v1  https://github.com/ikrav/RecoEgamma-ElectronIdentification.git ../external/slc6_amd64_gcc530/data/RecoEgamma/ElectronIdentification/data
    git clone -b egm_id_80X_v1  https://github.com/ikrav/RecoEgamma-PhotonIdentification.git ../external/slc6_amd64_gcc530/data/RecoEgamma/PhotonIdentification/data
    
    rm -f ../external/slc6_amd64_gcc530/data/RecoEgamma/PhotonIdentification/data/Spring15/photon_general_MVA_Spring15_50ns_EB_V0.weights.xml
    rm -f ../external/slc6_amd64_gcc530/data/RecoEgamma/PhotonIdentification/data/Spring15/photon_general_MVA_Spring15_50ns_EE_V0.weights.xml
    
    (80X Ichep2016 recommendation)
    cmsrel CMSSW_8_0_10
    cd CMSSW_8_0_10/src
    cmsenv
    git cms-init
    git cms-merge-topic fcouderc:tnp_egm_80X
    scram b -j 4
    
    (For 76X releases please use instead)
    cmsrel CMSSW_7_6_3_patch2
    cd CMSSW_7_6_3_patch2/src
    cmsenv
    git cms-init
    git cms-merge-topic matteosan1:egm_tnp_76X
    scram b
    
    (For 74X releases please use instead)
    cmsrel CMSSW_7_4_14
    cd CMSSW_7_4_14/src
    cmsenv
    git cms-init
    git cms-merge-topic matteosan1:egm_tnp_v7
    scram b
    

    Useful Links

    Topic attachments
    I Attachment History Action Size Date Who Comment
    PDFpdf egamma_22_05_2015.pdf r1 manage 1918.0 K 2015-05-29 - 00:02 MatteoSani  
    Edit | Attach | Watch | Print version | History: r105 < r104 < r103 < r102 < r101 | Backlinks | Raw View | WYSIWYG | More topic actions
    Topic revision: r105 - 2020-02-21 - TomCornelis
     
      • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
    Ideas, requests, problems regarding TWiki? Send feedback