Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Calo clustering factories now use JMultifactory #636

Closed
wants to merge 1 commit into from

Conversation

nathanwbrei
Copy link
Contributor

Briefly, what does this PR introduce?

The calorimeter clustering factories need to produce associations alongside clusters, and the current approach is hacky and bug-prone. JANA 2.1.0 introduces multifactories to solve this problem cleanly. This PR migrates all of the calorimeter clustering factories that produce associations to use multifactories.

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Does this PR change default behavior?

@nathanwbrei
Copy link
Contributor Author

nathanwbrei commented Apr 28, 2023

I've marked this PR as a draft because I'm not sure if we want to merge this sooner, or wait until JANA2 v2.1.1. The argument for waiting is that there are some ugly workarounds in this PR (see the TODO). The new JANA release will add the missing features to JMultifactory, at which point all of these factories will need to be modified again to remove the ugly workarounds.

Specifically: In JANA2 v2.1.0, JMultifactory is missing Set/GetTag(), GetApplication(), and ChangeRun(). These are all easy to add.

veprbl
veprbl previously approved these changes Apr 29, 2023
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM. I'm in favor of merging ASAP.

@veprbl
Copy link
Member

veprbl commented Apr 29, 2023

This can be made compatible with both jana's using preprocessor directives.

@veprbl veprbl dismissed their stale review May 4, 2023 22:14

Needs a rebase and update to include new LUMISPECCAL

wdconinc added a commit that referenced this pull request Jun 24, 2023
### Briefly, what does this PR introduce?
In 23.05.1 we realized that cluster matching (though now implementated)
doesn't actually work yet due to the absence of cluster associations
being produced in clustering. One could fix this in 17 factories (#636)
but I really didn't want to do that so here's an approach that reduces
duplicate code (but otherwise is similar enough, with the exception of
adding configuration structures).

Todo:
- [x] depends on #664 

Closes: #636

### What kind of change does this PR introduce?
- [x] Bug fix (issue: no cluster associations)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [x] Changes have been communicated to collaborators @veprbl
@nathanwbrei

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
Now associations will be written too.

---------

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants