Dear all,
Recently, I want to do beam scattering simulation, including elastic, inelastic and Touschek scatterings. While I have the following questions.
1. I checked the examples of elastic and inelastic scattering, is it for single particle or many-particle simulation?
2. I ran the example of elastic scattering, it generated run1.eslos, which I believe it records the loss information. Then I sorted run1.eslos to get sorted file run1.eslos.sort. In this sorted file, which column indicate the loss information versus s-position?
3. Linked with question2, according to the example, is it the pressure file required to calculate loss versus s-position?
If following the example instruction using "elasticScatteringAnalysis", it will generate two files, run1.esanal.sdds and run1.esanal.full. And if using the following process, which columns in which file give the loss information versus s-position? I want to know the loss distribution versus s-position.
sddsprocess run1.esanal.full -pipe=out \
-define=col,logRate,"rate log" \
| sddsxref -pipe run1.eslos.sort -take=* \
| sddssort -pipe -column=s,incr \
| sddsbreak -pipe -change=s \
| sddsprocess -pipe=in run1.esanal.full1 -process=s,first,s0
sddsplot -col=xp,yp run1.esanal.full1 -split=col=logRate,page -sep=page -order=temperature \
-graph=sym,vary=subtype,fill -title=@s0,edit="i/Scattering from s =/ei/m/"
sddshist run1.esanal.full run1.esanal.his -size=0.010 -cdf -data=sLost -weight=rate
sddsplot -layout=1,2 -join=x -col=sLost,frequency run1.esanal.his -end -col=sLost,sLostCdf run1.esanal.his
sddsprocess run1.esanal.full1 -pipe=out -filter=col,yLost,0,1 \
| sddshist2d -pipe=in xyHist.h2d -col=xLost,yLost -xparam=100 -yparam=50 -weight=rate
sddscontour -shade xyHist.h2d -log=1e-12
4. For Touschek scattering simulation, can I externally load a beam distribution, instead of defining Gaussian beam distribution within the &touschek_scatter? For example, can I use &sdds_beam to give the beam distribution and how?
5. Linked with question4, if using &sdds_beam, can I ask what is the required format for the sdds file? Does it include 6 columns of x, x', y, y', t, p?
6. For inelastic and Touschek scattering simulation, they all need the momentum aperture file, so, should I do the single particle or many particle tracking to get momentum aperture file?
7. Can I do the elastic, inelastic, Touschek scatterings in one elegant file, or I have to split into steps? Can you let me know the correct steps to do it?
Thank you so much for taking the time to answer all my questions!
Best regards,
Minghao
Beam scattering simulation
Moderators: cyao, michael_borland
-
michael_borland
- Posts: 2057
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Beam scattering simulation
Minghao,
1. Elastic and inelastic scattering are single-particle phenomena. We can use Pelegant for the simulations to save time.
2. The run1.eslos file contains information on where scattered particles are lost. For each lost particle, it reports the coordinates at the scattering event (s, xp, xp, theta, phi) and at loss (xLost, yLost, deltaLost, sLost).
3. Yes, we need the partial pressure at each scattering location to determine how many particles will be lost at each loss location. The run1.eslos maps scattering location to loss location, but doesn't know about scattering rate. If we know the partial pressures, elasticScatteringAnalysis can do the required sums. In the example, elasticScatteringAnalysis produces two files, run1.esanal.sdds and run1.esanal.full. run1.esanal.sdds gives the loss rate for each scattering location, but has no information about where particles are lost.
run1.esanal.full is the file you need if you want to know loss rates for each location. The Notebook file has a poor description of the structure of this file. It has one row for each pair of scattering and loss locations. Along with the loss/out-scattering rate represented by each row. Thus, we can perform weighted histograms to get loss rates by location.
We can also find out where the losses originate
Here are some commands to visualize the (x,y) loss distribution for each loss location:
4. The Touschek scattering simulation does not have the ability to load an external distribution of particles. You can provide various histograms of the initial particle distribution using 2D, 4D, or 6D histograms. 2D histograms are provided via the (XDist, YDist, and ZDist) parameters. A 4D histogram can be used instead of (XDist, YDist) using the TranDist parameter. Finally, a 6D histogram can be provided via the FullDist parameter.
5. The required format for sdds_beam is a file that includes (x, xp, y, yp, t, p). It's the same format saved by elegant in various output files (e.g., &run_setup output or &bunched_beam bunch).
6. Use the momentum_aperture command to compute the momentum acceptance for touschek and inelastic scattering. It can run in parallel or serial mode.
7. The elastic_scattering, inelastic_scattering, and touschek_scatter commands are all "major action" commands, so you can't run them all at once. You have to have a new run_setup etc after each. However, you can put all the commands in a single file so you run them sequentially. E.g.,
--Michael
1. Elastic and inelastic scattering are single-particle phenomena. We can use Pelegant for the simulations to save time.
2. The run1.eslos file contains information on where scattered particles are lost. For each lost particle, it reports the coordinates at the scattering event (s, xp, xp, theta, phi) and at loss (xLost, yLost, deltaLost, sLost).
3. Yes, we need the partial pressure at each scattering location to determine how many particles will be lost at each loss location. The run1.eslos maps scattering location to loss location, but doesn't know about scattering rate. If we know the partial pressures, elasticScatteringAnalysis can do the required sums. In the example, elasticScatteringAnalysis produces two files, run1.esanal.sdds and run1.esanal.full. run1.esanal.sdds gives the loss rate for each scattering location, but has no information about where particles are lost.
run1.esanal.full is the file you need if you want to know loss rates for each location. The Notebook file has a poor description of the structure of this file. It has one row for each pair of scattering and loss locations. Along with the loss/out-scattering rate represented by each row. Thus, we can perform weighted histograms to get loss rates by location.
Code: Select all
sddshist run1.esanal.full lossRates.sdds -data=sLost -weight=rate
sddsplot -column=sLost,frequency lossRates.sdds
Code: Select all
sddshist run1.esanal.full outScatteringRates.sdds -data=s -weight=rate
sddsplot -column=s,frequency outScatteringRates.sdds
Code: Select all
sddsprocess run1.esanal.full -pipe=out -define=col,logRate,"rate log" \
| sddsxref -pipe run1.eslos.sort -take=* \
| sddssort -pipe -column=sLost,incr \
| sddsbreak -pipe -change=sLost \
| sddsprocess -pipe=in run1.esanal.full2 -process=sLost,first,s1 -test=param,"n_rows 20 >" -redefine=col,yLost,"yLost abs",units=m
sddsplot -col=xLost,yLost run1.esanal.full2 -split=col=logRate,page -sep=page -samescales -order=temperature \
-graph=sym,vary=subtype,fill -title=@s1,edit="i/Scattering losses at s =/ei/m/"
sddsprocess run1.esanal.full2 -pipe=out \
| sddshist2d -pipe=in xyHist.h2d -col=xLost,yLost -xparam=100 -yparam=100 -weight=rate -samescale
sddscontour -shade xyHist.h2d -log=1e-12
5. The required format for sdds_beam is a file that includes (x, xp, y, yp, t, p). It's the same format saved by elegant in various output files (e.g., &run_setup output or &bunched_beam bunch).
6. Use the momentum_aperture command to compute the momentum acceptance for touschek and inelastic scattering. It can run in parallel or serial mode.
7. The elastic_scattering, inelastic_scattering, and touschek_scatter commands are all "major action" commands, so you can't run them all at once. You have to have a new run_setup etc after each. However, you can put all the commands in a single file so you run them sequentially. E.g.,
Code: Select all
&run_setup
...
&end
&run_control
...
&end
&elastic_scattering
...
&end
&run_setup
...
&end
&run_control
...
&end
&inelastic_scattering
...
&end
&run_setup
...
&end
&run_control
...
&end
&touschek_scatter
...
&end