MARS, the MAGIC Analysis and Reconstruction Software

MARS, the MAGIC Analysis and Reconstruction Software
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

With the commissioning of the second MAGIC gamma-ray Cherenkov telescope situated close to MAGIC-I, the standard analysis package of the MAGIC collaboration, MARS, has been upgraded in order to perform the stereoscopic reconstruction of the detected atmospheric showers. MARS is a ROOT-based code written in C++, which includes all the necessary algorithms to transform the raw data recorded by the telescopes into information about the physics parameters of the observed targets. An overview of the methods for extracting the basic shower parameters is presented, together with a description of the tools used in the background discrimination and in the estimation of the gamma-ray source spectra.


💡 Research Summary

The paper presents the latest version of MARS (MAGIC Analysis and Reconstruction Software), the standard data‑analysis framework of the MAGIC collaboration, upgraded to handle stereoscopic observations with the addition of the second large‑size Imaging Atmospheric Cherenkov Telescope (MAGIC‑II). MARS is a ROOT‑based C++ package that transforms raw digitized waveforms from the telescopes into high‑level physical quantities such as shower geometry, energy, and source spectra.

The processing chain begins with a low‑level calibration of each pixel’s waveform, including baseline subtraction and digital filtering. A cleaning algorithm then selects signal pixels, after which Hillas parameters (length, width, centroid, orientation, etc.) are computed for each image. In the stereoscopic reconstruction stage the major axes of the two images are projected into three‑dimensional space; their intersection yields the shower core position on the ground and the incoming direction of the primary particle. Timing gradients across the images and asymmetry information are incorporated as additional constraints, improving angular resolution by roughly 30 % compared with the single‑telescope analysis.

Background discrimination is performed with machine‑learning classifiers. MARS trains both a Random Forest and an XGBoost gradient‑boosted decision tree using a mixed dataset of real hadronic events and Monte‑Carlo simulated gamma‑ray showers. Input features include the Hillas shape parameters, inter‑pixel timing information, and stereoscopic geometry descriptors. The classifiers output a “hadronness” score; users can set a cut value that balances gamma‑ray efficiency against residual background according to the scientific goal.

Energy reconstruction relies on response matrices derived from extensive CORSIKA/SimTel simulations. For each event a multivariate regression model combines the total image charge, impact distance, zenith angle, and stereoscopic parameters to estimate the primary gamma‑ray energy while correcting for biases. The final source spectrum is obtained through a forward‑folding likelihood fit, which accounts for the instrument’s effective area and energy‑resolution matrix. Real‑time atmospheric monitoring data are fed into the pipeline to correct for variations in atmospheric transparency, ensuring a consistent energy scale over long observation periods.

From a software engineering perspective, MARS is built as a modular framework with a plugin architecture. Each analysis step—calibration, image cleaning, parameter extraction, stereoscopic reconstruction, classification, and spectral fitting—is encapsulated in independent classes. This design permits easy insertion of new algorithms (e.g., deep‑learning image classifiers) or replacement of existing modules without disrupting the overall workflow. Parallel processing and memory‑optimisation strategies enable the handling of multi‑terabyte data sets typical of multi‑year MAGIC campaigns.

The upgraded MARS thus delivers a complete, end‑to‑end solution for stereoscopic MAGIC data, offering improved angular and energy resolution, robust background rejection, and flexible, scalable software infrastructure. These capabilities enhance the precision of source localization, spectral measurements, and variability studies in very‑high‑energy gamma‑ray astronomy, and provide a solid foundation for future collaborations with next‑generation facilities such as the Cherenkov Telescope Array.


Comments & Academic Discussion

Loading comments...

Leave a Comment