How vlvovch/thermal-fist works
Project Type and Purpose
• Thermal-FIST is a modular C++ scientific package implementing hadron resonance gas (HRG) models, with both command-line/example programs and a Qt GUI frontend for computing thermodynamics, fits, and event generation.
Main Components
a. Core Computational Library (src/library & include/)
• Modules:
– HRGBase (ideal and canonical ensembles, thermodynamics routines)
– HRGEV (excluded volume models)
– HRGEventGenerator (Monte Carlo event generators)
– HRGFit, HRGPCE, HRGRealGas, HRGVDW (fits, partial chemical equilibrium, real gas, van der Waals)
– CosmicEos (early-Universe/NS matter)
• Utility submodules (xMath, Broyden solver, spline, integration)
b. Input Data Layer (input/)
• Particle lists, decay tables, interaction parametrizations, lQCD EoS, heavy-ion yield data
c. Third-Party Dependencies (thirdparty/)
• Eigen (linear algebra)
• MINUIT2 (minimization)
• Mersenne Twister (RNG)
• Qt + QCustomPlot (GUI & plotting)
d. Frontends
• CLI / C++ example applications (src/examples/) demonstrating usage (BagModelFit, EoS calculators, NeutronStars, PCE, cpc macros)
• GUI application (src/gui/QtThermalFIST/) for interactive analysis, linking to core library and plotting widgets
• Utility routines (src/routines/EVTablesGenerator/) generating tabulated tables
e. Build & Test Infrastructure
• CMake build definitions (top-level CMakeLists.txt, per-module CMakeLists.txt)
• CI workflows (.github/workflows, Travis CI)
• Unit and regression tests (test/) comparing reference outputs
Relationships and Data Flows
• The Frontends (CLI examples, GUI) depend on and link to the Core Library.
• Core Library routines read input data files (particle lists, interactions, lQCD, yield datasets) and use third-party services (Eigen for matrices, MINUIT2 for fits, RNG for event generation).
• EVTablesGenerator links to Core Library to produce precomputed tables stored for reuse.
• Tests invoke library functions or example programs, compare outputs to ReferenceOutput.
• CI system orchestrates build → run tests → report status.
Architectural Patterns & Principles
• Layered architecture:
1. Data Layer (input/)
2. Core Library (computation engine)
3. Service Layer (fit & event-gen modules)
4. Presentation Layer (CLI, GUI)
• Modular design: each physics extension in its own namespace/submodule
• Separation of concerns: numerical routines vs. I/O vs. user interface
• Dependency injection via CMake targets for easy submodule composition