From your CMSSW_X_Y_Z/src/ directory (after doing "cmsenv" & checking out any C++ code you need first):
- git clone git@github.com:cms-L1TK/MCsamples.git
For common datasets used by the L1TrkAlgo group, these may already exist in MCsamples/RelVal_/python/_cfi.py, where the directory name gives the CMSSW version (and sometimes geometry too).
If your desired dataset is missing:
- cd MCsamples/Scripts/python/
- cp getMC_11_3_0_D76.py myNewScript.py
- Edit myNewScript.py, to specify the dataset names you want & name of output directory to be created for your new _cfi.py files.
- python3 myNewScript.py
Add one of the following three options in your *_cfg.py file:
a) Read MC dataset from a specified card file:
from MCsamples.RelVal_1130_D76.PU200_TTbar_14TeV_cfi import * inputMC = getCMSdataFromCards()
b) Read all .root files from a directory on your local computer:
from MCsamples.Scripts.getCMSlocaldata_cfi import * dirName = "${HOME}/myDirectory/" inputMC=getCMSlocaldata(dirName)
c) Read MC dataset using CMS DB instead of card file.
N.B. Only use this method occassionally, as it overworks the DB.
from MCsamples.Scripts.getCMSdata_cfi import * dataName="/RelValTTbar_14TeV/CMSSW_11_2_0_pre5-PU25ns_110X_mcRun4_realistic_v3_2026D49PU200-v1/GEN-SIM-DIGI-RAW" inputMC=getCMSdata(dataName)