- Move to UL MiniAOD v2. Add tau, puppiMET, etc. See more details here
- Processed samples are listed in below text files. But please also check the HN google sheet for more updated list
export SCRAM_ARCH=slc7_amd64_gcc700
source /cvmfs/cms.cern.ch/cmsset_default.sh
# Make CMSSW directory
scram p -n Run2UltraLegacy_v3__CMSSW_10_6_29 CMSSW CMSSW_10_6_29
cd Run2UltraLegacy_v3__CMSSW_10_6_29/src
cmsenv
git cms-init
######################
#### EGamma smearing
#### https://twiki.cern.ch/twiki/bin/view/CMS/EgammaUL2016To2018
######################
git cms-addpkg RecoEgamma/EgammaTools ### essentially just checkout the package from CMSSW
git clone https://github.com/cms-egamma/EgammaPostRecoTools.git
mv EgammaPostRecoTools/python/EgammaPostRecoTools.py RecoEgamma/EgammaTools/python/.
git clone -b ULSSfiles_correctScaleSysMC https://github.com/jainshilpi/EgammaAnalysis-ElectronTools.git EgammaAnalysis/ElectronTools/data/
git cms-addpkg EgammaAnalysis/ElectronTools
scram b -j 4
######################
#### Now SKFlatMaker
######################
# Copy this code
git clone [email protected]:CMSSNU/SKFlatMaker.git
cd SKFlatMaker
git checkout -b Run2UltraLegacy_v3 Run2UltraLegacy_v3 #### use the tag
# Compile
cd $CMSSW_BASE/src
scram b -j 4
# Setup
cd $CMSSW_BASE/src/SKFlatMaker
source setup.sh
cd $CMSSW_BASE/src/SKFlatMaker/SKFlatMaker/test/
cmsRun RunSKFlatMaker.py era=2016preVFP sampletype=DATA maxEvents=1000 ## Run 2016a DATA
cmsRun RunSKFlatMaker.py era=2016preVFP sampletype=MC maxEvents=1000 ## Run 2016a MC
cmsRun RunSKFlatMaker.py era=2016postVFP sampletype=DATA maxEvents=1000 ## Run 2016b DATA
cmsRun RunSKFlatMaker.py era=2016postVFP sampletype=MC maxEvents=1000 ## Run 2016b MC
cmsRun RunSKFlatMaker.py era=2017 sampletype=DATA maxEvents=1000 ## Run 2017 DATA
cmsRun RunSKFlatMaker.py era=2017 sampletype=MC maxEvents=1000 ## Run 2017 MC
cmsRun RunSKFlatMaker.py era=2018 sampletype=DATA maxEvents=1000 ## Run 2018 DATA
cmsRun RunSKFlatMaker.py era=2018 sampletype=MC maxEvents=1000 ## Run 2018 MC
Some useful options
- weightmap: weightmap file path or string: ex) Scale[1,9],PDF[1001,1100],AlphaS[1101,1102],AlphaSScale[1.5,1.5]
weightmap files are stored at$SKFlatWD/SKFlatMaker/script/Weight/data
- debug: Set print level defalt=0
python RunSKFlatMaker.py help
for other options
<<<<<<< HEAD
- Make a sample list to be processed at SKFlatMaker/script/CRAB3 directory. The filename should include the era. See SKFlatMaker/script/CRAB3/2018_DATA.txt for example.
- (optional) The number of events in the second column are not necessary but checkDAS.py script will can help to get the numbers. If a sample is VALID state, it will print the number of events. If a sample is PRODUCTION state, it will print the progress. It will overwrite the sample list file with
-w
option.
python checkDAS.py 2018_MYSAMPLELIST.txt
python checkDAS.py 2018_MYSAMPLELIST.txt -w
- (optional) If you want to save events weight for the scale variation (LHE level), PDF reweight (LHE level), parton shower weight (Pythia level) etc, You should provide the weight IDs you want to store (weight map file). First, get logs containing weight description using
getLog.py
script and then make weight map files usingparseLog.py
script. See examples in the relevant directories and files.
cd $CMSSW_BASE/src/SKFlatMaker/SKFlatMaker/script/Weight
python getLog.py ../CRAB3/2018_MYSAMPLELIST.txt
python parseLog.py logs/
- Make crab configuration files using
MakeCrab.py
script. There will be warnings if you don't provide a weight map file or it miss some basic weights such as Scale, PDF, AlphaS weight. In that case these weights will not be stored.
cd $CMSSW_BASE/src/SKFlatMaker/SKFlatMaker/script/CRAB3
python MakeCrab.py 2018_MYSAMPLELIST.txt
- Now submit crab jobs
cd $SKFlatTag/2018/crab_submission_MC/
##submit specific sample
crab submit -c SubmitCrab__MYSAMPLE.py
##submit all
ls SubmitCrab*.py|xargs -i crab submit -c {}
- Define the variable in SKFlatMaker/interface/SKFlatMaker.h
- Initialize or clear the variable at SKFlatMaker::analyze function in SKFlatMaker/src/SKFlatMaker.cc
//SKFlatMaker::analyze
myvar = -1; // for primitive type
myvector.clear(); // for vector type
- Add branch to the tree
//SKFlatMaker::beginJob
DYTree->Branch("myvar",&myvar,"myvar/F"); // for primitive type
DYTree->Branch("myvector", "vector<float>", &myvector); // for vector type
- Fill the value at proper SKFlatMaker::fill?? function
//SKFlatMaker::fillSOMETHING
myvar=VALUE; // for primitive type
myvector.push_back(VALUE); // for vector type
- Insert the variable on proper varlist file at SKFlatMaker/script/VarList/. The first column is type, the second is variable name and the last is 0 for primitive type and 1 for vector type.
- Check using check_varlist.py script
$CMSSW_BASE/src/SKFlatMaker/SKFlatMaker/script/VarList
python check_varlist.py