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.
Files changed (94) hide show
  1. {triggercalib-2.0.8 → triggercalib-2.0.11}/PKG-INFO +25 -8
  2. {triggercalib-2.0.8 → triggercalib-2.0.11}/README.md +1 -1
  3. {triggercalib-2.0.8 → triggercalib-2.0.11}/pyproject.toml +39 -12
  4. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/__init__.py +1 -1
  5. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/__init__.py +1 -1
  6. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/fit_and_count.py +1 -1
  7. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/sideband.py +1 -1
  8. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/commands/sweights.py +1 -1
  9. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/BaseEff.py +2 -3
  10. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Binning.py +1 -1
  11. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/FitCountEff.py +1 -1
  12. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Fitter.py +1 -1
  13. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Model.py +1 -1
  14. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/SWeightsEff.py +1 -1
  15. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/Sideband.py +1 -1
  16. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/SidebandEff.py +1 -1
  17. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/core/__init__.py +1 -1
  18. {triggercalib-2.0.8/src/triggercalib/utils → triggercalib-2.0.11/src/triggercalib/tests}/__init__.py +1 -1
  19. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/conftest.py +23 -8
  20. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_commands.py +1 -1
  21. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_core.py +1 -1
  22. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_fit_count.py +1 -1
  23. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_sideband.py +3 -3
  24. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_stats.py +1 -1
  25. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_sweights.py +1 -1
  26. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/test_utils.py +1 -1
  27. {triggercalib-2.0.8/src/triggercalib/tests → triggercalib-2.0.11/src/triggercalib/utils}/__init__.py +1 -1
  28. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/helpers.py +1 -1
  29. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/io.py +1 -1
  30. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/stats.py +2 -2
  31. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/utils/tests.py +1 -1
  32. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/version.py +2 -2
  33. triggercalib-2.0.8/.coveragerc +0 -9
  34. triggercalib-2.0.8/.flake8 +0 -3
  35. triggercalib-2.0.8/.gitlab-ci.yml +0 -125
  36. triggercalib-2.0.8/CONTRIBUTING.md +0 -59
  37. triggercalib-2.0.8/build-docs.sh +0 -36
  38. triggercalib-2.0.8/docs/contributing.md +0 -8
  39. triggercalib-2.0.8/docs/guide/cheat-sheet.md +0 -61
  40. triggercalib-2.0.8/docs/guide/getting-started.md +0 -16
  41. triggercalib-2.0.8/docs/guide/index.md +0 -5
  42. triggercalib-2.0.8/docs/guide/running-triggercalib.md +0 -49
  43. triggercalib-2.0.8/docs/guide/trigger-efficiencies.md +0 -143
  44. triggercalib-2.0.8/docs/guide/troubleshooting.md +0 -24
  45. triggercalib-2.0.8/docs/guide/tutorials/2d-binning.ipynb +0 -203
  46. triggercalib-2.0.8/docs/guide/tutorials/combined.md +0 -4
  47. triggercalib-2.0.8/docs/guide/tutorials/fit-and-count.ipynb +0 -1343
  48. triggercalib-2.0.8/docs/guide/tutorials/hlt1-and-hlt2.md +0 -4
  49. triggercalib-2.0.8/docs/guide/tutorials/hlt1.ipynb +0 -197
  50. triggercalib-2.0.8/docs/guide/tutorials/hlt2.md +0 -4
  51. triggercalib-2.0.8/docs/guide/tutorials/index.md +0 -29
  52. triggercalib-2.0.8/docs/guide/tutorials/sweights.ipynb +0 -618
  53. triggercalib-2.0.8/docs/img/logo-smaller.png +0 -0
  54. triggercalib-2.0.8/docs/img/logo.jpeg +0 -0
  55. triggercalib-2.0.8/docs/img/tistos.png +0 -0
  56. triggercalib-2.0.8/docs/index.md +0 -31
  57. triggercalib-2.0.8/docs/javascripts/mathjax.js +0 -16
  58. triggercalib-2.0.8/docs/javascripts/notebooks.js +0 -7
  59. triggercalib-2.0.8/docs/reference/core.md +0 -40
  60. triggercalib-2.0.8/docs/reference/index.md +0 -15
  61. triggercalib-2.0.8/docs/reference/utils.md +0 -23
  62. triggercalib-2.0.8/docs/releases.md +0 -46
  63. triggercalib-2.0.8/docs/stylesheets/colours.css +0 -67
  64. triggercalib-2.0.8/docs/stylesheets/fonts.css +0 -5
  65. triggercalib-2.0.8/docs/stylesheets/styles.css +0 -6
  66. triggercalib-2.0.8/environment-docs.yml +0 -19
  67. triggercalib-2.0.8/mkdocs.yml +0 -119
  68. triggercalib-2.0.8/releases/template.md +0 -15
  69. triggercalib-2.0.8/releases/v1/r4/v1r4p0.md +0 -26
  70. triggercalib-2.0.8/releases/v1/r4/v1r4p1.md +0 -20
  71. triggercalib-2.0.8/releases/v1/r4/v1r4p2.md +0 -18
  72. triggercalib-2.0.8/releases/v1/r4/v1r4p3.md +0 -9
  73. triggercalib-2.0.8/releases/v1/r4/v1r4p4.md +0 -12
  74. triggercalib-2.0.8/releases/v1/r4/v1r4p5.md +0 -8
  75. triggercalib-2.0.8/releases/v1/r5/v1r5p0.md +0 -10
  76. triggercalib-2.0.8/releases/v1/r5/v1r5p1.md +0 -13
  77. triggercalib-2.0.8/releases/v1/r5/v1r5p2.md +0 -9
  78. triggercalib-2.0.8/releases/v1/r5/v1r5p3.md +0 -15
  79. triggercalib-2.0.8/releases/v2/r0/v2r0p0.md +0 -16
  80. triggercalib-2.0.8/releases/v2/r0/v2r0p1.md +0 -10
  81. triggercalib-2.0.8/releases/v2/r0/v2r0p2.md +0 -12
  82. triggercalib-2.0.8/releases/v2/r0/v2r0p3.md +0 -13
  83. triggercalib-2.0.8/releases/v2/r0/v2r0p4.md +0 -14
  84. triggercalib-2.0.8/releases/v2/r0/v2r0p5.md +0 -20
  85. triggercalib-2.0.8/releases/v2/r0/v2r0p6.md +0 -20
  86. triggercalib-2.0.8/releases/v2/r0/v2r0p7.md +0 -21
  87. triggercalib-2.0.8/releases/v2/r0/v2r0p8.md +0 -22
  88. triggercalib-2.0.8/requirements-ci.txt +0 -7
  89. triggercalib-2.0.8/requirements-dev.txt +0 -8
  90. {triggercalib-2.0.8 → triggercalib-2.0.11}/.gitignore +0 -0
  91. /triggercalib-2.0.8/COPYING → /triggercalib-2.0.11/LICENSE +0 -0
  92. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/binning.yaml +0 -0
  93. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/model.yaml +0 -0
  94. {triggercalib-2.0.8 → triggercalib-2.0.11}/src/triggercalib/tests/config/sideband.yaml +0 -0
@@ -1,19 +1,36 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: triggercalib
3
- Version: 2.0.8
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-File: COPYING
9
+ License-Expression: GPL-3.0-only
10
+ License-File: LICENSE
10
11
  Keywords: efficiencies,lhcb,tistos,trigger
11
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12
- Requires-Python: >=3.6
13
- Requires-Dist: hepstats
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: sweights
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
- At the core of these tools is the `HltEff` class, which implements the TISTOS method (as laid out in [LHCb-PUB-2014-039](https://cds.cern.ch/record/1701134/files/LHCb-PUB-2014-039.pdf)) to produce trigger efficiencies in ROOT `TH1`/`TH2` histograms.
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
- At the core of these tools is the `HltEff` class, which implements the TISTOS method (as laid out in [LHCb-PUB-2014-039](https://cds.cern.ch/record/1701134/files/LHCb-PUB-2014-039.pdf)) to produce trigger efficiencies in ROOT `TH1`/`TH2` histograms.
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
- "License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
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.6"
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
- "sweights",
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/*/tests",
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 = 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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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
- background_dec = array("b", [0])
152
- background_dec_branch = background_tree.Branch(
153
- f"{line}Decision", background_dec, f"{line}Decision/O"
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
- background_dec[0] = np.random.uniform() < background_efficiencies["trig"]
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
- background_dec_branch.Fill()
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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(example_file):
143
+ def test_sideband_1D_no_trig(example_file_no_trig):
144
144
  from triggercalib import SidebandEff
145
145
 
146
- tree, path = example_file
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 "COPYING". #
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 Eq. 14 of LHCb-PUB-2014-039 (https://cds.cern.ch/record/1701134/).
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 "COPYING". #
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.8'
22
- __version_tuple__ = version_tuple = (2, 0, 8)
21
+ __version__ = version = '2.0.11'
22
+ __version_tuple__ = version_tuple = (2, 0, 11)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -1,9 +0,0 @@
1
- [run]
2
- omit =
3
- */commands/*
4
- */tests/*
5
- */__init__.py
6
- */version.py
7
-
8
- [report]
9
- show_missing=true
@@ -1,3 +0,0 @@
1
- [flake8]
2
- exclude = .git,.venv,__pycache__,docs,tests,build,dist,src/triggercalib/__init__.py
3
- max-complexity = 10