Repository: https://github.com/CERN-CMS-DAS-2023/short-ex-MET TWiki with the instructions: https://twiki.cern.ch/twiki/bin/viewauth/CMS/SWGuideCMSDataAnalysisSchoolCERN2023MetAndPuExercise 0. ## setup CMMSW cd /publicfs/cms/user/taojq/ setenv SCRAM_ARCH slc7_amd64_gcc700 (bash: export SCRAM_ARCH=slc7_amd64_gcc700) source /cvmfs/cms.cern.ch/cmsset_default.csh (bash: source /cvmfs/cms.cern.ch/cmsset_default.sh) cmsrel CMSSW_10_6_18 cd CMSSW_10_6_18/src cmsenv ## setup GRID, ignore this if no GridCA voms-proxy-init -voms cms 1. Checkout the Repository in your CMSSW dir ## get the exercise code git clone https://github.com/CERN-CMS-DAS-2023/short-ex-MET.git ./ #Or just copy, if no github account cp -r /publicfs/cms/user/taojq/CMSSW_10_6_18/src/CMSDAS_MET . ## compile scram b -j4 2. Location of some input files: /publicfs/cms/data/Hgg/taojq/MET/ 1) 00827E5C-253F-F942-9751-3F3277340A21.root and 2C5565D7-ADE5-2C40-A0E5-BDFCCF40640E.root for exercise 1 and 2 2) cmsdas_met_exercise2_Summer20UL17.root, output from Hand-on 2 "cmsRun CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise2_cfg.py" and can be used in CMSDAS_MET/scripts/cmsdasmetplotsexercise2.C 3) cmsdas_met_exercise3_Summer20UL17.root for CMSDAS_MET/scripts/cmsdasmetplotsexercise3.C and CMSDAS_MET/scripts/cmsdasmetplotsexercise4.C 4) cmsdas_met_METFilters1.root and cmsdas_met_METFilters2.root, for "Hands-on 5: sources of fake MET and MET Filters" 3. Exercises 1) Hands-on 1: event content in MiniAOD data tier edmDumpEventContent root://cms-xrd-global.cern.ch///store/mc/RunIISummer20UL17MiniAODv2/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/106X_mc2017_realistic_v9-v2/100000/00827E5C-253F-F942-9751-3F3277340A21.root | grep slimmedMET #if no GridCA and CMS VO edmDumpEventContent /publicfs/cms/data/Hgg/taojq/MET/00827E5C-253F-F942-9751-3F3277340A21.root | grep slimmedMET 2) Hands-on 2: access to MET objects in MiniAOD cd $CMSSW_BASE/src/CMSDAS_MET cmsRun CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise2_cfg.py #or with local files as inputs, if no GridCA and CMS VO cmsRun CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise2_localfiles_cfg.py #run over the entire events in the file : change from 10 to -1 in the file "*Exercise2*_cfg.py" # process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) #Run it again --> Skip this step ++> output file: outputs/cmsdas_met_exercise2_Summer20UL17.root cd scripts root -l 'cmsdasmetplotsexercise2.C("step2a")' root -l 'cmsdasmetplotsexercise2.C("step2b")' 3) Hands-on 3: MET calibration and performance #input file: /publicfs/cms/data/Hgg/taojq/MET/cmsdas_met_exercise3_Summer20UL17.root cd $CMSSW_BASE/src/CMSDAS_MET/scripts #measure the scale of the "uncorrected" (i.e. raw) PF MET as a function of pT(Z) root -l 'cmsdasmetplotsexercise3.C("step3_scale_pfraw")' #now measure the MET scale using MET-Type1 root -l 'cmsdasmetplotsexercise3.C("step3_scale_pftype1")' #measure the MET resolution as a function of pT(Z) and the number of vertices root -l 'cmsdasmetplotsexercise3.C("step3_resolution_pftype1")' 4) Hands-on 4: pileup cd $CMSSW_BASE/src/CMSDAS_MET/scripts root -l 'cmsdasmetplotsexercise4.C' 5) Hands-on 5: sources of fake MET and MET Filters cd $CMSSW_BASE/src/CMSDAS_MET cmsenv cmsRun CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise5_cfg.py #or with local files as inputs, if no GridCA and CMS VO cmsRun CMSDAS_MET_Analysis/test/run_CMSDAS_MET_Exercise5_localfiles_cfg.py ## The analyzer used to produce these results is CMSDAS_MET_Analysis/plugins/CMSDAS_MET_AnalysisExercise5.cc