Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

[TOC]

Fitter

This project is meant to automate:

  • Building of models
  • Fits to MC
  • Fits to data
  • Creation of validation plots, tables, etc
  • Application of constraints
  • Obtention of fitting information, specially:
    • Mass scales, resolutions
    • Signal yields for resonant and rare modes

And be used as an input for:

  • Systematics evaluation
  • Extraction of $R_K$ and $R_K^*$
  • Calibrations

Ideally with minimal changes for new observables. The class is organized as in the diagram below:

project diagram

This project makes heavy use of caching through the Cache class and thus:

  • It allows for fast reruns
  • It allows for the fitters to also be used to retrieve parameters

Usage

For fits to data do:

fit_rx_data -c rare/electron -q central -C 0.5 -P 0.5

to use the configuration in src/fitter_data/rare/electron/data.yaml with an MVA working point of 0.5 for the combinatorial and part reco BDTs.

This should:

  • Apply the selection on the MC and data
  • Fit the MC
  • Use the MC to create components for the fit to the data
  • Fit the data and save everything

To do the same from a python script do:

from dmu.generic        import utilities  as gut
from rx_selection       import selection  as sel
from fitter.data_fitter import DataFitter

cfg = gut.load_conf(
    package='fitter_data',
    fpath  ='rare/electron/data.yaml')

with sel.custom_selection(d_sel={
        'nobr0' : 'nbrem != 0',
        'bdt'   : 'mva_cmb > 0.60 && mva_prc > 0.40'}):
    ftr = DataFitter(
        sample = 'DATA_24_*',
        trigger= 'Hlt2RD_BuToKpEE_MVA',
        project= 'rx',
        q2bin  = 'central',
        cfg    = cfg)
    obj = ftr.run()

where obj is a DictConf (from the omegaconf project) dictionary where the parameters and errors can be accessed as:

val = obj['name']['value']
err = obj['name']['error']

Metadata

Release files for rx-fitter 1.1.dev350

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rx-fitter 1.1.dev350
File Size Uploaded Provenance Actions
rx_fitter-1.1.dev350.tar.gz 26.5 kB With provenance Details for rx_fitter-1.1.dev350.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rx-fitter 1.1.dev350
File Interpreter ABI Platform Actions
rx_fitter-1.1.dev350-py3-none-any.whl Python 3 none any Details for rx_fitter-1.1.dev350-py3-none-any.whl

Total release size: 68.9 kB

Release files / rx_fitter-1.1.dev350.tar.gz

Download URL rx_fitter-1.1.dev350.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
edd14147c4c0cacec0dbbb8342f9c5e6d790fc1e78abb9d108493dbcb94c046b
BLAKE2b-256 checksum
How to use checksums
24e6baa1cc220926191b77af2209587a008df34fc8d8cbb32bbc1069d0f69b85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2025.

Transparency log

Release files / rx_fitter-1.1.dev350-py3-none-any.whl

Download URL rx_fitter-1.1.dev350-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f3b8a965347283f752de95e3c564e75297273676f77398e750899c4852eccc
BLAKE2b-256 checksum
How to use checksums
69f2dfe488e393ceb7c30e32dc1f09d5f4b4f2e2d32e41868fba3e304ff55b32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2025.

Transparency log

Security for rx-fitter 1.1.dev350

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rx_fitter-1.1.dev350.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page