# Fast Vertexing Variables at LHCb - Inference Library
Full documentation is avalibale [**here**](https://fastvertexing.docs.cern.ch/index.html
).
## Description
This tool provides a quick approximation of the LHCb reconstruction process. Built on top of [**RapidSim**](https://github.com/gcowan/RapidSim), the `run` function automatically communicates with RapidSim to generate kinematic information which is then smeared before predictions of high-level vertexing variables are generated.
The software utilizes **Variational Autoencoders** (VAEs) to estimate these variables. These VAEs are trained on output from the LHCb simulation software.
Generated tuples can be integrated with other tools such as [**TriggerCalib**](https://pypi.org/project/triggercalib/) and [**PIDCalib2**](https://pypi.org/project/pidcalib2/), completing the full chain of estimation of reconstruction efficiencies and mass shapes for background studies at LHCb.
### Disclaimer
This tool is not designed to replace the full simulation software. It is designed to quickly return reasonable estimates of mass shapes and efficiencies.
## Environment Setup
RaidSim is required to use the full functionalty of this library. The environment variables $RAPIDSIM_ROOT and $EVTGEN_ROOT that are used by the code to access the install.
- `RAPIDSIM_ROOT`: The root directory for RapidSim.
- `EVTGEN_ROOT` (optional): The root directory for EVTGEN, if applicable.
## Example Usage
### `run()`
The `run()` function is the primary method to execute FastVertexing. It handles several key operations in the vertexing and event simulation process:
```python
from fast_vertex_quality_inference import run
run(
events=1000,
decay="B+ -> { D0b -> K+ e- anti-nue } pi+",
naming_scheme="B_plus -> { NA -> K_plus e_minus NA } e_plus",
decay_models="PHSP -> { ISGW2 -> PHSP PHSP PHSP } PHSP",
mass_hypotheses={"e_plus": "e+"},
intermediate_particle={"Jpsi": ["e_minus", "e_plus"]},
)
```
### `run_from_tuple()`
The `run_from_tuple()` function only executes the vertexing network on an existing tuple and can be used without a RapidSim installation.
```python
from fast_vertex_quality_inference import run_from_tuple
run_from_tuple(
file="decay_tree.root",
mother_particle="MOTHER",
daughter_particles=["DAUGHTER1", "DAUGHTER2", "DAUGHTER3"],
fully_reco=False,
nPositive_missing_particles=0,
nNegative_missing_particles=0,
mass_hypotheses={"DAUGHTER2": "e+"},
intermediate_particle={"INTERMEDIATE": ["DAUGHTER2", "DAUGHTER3"]},
branch_naming_structure={"true_momenta_component": "{particle}_TRUE_P{dim}"},
)
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.cern.ch/amarshal/fast_vertexing_variables/-/tree/master/inference",
"name": "fast-vertex-quality-inference",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "inference, vertex-quality, fast-generation",
"author": "Alex Marshall",
"author_email": "alex.marshall@bristol.ac.uk",
"download_url": "https://files.pythonhosted.org/packages/84/ec/19880abaef25737f72c1732edd8eec28cd1d7d7936a2e228c45e56c16717/fast_vertex_quality_inference-1.0.14.tar.gz",
"platform": null,
"description": "# Fast Vertexing Variables at LHCb - Inference Library\n\nFull documentation is avalibale [**here**](https://fastvertexing.docs.cern.ch/index.html\n).\n\n## Description\n\nThis tool provides a quick approximation of the LHCb reconstruction process. Built on top of [**RapidSim**](https://github.com/gcowan/RapidSim), the `run` function automatically communicates with RapidSim to generate kinematic information which is then smeared before predictions of high-level vertexing variables are generated.\n\nThe software utilizes **Variational Autoencoders** (VAEs) to estimate these variables. These VAEs are trained on output from the LHCb simulation software.\n\nGenerated tuples can be integrated with other tools such as [**TriggerCalib**](https://pypi.org/project/triggercalib/) and [**PIDCalib2**](https://pypi.org/project/pidcalib2/), completing the full chain of estimation of reconstruction efficiencies and mass shapes for background studies at LHCb.\n\n### Disclaimer\n\nThis tool is not designed to replace the full simulation software. It is designed to quickly return reasonable estimates of mass shapes and efficiencies. \n\n## Environment Setup\n\nRaidSim is required to use the full functionalty of this library. The environment variables $RAPIDSIM_ROOT and $EVTGEN_ROOT that are used by the code to access the install. \n\n- `RAPIDSIM_ROOT`: The root directory for RapidSim.\n- `EVTGEN_ROOT` (optional): The root directory for EVTGEN, if applicable.\n\n## Example Usage\n\n### `run()`\n\nThe `run()` function is the primary method to execute FastVertexing. It handles several key operations in the vertexing and event simulation process:\n\n```python\nfrom fast_vertex_quality_inference import run\n\nrun(\n events=1000,\n decay=\"B+ -> { D0b -> K+ e- anti-nue } pi+\",\n naming_scheme=\"B_plus -> { NA -> K_plus e_minus NA } e_plus\",\n decay_models=\"PHSP -> { ISGW2 -> PHSP PHSP PHSP } PHSP\",\n mass_hypotheses={\"e_plus\": \"e+\"},\n intermediate_particle={\"Jpsi\": [\"e_minus\", \"e_plus\"]},\n)\n```\n\n### `run_from_tuple()`\n\nThe `run_from_tuple()` function only executes the vertexing network on an existing tuple and can be used without a RapidSim installation.\n\n```python\n\nfrom fast_vertex_quality_inference import run_from_tuple\n\nrun_from_tuple(\n file=\"decay_tree.root\",\n mother_particle=\"MOTHER\",\n daughter_particles=[\"DAUGHTER1\", \"DAUGHTER2\", \"DAUGHTER3\"],\n fully_reco=False,\n nPositive_missing_particles=0,\n nNegative_missing_particles=0,\n mass_hypotheses={\"DAUGHTER2\": \"e+\"},\n intermediate_particle={\"INTERMEDIATE\": [\"DAUGHTER2\", \"DAUGHTER3\"]},\n branch_naming_structure={\"true_momenta_component\": \"{particle}_TRUE_P{dim}\"},\n)\n```\n\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Inference code for fast generation of vertex quality variables",
"version": "1.0.14",
"project_urls": {
"Homepage": "https://gitlab.cern.ch/amarshal/fast_vertexing_variables/-/tree/master/inference"
},
"split_keywords": [
"inference",
" vertex-quality",
" fast-generation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "024f44da99aeb8df49d5eec0a9248922e7bc9b8509673179549f90f047fbe9cc",
"md5": "5052e4cefaf3a7439e4b140a107ef5fa",
"sha256": "d2893b1b014bf4264db2e264dbf319c3e151a0cc37086b0f0ecfc632aa9f831c"
},
"downloads": -1,
"filename": "fast_vertex_quality_inference-1.0.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5052e4cefaf3a7439e4b140a107ef5fa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 40968437,
"upload_time": "2024-11-11T11:31:45",
"upload_time_iso_8601": "2024-11-11T11:31:45.877703Z",
"url": "https://files.pythonhosted.org/packages/02/4f/44da99aeb8df49d5eec0a9248922e7bc9b8509673179549f90f047fbe9cc/fast_vertex_quality_inference-1.0.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "84ec19880abaef25737f72c1732edd8eec28cd1d7d7936a2e228c45e56c16717",
"md5": "079457d983d90fad876e4e9ac8dffb5b",
"sha256": "ef0b793f510580c933561bdef094c2aa2f42763dae3c6a939694d5aafe47b81c"
},
"downloads": -1,
"filename": "fast_vertex_quality_inference-1.0.14.tar.gz",
"has_sig": false,
"md5_digest": "079457d983d90fad876e4e9ac8dffb5b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 40979479,
"upload_time": "2024-11-11T11:31:53",
"upload_time_iso_8601": "2024-11-11T11:31:53.432049Z",
"url": "https://files.pythonhosted.org/packages/84/ec/19880abaef25737f72c1732edd8eec28cd1d7d7936a2e228c45e56c16717/fast_vertex_quality_inference-1.0.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 11:31:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "fast-vertex-quality-inference"
}