{"title":"Efficient cosmic ray generator for particle detector simulations","authors":"David Díez-Ibáñez, Luis Obis","doi":"10.1016/j.cpc.2025.109805","DOIUrl":null,"url":null,"abstract":"<div><div>Traditional cosmic ray simulations commonly employ the Monte Carlo method to randomize the energy and direction of each simulated particle, often employing simplified or uncorrelated distributions. The flux of cosmic rays is modelled as incident particles originating from a plane above the object of interest (e.g., detectors in particle physics or surfaces in dosimetry studies) with experimentally determined angular and energy distributions. This strategy is highly inefficient because a significant number of particles never intersect the detector. This paper proposes a refined Monte Carlo method to generate a sample of events that intersect the target volume, ensuring their angular distribution matches that of the conventional approach. It is based on the projection of a sphere containing the target volume onto a plane tangent to it at a fixed angle; this is termed the <em>Probability Distribution Projection</em> (PDP) method. This configuration allows computation of the probability that a cosmic particle hits the sphere at this incoming angle, with this probability being proportional to the area of the corresponding section of a cylinder. The performance of this method demonstrates enhanced computational speed while yielding identical physical results. It has been implemented within the REST-for-Physics framework and tested using the geometry of a real detector, the IAXO-D0 Micromegas X-ray detector for the future axion helioscope BabyIAXO. The proposed method achieves a 37-fold improvement in efficiency compared to the traditional Monte Carlo scheme for the same accuracy, and is particularly advantageous when the target volume deviates from a spherical shape.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"317 ","pages":"Article 109805"},"PeriodicalIF":3.4000,"publicationDate":"2025-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525003078","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
Traditional cosmic ray simulations commonly employ the Monte Carlo method to randomize the energy and direction of each simulated particle, often employing simplified or uncorrelated distributions. The flux of cosmic rays is modelled as incident particles originating from a plane above the object of interest (e.g., detectors in particle physics or surfaces in dosimetry studies) with experimentally determined angular and energy distributions. This strategy is highly inefficient because a significant number of particles never intersect the detector. This paper proposes a refined Monte Carlo method to generate a sample of events that intersect the target volume, ensuring their angular distribution matches that of the conventional approach. It is based on the projection of a sphere containing the target volume onto a plane tangent to it at a fixed angle; this is termed the Probability Distribution Projection (PDP) method. This configuration allows computation of the probability that a cosmic particle hits the sphere at this incoming angle, with this probability being proportional to the area of the corresponding section of a cylinder. The performance of this method demonstrates enhanced computational speed while yielding identical physical results. It has been implemented within the REST-for-Physics framework and tested using the geometry of a real detector, the IAXO-D0 Micromegas X-ray detector for the future axion helioscope BabyIAXO. The proposed method achieves a 37-fold improvement in efficiency compared to the traditional Monte Carlo scheme for the same accuracy, and is particularly advantageous when the target volume deviates from a spherical shape.
传统的宇宙射线模拟通常采用蒙特卡罗方法来随机化每个模拟粒子的能量和方向,通常采用简化或不相关的分布。宇宙射线的通量被建模为来自感兴趣的物体(例如,粒子物理学中的探测器或剂量学研究中的表面)上方的平面的入射粒子,具有实验确定的角和能量分布。这种策略效率非常低,因为有相当数量的粒子永远不会与检测器相交。本文提出了一种改进的蒙特卡罗方法来生成与目标体积相交的事件样本,并确保它们的角度分布与传统方法相匹配。它基于包含目标体积的球体以固定角度在与其相切的平面上的投影;这被称为概率分布投影(PDP)方法。这个结构允许计算宇宙粒子以这个角度撞击球体的概率,这个概率与圆柱体相应部分的面积成正比。该方法在获得相同物理结果的同时,计算速度得到了提高。它已经在rest for physics框架内实现,并使用真实探测器的几何形状进行了测试,IAXO-D0 Micromegas x射线探测器用于未来的轴子太阳望远镜BabyIAXO。在相同精度的情况下,该方法的效率比传统的蒙特卡罗方法提高了37倍,并且在目标体积偏离球形时尤其具有优势。
期刊介绍:
The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper.
Computer Programs in Physics (CPiP)
These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged.
Computational Physics Papers (CP)
These are research papers in, but are not limited to, the following themes across computational physics and related disciplines.
mathematical and numerical methods and algorithms;
computational models including those associated with the design, control and analysis of experiments; and
algebraic computation.
Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.