forked from cms-analysis/flashggFinalFit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
big updates in plotting for new AC fits
- Loading branch information
1 parent
c1a9756
commit 33a2710
Showing
5 changed files
with
164 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
{ | ||
"all":"All Categories", | ||
"wall":"#splitline{All Categories}{S/(S+B) weighted}", | ||
"VBFTag_0":"not populated cat", | ||
"VBFTag_1":"ggH low purity", | ||
"VBFTag_2":"not populated cat", | ||
"VBFTag_3":"ggH high purity", | ||
"VBFTag_4":"not populated cat", | ||
"VBFTag_5":"qqH SM-like", | ||
"VBFTag_6":"qqH BSM-like high purity", | ||
"VBFTag_7":"qqH BSM-like med purity" | ||
"all":"All Categories", | ||
"wall":"#splitline{All Categories}{S/(S+B) weighted}", | ||
"RECO_VBFTOPO_ACGGH_Tag0":"ggH low purity", | ||
"RECO_VBFTOPO_ACGGH_Tag1":"ggH high purity", | ||
"RECO_VBFTOPO_ACVBFSM_Tag0":"qqH SM-like", | ||
"RECO_VBFTOPO_ACVBFBSM_Tag0":"qqH BSM-like high purity", | ||
"RECO_VBFTOPO_ACVBFBSM_Tag1":"qqH BSM-like med purity", | ||
"RECO_VBFTOPO_VHHAD_Tag0":"qqH VH Tag0", | ||
"RECO_VBFTOPO_VHHAD_Tag1":"qqH VH Tag1", | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,55 @@ | ||
# prefit (all mu=1) | ||
python makeSplusBModelPlot.py --inputWSFile ../Combine/Datacard_sm_mu_simple.root --cats VBFTag_1,VBFTag_3,VBFTag_5,VBFTag_6,VBFTag_7 --doZeroes --pdir plots/2022-08-31-fits --ext _test --translateCats cats.json --unblind | ||
STEP=0 | ||
usage(){ | ||
echo "Script to run fits and plots of fit output." | ||
echo "options:" | ||
|
||
echo "-h|--help) " | ||
echo "-s|--step) " | ||
echo "-d|--dryRun) " | ||
} | ||
# options may be followed by one colon to indicate they have a required argument | ||
if ! options=$(getopt -u -o s:hd -l help,step:,dryRun -- "$@") | ||
then | ||
# something went wrong, getopt will put out an error message for us | ||
exit 1 | ||
fi | ||
set -- $options | ||
while [ $# -gt 0 ] | ||
do | ||
case $1 in | ||
-h|--help) usage; exit 0;; | ||
-s|--step) STEP=$2; shift ;; | ||
-d|--dryRun) DR=$2; shift ;; | ||
(--) shift; break;; | ||
(-*) usage; echo "$0: error - unrecognized option $1" 1>&2; usage >> /dev/stderr; exit 1;; | ||
(*) break;; | ||
esac | ||
shift | ||
done | ||
|
||
# postfit | ||
python makeSplusBModelPlot.py --inputWSFile plots/2022-08-31-fits/sm_mu_simple/bestfit_syst_r_VBF.root --loadSnapshot MultiDimFit --cats VBFTag_1,VBFTag_3,VBFTag_5,VBFTag_6,VBFTag_7 --doZeroes --pdir plots/2022-08-31-fits --ext _test --translateCats cats.json --unblind | ||
bestfit="../Combine/runFitsxsec_xsec_savedWS/higgsCombine_bestfit_syst_obs_xsec_r_ggH.MultiDimFit.mH125.root" | ||
yields="../Datacard/yields_2023-03-02_xsec" | ||
|
||
# get category weights | ||
python getCatInfo.py --inputWSFile ../Combine/Datacard_sm_mu_simple.root --cats all --doBkgRenormalization --saveCatInfo --ext _allCats | ||
if [[ $STEP == "spb" ]]; then | ||
python makeSplusBModelPlot.py --inputWSFile $bestfit --loadSnapshot MultiDimFit --cats all --doZeroes --pdir . --ext _test --unblind | ||
elif [[ $STEP == "catweights" ]]; then | ||
python getCatInfo.py --inputWSFile $bestfit --cats all --doBkgRenormalization --saveCatInfo --ext _allCats | ||
elif [[ $STEP == "bands" ]]; then | ||
python makeToys.py --inputWSFile $bestfit --loadSnapshot MultiDimFit --nToys 500 --POIs r_ggH,r_VBF,r_top,r_VH --batch Rome --queue cmsan --ext _test_with_bands | ||
elif [[ $STEP == "spb2-calc" ]]; then | ||
# first time, with bands calculation | ||
python makeSplusBModelPlot.py --inputWSFile $bestfit --loadSnapshot MultiDimFit --cats all --doZeroes --pdir . --ext _test_with_bands --unblind --doBands --saveToyYields --doSumCategories --doCatWeights --saveWeights | ||
elif [[ $STEP == "spb2" ]]; then | ||
# next times, when toys are merged | ||
python makeSplusBModelPlot.py --inputWSFile $bestfit --loadSnapshot MultiDimFit --cats all --doZeroes --pdir . --ext _test_with_bands --unblind --doBands --loadToyYields SplusBModels_test_with_bands/toys/toyYields_CMS_hgg_mass.pkl --doSumCategories --doCatWeights --saveWeights | ||
elif [[ $STEP == "tables" ]]; then | ||
# make tables with yields | ||
groups=("ggh" "qqh" "vh" "top") | ||
for group in ${groups[*]} | ||
do | ||
python makeYieldsTables.py --inputPklDir $yields --loadCatInfo pkl/catInfo_allCats.pkl --group $group | ||
done | ||
else | ||
echo "Step $STEP is not one among yields,datacard,links. Exiting." | ||
fi | ||
|
||
# make bands with toys | ||
python makeToys.py --inputWSFile plots/2022-08-31-fits/sm_mu_simple/bestfit_syst_r_VBF.root --loadSnapshot MultiDimFit --nToys 500 --POIs r_ggH,r_VBF,r_top,r_VH --batch condor --queue workday --ext _test_with_bands | ||
python makeSplusBModelPlot.py --inputWSFile plots/2022-08-31-fits/sm_mu_simple/bestfit_syst_r_VBF.root --loadSnapshot MultiDimFit --cats all --doZeroes --pdir plots/2022-08-31-fits --ext _test_with_bands --translateCats cats.json --unblind --doBands --saveToyYields --doSumCategories --doCatWeights --saveWeights # first time, with bands calculation | ||
python makeSplusBModelPlot.py --inputWSFile plots/2022-08-31-fits/sm_mu_simple/bestfit_syst_r_VBF.root --loadSnapshot MultiDimFit --cats all --doZeroes --pdir plots/2022-08-31-fits --ext _test_with_bands --translateCats cats.json --unblind --doBands --loadToyYields SplusBModels_test_with_bands/toys/toyYields_CMS_hgg_mass.pkl --doSumCategories --doCatWeights --saveWeights | ||
|
||
# make tables with yields | ||
python makeYieldsTables.py --inputPklDir ../Datacard/yields_2022-09-01_xsec --loadCatInfo pkl/catInfo_allCats.pkl --group qqh_ac --translateCats cats.json |