-
Notifications
You must be signed in to change notification settings - Fork 0
junkai2998/HybridMCforGM2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fast Simulation For Muon G-2 Experiment About The simulation is divided into three parts: 1. Beam and spin dynamics of the muons in the storage ring 2. Sampling of positrons spectrum (from muon decay) in LAB frame 3. Detection of the positrons (via ML methods) Versions v0.0.0: - first prototype - minor mistakes on sampling of positron PZ in the Muon Rest Frame - corrected part of the code is in part2 file v0.0.1: - correction to minor mistakes on sampling of positron PZ in MRF (by adding artificial spin precession before lorentz boost) - sampling and plotting of the result in the same file (to be separated in the newer version) v0.0.2: - separate sampling and plotting codes - added a notebook file for quick visualization (using hist_dict.npy that contains only histogram information from a large dataset) - added information in the codes - the positron sampling codes is still in toyMC status, beam and spin dynamics to be added later v0.1.0: - added modularity to positron sampling code: test_modules.ipynb - tested positron sampling (with uniformly distributed random number VS simple beam and spin dynamics), see test_modules.ipynb - Changed alpha, rot variables to theta_s (spin angle), theta_c (cyclotron angle) - GeneratePositron_LAB: changed beta_mu_x,z to muDecayPX,Z (muDecay vs muInit problem to be resolved later) - removed W_mue from GeneratePositron_MRF(to reduce redundancy) and modified GenerateMichelKinematics to return energy,cos(theta) instead of x,cos(theta) v0.1.1: *latest* - revert GenerateMichelKinematics to x,cos(theta) - added muDecayPY return in GeneratePositron_LAB; muDecayPolY in GeneratePositron_MRF (not considering EDM, set to 0) - removed 02_positron_sampling/test_modules.ipynb and added modules in external .py files: Constants.py, FourVector.py, PositronDecay.py - upgrade positron sampling (01_sampling.ipynb in version <v0.1.0) in terms of the modules - new directory: 01_beam_spin_dyn,incoporated simple beam and spin dynamics (cyclotron motion and spin precession) in simplebd.ipynb * note 7/4/2022: using spin precession angle is not consistent with gm2ringsim, which use muon polarization to fix positron momentum direction v0.1.2: (comming soon) git tag -a v0.1.2 -m "updated from v0.1.1, with bug fixed" - added docstring to functions in positron sampling - change time pts from discrete to continuous (use uniform random numbers) - wiggle plot from toyMC data (cut posiInitE >=1.8 GeV) ! Major bug (fixed and KIV): in 02_sampling.ipynb (bug since v0.1.0) bug from line: four_momenta_LAB[:,7] = muDecayPolX correct: four_momenta_LAB[i,7] = muDecayPolX affected files: simplebd.ipynb this resulted in the columns that have the same value, and caused: - painfully long runtime, for N>=1e6 - EvsPhase diagram not uniform, cant fully matched to gm2ringsim data - not implemented: unified seed for all random generators from all modules (PositronDecay.py and simplebd.ipynb). - this version was used to generate data for BDT phase map studies. But it relied on simple BD (not yet included in the repo), and it gave major issue (single r,p) v0.1.3:(comming soon) - included sample (complete,working) codes to generate data for BDT phase map - try using toyMC data -> DT to get isCaloHit label, and draw wiggle plot for (isCaloHit==1 && posiInitE>1700) v0.2.0:(comming soon) - crude, ad-hoc implementation of 3-vector class - GaussianGasGun (docsdb2571)::ProduceMuonVector implementation, with modifications: - uniform / exponential decay time distribution - sample the storage ring in circular shape (instead of square in original implementation) - modified positron codes (v0.1.3 and before is mainly positron sampling) to suite 3-vector class and physics of ProduceMuonVector - included codes for test and characterizing the complete muon+positron codes - included sample (complete,working) codes to generate data for BDT phase map (planning) - general rotation (3-parameters) implementation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published