Skip to content

Modified load_root_file for supporting multiple primary positions in G4#361

Merged
cfuselli merged 9 commits into
mainfrom
fix_xyz_pri
Jan 29, 2026
Merged

Modified load_root_file for supporting multiple primary positions in G4#361
cfuselli merged 9 commits into
mainfrom
fix_xyz_pri

Conversation

@APaloma710

Copy link
Copy Markdown
Contributor

Added code to check whether root files have more than one primary position per G4 event. If that's the case, only the first (x_pri, y_pri, z_pri) set will be used.

@mhliu0001

Copy link
Copy Markdown
Contributor

Hi @APaloma710 , I am wondering what the status is here, since I also need this feature for the AmBe simulation to work. If you do not object, I will fix this PR to make it work.

cfuselli and others added 3 commits January 28, 2026 17:52
* Add elife to cs2 corrections

* Update condition for cs2 and alt_cs2 assignment
* Bump version: 1.6.1 → 1.6.2

* Update HISTORY.md for version 1.6.2

* Update HISTORY.md to remove changelog link

Removed the full changelog link from the HISTORY.md file.
@mhliu0001 mhliu0001 requested a review from cfuselli January 28, 2026 22:54
@mhliu0001 mhliu0001 requested a review from SaelMo January 28, 2026 23:06
@coveralls

coveralls commented Jan 28, 2026

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21458533377

Details

  • 7 of 14 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 72.28%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugins/micro_physics/input.py 7 14 50.0%
Totals Coverage Status
Change from base Build 21403702837: -0.2%
Covered Lines: 2657
Relevant Lines: 3676

💛 - Coveralls

@coveralls

coveralls commented Jan 28, 2026

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21471686129

Details

  • 8 of 15 (53.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 72.384%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugins/micro_physics/input.py 8 15 53.33%
Totals Coverage Status
Change from base Build 21471675705: -0.1%
Covered Lines: 2663
Relevant Lines: 3679

💛 - Coveralls

@cfuselli

Copy link
Copy Markdown
Member

Thanks @APaloma710 and @mhliu0001 !
I will do a quick test with @SaelMo, using and older and new G$ file input, and then we can merge this one.

@cfuselli

Copy link
Copy Markdown
Member

Looks good to me, it works well and raises the warning as expected:

WARNING:ChunkInput:Found 3 events with more than one primary particle. Only the first primary position (x_pri, y_pri, z_pri) will be used.

@cfuselli cfuselli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checked with @SaelMo , all good for us. Thanks!

@cfuselli cfuselli merged commit e98a80e into main Jan 29, 2026
6 checks passed
@cfuselli cfuselli deleted the fix_xyz_pri branch January 29, 2026 09:42
cfuselli added a commit that referenced this pull request Jan 29, 2026
…G4 (#361)

* Modified load_root_file for supporting multiple primary positions in G4 root files.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add elife to cs2 corrections (#368)

* Add elife to cs2 corrections

* Update condition for cs2 and alt_cs2 assignment

* Release 1.6.2 (#369)

* Bump version: 1.6.1 → 1.6.2

* Update HISTORY.md for version 1.6.2

* Update HISTORY.md to remove changelog link

Removed the full changelog link from the HISTORY.md file.

* Fix root input to accept both 1D primary per event and 2D

* bump plugin version

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Saad el Morabit <selmorab@nikhef.nl>
Co-authored-by: Carlo Fuselli <cfuselli@nikhef.nl>
Co-authored-by: Minghao Liu <mhliu0001@sina.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.

5 participants