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.

chmod +x
./ -c CMSSW_10_2_12 -a https -j 1
cd CMSSW_10_2_12/src/
voms-proxy-init --voms cms
export SSL_CERT_DIR='/etc/pki/tls/certs:/etc/grid-security/certificates'


The script that runs everything as far as submitting to Condor is in the /TreeMaker/Production/test/condorSub directory. 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,

flist = {
    "scenario": "Summer16v3",
    "samples": [

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> 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/

To run this over the Summer16v3_gjets samples I used

python -d -o root:// -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: [0,  ['sample'] , []]
#                                                  MC: [1, ['sample'] , []]
#                                      MC w/ wrong PU: [2, ['sample'] , []]
#                               MC w/ extended sample: [1, ['sample','sample_ext'] , []]
#                   MC w/ negative weights (amcatnlo): [1, ['sample'] , [neff]]
# MC w/ negative weights (amcatnlo) + extended sample: [1, ['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 which we must edit to read

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 -d -o Summer16v3 -p

This adds the file list for those samples to the Summer16v3 era.

Update dictionary for submission to Condor

Now that the file list for the samples we want have been added to the desired era directory we need to update the dictionary that will be read by We'll need to be in the /TreeMaker/Production/test/condorSub directory for this. The script that makes/overwrites the new dictionary file is If we wanted to run over the QCD_Pt samples, which now will include the DoubleEMEnriched samples, we would use

python -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. The -c qcd_pt option is specifying what "category" we want. In this case we are asking for filelists which contain the pattern "QCD_Pt" in the base name. Below is the current list of arguments and the pattern(s) associated with each.

 "diboson" : ('WGJets','WW','WZ','ZG','ZZ'),
    "dyjets"  : ('DYJetsToLL',),
    "gjets"   : ('GJets',),
    "qcd"     : ('QCD_HT',),
    "qcd_pt"  : ('QCD_Pt',),
    "signal"  : ('SMS','RPV','StealthSYY','StealthSHH'),
    "singlet" : ('ST_s-channel','ST_t-channel','ST_tW','tZq'),
    "ttbar"   : ('TTJets','TT_Tune','TTTo2L2Nu','TTToSemiLeptonic','TTToHadronic'),
    "tth"     : ('TTZTo','TTWJets','TTGJets','TTGamma','TTHH','TTTT','TTTW','TTWH','TTWW','TTWZ','TTZH','TTZZ','ttHJet'),
    "wjets"   : ('WJetsToLNu',),
    "zjets"   : ('ZJetsToNuNu',)

Now that we have an updated dictionary we can submit to Condor with the following command.

python -d -o root:// -p -s

The -o argument specifies where to write the .root files.

-- MatthewLawrenceJoyce - 2019-07-25

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2019-07-30 - MatthewLawrenceJoyce
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback