Skip to content

Commit 6d7361a

Browse files
author
Aliya Nigamova
committed
Add cmshistfunc to cmake tests, and channel masks test to cmssw and cmake
1 parent a58a232 commit 6d7361a

File tree

7 files changed

+164
-24
lines changed

7 files changed

+164
-24
lines changed

.github/workflows/cvmfs-ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,20 @@ jobs:
211211
script: |
212212
text2workspace.py data/ci/template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
213213
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
214-
combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1
215214
216215
- uses: ./.github/actions/run-in-cvmfs
217216
name: Template analysis CMSHistFunc shapeN
218217
with:
219218
script: |
220219
text2workspace.py data/ci/template-analysis_shapeNInterp.txt -o ws_template-analysis.root --mass 200
221220
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
222-
combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1
221+
222+
- uses: ./.github/actions/run-in-cvmfs
223+
name: CMSHistFunc with channel masks
224+
with:
225+
script: |
226+
text2workspace.py data/ci/htt_multiple_regions.tx -o ws_template-analysis_masks.root --mass 125 --channel-masks
227+
combine -M MultiDimFit ws_template-analysis_masks.root --algo singles --setParameterRanges r=-1,1 --setParameters mask_htt_tt_2_8TeV=1
223228
224229
225230
- uses: ./.github/actions/run-in-cvmfs
242 KB
Binary file not shown.

data/ci/htt_multiple_regions.txt

Lines changed: 95 additions & 0 deletions
Large diffs are not rendered by default.

test/CMakeLists.txt

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,36 @@ ADD_COMBINE_TEST(parametric_analysis
177177
"combine -M MultiDimFit datacard-3-parametric-analysis.root --algo singles --setParameterRanges r=-2,1"
178178
)
179179

180-
# TODO: make these tests work too
181180
#
182-
# # Template analysis CMSHistFunc
183-
# ADD_COMBINE_TEST(cmshistfunc
184-
# COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeInterp.txt
185-
# ${REPO}/data/ci/htt_input.root
186-
# T2W_COMMAND
187-
# text2workspace.py template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
188-
# COMBINE_COMMANDS
189-
# "combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1"
190-
# "combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1"
191-
# )
192-
#
193-
# # Template analysis CMSHistFunc shapeN
194-
# ADD_COMBINE_TEST(cmshistfunc_shapeN
195-
# COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeNInterp.txt
196-
# ${REPO}/data/ci/htt_input.root
197-
# T2W_COMMAND
198-
# text2workspace.py template-analysis_shapeNInterp.txt -o ws_template-analysis-shapeN.root --mass 200
199-
# COMBINE_COMMANDS
200-
# "combine -M MultiDimFit ws_template-analysis-shapeN.root --algo singles --setParameterRanges r=-1,1"
201-
# "combine -M FitDiagnostics ws_template-analysis-shapeN.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1"
202-
# )
181+
# Template analysis CMSHistFunc
182+
ADD_COMBINE_TEST(cmshistfunc
183+
COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeInterp.txt
184+
${REPO}/data/ci/htt_input.root
185+
T2W_COMMAND
186+
text2workspace.py template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
187+
COMBINE_COMMANDS
188+
"combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1"
189+
)
190+
191+
# Template analysis CMSHistFunc with channel masks
192+
ADD_COMBINE_TEST(cmshistfunc_channel_masks
193+
COPY_TO_BUILDDIR ${REPO}/data/ci/htt_multiple_regions.txt
194+
${REPO}/data/ci/htt_multiple_regions.input.root
195+
T2W_COMMAND
196+
text2workspace.py htt_multiple_regions.txt -o ws_template-analysis-channel_masks.root --mass 125 --channel-masks
197+
COMBINE_COMMANDS
198+
"combine -M MultiDimFit ws_template-analysis-channel_masks.root --algo singles --setParameterRanges r=-1,1 --setParameters mask_htt_tt_2_8TeV=1"
199+
)
200+
201+
# Template analysis CMSHistFunc shapeN
202+
ADD_COMBINE_TEST(cmshistfunc_shapeN
203+
COPY_TO_BUILDDIR ${REPO}/data/ci/template-analysis_shapeNInterp.txt
204+
${REPO}/data/ci/htt_input.root
205+
T2W_COMMAND
206+
text2workspace.py template-analysis_shapeNInterp.txt -o ws_template-analysis-shapeN.root --mass 200
207+
COMBINE_COMMANDS
208+
"combine -M MultiDimFit ws_template-analysis-shapeN.root --algo singles --setParameterRanges r=-1,1"
209+
)
203210

204211
# Template analysis CMSHistSum
205212
ADD_COMBINE_TEST(cmshistsum

test/references/cmshistfunc.out

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<<< Combine >>>
2+
<<< v10.3.3 >>>
3+
>>> Random number generator seed is 123456
4+
>>> Method used is MultiDimFit
5+
Set Range of Parameter r To : (-1,1)
6+
Doing initial fit:
7+
8+
--- MultiDimFit ---
9+
best fit parameter values and profile-likelihood uncertainties:
10+
r : +0.619 -0.601/+0.381 (68%)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<<< Combine >>>
2+
<<< v10.3.3 >>>
3+
>>> Random number generator seed is 123456
4+
>>> Method used is MultiDimFit
5+
Set Range of Parameter r To : (-1,1)
6+
Set Default Value of Parameter mask_htt_tt_2_8TeV To : 1
7+
>>> 1 out of 3 channels masked
8+
9+
Doing initial fit:
10+
11+
--- MultiDimFit ---
12+
best fit parameter values and profile-likelihood uncertainties:
13+
r : +0.944 -0.790/+0.056 (68%)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<<< Combine >>>
2+
<<< v10.3.3 >>>
3+
>>> Random number generator seed is 123456
4+
>>> Method used is MultiDimFit
5+
Set Range of Parameter r To : (-1,1)
6+
Doing initial fit:
7+
8+
--- MultiDimFit ---
9+
best fit parameter values and profile-likelihood uncertainties:
10+
r : +0.600 -0.603/+0.400 (68%)

0 commit comments

Comments
 (0)