This is a package to process CMS nanoAOD to flat ntuples. It is assumed that you are running this package at KISTI.
You can set up environment, you can do the following on a KISTI machine.
source /cvmfs/cms.cern.ch/cmsset_default.sh
cd /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_0/src
cmsenv
cd -
Then, check out the package
git clone [email protected]:jaehyeok/nanoprocessing.git
The package uses Fastjet [1] for fat-jet clustering (to calculate MJ). So, you need to install and set it up on your machine. Or, include /cms/ldap_home/<Username>/tools/fastjet-install/bin
in your PATH.
The compliation can be done by running ./complie.ch
. It compiles two scripts (process_nano.cpp
and skim.cpp
) and copy them to your home directory so that they can be used by condor.
You can run the machinery with ./process_nano.exe
. It takes a 4 arguments.
$ ./process_nano.exe
Please provide proper arguments
./process_nano.exe [input dir] [output dir] [process] [list of processed files]
The "list of processed files" is generated by condor/check_progress.py
.
An example is
./process_nana.exe /xrootd/store/data/Run2017D/SingleMuon/NANOAOD/Nano14Dec2018-v1 root://cms-xrdr.private.lo:2094//xrd/store/user/jaehyeok/2017v4/2019_10_23/ SingleMuonRun2017D flist_outputdir_xrd_store.txt
You can run the skim
$ ./skim.exe /xrootd_user/yjeong/xrootd/nanoprocessing/[year]/JetHTRun_v7 rpvfitnbge0 [simultaneous run number]
You can use the skim script
$ ./scripts/run_skim.sh [year]
Renormalization of tree branch
$ ./norm_weights.exe [input dir] [tag] [output dir] [pre-norm dir]
cd condor
./submit_all.py [year]
where year = 2016, 2017 or 2018. Under ~/flist diretory files that contain the nanoAOD files to be processed will be generated. It list is based on samples/samples[year].txt
. In addition, slurm submit files will be generated in submit_scripts
directory together with the actuall commands on the terminal. You can just copy the command and paste them in command line.
cd condor
./submit_norm.py [year]
where year = 2016, 2017 or 2018. Under ~/flist/norm diretory files that contain the nanoAOD files to be processed will be generated. In addition, slurm submit files will be generated in submit_scripts_norm
directory together with the actuall commands on the terminal. You can just copy the command and paste them in command line.
Check the status of the processing by by ./check_progress.py [year]
. It will prin out a table of status, and generate a list of process files in ~/flist directory.