create simple collimated beam #838
Jaap1957
started this conversation in
Programming
Replies: 1 comment
-
https://www.reddit.com/r/EGSnrc/comments/n38tvs/collimated_source_collapses_near_origin/ This works, to get a rectangle at z = +10 cm of 2x2 cm sending electrons down the z axis .
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This must be a very simple question for this forum.
up to now i used a pencil beam source,
particles come from 1 point at z = +1 meter and move down the z axis.
:start source:
name = pencil_beam
library = egs_parallel_beam
charge = -1 ## for electron
direction = 0 0 -1 ## -z direction
:start spectrum:
type = monoenergetic
energy = 0.3 # in MeV
:stop spectrum:
:start shape:
type = point
position = 0 0 100 # in cm : z=+1m
:stop shape:
:stop source:
Now i want to step up to a rectangular plane source.
Particles move parallel, same z starting plane, same direction, only from a rectangle of 2x2 cm
I tried:
:start source:
name = a_parallel_beam
library = egs_parallel_beam
:start shape:
library = egs_rectangle
rectangle = -1 -1 1 1
position = 0 0 100
:stop shape:
:start spectrum:
type = monoenergetic
energy = 0.3
:stop spectrum:
direction = 0 0 -1
charge = -1
:stop source:
This does not work since the egs_rectangle only knows about x and y and not about position in z direction.
How do I get EGS to start particles from a rectangle -1 -1 1 1 at z = +100 ?
Beta Was this translation helpful? Give feedback.
All reactions