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

Setup mc truth UndoAfterBurner #1492

Merged
merged 30 commits into from
Jun 26, 2024
Merged

Setup mc truth UndoAfterBurner #1492

merged 30 commits into from
Jun 26, 2024

Conversation

ajentsch
Copy link
Contributor

@ajentsch ajentsch commented Jun 4, 2024

Briefly, what does this PR introduce?

This PR introduces the postburner to EICrecon, which will remove the effects of the afterburner from the MCParticles branch, and store the resulting output (the actual MC Truth information from the generator) into a new branch, "MCParticlesHeadOnFrameNoBeamFX".

The postburner does not erase any information - the user will simply have access to both the afterburned MC information via MCParticles (as before), and the new branch, which handles the correct transformations to remove the effects.

The code is also staged to be able to handle removing only the crossing angle from reconstructed branches, and this additional functionality will come with a future PR.

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

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

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

No.

Does this PR change default behavior?

pt_DVCS_protons_MCParticles_POSTBURN_ePIC_eicrecon_6_4_2024_run_0.pdf
Analysis of ePIC Output With Afterburned Events.pdf

It only adds functionality and a new output branch, nothing else is affected.

@ajentsch ajentsch requested a review from wdconinc June 5, 2024 13:53
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
@ajentsch
Copy link
Contributor Author

ajentsch commented Jun 5, 2024 via email

@ajentsch
Copy link
Contributor Author

@veprbl is there anything else that needs to be done on this to merge it?

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.

Here are my comments.

src/algorithms/CMakeLists.txt Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.h Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.h Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurnConfig.h Outdated Show resolved Hide resolved
src/factories/postburn/PostBurnMCParticles_factory.h Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurnConfig.h Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
src/algorithms/postburn/PostBurn.cc Outdated Show resolved Hide resolved
ajentsch and others added 6 commits June 11, 2024 09:04
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
### Briefly, what does this PR introduce?
Adds MCBeamNeutron and MCBeamHadron collections. This matches the
current use case in beam.h rather than only providing the protons.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] 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
- [ ] Changes have been communicated to collaborators

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

### Does this PR change default behavior?
No

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
### Briefly, what does this PR introduce?
Injects the LowQ2 tracks into the tracking workflow so they can finally
be used like any other particle.

This might not be the best place to add the information from the events
in the longer term as there will may be some extra looping over
calorimeter and pid hits which aren't possible. At the moment though
there isn't another easy place to add them while there is a mix of
ReconstructedChargedParticles and ReconstructedParticles used in
different places.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] 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
- [ ] Changes have been communicated to collaborators

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

### Does this PR change default behavior?
Low-Q2 electrons should show up in ReconstructedParticle collections and
easily identifiable in the InclusiveKinematics collections

---------

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@ajentsch ajentsch requested a review from bspage912 June 12, 2024 22:16
bspage912
bspage912 previously approved these changes Jun 20, 2024
Copy link
Contributor

@bspage912 bspage912 left a comment

Choose a reason for hiding this comment

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

I think this all looks good. It may come as no surprise, but I too prefer the algo name of PostBurn as this describes exactly what we want to accomplish. There may arise cases in which we do not want to explicitly transform to the true head-on frame, but leave in random beam effects and only correct the crossing angle (this is all one can do in data).

@wdconinc
Copy link
Contributor

I have to agree with @veprbl on the naming here. Postburner literally 1 means afterburner; that's the opposite of what you want here. This name does not make clear what the algorithm does, which is the most important thing we should expect of the name.

I understand the hesitation about calling it TransformToHeadOnFrame or so. But what about RevertAfterBurner, UndoAfterBurner, AfterBurnerEffectsRemover, AfterBurnerCorrector, or something like that?

Thinking more broadly, even if this does not transform to the head on frame, it does transform or boost to different frames, so names with Transform(er) 2 or Boost(er) 3 should be fine.

@ajentsch
Copy link
Contributor Author

ajentsch commented Jun 25, 2024 via email

@ajentsch
Copy link
Contributor Author

ajentsch commented Jun 25, 2024 via email

@veprbl veprbl changed the title Setup mc truth postburner Setup mc truth UndoAfterBurner Jun 25, 2024
@veprbl veprbl force-pushed the setup-mc-truth-postburner branch 2 times, most recently from df5aa12 to 63c087b Compare June 25, 2024 23:14
@veprbl veprbl force-pushed the setup-mc-truth-postburner branch from 63c087b to bcdefa1 Compare June 25, 2024 23:20
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.

Reviewed capybara report https://veprbl.github.io/capybara-reports/00f33c66e1fd0b41a2d5bfdb2468838b/#MCParticlesHeadOnFrameNoBeamFX

Keeping pid_purity and pid_use_MC_truth for future use (use in future RecoParticles version of the algorithm).

@veprbl veprbl enabled auto-merge June 26, 2024 14:45
@veprbl veprbl added this pull request to the merge queue Jun 26, 2024
Merged via the queue into main with commit 87f64cd Jun 26, 2024
83 of 85 checks passed
@veprbl veprbl deleted the setup-mc-truth-postburner branch June 26, 2024 16:44
veprbl added a commit that referenced this pull request Jun 27, 2024
### Briefly, what does this PR introduce?

This PR introduces the postburner to EICrecon, which will remove the
effects of the afterburner from the MCParticles branch, and store the
resulting output (the actual MC Truth information from the generator)
into a new branch, "MCParticlesHeadOnFrameNoBeamFX".

The postburner does not erase any information - the user will simply
have access to both the afterburned MC information via MCParticles (as
before), and the new branch, which handles the correct transformations
to remove the effects.

The code is also staged to be able to handle removing *only* the
crossing angle from reconstructed branches, and this additional
functionality will come with a future PR.

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

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


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

### Does this PR change default behavior?

[pt_DVCS_protons_MCParticles_POSTBURN_ePIC_eicrecon_6_4_2024_run_0.pdf](https://github.com/user-attachments/files/15570067/pt_DVCS_protons_MCParticles_POSTBURN_ePIC_eicrecon_6_4_2024_run_0.pdf)
[Analysis of ePIC Output With Afterburned
Events.pdf](https://github.com/user-attachments/files/15570110/Analysis.of.ePIC.Output.With.Afterburned.Events.pdf)

It only adds functionality and a new output branch, nothing else is
affected.

---------

Co-authored-by: Alexander Jentsch <ajentsch@bnl.gov>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Co-authored-by: Simon Gardner <simon.gardner@glasgow.ac.uk>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: Sebouh Paul <sebouh.paul@gmail.com>
@veprbl veprbl added this to the 24.07.0 milestone Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants