Skip to content

ram1123/nanoAOD_skim

This branch is 19 commits ahead of osWW-VBS/nanoAOD_vvVBS:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

31b4dbb · Jan 23, 2024

History

37 Commits
Aug 17, 2023
Sep 27, 2023
Sep 27, 2023
Sep 27, 2023
Sep 27, 2023
Sep 27, 2023
Nov 29, 2023
Sep 27, 2023
Nov 29, 2023
Sep 27, 2023
Sep 25, 2023
Sep 25, 2023
Jan 23, 2024
Nov 29, 2023
Aug 17, 2023
Aug 17, 2023
Nov 29, 2023
Nov 29, 2023
Sep 27, 2023
Jan 23, 2024
Sep 27, 2023
Aug 17, 2023
Oct 2, 2023
Jan 23, 2024
Jan 23, 2024
Aug 17, 2023
Nov 29, 2023
Aug 17, 2023

Repository files navigation

NanoAOD Skim

nanoAOD skiming code for H->ZZ->2l2Q studies.

Code setup

  1. Step: 1: Get CMSSW release

    cmsrel CMSSW_10_6_30
    cd CMSSW_10_6_30/src
    cmsenv
  2. Step: 2: Get official nanoAODTools

    git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
    cd PhysicsTools/NanoAODTools
    git checkout 65359982275c476834ad4b37363d658166881f12 # Updated to commit on 16 June 2023 in official nanoAOD-tools
  3. Step: 3: Get our analysis repository

    cd $CMSSW_BASE/src
    git clone [email protected]:ram1123/nanoAOD_skim.git PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim
    cd PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim
    git checkout HZZ_Analysis
    cd -
    cmsenv
    # patch PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim/nanoAOD_tools.patch
    cp PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim/data/btag/*.csv PhysicsTools/NanoAODTools/data/btagSF/.
    scram b
    voms-proxy-init --voms cms --valid 168:00

    (Optional: Fix git repo)

    find PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim/.git/ -name "*.py*" -delete
  4. Step: 4: Get the MELA package

    cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim
    git clone -b v2.3.5 https://github.com/JHUGen/JHUGenMELA
    sh JHUGenMELA/MELA/setup.sh -j 8
    cd JHUGenMELA/MELA
    make
  5. Step: 4: interactive running

    cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim
    python post_proc.py
  6. batch job submission.

    1. Step: 5 (a): Condor-job submission (recommended)

      1. In the file condor_setup_lxplus.py, specify the correct input text file (present inside directory input_data_Files) from which you need to take input NanoAOD DAS names. Also, updated the output EOS path. Then do the following:

        cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim
        # Use the arguments that you need.
        python condor_setup_lxplus.py --input-file sample_list_v9.dat
        # Set proxy before submitting the condor jobs.
        voms-proxy-init -voms cms --valid 200:00
        condor_submit <Files-created-from-above-command>.jdl
    2. Step: 5(b): Crab-job submission (Not tested recently)

      cd crab/
      voms-proxy-init -voms cms --valid 200:00
      source /cvmfs/cms.cern.ch/crab3/crab.sh
      crab submit -c crab_cfg.py

Few additioanl scripts

  1. condor_setup_lxplus.py: This script can be used to setup the condor jobs. It takes the input text file (present inside directory input_data_Files) from which you need to take input NanoAOD DAS names. Also, updated the output EOS path. Then do the following:

    python condor_setup_lxplus.py --input-file sample_list_v9.dat

    This will create the condor job files and the condor log files.

  2. scripts/GetLogSummary.py: This script can be used to get the summary of the condor jobs. It takes the condor log files as input and gives the summary of the jobs. This summary contains the cut-flow table. It can be used as follows:

    python scripts/GetLogSummary.py <condor_log_file_base_path>
  3. scripts/check_das_sample.py: This script can be used to check the status of the DAS samples. It takes the DAS name of the sample as input and gives the status of the sample. It can be used as follows:

    python scripts/check_das_sample.py <DAS_name_of_the_sample>
  4. scripts/condor_resubmit.py: This script can be used to resubmit the failed condor jobs. It takes the condor log files as input and resubmits the failed jobs. It can be used as follows:

    python scripts/condor_resubmit.py <condor_log_file_base_path>

Few important points

About

nanoAOD skiming code for vv senile-tonic VBS studies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.9%
  • Shell 19.1%