2024-06-27 - lxplus7 CC7 termination https://cern.ch/otg0147045, since we need CMSSW_10_6_X for the Run2 analysis, we need to use singularity to use the CMSSW_10_6_X
-
login to lxplus8 or lxplus9, execute "cmssw-el7" to launch the singularity. This must be done before set up the CMSSW, otherwise there will be imcompatibility between arch and cmssw
-
cmsrel CMSSW_10_6_30
-
Set up NanoAOD tools
cd CMSSW_10_6_30/src git clone https://github.com/cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools cd PhysicsTools/NanoAODTools cmsenv scram b
-
Set up codes
cd python/postprocessing ##clone this repository git clone https://github.com/menglu21/resonance_HH.git analysis cd $CMSSW_BASE/src scram b
Noticed that the
crab_help.py
is written in python3, hence thescram b
in CMSSW would leave some error message. Since this crab helper normally would not be included by other codes, you can ignore these errors. -
Substitute some outdated files with
init.sh
cd $CMSSW_BASE/src/PhysicsTools/NanoAODTools/python/postprocessing/analysis source init.sh 2017
cd analysis/crab
using the configure files under 'configs', namely,
crab submit -c configs/DoubleEGB_cfg.py
rm crab_DoubleEG_B/inputs/*.tgz
You can also check crab/auto_crab_example
to run crab jobs batchly and automatically.
the modules (most of them are corrections) used can be seen from analysis/crab/crab_script.py,
N.B. the egamma correction is already applied default in NanoAOD
countHistogramsModule(): store the opsitive and negative events number for weight apply
puWeight_2017(): pileup reweight
PrefCorr(): L1-prefiring correction
muonIDISOSF2017(): muon ID/ISO SF
muonScaleRes2017(): muon momentum correction, i.e., the Rochester correction
eleRECOSF2017(): electron RECO SF
eleIDSF2017(): electron IS SF
jmeCorrections_UL2017MC(): JetMET correction
btagSF2017UL(): b tag SF
muonScaleRes2017(): muon momentum correction, i.e., the Rochester correction
jmeCorrections_UL2017*(): JetMET correction
(this correction is applied using the official module, so we need to update the rootfiles for pileup and do some modification on the official module. The files under others/for_pileup/ can be used directly)
according to https://twiki.cern.ch/twiki/bin/view/CMS/PileupJSONFileforData#Centrally_produced_ROOT_histogra, use histograms under /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions17/13TeV/PileUp/UltraLegacy/, combine three histograms to a single one with name “pileup, pileup_plus, pileup_minus”
https://twiki.cern.ch/twiki/bin/view/CMS/PileupScenariosRun2
move "mcPileupUL2017.root" and "PileupHistogram-goldenJSON-13tev-UL2017-99bins_withVar.root" to python/postprocessing/data/pileup/, and move "puWeightProducer.py" to python/postprocessing/modules/common/
(needed files are in others/for_prefiring, can be used directly)
details are here: Pre-firing: https://twiki.cern.ch/twiki/bin/viewauth/CMS/L1ECALPrefiringWeightRecipe#Accessing_the_UL2017_maps, in order to use the current NanoAOD module, extract separate rootfiles from https://github.com/cms-data/PhysicsTools-PatUtils/raw/master/L1PrefiringMaps.root
move "others/for_prefiring/*.root" to NanoAODTools/data/prefire_maps/, and move "others/for_prefiring/PrefireCorr.py" to postprocessing/modules/common/
(needed files are in others/for_jme, can be used directly) move the *.tgz to PhysicsTools/NanoAODTools/data/jme, and move "jetmetHelperRun2.py" to PhysicsTools/NanoAODTools/python/postprocessing/modules/jme
(needed files are in others/for_btv, can be used directly) move "btagSFProducer.py" to src/PhysicsTools/NanoAODTools/python/postprocessing/modules/btv, move the *.csv to PhysicsTools/NanoAODTools/data/btagSF