Open jdkio opened 1 month ago
I tried some edep sim files that were made using ProcessND.py and they seem to be correct.
root -l /pnfs/dune/persistent/users/kleykamp/nd_production/2024-05-13_lar_only_rhc/edep/RHC/00m/00/antineutrino.0_1715654453.edep.root
EDepSimEvents->Scan("InteractionNumber")
***********************************
* Row * Instance * Interacti *
***********************************
* 0 * 0 * 0 *
* 1 * 0 * 1 *
* 2 * 0 * 2 *
* 3 * 0 * 3 *
* 4 * 0 * 4 *
root -l /pnfs/dune/persistent/users/kleykamp/example_edep_file_with_overlay.root
EDepSimEvents->Scan("InteractionNumber")
***********************************
* Row * Instance * Interacti *
***********************************
* 0 * 0 * 0 *
* 0 * 1 * 1 *
* 0 * 2 * 2 *
* 0 * 3 * 3 *
Note that I've worked out a workaround for TMS
My current hypothesis is that this results from the interaction of:
/edep/db/set/requireEventsWithHits
).Specifically, the writing of the GENIE pass-thru entry previously happened early in the event loop, whereas now it happens near the end (so that the interaction can be omitted from the pass-thru tree if it turned out to be invisible). KinemPassThru::LastEntryNumber
assumes the pass-thru entry has already been written, but now that's not the case. So line 254 should be changed from
return fPersistentTree->GetEntries() - 1;
to
return fPersistentTree->GetEntries();
I looked at an older 2x2 sim file and the first InteractionNumber
was indeed -1, so this is not a new issue, just something we hadn't noticed since we weren't using the InteractionNumber
anywhere. And this only affects files that haven't gone through spill building, since the original edep-sim InteractionNumber
is now thrown away during spill building, as discussed in #54.
I'll test this change to confirm that it fixes the issue.
The interaction numbers start at -1 instead of 0. This is in the file new mircoprod files. Specifically:
/pnfs/dune/persistent/users/abooth/nd-production/MicroProdN1p2/output/run-spill-build/MicroProdN1p2_NDLAr_1E18_RHC.spill.nu/EDEPSIM_SPILLS/0000000/0000100/MicroProdN1p2_NDLAr_1E18_RHC.spill.nu.0000102.EDEPSIM_SPILLS.root
The interaction numbers were fixed in issue #54, but it seems like they're off by one now for some reason. Not sure why.
Actually, this sample is without rock files. So it's not the spill builder. Here's the same file pre-spill builder. Not sure why but it starts at -1