This document is intended as a guide to making
TreeMaker ntuples via job submission to Condor. It is assumed that you already have a Grid certificate and access to LPC.
Getting your area configured on LPC
Start by logging into LPC and navigating to where you would like to place your CMSSW directory. If you already have a version of CMSSW that you would like to use, then you can just navigate to the directory just above it. This one was done with CMSSW_10_2_12.
wget https://raw.githubusercontent.com/TreeMaker/TreeMaker/Run2_2017/setup.sh
chmod +x setup.sh
./setup.sh -c CMSSW_10_2_12 -a https -j 1
cd CMSSW_10_2_12/src/
export SSL_CERT_DIR='/etc/pki/tls/certs:/etc/grid-security/certificates'
Very basic description of structure
The script that runs everything as far as submitting to Condor is
submitJobs.py
in the
/TreeMaker/Production/test/condorSub
directory. This script actually uses
submitJobsTM.py
to submit the jobs. You have to give it a dictionary file that tells it which scenario and what dataset(s) you want to process. Below is an example of one of these dictionary files,
dict_Summer16v3_gjets.py
flist = {
"scenario": "Summer16v3",
"samples": [
['Summer16v3.GJets_HT-100To200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_HT-100To200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_ext1'],
['Summer16v3.GJets_HT-200To400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_HT-200To400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_ext1'],
['Summer16v3.GJets_HT-400To600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_HT-400To600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_ext1'],
['Summer16v3.GJets_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_ext1'],
['Summer16v3.GJets_DR-0p4_HT-100To200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_DR-0p4_HT-200To400_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_DR-0p4_HT-400To600_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
['Summer16v3.GJets_DR-0p4_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8'],
]
}
This tells the script where to look to get the list of file paths for the root files you want it to process. The file paths are stored in yet another dictionary file located in
/TreeMaker/Production/python/<name_of_scenario>/<name_of_sample>_cff.py
. The line
Summer16v3.GJets_HT-100To200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8
is basically specifying that the list of file paths is found at
/TreeMaker/Production/python/Summer16v3/GJets_HT-100To200_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_cff.py
.
To run this over the Summer16v3_gjets samples I used
python submitJobs.py -d Summer16v3_gjets.py -o root://cmseos.fnal.gov//store/group/lpcsusyphotons/TreeMakerTest -p -s
Adding new samples
If you want to add samples that are not already included, you can do this in two steps:
Add file list to the desired era directory /TreeMaker/Production/python/<name_of_era>
Perhaps there is a better way but I did this manually in the following way. Create a new file
dict_<whatever_name_you_prefer>.py
and manually enter the information in the following format in the
/TreeMaker/Production/python
directory:
# format for dict entries:
# data: [True, ['sample'] , []]
# MC: [False, ['sample'] , []]
# MC w/ extended sample: [False, ['sample','sample_ext'] , []]
# MC w/ negative weights (amcatnlo): [False, ['sample'] , [neff]]
# MC w/ negative weights (amcatnlo) + extended sample: [False, ['sample','sample_ext'] , [neff, neff_ext]]
Example:
If we wanted to include QCD
DoubleEMEnriched samples we could look up the the dataset on das and create the file
dict_QCD_DoubleEMEnriched.py
which contains
flist = [
[1, ['/QCD_Pt-40toInf_DoubleEMEnriched_MGG-80toInf_TuneCUETP8M1_13TeV_Pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v2/MINIAODSIM'] , []],
[1, ['/QCD_Pt-30to40_DoubleEMEnriched_MGG-80toInf_TuneCUETP8M1_13TeV_Pythia8/RunIISummer16MiniAODv3-PUMoriond17_94X_mcRun2_asymptotic_v3-v2/MINIAODSIM'], []]
]
Then we would type the command
python get_py.py -d QCD_DoubleEMEnriched_dict.py -o Summer16v3 -p
Create new dictionary file for
submitJobs.py
to read.
You'll need to be in the
/TreeMaker/Production/test/condor/Sub
directory for this. The script that makes the new dictionary file is
makeDicts.py
. If we wanted to run over the QCD_Pt samples, which now will include the
DoubleEMEnriched samples, we would use
python makeDicts.py -c qcd_pt -e Summer16v3 -l Summer16v3/ -S Summer16v3
The
-S
specifies that this is a background MC. We would use
-s
if this were a signal MC.
Setting up for submitting TreeMaker jobs to Condor
--
MatthewLawrenceJoyce - 2019-07-25