Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions .github/workflows/cvmfs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
with:
script: |
text2workspace.py data/tutorials/multiDim/toy-hgg-125.txt -m 125 -P HiggsAnalysis.CombinedLimit.PhysicsModel:floatingXSHiggs --PO modes=ggH,qqH
combine -M MultiDimFit data/tutorials/multiDim/toy-hgg-125.root --setParameterRanges r=-1,1
combine -M MultiDimFit data/tutorials/multiDim/toy-hgg-125.root --setParameterRanges r=-5,5

- uses: ./.github/actions/run-in-cvmfs
name: Countind datacard Fixed Point from csv
Expand All @@ -210,16 +210,21 @@ jobs:
with:
script: |
text2workspace.py data/ci/template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5

- uses: ./.github/actions/run-in-cvmfs
name: Template analysis CMSHistFunc shapeN
with:
script: |
text2workspace.py data/ci/template-analysis_shapeNInterp.txt -o ws_template-analysis.root --mass 200
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5

- uses: ./.github/actions/run-in-cvmfs
name: CMSHistFunc with channel masks
with:
script: |
text2workspace.py data/ci/htt_multiple_regions.txt -o ws_template-analysis_masks.root --mass 125 --channel-masks
combine -M MultiDimFit ws_template-analysis_masks.root --algo singles --setParameterRanges r=-5,5 --setParameters mask_htt_tt_2_8TeV=1


- uses: ./.github/actions/run-in-cvmfs
Expand All @@ -228,15 +233,22 @@ jobs:
with:
script: |
text2workspace.py data/ci/template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200 --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5 --X-rtd FAST_VERTICAL_MORPH

- uses: ./.github/actions/run-in-cvmfs
name: Template analysis CMSHistSum with shapeN
if: ${{ env.CMSSW_VERSION != '' }}
with:
script: |
text2workspace.py data/ci/template-analysis_shapeNInterp.txt -o ws_template-analysis.root --mass 200 --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5 --X-rtd FAST_VERTICAL_MORPH

- uses: ./.github/actions/run-in-cvmfs
name: CMSHistSum with channel masks
with:
script: |
text2workspace.py data/ci/htt_multiple_regions.txt -o ws_template-analysis_masks.root --mass 125 --channel-masks --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis_masks.root --algo singles --setParameterRanges r=-5,5 --setParameters mask_htt_tt_2_8TeV=1 --X-rtd FAST_VERTICAL_MORPH

- uses: ./.github/actions/run-in-cvmfs
name: RooMultiPdf
Expand Down Expand Up @@ -266,14 +278,14 @@ jobs:
with:
script: |
text2workspace.py data/ci/templ_datacard_largeYields.txt -o ws_template-analysis.root
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5

- uses: ./.github/actions/run-in-cvmfs
name: Template analysis with large integrals using CMSHistSum
with:
script: |
text2workspace.py data/ci/templ_datacard_largeYields.txt -o ws_template-analysis.root --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5 --X-rtd FAST_VERTICAL_MORPH

- uses: ./.github/actions/run-in-cvmfs
name: InterferenceModel test in CMSSW
Expand Down
Binary file added data/ci/htt_multiple_regions.input.root
Binary file not shown.
95 changes: 95 additions & 0 deletions data/ci/htt_multiple_regions.txt

Large diffs are not rendered by default.

67 changes: 42 additions & 25 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ADD_COMBINE_TEST(counting_datacard
T2W_COMMAND
text2workspace.py toy-hgg-125.txt -o counting_datacard.root -m 125 -P HiggsAnalysis.CombinedLimit.PhysicsModel:floatingXSHiggs --PO modes=ggH,qqH
COMBINE_COMMANDS
"combine -M MultiDimFit counting_datacard.root --setParameterRanges r=-1,1"
"combine -M MultiDimFit counting_datacard.root --setParameterRanges r=-5,5"
)

# Counting datacard Fixed Point from csv - combineTool.py
Expand All @@ -177,29 +177,36 @@ ADD_COMBINE_TEST(parametric_analysis
"combine -M MultiDimFit datacard-3-parametric-analysis.root --algo singles --setParameterRanges r=-2,1"
)

# TODO: make these tests work too
#
# # Template analysis CMSHistFunc
# ADD_COMBINE_TEST(cmshistfunc
# COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeInterp.txt
# ${REPO}/data/ci/htt_input.root
# T2W_COMMAND
# text2workspace.py template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
# COMBINE_COMMANDS
# "combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1"
# "combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1"
# )
#
# # Template analysis CMSHistFunc shapeN
# ADD_COMBINE_TEST(cmshistfunc_shapeN
# COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeNInterp.txt
# ${REPO}/data/ci/htt_input.root
# T2W_COMMAND
# text2workspace.py template-analysis_shapeNInterp.txt -o ws_template-analysis-shapeN.root --mass 200
# COMBINE_COMMANDS
# "combine -M MultiDimFit ws_template-analysis-shapeN.root --algo singles --setParameterRanges r=-1,1"
# "combine -M FitDiagnostics ws_template-analysis-shapeN.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1"
# )
# Template analysis CMSHistFunc
ADD_COMBINE_TEST(cmshistfunc
COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeInterp.txt
${REPO}/data/ci/htt_input.root
T2W_COMMAND
text2workspace.py template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
COMBINE_COMMANDS
"combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-5,5"
)

# Template analysis CMSHistFunc with channel masks
ADD_COMBINE_TEST(cmshistfunc_channel_masks
COPY_TO_BUILDDIR ${REPO}/data/ci/htt_multiple_regions.txt
${REPO}/data/ci/htt_multiple_regions.input.root
T2W_COMMAND
text2workspace.py htt_multiple_regions.txt -o ws_template-analysis-channel_masks.root --mass 125 --channel-masks
COMBINE_COMMANDS
"combine -M MultiDimFit ws_template-analysis-channel_masks.root --algo singles --setParameterRanges r=-5,5 --setParameters mask_htt_tt_2_8TeV=1"
)

# Template analysis CMSHistFunc shapeN
ADD_COMBINE_TEST(cmshistfunc_shapeN
COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeNInterp.txt
${REPO}/data/ci/htt_input.root
T2W_COMMAND
text2workspace.py template-analysis_shapeNInterp.txt -o ws_template-analysis-shapeN.root --mass 200
COMBINE_COMMANDS
"combine -M MultiDimFit ws_template-analysis-shapeN.root --algo singles --setParameterRanges r=-5,5"
)

# Template analysis CMSHistSum
ADD_COMBINE_TEST(cmshistsum
Expand All @@ -208,7 +215,7 @@ ADD_COMBINE_TEST(cmshistsum
T2W_COMMAND
text2workspace.py template-analysis_shapeInterp.txt --mass 200 --for-fits --no-wrappers --use-histsum
COMBINE_COMMANDS
"combine -M MultiDimFit template-analysis_shapeInterp.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH"
"combine -M MultiDimFit template-analysis_shapeInterp.root --algo singles --setParameterRanges r=-5,5 --X-rtd FAST_VERTICAL_MORPH"
)

# Template analysis CMSHistSum with shapeN
Expand All @@ -218,7 +225,17 @@ ADD_COMBINE_TEST(cmshistsum_shapeN
T2W_COMMAND
text2workspace.py template-analysis_shapeNInterp.txt --mass 200 --for-fits --no-wrappers --use-histsum
COMBINE_COMMANDS
"combine -M MultiDimFit template-analysis_shapeNInterp.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH"
"combine -M MultiDimFit template-analysis_shapeNInterp.root --algo singles --setParameterRanges r=-5,5 --X-rtd FAST_VERTICAL_MORPH"
)

# Template analysis CMSHistFunc with channel masks
ADD_COMBINE_TEST(cmshistsum_channel_masks
COPY_TO_BUILDDIR ${REPO}/data/ci/htt_multiple_regions.txt
${REPO}/data/ci/htt_multiple_regions.input.root
T2W_COMMAND
text2workspace.py htt_multiple_regions.txt -o ws_template-analysis-channel_masks.root --mass 125 --channel-masks -for-fits --no-wrappers --use-histsum
COMBINE_COMMANDS
"combine -M MultiDimFit ws_template-analysis-channel_masks.root --algo singles --setParameterRanges r=-5,5 --setParameters mask_htt_tt_2_8TeV=1 --X-rtd FAST_VERTICAL_MORPH"
)

# Template-analysis datacard -> text2workspace
Expand Down
10 changes: 10 additions & 0 deletions test/references/cmshistfunc.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<<< Combine >>>
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-5,5)
Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.619 -0.601/+0.608 (68%)
13 changes: 13 additions & 0 deletions test/references/cmshistfunc_channel_masks.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<<< Combine >>>
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-5,5)
Set Default Value of Parameter mask_htt_tt_2_8TeV To : 1
>>> 1 out of 3 channels masked

Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.943 -0.790/+0.917 (68%)
10 changes: 10 additions & 0 deletions test/references/cmshistfunc_shapeN.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<<< Combine >>>
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-5,5)
Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.603 -0.606/+0.607 (68%)
4 changes: 2 additions & 2 deletions test/references/cmshistsum.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-1,1)
Set Range of Parameter r To : (-5,5)
Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.619 -0.601/+0.381 (68%)
r : +0.619 -0.601/+0.608 (68%)
13 changes: 13 additions & 0 deletions test/references/cmshistsum_channel_masks.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<<< Combine >>>
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-5,5)
Set Default Value of Parameter mask_htt_tt_2_8TeV To : 1
>>> 1 out of 3 channels masked

Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.943 -0.790/+0.917 (68%)
4 changes: 2 additions & 2 deletions test/references/cmshistsum_shapeN.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<<< v10.3.3 >>>
>>> Random number generator seed is 123456
>>> Method used is MultiDimFit
Set Range of Parameter r To : (-1,1)
Set Range of Parameter r To : (-5,5)
Doing initial fit:

--- MultiDimFit ---
best fit parameter values and profile-likelihood uncertainties:
r : +0.600 -0.603/+0.400 (68%)
r : +0.603 -0.606/+0.607 (68%)
Loading