Hey,
Here is just a very short routine to give you the correct vertex in a
generator. It's quicker than the rejection method. I took a look at
several generators in cvs and could not find how the vertex was
calculated in those programs. The x and y parts of the vertex mostly
depend on the size of the electron beam which is small (1mm) and mostly
gaussian but has a long tail. For now, it is probably best to generate
events on axis since going off axis does not change the acceptance much.
TAR(3) = targetlength/2.
C**** The distribution along the target cell (z axis) is triangular.
C**** Used the inversion/transformation technique.
C**** (See Numerical Recipes 7.2)
VERTEX(1) = 0.0
VERTEX(2) = 0.0
CALL GRNDM (RAN,1)
IF (RAN(1).LT.0.5) THEN
VERTEX(3) = -TAR(3) +TAR(3)*SQRT(2.0*RAN(1))
ELSE
VERTEX(3) = +TAR(3) -TAR(3)*SQRT(2.0*(1.0 -RAN(1)))
ENDIF
I hope my last minute comments are helpful.
Ed
-- ___________________________________________________________________ Ed Six Postdoc MIT-Bates Linear Accelerator Center edsix@mit.edu 21 Manning Ave. tel: (617) 253-9217 Middleton, MA 01949 fax: (617) 253-9599
This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:28 EST