Injection Efficiency
Posted: 20 Jan 2020, 14:09
Hi all
I am trying something really simple ... on paper.
Calculating the injection efficiency (IE) by counting the number of particles tracked after a certain number of turns
This is part of a MOGA optimization where errors are introduced/propagated through different calculations
The fragment where I perform the IE calculation is reported below
At the watch-point W3 an INTERVAL of 100 counts is defined, then a run_control with n_passes = 101, so after 100 turns a result
is saved. Ideally a *.w3 file should be created with 2 pages, page=1 with a parameter Particles=1000
and page=2 with Particles<=1000 (some electrons being lost in the ring).
The critical element, in this case, seems to be the introduction of the file <rootname>.param (red block), which contains
a definition of INTERVAL=1 for watchpoint W3. However my idea was to override this definition by using alter_elements (green lines)
Elegant though does not seem to care about this
So the question is: why alter_element seems not to do its job?
Thanks very much for any clue ... Marco
! -------------------------------------------------
! Injection Efficiency with OFF-axis beam at -5.0mm
! -------------------------------------------------
&run_setup
lattice = <rootname>.new
use_beamline = RINGRF,
p_central_mev = 3.5e3,
default_order = 3,
rootname = <rootname>
semaphore_file = %s.done0
magnets = %s.mag
losses = %s.lost
&end
&load_parameters
filename = <rootname>.param
allow_missing_elements = 1
&end
&alter_elements
name=W3,
item=INTERVAL,
value = 100
differential=0,
multiplicative=0
&end
&alter_elements
name=RFC,
item=CHANGE_T,
value="0",
differential=0,
multiplicative=0
&end
&run_control
n_steps = 1,
n_indices = 0,
n_passes = 101
reset_rf_for_each_step = 1
first_is_fiducial = 0
restrict_fiducialization = 0
&end
&twiss_output
filename = %s.twi
concat_order = 2
radiation_integrals = 1
compute_driving_terms = 1
&end
&sdds_beam
input = input_coords.sdds,
input_type = "elegant",
sample_interval = 1,
reuse_bunch = 0,
&end
&track
center_on_orbit=0,
center_momentum_also=0,
offset_by_orbit=1,
offset_momentum_also=1
&end
! -----------------
! Momentum Aperture
! -----------------
etc, etc ...
I am trying something really simple ... on paper.
Calculating the injection efficiency (IE) by counting the number of particles tracked after a certain number of turns
This is part of a MOGA optimization where errors are introduced/propagated through different calculations
The fragment where I perform the IE calculation is reported below
At the watch-point W3 an INTERVAL of 100 counts is defined, then a run_control with n_passes = 101, so after 100 turns a result
is saved. Ideally a *.w3 file should be created with 2 pages, page=1 with a parameter Particles=1000
and page=2 with Particles<=1000 (some electrons being lost in the ring).
The critical element, in this case, seems to be the introduction of the file <rootname>.param (red block), which contains
a definition of INTERVAL=1 for watchpoint W3. However my idea was to override this definition by using alter_elements (green lines)
Elegant though does not seem to care about this
So the question is: why alter_element seems not to do its job?
Thanks very much for any clue ... Marco
! -------------------------------------------------
! Injection Efficiency with OFF-axis beam at -5.0mm
! -------------------------------------------------
&run_setup
lattice = <rootname>.new
use_beamline = RINGRF,
p_central_mev = 3.5e3,
default_order = 3,
rootname = <rootname>
semaphore_file = %s.done0
magnets = %s.mag
losses = %s.lost
&end
&load_parameters
filename = <rootname>.param
allow_missing_elements = 1
&end
&alter_elements
name=W3,
item=INTERVAL,
value = 100
differential=0,
multiplicative=0
&end
&alter_elements
name=RFC,
item=CHANGE_T,
value="0",
differential=0,
multiplicative=0
&end
&run_control
n_steps = 1,
n_indices = 0,
n_passes = 101
reset_rf_for_each_step = 1
first_is_fiducial = 0
restrict_fiducialization = 0
&end
&twiss_output
filename = %s.twi
concat_order = 2
radiation_integrals = 1
compute_driving_terms = 1
&end
&sdds_beam
input = input_coords.sdds,
input_type = "elegant",
sample_interval = 1,
reuse_bunch = 0,
&end
&track
center_on_orbit=0,
center_momentum_also=0,
offset_by_orbit=1,
offset_momentum_also=1
&end
! -----------------
! Momentum Aperture
! -----------------
etc, etc ...