22.05.2014 Views

CERN Program Library Long Writeup W5013 - CERNLIB ...

CERN Program Library Long Writeup W5013 - CERNLIB ...

CERN Program Library Long Writeup W5013 - CERNLIB ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geant 3.16 GEANT User’s Guide TRAK500<br />

Origin : R.Brun, M.Hansroul Submitted: 01.10.81<br />

Revision : Revised: 16.12.93<br />

Documentation :<br />

Tracking routines in magnetic field<br />

CALL GUSWIM<br />

(CHARGE,STEP,VECT,VOUT*)<br />

CHARGE<br />

STEP<br />

VECT<br />

VOUT<br />

(REAL) particle charge in e unit;<br />

(REAL) step size in cm;<br />

(REAL) array of 7 with the initial coordinates, direction cosines and momentum (x, y, z, p x /p,<br />

p y /p, p z /p, p);<br />

(REAL) array of 7 with the final coordinates, direction cosines and momentum after the step.<br />

This is the steering routine for calculating the deviation of a charged particle in magnetic field. It is called<br />

by the GEANT tracking routines: GTELEC, GTHADR, GTMUON and GTHION. Even if this routine follows the<br />

naming conventions of the user routines, the version provided in the GEANT library is quite adequate for<br />

most situation, and users should have a very good reason to modify it.<br />

It calls GRKUTA, GHELIX, GHELX3 according to the value 1, 2 or 3 of IFIELD in common /GCTMED/. IFIELD<br />

correspond to the argument to the GSTMED routine (see [CONS200]). IFIELD = -1 is reserved for user<br />

decision in case GUSWIM is modified by the user.<br />

CALL GHELX3<br />

(FIELD,STEP,VECT,VOUT*)<br />

FIELD<br />

STEP<br />

VECT<br />

VOUT<br />

(REAL) field value in kilo-Gauss multiplied by the charge of the particle in e units;<br />

(REAL) step size in cm;<br />

(REAL) array of 7, same as for GUSWIM;<br />

(REAL) array of 7, same as for GUSWIM;<br />

Transport the particle by a length STEP in a magnetic field. The field is assumed to be uniform and parallel<br />

to the z axis. The value of the field is the FIELDM argument to the GSTMED routine (see [CONS200]). The<br />

particle is transported along an helix. The call to this routine is selected by GUSWIM when IFIELD=3 in the<br />

call to GSTMED.<br />

CALL GHELIX<br />

(CHARGE,STEP,VECT,VOUT*)<br />

CHARGE<br />

STEP<br />

VECT<br />

VOUT<br />

(REAL) particle charge in e units;<br />

(REAL) step size in cm;<br />

(REAL) array of 7, same as for GUSWIM;<br />

(REAL) array of 7, same as for GUSWIM;<br />

Transport the particle by a length STEP in a magnetic field. The magnetic field is calculated in the middle of<br />

the step (along a straight line) and it is supposed to be constant along the step and the particle is transported<br />

along an helix. The call to this routine is selected by GUSWIM when IFIELD=2 in the call to GSTMED. This<br />

routine is intended for magnetic fields with a small gradient. The value of the field is obtained from the<br />

routine GUFLD which must be coded by the user.<br />

350 TRAK500 – 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!