Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jncots committed Aug 10, 2023
1 parent 7a0bab7 commit d3646b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/chromo/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,17 @@ def __call__(self, nevents):
event = self._event_class(self)
# boost into frame requested by user
self.kinematics.apply_boost(event, self._frame)
if self._apply_decay_handler and (
not np.all(
if self._apply_decay_handler:
status1_pids = event.pid[event.status == 1]
may_decay = np.isin(status1_pids, all_decaying_pids)

if not np.all(
np.isin(
event.pid[event.status == 1],
status1_pids[may_decay],
self._final_state_particles,
)
)
):
self._decay_handler(event)
):
self._decay_handler(event)
yield event
continue
nretries += 1
Expand Down
1 change: 1 addition & 0 deletions src/chromo/models/dpmjetIII.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def __init__(self, evt_kin, *, seed=None):
# Set PYTHIA decay flags to follow all changes to MDCY
self._lib.pydat1.mstj[21 - 1] = 1
self._lib.pydat1.mstj[22 - 1] = 2
self._lib.dtfrpa.ovwtdc = False
self._set_final_state_particles()

def _cross_section(self, kin=None):
Expand Down
1 change: 1 addition & 0 deletions tests/test_setstable.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

decay_list = [
lp.pi_plus.pdgid,
lp.pi_minus.pdgid,
lp.K_plus.pdgid,
lp.pi_0.pdgid,
lp.K_S_0.pdgid,
Expand Down

0 comments on commit d3646b3

Please sign in to comment.