Framework used to handle fits to data and simulation
Project description
[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:
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']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rx_fitter-1.1.dev350.tar.gz.
File metadata
- Download URL: rx_fitter-1.1.dev350.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edd14147c4c0cacec0dbbb8342f9c5e6d790fc1e78abb9d108493dbcb94c046b
|
|
| MD5 |
09c8ff9b11425d6fb28b246939cc9d6a
|
|
| BLAKE2b-256 |
24e6baa1cc220926191b77af2209587a008df34fc8d8cbb32bbc1069d0f69b85
|
Provenance
The following attestation bundles were made for rx_fitter-1.1.dev350.tar.gz:
Publisher:
publish.yaml on RX-Run3/rx-fitter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rx_fitter-1.1.dev350.tar.gz -
Subject digest:
edd14147c4c0cacec0dbbb8342f9c5e6d790fc1e78abb9d108493dbcb94c046b - Sigstore transparency entry: 306553117
- Sigstore integration time:
-
Permalink:
RX-Run3/rx-fitter@70b332df60442f9be500576b2e83c86c2c2a5024 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/RX-Run3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70b332df60442f9be500576b2e83c86c2c2a5024 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rx_fitter-1.1.dev350-py3-none-any.whl.
File metadata
- Download URL: rx_fitter-1.1.dev350-py3-none-any.whl
- Upload date:
- Size: 42.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01f3b8a965347283f752de95e3c564e75297273676f77398e750899c4852eccc
|
|
| MD5 |
f9f4947278c214ed2e4cee61fb90edac
|
|
| BLAKE2b-256 |
69f2dfe488e393ceb7c30e32dc1f09d5f4b4f2e2d32e41868fba3e304ff55b32
|
Provenance
The following attestation bundles were made for rx_fitter-1.1.dev350-py3-none-any.whl:
Publisher:
publish.yaml on RX-Run3/rx-fitter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rx_fitter-1.1.dev350-py3-none-any.whl -
Subject digest:
01f3b8a965347283f752de95e3c564e75297273676f77398e750899c4852eccc - Sigstore transparency entry: 306553148
- Sigstore integration time:
-
Permalink:
RX-Run3/rx-fitter@70b332df60442f9be500576b2e83c86c2c2a5024 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/RX-Run3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@70b332df60442f9be500576b2e83c86c2c2a5024 -
Trigger Event:
push
-
Statement type: