Skip to content

cms-hnl/HNLTauPrompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HNL with tau analysis code

HNL-->3leptons analysis with tau using law workflow.

Requirements

You only need a CERN account, with access to DAS: https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookLocatingDataSamples

Packages

Here is a non-exhaustive list of the packages that I used:

  • python3
  • law
  • coffea
  • akward array
  • root
  • numpy
  • matplotlib
  • yaml

For simplicity, you can use the same conda environment as I, which is saved in a .yml file. For that:

conda env create -f HNL_environment.yml

Running the analysis

  • Clone this repositiry (to do once)
git clone [email protected]:cms-hnl/HNLTauPrompt.git
cd HNLTauPrompt/
  • Setup the environment (to do at each login)
source env.sh

Make sure you have the correct path to your repository in env.sh

Then you can use law to monitor and run the different tasks

Law commands

  • First you need to create an index file, too list all the tasks.
law index --verbose

Tasks can be interdependent. To not mix up jobs, specify the same "version" parameter for all the tasks (here we use "v1"). For now, we used only 2018 samples.

  • You can print task dependencies with
law run name_of_the_task --version v1 --periods 2018 --print-deps -1
  • You can print task status of the task with
law run name_of_the_task --version v1 --periods 2018 --print-status -1
  • Run task locally and the ones required by that task (useful for debugging)
law run name_of_the_task --version v1 --periods 2018 --name_of_the_task-workflow local
  • Run task with HTcondor
law run name_of_the_task --version v1 --periods 2018
  • If you want to limit the number of jobs running simultaneously (EOS space management for skimed nanoAOD samples)
law run name_of_the_task --version v1 --periods 2018 --CreateNanoSkims-parallel-jobs 100

Tasks

  • CreateVomsProxy: creates a new proxy in order to access DAS: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideVomsFAQ
  • CreateDatasetInfos: creates json files in which are stored all the dataset info (size, nevents, DAS path for each files) specified in config/samples_{period}.yaml input file
  • CreateNanoSkims: creates skimmed root files by batch (limited by max_size_limit param) for each dataset, using json files info previously produced.
  • CoffeaAnalysis: analyse HNL signal, background and data using Coffea (Columnar Object Framework For Effective Analysis). This task require additional argument --tag which will be the name of the folder where we store the results. The results are stored in two type of pickle files (in CoffeaAnalysis/results/):
    • counter.pkl which save the original sumw (before skimming) of MC samples (backgrounds and HNL signal)
    • result_{...}.pkl which save the histograms and sumw/nevent after each cut for each channel/region (ABCD method for QCD estimation).

Helpers to monitor results

  • Produce 2 htlm files which contain information on the root file (doc= description of branches, size= exhaustive description of file's size)
inspectNanoFile.py -d doc.html -s size.html /eos/user/p/pdebryas/HNL/v1/nanoAOD/2018/HNL_tau_M-1000.root

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published