This repository contains clustering code for pixel detectors used in particle physics. The primary goal is to implement algorithms for clustering pixels in detector data, improving the analysis and understanding of particle interactions and energy deposition. This code can be used for applications in radiotherapy, where precise knowledge of energy spectra is crucial.
- Efficient clustering of pixel data.
- Applicable in particle physics and radiotherapy.
- Supports multiple simultaneous frame clustering.
- Energy calibration implementation.
- Output in both ROOT files and tabular text format.
- Generation of histograms and other descriptive graphical analysis.
For a detailed description of the methodology and application, refer to link.
- clustering.cpp: Main clustering function without calibration or multi-frame support.
- clustering_cal.cpp: Clustering function with calibration support.
- clustering_write_txt.cpp: Clustering function with text output.
- clustering_multiframes.cpp: Clustering function supporting multiple frames.
- clusteringmacro.C: Macro file to run the clustering code.
- input/: Directory containing input data files, e.g. a
.tpx
file. - output/: Directory where the output files, such as ROOT and text files, are saved.
The input data consists of pixel detector readings, e.g. a .tpx
file.
The output is a set of clustered pixel data, which can be further analyzed or visualized. The output format varies depending on the selected clustering function, with options for ROOT and text files.
To use the clustering code, follow these steps:
-
Clone the repository
-
Navigate to the repository
-
Ensure you have ROOT installed and configured.
-
Unzip the example
input/cs137.zip
: This will extractcs137.tpx
file to use in the code. -
Comment/Uncomment the selected code in the macro
clusteringmacro.C
to choose the desired clustering code. -
Run the
clusteringmacro.C
macro:root -l -b -q clusteringmacro.C
-
ROOT Framework: ROOT Installation Guide
- The code has been tested under ROOT Release 6.32/00 - 2024-05-28.
- The dependencies are presented here.
-
Operating System: The code has been tested on Windows 10 x64 and Linux distributions.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature-branch
- Create a new Pull Request.