Skip to content

Commit 3f2012e

Browse files
merging 2.3.1
2 parents c18bd0c + 04d517b commit 3f2012e

32 files changed

+1676
-106
lines changed

ReleaseNotes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
Release v2.3.1, Mon 17 Jul 2023
2+
=======================================================
3+
4+
* fixed bug for reading QNUMBERS from SLHA files
5+
* small fixes in how pythia6 and pythia8 are built
6+
* small fix in truncated Gaussian llhd experimental feature
7+
* small fix in computation of combined upper limits
8+
* combinationmatrices are now forced to be symmetric
9+
* added isCombinableWith method also for CombinedDataSets
10+
* added a recipe for how to use a combinations matrix
11+
* runtime.nCPUs() now returns number of available CPUs, not all CPUs
12+
* xseccomputer now has --tempdir option
13+
* StatsComputer now has CLs method
14+
* changed default prompt width from 1e-8 to 1e-11 GeV in code
15+
16+
117
Release v2.3.0, Tue 23 May 2023
218
=======================================================
319

docs/manual/source/ConfrontPredictions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ simply the product of the individual analysis likelihoods,
264264
The individual likelihoods can correspond to the best signal region, if the combination of signal regions is turned off, or to the combined signal region likelihood otherwise.
265265
For the determination of the maximum likelihood, `scipy.optimize.minimize <https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html>`_ is used
266266
with the method `BFGS
267-
<https://docs.scipy.org/doc/scipy/reference/optimize.minimize-bfgs.html#optimize-minimize-bfgs>`_ in order to compute :math:`\mu_{max}` and :math:`\mathcal{L}_{max} = \mathcal{L}_{C}(\mu_{max})`.
267+
<https://docs.scipy.org/doc/scipy/reference/optimize.minimize-bfgs.html#optimize-minimize-bfgs>`_ in order to compute :math:`\hat{\mu}` and :math:`\mathcal{L}_{max} = \mathcal{L}_{C}(\hat{\mu})`.
268268

269269
The resulting likelihood and :math:`r`-values for the combination are displayed in the :ref:`output <outputDescription>` along with the individual results for each analysis.
270270

docs/manual/source/Examples.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Examples displaying several functionalities:
5050

5151
* `How to plot likelihoods from analysis combinations <plotCombinedLikelihood.html>`_ (download the Python code :download:`here <recipes/plotCombinedLikelihood.py>`, IPython notebook :download:`here <recipes/plotCombinedLikelihood.ipynb>`)
5252

53+
* `How to use a combinations matrix <combinationsmatrix.html>`_ (download the Python code :download:`here <recipes/combinationsmatrix.py>`, IPython notebook :download:`here <recipes/combinationsmatrix.ipynb>`)
5354

5455
Examples using the cross-section computer:
5556
------------------------------------------

docs/manual/source/ReleaseUpdate.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ What's New
3737
==========
3838
The major novelties of all releases since v1.0 are as follows:
3939

40+
New in Version 2.3.1:
41+
^^^^^^^^^^^^^^^^^^^^^
42+
43+
* fixed bug for reading :ref:`QNUMBERS blocks <qnumberSLHA>` from SLHA files
44+
* small fixes in how pythia6 and pythia8 are built
45+
* small fix in truncated Gaussian llhd experimental feature
46+
* small fix in computation of combined upper limits
47+
* combinationmatrices are now forced to be symmetric
48+
* added isCombinableWith method also for CombinedDataSets
49+
* added a recipe for how to use a `combinations matrix <combinationsmatrix.html>`_
50+
* `runtime.nCPUs() <tools.html#tools.runtime.nCPUs>`_ now returns number of available CPUs, not all CPUs
51+
* :ref:`xsecComputer <xsecCalc>` now has --tempdir option
52+
* StatsComputer now has `CLs <tools.html#tools.statsTools.StatsComputer.CLs>`_ method
53+
* changed default prompt width from 1e-8 to 1e-11 GeV in code
4054

4155
New in Version 2.3.0:
4256
^^^^^^^^^^^^^^^^^^^^^
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# How To: Use a combinations matrix to keep track of combinabilities"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"## Preparations"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": 1,
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"# Set up the path to SModelS installation folder\n",
24+
"import sys; sys.path.append(\".\"); import smodels_paths"
25+
]
26+
},
27+
{
28+
"cell_type": "code",
29+
"execution_count": 2,
30+
"metadata": {},
31+
"outputs": [],
32+
"source": [
33+
"# Import those parts of smodels that are needed for this exercise\n",
34+
"from smodels.tools.physicsUnits import GeV\n",
35+
"from smodels.experiment.databaseObj import Database\n",
36+
"from smodels.theory.theoryPrediction import theoryPredictionsFor, TheoryPredictionsCombiner\n",
37+
"from smodels.theory import decomposer\n",
38+
"from smodels.tools.physicsUnits import fb\n",
39+
"from smodels.particlesLoader import BSMList\n",
40+
"from smodels.share.models.SMparticles import SMList\n",
41+
"from smodels.theory.model import Model"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": 3,
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"# a combinations matrix is just a dictionary with combinable analyses as both keys and values.\n",
51+
"# we assume symmetricity! (if A is combinable with B, then B is combinable with A)\n",
52+
"# Also, CMS results are automatically assumed to be combinable with ATLAS results,\n",
53+
"# and 8 TeV with 13 TeV results.\n",
54+
"combinationsmatrix = { \"ATLAS-SUSY-2018-41\": [ \"ATLAS-SUSY-2019-08\"]} \n",
55+
"# also define a list of analyses we are interested in\n",
56+
"analyses = [ \"CMS-SUS-21-002\", \"ATLAS-SUSY-2018-41\", \"ATLAS-SUSY-2019-08\", \"CMS-SUS-20-004\"]"
57+
]
58+
},
59+
{
60+
"cell_type": "markdown",
61+
"metadata": {},
62+
"source": [
63+
"here is a visualisation of the combinations matrix for the analyses under consideration:"
64+
]
65+
},
66+
{
67+
"attachments": {
68+
"matrix-2.png": {
69+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAUgAAAFJCAMAAADOlkSkAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQ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NPxygPKJnC/HESbwqdByab+mlu5MwUTj+/si3tUz4ymynMJ9YlqYm9RPekZ5ZwfPBZhvoh7kxhXvGMjNCf4KcP98+MeqjdMIV1hitUazsdo3TDFNYfmctWoXbHokFYf3iv6+lbNExh3eGiqpf4k7DO0NnD07QDRaoEilQJFPlImrOM07hhCusMQWB5LiJLmGPYjiiY0tqFeYStMx1d2mjRKqwzxDWtwjpDYHHDFNYZwonLRd0tgymsM5ROGRJqh3WG8JWhWwZTWGfkNns0Fa9MYZ2RdXNeFVc7rDNmpuRLrIbjn2qH9YZ0ibVBHNEgrC9+xPc2TmgvDDKFdYbYZgHqK6xMYZ0RqnVehNyUbpjCuiNz2eoUw5THKkxh/eG9rne+0iSsO1yh2seH/wdH3qV5AGOLtAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNi0yMFQxNDo0MToyNSswMDowMG606+AAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDYtMjBUMTQ6NDE6MjUrMDA6MDAf6VNcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAAAElFTkSuQmCC"
70+
}
71+
},
72+
"cell_type": "markdown",
73+
"metadata": {},
74+
"source": [
75+
"![matrix-2.png](attachment:matrix-2.png)"
76+
]
77+
},
78+
{
79+
"cell_type": "code",
80+
"execution_count": 4,
81+
"metadata": {},
82+
"outputs": [
83+
{
84+
"name": "stdout",
85+
"output_type": "stream",
86+
"text": [
87+
"we have selected 4 analyses\n"
88+
]
89+
}
90+
],
91+
"source": [
92+
"## Load the official database:\n",
93+
"db = Database(\"official\", combinationsmatrix=combinationsmatrix)\n",
94+
"results = db.getExpResults(analysisIDs=analyses, dataTypes = [ \"efficiencyMap\"])\n",
95+
"print ( f\"we have selected {len(results)} analyses\" )"
96+
]
97+
},
98+
{
99+
"cell_type": "code",
100+
"execution_count": 5,
101+
"metadata": {},
102+
"outputs": [
103+
{
104+
"data": {
105+
"text/plain": [
106+
"['ATLAS-SUSY-2018-41',\n",
107+
" 'ATLAS-SUSY-2019-08',\n",
108+
" 'CMS-SUS-20-004',\n",
109+
" 'CMS-SUS-21-002']"
110+
]
111+
},
112+
"execution_count": 5,
113+
"metadata": {},
114+
"output_type": "execute_result"
115+
}
116+
],
117+
"source": [
118+
"[ x.globalInfo.id for x in results ]"
119+
]
120+
},
121+
{
122+
"cell_type": "code",
123+
"execution_count": 6,
124+
"metadata": {},
125+
"outputs": [],
126+
"source": [
127+
"# the theory we will be using\n",
128+
"inputFile = \"inputFiles/slha/ew_ymi2l51r.slha\""
129+
]
130+
},
131+
{
132+
"cell_type": "code",
133+
"execution_count": 7,
134+
"metadata": {},
135+
"outputs": [],
136+
"source": [
137+
"# prepare the model\n",
138+
"model = Model(BSMparticles=BSMList, SMparticles=SMList)\n",
139+
"model.updateParticles(inputFile=inputFile)\n",
140+
"# obtain the decomposed model\n",
141+
"toplist = decomposer.decompose(model,sigmacut=0.*fb)"
142+
]
143+
},
144+
{
145+
"cell_type": "markdown",
146+
"metadata": {},
147+
"source": [
148+
"## run SModelS"
149+
]
150+
},
151+
{
152+
"cell_type": "code",
153+
"execution_count": 8,
154+
"metadata": {},
155+
"outputs": [],
156+
"source": [
157+
"# get the predictions\n",
158+
"predictions = list ( theoryPredictionsFor(results, toplist, combinedResults=True ) )"
159+
]
160+
},
161+
{
162+
"cell_type": "code",
163+
"execution_count": 9,
164+
"metadata": {},
165+
"outputs": [
166+
{
167+
"data": {
168+
"text/plain": [
169+
"[('ATLAS-SUSY-2018-41', 'r_exp=', 0.869),\n",
170+
" ('ATLAS-SUSY-2019-08', 'r_exp=', 0.961),\n",
171+
" ('CMS-SUS-21-002', 'r_exp=', 1.158)]"
172+
]
173+
},
174+
"execution_count": 9,
175+
"metadata": {},
176+
"output_type": "execute_result"
177+
}
178+
],
179+
"source": [
180+
"# let's have a quick look at the predictions, and the (expected) r-values\n",
181+
"[ (x.dataset.globalInfo.id, \"r_exp=\", round(x.getRValue(expected=True),3)) for x in predictions ]"
182+
]
183+
},
184+
{
185+
"cell_type": "code",
186+
"execution_count": 10,
187+
"metadata": {},
188+
"outputs": [
189+
{
190+
"name": "stdout",
191+
"output_type": "stream",
192+
"text": [
193+
"can I combine ATLAS-SUSY-2018-41 with ATLAS-SUSY-2019-08? yes\n",
194+
"can I combine ATLAS-SUSY-2018-41 with CMS-SUS-21-002? yes\n",
195+
"can I combine ATLAS-SUSY-2019-08 with CMS-SUS-21-002? yes\n"
196+
]
197+
}
198+
],
199+
"source": [
200+
"for i,pr1 in enumerate(predictions[:-1]):\n",
201+
" id1 = pr1.dataset.globalInfo.id\n",
202+
" for pr2 in predictions[i+1:]:\n",
203+
" id2 = pr2.dataset.globalInfo.id\n",
204+
" combinable = pr1.dataset.isCombinableWith(pr2.dataset)\n",
205+
" print ( f\"can I combine {id1} with {id2}? {'yes' if combinable else 'no'}\" )"
206+
]
207+
},
208+
{
209+
"cell_type": "markdown",
210+
"metadata": {},
211+
"source": [
212+
"## combine!"
213+
]
214+
},
215+
{
216+
"cell_type": "code",
217+
"execution_count": 11,
218+
"metadata": {},
219+
"outputs": [],
220+
"source": [
221+
"# given [10] from above, we are allowed to combine the three analyses listed below\n",
222+
"analyses = [ \"CMS-SUS-21-002\", \"ATLAS-SUSY-2018-41\", \"ATLAS-SUSY-2019-08\"]\n",
223+
"combiner = TheoryPredictionsCombiner.selectResultsFrom ( predictions, analyses )"
224+
]
225+
},
226+
{
227+
"cell_type": "code",
228+
"execution_count": 12,
229+
"metadata": {},
230+
"outputs": [
231+
{
232+
"data": {
233+
"text/plain": [
234+
"1.674"
235+
]
236+
},
237+
"execution_count": 12,
238+
"metadata": {},
239+
"output_type": "execute_result"
240+
}
241+
],
242+
"source": [
243+
"# the combined expected r value must be above the individual expected r-values\n",
244+
"round(combiner.getRValue(expected=True),3)"
245+
]
246+
}
247+
],
248+
"metadata": {
249+
"kernelspec": {
250+
"display_name": "Python 3 (ipykernel)",
251+
"language": "python",
252+
"name": "python3"
253+
},
254+
"language_info": {
255+
"codemirror_mode": {
256+
"name": "ipython",
257+
"version": 3
258+
},
259+
"file_extension": ".py",
260+
"mimetype": "text/x-python",
261+
"name": "python",
262+
"nbconvert_exporter": "python",
263+
"pygments_lexer": "ipython3",
264+
"version": "3.11.2"
265+
}
266+
},
267+
"nbformat": 4,
268+
"nbformat_minor": 1
269+
}

0 commit comments

Comments
 (0)