Skip to content

Commit

Permalink
Merge pull request #9 from MadAnalysis/bugfix_reader
Browse files Browse the repository at this point in the history
Error during cut initialisation
  • Loading branch information
jackaraz authored Oct 12, 2022
2 parents d07925c + 8cc0500 commit 49726c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release 3.0.0-dev (development release)
# Release 3.0

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

* Signal region initialisation fixes in cutflow collection.
([#9](https://github.com/MadAnalysis/ma5_expert/pull/9))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

setup(
name="ma5_expert",
version="3.0.2",
version="3.0.3",
description=("MadAnalysis 5 interpreter for Expert mode"),
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/MadAnalysis/ma5_expert",
project_urls={
"Bug Tracker": "https://github.com/MadAnalysis/ma5_expert/issues",
},
download_url="https://github.com/MadAnalysis/ma5_expert/archive/refs/tags/v3.0.2.tar.gz",
download_url="https://github.com/MadAnalysis/ma5_expert/archive/refs/tags/v3.0.3.tar.gz",
author="Jack Y. Araz",
author_email=("[email protected]"),
license="MIT",
Expand Down
12 changes: 6 additions & 6 deletions src/ma5_expert/cutflow/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _readCollection(
self._srID.append(currentSR.id)
except Exception as err:
log.error(err)
currentSR.id = f"SR_{len(self.srID)}"
currentSR.id = f"SR_{len(self._srID)}"
setattr(self, currentSR.id, currentSR)
self._srID.append(currentSR.id)

Expand Down Expand Up @@ -156,15 +156,15 @@ def addSignalRegion(
if ix == 0:
current_cut = Cut(
name=name,
Nevents=val,
_Nevents = val,
Nentries=entries,
)
else:
current_cut = Cut(
name=name,
previous_cut=SR[-1],
initial_cut=SR[0],
Nevents=val,
_previous_cut=SR[-1],
_initial_cut=SR[0],
_Nevents=val,
Nentries=entries,
)
SR.addCut(current_cut)
Expand All @@ -174,7 +174,7 @@ def addSignalRegion(
self._srID.append(SR.id)
except Exception as err:
log.error(err)
SR.id = f"SR_{len(self.srID)}"
SR.id = f"SR_{len(self._srID)}"
setattr(self, SR.id, SR)
self._srID.append(SR.id)

Expand Down

0 comments on commit 49726c7

Please sign in to comment.