I.) Latest Analysis recpe
setenv SCRAM_ARCH slc6_amd64_gcc491
cmsrel CMSSW_7_3_1_patch2
cd CMSSW_7_3_1_patch2/src
cmsenv
git cms-merge-topic rappoccio:RecoJetsFromMiniAOD
git clone https://github.com/cmsb2g/B2GAnaFW Analysis/B2GAnaFW
git clone https://github.com/jkarancs/B2GTTrees Analysis/B2GTTrees
git clone https://github.com/jkarancs/SusyAnalysis
scram b -j 20
- Also check recipe for the
B2GAnaFW
.
II.) Usage
II/1) General Info:
Steps
- Step 0: Make MINIAODSIM, this will usually be done centrally
- Step 1: Make
B2G Edm Ntuples using the
B2GAnaFW . also most likely produced centrally, but scripts are there to mass produce this quickly
- Step 2: Add our variables, filter events and produce TTree ntuple using the
B2GTTrees package (developed together with Marc and Brandon)
- Step 3: Analysis step: Use
B2GPlotter to create plots from the TTree ntuples
Ntuple location on UI3 and T2_HU_budapest
ui3:
/data/gridout/jkarancs/SusyAnalysis/B2G/EdmNtuple/
/data/gridout/jkarancs/SusyAnalysis/B2G/TTreeNtuple/
T2_HU_Budapest:
/store/user/jkarancs/SusyAnalysis/B2GEdmNtuple
/store/user/jkarancs/SusyAnalysis/B2GTTreeNtuple
- Useful utility to browse storage element files:
alias se 'source $CMSSW_BASE/src/Analysis/B2GTTrees/test/crab3/se_util.csh \!*'
alias par_source 'source $CMSSW_BASE/src/Analysis/B2GTTrees/test/crab3/source_parallel.csh \!*'
se ls T2_HU_Budapest:/store/user/jkarancs/SusyAnalysis/B2GTTreeNtuple
mkdir ttree_TT
se dl --par 5 --run T2_HU_Budapest:/store/user/jkarancs/SusyAnalysis/B2GTTreeNtuple/TT_Tune4C_13TeV-pythia8-tauola/crab_TT/150218_161157/0000 ttree_TT
II/2) Local testing of the framework
cmsDriver.py miniAOD-prod -s PAT --eventcontent MINIAODSIM --runUnscheduled --mc --filein file:/data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/AODSIM/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2.AODSIM00.root --conditions PHYS14_25_V1 -n -1
1/test) MiniAOD -> Common B2G edm ntuple
cmsRun Analysis/B2GAnaFW/test/b2gedmntuples_cfg.py maxEvts=-1 sample="file:miniAOD-prod_PAT.root" LHE=False
2/a) B2G edm ntuple -> TTree ntuple
cmsRun Analysis/B2GTTrees/test/B2GEdmtToTTreeNtuple_cfg.py
2/b) Common B2G edm ntuple -> Add ExtraVars -> TTree ntuple
cmsRun Analysis/B2GTTrees/test/B2GEdmToTTreeNtupleExtra_cfg.py
Example for our susy signal
cmsRun Analysis/B2GAnaFW/test/b2gedmntuples_cfg.py maxEvts=-1 sample="file:/data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2.MINIAODSIM00.root" outputLabel="B2GEDMNtuple_susy.root"
cmsRun Analysis/B2GTTrees/test/B2GEdmToTTreeNtupleExtra_cfg.py sample="file:B2GEDMNtuple_susy.root" outputLabel="B2GTTreeNtupleExtra_susy.root"
- Download dtaaset, and test local production step (useful for signal samples not on grid)
# download MiniAOD signal samples from susy group directory
set storedir="/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2"
mkdir -p /data$storedir; se dl cern:$storedir /data$storedir --par 4 --run
set storedir="/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mCh285_mChi280_23bodydec_v2"
mkdir -p /data$storedir; se dl cern:$storedir /data$storedir --par 4 --run
# MiniAOD -> Common B2G edm ntuple
source Analysis/B2GTTrees/test/make_EdmNtuples.csh Feb13 susy3body /data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mCh285_mChi280_23bodydec_v2/ 10
source Analysis/B2GTTrees/test/make_EdmNtuples.csh Feb13 susy4body /data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2/ 10
II/3) Mass production of Ntuples - via CRAB3 tool
1/crab3) Make Edm ntuples on grid
cd $CMSSW_BASE/src/Analysis/B2GTTrees/test/crab3
source crab3_B2GEdmNtuples.csh create Feb13 MINIAODSIM_input.txt T2_HU_Budapest /store/user/jkarancs/SusyAnalysis/B2GEdmNtuple
source crab3_B2GEdmNtuples.csh submit Feb13
source crab3_B2GEdmNtuples.csh status Feb13
source crab3_B2GEdmNtuples.csh report Feb13
source crab3_B2GEdmNtuples.csh get_datasets Feb13
source crab3_B2GEdmNtuples.csh make_twiki Feb13
- Optional steps (download edm ntuple and make TTrees locally - parallel background jobs)
source crab3_B2GEdmNtuples.csh download Feb13 /data/gridout/jkarancs/SusyAnalysis/B2G/EdmNtuple
source crab3_B2GEdmNtuples.csh make_ttrees Feb13 /data/gridout/jkarancs/SusyAnalysis/B2G/TTreeNtuple 5
2/crab3) Make TTree ntuples from previous Edm ntuples on grid
cd $CMSSW_BASE/src/Analysis/B2GTTrees/test/crab3
source crab3_B2GTTreeNtuples.csh create Feb18_edm_Feb13 EdmNtuple_Feb13_input.txt T2_HU_Budapest /store/user/jkarancs/SusyAnalysis/B2GTTreeNtuple
source crab3_B2GTTreeNtuples.csh submit Feb18_edm_Feb13
source crab3_B2GTTreeNtuples.csh status Feb18_edm_Feb13
source crab3_B2GTTreeNtuples.csh report Feb18_edm_Feb13
source crab3_B2GTTreeNtuples.csh download Feb18_edm_Feb13 /data/gridout/jkarancs/SusyAnalysis/B2G/TTreeNtuple
source crab3_B2GTTreeNtuples.csh make_twiki Feb18_edm_Feb13
1-2/local) MiniAOD -> Common B2G edm ntuple -> TTree ntuple
cd $CMSSW_BASE/src/Analysis/B2GTTrees/test/crab3
source ../make_EdmNtuples.csh Feb13 susy3body /data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mCh285_mChi280_23bodydec_v2 10
source ../make_EdmNtuples.csh Feb13 susy4body /data/store/cmst3/group/susy/gpetrucc/13TeV/Phys14DR/MINIAODSIM/T5ttttDeg_mGo1300_mStop300_mChi280_4bodydec_v2 10
source crab3_B2GTTreeNtuples.csh make_ttrees Feb18_edm_Feb13 /data/gridout/jkarancs/SusyAnalysis/B2G/EdmNtuple/Feb13 /data/gridout/jkarancs/SusyAnalysis/B2G/TTreeNtuple/Feb18_edm_Feb13 5
II/4) Analysis / Plotting
TTree ntuple -> Plots
cd SusyAnalysis/Analyzer/test/
make clean
make
./B2GPlotter -o test.root ../../../B2GTTreeNtupleExtra.root
- or use (rebuild, make plots, open TBrowser for output file)
cd SusyAnalysis/Analyzer/test/
source plot.csh -o test.root ../../../B2GTTreeNtupleExtra.root