How dune/lblpwgtools works
Project type and purpose
• This is an open-source C++ physics‐analysis framework (“CAFAna”) plus a set of command-line tools and scripts used by the DUNE Long Baseline Physics Working Group.
• It provides a core library for histograms, cuts, spectrum loading, oscillation and systematic‐uncertainty handling, plus modules for fitting, prediction, extrapolation, PRISM‐specific analyses, and higher-level executables and scripts that drive end-to-end studies.
File structure
• Top-level:
• CAFAna/ ← main CMake project root, subdivided by functionality
• scripts/ ← Python & shell orchestration scripts
• EventSelectionScripts/, PlotScripts/, probabilities/, fcl/ ← auxiliary code and config
• test/, tute/ ← unit & tutorial examples
• Within CAFAna/: each subdirectory is a self-contained CMake target producing a static/shared library or executable:
• Core/ ← foundational data structures & utilities
• Analysis/ ← plot routines, resolution, exposure calculations
• Cuts/ ← event‐selection definitions
• Experiment/ ← χ² & likelihood experiments
• Extrap/ ← extrapolation interfaces & implementations
• Fit/ ← fit engines (Minuit2, Stan, MCMC)
• Prediction/ ← oscillation, interpolation, scale & extrap predictions
• Systs/ ← systematic‐uncertainty definitions & fake data
• Vars/ ← analysis variable definitions
• Utils/ ← small helpers (e.g. EnumIter)
• PRISM/ ← PRISM‐specific analysis & toolchain
• bin/, cafe/ ← command-line applications linking the above
• cmake/ ← custom find scripts & build templates
README for additional insights
• Describes how to build (“standalone_configure_and_build.sh”) and external dependencies (ROOT w/ minuit2, GSL, CLHEP, Boost, Stan, TBB, sundials, perftools).
Elements
• Core (dark gray)
• Selection (blue), Prediction (green), Fitting (orange), Analysis (purple), Special/PRISM (teal)
• CLI Tools (yellow), Scripts (light gray)
• External Dependencies (side area, red)
• Clear labels: component name, package path, CMake target name.
Detailed capture of essential elements
• Don’t try to show every source file—focus on modules.
• Build pipeline: CMake orchestrates library compilation, then executables are linked, then scripts run executables.
• Where external libraries are linked into each component.