Index of /~dlr/g-2/gm22/mytest/energy_vs_time_vs_turn
December 8, 2022
energy_vs_turn_vs_time/config_034/ 20221207_140837/
Track 100k of Emerey's distribution into ring. 2 turns. to get x-phi, x'-phi correlation at
inflector exit. Use phase_space_to_histogram.f90 with 6,7,8 to read MARK_INFLECTOR_DS_phase_space.dat and
write bin_average_rms_6.dat, bin_average_rms_7.dat, bin_average_rms_8.dat (phi vs delta, x, x').
(Recall that an input file is required - <phase_space_to_hist.dat>.
and then use phase_space_to_hist.gnu to plot and fit all 3 and write
MARK_INFLECTOR_DS_phase_space.pdf. Recall (phase_space_to_hist.gnu reads the 3 bin_average_rms files.)?
Looks reasonable but statistics are not great.
Rerun with 400k events and go 100 turns so collect info for x-delta and x'-delta
for the stored beam. (Turn on scattering in inflector) and run g2_tracking ->config_034/20221208_100307
Use <phase_space_to_hist.dat> to create bin_average_rms_6,7,8.dat and phase_space_to_hist.gnu to plot.
21:10 Run again with 400k starting at 400k
-----------------------------------------------------------------------------------
energy_vs_turn_vs_time/config_032/20221204_090912/
Track 369500 Diktys muons into ring and 100 turns. (no scattering in inflector). Use phase_space_to histogram to write
bin_average_rms_6,7,8 for MARK_INFLECTOR_DS_phase_space.dat and plot with phase_space_to_hist.gnu
December 9, 2022
run g2_tracking ->config_034/20221208_100307 - completed 20221209_0748
- Rerun events 800k ->1000k > config_034/20221209_074900 - complete at 20221209_1249
- And with events 1000k -> 1200k > config_034/20221209_075109 - complete at 20221209_1249
Combine using energy_vs_time.f90
Then energy_time_to_2D_hist.f90 (requires some repair to energy_vs_time.f90)
Plot with 2D_hist_test.gnu - 2D_histogram_4,5,6.pdf - uses 1.2e6 Emerey events
To determine effect of shifting kicker time, set kStart to 180ns in input.dat in config_033.
Submit to grid. -> config_033/20221209_115910.
-> pulse_kicker.pdf (copied to 20221209_115910. Does indeed shift kick earlier so by eye more centered.
Create config_035 - run the same as in config_034 with kick 30ns earlier
20221209_104253 - events 0-200000, Eremey, kStart=180ns (30ns earlier)
20221209_194702 - events 200000-400000 " qsub 7093778
20221209_194903 -events 400000-600000 " qsub 7093779
20221209_195035 - events 600000-800000 " qsub 7093780
20221209_195206 - events 800000-1E6 " qsub 7093781
20221209_195435 - events 1E6-1.2E6 " qsub 7093782 20221209_1955
December 10,2022
config_035 jobs completed. This is to measure x,x' vs delta for spin-coordinate correlation with shifted kicker pulse.
$pb/energy_vs_time
$pb/energy_time_to_2D_hist and create plots. SLopes are not much different thatn config_034
Create config_036 - same as config_035 but kick 224G
20221210_084842 = events 0-200000 kstart=180ns, kick=224G running on 6186
20221210_085451 - events 200000-400000 " 7093789
20221210_090036 - events 400000 - 600000 " 7093791
20221210_090220 - events 600000-800000 " 7093792
20221210_090406 - events 800000-1e6 " 7093793
20221210_090721 - events 1.e6 -1.2e6 " 7093795
(To submit use qsub line from submit_25.sh)
Jobs all complete. Create 2D_histogram_4,5,6.pdf - > slopes are very similar to config_034
Next thing to try is adjusting inflector field. create config_037 for that test.
Copy input.dat from config_034/
Before any adjustment we find (with inflctor scattering off)
initial_offsets = -5.8643E-02 0. 0. 2.5068E-02 0. 0.0 ! -2mm,-3.4mrad,Inf=0.976, 4mrad, -2.3mm, -3.6mrad, crosses zero
=> 4.4000E+00 7.5001E-02 -3.3995E-03 0.0000E+00 0.0000E+00 -8.2633E-04 0.0000E+00 END
Increase inflector to 0.986
4.4000E+00 7.7166E-02 -8.0400E-04 0.0000E+00 0.0000E+00 -8.2226E-04 0.0000E+00 END
Looks reasonable. Particle is stored and survives 100 turns. Let's try.Turn inflector scattering back on.
Start jobs config_037
20221210_212616 - events 0-200k kstart 210, kick 264, inf=0.986 7093803
20221210_212806 - events 200k-400k " 7093804
20221210_213509 - events 400k-600k " 7093805
20221210_213639 - events 600k-800k " 7093806
20221210_213736 - events 800k-1000k " 7093807
20221210_213928 - events 1e6 - 1.2e6 6186
Create file energy_vs_time_vs_turn/slopes.dat with fitted slopes,etc.
energy_vs_time_vs_turn/slopes.gnu to plot and combine
writes to slopes_domega.dat
In config_037 run energy_vs_time and then energy_time_to_2D_hist and then gnup500 2D_hist_test.gnu to create 2D_histogram_4,5,6
In config_037/20221210_213928. cp ../../config_032/20221204_090912/phase_space_to_hist.dat .
run $pb/phase_space_to_histogram - for number=6,7,8.
Statistics are not great so
copy to config_037 and combine 20221210_213736/MARK_INFLECTOR_DS_phase_space.dat and 20221210_213736/MARK_INFLECTOR_DS_phase_space.dat
into config_037/MARK_INFLECTOR_DS_phase_space.dat.
copy config_037?20221210_213928/phase_space_to_hist.dat
run phase_space_to_histogram with number 6,7,8 and gnup500 phase_space_to_hist.gnu to create MARK_INFLECTOR_DS_phase_space.pdf
__________________________________________________________________
December 13, 2022
config_033/20221213_134055
400k events
EndofM5_Valetov_withInit.dat
time_vin_width = 20ns
pbin_width=0.0002
time_binning= momentum_slice
To see if time binning does what it is supposed to
config_031 - lets go back here to redo kicker timing scan with run3b-4 kicker pulse
20221213_134716
Just discover my quad_plate_misalign file includes real misalignment. - and true for most config_03* studies
____________________________________________________________________------
December 14, 2922
config_031, running with time bin in 'position' mode, and finding bugs.
Fix bugs ? start again
config_031/20221214_140352/VparamDependence.dat -> peak between 200ns and 220ns. Consistent with the 210ns had determined before.
config_033 g2_tracking dies with 'killed' message. Is this a memory issue?
Meanwhile it does write output.
To better understand how dependence of x,x' on momentum of stored beam and phi on x,x' at inflector exit,
vary inflector to -1% (already did +1% in config_037)
For this create config_038 - copy from config_037 and change inflector
config_038/20221214_121954 0-200k
20221214_122356 200-400k
20221214_122538 400-600k
20221214_122713 600-800k
20221214_122854 800-1M
20221214_123023 1-1.2M
config_038 - paste MARK_INFLECTOR_DS_phase_space.dat from 20221214_122356, 20221214_122538, 20221214_122713 together and write MARK_INFLECTOR_DS_phase_space.dat to config_038/
In g-2/files/muons plot phi vs x,x',delta for EndofM5_Valetov_withInit.dat
December 15, 2022
config_038/ - jobs completed with reduced inflector. Add slopes to slopes.dat and plot slopes.pdf. point 38 is higher than the others.
December 16, 2022
Back to phase vs time in config_033. Try in debug mode with fewer particles. - With 10000 particles, runs fine to completion. 20221216_053911
Run again (not in production mode) with 200k particles,starting at 400k 20221216_073316 - runs to completion.
Next step is figure out how to combine output. Edit subroutine bin_spin_angle_by_time (compute_moments.f90) so it writes relevant output to directory.
Start two jobs, first 200k and second 200k events with plan to figure out how to combine output.
One job interactive and one batch
December 17, 2022
Both config_033 jobs complete. Submit a few more
400k - 600k
December 18, 2022
The 6 batch jobs I had submitted in config_033 did not complete. Lost /nfs/gm2/data2/ ? Is that related to my jobs.
Remov subdirectories with unfinished jobs
Try running a single job. 20221218_133014 0-200k
December 19, 2022
Single job 20221218_133014 completes in 400 minutes
Start another config_033/20221219_073409 200k-400k !fails to complete
January 1, 2023
Continue with study in config_033
So far events 0-200k in 20221218_133014
submit 7111000 - events 200k-400k 20230101_105207
7111001 - events 400k-600k 20230101_105523
7111002 - events 600k-800k 20230101_105751
7111003 - events 800k-1M 20230101_110003
7111004 - events 1M-1.2M 20230101_110105
7111005 - events 1.2-1.4M 20230101_110211
7111006 - events 1.4-1.6M 20230101_110406
All except 7111006 complete. Not enough events for 1.4-1.6
July 30, 2024
I would like to reproduce the runs with the different trajectories through the injection line.
The three plotted in 'G Minus 2 Experiment Document 29494-v1 Simulation of Measurement of g-2 phase vs energy' are from directories
dir1 = 'config_072/20230918_132456/injection_line_trajectory.dat'
dir2 = 'config_073/20230918_132221/injection_line_trajectory.dat'
dir3 = 'config_081/20230918_124336/injection_line_trajectory.dat'
and plotted with $ps/many_injection_trajectories.gnu
Can I also plot the magnetic field along the trajectory?
Create config_072r to include IBMS detectors
Create a new directory for each and run with IBMS detectors.
January 27, 2025
energy_vs_time_vs_turn/config_25001
Many events. Set spin phase of all particles to pi (s.p=-1). All phases are the same. No correlation at inflector exit. dphi/ddelta stored beam = -1.6 rad - kicker?
config_25002
Introduce x-phi correlation but no delta-phi correlation. polarization='spincoordx' phi = pi+dphidx*x +width*ran_gauss, dphidx=10., width=0.2
Use latest version of energy_spin_vs_time.f90 to create files like
'spin_vs_momentum_2.6000E-05.dat' that collect all data stored in 'spin_vs_momentum_at_time.dat' (output of g2_tracking) and collect
all data in selected time bins and write to a file labelled by the time. Then fit with gnuplot => dphi/ddelta = 11.11+/- 2.1 rad
The result of the x-phi correlation was a very large x'-phi correlation. Not so surprising.
Maybe try a correlation
February 3, 2025
config_25003
Start from config_25002, but reinstate spins from emergy's file, track for 500 turns to learn more about structure of y vs p vs time
Fitting to 'spin_vs_momentum_2.6000E-05.dat' dphi/ddelta = -13.7 +/- 3.9, Fitting to all_phase_space_at_26058_ns.dat => -19 +/-3.9
What gives?
February 10, 2025
config_25004 - set twiss to same as config_072 ( twiss = 2.0, 10.0, 0., 0.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0. ) and set all spins to antiparallel.
Run using alma linux - poor capture efficiency, 79/50000. Is this because of the choice of twiss parameters.
February 10, 2025
config_25005 - set twiss to same as config_25003 twiss = 25.0, 4.0, 7., 3.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0. and set all spins to antiparallel
15k particles stored. Contribution to differential decay dphi/ddelta = -1.5 (fitting to all_phase_space_at_48405.dat_sorted)
February 11, 2025
config_25006, twiss = 25.0, 4.0, 7., 3.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0. and set spins as in file
dphi/ddelta ~ -12 +/- 2.6 consistently at all times. This is fitting to all_phase_space_at_#####_ns.dat_trimmed_sorted.
Trimming adds or subtracts twopi (in energy_spin_vs_time.f90) so there are no outliers.
Sorted checks to be sure the same muons at all times including all_MARK_INFLECTOR_DS_phase_space.dat_trimmed_sorted
And dphi/delta = -12 also for all_MARK_INFLECTOR_DS_phase_space.dat_trimmed_sorted
Also fit dp/dy_amp with result c coeffiecient of quadratic is 7 +/- 1.8 (file fort.600 generated by fit_p_vs_y.f90)
February 14, 2025
config_25007 - smaller injection angle. take initial trajectory from config_073/input.dat
inflector_field=0.976
initial_offsets_ref = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
initial_offsets = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
and insert into config_25006/ref_input.dat and write to config_25007/ref_input.dat
Sure enough, dphi/dp near zero, and dp/dyamp is smaller than at 'nominal' injection angle c~ 3.5 +/- 1.7)
dphi/d(dp/p) = -0.63+/- 2,17, c=3.5+/-1.7, eff=1.5%
February 18, 2025
config_25008
Now try restoring nominal angle but adjust alpay,betay
initial_offsets = -5.8643E-02 0. 0. 2.5068E-02 0. 0.0 ! -2mm,-3.4mrad,Inf=0.976, 4mrad, -2.3mm, -3.6mrad, crosses zero
From
twiss = 25.0, 4.0, 7., 3.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
twiss = 25.0, 1.0, 7., 5.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
And nominal polarization
set_polarization = F
polarization = "antiparallel" !"spintune" !"spincoordx" !
dphi/d(dp/p) = -17 +/-5, c=9, eff = 0.22 %
(accidentally deleted all_AtStartInjectionChannel_phase_space.dat_trimmed)
February 19, 2025
config_25009
Back to straight ahead and same alpha,beta
twiss = 25.0, 1.0, 7., 5.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
initial_offsets = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
(the all_AtStartInjectionChannel_phase_space.dat_trimmed file will be same as for config_25008)
dphi/d(dp/p) = -10 +/-4.8, c=2 eff = 0.27 %
config_25010
twiss = 25.0, 5.0, 7., 5.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
initial_offsets = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
dphi/dp/p = -0.9 +/-2.2, c=2., eff=1.4
February 20, 2025
config_25011
twiss = 25.0, 5.0, 7., 5., 0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
initial_offsets = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
dphi/dp/p = -2.4+/-2.6, c=0.5+/- 1, eff=1.4%
February 21, 2025
config_25012
twiss = 25.0, 5.0, 7., 1.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
initial_offsets = -5.8643E-02 0. 0. 2.5068E-02 0. 0.0 ! -2mm,-3.4mrad,Inf=0.976, 4mrad, -2.3mm, -3.6mrad, crosses zero
dphi/dp/p = -5.1+/- 3.1, c=0, eff=0.73%
February 22, 2025
config_25013
twiss = 25.0, 5.0, 7., 1.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0.
initial_offsets = -7.8630E-02 0. 0. 3.1185E-02 0. 0. ! 0mm,0mrad,inf=0.976
dphi/dp/p = -2.4 +/- 2.8, c= 1.e-3 +/- 3.e-3, eff=0.84%