# cmssnu/sknanoanalyzer architecture

> Architecture diagram of the GitHub repository cmssnu/sknanoanalyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cmssnu/sknanoanalyzer
- Repository: https://github.com/cmssnu/sknanoanalyzer

## Overview

SKNanoAnalyzer is a NanoAODv15/RNTuple event-analysis backend plus Python submission and plotting tools. The principal workflow is users selecting an analyzer and samples, submitting jobs, processing RNTuple events through shared views and analysis services, and producing typed datasets and histograms for plotting. The graph also preserves correction and common-analyzer capabilities. Some links reflect README descriptions or SOURCE INDEX references; unsampled implementation details are not inferred as direct calls.

Main entry points: [`python/SKNano.py`](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/SKNano.py) (Job submission), [`AnalyzerFramework/src/AnalyzerCoreObjects.cc`](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreObjects.cc) (Analyzer core), [`DataFormats/include/JetView.h`](https://github.com/cmssnu/sknanoanalyzer/blob/main/DataFormats/include/JetView.h) (Event views), [`AnalyzerFramework/src/AnalyzerCoreOutput.cc`](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreOutput.cc) (Typed output)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_submission["Submission and samples"]
  node_submit["Job submission<br/>[SKNano.py]"]
  node_sample_paths["Sample resolution<br/>[sample_paths.py]"]
  node_job_template["Job configuration<br/>[job_dict.py]"]
end

subgraph group_runtime["Event processing"]
  node_loader["Input loading<br/>[SKNanoLoader.cc]"]
  node_rntuple["RNTuple source<br/>[RNTupleSource.cc]"]
  node_branches["Branch management<br/>[BranchManager.h]"]
  node_column_source["Column access<br/>[ColumnSource.h]"]
  node_views["Event views<br/>[JetView.h]"]
  node_analyzer_core["Analyzer core"]
  node_execution["Execution utilities"]
  node_failure["Failure handling"]
end

subgraph group_physics["Physics services"]
  node_corrections["Corrections"]
  node_systematics["Systematics"]
  node_ml["ML inference<br/>[MLHelper.cc]"]
  node_common["Common analyzers<br/>[ModellingPatch.cc]"]
end

subgraph group_outputs["Outputs and visualization"]
  node_output[("Typed output")]
  node_plot_workflow["Plot workflow<br/>[tasks.py]"]
  node_plot_schema["Plot schema<br/>[schema.py]"]
  node_plot_catalog["Input catalog<br/>[catalog.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"submits jobs"| node_submit
node_submit -->|"resolves samples"| node_sample_paths
node_submit -->|"uses configuration"| node_job_template
node_loader -.->|"reads input"| node_rntuple
node_branches -->|"provides columns"| node_column_source
node_views -->|"accesses columns"| node_column_source
node_analyzer_core -.->|"writes results"| node_output
node_analyzer_core -->|"uses event views"| node_views
node_execution -->|"raises errors"| node_failure
node_plot_workflow -->|"uses schema"| node_plot_schema
node_plot_schema -->|"maps catalog"| node_plot_catalog
node_output -.->|"feeds plotting"| node_plot_workflow

click node_submit "https://github.com/cmssnu/sknanoanalyzer/blob/main/python/SKNano.py"
click node_sample_paths "https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sample_paths.py"
click node_job_template "https://github.com/cmssnu/sknanoanalyzer/blob/main/templates/job_dict.py"
click node_loader "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/SKNanoLoader.cc"
click node_rntuple "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/RNTupleSource.cc"
click node_branches "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/include/AnalyzerFramework/BranchManager.h"
click node_column_source "https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/ColumnSource.h"
click node_views "https://github.com/cmssnu/sknanoanalyzer/blob/main/DataFormats/include/JetView.h"
click node_analyzer_core "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreObjects.cc"
click node_execution "https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/DoubleBufferPipeline.h"
click node_failure "https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/AnalysisException.h"
click node_corrections "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/MyCorrectionLeptons.cc"
click node_systematics "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/SystematicHelper.cc"
click node_ml "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/MLHelper.cc"
click node_common "https://github.com/cmssnu/sknanoanalyzer/blob/main/CommonAnalyzers/src/ModellingPatch.cc"
click node_output "https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreOutput.cc"
click node_plot_workflow "https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/tasks.py"
click node_plot_schema "https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/schema.py"
click node_plot_catalog "https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/catalog.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_submit,node_sample_paths,node_job_template toneBlue
class node_loader,node_rntuple,node_branches,node_column_source,node_views,node_analyzer_core,node_execution,node_failure toneAmber
class node_corrections,node_systematics,node_ml,node_common toneMint
class node_output,node_plot_workflow,node_plot_schema,node_plot_catalog toneRose
class node_analyst toneIndigo
```

## Components

### Submission and samples

- [Job submission](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/SKNano.py): `python/SKNano.py`
- [Sample resolution](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sample_paths.py): `python/sample_paths.py`
- [Job configuration](https://github.com/cmssnu/sknanoanalyzer/blob/main/templates/job_dict.py): `templates/job_dict.py`

### Event processing

- [Input loading](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/SKNanoLoader.cc): `AnalyzerFramework/src/SKNanoLoader.cc`
- [RNTuple source](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/RNTupleSource.cc): `AnalyzerFramework/src/RNTupleSource.cc`
- [Branch management](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/include/AnalyzerFramework/BranchManager.h): `AnalyzerFramework/include/AnalyzerFramework/BranchManager.h`
- [Column access](https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/ColumnSource.h): `SKNanoCore/include/ColumnSource.h`
- [Event views](https://github.com/cmssnu/sknanoanalyzer/blob/main/DataFormats/include/JetView.h): `DataFormats/include/JetView.h`
- [Analyzer core](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreObjects.cc): `AnalyzerFramework/src/AnalyzerCoreObjects.cc`
- [Execution utilities](https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/DoubleBufferPipeline.h): `SKNanoCore/include/DoubleBufferPipeline.h`
- [Failure handling](https://github.com/cmssnu/sknanoanalyzer/blob/main/SKNanoCore/include/AnalysisException.h): `SKNanoCore/include/AnalysisException.h`

### Physics services

- [Corrections](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/MyCorrectionLeptons.cc): `AnalyzerTools/src/MyCorrectionLeptons.cc`
- [Systematics](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/SystematicHelper.cc): `AnalyzerTools/src/SystematicHelper.cc`
- [ML inference](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerTools/src/MLHelper.cc): `AnalyzerTools/src/MLHelper.cc`
- [Common analyzers](https://github.com/cmssnu/sknanoanalyzer/blob/main/CommonAnalyzers/src/ModellingPatch.cc): `CommonAnalyzers/src/ModellingPatch.cc`

### Outputs and visualization

- [Typed output](https://github.com/cmssnu/sknanoanalyzer/blob/main/AnalyzerFramework/src/AnalyzerCoreOutput.cc): `AnalyzerFramework/src/AnalyzerCoreOutput.cc`
- [Plot workflow](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/tasks.py): `python/sknano_plotter/tasks.py`
- [Plot schema](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/schema.py): `python/sknano_plotter/schema.py`
- [Input catalog](https://github.com/cmssnu/sknanoanalyzer/blob/main/python/sknano_plotter/catalog.py): `python/sknano_plotter/catalog.py`

### Other components

- **Analyst**

## Connections

- Analyst → Job submission: submits jobs (evidence: `README.md`)
- Job submission → Sample resolution: resolves samples (evidence: `python/SKNano.py`)
- Job submission → Job configuration: uses configuration (evidence: `python/SKNano.py`)
- Input loading → RNTuple source: reads input (evidence: `README.md`)
- Branch management → Column access: provides columns (evidence: `AnalyzerFramework/include/AnalyzerFramework/BranchManager.h`)
- Event views → Column access: accesses columns
- Analyzer core → Typed output: writes results (evidence: `README.md`)
- Analyzer core → Event views: uses event views (evidence: `AnalyzerFramework/src/AnalyzerCoreObjects.cc`)
- Execution utilities → Failure handling: raises errors (evidence: `SKNanoCore/include/DoubleBufferPipeline.h`)
- Plot workflow → Plot schema: uses schema (evidence: `python/sknano_plotter/tasks.py`)
- Plot schema → Input catalog: maps catalog (evidence: `python/sknano_plotter/schema.py`)
- Typed output → Plot workflow: feeds plotting (evidence: `README.md`)
