Conversation
…ing Neutron Acestor and DirectParentID related changes
…ainst it for Neutron clustering
LoadWCSim now records WCSimRootTrigger::GetMode() for every trigger in the entry and publishes the result to ANNIEEvent as "WCSimInteractionModes". BackTracker picks that vector up in LoadFromStores and, for each MC PMT hit, maps the hit's direct parent back to its MCTriggerNum to look up the interaction mode of the trigger that produced it. The result is published as "MCHitToInteractionMode" (-999 for hits taken from the pre-clock-tick path, -9999 when the mode cannot be resolved). ANNIEEventTreeMaker exposes this as the trueWCSimMode branch alongside the existing DirectParent hit-level branches, so the true GENIE/WCSim interaction channel behind every hit is available in the ntuple.
Extends BackTracker's hit-level backtracking in three ways and surfaces all of
it through ANNIEEventTreeMaker:
* Dark-noise tagging: a hit whose direct parents are all -1 was treated as
dark noise unconditionally. In older WCSim files (e.g. the AmBe
wcsim_0_999 samples) -1 is a legitimate track ID, so if -1 is present in the
track map the hit is kept as real physics instead of being discarded as
noise.
* Immediate ancestor: for every MC PMT hit the background particle directly
behind the detected photon is resolved and published as
"MCHitToImmediateAncestor" / "MCHitToImmediateAncestorClass". This is what
is needed to separate genuine neutron-capture light from the background
particles landing in the same time window.
* Full lineage: rather than stopping at the immediate ancestor, the parent
links are walked all the way back, and the resulting chain is published as
"MCHitToLineage" and "MCHitToLineageStatus", with the end of the chain in
"MCHitToRootAncestor". This makes it possible to attribute a tank optical
photon to the primary interaction product it ultimately came from.
ANNIEEventTreeMaker gains the matching per-hit branches --
DirectParent_ImmediateAncestor{TrackID,PDG,Class},
DirectParent_RootAncestor{TrackID,PDG} and
DirectParent_Lineage{PDG,TrackID,Depth,Status} -- so the chain is written out
with the rest of the DirectParent hit information.
These tools printed on every event regardless of the configured verbosity, which made long MC productions unreadable and dominated the log files. * BackTracker: gate the FindNeutronAncestors summary print on verbosity > 1. * LoadWCSim: drop the unconditional per-event "Event Number" print and the dump of every saved track ID in trackid_to_mcparticleindex. * PMTWaveformSim: drop the unconditional "finished looping over MCHits" print. * DigitBuilder: an absent MCLAPPDHits store entry is expected when running without LAPPD MC, so log it at v_debug rather than v_error. * MCParticleProperties: track-length and tank entry/exit intercept warnings fire routinely for particles that clip the tank, so log them at v_debug rather than v_error. No behaviour changes -- only logging levels and removed prints.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe your changes
Checklist before submitting your PR
newusage, there is a reason the data must be on the heapnewthere is adelete, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)Additional Material
Attach any validation or demonstration files here. You may also link to relavant docdb articles.
Note:- You can find a presentation describing the changes in docdb. It has minimal changes across multiple tools and details of each changes are written in corresponding commits using AI tool.