diff --git a/src/HHbbVV/combine/binder/FTest.ipynb b/src/HHbbVV/combine/binder/FTest.ipynb index a061d022..111a6222 100644 --- a/src/HHbbVV/combine/binder/FTest.ipynb +++ b/src/HHbbVV/combine/binder/FTest.ipynb @@ -29,7 +29,7 @@ "source": [ "MAIN_DIR = \"../../../../\"\n", "\n", - "plot_dir = f\"{MAIN_DIR}/plots/FTests/23Jul6WP06\"\n", + "plot_dir = f\"{MAIN_DIR}/plots/FTests/23Nov7\"\n", "_ = os.system(f\"mkdir -p {plot_dir}\")" ] }, @@ -72,7 +72,7 @@ "outputs": [], "source": [ "local_cards_dir = \"/uscms/home/rkansal/hhcombine/cards/f_tests/23May14/\"\n", - "test_orders = [0]\n", + "test_orders = [0, 1]\n", "test_statistics = {}\n", "\n", "for o1 in test_orders:\n", @@ -243,13 +243,13 @@ "metadata": {}, "outputs": [], "source": [ - "o1 = 0 # order being tested\n", + "o1 = 1 # order being tested\n", "tlabel = f\"{o1}\"\n", "\n", "data_ts, toy_ts = test_statistics[tlabel][\"data\"][tlabel], test_statistics[tlabel][\"toys\"][tlabel]\n", "plot_tests(data_ts, toy_ts, \"gof\" + tlabel, fit=\"chi2\", bins=20)\n", "\n", - "ord1 = 1\n", + "ord1 = o1 + 1\n", "tflabel = f\"{ord1}\"\n", "data_ts, toy_ts = pval = (\n", " test_statistics[tlabel][\"fdata\"][tflabel],\n", @@ -328,7 +328,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.15" + "version": "3.10.4" }, "orig_nbformat": 4 }, diff --git a/src/HHbbVV/combine/run_blinded.sh b/src/HHbbVV/combine/run_blinded.sh index 670b25d1..38960893 100755 --- a/src/HHbbVV/combine/run_blinded.sh +++ b/src/HHbbVV/combine/run_blinded.sh @@ -132,7 +132,6 @@ cards_dir="./" ws=${cards_dir}/combined wsm=${ws}_withmasks wsm_snapshot=higgsCombineSnapshot.MultiDimFit.mH125 -CMS_PARAMS_LABEL="CMS_bbWW_hadronic" outsdir=${cards_dir}/outs mkdir -p $outsdir @@ -142,6 +141,8 @@ if [ $resonant = 0 ]; then echo -e "\nWARNING: This is doing nonresonant fits - did you mean to pass -r|--resonant?\n" fi + CMS_PARAMS_LABEL="CMS_bbWW_hadronic" + # nonresonant args ccargs="fail=${cards_dir}/fail.txt failBlinded=${cards_dir}/failBlinded.txt pass=${cards_dir}/pass.txt passBlinded=${cards_dir}/passBlinded.txt" maskunblindedargs="mask_pass=1,mask_fail=1,mask_passBlinded=0,mask_failBlinded=0" @@ -158,7 +159,7 @@ if [ $resonant = 0 ]; then # remove last comma setparamsblinded=${setparamsblinded%,} - freezeparamsblinded="${freezeparamsblinded},var{.*lp_sf.*},CMS_XHYbbWW_boosted_PNetHbbScaleFactors_correlated" + freezeparamsblinded=${setparamsblinded%,} # floating parameters using var{} floats a bunch of parameters which shouldn't be floated, @@ -170,6 +171,7 @@ if [ $resonant = 0 ]; then excludeimpactparams='rgx{.*tf_dataResidual_Bin.*}' else # resonant args + CMS_PARAMS_LABEL="CMS_XHYbbWW_boosted" ccargs="" maskunblindedargs="" maskblindedargs="" diff --git a/src/HHbbVV/combine/run_ftest_nonres.sh b/src/HHbbVV/combine/run_ftest_nonres.sh index 16498857..6a3886b2 100755 --- a/src/HHbbVV/combine/run_ftest_nonres.sh +++ b/src/HHbbVV/combine/run_ftest_nonres.sh @@ -10,9 +10,11 @@ # Author: Raghav Kansal #################################################################################################### + goftoys=0 ffits=0 dfit=0 +limits=0 seed=42 numtoys=100 order=0 @@ -42,7 +44,7 @@ while true; do shift templates_tag=$1 ;; - --o,order) + -o|--order) shift order=$1 ;; @@ -69,8 +71,8 @@ while true; do shift done -echo "Arguments: cardstag=$cards_tag templatestag=$templates_tag sigsample=$sig_sample dfit=$dfit \ -goftoys=$goftoys ffits=$ffits seed=$seed numtoys=$numtoys" +echo "Arguments: cardstag=$cards_tag templatestag=$templates_tag dfit=$dfit \ +goftoys=$goftoys ffits=$ffits order=$order seed=$seed numtoys=$numtoys" #################################################################################################### @@ -113,15 +115,15 @@ freezeparamsblinded=${freezeparamsblinded%,} # Making cards and workspaces for each order polynomial #################################################################################################### -for ord1 in {0..3} +for ord in {0..3} do - model_name="nTF_${ord1}" + model_name="nTF_${ord}" # create datacards if they don't already exist if [ ! -f "${cards_dir}/${model_name}/pass.txt" ]; then echo "Making Datacard for $model_name" python3 -u postprocessing/CreateDatacard.py --templates-dir ${templates_dir} \ - --model-name ${model_name} --nTF ${ord2} ${ord1} --cards-dir ${cards_dir} + --model-name ${model_name} --nTF ${ord} --cards-dir ${cards_dir} fi cd ${cards_dir}/${model_name}/ @@ -146,7 +148,7 @@ done #################################################################################################### -# Generate toys for (0, 0) order +# Generate toys for lower order #################################################################################################### model_name="nTF_$order" @@ -172,13 +174,13 @@ fi #################################################################################################### -# GoFs on generated toys for next order polynomials +# GoFs on generated toys for low and next high order polynomials #################################################################################################### if [ $ffits = 1 ]; then - for ord1 in 0 1 + for ord in $order $((order+1)) do - model_name="nTF_${ord1}" + model_name="nTF_${ord}" echo "Fits for $model_name" cd ${cards_dir}/${model_name}/