Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Meson Structure Analysis

## Λ-reconstruction and Kaon Structure Function Studies

The branch ***analysis/multi-calo-lambda*** of the **meson-structure** repository provides a lightweight and user-friendly Python framework to:
The folder ***analysis/multi-calo-lambda*** of the **meson-structure** repository provides a lightweight and user-friendly Python framework to:

- Read reconstructed Λ candidates from EICrecon outputs,
- Compare reconstructed vs Geant4 and afterburner angles and spectra,
- Produce kinematic maps,
- Produce kinematic maps (trhuth, electron method, JB method),
- Propagate statistical uncertainties to the kaon structure function*.

\* The error propagation is based on the assumption that the kaon structure function is proportional to the number of $\Lambda^0$ hyperons produced by the Sullivan process, $F_k\propto N_\Lambda$. This number is related to the reconstruction efficiency $\varepsilon$, the cross-section $\sigma$, and the EIC luminosity $L$, as $N_\Lambda=\varepsilon\times \sigma \times L $. Assuming Poisson statistics, the relative error is estimated as
Expand Down Expand Up @@ -82,7 +82,6 @@ Examples:

### TO DO LIST

- [physics] Include the experimental kinematics reconstruction (e-, JB) from EICrecon.
- [physics] Attach the uncertainties to Kaon SF models to see if discriminating.
- [physics] Include other sources of error than purely statistical ones (e.g. $\Delta\sigma$ from event generator)
- [ESR] Include Zenobo figures plot format (https://zenodo.org/records/16615455)
- [physics] Event generator sensitivity studies
- [physics] Background contamination studies
- [ESR] Include Zenodo figures plot format (https://zenodo.org/records/16615455)
52 changes: 49 additions & 3 deletions analysis/multicalo-lambda/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from __future__ import annotations

import os
from dataclasses import dataclass
from pathlib import Path
from typing import Sequence
import math

# =============================================================================
# Paths
# =============================================================================

@dataclass(frozen=True)
class Paths:
Expand All @@ -13,8 +19,14 @@ class Paths:
"/work/eic3/users/romanov/meson-structure-2026-02/afterburner/{beam}-priority/"
"k_lambda_{beam}_5000evt_{idx:04d}.afterburner.hepmc"
)
gen_base_dir: Path = Path("/work/eic3/users/romanov/meson-structure-2026-02/eg-orig-kaon-lambda/")
gen_base_dir: Path = Path("/work/eic3/users/romanov/eg-orig-kaon-lambda-2025-08/")

PATHS = Paths()
PATHS.outputs.mkdir(parents=True, exist_ok=True)

# =============================================================================
# Physics constants (global run settings)
# =============================================================================

@dataclass(frozen=True)
class PhysicsConstants:
Expand All @@ -27,6 +39,40 @@ class PhysicsConstants:
theta_proton_rad: float = 25e-3
mp_gev: float = 0.9382720813

CONST = PhysicsConstants()

# =============================================================================
# LHAPDF setup
# =============================================================================

DEFAULT_LHAPDF_DATA_PATH = "/work/eic3/users/fraisse/lhapdf"

def setup_lhapdf_env() -> str:
"""
Ensure LHAPDF_DATA_PATH is set before importing python lhapdf.
Returns the resolved LHAPDF path.
"""
lhapdf_path = os.environ.get("LHAPDF_DATA_PATH", DEFAULT_LHAPDF_DATA_PATH)
os.environ["LHAPDF_DATA_PATH"] = lhapdf_path
return lhapdf_path

PION_PDFSET_DEFAULT = "JAM21PionPDFnlo"
PION_PDFMEMBER_DEFAULT = 0

def get_pion_pdfset() -> str:
return os.environ.get("PION_PDFSET", PION_PDFSET_DEFAULT)

def get_pion_pdfmember() -> int:
return int(os.environ.get("PION_PDFMEMBER", str(PION_PDFMEMBER_DEFAULT)))

# =============================================================================
# Default grid settings for structure function evaluation
# =============================================================================

GRID_DEFAULTS = dict(
x_min=0.0, x_max=1.0,
q2_min=1.0, q2_max=500.0,
nx=20, nq2=20,
)


DEFAULT_PATHS = Paths()
DEFAULT_CONST = PhysicsConstants()
Loading