triggercalib 2.0.8__tar.gz → 2.0.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {triggercalib-2.0.8 → triggercalib-2.0.11}/PKG-INFO +25 -8
- {triggercalib-2.0.8 → triggercalib-2.0.11}/README.md +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/pyproject.toml +39 -12
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/__init__.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/__init__.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/fit_and_count.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/sideband.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/sweights.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/BaseEff.py +2 -3
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Binning.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/FitCountEff.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Fitter.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Model.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/SWeightsEff.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Sideband.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/SidebandEff.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/__init__.py +1 -1
- {triggercalib-2.0.8/src/triggercalib/utils → triggercalib-2.0.11/src/triggercalib/tests}/__init__.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/conftest.py +23 -8
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_commands.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_core.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_fit_count.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_sideband.py +3 -3
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_stats.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_sweights.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_utils.py +1 -1
- {triggercalib-2.0.8/src/triggercalib/tests → triggercalib-2.0.11/src/triggercalib/utils}/__init__.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/helpers.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/io.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/stats.py +2 -2
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/tests.py +1 -1
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/version.py +2 -2
- triggercalib-2.0.8/.coveragerc +0 -9
- triggercalib-2.0.8/.flake8 +0 -3
- triggercalib-2.0.8/.gitlab-ci.yml +0 -125
- triggercalib-2.0.8/CONTRIBUTING.md +0 -59
- triggercalib-2.0.8/build-docs.sh +0 -36
- triggercalib-2.0.8/docs/contributing.md +0 -8
- triggercalib-2.0.8/docs/guide/cheat-sheet.md +0 -61
- triggercalib-2.0.8/docs/guide/getting-started.md +0 -16
- triggercalib-2.0.8/docs/guide/index.md +0 -5
- triggercalib-2.0.8/docs/guide/running-triggercalib.md +0 -49
- triggercalib-2.0.8/docs/guide/trigger-efficiencies.md +0 -143
- triggercalib-2.0.8/docs/guide/troubleshooting.md +0 -24
- triggercalib-2.0.8/docs/guide/tutorials/2d-binning.ipynb +0 -203
- triggercalib-2.0.8/docs/guide/tutorials/combined.md +0 -4
- triggercalib-2.0.8/docs/guide/tutorials/fit-and-count.ipynb +0 -1343
- triggercalib-2.0.8/docs/guide/tutorials/hlt1-and-hlt2.md +0 -4
- triggercalib-2.0.8/docs/guide/tutorials/hlt1.ipynb +0 -197
- triggercalib-2.0.8/docs/guide/tutorials/hlt2.md +0 -4
- triggercalib-2.0.8/docs/guide/tutorials/index.md +0 -29
- triggercalib-2.0.8/docs/guide/tutorials/sweights.ipynb +0 -618
- triggercalib-2.0.8/docs/img/logo-smaller.png +0 -0
- triggercalib-2.0.8/docs/img/logo.jpeg +0 -0
- triggercalib-2.0.8/docs/img/tistos.png +0 -0
- triggercalib-2.0.8/docs/index.md +0 -31
- triggercalib-2.0.8/docs/javascripts/mathjax.js +0 -16
- triggercalib-2.0.8/docs/javascripts/notebooks.js +0 -7
- triggercalib-2.0.8/docs/reference/core.md +0 -40
- triggercalib-2.0.8/docs/reference/index.md +0 -15
- triggercalib-2.0.8/docs/reference/utils.md +0 -23
- triggercalib-2.0.8/docs/releases.md +0 -46
- triggercalib-2.0.8/docs/stylesheets/colours.css +0 -67
- triggercalib-2.0.8/docs/stylesheets/fonts.css +0 -5
- triggercalib-2.0.8/docs/stylesheets/styles.css +0 -6
- triggercalib-2.0.8/environment-docs.yml +0 -19
- triggercalib-2.0.8/mkdocs.yml +0 -119
- triggercalib-2.0.8/releases/template.md +0 -15
- triggercalib-2.0.8/releases/v1/r4/v1r4p0.md +0 -26
- triggercalib-2.0.8/releases/v1/r4/v1r4p1.md +0 -20
- triggercalib-2.0.8/releases/v1/r4/v1r4p2.md +0 -18
- triggercalib-2.0.8/releases/v1/r4/v1r4p3.md +0 -9
- triggercalib-2.0.8/releases/v1/r4/v1r4p4.md +0 -12
- triggercalib-2.0.8/releases/v1/r4/v1r4p5.md +0 -8
- triggercalib-2.0.8/releases/v1/r5/v1r5p0.md +0 -10
- triggercalib-2.0.8/releases/v1/r5/v1r5p1.md +0 -13
- triggercalib-2.0.8/releases/v1/r5/v1r5p2.md +0 -9
- triggercalib-2.0.8/releases/v1/r5/v1r5p3.md +0 -15
- triggercalib-2.0.8/releases/v2/r0/v2r0p0.md +0 -16
- triggercalib-2.0.8/releases/v2/r0/v2r0p1.md +0 -10
- triggercalib-2.0.8/releases/v2/r0/v2r0p2.md +0 -12
- triggercalib-2.0.8/releases/v2/r0/v2r0p3.md +0 -13
- triggercalib-2.0.8/releases/v2/r0/v2r0p4.md +0 -14
- triggercalib-2.0.8/releases/v2/r0/v2r0p5.md +0 -20
- triggercalib-2.0.8/releases/v2/r0/v2r0p6.md +0 -20
- triggercalib-2.0.8/releases/v2/r0/v2r0p7.md +0 -21
- triggercalib-2.0.8/releases/v2/r0/v2r0p8.md +0 -22
- triggercalib-2.0.8/requirements-ci.txt +0 -7
- triggercalib-2.0.8/requirements-dev.txt +0 -8
- {triggercalib-2.0.8 → triggercalib-2.0.11}/.gitignore +0 -0
- /triggercalib-2.0.8/COPYING → /triggercalib-2.0.11/LICENSE +0 -0
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/binning.yaml +0 -0
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/model.yaml +0 -0
- {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/sideband.yaml +0 -0
|
@@ -1,19 +1,36 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: triggercalib
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.11
|
|
4
4
|
Summary: A turnkey package for estimating LHCb trigger efficiencies
|
|
5
5
|
Project-URL: Homepage, https://gitlab.cern.ch/lhcb-rta/triggercalib/
|
|
6
6
|
Project-URL: Documentation, https://triggercalib.docs.cern.ch/
|
|
7
7
|
Project-URL: Bug Tracker, https://gitlab.cern.ch/lhcb-rta/triggercalib/-/issues
|
|
8
8
|
Author-email: Jamie Gooding <jamie.gooding@cern.ch>
|
|
9
|
-
License-
|
|
9
|
+
License-Expression: GPL-3.0-only
|
|
10
|
+
License-File: LICENSE
|
|
10
11
|
Keywords: efficiencies,lhcb,tistos,trigger
|
|
11
|
-
Classifier:
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
15
|
+
Requires-Python: >=3.9
|
|
14
16
|
Requires-Dist: lhcbstyle
|
|
15
17
|
Requires-Dist: numpy
|
|
16
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: pyyaml
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: black==24.8.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: flake8; extra == 'dev'
|
|
22
|
+
Requires-Dist: matplotlib; extra == 'dev'
|
|
23
|
+
Requires-Dist: mplhep; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
26
|
+
Provides-Extra: lint
|
|
27
|
+
Requires-Dist: black==24.8.0; extra == 'lint'
|
|
28
|
+
Requires-Dist: flake8; extra == 'lint'
|
|
29
|
+
Provides-Extra: test
|
|
30
|
+
Requires-Dist: matplotlib; extra == 'test'
|
|
31
|
+
Requires-Dist: mplhep; extra == 'test'
|
|
32
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
33
|
+
Requires-Dist: pytest>=7; extra == 'test'
|
|
17
34
|
Description-Content-Type: text/markdown
|
|
18
35
|
|
|
19
36
|
# TriggerCalib - Tooling for trigger efficiencies
|
|
@@ -21,7 +38,7 @@ Description-Content-Type: text/markdown
|
|
|
21
38
|
This repository contains tools developed for calculating trigger efficiencies in LHCb analyses and studies.
|
|
22
39
|
The full documenation for the `TriggerCalib` tools can be found here: [**https://triggercalib.docs.cern.ch/**](https://triggercalib.docs.cern.ch/).
|
|
23
40
|
|
|
24
|
-
|
|
41
|
+
These tools implement the TISTOS method (as laid out in [Eur. Phys. J. C 86 (2026) 731](https://doi.org/10.1140/epjc/s10052-026-15966-9)) to produce trigger efficiencies in ROOT `TH1`/`TH2` histograms.
|
|
25
42
|
This will be extended in the near future by a `.yaml`-configurable interface to the class, with the aim of being familiar to users of the [`HltEfficiencyChecker`](https://gitlab.cern.ch/lhcb/DaVinci/-/tree/master/HltEfficiencyChecker) tool for studying MC efficiencies in simulation.
|
|
26
43
|
An additional tool, currently in planning, further extend this functionality by providing users with trigger efficiency correction tables (à la [`PIDCalib2`](https://gitlab.cern.ch/lhcb-rta/pidcalib2)) in key control channels.
|
|
27
44
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This repository contains tools developed for calculating trigger efficiencies in LHCb analyses and studies.
|
|
4
4
|
The full documenation for the `TriggerCalib` tools can be found here: [**https://triggercalib.docs.cern.ch/**](https://triggercalib.docs.cern.ch/).
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
These tools implement the TISTOS method (as laid out in [Eur. Phys. J. C 86 (2026) 731](https://doi.org/10.1140/epjc/s10052-026-15966-9)) to produce trigger efficiencies in ROOT `TH1`/`TH2` histograms.
|
|
7
7
|
This will be extended in the near future by a `.yaml`-configurable interface to the class, with the aim of being familiar to users of the [`HltEfficiencyChecker`](https://gitlab.cern.ch/lhcb/DaVinci/-/tree/master/HltEfficiencyChecker) tool for studying MC efficiencies in simulation.
|
|
8
8
|
An additional tool, currently in planning, further extend this functionality by providing users with trigger efficiency correction tables (à la [`PIDCalib2`](https://gitlab.cern.ch/lhcb-rta/pidcalib2)) in key control channels.
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["hatchling", "hatch-vcs"]
|
|
2
|
+
requires = ["hatchling>=1.27", "hatch-vcs"]
|
|
3
3
|
build-backend = "hatchling.build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
@@ -7,8 +7,12 @@ name = "triggercalib"
|
|
|
7
7
|
description = "A turnkey package for estimating LHCb trigger efficiencies"
|
|
8
8
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
9
9
|
authors = [{name = "Jamie Gooding", email = "jamie.gooding@cern.ch"}]
|
|
10
|
+
license = "GPL-3.0-only"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
10
12
|
classifiers = [
|
|
11
|
-
"
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
15
|
+
"Intended Audience :: Science/Research",
|
|
12
16
|
]
|
|
13
17
|
keywords = [
|
|
14
18
|
"lhcb",
|
|
@@ -16,24 +20,52 @@ keywords = [
|
|
|
16
20
|
"tistos",
|
|
17
21
|
"efficiencies",
|
|
18
22
|
]
|
|
19
|
-
requires-python = ">=3.
|
|
23
|
+
requires-python = ">=3.9"
|
|
24
|
+
# Note: ROOT required, but better installed by conda
|
|
20
25
|
dependencies = [
|
|
21
|
-
"hepstats",
|
|
22
26
|
"lhcbstyle",
|
|
23
27
|
"numpy",
|
|
24
|
-
"
|
|
28
|
+
"pyyaml",
|
|
25
29
|
]
|
|
26
30
|
dynamic = ["version"]
|
|
27
31
|
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
test = [
|
|
34
|
+
"matplotlib",
|
|
35
|
+
"mplhep",
|
|
36
|
+
"pytest>=7",
|
|
37
|
+
"pytest-cov",
|
|
38
|
+
]
|
|
39
|
+
lint = [
|
|
40
|
+
"black==24.8.0",
|
|
41
|
+
"flake8",
|
|
42
|
+
]
|
|
43
|
+
dev = [
|
|
44
|
+
"triggercalib[test,lint]",
|
|
45
|
+
]
|
|
46
|
+
|
|
28
47
|
[project.urls]
|
|
29
48
|
Homepage = "https://gitlab.cern.ch/lhcb-rta/triggercalib/"
|
|
30
|
-
Documentation = "https://triggercalib.docs.cern.ch/"
|
|
49
|
+
Documentation = "https://triggercalib.docs.cern.ch/"
|
|
31
50
|
"Bug Tracker" = "https://gitlab.cern.ch/lhcb-rta/triggercalib/-/issues"
|
|
32
51
|
|
|
52
|
+
[project.scripts]
|
|
53
|
+
"triggercalib.sideband" = "triggercalib.commands.sideband:main"
|
|
54
|
+
"triggercalib.fit_and_count" = "triggercalib.commands.fit_and_count:main"
|
|
55
|
+
"triggercalib.sweights" = "triggercalib.commands.sweights:main"
|
|
56
|
+
|
|
33
57
|
[tool.hatch]
|
|
34
58
|
version.source = "vcs"
|
|
35
59
|
build.hooks.vcs.version-file = "src/triggercalib/version.py"
|
|
36
60
|
|
|
61
|
+
[tool.hatch.build.targets.sdist]
|
|
62
|
+
include = [
|
|
63
|
+
"/src",
|
|
64
|
+
"/README.md",
|
|
65
|
+
"/LICENSE",
|
|
66
|
+
"/pyproject.toml",
|
|
67
|
+
]
|
|
68
|
+
|
|
37
69
|
[tool.pytest.ini_options]
|
|
38
70
|
minversion = "6.0"
|
|
39
71
|
addopts = [
|
|
@@ -44,13 +76,8 @@ addopts = [
|
|
|
44
76
|
"--cov=src/triggercalib/",
|
|
45
77
|
]
|
|
46
78
|
testpaths = [
|
|
47
|
-
"src/triggercalib
|
|
79
|
+
"src/triggercalib/tests",
|
|
48
80
|
]
|
|
49
81
|
filterwarnings = [
|
|
50
82
|
"ignore::DeprecationWarning",
|
|
51
83
|
]
|
|
52
|
-
|
|
53
|
-
[project.scripts]
|
|
54
|
-
"triggercalib.sideband" = "triggercalib.commands.sideband:main"
|
|
55
|
-
"triggercalib.fit_and_count" = "triggercalib.commands.fit_and_count:main"
|
|
56
|
-
"triggercalib.sweights" = "triggercalib.commands.sweights:main"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration. #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration. #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration. #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration. #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -108,9 +108,8 @@ class BaseEff:
|
|
|
108
108
|
self.tos = helpers.parse_selection(particle, tos, "TOS", branches)
|
|
109
109
|
self.tis = helpers.parse_selection(particle, tis, "TIS", branches)
|
|
110
110
|
|
|
111
|
-
trig = helpers.parse_selection(particle, tos, "", branches)
|
|
112
111
|
if trig_effs:
|
|
113
|
-
self.trig =
|
|
112
|
+
self.trig = helpers.parse_selection(particle, tos, "", branches)
|
|
114
113
|
else:
|
|
115
114
|
self.trig = None
|
|
116
115
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
{triggercalib-2.0.8/src/triggercalib/utils → triggercalib-2.0.11/src/triggercalib/tests}/__init__.py
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -15,7 +15,7 @@ import pytest
|
|
|
15
15
|
import ROOT as R
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
def generate_file(N_events=100_000, path="example_file.root"):
|
|
18
|
+
def generate_file(N_events=100_000, path="example_file.root", no_trig=False):
|
|
19
19
|
"""Create an example ROOT file for testing
|
|
20
20
|
|
|
21
21
|
Creates a ROOT file containing signal and background events with known trigger
|
|
@@ -148,10 +148,11 @@ def generate_file(N_events=100_000, path="example_file.root"):
|
|
|
148
148
|
(one_background_efficiencies, two_background_efficiencies),
|
|
149
149
|
):
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
if not no_trig:
|
|
152
|
+
background_dec = array("b", [0])
|
|
153
|
+
background_dec_branch = background_tree.Branch(
|
|
154
|
+
f"{line}Decision", background_dec, f"{line}Decision/O"
|
|
155
|
+
)
|
|
155
156
|
|
|
156
157
|
background_tis = array("b", [0])
|
|
157
158
|
background_tis_branch = background_tree.Branch(
|
|
@@ -165,13 +166,17 @@ def generate_file(N_events=100_000, path="example_file.root"):
|
|
|
165
166
|
|
|
166
167
|
for _ in range(background_n):
|
|
167
168
|
background_issignal[0] = 0
|
|
168
|
-
|
|
169
|
+
if not no_trig:
|
|
170
|
+
background_dec[0] = (
|
|
171
|
+
np.random.uniform() < background_efficiencies["trig"]
|
|
172
|
+
)
|
|
169
173
|
background_tis[0] = np.random.uniform() < background_efficiencies["tis"]
|
|
170
174
|
background_tos[0] = np.random.uniform() < background_efficiencies["tos"]
|
|
171
175
|
background_weight[0] = weights["background"]
|
|
172
176
|
|
|
173
177
|
background_issignal_branch.Fill()
|
|
174
|
-
|
|
178
|
+
if not no_trig:
|
|
179
|
+
background_dec_branch.Fill()
|
|
175
180
|
background_tis_branch.Fill()
|
|
176
181
|
background_tos_branch.Fill()
|
|
177
182
|
background_weight_branch.Fill()
|
|
@@ -193,6 +198,16 @@ def example_file(N_events=100_000, path="example_file.root"):
|
|
|
193
198
|
return generate_file(N_events=N_events, path=path)
|
|
194
199
|
|
|
195
200
|
|
|
201
|
+
@pytest.fixture
|
|
202
|
+
def example_file_no_trig(N_events=100_000, path="example_file_no_trig.root"):
|
|
203
|
+
return generate_file(N_events=N_events, path=path, no_trig=True)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@pytest.fixture
|
|
207
|
+
def example_file_no_trig(N_events=100_000, path="example_file_no_trig.root"):
|
|
208
|
+
return generate_file(N_events=N_events, path=path, no_trig=True)
|
|
209
|
+
|
|
210
|
+
|
|
196
211
|
@pytest.fixture
|
|
197
212
|
def example_sparse_file(N_events=100, path="example_sparse_file.root"):
|
|
198
213
|
return generate_file(N_events=N_events, path=path)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -140,10 +140,10 @@ def test_sideband_2D(example_file):
|
|
|
140
140
|
tests.compare_tgraph_to_th(tgraph, th)
|
|
141
141
|
|
|
142
142
|
|
|
143
|
-
def test_sideband_1D_no_trig(
|
|
143
|
+
def test_sideband_1D_no_trig(example_file_no_trig):
|
|
144
144
|
from triggercalib import SidebandEff
|
|
145
145
|
|
|
146
|
-
tree, path =
|
|
146
|
+
tree, path = example_file_no_trig
|
|
147
147
|
sideband = {
|
|
148
148
|
"variable": "discrim",
|
|
149
149
|
"signal": [5100, 5300],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2025-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
{triggercalib-2.0.8/src/triggercalib/tests → triggercalib-2.0.11/src/triggercalib/utils}/__init__.py
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2025 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -36,7 +36,7 @@ def poisson(
|
|
|
36
36
|
upper_error (Union[float, List[float], np.ndarray[float]]): The symmetric uncertainty on the efficiency (same as lower error, since uncertainty is symmetric)
|
|
37
37
|
|
|
38
38
|
Notes:
|
|
39
|
-
This function implements the propagation of Poisson-like uncertainties as detailed in
|
|
39
|
+
This function implements the propagation of Poisson-like uncertainties as detailed in J. Albrecht et al., Eur. Phys. J. C 86 (2026) 731 (https://doi.org/10.1140/epjc/s10052-026-15966-9).
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
42
|
if passed_error is None:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# (c) Copyright 2024-2026 CERN for the benefit of the LHCb Collaboration #
|
|
3
3
|
# #
|
|
4
4
|
# This software is distributed under the terms of the GNU General Public #
|
|
5
|
-
# Licence version 3 (GPL Version 3), copied verbatim in the file "
|
|
5
|
+
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
|
|
6
6
|
# #
|
|
7
7
|
# In applying this licence, CERN does not waive the privileges and immunities #
|
|
8
8
|
# granted to it by virtue of its status as an Intergovernmental Organization #
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 0,
|
|
21
|
+
__version__ = version = '2.0.11'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 0, 11)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
triggercalib-2.0.8/.coveragerc
DELETED
triggercalib-2.0.8/.flake8
DELETED