Convert SpectrumLoader to be an _ISource to handle new CAF structure - #54
Merged
Conversation
…structure. Initial commit. Gets most things compiling.
…ture of new files
7 tasks
…ectrumLoader. I left some comments of stuff that SBN does that I'm not sure applies here
…ing SpectrumLoader(Base)
…l' into feature/source-sink-overhaul # Conflicts: # CAFAna/Core/SpectrumLoaderBase.cxx
unsure why this needs to be set, but it fixes some ABI mismatch errors
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.
Note: this PR proposes a significant overhaul to CAFAna. It is not backwards-compatible with TDR-era (
duneanaobjv1 or v2) CAFs!The v3
duneanaobjstructure, in which eachStandardRecordcorresponds to the reconstructed information from a single detector trigger, is difficult to handle with the current approach in CAFAna. In particular, users will almost always want to run their primary analysis overSRRecoInteractionobjects, which (with the current tools) require a lot ofMultiVarconstructions and make for difficult use ofCuts.This PR takes advantage of the Source-Sink architecture in CAFAnaCore v2 to solve that problem. We follow work in SBN's implementation of CAFAna where a similar thing is done concretely: SBNSoftware/sbnana#85. Major things that change:
Spectrums become a client ("sink") of values that are generated by "source" objects (likeSpectrumLoader).SRRecoInteractions,SRParticlewith interactions, etc.Spectrums,EnsembleSpectrum. This allows for a natural way of doing xsec type analysis.@mcasales's Doc 31898 explains more of the ramifications in more detail, with examples.
I (@chenel) also made a demonstration toy oscillation analysis to show that the changes proposed in this PR are basically working: Doc 33354
The TDR analysis code has also been eliminated, since it's inextricably bound to the TDR-era CAFs.
There are still a few things left to implement in this updated paradigm:
PredictionInterpneeds a refactor, some of theExtrapandDecompclasses have been removed for the moment, and the connection toNuSystematicsneeds to be rebuilt. Reviving these is part of the ongoing project https://github.com/orgs/DUNE/projects/14. However, the basic machinery is now working, and it's time for it to go mainstream.