Difference between revisions of "SNAKE Transport code"

From HallCWiki
Jump to navigationJump to search
Line 4: Line 4:
 
=== Field maps of magnets ===
 
=== Field maps of magnets ===
 
*The Horizontal Bender
 
*The Horizontal Bender
**The integral field needed for 3 deg bend is 1.9211 Tm fro 11 GeV electrons. p (MeV)  = 299.8 Int(Bdl)/theta_B  
+
**The integral field needed for 3 deg bend is 1.9211 Tm for 11 GeV electrons. p (MeV)  = 299.8 Int(Bdl)/theta_B  
 
**From map file, ''MSU_Bender.map'', the maximum integral field along a straight path is 1.92929 Tm with B_max=2.4768 T giving  L_eff= 0.7789m. So need a factor of 0.996 to scale map to get field for 3deg bend.
 
**From map file, ''MSU_Bender.map'', the maximum integral field along a straight path is 1.92929 Tm with B_max=2.4768 T giving  L_eff= 0.7789m. So need a factor of 0.996 to scale map to get field for 3deg bend.
 
*Dipole
 
*Dipole

Revision as of 14:25, 21 February 2013

SNAKE code

Field maps of magnets

  • The Horizontal Bender
    • The integral field needed for 3 deg bend is 1.9211 Tm for 11 GeV electrons. p (MeV) = 299.8 Int(Bdl)/theta_B
    • From map file, MSU_Bender.map, the maximum integral field along a straight path is 1.92929 Tm with B_max=2.4768 T giving L_eff= 0.7789m. So need a factor of 0.996 to scale map to get field for 3deg bend.
  • Dipole
    • The integral field needed for 18.4 deg bend is 11.783 Tm for integration along the path of the particle, L_arc. The ratio between the L_arc and the chord length, L_chord, is L_arc/L_chord = (theta_bend/2)/sin(theta_bend/2)=1.004 for theta_bend=18.4 deg. So need integral field along a straight path of 11.732Tm.
    • From map file, shmsD2008.map, B_max=4.7907 and Int(Bdl) = -13.67883 so L_eff=2.855. So need a factor of 0.8577 to scale map to get field for 18.4 deg bend.
  • Quadrupoles
    • From map file, Q1_coldiron.map,Max Bz/r= 10.791 and Int(Bz/r*dl) = 19.9049 for L_eff= 1.844 at r=20cm
    • From map file,Q23nc6.map, Max Bz/r=14.41324 and Int(Bz/r*dl) = 23.04041 for L_eff=1.5985 at r=31cm
    • Determine the scale factors for the quads to given desired 1st order optics.
  • For comparison to COSY, Dave Gaskell optimized for (xfp|xptar)=0, (yfp|yptar)=0 and D/M=-1.2
    • Q1=-2.035602 T at 25cm which at 20cm is q1 = -1.62848 using L_eff = 1.879m.
    • Q2= 4.342608 T at 35cm which at 31cm is q2 = 3.83535 using L_eff=1.64m.
    • Q3=-2.805149 T at 35cm which at 31cm is q3 = -2.54209 using L_eff=1.64m.

Determine the magnet setting for 11 GeV/c

  • Fix the map scale factor for the HB and Dipole fields at 0.996 and 0.8478 .
  • Determine the scale factors for the quads, by modifying them so that (xfp|xptar)=0, (yfp|ytar)=1.634 and (yfp|yptar)=0 in 1st order matrix. Found scale factors are -0.74295,0.84184,-0.55881 . ( After fixing problem with field interpolation in the snake code in Oct 2012).
  • 1st order Matrix from target to focal plane has D/M = -1.21:
xtar xptar ytar yptar delta
xfp -1.3504 -0.1276 0.007 0.042 1.633
xpfp -0.0606 -0.7469 -0.00025 0.0047 0.3188
yfp -0.0070 0.0125 -1.647 -0.0432 -0.1939
ypfp -0.0012 0.003 -0.2679 -0.6165 0.00302
  • Overall path length = 18.10325m for central track

Study of changing the vertical offset of dipole

  • Ran SNAKE with set of random trajectories for point target with -0.060 < xptar < 0.060, -0.040 < yptar < 0.040 and 8.8 < momentum < 13.42 GeV/c.
  • Input deck to SNAKE has 38 endplanes or apertures. An endplane is a position within SHMS where the the positions and angles are recorded. If the track goes outside the SHMS good volume then a flag is set to indicate a failed track and the positions and angles at the location between the endplanes is recorded.
  • Compared an vertical offset of 20cm, 26cm and 29cm. For each offset the distance between the centerof the dipole and the focal plane center is recalculated.
  • 1D Plot of fraction of total tracks which failed for each endplane number for offset of 20cm (red), 26cm (black) and 29cm (green) offsets.. Apertures (or Endplanes) numbers 3-7 are HB, 8-13 are Q1, 14-18 are Q2, 19-24 are Q3, 25 is dipole entrance, 26-35 are dipole.
  • 2D plot of number tracks which failed for each endplane number versus xptar and yptar for offset of 20cm , 26cm and 29cm. The HB vertical size limits the xptar acceptance to about +/-47-50mr. The Q1 exit limits the horizontal acceptance. For the 20cm offset in the dipole, the dipole entrance (#25) limits the negative xptar acceptance with a delta dependence.
  • 1D Plots of target xp,yp, delta and ytar with for offset of 20cm, 26cm and 29cm. The black line is all tracks. The blue line is failed tracks. The red line is passed tracks.
  • Plot comparing the solid angle has a function of delta for 20 (red), 26cm (black) and 29cm (green) offsets. The solid angle is calculated by the ratio of passed tracks to total tracks multiplied by 0.12*0.08*1000 (the thrown solid angle in msr at each delta).
  • 2D Plots of target xp/delta, yp/delta and xp/yp for offset of 20cm, 26cm and 29cm.
  • 2D Plots of focal plane x/y, xp/yp, yp/y and xp/x for offset of 20cm, 26cm and 29cm.

Study comparing SHMS tuned to D/M = -1.1 to D = -0.8

  • Ran SNAKE with set of random trajectories for point target with -0.060 < xptar < 0.060, -0.040 < yptar < 0.040 and 8.8 < momentum < 13.42 GeV/c.
  • Dave Gaskell fitted tune in COSY for D/M=-0.8 . Scaled the magnets fields in SNAKE.
  • Plot comparing the solid angle has a function of delta for 20 (red) and 26cm (black) offsets at D/M=-1.1 and 26cm offset with D/M=-0.08 (green). The solid angle is calculated by the ratio of passed tracks to total tracks multiplied by 0.12*0.08*1000 (the thrown solid angle in msr at each delta).
  • 1D Plot of fraction of total tracks which failed for each endplane number for offset of 20cm (red) and 26cm (black) at D/M=-1.1 and 26cm offset with D/M=-0.8 (green).
  • 2D Plots of target xp/delta, yp/delta and xp/yp for offset of 26cm with D/M=-1.1 and 26cm with D/M=-0.8.

Study of changing the vertical opening of the HB

  • Drawing of the proposed change by Mike Fowler on Sept 28th.
  • Plot comparing the solid angle has a function of delta for HB vertical opening of 20.75cm(red) and 23cm (black) with dipole offset = 26cm. The solid angle is calculated by the ratio of passed tracks to total tracks multiplied by 0.12*0.08*1000 (the thrown solid angle in msr at each delta). With the increased HB acceptance, the xptar acceptance grows about 10% in negative delta region. Makes no difference in positive delta region.

SNAKE versus COSY comparison

  • Ran SNAKE for xptar = +/- 80mr , yptar = +/- 80mr , -22 < delta < 22and 20cm target at 20deg. Ran mc_shms_single for xptar = +/- 80mr , yptar = +/- 80mr , -22 < delta < 22 and 20cm target at 20deg. Collimator is in place.
  • Plot comparing solid angle acceptance versus delta for SNAKE (blue) and COSY (red).
  • Plots comparing x (vertical) and y (horizontal) positions at various locations from dipole optical entrance to the focal plane for SNAKE (blue) and COSY (red).
  • Plots comparing x (vertical) and y (horizontal) positions at various locations in horizontal bender for SNAKE (blue) and COSY (red).
  • Plots comparing x (vertical) and y (horizontal) positions at the entrance and exit of Q1, Q2, and Q3 for SNAKE (blue) and COSY (red).

Collimator study

  • Run SNAKE with target of length +/-10cm at 20deg. Use a 26cm offset in the dipole with 23cm opening in HB.
  • Plot of the vertical position versus the horizontal position at Q1 entrance. The red boxes are events which are accepted up through aperture #11 ( as defined in plot of apertures in SIMC). The green boxs are events which fail at aperture #12. The blue boxes are those events which fail in aperture #13 and after.
  • Study putting a cut at the vertical position at the Q1 entrance. Table of solid angle and fractional loss is percentage of events which have made it through Q1 but fail either in aperture #12 and after, or in aperture #13 and after:
Cut Solid angle Frac loss after #13 Frac loss after #12
none 3.75mr 3.6% 4.7%
<+7cm 3.10 0.0% 1.4%
<+9cm 3.38 0.2% 1.5%
<+11cm 3.60 1.5% 2.6%
<+13cm 3.75 3.6% 4.7%
  • Plot of solid acceptance versus delta for cuts in the vertical acceptance at the entrance of Q1 for events with vertical position at Q1 less than 7 (red) , 9 (green), 11 (purple) and 13cm (cyan).
  • Phase space of beam through SHMS. 2d histograms of the relative vertical ( y-axis) vs horizontal ( x-axis) positions at different locations in the Horizontal Bender,Q1, Q2, Q3, Dipole entrance,Dipole exit. The coordinates are in the coordinate system relative to the center of that magnet element. The vertical axis has positive direction is physical down. The horizontal axis has positive direction is away from beam line. The blue squares are events which make it to the focal plane. The colored squares are events which are rejected at the aperture. The critical aperatures are the HB entrance (horizontal), HB optical and physical exit (vertical), Q1 optical and physical exit (vertical and horizontal), dipole entrance (negative vertical), dipole middle and before (positive vertical), dipole exit (negative vertical).
  • Investigation of sieve slit placement. Run snake for a point target with -0.20 < delta < 0.22, abs(yptar) < 0.40 and abs(xptar) < 0.60 with sieve slit in front of Q1. 2D Plots of xptar versus delta, yptar versus delta, xptar versus yptar and x versus y at sieve position. One sees the correlation between yptar and delta to get through a fixed horizontal hole position at the Q1 sieve. A rough estimate has del(yptar)/del(delta) = 0.02 so knowledge of delta to the 5% level allows one to predict yptar to the 1mr level.