Closed lyazj closed 3 months ago
See https://github.com/PKMuon/PKMUON_2024/blob/main/src/DetectorConstruction.cc, for example. Declarations of geometrical objects are compacted highlighting their relationships. However, definitions of the constants and the formulas do need to be reviewed and consolidated.
Commit https://github.com/PKMuon/PKMUON_2024/commit/727f8531c90534a6c6262ebe91f70faacf1f116d is UB-free concluded by valgrind generating 10 events. Memory leaks exist but only tens of megabytes are affected so we can ignore it. More investigations should be focusing on geometry configuration.
[IMPORTANT] Many components are put into RPC. As now RPC contains vacuum, and most components have a negligibly smaller size than RPC box, so most of RPC is vacuum now. This may lead into no scatter in RPC.
Even changing the material of RPC box may solve current issues, I strongly recommend a complete review on the geometrical configurations. It is vital to the correctness of our simulation.
Now we use the term RPC exclusively, following the history. Mixing use of RPC and GEM always causes confusion. More bugs (e.g., the misuse of cu1 to cu2) are corrected here. I believe there are more to be discovered.
We have complete yaml files to describe the geometry now. Please check them to help correct any detailed error.
https://github.com/PKMuon/PKMUON_2024/commit/a16f528d6e7edbaaad702fcfddcff792489ebbb8
Close with geometry completely checked.
After the complete clean, removing temperately irrelevant codes, after commit b611a46, the number of lines drops to 1266, bringing much less complicated or coupled context to work on.
Several probably problematic or improvable places are marked with XXX, FIXME, or TODO, let's try to eliminate the markers to make the code nearly 100% reliable.