Аннотация:Optimization of the SPHERE-3 detector configuration, designed to study the mass composition of primary cosmic rays in the energy range 1--1000 PeV by registering Cherenkov light reflected from the snow surface, requires simulation of a large number of extensive air shower events. A software suite with a multi-step computational pipeline is presented: shower generation in CORSIKA, decoding and cloning of events (C++/OpenMP), ray-tracing of optical photons through the detector model (Geant4 MT), and approximation of images by a lateral distribution function (Python/multiprocessing, iminuit). The key property of the problem is its natural atomicity: each event is processed independently at all stages, which provides linear scaling under parallel computation. Thread safety is achieved by architectural means -- shared data are read-only, mutable state is isolated per-worker -- without the use of locks on hot paths.