Message: g4generalparticlesource gun alignment Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None g4generalparticlesource gun alignment 

Forum: Event and Track Management
Date: 17 Oct, 2003
From: Jeremy McCormick <Jeremy McCormick>

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:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: g4generalparticlesource gun alignment   (Fan Lei - 20 Oct, 2003)
1 None: Re: g4generalparticlesource gun alignment   (Jeremy - 20 Oct, 2003)
2 None: Re: g4generalparticlesource gun alignment   (Fan Lei - 20 Oct, 2003)
 Add Message Add Message
to: "g4generalparticlesource gun alignment"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]