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.

• GHELX3 for uniform fields along the z axis, IFIELD=3).<br />

GRKUTA and GHELIX call the user subroutine GUFLD to obtain the components of the field in a given point.<br />

GHELX3 takes the value of the field from the tracking medium parameter FIELDM.<br />

5 The subroutine GUSTEP<br />

The current track parameters are available in the common /GCTRAK/ together with all variables necessary<br />

to the tracking routines for the control of the step size. In addition, a few flags and variables are stored in<br />

the common block /GCTRAK/ to record the history of the current step:<br />

• The flag INWVOL informs on the boundary crossing:<br />

0 transport inside a volume;<br />

1 entering a new volume or beginning of new track;<br />

2 exiting a volume;<br />

3 exiting the first mother;<br />

• The flag ISTOP informs on the particle status:<br />

0 normal transport;<br />

1 particle has disappeared (decay, interaction...);<br />

2 particle has crossed a threshold (time, energy...).<br />

• The array LMEC informs on the mechanisms active in the current step. The mechanism names are<br />

stored in ASCII equivalent in LMEC(1...NMEC).<br />

• The total energy loss in the current step is stored in the variable DESTEP.<br />

This information is necessary for the user to take the proper actions in the subroutine GUSTEP which is called<br />

by GTRACK at the end of every step and when entering a new volume.<br />

The variable NGKINE in common /GCKING/ contains the number of secondary particles generated at every<br />

step, and which are stored in the same common. Depending on the application and on the particle type the<br />

user may then take the appropriate action in GUSTEP:<br />

• ignore the particle;<br />

• store the secondary produced in the JSTAK stack for further tracking;<br />

• store the secondary also in the JKINE/JVERTX structure where it will be kept till the end of the event.<br />

6 Connection with the detector response package<br />

The detector response package ([HITS]) allows to establish a correspondence between the volumes seen<br />

by the particle and the active components of the detectors. When entering a new volume in GTRACK the<br />

subroutine GFINDS is called. If the volume has been declared by the user as a sensitive detector through<br />

appropriate calls to GSDET and if the corresponding tracking medium constant ISVOL is non zero, GFINDS<br />

fills the common block /GCSETS/ with the information to identify uniquely the detector component. This<br />

enables the user, in GUSTEP, to record the hits in the proper JHITS substructure [HITS].<br />

7 Connection with the drawing package<br />

The coordinates of the space points generated during the tracking are available at each step in the common<br />

block/GCTRAK/. InGUSTEP the user can store them in the structure JXYZ with the help of the subroutine<br />

GSXYZ. This information can be used later for debugging (subroutine GPJXYZ) or for the graphical representation<br />

of the particle trajectories [DRAW].<br />

334 TRAK001 – 3

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

Saved successfully!

Ooh no, something went wrong!