Skip to content

Commit 49726c7

Browse files
authored
Merge pull request #9 from MadAnalysis/bugfix_reader
Error during cut initialisation
2 parents d07925c + 8cc0500 commit 49726c7

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Release 3.0.0-dev (development release)
1+
# Release 3.0
22

33
## New features since last release
44
* Complete interface with PAD in order to run exclusion limits externally
@@ -18,6 +18,9 @@
1818
* Make exceptions accessible through `ma5.system` module
1919
([#7](https://github.com/MadAnalysis/ma5_expert/pull/7)).
2020

21+
* Signal region initialisation fixes in cutflow collection.
22+
([#9](https://github.com/MadAnalysis/ma5_expert/pull/9))
23+
2124
## Contributors
2225

2326
This release contains contributions from (in alphabetical order):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
setup(
1414
name="ma5_expert",
15-
version="3.0.2",
15+
version="3.0.3",
1616
description=("MadAnalysis 5 interpreter for Expert mode"),
1717
long_description=long_description,
1818
long_description_content_type="text/markdown",
1919
url="https://github.com/MadAnalysis/ma5_expert",
2020
project_urls={
2121
"Bug Tracker": "https://github.com/MadAnalysis/ma5_expert/issues",
2222
},
23-
download_url="https://github.com/MadAnalysis/ma5_expert/archive/refs/tags/v3.0.2.tar.gz",
23+
download_url="https://github.com/MadAnalysis/ma5_expert/archive/refs/tags/v3.0.3.tar.gz",
2424
author="Jack Y. Araz",
2525
author_email=("jack.araz@durham.ac.uk"),
2626
license="MIT",

src/ma5_expert/cutflow/reader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _readCollection(
116116
self._srID.append(currentSR.id)
117117
except Exception as err:
118118
log.error(err)
119-
currentSR.id = f"SR_{len(self.srID)}"
119+
currentSR.id = f"SR_{len(self._srID)}"
120120
setattr(self, currentSR.id, currentSR)
121121
self._srID.append(currentSR.id)
122122

@@ -156,15 +156,15 @@ def addSignalRegion(
156156
if ix == 0:
157157
current_cut = Cut(
158158
name=name,
159-
Nevents=val,
159+
_Nevents = val,
160160
Nentries=entries,
161161
)
162162
else:
163163
current_cut = Cut(
164164
name=name,
165-
previous_cut=SR[-1],
166-
initial_cut=SR[0],
167-
Nevents=val,
165+
_previous_cut=SR[-1],
166+
_initial_cut=SR[0],
167+
_Nevents=val,
168168
Nentries=entries,
169169
)
170170
SR.addCut(current_cut)
@@ -174,7 +174,7 @@ def addSignalRegion(
174174
self._srID.append(SR.id)
175175
except Exception as err:
176176
log.error(err)
177-
SR.id = f"SR_{len(self.srID)}"
177+
SR.id = f"SR_{len(self._srID)}"
178178
setattr(self, SR.id, SR)
179179
self._srID.append(SR.id)
180180

0 commit comments

Comments
 (0)