-
Notifications
You must be signed in to change notification settings - Fork 2
Add RecParticle
#2
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
Merged
+44
−0
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d9f71f2
add rec particle
a2ca5b2
style: pre-commit fixes
pre-commit-ci[bot] 668f31e
reorder header
a5f1b5a
style: pre-commit fixes
pre-commit-ci[bot] 807d28d
make it work
2ebed80
make it work
9d4c399
style: pre-commit fixes
pre-commit-ci[bot] 56e7960
things
5580f28
Merge branch 'rec_particle' of github.com:mesmith75/data-model into r…
e12c868
style: pre-commit fixes
pre-commit-ci[bot] b8212b5
tidy
7ac38a0
style: pre-commit fixes
pre-commit-ci[bot] e9c61ea
order
9286927
style: pre-commit fixes
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #pragma once | ||
|
|
||
| #include <SHiP/SimParticle.hpp> | ||
| #include <array> | ||
| #include <cstdint> | ||
|
|
||
| namespace SHiP { | ||
|
|
||
| /// Reconstructed particle | ||
| struct RecParticle { | ||
| std::int32_t trackId{0}; | ||
| std::int32_t parentId{0}; | ||
| std::int32_t pdgCode{0}; | ||
| std::array<double, 3> vertex{0, 0, 0}; ///< Production vertex [mm] | ||
| std::array<double, 3> endpoint{0, 0, 0}; ///< End point [mm] | ||
| std::array<double, 3> momentum{0, 0, 0}; ///< Initial momentum [GeV/c] | ||
| double energy{0}; ///< Initial kinetic energy [GeV] | ||
| double time{0}; ///< Production time [ns] | ||
| std::int32_t creatorProcess{0}; | ||
| double ipPV{0}; ///< IP wrt to the PV (at 0,0,0) [mm] | ||
| }; | ||
|
|
||
| inline RecParticle fromSimParticle(SimParticle const& sp) { | ||
| return { | ||
| .trackId = sp.trackId, | ||
| .parentId = sp.parentId, | ||
| .pdgCode = sp.pdgCode, | ||
| .vertex = sp.vertex, | ||
| .endpoint = sp.endpoint, | ||
| .momentum = sp.momentum, | ||
| .energy = sp.energy, | ||
| .time = sp.time, | ||
| .creatorProcess = sp.creatorProcess, | ||
| .ipPV = 0.0, | ||
| }; | ||
| } | ||
|
|
||
| } // namespace SHiP | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ShipSoft/data-model
Length of output: 659
🏁 Script executed:
Repository: ShipSoft/data-model
Length of output: 784
Fix include order in
include/SHiP/RecParticle.hppinclude/SHiP/RecParticle.hpp(line 3) includes<SHiP/SimParticle.hpp>before<array>/<cstdint>, while otherinclude/SHiP/*.hppheaders place standard library includes first (andinclude/SHiP/SimResult.hppplaces"SHiP/..."after<vector>). Reorder to match the established convention to align with the include-order CI/lint expectations.🤖 Prompt for AI Agents