# anujraghav252/h-to-ww-nanoaod-analysis architecture

> Architecture diagram of the GitHub repository anujraghav252/h-to-ww-nanoaod-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anujraghav252/h-to-ww-nanoaod-analysis
- Repository: https://github.com/anujraghav252/h-to-ww-nanoaod-analysis

## Overview

##### Project type and purpose
- This is a scientific data‐analysis pipeline (not a traditional “full‐stack” web app). Its goal is to process CMS NanoAOD Monte Carlo (MC) samples for Higgs → WW studies, produce kinematic distributions, and apply selection strategies via Jupyter notebooks.

##### File structure
- Top‐level folders:
- Datasets/ – raw MC and data text files and JSON certificate
- notebooks/ – Jupyter notebooks implementing selection, plotting, and analysis
- scripts/ – small standalone utilities (e.g., test_uproot.py)
- Rollbacks/, Test/ – archived and test notebooks
- Config files: environment.yml, requirements.txt define dependencies; .gitignore excludes large data.
- No separate “src” folder; logic lives inside notebooks and lightweight Python modules in scripts/.

##### README for additional insights
- Confirms focus on ggH→WW MC analysis using uproot/NanoAOD, with future extension to more discriminants.
- Recommends virtual environment and shows test_uproot.py to verify installation.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Data Layer
    subgraph "Data Layer"
        direction TB
        MC_Samples["MC Samples<br/>Datasets/MC_samples/*.txt"]:::data
        JSON_Cert["JSON Certificate<br/>Auxillary_root_files/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt"]:::data
    end

    %% Environment Boundary
    subgraph "Conda/Venv Environment" 
        direction TB
        %% Compute & Analysis
        subgraph "Compute & Analysis"
            direction TB
            NotebookKernel["Notebook Kernel"]:::compute
            PythonLibs["Libraries:<br/>uproot, pandas,<br/>numpy, dask,<br/>matplotlib"]:::compute
            DaskScheduler["Dask Scheduler (optional)"]:::compute
            TestUproot["test_uproot.py"]:::compute
            %% Notebooks
            H_WW_Dask["H_WW_Dask.ipynb"]:::compute
            GlobalSel["Global_selection.ipynb"]:::compute
            KinPlots["Kinematic_plots.ipynb"]:::compute
            XsecWeights["xsec_weights.ipynb"]:::compute
            UntitledNB["Untitled.ipynb"]:::compute
        end
    end

    %% Outputs
    subgraph "Output & Visualization"
        direction TB
        GenCSV["genweight_results.csv"]:::output
        ScaleCSV["Scale_factors.csv"]:::output
    end

    %% Version Control & CI
    subgraph "Version Control & CI"
        direction TB
        GitIgnore[".gitignore"]:::vc
        ArchivedNB["Rollbacks/H_WW_Dask.ipynb"]:::vc
        TestNB["Test/H_WW_Dask_test.ipynb"]:::vc
    end

    %% Connections
    MC_Samples -->|"reads data"| NotebookKernel
    JSON_Cert -->|"reads JSON cert"| NotebookKernel
    NotebookKernel -->|"loads libraries"| PythonLibs
    NotebookKernel -->|"submits tasks"| DaskScheduler
    DaskScheduler -->|"returns results"| NotebookKernel
    NotebookKernel -->|"generates"| GenCSV
    NotebookKernel -->|"generates"| ScaleCSV
    MC_Samples -->|"verifies access"| TestUproot
    TestUproot -->|"runs in env"| NotebookKernel

    NotebookKernel --> H_WW_Dask
    NotebookKernel --> GlobalSel
    NotebookKernel --> KinPlots
    NotebookKernel --> XsecWeights
    NotebookKernel --> UntitledNB

    %% Click Events
    click MC_Samples "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/Datasets/MC_samples/*.txt"
    click JSON_Cert "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/Auxillary_root_files/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt"
    click NotebookKernel "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/environment.yml"
    click NotebookKernel "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/requirements.txt"
    click H_WW_Dask "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/H_WW_Dask.ipynb"
    click GlobalSel "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/Global_selection.ipynb"
    click KinPlots "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/Kinematic_plots.ipynb"
    click XsecWeights "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/xsec_weights.ipynb"
    click UntitledNB "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/Untitled.ipynb"
    click TestUproot "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/scripts/test_uproot.py"
    click GenCSV "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/genweight_results.csv"
    click ScaleCSV "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/notebooks/Scale_factors.csv"
    click GitIgnore "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/.gitignore"
    click ArchivedNB "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/Rollbacks/H_WW_Dask.ipynb"
    click TestNB "https://github.com/anujraghav252/h-to-ww-nanoaod-analysis/blob/main/Test/H_WW_Dask_test.ipynb"

    %% Styles
    classDef data fill:#bbdefb,stroke:#1e88e5,color:#0d47a1
    classDef compute fill:#c8e6c9,stroke:#43a047,color:#1b5e20
    classDef output fill:#ffe0b2,stroke:#fb8c00,color:#e65100
    classDef vc fill:#eeeeee,stroke:#9e9e9e,color:#424242
```
