Latest update 12/30/97
This is a short guide which is meant to enable you to get started using GBRAHMS, the interactive version of GEANT setup for the BRAHMS magnetic spectrometer setup. In addition to this short guide you will definitely also need the manual or the HTML pages for GEANT3.21 (often called 3.16 in the CERN documentation) and the description of the commands for the interactive version. The setup of the BRAHMS geant has undergone many revisions so what used to work may not be appropriate any more.
afs: /afs/rhic/brahms/BRAHMS_LIB/geant/[version] the version can be among the following [version] VER_DEV VER_1.4 VER_1.5 geant -- | | -- bin -|- irix ; sgi executable | | | |- aix ; RS6000 only relevant for /afs tree | | | |- linux ; For linux farm | |- lib -|- irix ; sgi object library and objects | | | |- aix | | | |- linux ; For linux farm | |- src -| - user ; Brahms specific routines | | - gene ; general geant routines | | - fms1 ; front part of forward spectrometer | | - fms2 ; back part of forward spectrometer | | - mids ; mid-rapidity spectrometer | | - global ; global detectors | |- inc
The executable exists for Linux. The program will also compile for AIX, SGI but no machines exists as such for RCF.
The GBRAHMS executable defines a standard configuration of the spectrometer. Angles, magnetic fields etc are set-table by commands. In addition it is possible to change parameters of the basic detector configuration like the size of magnet gaps, width of detectors etc.
The following is an example which defines the two arms of the forward spectrometer but do not have the mid rapidity arm included.
/afs/rhic/brahms/BRAHMS_LIB/geant/VER_DEV/bin/irix/gbrahms setup> set_tree fms1 o setup> set_tree fms2 o setup> set_tree mids o setup> geodefAt this point the standard setup is given , and the user can add more volumes interactively by commands. After this is done the setup is terminated by
setup> geodefand GEANT is now ready to accept the usual commands for selecting kinematics, triggering, display etc.
GEANT>example for mid rapidity arm
setup> set_tree fms1 z setup> set_tree fms2 z setup> set_tree mids o setup> set_param m0 angle 34 setup> set_param m0 distance 290 setup> geodef .This sets the angle to 34 deg and the center of M0 to 290 cm. The rest of the detectors in the mid-rapidity spectrometer is moved with the dipole. With the most recent setups there should be no reason to change the specific distance.
There is a common set of macro's in the globally accesible place /afs/rhic/brahms/BRAHMS_LIB/proj/macro
GEANT> macro/default '.,/afs/rhic/brahms/BRAHMS_LIB/proj/setup,/rhic_data/code/proj/macro'
GEANT>exec fms_setup#2deg-66-plus
KUIP commands for setting the input file. On VAX the following logical name must be defined. $ define tape1 hi0$event:[rhic_data]auau_lund.zdat On SGI you must have made a logical link before entering the program. >ln -is /rhic_data/data/venus/auau_venus.dat tape1 * open the event file CARDS UKIN 5 TAPE1 * set the range of the kinematic region * to 1<&< p- 50 3 theta in 8 -15 - phi - 15 KINE 1 1. 50. 3. 8. -15. 15. 8. * read the first event TRIG 1
* set D1 = -8 KG D2 = -8KG set_FIELD D1 -8 edge set_FIELD D2 -8 edge set_field M0 6 GAP ... *The command FIELD .. is now obsolete and should be avoided.
This feature is set by the command SPLIT 5. This e.g. means that at most 5 tracks are traced per GEANT run. Since the user must trigger GEANT for each sub-event there is a special command has been implemented which will trigger and call an analysis program for n real events. This can be done by issuing the command
>ANALYZE gxant 100 ie. read 100 complete events and call the routine gxant for each event and sub-event.
Example of usage: >call anantp.f >call nthst('geant_hit_ntp.hbk') >analyze ntana 100 >call ntendThis will first book the Ntuple (id no 1) and then fill it for 100 Geant events. Remember that even if the events are split over several events the numbering scheme in the Ntuple keeps track with the real event number. In this same directory is also an example how to read the Ntuple in a paw session using the COMIS routine hits.f.
The following is how this is called and used
Example of usage: >call gbr2c.f >call nthst('geant_out.cdat') >analyze ntana 100 >call ntend
The output file can be read by several programs now. The only draw back is that the files are not transportable between architectures with little endian/ big endian internal storage. The following programs/utilities can read the files.
The command to invoke the program is
gb2cwn [inoutfile] [ntuplefile],
where [inoutfile]
is the c-stream file and [ntuplefile] the name of the Ntuple file.
The data are byte swapped if need be. The output is a Column Wise Ntuple.
Code and makefile can be found in /geant/ana/gbr
directory. The program is in the gb2cwn.F (note the capital F) and the
makefile is invoked by
make -f gb2cwn.mk
There are some severe problems with the CWN. Hbook does apperently not allow for more than 50,000 columns. This is a problem for the architecture chosen for the Ntuples. This will have to be reconsidered.
KUIP commands for generating a file --- * open the FZ output file USER/FZ/DATOUT O gout.fzd * specify to save track, vertex, hit and point information CARDS SAVE 4 KINE VERT HITS JXYZ * analyse 200 events TRIG 200 *close the file USER/FZ/DATOUT C ... KUIP commands for later analyzing these events * open the FZ file USER/FZ/DATIN O gout.fzd * speify what data structures to read CARDS CGET 3 KINE VERT HITS * call a comis routine for each event * 100 events will be read back REPLAY 100 MYANA.FOR ...