11.07.2015 Views

ZGOUBI USERS' GUIDE - HEP

ZGOUBI USERS' GUIDE - HEP

ZGOUBI USERS' GUIDE - HEP

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

72 4 DESCRIPTION OF THE AVAILABLE PROCEDURESŽ¼{ww{CARTEMES: 2-D Cartesian uniform mesh magnetic field mapCARTEMES was originally dedicated to the reading and processing of the measured median plane field maps of the QDDspectrometer SPES2 at Saclay. However, it can be used for the reading of any other 2-D median plane maps, providedthat the format of the field data storage file fits the following FORTRAN sequenceOPEN (UNIT = NL, FILE = FNAME, STATUS = ‘OLD’ [,FORM=’UNFORMATTED’])IF (BINARY) THENREAD(NL) (Y(J), J=1, JY)ELSEREAD(NL,FMT=’(10F8.2)’) (Y(J), J=1, JY)ENDIFDO 1 I=1, IXIF (BINARY) THENREAD(NL) X(I), (BMES(I,J), J=1, JY)ELSEREAD(NL,FMT=’(10F8.1)’) X(I), (BMES(I,J), J=1, JY)ENDIF1 CONTINUE¤§ where, and are the number of longitudinal and transverse horizontal nodes of the uniform mesh, § ¤ and ,their coordinates. FNAME is the file containing the field data. For binary files, FNAME must begin with ‘B ’ or ‘b ’, aflag ‘BINARY’ will thus be set to ‘.TRUE.’.The measured field BMES is normalized with BNORM,|{ {¤" BMESIBNORM¡ As well the longitudinal coordinate X is normalized with a XNORM coefficient (usefull to convert to centimeters, theworking units in zgoubi .The vector field, ¡ , and its derivatives out of the median plane are calculated by means of a second or fourth orderpolynomial interpolation, depending on the value of the parameter IORDRE (IORDRE = 2, 25 or 4, see section 1.4.2).¤"In case a particle exits the mesh, its IEX flag is set to w q (see section 4.6.8 on page 135), however it is still tracked with thefield being extrapolated from the closest mesh nodes of the map. Note that such extrapolation process may induce eraticbehavior if the distance from the mesh gets too large.Entrance and/or exit integration boundaries can be defined with the flag ¤ O , as follows (Fig. 15).If ’&¿ ·: the integration in the field is terminated on a boundary with equation ´ ) § ¡ ) ² ) \, and then thetrajectories are extrapolated linearly onto the exit end of the map.If ’&¿ wa·: an entrance boundary is defined, with equation ´ ) § ¡ ) ² ) »\, up to which trajectories are firstextrapolated linearly from the map entrance end, prior to being integrated in the field.Ifterminates on the last ’&¿O (¤: one entrance boundary, ¤`O q and exit boundaries are defined, as above. The integration in the field) exit boundary. No extrapolation onto the map exit end is performed in this case.q

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

Saved successfully!

Ooh no, something went wrong!