https://github.com/mmikhasenko/scifianalysistools.jl
https://github.com/mmikhasenko/scifianalysistools.jl
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mmikhasenko/scifianalysistools.jl
- Owner: mmikhasenko
- License: mit
- Created: 2024-08-13T13:54:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-21T21:32:00.000Z (5 months ago)
- Last Synced: 2025-02-21T21:45:12.554Z (5 months ago)
- Language: Julia
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
# SciFiAnalysisTools
[](https://mmikhasenko.github.io/SciFiAnalysisTools.jl/stable)
[](https://mmikhasenko.github.io/SciFiAnalysisTools.jl/dev)
[](https://github.com/mmikhasenko/SciFiAnalysisTools.jl/actions)
[](https://github.com/mmikhasenko/SciFiAnalysisTools.jl/actions/workflows/Test.yml?query=branch%3Amain)
[](https://github.com/mmikhasenko/SciFiAnalysisTools.jl/actions/workflows/Lint.yml?query=branch%3Amain)
[](https://github.com/mmikhasenko/SciFiAnalysisTools.jl/actions/workflows/Docs.yml?query=branch%3Amain)[](https://codecov.io/gh/mmikhasenko/SciFiAnalysisTools.jl)
[](https://doi.org/FIXME)
[](CODE_OF_CONDUCT.md)
[](#contributors)This package provides tools for analyzing data from the LHCb SciFi detector.
## Installation
To install the package, use the following command:
```julia
using Pkg
Pkg.add(Pkg.PackageSpec(; url="https://github.com/mmikhasenko/SciFiAnalysisTools.jl.git"))
```## Usage
To get started, you can explore the provided functionalities,
```julia
using SciFiAnalysisToolstest_id = 0x00044010
ch_id = ChannelID(test_id) # split the channel ID into physical parts# code back to hex
id2hex(ch_id) == test_id # true# print the full name
TLQMD(ch_id) == "T1L0Q1M0_mat0_sipm0" # true
```## Plotting on the standard map
The method `standard_map` can be used to map a list of hex channel IDs and values to two dimensional array.
The following example shows how to plot detector subparts on the standard map.```julia
using Plots
theme(:wong2, axis=false, grid=false, colorbar=false)all_hex = [
id2hex(TLQMMSTuple((T, L, Q, M, mat, sipm))) for
T ∈ 1:3, L ∈ 0:3, Q ∈ 1:4, M ∈ 0:5, mat ∈ 0:3, sipm ∈ 0:3 if !(M == 5 && T in [1, 2])
];plot(layout=grid(3,2),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_station))),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_module))),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_quarter))),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_layer))),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_mat))),
heatmap(standard_map(all_hex .=> getproperty.(ChannelID.(all_hex), :_sipm)))
)
```## How to Cite
If you use `SciFiAnalysisTools.jl` in your work,
please cite using the reference given in [CITATION.cff](https://github.com/mmikhasenko/SciFiAnalysisTools.jl/blob/main/CITATION.cff).## Contributing
If you want to make contributions of any kind, please first that a look into our [contributing guide directly on GitHub](docs/src/90-contributing.md) or the [contributing page on the website](https://mmikhasenko.github.io/SciFiAnalysisTools.jl/dev/90-contributing/).
---
### Contributors