Skip to content

cmantill/BstarToTW_CMSDAS2021

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BstarToTW_CMSDAS2021

Getting started (in bash shell)

Setup CMSSW environment:

ssh -XY [email protected]
export $SCRAM_ARCH=slc7_amd64_gcc820 
cd nobackup/
mkdir b2g_exercise/
cd b2g_exercise/
cmsrel CMSSW_11_1_4
cd CMSSW_11_1_4/src
cmsenv

In the src directory, clone repo:

git clone https://github.com/ammitra/BstarToTW_CMSDAS2022.git

OR fork the code onto your personal project space and set the upstream:

git clone https://github.com/<GitHubUsername>/BstarToTW_CMSDAS2022.git
cd BstarToTW_CMSDAS2022
git remote add upstream https://github.com/ammitra/BstarToTW_CMSDAS2022.git
git remote -v

In the src directory, create environment

git clone https://github.com/lcorcodilos/TIMBER.git
python -m virtualenv timber-env
source timber-env/bin/activate
cd TIMBER
source setup.sh
cd ..
python -c 'import TIMBER.Analyzer'

Starting up once environment is set:

Once you have an environment:

cd CMSSW_11_1_4/src/
cmsenv
source timber-env/bin/activate

If you need to update TIMBER

cd TIMBER/
git fetch --all
git checkout master
python setup.py develop
cd ../

If you need to update BstarToTW_CMSDAS2020

cd BstarToTW_CMSDAS2020
git fetch --all
git pull origin master
cd ../

Submitting jobs

Link condor helper from Timber

ln -s ../../TIMBER/TIMBER/Utilities/Condor/CondorHelper.py

Test it works on one file:

python CondorHelper.py -r condor/run_presel.sh -a test_args.txt -i "bs_select.py bstar.cc bstar_config.json helpers.py"

This should output one file to your directory if everything works.

Submitting all jobs

To submit all jobs for the nominal selection:

python CondorHelper.py -r condor/run_presel.sh -a all_args.txt -i "bs_select.py bstar.cc bstar_config.json helpers.py"

To submit all jobs for the deepAK8 selection (we add the --deep flag):

python CondorHelper.py -r condor/run_presel.sh -a all_args_deep.txt -i "bs_select.py bstar.cc bstar_config.json helpers.py"

You can monitor jobs with:

condor_q

Once they finish you can move the output files to one directory and add the data files

mkdir bstar_inputs_deep_variations/
mv *.root bstar_inputs_deep_variations/
hadd bstar_inputs_deep_variations/Presel_Run2_data.root bstar_inputs_deep_variations/Presel_data*.root

For 2016 (then change args file for other years):

python CondorHelper.py -r condor/run_bstar.sh -a 2016_args.txt  -i "bs_select.py bstar.cc bstar_config.json helpers.py"

An example of deepAK8 output files is here:

/eos/uscms/store/user/cmsdas/2022/long_exercises/b2g/bstar_inputs_deep_variations/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.4%
  • C++ 17.9%
  • Shell 2.7%