How to change the nominal energy when beam pass-through the degrader?

Issue #283 resolved
曾宪虎 created an issue

In the beamline simulation, we must give the beam energy. However, the energy will change when the beam pass-through a degrader or interact with the material. Therefore, how to change the energy as energy decreases.

Comments (3)

  1. Laurie Nevay

    Hello,

    You can use the parameter ‘scaling’ for all magnetic elements in the beam line to supply a scaling factor for the field. This number multiplies the B field or the relevant gradient (e.g. k1 for a quadrupole) in the element.

    See http://www.pp.rhul.ac.uk/bdsim/manual/model_description.html#component-strength-scaling

    A nice strategy is to calculate and put the scalings and update each element. So:

    d1: sbend, l=1.1*m, angle=20*degrees;
    l1: line=(d1);
    
    ! some other stuff
    
    ! update the element definition - but *before* the use command
    ! this bit could be in another gmad file that you include
    d1: scaling=1.2;
    
    use, l1;
    

    We typically calculate a set of scaling values ourselves and then prepare the element update syntax using a Python script. In the case of a degrader for example, it’s extremely difficult to predict analytically in a general way what the mean decrease in energy is as it depends on the specific material, particle etc. Therefore, we leave this to the user. We can therefore generate different scaling files for different degrader settings and include the correct one when we need to.

    Let me know if you have any trouble.

    Cheers,

    Laurie

  2. Log in to comment