Introduction

  • This page describes the data samples, selections, analysis framework for the WH(->WW) Run 2 analysis

Info

References

MC samples and data

MC samples

  • DxAOD samples for Rel. 21
    • mc16a for data 15 and data 16
    • mc16d for data 17
    • mc16e for data 18
  • DSIDs for each process
    • WHWW - 341422, 341424, 341425, 341426, 341428, 341430, 341432, 341433, 341434, 341436, 345326, 345327, 346643, 346644
    • ZHWW - 345337, 345446
    • WZ - 363357, 363358, 363489, 364253, 364284, 364289
    • ZZ - 345705, 345706, 363355, 363356, 364250, 364283, 364288
    • WW - 364254, 364290
    • VVV - 364242, 364243, 364244, 364245, 364246, 364247, 364248, 364249, 364336,364337,364338,364339
    • W+jets - 361100, 361101, 361102, 361103, 361104, 361105
    • Z+jets - 308092, 308093, 308094, 361106, 361107, 361108, 361664, 361665, 361666, 361667, 361668, 361669
    • V+gamma - 700011, 700012, 700013, 700014, 700015, 700016, 700017
    • ttV - 410155, 410218, 410219, 410220
    • tZ - 410550
    • tW - 410550
    • ttbar - 410470
    • single top - 410644, 410645, 410658, 410659

Data

  • data 15,16,17,18

Ntuple Production

Release 21 framework

How to run the production:

First time setup

  • This section describes how to set up this code for the first time using release 21 of ATLAS analysis software
  • It is also available in the README of the PhysicsAnpProd package
  • Please run these commands only once and then exit shell:
      $ mkdir -p ~/testarea/AnpProd21
      $ cd ~/testarea/AnpProd21
      $ mkdir build run source
      $ cd source
      $ git clone https://:@gitlab.cern.ch:8443/ustc/PhysicsAnpProd.git
      $ cd ../
      $ source source/PhysicsAnpProd/macros/setup/first_setup_rel21.sh
      $ cd source
      $ source setup_atlas_analysis.sh
  • Note that a package IFFTruthClassifier which is the tool for leptons truth classifier from ATLAS IFF group will be cloned in the first setup
  • If "git clone" above fails outside CERN, please try getting CERN Kerberos ticket first:
      $ kinit -f -r7d -A $USER@CERN.CH 

On Every Login

  • To restore a previous setup, simply navigate to your working directory and :
      $ cd source
      $ source setup_atlas_analysis_release.sh

Run Test WH Ntuple

  • Run the test job with MC samples on lxplus:
      $ athena $TestArea/../source/PhysicsAnpProd/share/PhysicsAnpProd_ReadxAODr21.py -c "inputDir='/afs/cern.ch/work/h/heng/public/workspace/data/WH_DxAOD_samples/Rel.21/mc16_13TeV.345327.PowhegPythia8EvtGen_NNPDF3_AZNLO_WpH125J_MINLO_lvWWlvlv.deriv.DAOD_HIGG3D1.e5823_s3126_r9364_p3639';EvtMax=100;dumpSG=False;PRWConfig='/afs/cern.ch/work/h/heng/public/workspace/PRWConfigFiles/MergedConfigFiles/prw.merged.root'" &>log& tail -f log

  • Run the test job with MC samples on ui:
      $ athena $TestArea/../source/PhysicsAnpProd/share/PhysicsAnpProd_ReadxAODr21.py -c "inputDir='/lustre/AtlUser/liheng/data/WH_DxAOD_samples_mc16a';EvtMax=100;dumpSG=False;PRWConfig='/lustre/AtlUser/liheng/WH/PRWConfigFiles/MergedConfigFiles/HWW_merged_prw_config_mc16a_FS_v1.root'" &>log& tail -f log
  • Please add following to -c if run a job with data:
     $ IS_DATA=True 

Selections:

Analysis Framework

Release 21 framework

How to run the analysis:

First time setup

  • This section describes how to set up this code for the first time using release 21 of ATLAS analysis software
  • Please run these commands only once and then exit shell:
      $ mkdir -p ~/testarea/AnpWH
      $ cd ~/testarea/AnpWH
      $ mkdir build run source
      $ cd source
      $ git clone https://:@gitlab.cern.ch:8443/ustc/Physics/PhysicsAnpWH.git
      $ source PhysicsAnpWH/macros/setup/first_setup_rel21.sh
      $ acm compile
      $ exit
  • If "git clone" above fails outside CERN, please try getting CERN Kerberos ticket first:
      $ kinit -f -r7d -A $USER@CERN.CH 

On Every Login

  • To restore a previous setup, simply navigate to your working directory and :
      $ cd source
      $ source setup_atlas_analysis_release.sh

Run Test WH Analysis

  • Run the test job on lxplus:
      $ python $TestArea/../source/PhysicsAnpWH/macros/runWH.py /afs/cern.ch/work/h/heng/public/workspace/ntuples/WHWW/job_0010_345327_out.root -n 100 -o WH345327.root &>runWHlog& tail -f runWHlog
  • Run the test job on ui:
      $ python $TestArea/../source/PhysicsAnpWH/macros/runWH.py /lustre/AtlUser/liheng/whNtuples/WHZH/Run_345327_ntuple.root -n 100 -o WH345327.root &>runWHlog& tail -f runWHlog
  • Get the cutflows and stack plots
      $ python $TestArea/../source/PhysicsAnpWH/macros/plotCand.py MC_Hists/* --data-file=Data_Hists/data1516.root --xsec-list=$TestArea/../source/PhysicsAnpWH/data/plot/xsec_list.txt --get-regions --counts-dir=Counts --config-path=$TestArea/../source/PhysicsAnpWH/data/plot/plot_stack_wh_wz_2l.txt -r -s --do-fixrange --ilumi=36074.56 --draw-region -o plots &>stack.log& tail -f stack.log

where the "MC_Hists" should contain the histograms from MC, "Data_Hists/data1516.root" should be the histogram root file from data.

Example of Add a Class, Read Events and Save to Histogram

1. Create STXS class
    void Config(const Registry &reg);  # called at configure

    bool Init(); # called in initialization

    void Save(TDirectory *dir); # called once before event loop

    void Exec();  # called for each event 
   
    void Done(); # called after eventloop finished

  • Set fReco in Config(const Registry &reg), then you can fetch each event by calling fReco->GetVec<CandEvent>(), it returns a vector of event. For each event, you can get informations such as objects collections.

2. Fill Histogram

  • Now you can calculate variable in exec and fill the histogram by calling event.AddVar() method
    event.AddVar(Var::NElec,           elecs.size());
    event.AddVar(Var::NTruthElec, truthElecs.size());
  • Make sure your variable exists in VarDef.h and VarDef.cxx, if not, add them.
3. Register your Class and Histogram in python configure.

In file RunWH.py or you can create a new macro similar like it (RunSTXS.py). add

    prep_stxs    = getSTXS       ('STXS', options,prep_cand) 

and

    prep_algs += [prep_stxs] 

in function prepareJobConfig() to register your algorithm class. also in prepareJobConfig() add

     plot_algs += [getPlotCand('%s_%s'     %("cand", "stxs"),       prep_cand, options)]

and

    plot_cand.SetKey('KeyHist',    'PlotSTXS')

in getPlotCand() to register your histogram.

  • Last step, you need create a xml file, which specifics the histograms you want produce. (PhysicsAnpWH /config/wh/)
<?xml version="1.0" ?>
<histograms>

    <dirbase dirs="PlotSTXS" />

    <hist key="NElec" name="" title="">
        <Xaxis bin="10" min="-0.5" max="9.5" title="Number of electrons" />
    </hist>
    <hist key="NTruthElec" name="" title="">
        <Xaxis bin="10" min="-0.5" max="9.5" title="Number of truth electrons" />
    </hist>

</histograms>
  • compile the new class
        acm clean
        acm compile
  • run STXS algorithm class by:
    $ python $TestArea/../source/PhysicsAnpWH/macros/runSTXS.py

ToDo list

  • Ntuple production:
    • for data 2017, 2018; mc 16d, mc 16e
  • Analysis:
    • ?
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r13 - 2020-08-07 - HengLi
 
    • 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-2021 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