\documentstyle[12pt,epsfig]{article} % \raggedright \setlength{\parskip}{0.20cm} %\setlength{\parindent}{0.8cm} \setlength{\oddsidemargin}{-.25in} \setlength{\evensidemargin}{-0.25in} \setlength{\textwidth}{6.5in} \setlength{\topmargin}{-0.5in} \setlength{\textheight}{9.0in} \begin{document} \begin{center} {\Large \bf TRIUMF Experiment E614 \\} {\Large \bf Technical Note \\} \vspace{0.4cm} {\Large \bf A Users Guide to E614 GEANT \\} \vspace{0.4cm} \rm{\bf D.H. Wright, TRIUMF \\} \vspace{0.4cm} \rm{\bf 30 March 1999 \\} \end{center} \begin{abstract} E614 GEANT V1.2 has been released. It is intended for the study of the E614 spectrometer and beam within $\pm$ 300 cm of the center of the spectrometer. It does not contain the pion production target or channel optics. User control of kinematic options, decay parameters, tracking parameters, histogramming and data output, is provided. The detector geometry adopted at the May 1998 collaboration meeting is incorporated and read in from a master geometry file which will also be read by any future analysis programs. The organization and location of the source code is discussed, several user routines are described, and useful input files are listed and discussed. \end{abstract} {\large \bf Philosophy \\} The scope of E614 GEANT V1.2 is limited to the spectrometer and the beamline immediately upstream and downstream of it. Other simulations (GEANT, REVMOC, ZGOUBI) currently treat the pion production target and beamline separately with the idea that files of beam rays can be generated and then used as input by the spectrometer GEANT. A similar separation has been adopted for the production and analysis of data. GEANT should be used primarily for histogramming, digitization and data output and not for high-level data analysis such as track fitting. The current version exactly mimics the packed binary files generated by the data acquisition system so that only one analysis code will be necessary. Extensive control of the simulation is provided for the user through command files and user routines. As much as possible, user code should be limited to a few routines mentioned below so that the overall code remains manageable. \\ {\large \bf Organization \\} The code has been tested on UNIX and IRIX. LINUX and HPUX will follow at a later date. The code resides in CVS format on the Alpha UNIX machine \hspace{0.3cm} mitch.triumf.ca \hspace{0.3cm}. To find out how to get a working copy on your machine log on to mitch and read /usr/users/e614/distribution/000README . The Makefiles and source code for version 1.2 reside in the subdirectory $\sim$/source . Command files, input files and data and histogram output files reside in $\sim$/run . The executable image is in $\sim$/bin . A GEANT batch job is begun as follows: \\ \begin{center} e614.com $>$ test.log \& \end{center} The file \verb+ e614.com + sets up three input files. The first, \verb+ e614.ffcards +, contains user commands to control the running of the simulation and will be discussed in detail below. The second, \verb+ testbeam.dat +, is a file of beam rays which is used to initiate events if the RAYS option is chosen. The third, \verb+ dt_geo.00011 +, contains the parameters which describe the geometry of the E614 detector. This file is listed below and is intended as a standard to which both Monte Carlo simulations and data analysis codes can refer. The extension ``00011'' refers to the file version number which will be updated as changes occur. In the future other input files may be added, such as magnetic field maps. Three output files are also set up. \verb+ run1.dat + will contain fully digitized data which is essentially indistinguishable from real data and can serve as input to the data analysis code. \verb+ hits1.dat + contains undigitized (ASCII) data which is meant for use as a diagnostic tool. \verb+ run1.hbook + contains all the HBOOK histograms which have been defined for the run and can be viewed directly with PAW++. Finally \verb+ e614.com + runs the executable image from the /bin directory and deposits all diagnostic information in the file \verb+ test.log +. \\ {\large \bf Program flow \\} The chart on the following page shows the organization and flow of the major routines in GEANT. It has been modified from one appearing in the GEANT manual \cite{GEA}. Subroutine names beginning with the letters GU or UG are user routines and are intended to provide user control at various levels of run simulation. All other routines, at least officially, are transparent to the user. In the chart, an indentation indicates that a routine is called by the routine immediately above it. \newpage \begin{verbatim} ->GUMAIN main routine -> UGINIT user initialization GINIT initialization of GEANT variables GFFGO interpretation of data records (command input, etc.) GPART/GSPART creation of particle data table GMATE/GSMATE creation of material data table -> UGEOM description of experiment geometry GPHYSI set up cross section and energy loss tables GRUN loop over events in a run GTRIGI initialize event processing GTRIG process event -> GUKINE user generation of initial kinematics -> GUTREV user control of event process GTREVE loop over all tracks, including secondaries -> GUTRAK user control of track handling GTRACK tracking of current event GMEDIA find current volume and tracking medium GTVOL loop over media seen by particle GTGAMA, GTELEC, GTHADR, etc tracking according to particle type -> GUSTEP user control after each step in a track - record hits, histogram data, check track conditions, etc. -> GUDIGI user control of data digitization - collect data stored during GUSTEP -> GUOUT user control of data output - write to disk or tape GTRIGC clear memory for next event -> UGLAST user routine to close files, histogramming GLAST standard GEANT termination \end{verbatim} \newpage {\large \bf Major User Routines \\} Of the user routines listed in the above flow chart, the most useful and the most important for an understanding of the simulation are UGEOM and GUSTEP. The next most important routines are perhaps GUKINE and GUDIGI. All detector geometry and mass distribution is performed in UGEOM. The geometry in V1.2 was adopted at the May 1998 collaboration meeting and contains pairs of drift chambers separated by helium gaps, and proportional chambers, all arranged symmetrically about the origin where the stopping target is placed. On the upstream side a variable gas absorber and a time expansion chamber for muon tracking have been added. The materials used to build the detector are synthesized in the routines in \verb+ material.f +, which are called before UGEOM. The essential geometrical data required to build the detector is read in from the file \verb+dt_geo.00011+ and stored in the common block \verb+detgeom+ which is found in the file \verb+detect_geom.inc+ in $\sim$/1.2/source . UGEOM accesses this common block to construct the detector subsystems as shown below. \begin{verbatim} UGEOM - set up world and beamline geometries, then call: MAGNET_GEOM - to date only upstream and downstream faces of magnet yoke are implemented CHAMBER_GEOM - read in detector geometry from file, divide main volume into upstream, central and downstream sub-volumes, make lamels, spacer rings, glass frames, foil support rings, variable gas absorber, and time expansion chamber, then call: DRIFT_GEOM - build and position drift chambers PROP_GEOM - build and position proportional chambers TARG_GEOM - build target, holder, and surrounding CF4_ISO volume SCINT_GEOM - position plastic scintillator trigger \end{verbatim} The strategy followed in this version of UGEOM is to nest volumes within volumes to a fairly deep level in order to speed up the tracking. Many volumes have been added for purely organizational purposes and do not represent physical detector parts. The price paid for the increased speed is that the absolute coordinates for a particular nested volume are not immediately obvious from the arguments of the subroutine GSPOS which positions it. This same property sometimes makes it difficult to check that two volumes do not overlap one another. The coordinate system adopted for E614 has the positive $z$ axis running downstream along the beam axis, the positive $y$ axis pointing up, and the positive $x$ axis extending to the right as one looks upstream. The origin is at the center of the detector where the stopping target is placed. The direction parallel to the positive $z$ axis is defined to have polar angle $\theta = 0$. Looking upstream, a counter-clockwise rotation about the $z$ axis is defined as a positive azimuthal angle $\phi$, with $\phi = 0$ pointing along the positive $x$ axis. The chamber numbering convention is to assign a different sequence to each type of chamber, beginning with 1 upstream and increasing downstream. For the geometry of V1.2, this means that the upstream-most drift chamber ($z = -49.8 $ cm) will be numbered 1 and the downstream-most drift chamber ($z = 49.8$ cm) will be numbered 44. In the same way the proportional chambers will be labeled 1 through 12. The routine GUSTEP provides an opportunity for user action at the end of each step within a particle track. The commons GCKINE, GCKING, GCTRAK and GCVOLU provide access to nearly all the information required to establish the state of a particle after any step of any track in an event. These commons are found in the files \verb+gckine.inc+, \verb+gcking.inc+, \verb+gctrak.inc+ and \verb+gcvolu.inc+ in the $\sim$/1.2/source directory. For example, the common GCTRAK contains the array VECT. The first three elements of VECT give the location of a particle at the end of a step, the next three elements give the direction, and the final element gives the total momentum of the particle. Hence in GUSTEP the user might histogram the momentum of a given particle as it enters or leaves a particular volume. Because GUSTEP gives access to the tracking at its most detailed level, it is tempting to perform all calculations and histogramming in this routine. However this would result in slow and unwieldy code which would be difficult to debug. Calculations or histogramming involving conditions at the beginning or end of tracks, as opposed to steps, should be carried out in the user routine GUTRAK. For similar tasks at the beginning or end of events, the routine GUTREV should be used. A few lines of GUSTEP should not be altered. As discussed in the next section, muon spin was added outside the GEANT framework. As a result the spin of the muon must be propagated at each step, hence the call to SPINPROP in GUSTEP. Any added user code should be placed after this call. Also, in the special case of $\pi^+$ decay, some permanent code is required to ensure that a muon with spin is produced as a daughter particle and that its spin is correctly oriented. The routine GUKINE allows the user to establish initial conditions for events within a run. It then initiates each event by creating a vertex for it. In V1.2, four event generators are implemented which are described in the FFCARDS section. They generate mono-energetic particles, simulate a beam of particles, read a set of beam rays from a file, or generate decay particles originating from a given stopping distribution. More event generators can be added as the need arises, with the convention that each new generator is paired with a new command line in the \verb+.ffcards+ file. In GUSTEP there is a call to the routine STORE\_TRACK\_SEGMENTS which records the state of a particle as it enters and leaves certain senstive detector volumes. The routine GUDIGI retrieves this information and digitizes it in two forms. One form contains ideal tracking information such as points of closest approach to a sense wire and the particles responsible for each wire hit. This information is later written to an ASCII file for use in debugging or otherwise understanding the detector. The other form is a full digitization of the drift time data in a format identical to that produced by the 1877 TDCs to be used in E614. The YBOS standard for data storage has been adopted and the latest version (4.0) is being used. \\ {\large \bf Physics Added to V1.2 \\} GEANT Version 3.21 does not create, nor does it track, particles with spin. Spin tracking capability was added to E614 GEANT V1.2 by P. Gumplinger \cite{Gum96} for $\mu^+$ particles only. For this purpose a new particle type (65) was added to distinguish a muon with spin from one without (particle type 5). The muon with spin decays to a positron with an energy spectrum determined by the Michel parameters, $\xi, \rho, \delta$ and $\eta$. First order radiative corrections are included. The GEANT muon without spin decays according to phase space only. The BMT equation is used to track the muon spin. This is accomplished numerically by using a second order Runge-Kutta integration. In future versions, physics for the tracking of $e^+$ and $e^-$ at energies below 10 keV will be added using the knowledge gained by the MEGA collaboration \cite{Pii97}. As E614 proceeds, information on the physics of low energy muons in materials will also become available which will be used to extend E614 GEANT. \\ {\large \bf The FFCARDS file \\} By convention, filenames ending in \verb+.ffcards+ contain the user command lines for GEANT. A sample \verb+.ffcards+ file is included here for reference. \begin{verbatim} Input card file for E614 C C Input random numbers C RNDM 2022721138 294518323 C C Input run number C 1st entry: run number C 2nd entry: number of first event C RUNG 113 1 C C Time factors (see GEANT manual) C TIME 2=10. 3=-1.00 C C Number of events to run C TRIG 3 C C Maximum number of steps and maximum path length C MAXS 30000 4000. C C Debug card C 1st entry: first event # to debug C 2nd entry: last event # to debug C 3rd entry: print out every n events C DEBU 0 0 0 C C Control switch definitions (see GEANT manual re SWIT 1 and 2) C ISWIT(2) = 2 Prints out end of step information when DEBUG is active C C ISWIT(10) is used to turn on the output of the hits C = 0 no digitization performed (for fast execution) C = 1 writes simulated TDC data to disk file C = 2 writes ASCII data to disk file C SWIT 0 0 0 0 0 0 0 0 0 1 C C Mono-energetic particle: C 1st entry: part. type C 2nd, 3rd: total momentum(MeV/c), theta (degrees) (phi random) C 4th-6th: px,py,pz only if entry 2 is <= 0. C 7th-9th: starting point of track (x,y,z) C 10th,11th: sigma x, sigma y of track starting point C 12th: halfwidth of flat starting point dist. in z C MONO 2 50.0 45.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.5 0.00375 C C Beam parameters: C 1st entry: part. type C 2nd-4th: initial momentum(3)(MeV/c) C 5th: mom. spread(sigma in %) C 6th,7th: sigma thetax,sigma thetay (radians) C 8th-10th: origin(3) C 11th,12th: sigma x, sigma y C 13th: distance along z axis to project beam (- upstream, + downstream) C BEAM -65 0.0 0.0 29.7 0.5 0.006 0.006 0.0 0.0 -160.0 0.6 0.6 -140.0 C C Read-in beam rays: C 1st entry: part. type C 2nd: central beam momentum(MeV/c) C 3rd-5th: coordinates of focus C 6th,7th: overall direction of beam (theta,phi) (degrees) C [SO FAR ONLY THETA=0, PHI=0 ALLOWED] C 8th: distance to project rays (- upstream, + downstream) C RAYS -4 29.7 0.0 0.0 -100.0 0.0 0.0 -50.0 C C Distribution and orientation of initial stopped particles C 1st entry: part. type C 2nd-4th: centroid of stopping distribution C 5th,6th: sigma x, sigma y of stopping dist. C 7th: half-width of flat stopping dist. in z C 8th,9th: upper, lower limits of initial spin polar angle (degrees) C (ignored for all particles except mu+ with spin) C DOSP -65 0.0 0.0 0.0 0.45 0.45 0.00375 180.0 175.0 C C AUTO 1 (default) allows automatic calulation of tracking parameters C (except EPSIL) C AUTO 0 turns off automatic calculation unless parameters are < 0 C AUTO 0 C C Step length limiting parameters C 1st entry: 1- enable parameter change, 0 - disable (use defaults) C 2nd: max allowed turning angle (degrees) of track due to B (tmaxfd) C 3rd-4th: stemax, deemax C 5th: boundary crossing precision (in cm) (epsil) C 6th: stmin C 7th-9th: 3 spares C STPL 1 10.0 -1.0 -0.01 0.00002 -0.001 0. 0. 0. C C Magnetic field C IFIELD: 3 for uniform field, 1 for non-uniform field C FIELDM: maximum field in kGauss (see GEANT manual, routine GSTMED) C BFLD 3 22. C C GEANT histograms C HSTA 'TIME' provides histogram of CPU time per event C HSTA 'TIME' C C Low energy cutoffs - no tracking below these values (GeV) C CUTS 0.0005 0.00002 0.0005 0.0005 0.00001 C C Pion decay branch C 1 : pi+ -> mu+ nu mu has no spin C 2 : pi+ -> e+ nu C 3 : pi+ -> mu+ nu mu has spin C PIBR 1 C C Set Michel parameters C First entry not used (can be any integer) C 2nd through 5th entries: rho, delta, xi, eta C MCHL 1 0.75 0.75 1.00 0.00 C C Physics flags C C DCAY =0 decay not allowed C DCAY =1 allow decay, track secondaries C DCAY =2 allow decay, don't generate secondaries C DCAY 2 ANNI 0 COMP 1 PAIR 1 BREM 1 PHOT 1 MUNU 1 LOSS 2 MULS 2 HADR 0 ERAN 0.000001 1.0 160 STOP \end{verbatim} The first line of any \verb+ .ffcards + file is a comment which is read in by GEANT. All lines beginning with ``C'' are ignored. All other cards begin with a four-letter mnemonic which is the GEANT command, followed by arguments required by that command. The order of the command lines is not important. Most of the command lines are explained by comments immediately above them in the sample \verb+ .ffcards + file. A few require more explanation. The RNDM command sets the initial GEANT random number to the two (up to 10-digit) numbers entered. When statistics are important and Monte Carlo runs are being combined, the random seed entered for a given run should be identical to that listed in the \verb+.log+ file at the end of the previous run. The ISWIT line is provided by GEANT to allow general user control. Up to 10 switch values may be specified, each of which corresponds to user- programmed actions. In V1.2 only two switches are implemented. SWIT(2) = 2 prints out to the \verb+.log+ file useful information at the end of every step, while SWIT(2) = 0 turns off this feature. SWIT(10) = 2 allows digitization of the detector data and prints it out in ASCII format to a disk file or tape. SWIT(10) = 1 performs a full TDC and ADC digitization of the detector data which is then written to a file in the packed format identical to that generated by the data acquisition system. This file can then be used as an input to the data analysis code. SWIT(10) = 0 turns off digitization altogether, significantly reducing CPU time per event. The number of switches available make it tempting to use this command as an all-purpose user hook into any GEANT routine. Such use, however, defeats the purpose of the user-defined commands discussed below. It is therefore proposed that the SWIT command be used only for directing I/O and for temporary command development. A switch which has been found particularly useful should then be formalized as a user-defined command with its own mnemonic, and the old switch value should be recycled. The lines beginning with MONO, BEAM, RAYS and DOSP are user-defined commands each of which corresponds to an event generator. Their arguments describe the initial kinematics of a simulated event. In each case the first argument indicates the GEANT particle number to be generated. These numbers are given in the GEANT manual and a subset is listed in Table I. If this value is negative, that particular event generator is turned off. Note that only one event generator may have a positive value for a given run. A safeguard has been added which prevents running when more than one kinematic generator is enabled. MONO specifies a mono-energetic particle by its GEANT particle type, initial momentum and origin. In the sample \verb+.ffcards+ file, a positron of 50 MeV/c is released at a polar angle of 45 degrees from a distribution about the origin of the spectrometer (the target). The 1 $\sigma$ width of the distribution in both $x$ and $y$ is 0.5 cm. The distribution in $z$ is flat over a distance of 0.0075 cm (target thickness). The BEAM line specifies an incident beam of particles as described by comments in the \verb+.ffcards+ file. The RAYS line assumes that a file of beam rays has been generated (e.g. by REVMOC) and read in at initialization time. It allows the focus of the beam to be moved and the beam rays to be projected upstream or downstream to a convenient starting place. DOSP bypasses the initial beam and allows for tracks to be generated from an already known stopping distribution, such as that in the target. The range of particle spin directions can also be set. \begin{table} \begin{center} \begin{tabular}{|c|c|} \hline Particle \# & Particle \\ \hline 1 & $\gamma$ \\ 2 & $e^+$ \\ 3 & $e^-$ \\ 4 & $\nu$ \\ 5 & $\mu^+$ \\ 6 & $\mu^-$ \\ 8 & $\pi^+$ \\ 9 & $\pi^-$ \\ 65 & $\mu^+$ with spin \\ \hline \end{tabular} \caption{A subset of GEANT particle numbers} \end{center} \end{table} The AUTO and STPL commands work in conjunction and their arguments should not be changed without a careful study of the consequences. The second, third and fourth parameters listed after the STPL command are limits on the turning angle due to magnetic field (degrees), maximum step size (cm), and fractional energy loss that may occur in any step. The fifth parameter (EPSIL) sets the precision with which volume boundaries are calculated (cm) and the sixth parameter sets the minimum of all the maximum step lengths due to energy loss, multiple scattering or magnetic field effects. Usually GEANT does a good job of setting these parameters automatically, in which case the AUTO flag would be set to 1. However, for E614 more precise boundary crossing calculations are required and the parameter EPSIL must be fixed at 0.00002 cm. Also, because precision tracking in a magnetic field is important, the maximum turning angle (TMAXFD) must be limited to 10$^\circ$ or less. All other limits may be left for GEANT to calculate by setting AUTO to 0. In this case any parameter in the STPL list whose value is negative will be calculated by GEANT while any positive values such as the second (TMAXFD) and fifth (EPSIL) will retain their listed value. The magnetic field command BFLD requires that a map of the magnetic field be available if the non-uniform field option (first argument = 1) is chosen. The file read by V1.2 is \verb+ field_map.0001 + which resides in the $\sim$/run subdirectory. It maps the solenoidal field over the volume $0 < z < 300$ cm and $0 < r < 30$ cm and was generated using the Opera-2D finite element code. This file is recommended for use in studying the muon beam. For studies of the detector and its response to positron tracks, no file is required in V1.2 because a uniform magnetic field along the beam axis is sufficient in most cases. The CUTS command sets the energies below which particles are no longer tracked by GEANT. The five arguments correspond to the low energy cutoffs 500 keV, 20 keV, 500 keV, 500 keV and 10 keV for photons, positrons/electrons, neutrons, hadrons and muons, respectively. The PIBR command chooses a particular branch of $\pi^+$ decay and sets its branching ratio to 100\%. Two types of $\pi \mu \nu$ decay are provided, one which produces a muon with spin and the other which does not. The physics flags control various processes during tracking. An argument of 0 turns off the indicated process, and 1 turns it on. If the argument is 2, the process is turned on but there is no generation of secondaries. In the sample file, particle decay is allowed but no secondaries are produced (DCAY 2). No annihilation is allowed (ANNI 0) nor are hadronic interactions (HADR 0). Compton scattering, pair production, bremmstrahlung and photo-electric effect are all allowed (COMP 1, PAIR 1, BREM 1, PHOT 1). In the case of energy loss (LOSS), the argument can range from 0 to 4. LOSS 1 enables continuous energy loss with generation of $\delta$ rays above the cutoff DCUTE and restricted Landau fluctuations below DCUTE. The sample file uses LOSS 2 in which there is continuous energy loss, no $\delta$ rays, and full Landau-Vavilov-Gauss fluctuations. LOSS 3 is the same as LOSS 1. LOSS 4 uses energy loss directly from tables without fluctuations. Multiple scattering (MULS) is sampled from Moliere theory if the argument is 1 or 2 and from Gaussian scattering if the argument is 3. Finally ERAN sets the energy range over which the physics cross sections are calculated. In the example, the range chosen is 1 keV to 1 GeV with 160 logarithmic energy bins. These values have been chosen to optimize the speed and accuracy of the E614 simulation and should not be changed without a thorough study of the consequences. \\ {\large \bf Master Geometry File \\} The current master geometry file, from which both simulation and analysis codes will draw their information, is \verb+dt_geo.00011+ . It specifies, in absolute coordinates, the dimensions, locations, orientations and numbers of the mylar foils and sense wires that make up the E614 detector. In V1.2 it also specifies the plastic scintillators to be used as beam monitors. All of the data in this file is either self-explanatory or explained by comments, with the exception of the columns labled ``shift'' and ``rotation''. When a wire plane has a rotation value of 0, the sense wires are parallel to the $y$ axis, that is, up and down. By convention this is called an $x$ plane because it provides $x$ coordinates for tracks. When the rotation value is 90, the sense wires are parallel to the $x$ axis, and the plane is called a $y$ plane. At the May 1998 collaboration meeting it was agreed that the entire detector be rotated in $\phi$ by +45$^\circ$. In V1.2 this has not yet been implemented. The shift value indicates (in cm) how far a plane is to be shifted along the $x$ axis before it is rotated. Its purpose is to stagger the sense wires of adjacent planes so that right-left ambiguities in the tracking will be easier to sort out. For planes with 80 sense wires, a wire spacing of 0.4 cm and shift values of 0, the $z$ axis passes midway between sense wires 40 and 41. If the shift value is -0.2, the $z$ axis passes through the center of wire 41. Here the convention is that wires within an unrotated plane are numbered from left to right looking upstream. \begin{verbatim} C C E614 master geometry file C C Coordinate system: origin at center of stopping target C +z along beam direction (downstream) C +y up C +x to the right looking upstream C C All dimensions in cm C DRFT C ********************************************************** C C Drift chambers C C ********************************************************** C Mylar foils defining drift planes C Line 1: radius, thickness of mylar foil C Line 2: # of foils in DC assembly C Lines 3-12: z-coords. of foils starting with #1 C upstream and counting downstream C + 17.5 0.000635 60 -50.0 -49.6 -49.2 -48.8 -48.4 -48.0 -47.6 -47.2 -46.8 -42.4 -42.0 -41.6 -35.2 -34.8 -34.4 -30.0 -29.6 -29.2 -22.8 -22.4 -22.0 -17.6 -17.2 -16.8 -10.4 -10.0 -9.6 -5.2 -4.8 -4.4 4.4 4.8 5.2 9.6 10.0 10.4 16.8 17.2 17.6 22.0 22.4 22.8 29.2 29.6 30.0 34.4 34.8 35.2 41.6 42.0 42.4 46.8 47.2 47.6 48.0 48.4 48.8 49.2 49.6 50.0 C C DME drift planes and sense wires C Line 1: radius, length of sense wire, wire spacing, C number of physical wires per plane C Line 2: number of drift planes, thickness of gas volume C in drift plane C + 0.00075 35.0 0.4 80 44 0.399365 C C Plane# z shift rotation wires/plane C + 1 -49.8 0.0 0.0 48 2 -49.4 0.0 90.0 48 3 -49.0 -0.2 0.0 48 4 -48.6 -0.2 90.0 48 5 -48.2 0.0 0.0 48 6 -47.8 0.0 90.0 48 7 -47.4 -0.2 0.0 80 8 -47.0 -0.2 90.0 80 9 -42.2 0.0 0.0 80 10 -41.8 0.0 90.0 80 11 -35.0 -0.2 0.0 80 12 -34.6 -0.2 90.0 80 13 -29.8 0.0 0.0 80 14 -29.4 0.0 90.0 80 15 -22.6 -0.2 0.0 80 16 -22.2 -0.2 90.0 80 17 -17.4 0.0 0.0 80 18 -17.0 0.0 90.0 80 19 -10.2 -0.2 0.0 80 20 -9.8 -0.2 90.0 80 21 -5.0 0.0 0.0 80 22 -4.6 0.0 90.0 80 23 4.6 0.0 90.0 80 24 5.0 0.0 0.0 80 25 9.8 -0.2 90.0 80 26 10.2 -0.2 0.0 80 27 17.0 0.0 90.0 80 28 17.4 0.0 0.0 80 29 22.2 -0.2 90.0 80 30 22.6 -0.2 0.0 80 31 29.4 0.0 90.0 80 32 29.8 0.0 0.0 80 33 34.6 -0.2 90.0 80 34 35.0 -0.2 0.0 80 35 41.8 0.0 90.0 80 36 42.2 0.0 0.0 80 37 47.0 -0.2 90.0 80 38 47.4 -0.2 0.0 80 39 47.8 0.0 90.0 48 40 48.2 0.0 0.0 48 41 48.6 -0.2 90.0 48 42 49.0 -0.2 0.0 48 43 49.4 0.0 90.0 48 44 49.8 0.0 0.0 48 PROP C C ********************************************************** C C Proportional chambers C C ********************************************************** C C Mylar foils defining PC wire planes C Line 1: radius, thickness of mylar foil C Line 2: # of foils in PC assembly C Lines 3,4: z-coords. of foils starting with #1 upstream C and counting downstream C + 17.5 0.000635 14 -60.00000 -59.60000 -59.20000 -58.80000 -58.40000 -1.20000 -0.80000 0.80000 1.20000 58.40000 58.80000 59.20000 59.60000 60.00000 C C CF4-ISO proportional planes and sense wires C Line 1: radius, length of sense wire, wire spacing C number of physical wires per plane C Line 2: number of drift planes, thickness of gas volume C + 0.00075 35.0 0.2 160 12 0.399365 C C Plane# z shift rotation wires/plane C + 1 -59.8 0.0 0.0 160 2 -59.4 0.0 90.0 160 3 -59.0 -0.1 0.0 160 4 -58.6 -0.1 90.0 160 5 -1.0 0.0 0.0 40 6 -0.6 0.0 90.0 40 7 0.6 0.0 90.0 40 8 1.0 0.0 0.0 40 9 58.6 -0.1 90.0 160 10 59.0 -0.1 0.0 160 11 59.4 0.0 90.0 160 12 59.8 0.0 0.0 160 TARG C C ********************************************************** C C Target package C C ********************************************************** C C Line 1: radius, thickness of target disk C Line 2: thickness of target holder C Line 3: number of field wires C Line 4: radius, length, spacing of filed wires C + 4.0 0.0075 0.5 320 0.00075 35.0 0.1 SCIN C C ********************************************************** C C Beam package C C ********************************************************** C C Plastic scintillator disks C Line 1: radius, thickness of scintillator disks C Line 2: # of scintillator disks C Line 3: relative z-coords. of disk centers starting with #1 C upstream and counting downstream C + 3.00 0.016 2 0.0 0.0 \end{verbatim} {\large \bf Histogramming \\} HBOOK has been adopted for E614 histogramming rather than the native GEANT histograms. HBOOK is initialized in the main program GUMAIN and histograms are defined in the routine UHINIT which is called from UGINIT. Histograms are saved and HBOOK is closed in the routine UGLAST. For reference, sample one-dimensional and two-dimensional histogram definitions are shown here: \begin{verbatim} call hbook1(81, 'Title for 1D hist', 100, 0.0, 100.0, 0) call hbook2(103, 'Title for 2D hist', 100, 0.0, 100.0, 50, -25.0, 25.0, 0) \end{verbatim} The first argument is the histogram number, for which there is at present no convention in E614. The third, fourth and fifth arguments are the number of bins, low bin value and high bin value, respectively. In the two-dimensional case, arguments 3, 4 and 5 refer to the $x$ axis of the plot while arguments 6, 7 and 8 refer to the $y$ axis of the plot. The calling sequence for these histograms is: \begin{verbatim} call hfill(81, variable, 0, 1.0) call hfill(103, variable1, variable2, 1.0) \end{verbatim} with 1.0 indicating the weight of each entry into the histogram. Note that the HFILL call is the same for both one- and two-dimensional histograms, with the second argument set to 0 in the former case. These histograms may be called from any user routine. At the end of a simulation run all histograms are written into a file with a \verb+.hbook+ extension specified in \verb+e614.com+. \\ \begin{thebibliography}{10} \bibitem{GEA} GEANT Version 3.21, CERN, Geneva 1993. \bibitem{Gum96} P. Gumplinger, section 5.2.1 of E614 NSERC Grant Application, 1996. \bibitem{Pii97} L. Piilonen, private communication, 1997. \end{thebibliography} \end{document}