Skip to content

Add option in GENIEGenerator to read simulations done with GENIE Geometry Driver#1136

Open
antonioiuliano2 wants to merge 13 commits into
masterfrom
geniegenerator_3
Open

Add option in GENIEGenerator to read simulations done with GENIE Geometry Driver#1136
antonioiuliano2 wants to merge 13 commits into
masterfrom
geniegenerator_3

Conversation

@antonioiuliano2

@antonioiuliano2 antonioiuliano2 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Dear all,
This pull request is part of the GENIE generation update discussed in #984 .

It adds to GenieGenerator the option to simply read the GST TTree with the simulation produced with the GENIE Geometry Driver, and I copied the relevant lines from the SNDSW version:
https://github.com/SND-LHC/sndsw/blob/master/shipgen/GenieGenerator.cxx
To avoid mistakes, I kept the same numbering option scheme, so this would be option 3 (to be called with Genie --GenieOption 4), even if we do not have options 1 (FLUKA input tree) and 2 (Genie input tree).

Other pull requests in the pipeline (they can be processed in parallel, since they affect indepedent files):

Please let me know if you have any advice or suggestion.
Antonio

Checklist

Summary by CodeRabbit

  • New Features
    • Added a GenieOption CLI to switch between standard event generation and GENIE geometry driver-based reading.
    • Event handling adapts to the selected mode (including how vertex positions and outgoing tracks are produced).
  • Bug Fixes
    • Added validation for the selected generation option to prevent unsupported modes.
  • Documentation
    • Updated the changelog with the new GenieOption entry.

@antonioiuliano2 antonioiuliano2 requested a review from a team as a code owner April 1, 2026 09:55
@antonioiuliano2 antonioiuliano2 requested a review from olantwin April 1, 2026 09:55
matclim
matclim previously approved these changes Apr 1, 2026

@olantwin olantwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the addition to the comments I sent you privately.

The legal issue is a blocker.

Comment thread macro/run_simScript.py Outdated
Comment thread shipgen/GenieGenerator.cxx
@olantwin

olantwin commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 25b36822-8173-4b55-8dde-5ee47cf92f35

📥 Commits

Reviewing files that changed from the base of the PR and between 6277e0f and 6ad79d5.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • macro/run_simScript.py
  • shipgen/GenieGenerator.cxx
  • shipgen/GenieGenerator.h
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • macro/run_simScript.py
  • shipgen/GenieGenerator.h
  • shipgen/GenieGenerator.cxx

📝 Walkthrough

Walkthrough

Adds a Genie generation-mode selector and plumbing to read events either via the existing histogram/material-budget path or directly from a GENIE Geometry Driver TTree; the option is stored on GenieGenerator, validated in Init(), and selects the ReadEvent path.

Changes

Genie generation mode + geometry-driver read path

Layer / File(s) Summary
Mode state and public API
shipgen/GenieGenerator.h
Adds Int_t fGenOption = 0, inline SetGenerationOption(Int_t) setter, and declares ReadEventGeometryDriver(FairPrimaryGenerator*).
CLI wiring and mode selection
macro/run_simScript.py
Adds --GenieOption CLI arg (simple_gevgen | genie_geometry, default simple_gevgen), maps choice to integer, calls Geniegen.SetGenerationOption(...), and makes Geniegen.SetPositions(...) conditional (only for mapped 0).
Init mode validation
shipgen/GenieGenerator.cxx
Init() validates fGenOption, allowing only 0 and 3; other values log fatal and return kFALSE.
Geometry-driver event reader
shipgen/GenieGenerator.cxx
Adds ReadEventGeometryDriver(FairPrimaryGenerator*) which calls fTree->GetEntry(fn), returns kFALSE on EOF, increments fn, scales vertex coords by meter = 100, and creates neutrino/lepton/hadron tracks from GENIE branches (outgoing lepton added when `(cc
ReadEvent mode dispatch
shipgen/GenieGenerator.cxx
ReadEvent(FairPrimaryGenerator*) now dispatches on fGenOption: 3ReadEventGeometryDriver, 0 → existing histogram/material-budget generation and track creation, otherwise returns kFALSE.
Changelog documentation
CHANGELOG.md
Adds Unreleased → Added entry documenting GenieOption to read simulations using the GENIE Geometry Driver (e.g., gevgen_fnal).

Sequence Diagram(s)

sequenceDiagram
    participant CLI as run_simScript CLI
    participant Generator as GenieGenerator
    participant GENIE as GENIE TTree
    participant Fair as FairPrimaryGenerator

    CLI->>Generator: SetGenerationOption(option)
    CLI->>Generator: (conditionally) SetPositions(...)
    Generator->>Generator: Init() validates fGenOption
    alt fGenOption == 3 (genie_geometry)
        Generator->>GENIE: GetEntry(fn)
        GENIE-->>Generator: entry fields (vtx*, pdgf, momentum, ...)
        Generator->>Fair: Add neutrino/lepton/hadron tracks (scaled vtx)
    else fGenOption == 0 (simple_gevgen)
        Generator->>Generator: compute interaction pos via hist/material budget
        Generator->>Fair: Add tracks using computed pos and generated momenta
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • olantwin
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description provides context about the feature and references issue #984, but the checklist shows the changelog was not actually updated despite being marked as 'applicable'. Update the CHANGELOG.md file (which appears to have been done based on raw_summary) and mark the checkbox, or clarify the changelog status in the PR description.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding an option to GENIEGenerator to read simulations from the GENIE Geometry Driver.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch geniegenerator_3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
shipgen/GenieGenerator.cxx (2)

288-288: Simplify boolean expression.

The ternary (cc || nuel) ? true : false is redundant and can be simplified to just cc || nuel.

♻️ Proposed fix
-    bool track_outgoing_lepton = (cc || nuel) ? true : false;
+    bool track_outgoing_lepton = cc || nuel;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shipgen/GenieGenerator.cxx` at line 288, The assignment to
track_outgoing_lepton uses a redundant ternary; replace "bool
track_outgoing_lepton = (cc || nuel) ? true : false;" with a direct boolean
expression using cc || nuel (i.e., "bool track_outgoing_lepton = cc || nuel;")
so the variable is set without the unnecessary conditional. Ensure you update
the initialization in GenieGenerator.cxx where track_outgoing_lepton is defined
and leave cc and nuel usage unchanged.

71-75: Use lowercase FairLogger severity.

LOG(FATAL) uses deprecated uppercase severity. The codebase has been migrating to lowercase severities as noted in the changelog.

♻️ Proposed fix
   if (fGenOption != 0 && fGenOption != 3) {
-    LOG(FATAL) << "Invalid GenieGen Option: " << fGenOption
+    LOG(fatal) << "Invalid GenieGen Option: " << fGenOption
                << " Please check the option provided with --Genie " << endl;
     return kFALSE;
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shipgen/GenieGenerator.cxx` around lines 71 - 75, Replace the deprecated
uppercase FairLogger severity used in the GenieGenerator check: change the
LOG(FATAL) invocation that references fGenOption to the lowercase form
LOG(fatal) while keeping the same message and return behavior; also scan the
same file for any other LOG(FATAL) occurrences and update them to LOG(fatal) to
match the codebase convention.
macro/run_simScript.py (1)

79-85: Restrict valid choices to prevent invalid options.

The current implementation allows users to pass values 2 or 3, which would result in a fatal error in GenieGenerator::Init() since only fGenOption values of 0 and 3 are valid. This matches the past review comment about the -1 offset.

Consider adding choices=[1, 4] to argparse to fail fast with a clear error message.

♻️ Proposed fix
 genie_parser.add_argument(
     "--GenieOption",
     dest="GenieOption",
     default=1,
     type=int,
+    choices=[1, 4],
     help="Genie generation option: (1 standard, 4 GENIE geometry driver)",
 )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@macro/run_simScript.py` around lines 79 - 85, The --GenieOption argument
currently defined via genie_parser.add_argument (dest="GenieOption", default=1,
type=int) allows invalid values (2 or 3) that later cause a fatal error in
GenieGenerator::Init due to the expected fGenOption mappings; update the
add_argument call for "--GenieOption" to enforce valid inputs by adding
choices=[1,4] (and optionally update the help string) so argparse fails fast
with a clear message when users provide unsupported options.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@macro/run_simScript.py`:
- Around line 79-85: The --GenieOption argument currently defined via
genie_parser.add_argument (dest="GenieOption", default=1, type=int) allows
invalid values (2 or 3) that later cause a fatal error in GenieGenerator::Init
due to the expected fGenOption mappings; update the add_argument call for
"--GenieOption" to enforce valid inputs by adding choices=[1,4] (and optionally
update the help string) so argparse fails fast with a clear message when users
provide unsupported options.

In `@shipgen/GenieGenerator.cxx`:
- Line 288: The assignment to track_outgoing_lepton uses a redundant ternary;
replace "bool track_outgoing_lepton = (cc || nuel) ? true : false;" with a
direct boolean expression using cc || nuel (i.e., "bool track_outgoing_lepton =
cc || nuel;") so the variable is set without the unnecessary conditional. Ensure
you update the initialization in GenieGenerator.cxx where track_outgoing_lepton
is defined and leave cc and nuel usage unchanged.
- Around line 71-75: Replace the deprecated uppercase FairLogger severity used
in the GenieGenerator check: change the LOG(FATAL) invocation that references
fGenOption to the lowercase form LOG(fatal) while keeping the same message and
return behavior; also scan the same file for any other LOG(FATAL) occurrences
and update them to LOG(fatal) to match the codebase convention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ed5aee61-8f4f-4e91-a6a6-6ca558fc77fe

📥 Commits

Reviewing files that changed from the base of the PR and between a886218 and c8f45ba.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • macro/run_simScript.py
  • shipgen/GenieGenerator.cxx
  • shipgen/GenieGenerator.h

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
shipgen/GenieGenerator.cxx (2)

500-502: 💤 Low value

Unreachable else, given Init validates fGenOption.

If Init already rejects any value other than 0 or 3 (and the validation is moved to the top of Init per the earlier comment), this else return kFALSE; becomes unreachable in practice. It is fine to keep as a defensive guard, but consider either an explicit LOG(fatal)/assert here or a comment noting that Init is the single source of truth for valid options. Also, for consistency with the rest of the file, prefer braces around the else branch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shipgen/GenieGenerator.cxx` around lines 500 - 502, The trailing "else return
kFALSE;" after the branch should be made explicit or documented: replace the
unreachable lone-else with either a guarded fatal/assert (e.g., LOG(fatal) or
assert) referencing fGenOption and Init as the single source of truth, or at
minimum add braces and a clarifying comment stating that Init validates
fGenOption (valid values 0 or 3) and this else is only a defensive guard; update
the block containing "else return kFALSE;" to use braces and refer to
Init/fGenOption to make intent clear.

260-299: 💤 Low value

Minor cleanups in ReadEventGeometryDriver.

A few small improvements:

  1. Duplicated meter constant. It is declared here (line 262) and again in ReadEvent (line 303). Promote it to a file-level constexpr (or a class-level static member) to keep the conversion factor in one place.
  2. Redundant ternary on line 288. (cc || nuel) ? true : false is equivalent to cc || nuel.
  3. fTree->GetEntry(fn) == 0 only checks EOF. GetEntry returns -1 on I/O error, which would silently fall through here. Consider <= 0 if you also want to bail on errors.
  4. Behavior difference to flag. OldReadEvent rewinds at end-of-file (fn % fNevents); this method instead returns kFALSE. That looks intentional for the geometry driver path (each entry corresponds to a specific sampled vertex), but worth a one-line comment so future maintainers do not "fix" it.
♻️ Proposed cleanups
-Bool_t GenieGenerator::ReadEventGeometryDriver(FairPrimaryGenerator* cpg) {
-  // Use GENIE geometry driver.
-  const Int_t meter = 100;  // m to cm conversion factor, as in shipunit.py
-  // Get event from GENIE TTree. If we reach the end of the file, return
-  // false.
-  if (fTree->GetEntry(fn) == 0) return kFALSE;
+Bool_t GenieGenerator::ReadEventGeometryDriver(FairPrimaryGenerator* cpg) {
+  // Use GENIE geometry driver. No wrap-around: each entry corresponds to a
+  // specific vertex sampled by GENIE's geometry driver.
+  if (fTree->GetEntry(fn) <= 0) return kFALSE;
@@
-    bool track_outgoing_lepton = (cc || nuel) ? true : false;
+    bool track_outgoing_lepton = cc || nuel;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shipgen/GenieGenerator.cxx` around lines 260 - 299, ReadEventGeometryDriver
currently declares a local "meter" const (duplicate of ReadEvent), uses a
redundant ternary "(cc || nuel) ? true : false", checks fTree->GetEntry(fn) with
"== 0" (missing I/O error case), and lacks a comment about differing EOF
behavior vs OldReadEvent; fix by promoting the meter constant to a shared
file-level constexpr or a class static used by both ReadEventGeometryDriver and
ReadEvent, change the GetEntry check to "<= 0" where fTree->GetEntry(fn) is
evaluated in GenieGenerator::ReadEventGeometryDriver, replace the ternary
expression with the direct boolean "cc || nuel" when setting
track_outgoing_lepton, and add a one-line comment in ReadEventGeometryDriver
explaining that returning kFALSE at EOF is intentional and differs from
OldReadEvent's rewind behavior.
macro/run_simScript.py (1)

572-573: 💤 Low value

Minor: prefer comparing on the symbolic option name.

The conditional re-looks-up the dict only to compare against 0. Comparing on options.GenieOption directly is shorter and reads closer to intent.

♻️ Suggested tweak
-    if GenieOptions[options.GenieOption] == 0:
+    if options.GenieOption == "simple_gevgen":
         Geniegen.SetPositions(ship_geo.target.z0, options.z_start_nu, options.z_end_nu)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@macro/run_simScript.py` around lines 572 - 573, Replace the dict value lookup
comparison with a direct comparison on the symbolic option name: instead of "if
GenieOptions[options.GenieOption] == 0:" change to "if options.GenieOption ==
<SYMBOLIC_NAME_FOR_ZERO>:" (use the actual symbolic key/enum name that
represents the zero/disabled value in GenieOptions). Keep the body calling
Geniegen.SetPositions(ship_geo.target.z0, options.z_start_nu, options.z_end_nu)
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@macro/run_simScript.py`:
- Around line 569-574: The Genie geometry-driver path never sets the NuOnly flag
so nuradiography runs can't use the geometry driver; update the Genie subcommand
wiring so that when the geometry-driver option is selected (GenieOptions +
Geniegen.SetGenerationOption(...)) and nuradiography is requested, you call
Geniegen.NuOnly(true) (or equivalent) on the same Geniegen instance before
Geniegen.Init/primGen.AddGenerator, and ensure the --NuRadio path does not
construct a separate GenieGenerator with fGenOption left at 0 (instead reuse the
Genie subcommand's Geniegen or set its generation option to the geometry driver
and call NuOnly as above); adjust option parsing to allow combining --NuRadio
with the "genie_geometry" choice or add an explicit --NuOnly flag and propagate
it to Geniegen.NuOnly().

In `@shipgen/GenieGenerator.cxx`:
- Line 303: The local constant meter declared in ReadEvent is unused and
triggers -Wunused-variable; remove the declaration from ReadEvent and, if a
shared conversion is desired, introduce a single shared constant (e.g., a static
constexpr double kMeter = 100) at file or class scope where both ReadEvent and
ReadEventGeometryDriver can reference it; update ReadEventGeometryDriver to use
that shared constant instead of its own local meter if you choose to hoist.
- Around line 68-75: Move the fGenOption validation to the very start of Init
(before TFile::Open and any SetBranchAddress calls) to avoid wasted setup and
leaks; replace LOG(FATAL) with LOG(fatal) to match FairLogger severity names,
remove the redundant << endl, and drop the unreachable return kFALSE (or convert
the logger call to non-fatal if you want to return instead); update the check at
the top that references fGenOption and ensure any early-exit path properly
closes or avoids opening files/branches.

---

Nitpick comments:
In `@macro/run_simScript.py`:
- Around line 572-573: Replace the dict value lookup comparison with a direct
comparison on the symbolic option name: instead of "if
GenieOptions[options.GenieOption] == 0:" change to "if options.GenieOption ==
<SYMBOLIC_NAME_FOR_ZERO>:" (use the actual symbolic key/enum name that
represents the zero/disabled value in GenieOptions). Keep the body calling
Geniegen.SetPositions(ship_geo.target.z0, options.z_start_nu, options.z_end_nu)
unchanged.

In `@shipgen/GenieGenerator.cxx`:
- Around line 500-502: The trailing "else return kFALSE;" after the branch
should be made explicit or documented: replace the unreachable lone-else with
either a guarded fatal/assert (e.g., LOG(fatal) or assert) referencing
fGenOption and Init as the single source of truth, or at minimum add braces and
a clarifying comment stating that Init validates fGenOption (valid values 0 or
3) and this else is only a defensive guard; update the block containing "else
return kFALSE;" to use braces and refer to Init/fGenOption to make intent clear.
- Around line 260-299: ReadEventGeometryDriver currently declares a local
"meter" const (duplicate of ReadEvent), uses a redundant ternary "(cc || nuel) ?
true : false", checks fTree->GetEntry(fn) with "== 0" (missing I/O error case),
and lacks a comment about differing EOF behavior vs OldReadEvent; fix by
promoting the meter constant to a shared file-level constexpr or a class static
used by both ReadEventGeometryDriver and ReadEvent, change the GetEntry check to
"<= 0" where fTree->GetEntry(fn) is evaluated in
GenieGenerator::ReadEventGeometryDriver, replace the ternary expression with the
direct boolean "cc || nuel" when setting track_outgoing_lepton, and add a
one-line comment in ReadEventGeometryDriver explaining that returning kFALSE at
EOF is intentional and differs from OldReadEvent's rewind behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 835fbeb5-a332-4e3c-93e0-5538bb28d0f6

📥 Commits

Reviewing files that changed from the base of the PR and between c8f45ba and 1e74a91.

📒 Files selected for processing (3)
  • macro/run_simScript.py
  • shipgen/GenieGenerator.cxx
  • shipgen/GenieGenerator.h

Comment thread macro/run_simScript.py
Comment thread shipgen/GenieGenerator.cxx Outdated
Comment thread shipgen/GenieGenerator.cxx Outdated
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

CI Plots

View all plots

fixed-target

pixi

PlaneHA20011 PlaneHA21011 PlaneHA22011 PlaneHA10011 PlaneHA11011 PlaneHA12011 PlaneHA20012 PlaneHA21012 PlaneHA22012 PlaneHA10012 PlaneHA11012 PlaneHA12012 PlaneHA20013 PlaneHA21013 PlaneHA22013 PlaneHA10013 PlaneHA11013 PlaneHA12013 PlaneHA20014 PlaneHA21014 PlaneHA22014 PlaneHA10014 PlaneHA11014 PlaneHA12014 PlaneHA20015 PlaneHA21015 PlaneHA22015 PlaneHA10015 PlaneHA11015 PlaneHA12015 PlaneHA20016 PlaneHA21016 PlaneHA22016 PlaneHA10016 PlaneHA11016 PlaneHA12016 PlaneHA20017 PlaneHA21017 PlaneHA22017 PlaneHA10017 PlaneHA11017 PlaneHA12017 PlaneHA10022 PlaneHA11022 PlaneHA12022 PlaneHA10111 PlaneHA11111 PlaneHA12111 PlaneHA10221 PlaneHA11221 PlaneHA12221 PlaneHA10223 PlaneHA11223 PlaneHA12223 PlaneHA10331 PlaneHA11331 PlaneHA12331

sim-chain

helium-all-TRY_2025

distu distv disty nmeas chi2 delPOverP pullPOverPx pullPOverPy pullPOverPz delPOverP2 delPOverPz delPOverP2z chi2 prob IP Vzresol Vxresol Vyresol Vzpull Vxpull Vypull Doca IP0 HNL IP0_pi0 HNL_pi0 HNLw meas meas2 measVSchi2 distu distv disty meanhits extrapTimeDetX extrapTimeDetY oa nrtracks nrSBT pi0Mass delPOverPz_py delPOverP2z_py pullPOverPx_py pullPOverPy_py pullPOverPz_py

vacuums-all-TRY_2025

distu distv disty nmeas chi2 delPOverP pullPOverPx pullPOverPy pullPOverPz delPOverP2 delPOverPz delPOverP2z chi2 prob IP Vzresol Vxresol Vyresol Vzpull Vxpull Vypull Doca IP0 HNL IP0_pi0 HNL_pi0 HNLw meas meas2 measVSchi2 distu distv disty meanhits extrapTimeDetX extrapTimeDetY oa nrtracks nrSBT pi0Mass delPOverPz_py delPOverP2z_py pullPOverPx_py pullPOverPy_py pullPOverPz_py

tracking-benchmark

pixi

h_dp_over_p h_dp_vs_p h_dx h_dy h_dtx h_dty h_hit_residual h_hit_pull h_chi2ndf h_p_truth h_p_matched

@antonioiuliano2

Copy link
Copy Markdown
Contributor Author

End of File Handling:

  • simple_gevgen option: number of FairShip events can be larger than available GENIE events. The same neutrino vertex will be re-used, with a different randomly generated position in the geometry;
  • genie_geometry option: number of FairSHiP events cannot be larger than available GENIE events. The re-used events would be identical for Geant4, so no advantage in allowing for event duplication.

I am now moving in implementing the coderabbit review comments.

@antonioiuliano2

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@antonioiuliano2

Copy link
Copy Markdown
Contributor Author

An addendum note:

Before run_simScript.py, gevgen_fnal needs to be launched with an input flux ntuple (i.e. a gsimple root file).
If you run gevgen_fnal with the old 1D flux histogram, you will not get any pxv or pyv component.

@olantwin

Copy link
Copy Markdown
Contributor

@antonioiuliano2 Please rebase.

@antonioiuliano2

Copy link
Copy Markdown
Contributor Author

Done! Since rebase requires then a git push force, for safety I write here that
git difftool origin/geniegenerator_3 shipgen/GenieGenerator.cxx
now adds the Counters from the recent commit: 005299c

@olantwin

Copy link
Copy Markdown
Contributor

@antonioiuliano2, could you fix the merge conflicts?

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.

3 participants