-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProtocol_Unblind
More file actions
117 lines (65 loc) · 4.69 KB
/
Protocol_Unblind
File metadata and controls
117 lines (65 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Link to the CombineHarvester twiki:
[CombineHarvester twiki](http://cms-analysis.github.io/CombineHarvester/index.html)
# Checkout the CombineHarvester
export SCRAM_ARCH=slc6_amd64_gcc481 (bash) or setnev SCRAM_ARCH slc6_amd64_gcc481 (tcsh)
scram project CMSSW CMSSW_7_4_7
cd CMSSW_7_4_7/src
cmsenv
git clone https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit
//Check the recommended tag on link above, a tag >= v5.0.2 is sufficient
git clone https://github.com/cms-analysis/CombineHarvester.git CombineHarvester
git checkout SM2016-dev
scram b -j 8
#Get the shape
cd CombineHarvester/HTTSM2016
git clone https://:@gitlab.cern.ch:8443/cms-htt/SM-PAS-2016.git shapes (from lxplus)
git clone https://gitlab.cern.ch/cms-htt/SM-PAS-2016.git shapes (from elsewhere)
git pull --rebase
# creating datacards
MorphingSM2016 --output_folder="Blinded25112016" --postfix="-2D" --control_region=1 --manual_rebin=false --real_data=false --mm_fit=false --ttbar_fit=true
# Building the workspaces:
cd output/Blinded25112016
combineTool.py -M T2W -i {cmb}/* -o workspace.root --parallel 8
# Calculating limits:
combineTool.py -M Asymptotic -d */*/workspace.root --there -n .limit --parallel 8
# Collect the output:
combineTool.py -M CollectLimits */*/*.limit.* --use-dirs -o limits.json
# Plotting the limit:
plotLimits.py limits_{cmb,em,et,mt,tt}.json:exp0 --auto-style -o lim_compare
plotLimits.py limits_cmb.json --auto-style -o lim_expected_cmb
python ../../plotLimits_SM2.py limits_{cmb,em,et,mt,tt}.json:exp0 --auto-style --cms-sub Preliminary -o lim_compare
python ../../plotLimits_SM2.py limits_cmb.json --auto-style --cms-sub Preliminary --show exp -o lim_expected_cmb
python ../../plotLimits_SM2.py limits_tt.json --auto-style --cms-sub Preliminary --show exp -o lim_expected_tt
python ../../plotLimits_SM2.py limits_mt.json --auto-style --cms-sub Preliminary --show exp -o lim_expected_mt
python ../../plotLimits_SM2.py limits_et.json --auto-style --cms-sub Preliminary --show exp -o lim_expected_et
python ../../plotLimits_SM2.py limits_em.json --auto-style --cms-sub Preliminary --show exp -o lim_expected_em
# run MaxLikelihoodFit
combine -M MaxLikelihoodFit cmb/125/workspace.root -t -1 --robustFit=1 --minimizerAlgoForMinos=Minuit2,Migrad --rMin 0.5 --rMax 1.5 --expectSignal=1
# making the pulls
python ../../../../../HiggsAnalysis/CombinedLimit/test/diffNuisances.py mlfit.root -A -a --stol 0.99 --stol 0.99 --vtol 99. --vtol2 99. -f text mlfit.root > mlfit.txt
# postfit plots
PostFitShapes -o postfit_shapes.root -m 125 -f mlfit.root:fit_s --postfit --sampling --print -d cmb/125/combined.txt.cmb
# Computing the Impact
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 --doInitialFit --robustFit 1 --rMin 0.5 --rMax 1.5 --parallel 18
---------------------------
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 --robustFit 1 --doFits -t -1 --rMin 0.5 --rMax 1.5 --expectSignal=1 --parallel 8
*Note*: Instead of the above line one can run the jobs via lxbatch:
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 --robustFit 1 --minimizerAlgoForMinos Minuit2,Migrad --doFits -t -1 --rMin 0.5 --rMax 1.5 --expectSignal=1 --job-mode lxbatch --task-name lxbatch-test --sub-opts='-q 8nh' --merge 10 --dry-run (--dry-run option let you check how the jobs will look like before submiting to lxbatch)
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 --robustFit 1 --minimizerAlgoForMinos Minuit2,Migrad --doFits --rMin 0.5 --rMax 1.5 --job-mode lxbatch --task-name lxbatch-test --sub-opts='-q 8nh' --merge 3
---------------------------
# Impact for limited number of nuisance parameters
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 --robustFit 1 --doFits --minimizerAlgoForMinos Minuit2,Migrad --rMin 0.5 --rMax 1.5 --parallel 18 --named XXXXXX --X-rtd FITTER_NEW_CROSSING_ALGO --X-rtd FITTER_NEVER_GIVE_UP
---------------------------
combineTool.py -M Impacts -d cmb/125/workspace.root -m 125 -o impacts.json
plotImpacts.py -i impacts.json -o impacts
# Computing the expected significance:
combine -M ProfileLikelihood --significance cmb/125/workspace.root -t -1 --expectSignal=1
# Computing the expected significance per channel per category (including constraints from all channels)
cd scripts
sh channelCompatibilityCheck.sh
# Making the pvalue plot:
cp ../../../scripts/runPvalue.sh .
sh runPvalue.sh .
# Making the S/S+B weighted plot
cp ../../../scripts/runSBWeighted.sh .
sh runSBWeighted.sh