nanoAOD skiming code for H->ZZ->2l2Q studies.
-
Step: 1: Get CMSSW release
cmsrel CMSSW_10_6_30 cd CMSSW_10_6_30/src cmsenv
-
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
-
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
-
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
-
Step: 4: interactive running
cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools/python/postprocessing/analysis/nanoAOD_skim python post_proc.py
-
batch job submission.
-
Step: 5 (a): Condor-job submission (recommended)
-
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
-
-
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
-
-
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.
-
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>
-
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>
-
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>