Introduction
- This page describes code for reading (D)xAOD and making analysis ntuples
- Git project: ustc/PhysicsAnpProd
- This tutorial describes how to run ntuple production from DxAOD
Overview
- ustc/PhysicsAnpProd is a standalone package that reads (D)xAOD and produces ROOT ntuples with flat or vector branches
- This package depends on only on AthAnalysisBase release
- This package performs following functions:
- Reads (D)xAOD
- Applies CP corrections
- Saves electrons, muons, and jets as vector TTree branches
- Saves scale factors
- Saves systematic variations - to be added
Code structure
- Job options file:
- Python configuration module:
- python/PhysicsAnpProdxAODHIGG3.py
- Configures algorithms for reading event and object information
- Configures combined performance tools
- Defines output ntuple variables
- Main C++ classes:
Setting up PhysicsAnpProd code with release 20.7
First time setup
- This section describes how to set up this code for the first time using release 20.7 of ATLAS software
- Please run these commands only once and then exit shell:
$ mkdir -p ~/testarea/AnpProd20
$ cd ~/testarea/AnpProd20
$ git clone https://:@gitlab.cern.ch:8443/ustc/PhysicsAnpProd.git
$ source PhysicsAnpProd/macros/setup/first_setup_rel20.sh
$ exit
* If "git clone" above fails and your machine is outside CERN, please try getting CERN Kerberos ticket first:
$ kinit -f -r7d -A $USER@CERN.CH
Ntuple production from release 20.7 DxAOD
- Downloading DxAOD for testing:
$ cd ~/testarea/AnpBase20
$ source PhysicsAnpProd/macros/setup/setup_rucio.sh "YOUR_GRID_USERNAME"
$ rucio download --nrandom=1 mc15_13TeV.363995.PhPy8EG_NNPDF30NLO_AZNLOC6L1_EWK_WmWm.merge.DAOD_STDM3.e5678_s2726_r7772_r7676_p3317
- Running over DxAOD to make ROOT ntuples:
$ cd ~/testarea/AnpProd20
$ source setup_atlas_analysis_release.sh
$ athena $TestArea/PhysicsAnpProd/share/PhysicsAnpProd_ReadxAODHIGG3.py -c "inputDir='mc15_13TeV.363995.PhPy8EG_NNPDF30NLO_AZNLOC6L1_EWK_WmWm.merge.DAOD_STDM3.e5678_s2726_r7772_r7676_p3317';outFile='out.root';EvtMax=1000"
Setting up PhysicsAnpProd with release 21.2
First time setup
- Commands for release 21.2 are currently broken (Rustem)
- Release 20.7 is currently the recommended release for analysis work
- This section describes how to set up this code for the first time using release 21 of ATLAS software
- CMTCMakeRosettaStone - helpful TWiki for working with release 21
- Please run these commands only once and then exit shell:
$ mkdir -p ~/testarea/AnpProd21/source
$ cd ~/testarea/AnpProd21/source
$ git clone https://:@gitlab.cern.ch:8443/ustc/PhysicsAnpProd.git
$ source PhysicsAnpProd/macros/setup/first_setup_rel21.sh
$ exit
- Afterwards, setup Athena release using these commands:
$ cd ~/testarea/AnpProd21/source
$ source setup_atlas_analysis_release.sh
$ source setup_atlas_athena.sh
$ cmake --build $TestArea/../build
Ntuple production from release 21 DxAOD
- Download test files produced by Rhys:
$ rucio download --nrandom=2 mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_MUON5.e5458_s3126_r9364_r9315_p3263
- Run ntuple production code:
$ cd ~/testarea/AnpProd21/source
$ source setup_atlas_analysis_release.sh
$ athena $TestArea/PhysicsNtuple/PhysicsAnpProd/share/PhysicsAnpProd_ReadxAODr21.py -c "inputDir='mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_MUON5.e5458_s3126_r9364_r9315_p3263';EvtMax=10000" &> log & tail -f log