|Message: g4generalparticlesource gun alignment||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I am using G4GeneralParticleSource to originate particles at the same point position with a randomized theta, and eventually phi, too. This gives me a randomized firing cone. I can get the firing pattern I want, but it is not aligned with my detector, which is based at 0,0,0. Previously, I fired particles along the Z axis with direction (0,0,-1), starting at (0,0,1990). Now I want to give a slight x/y value for direction, i.e. randomized theta and phi. Here is the gps macro I am using: /gps/verbose 2 /gps/particle pi+ /gps/number 1 /gps/position 0 0 199 cm /gps/type Point # iso cos planar beam1d beam2d user /gps/angtype cos /gps/angrot1 1 0 0 /gps/angrot2 1 1 0 /gps/mintheta 0 deg /gps/maxtheta 10 deg /gps/minphi 0 deg /gps/maxphi 0 deg /gps/energytype Lin /gps/emin 2 GeV /gps/emax 10 GeV /gps/gradient 1 /gps/intercept 1 # tbeam run /tbeam/partNum 10 /tbeam/doRun 1 -- The theta distribution is not centered on the Z axis, but goes from 0 to 10 deg. I need some way to "realign" the gun, so that the cone is centered in the middle of the first surface of the detector. I thought I should use angrot1/rot2, because these seem to be the commands for changing the gun's coordinate system. But I haven't been able to get it firing in the "center" of my detector. Here is a screenshot of 10 particles, where the firing pattern is not aligned in the center of the first detector plane: http://nicadd.niu.edu/~jeremy/g4proj/tb-misaligned.gif I just want to adjust the relative coordinate system of the gun so my theta/phi distributions are centered along the Z axis. All my attempts at setting of min/max theta/phi or angrot1/2 haven't solved this problem for me. Thanks, and let me know if more info is needed. --Jeremy
|Inline Depth:||Outline Depth:||Add message:|