Skip to content

Bugfix n roo tracker truth variables - #2

Closed
nickwp wants to merge 5 commits into
nickwp:developfrom
mscott201:bugfix_nRooTracker_truthVariables
Closed

Bugfix n roo tracker truth variables#2
nickwp wants to merge 5 commits into
nickwp:developfrom
mscott201:bugfix_nRooTracker_truthVariables

Conversation

@nickwp

@nickwp nickwp commented Jul 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI 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.

Pull request overview

This PR updates RooTracker event handling in WCSimPrimaryGeneratorAction::GeneratePrimaries so neutrino-interaction “truth” information (interaction mode, beam neutrino kinematics, and target nucleon kinematics) is recorded rather than being skipped, while still only simulating the outgoing final-state particles in Geant4.

Changes:

  • Populate the interaction mode from EvtCode for RooTracker events.
  • Record beam (neutrino) kinematics and target nucleon kinematics from the RooTracker particle list instead of skipping those entries.
  • Restrict Geant4 particle-gun generation to outgoing particles only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -646,19 +641,42 @@ void WCSimPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)

dir = dir*(1./momentum);
Comment on lines +667 to +670
particleGun->SetParticleDefinition(particleTable->FindParticle(pdg));
kin_energy = fabs(fTmpRootrackerVtx->StdHepP4[i][3])*GeV - particleGun->GetParticleDefinition()->GetPDGMass();

particleGun->SetParticleEnergy(kin_energy);
@nickwp nickwp closed this Jul 24, 2026
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